cfbuild

package
v0.0.0-...-0caaa62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 17 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBuilder

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

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

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

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

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

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

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

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

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

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

func TweakKeySetLabelSelectable

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

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

Types

type CDConfig

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

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

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

func (*CDConfig) Default

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

Default gives access to a field value.

func (*CDConfig) List

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

List lists keys defined in the configuration file.

func (*CDConfig) Valuer

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

Valuer gives access to a field value.

type KeyFiler

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

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

Directories

Path Synopsis
Package cfprint prints config data to the console in a table.
Package cfprint prints config data to the console in a table.
Package cfwidget implements key widgets for the config file builder.
Package cfwidget implements key widgets for the config file builder.
Package cfwin creates a dedicated config builder window.
Package cfwin creates a dedicated config builder window.
Package datatype defines the data source format for the config.
Package datatype defines the data source format for the config.
Package newkey creates keys for the config file builder.
Package newkey creates keys for the config file builder.
Package valuer stores and converts a pointer to interface{}.
Package valuer stores and converts a pointer to interface{}.
Package vdata provides a virtual data source for the config file builder.
Package vdata provides a virtual data source for the config file builder.
Package vstorage provides a virtual config storage for the config file builder.
Package vstorage provides a virtual config storage for the config file builder.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL