godock: github.com/sqp/godock/widgets/confapplets Index | Files

package confapplets

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

Package confapplets provides an applets list selection widget with preview.

Index

Package Files

confapplets.go

type ConfApplet Uses

type ConfApplet struct {
    gtk.Box

    Applets *map[string]datatype.Appleter // List of applets known by the Dock.
    // contains filtered or unexported fields
}

ConfApplet provides an applets list and preview widget. It can be connected to a control menu to allow actions on the modules listed.

func New Uses

func New(control GUIControl, log cdtype.Logger, menu MenuDownloader, mode ListMode) *ConfApplet

New creates a widget to list cairo-dock applets and themes.

func NewLoaded Uses

func NewLoaded(control GUIControl, log cdtype.Logger, menu MenuDownloader, mode ListMode) *ConfApplet

NewLoaded creates a widget to list cairo-dock applets and themes and loads data.

func (*ConfApplet) Clean Uses

func (widget *ConfApplet) Clean()

Clean removes temporary files.

func (*ConfApplet) Clear Uses

func (widget *ConfApplet) Clear()

Clear clears the widget data.

func (*ConfApplet) Load Uses

func (widget *ConfApplet) Load()

Load list of applets in the appletlist.

func (*ConfApplet) OnSelect Uses

func (widget *ConfApplet) OnSelect(pack datatype.Appleter)

OnSelect reacts when a row is selected. Show preview and set menu position.

func (*ConfApplet) Save Uses

func (widget *ConfApplet) Save()

Save enables the selected applet (user clicked the add button).

func (*ConfApplet) Selected Uses

func (widget *ConfApplet) Selected() datatype.Appleter

Selected returns the name of the selected page.

func (*ConfApplet) SetControlInstall Uses

func (widget *ConfApplet) SetControlInstall(ctrl appletlist.ControlInstall)

SetControlInstall forwards the list controler to the menu for updates.

func (*ConfApplet) UpdateModuleState Uses

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

UpdateModuleState updates the state of the given applet, from a dock event.

type GUIControl Uses

type GUIControl interface {
    ListKnownApplets() map[string]datatype.Appleter
    ListDownloadApplets() (map[string]datatype.Appleter, error)
    ListDockThemeLoad() (map[string]datatype.Appleter, error)
    ListDockThemeSave() []datatype.Field
}

GUIControl is the interface to the main GUI and data source.

type ListInterface Uses

type ListInterface interface {
    ListInterfaceBase
    Selected() datatype.Appleter
    Delete(string)
}

ListInterface is the interface to the applets list.

type ListInterfaceBase Uses

type ListInterfaceBase interface {
    gtk.IWidget
    Load(map[string]datatype.Appleter)
    Clear()
}

ListInterfaceBase is the interface to the applets list.

type ListMode Uses

type ListMode int

ListMode defines the ConfApplet widget behaviour.

const (
    ListCanAdd   ListMode = iota // Applets for the add page.
    ListExternal                 // Applets for the download page.
    ListThemes                   // Global dock themes.
)

List widget behaviours.

type MenuDownload struct {
    gtk.Box
    // contains filtered or unexported fields
}

MenuDownload provides install and active switches to control the selected applet.

func NewMenuDownload Uses

func NewMenuDownload(log cdtype.Logger) *MenuDownload

NewMenuDownload creates the menu to control the selected applet.

func (widget *MenuDownload) OnSelect(pack datatype.Appleter)

OnSelect reacts when a row is selected. Set preview data and set installed and active buttons state.

func (widget *MenuDownload) SetActiveState(state bool)

SetActiveState sets the state of the 'active' switch.

func (widget *MenuDownload) SetControlInstall(ctrl appletlist.ControlInstall)

SetControlInstall forwards the list controler to the menu for updates.

func (widget *MenuDownload) SetInstalledState(state bool)

SetInstalledState sets the state of the 'installed' switch.

type MenuDownloader interface {
    OnSelect(datatype.Appleter)
    SetControlInstall(appletlist.ControlInstall)
    SetActiveState(bool)
}

MenuDownloader forwards events to other widgets.

type SelectIconser Uses

type SelectIconser interface {
    SelectIcons(string)
}

SelectIconser defines the optional control item selection.

type UpdateModuleStater Uses

type UpdateModuleStater interface {
    UpdateModuleState(string, bool)
}

UpdateModuleStater defines a widget able to update module state.

Package confapplets imports 9 packages (graph) and is imported by 4 packages. Updated 2017-10-01. Refresh now. Tools for package owners.