Documentation
¶
Index ¶
Constants ¶
View Source
const ( OkButtonExecute = OkButton("Execute") OkButtonPrint = OkButton("Print") )
Variables ¶
View Source
var (
ErrInvalidTheme = errors.New("invalid theme")
)
Functions ¶
func ApplyConfig ¶
Types ¶
type Config ¶
type Config struct {
Theme string `` /* 130-byte string literal not displayed */
HideKeyMap bool `yaml:"hideKeyMap,omitempty" head_comment:"If set to true, the key map won't be displayed. Default value: false"`
}
func DefaultConfig ¶
func DefaultConfig() Config
func (*Config) GetSelectedTheme ¶
func (c *Config) GetSelectedTheme(system *system.System) style.ThemeValues
type MessagePrinter ¶ added in v1.6.0
type NamedTheme ¶
type NamedTheme struct {
Name string `yaml:"name"`
Values style.ThemeValues `yaml:"values" head_comment:"A color can be created from a color name (W3C name) or by a hex value in the format #ffffff."`
}
type TUI ¶ added in v1.0.0
type TUI interface {
ApplyConfig(cfg Config, system *system.System)
Print(m uimsg.Printable)
PrintAndExit(uimsg.Printable, int)
PrintMessage(message string)
PrintError(message string)
Confirmation(confirm uimsg.Confirm, options ...confirm.Option) bool
OpenEditor(path string, preferredEditor string)
ShowLookup(snippets []model.Snippet, fuzzySearch bool) int
ShowParameterForm(parameters []model.Parameter, values []model.ParameterValue, okButton OkButton) ([]string, bool)
ShowPicker(title string, items []picker.Item, selectedItem *picker.Item, options ...tea.ProgramOption) (int, bool)
ShowSync() sync.Screen
ShowAssistantPrompt([]string) (bool, string)
ShowAssistantWizard(config wizard.Config) (bool, wizard.Result)
ShowSpinner(string, string, chan bool)
}
type TUIOption ¶ added in v1.0.0
type TUIOption interface {
// contains filtered or unexported methods
}
TUIOption configures a TUI.
func WithScreen ¶
WithScreen sets the screen for tview.
Click to show internal directories.
Click to hide internal directories.