godock: github.com/sqp/godock/widgets/cfbuild/cfwidget Index | Files

package cfwidget

import "github.com/sqp/godock/widgets/cfbuild/cfwidget"

Package cfwidget implements key widgets for the config file builder.

Index

Package Files

cfwidget.go others.go widgets.go

Constants

const (
    RowKey = iota
    RowName
    RowIcon
    RowDesc
)

Rows defines liststore rows. Must match the ListStore declaration type and order.

Variables

var Types = map[cftype.KeyType]func(key *cftype.Key){
    cftype.KeyTextLabel: Text,
    cftype.KeyLink:      Link,
    cftype.KeySeparator: Separator,
    cftype.KeyFrame:     Frame,
    cftype.KeyExpander:  Frame,

    cftype.KeyBoolButton:        CheckButton,
    cftype.KeyBoolCtrl:          CheckButton,
    cftype.KeyIntSpin:           IntegerSpin,
    cftype.KeyIntScale:          IntegerScale,
    cftype.KeyIntSize:           IntegerSize,
    cftype.KeyFloatSpin:         Float,
    cftype.KeyFloatScale:        Float,
    cftype.KeyColorSelectorRGB:  ColorSelector,
    cftype.KeyColorSelectorRGBA: ColorSelector,
    cftype.KeyFontSelector:      FontSelector,

    cftype.KeyStringEntry:      Strings,
    cftype.KeyPasswordEntry:    Strings,
    cftype.KeyFileSelector:     Strings,
    cftype.KeyFolderSelector:   Strings,
    cftype.KeySoundSelector:    Strings,
    cftype.KeyShortkeySelector: Strings,
    cftype.KeyClassSelector:    Strings,
    cftype.KeyImageSelector:    Strings,

    cftype.KeyListSimple:       Lists,
    cftype.KeyListEntry:        Lists,
    cftype.KeyListNumbered:     Lists,
    cftype.KeyListNbCtrlSimple: Lists,
    cftype.KeyListNbCtrlSelect: Lists,

    cftype.KeyTreeViewSortSimple:  TreeView,
    cftype.KeyTreeViewSortModify:  TreeView,
    cftype.KeyTreeViewMultiChoice: TreeView,

    cftype.KeyLaunchCmdSimple: LaunchCommand,
    cftype.KeyLaunchCmdIf:     LaunchCommand,

    cftype.KeyEmptyWidget: Nil,
    cftype.KeyEmptyFull:   Nil,

    cftype.KeyListThemeApplet: ListThemeApplet,
    cftype.KeyListDocks:       ListDock,
    cftype.KeyListViews:       ListView,

    cftype.KeyListThemeDesktopIcon: ListThemeDesktopIcon,

    cftype.KeyListAnimation:          ListAnimation,
    cftype.KeyListDialogDecorator:    ListDialogDecorator,
    cftype.KeyListDeskletDecoSimple:  ListDeskletDecoration,
    cftype.KeyListDeskletDecoDefault: ListDeskletDecoration,
    cftype.KeyListIconsMainDock:      ListIconsMainDock,
    cftype.KeyListScreens:            ListScreens,

    cftype.KeyHandbook: Handbook,
}

Types defines widget build methods by key type.

func CheckButton Uses

func CheckButton(key *cftype.Key)

CheckButton adds a check button widget.

func ColorSelector Uses

func ColorSelector(key *cftype.Key)

ColorSelector adds a color selector widget.

func Float Uses

func Float(key *cftype.Key)

Float adds a float selector widget. SpinButton or Horizontal Scale

func FontSelector Uses

func FontSelector(key *cftype.Key)

FontSelector adds a font selector widget.

func Frame Uses

func Frame(key *cftype.Key)

Frame adds a simple or expanded frame widget.

func Handbook Uses

func Handbook(key *cftype.Key)

Handbook adds a handbook widget to show basic applet informations.

func IntegerScale Uses

func IntegerScale(key *cftype.Key)

IntegerScale adds an integer scale widget.

func IntegerSize Uses

func IntegerSize(key *cftype.Key)

IntegerSize adds an integer selector widget.

func IntegerSpin Uses

func IntegerSpin(key *cftype.Key)

IntegerSpin adds an integer scale widget.

func JumpToModule Uses

func JumpToModule(key *cftype.Key)

