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

package cfbuild

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

Package cfbuild builds a cairo-dock configuration widget from its config file.

Index

Package Files

builder.go grouper.go

func NewBuilder Uses

func NewBuilder(source cftype.Source, log cdtype.Logger, conf cftype.Storage, originalConf, gettextDomain string) cftype.Builder

NewBuilder creates a configuration page builder from a config storage.

func NewFromFile Uses

func NewFromFile(source cftype.Source, log cdtype.Logger, configFile, originalConf, gettextDomain string) (cftype.Grouper, error)

NewFromFile creates a config page builder from the file.

func NewFromFileSafe Uses

func NewFromFileSafe(source cftype.Source, log cdtype.Logger, file, originalConf, gettextDomain string) (cftype.Grouper, bool)

NewFromFileSafe creates a config page builder from the file.

If the load file failed, an error widget is returned with false.

func NewVirtual Uses

func NewVirtual(source cftype.Source, log cdtype.Logger, configFile, originalConf, gettextDomain string) cftype.Grouper

NewVirtual creates a config page builder with an empty virtual storage.

configFile is unused. Can be assigned to anything (and reused for the save).

func TweakAddGroup Uses

func TweakAddGroup(group string, keys ...*cftype.Key) func(cftype.Builder)

TweakAddGroup creates a tweak callback to add a group with keys to a builder.

func TweakAddKeys Uses

func TweakAddKeys(group string, keys ...*cftype.Key) func(cftype.Builder)

TweakAddKeys creates a tweak callback to add keys to an existing builder group.

func TweakKeyAction Uses

func TweakKeyAction(group, name string, actions ...func(*cftype.Key)) func(cftype.Builder)

TweakKeyAction creates a tweak callback to edit a key of an existing builder.

func TweakKeyMakeWidget Uses

func TweakKeyMakeWidget(group, name string, call func(*cftype.Key)) func(cftype.Builder)

TweakKeyMakeWidget creates a tweak callback to set a key widget builder.

func TweakKeySetAlignedVertical Uses

func TweakKeySetAlignedVertical(group, name string) func(cftype.Builder)

TweakKeySetAlignedVertical creates a tweak callback to set a key widget alignment.

func TweakKeySetLabelSelectable Uses

func TweakKeySetLabelSelectable(group, name string) func(cftype.Builder)

TweakKeySetLabelSelectable creates a tweak callback to set the key label text selectable. Only valid after build.

type CDConfig Uses

type CDConfig struct {
    keyfile.KeyFile
    cftype.BaseStorage // filepath and build.
    // contains filtered or unexported fields
}

CDConfig loads data from a Cairo-Dock configuration file. Implements cftype.Storage.

func LoadFile Uses

func LoadFile(configFile, configDefault string) (*CDConfig, error)

LoadFile loads a Cairo-Dock configuration file as *CDConfig.

func (*CDConfig) Default Uses

func (conf *CDConfig) Default(group, name string) (valuer.Valuer, error)

Default gives access to a field value.

func (*CDConfig) List Uses

func (conf *CDConfig) List(group string) (list []*cftype.Key)

List lists keys defined in the configuration file.

func (*CDConfig) Valuer Uses

func (conf *CDConfig) Valuer(group, name string) valuer.Valuer

Valuer gives access to a field value.

type KeyFiler Uses

type KeyFiler interface {
    KeyFile() *keyfile.KeyFile
}

KeyFiler defines the interface to recognise a grouper (provides its KeyFile).

Directories

PathSynopsis
cfprintPackage cfprint prints config data to the console in a table.
cftype
cfwidgetPackage cfwidget implements key widgets for the config file builder.
cfwinPackage cfwin creates a dedicated config builder window.
datatypePackage datatype defines the data source format for the config.
newkeyPackage newkey creates keys for the config file builder.
valuerPackage valuer stores and converts a pointer to interface{}.
vdataPackage vdata provides a virtual data source for the config file builder.
vstoragePackage vstorage provides a virtual config storage for the config file builder.

Package cfbuild imports 17 packages (graph) and is imported by 10 packages. Updated 2017-11-22. Refresh now. Tools for package owners.