Documentation ¶
Overview ¶
Package confgui is a configuration window for Cairo-Dock.
Using GTK 3.10 to 3.20 library https://github.com/gotk3/gotk3
If you use GTK 3.10, you will have to add a flag to compile it:
go get -tags gtk_3_10 github.com/gotk3/gotk3/gtk
GUI XML files are compressed with github.com/jteeuwen/go-bindata
Index ¶
- Constants
- type Clearer
- type GuiConfigure
- func (widget *GuiConfigure) AddPage(name, iconName string, saver Saver, btn btnaction.Tune, onShow, onHide func())
- func (widget *GuiConfigure) ClickedQuit()
- func (widget *GuiConfigure) ClickedSave()
- func (widget *GuiConfigure) GetWindow() cftype.WinLike
- func (widget *GuiConfigure) Load()
- func (widget *GuiConfigure) OnSelectPage(page string)
- func (widget *GuiConfigure) ReloadItems()
- func (widget *GuiConfigure) Select(page string, item ...string) bool
- func (widget *GuiConfigure) SelectIcons(item string)
- func (widget *GuiConfigure) SetWindow(win *gtk.Window)
- func (widget *GuiConfigure) UpdateDeskletParams(icon datatype.Iconer)
- func (widget *GuiConfigure) UpdateDeskletVisibility(icon datatype.Iconer)
- func (widget *GuiConfigure) UpdateModuleState(name string, active bool)
- func (widget *GuiConfigure) UpdateModulesList()
- func (widget *GuiConfigure) UpdateShortkeys()
- type Page
- type Saver
- type Selecter
- type ShowWelcomer
- type UpdateDeskletParamser
- type UpdateDeskletVisibilityer
- type UpdateShortkeyser
Constants ¶
const ( WindowTitle = "Cairo-Dock Config" WindowClass = "cdc" WindowWidth = 900 WindowHeight = 600 )
Window settings.
const ( GroupIcons = "Icons" GroupAdd = "Add" GroupConfig = "Config" )
Main config groups.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GuiConfigure ¶
type GuiConfigure struct { gtk.Box datatype.Source // embeds the data source. Menu *confmenu.MenuBar // GUI menu widget. OnQuit func() // On clicked Quit callback. // contains filtered or unexported fields }
GuiConfigure defines the main Cairo-Dock configuration widget.
func NewWidget ¶
func NewWidget(source datatype.Source, log cdtype.Logger) *GuiConfigure
NewWidget creates the main Cairo-Dock configuration widget.
func (*GuiConfigure) AddPage ¶
func (widget *GuiConfigure) AddPage(name, iconName string, saver Saver, btn btnaction.Tune, onShow, onHide func())
AddPage adds a tab to the main config switcher with its widget.
func (*GuiConfigure) ClickedQuit ¶
func (widget *GuiConfigure) ClickedQuit()
ClickedQuit launches the OnQuit event defined. The OnQuit action is delayed to the next glib iteration to let GTK finish its current action (like closing a menu before the close window).
func (*GuiConfigure) ClickedSave ¶
func (widget *GuiConfigure) ClickedSave()
ClickedSave forwards the save event to the current widget.
func (*GuiConfigure) GetWindow ¶
func (widget *GuiConfigure) GetWindow() cftype.WinLike
GetWindow returns the pointer to the parent window.
func (*GuiConfigure) OnSelectPage ¶
func (widget *GuiConfigure) OnSelectPage(page string)
OnSelectPage reacts when the page is changed to set the button state and trigger OnHide and OnShow additional callbacks.
func (*GuiConfigure) ReloadItems ¶
func (widget *GuiConfigure) ReloadItems()
ReloadItems refreshes the icons page list (clear and reselect, or select cached).
func (*GuiConfigure) Select ¶
func (widget *GuiConfigure) Select(page string, item ...string) bool
Select selects the given group page and may also select a specific item in the page.
func (*GuiConfigure) SelectIcons ¶
func (widget *GuiConfigure) SelectIcons(item string)
SelectIcons selects a specific icon in the Icons page (key = full path to config file). If the icon isn't found, the name is cached for the late ReloadItems callback.
func (*GuiConfigure) SetWindow ¶
func (widget *GuiConfigure) SetWindow(win *gtk.Window)
SetWindow sets the pointer to the parent window, used for some config callbacks (grab events).
func (*GuiConfigure) UpdateDeskletParams ¶
func (widget *GuiConfigure) UpdateDeskletParams(icon datatype.Iconer)
UpdateDeskletParams updates applet desklet settings if it's loaded.
func (*GuiConfigure) UpdateDeskletVisibility ¶
func (widget *GuiConfigure) UpdateDeskletVisibility(icon datatype.Iconer)
UpdateDeskletVisibility updates applet desklet settings if it's loaded.
func (*GuiConfigure) UpdateModuleState ¶
func (widget *GuiConfigure) UpdateModuleState(name string, active bool)
UpdateModuleState updates the state of the given applet.
func (*GuiConfigure) UpdateModulesList ¶
func (widget *GuiConfigure) UpdateModulesList()
UpdateModulesList updates listed references of applets.
func (*GuiConfigure) UpdateShortkeys ¶
func (widget *GuiConfigure) UpdateShortkeys()
UpdateShortkeys updates the shortkeys widget.
type Page ¶
type Page struct { Widget Saver OnShow func() OnHide func() // contains filtered or unexported fields }
Page defines a switcher page.
type ShowWelcomer ¶
type ShowWelcomer interface {
ShowWelcome(setBtn bool)
}
ShowWelcomer defines the optional interface to show a placeholder page.
type UpdateDeskletParamser ¶
UpdateDeskletParamser defines the interface to update shortkeys of a config page.
type UpdateDeskletVisibilityer ¶
UpdateDeskletVisibilityer defines the interface to update shortkeys of a config page.
type UpdateShortkeyser ¶
type UpdateShortkeyser interface {
UpdateShortkeys()
}
UpdateShortkeyser defines the interface to update shortkeys of a config page.