JumpToModule adds a redirect button widget. USED?

func LaunchCommand Uses

func LaunchCommand(key *cftype.Key)

LaunchCommand adds a launch command widget. HELP ONLY

func Link(key *cftype.Key)

Link adds a link widget.

func ListAnimation Uses

func ListAnimation(key *cftype.Key)

ListAnimation adds an animation list widget.

func ListDeskletDecoration Uses

func ListDeskletDecoration(key *cftype.Key)

ListDeskletDecoration adds a desklet decoration list widget.

func ListDialogDecorator Uses

func ListDialogDecorator(key *cftype.Key)

ListDialogDecorator adds an dialog decorator list widget.

func ListDock Uses

func ListDock(key *cftype.Key)

ListDock adds a dock list widget.

func ListIconsMainDock Uses

func ListIconsMainDock(key *cftype.Key)

ListIconsMainDock adds an icon list widget.

func ListScreens Uses

func ListScreens(key *cftype.Key)

ListScreens adds a screen selection widget.

func ListThemeApplet Uses

func ListThemeApplet(key *cftype.Key)

ListThemeApplet adds an theme list widget.

func ListThemeDesktopIcon Uses

func ListThemeDesktopIcon(key *cftype.Key)

ListThemeDesktopIcon adds a desktop icon-themes list widget.

func ListView Uses

func ListView(key *cftype.Key)

ListView adds a view list widget.

func Lists Uses

func Lists(key *cftype.Key)

Lists adds a string list widget.

func MainCSS Uses

func MainCSS() *gtk.CssProvider

MainCSS provides a common css for widgets.

func Maker Uses

func Maker(key *cftype.Key) func()

Maker returns the make widget call for the key type.

func NewComboBox Uses

func NewComboBox(key *cftype.Key, withEntry, numbered bool, current string, list []datatype.Field) (
    widget *gtk.ComboBox, model *gtk.ListStore, getValue func() interface{}, setValue func(interface{}))

NewComboBox creates a combo box.

func NewComboBoxWithModel Uses

func NewComboBoxWithModel(model *gtk.ListStore, log cdtype.Logger, bAddPreviewWidgets, bWithEntry, bHorizontalPackaging bool) (
    widget *gtk.ComboBox, getValue func() interface{})

NewComboBoxWithModel adds a combo box with the given model (can be nil).

_add_combo_from_modele used do/while. find why

func Nil Uses

func Nil(key *cftype.Key)

Nil defines a nil widget builder.

func PackComboBoxWithIndexHandbooker Uses

func PackComboBoxWithIndexHandbooker(key *cftype.Key, index map[string]datatype.Handbooker)

PackComboBoxWithIndexHandbooker creates a combo box filled with the getList call.

func PackComboBoxWithListField Uses

func PackComboBoxWithListField(key *cftype.Key, withEntry, numbered bool, getList func() []datatype.Field) *gtk.ComboBox

PackComboBoxWithListField creates a combo box filled with the getList call.

func PackReset Uses

func PackReset(key *cftype.Key, value interface{}) *gtk.Button

PackReset adds a reset value button.

func PackValuerAsInt Uses

func PackValuerAsInt(key *cftype.Key, w gtk.IWidget, valuer WidgetValuer, value int)

PackValuerAsInt packs a valuer widget with its reset button (to given value). Values are get and set as int.

func Separator Uses

func Separator(key *cftype.Key)

Separator adds a simple horizontal separator.

func Strings Uses

func Strings(key *cftype.Key)

Strings adds a string widget. Many options included. TODO: G_USER_DIRECTORY_PICTURES.

func Text Uses

func Text(key *cftype.Key)

Text just enlarges the widget label (nothing more intended).

func TreeView Uses

func TreeView(key *cftype.Key)

TreeView adds a treeview widget.

func WrapKeyScale Uses

func WrapKeyScale(key *cftype.Key, child *gtk.Scale) gtk.IWidget

WrapKeyScale wraps a key scale with its information labels if needed (enough values).

(was _pack_hscale).

type WidgetValuer Uses

type WidgetValuer interface {
    GetValue() float64
    SetValue(float64)
}

WidgetValuer defines a widget with GetValue and SetValue methods.

Package cfwidget imports 19 packages (graph) and is imported by 2 packages. Updated 2017-10-03. Refresh now. Tools for package owners.