newkey

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: 4 Imported by: 0

Documentation

Overview

Package newkey creates keys for the config file builder.

If you need to use the key values before packing keys, you have to set the key builder with SetBuild.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(group, name, label string) *cftype.Key

Bool creates a bool key.

func Custom

func Custom(group, name, label string, makeWidget func(*cftype.Key)) *cftype.Key

Custom creates a custom key.

func CustomButton

func CustomButton(group, name, label string, calls ...Call) *cftype.Key

CustomButton creates a custom key with a label button.

func EmptyFull

func EmptyFull(group, name string) *cftype.Key

EmptyFull creates an empty key at full size.

func Frame

func Frame(group, name, label, icon string) *cftype.Key

Frame creates a frame key.

func LaunchCommand

func LaunchCommand(group, name, label, command string) *cftype.Key

LaunchCommand creates a launch command key.

func Link(group, name, label, linkText, url string) *cftype.Key

Link creates a link key.

func ListNumbered

func ListNumbered(group, name, label string, values ...string) *cftype.Key

ListNumbered creates a bool key.

func Separator

func Separator(group, name string) *cftype.Key

Separator creates a separator key.

func StringEntry

func StringEntry(group, name, label string) *cftype.Key

StringEntry creates a string entry key.

func SwitchText

func SwitchText(log cdtype.Logger, getValue func() bool, setValue func(bool), baseText, moreText string) func(*cftype.Key)

SwitchText creates a switch key with extra togglable text. baseText is always visible and moreText only when active. if baseText is empty, the label won't be updated.

func TextArea

func TextArea(group, name, label string, log cdtype.Logger) *cftype.Key

TextArea creates a textarea key.

func TextLabel

func TextLabel(group, name, label string) *cftype.Key

TextLabel creates a text key.

Types

type Call

type Call struct {
	Label string
	Func  interface{}
	Args  []interface{}
}

Call defines a named callback.

Jump to

Keyboard shortcuts

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