Documentation ¶
Overview ¶
Package confapplets provides an applets list selection widget with preview.
Index ¶
- type ConfApplet
- func (widget *ConfApplet) Clean()
- func (widget *ConfApplet) Clear()
- func (widget *ConfApplet) Load()
- func (widget *ConfApplet) OnSelect(pack datatype.Appleter)
- func (widget *ConfApplet) Save()
- func (widget *ConfApplet) Selected() datatype.Appleter
- func (widget *ConfApplet) SetControlInstall(ctrl appletlist.ControlInstall)
- func (widget *ConfApplet) UpdateModuleState(name string, active bool)
- type GUIControl
- type ListInterface
- type ListInterfaceBase
- type ListMode
- type MenuDownload
- type MenuDownloader
- type SelectIconser
- type UpdateModuleStater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfApplet ¶
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 ¶
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 ¶
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) OnSelect ¶
func (widget *ConfApplet) OnSelect(pack datatype.Appleter)
OnSelect reacts when a row is selected. Show preview and set menu position.
func (*ConfApplet) Save ¶
func (widget *ConfApplet) Save()
Save enables the selected applet (user clicked the add button).
func (*ConfApplet) Selected ¶
func (widget *ConfApplet) Selected() datatype.Appleter
Selected returns the name of the selected page.
func (*ConfApplet) SetControlInstall ¶
func (widget *ConfApplet) SetControlInstall(ctrl appletlist.ControlInstall)
SetControlInstall forwards the list controler to the menu for updates.
func (*ConfApplet) UpdateModuleState ¶
func (widget *ConfApplet) UpdateModuleState(name string, active bool)
UpdateModuleState updates the state of the given applet, from a dock event.
type GUIControl ¶
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 ¶
type ListInterface interface { ListInterfaceBase Selected() datatype.Appleter Delete(string) }
ListInterface is the interface to the applets list.
type ListInterfaceBase ¶
ListInterfaceBase is the interface to the applets list.
type MenuDownload ¶
MenuDownload provides install and active switches to control the selected applet.
func NewMenuDownload ¶
func NewMenuDownload(log cdtype.Logger) *MenuDownload
NewMenuDownload creates the menu to control the selected applet.
func (*MenuDownload) OnSelect ¶
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 (*MenuDownload) SetActiveState ¶
func (widget *MenuDownload) SetActiveState(state bool)
SetActiveState sets the state of the 'active' switch.
func (*MenuDownload) SetControlInstall ¶
func (widget *MenuDownload) SetControlInstall(ctrl appletlist.ControlInstall)
SetControlInstall forwards the list controler to the menu for updates.
func (*MenuDownload) SetInstalledState ¶
func (widget *MenuDownload) SetInstalledState(state bool)
SetInstalledState sets the state of the 'installed' switch.
type MenuDownloader ¶
type MenuDownloader interface { OnSelect(datatype.Appleter) SetControlInstall(appletlist.ControlInstall) SetActiveState(bool) }
MenuDownloader forwards events to other widgets.
type SelectIconser ¶
type SelectIconser interface {
SelectIcons(string)
}
SelectIconser defines the optional control item selection.
type UpdateModuleStater ¶
UpdateModuleStater defines a widget able to update module state.