godock: github.com/sqp/godock/widgets/confgui Index | Files | Directories

package confgui

import "github.com/sqp/godock/widgets/confgui"

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

Package Files

confgui.go

Constants

const (
    WindowTitle  = "Cairo-Dock Config"
    WindowClass  = "cdc"
    WindowWidth  = 900
    WindowHeight = 600
)

Window settings.

const (
    GroupIcons  = "Icons"
    GroupAdd    = "Add"
    GroupConfig = "Config"
)

Main config groups.

type Clearer Uses

type Clearer interface {
    Saver
    Selecter
    Clear() string
}

Clearer defines the interface to clear the data of a config page.

type GuiConfigure Uses

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 Uses

func NewWidget(source datatype.Source, log cdtype.Logger) *GuiConfigure

NewWidget creates the main Cairo-Dock configuration widget.

func NewWindow Uses

func NewWindow(data datatype.Source, log cdtype.Logger) (*GuiConfigure, error)

NewWindow creates a new config window with its widget, ready to use.

func (*GuiConfigure) AddPage Uses

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 Uses

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 Uses

func (widget *GuiConfigure) ClickedSave()

ClickedSave forwards the save event to the current widget.

func (*GuiConfigure) GetWindow Uses

func (widget *GuiConfigure) GetWindow() cftype.WinLike

GetWindow returns the pointer to the parent window.

func (*GuiConfigure) Load Uses

func (widget *GuiConfigure) Load()

Load loads all pages data.

func (*GuiConfigure) OnSelectPage Uses

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 Uses

func (widget *GuiConfigure) ReloadItems()

ReloadItems refreshes the icons page list (clear and reselect, or select cached).

func (*GuiConfigure) Select Uses

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 Uses

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 Uses

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 Uses

func (widget *GuiConfigure) UpdateDeskletParams(icon datatype.Iconer)

UpdateDeskletParams updates applet desklet settings if it's loaded.

func (*GuiConfigure) UpdateDeskletVisibility Uses

func (widget *GuiConfigure) UpdateDeskletVisibility(icon datatype.Iconer)

UpdateDeskletVisibility updates applet desklet settings if it's loaded.

func (*GuiConfigure) UpdateModuleState Uses

func (widget *GuiConfigure) UpdateModuleState(name string, active bool)

UpdateModuleState updates the state of the given applet.

func (*GuiConfigure) UpdateModulesList Uses

func (widget *GuiConfigure) UpdateModulesList()

UpdateModulesList updates listed references of applets.

func (*GuiConfigure) UpdateShortkeys Uses

func (widget *GuiConfigure) UpdateShortkeys()

UpdateShortkeys updates the shortkeys widget.

type Page Uses

type Page struct {
    Widget Saver
    OnShow func()
    OnHide func()
    // contains filtered or unexported fields
}

Page defines a switcher page.

type Saver Uses

type Saver interface {
    gtk.IWidget
    Load()
    Save()
}

Saver extends the Widget interface with a Save action.

type Selecter Uses

type Selecter interface {
    Select(string) bool
}

Selecter defines the interface to select an item in the config page.

type ShowWelcomer Uses

type ShowWelcomer interface {
    ShowWelcome(setBtn bool)
}

ShowWelcomer defines the optional interface to show a placeholder page.

type UpdateDeskletParamser Uses

type UpdateDeskletParamser interface {
    UpdateDeskletParams(icon datatype.Iconer)
}

UpdateDeskletParamser defines the interface to update shortkeys of a config page.

type UpdateDeskletVisibilityer Uses

type UpdateDeskletVisibilityer interface {
    UpdateDeskletVisibility(icon datatype.Iconer)
}

UpdateDeskletVisibilityer defines the interface to update shortkeys of a config page.

type UpdateShortkeyser Uses

type UpdateShortkeyser interface {
    UpdateShortkeys()
}

UpdateShortkeyser defines the interface to update shortkeys of a config page.

Directories

PathSynopsis
btnactionPackage btnaction provides a button with different actions texts.

Package confgui imports 13 packages (graph) and is imported by 1 packages. Updated 2017-11-23. Refresh now. Tools for package owners.