Documentation ¶
Index ¶
- Constants
- func NewMainDisplay(app *tview.Application, previousConfig *client.GlobalConfig, ...) *mainDisplay
- type BeaconConfigPage
- type DirectionalModal
- func (m *DirectionalModal) AddButtons(labels []string) *DirectionalModal
- func (m *DirectionalModal) ClearButtons() *DirectionalModal
- func (m *DirectionalModal) Draw(screen tcell.Screen)
- func (m *DirectionalModal) Focus(delegate func(p tview.Primitive))
- func (m *DirectionalModal) HasFocus() bool
- func (m *DirectionalModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *DirectionalModal) SetBackgroundColor(color tcell.Color) *DirectionalModal
- func (m *DirectionalModal) SetButtonTextColor(color tcell.Color) *DirectionalModal
- func (m *DirectionalModal) SetButtonUnfocusedBackgroundColor(color tcell.Color) *DirectionalModal
- func (m *DirectionalModal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *DirectionalModal
- func (m *DirectionalModal) SetFocus(index int) *DirectionalModal
- func (m *DirectionalModal) SetText(text string) *DirectionalModal
- func (m *DirectionalModal) SetTextColor(color tcell.Color) *DirectionalModal
- type DropDown
- func (d *DropDown) AddOption(text string, selected func()) *DropDown
- func (d *DropDown) CloseList(app *tview.Application)
- func (d *DropDown) Draw(screen tcell.Screen)
- func (d *DropDown) Focus(delegate func(p tview.Primitive))
- func (d *DropDown) GetCurrentOption() (int, string)
- func (d *DropDown) GetFieldHeight() int
- func (d *DropDown) GetFieldWidth() int
- func (d *DropDown) GetLabel() string
- func (d *DropDown) GetList() *tview.List
- func (d *DropDown) HasFocus() bool
- func (d *DropDown) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *DropDown) MouseHandler() ...
- func (d *DropDown) SetChangedFunc(handler func(index int, mainText, secondaryText string, shortcut rune)) *DropDown
- func (d *DropDown) SetCurrentOption(index int) *DropDown
- func (d *DropDown) SetDisabled(disabled bool) tview.FormItem
- func (d *DropDown) SetDoneFunc(handler func(key tcell.Key)) *DropDown
- func (d *DropDown) SetFieldBackgroundColor(color tcell.Color) *DropDown
- func (d *DropDown) SetFieldTextColor(color tcell.Color) *DropDown
- func (d *DropDown) SetFieldWidth(width int) *DropDown
- func (d *DropDown) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (d *DropDown) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
- func (d *DropDown) SetLabel(label string) *DropDown
- func (d *DropDown) SetLabelColor(color tcell.Color) *DropDown
- func (d *DropDown) SetLabelWidth(width int) *DropDown
- func (d *DropDown) SetListStyles(unselected, selected tcell.Style) *DropDown
- func (d *DropDown) SetOptions(texts []string, selected func(text string, index int)) *DropDown
- func (d *DropDown) SetPrefixTextColor(color tcell.Color) *DropDown
- func (d *DropDown) SetSelectedFunc(handler func(text string, index int)) *DropDown
- func (d *DropDown) SetTextOptions(prefix, suffix, currentPrefix, currentSuffix, noSelection string) *DropDown
- type ExecutionConfigPage
- type FallbackConfigPage
- type Form
- func (f *Form) AddButton(label string, selected func()) *Form
- func (f *Form) AddCheckbox(label string, checked bool, changed func(checked bool)) *Form
- func (f *Form) AddDropDown(label string, options []string, initialOption int, ...) *Form
- func (f *Form) AddFormItem(item tview.FormItem) *Form
- func (f *Form) AddInputField(label, value string, fieldWidth int, ...) *Form
- func (f *Form) AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) *Form
- func (f *Form) Clear(includeButtons bool) *Form
- func (f *Form) ClearButtons() *Form
- func (f *Form) Draw(screen tcell.Screen)
- func (f *Form) Focus(delegate func(p tview.Primitive))
- func (f *Form) GetButton(index int) *tview.Button
- func (f *Form) GetButtonCount() int
- func (f *Form) GetButtonIndex(label string) int
- func (f *Form) GetFocusedItemIndex() (formItem, button int)
- func (f *Form) GetFormItem(index int) tview.FormItem
- func (f *Form) GetFormItemByLabel(label string) tview.FormItem
- func (f *Form) GetFormItemCount() int
- func (f *Form) GetFormItemIndex(label string) int
- func (f *Form) HasFocus() bool
- func (f *Form) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (f *Form) MouseHandler() ...
- func (f *Form) RemoveButton(index int) *Form
- func (f *Form) RemoveFormItem(index int) *Form
- func (f *Form) SetButtonBackgroundActivatedColor(color tcell.Color) *Form
- func (f *Form) SetButtonBackgroundColor(color tcell.Color) *Form
- func (f *Form) SetButtonTextActivatedColor(color tcell.Color) *Form
- func (f *Form) SetButtonTextColor(color tcell.Color) *Form
- func (f *Form) SetButtonsAlign(align int) *Form
- func (f *Form) SetCancelFunc(callback func()) *Form
- func (f *Form) SetChangedFunc(callback func(index int)) *Form
- func (f *Form) SetFieldBackgroundColor(color tcell.Color) *Form
- func (f *Form) SetFieldTextColor(color tcell.Color) *Form
- func (f *Form) SetFocus(index int) *Form
- func (f *Form) SetHorizontal(horizontal bool) *Form
- func (f *Form) SetItemPadding(padding int) *Form
- func (f *Form) SetLabelColor(color tcell.Color) *Form
- type HyperdriveConfigPage
- type LoggingConfigPage
- type MetricsConfigPage
- type ModulesPage
- type Pseudomodal
- func (m *Pseudomodal) AddButtons(labels []string) *Pseudomodal
- func (m *Pseudomodal) ClearButtons() *Pseudomodal
- func (m *Pseudomodal) Draw(screen tcell.Screen)
- func (m *Pseudomodal) Focus(delegate func(p tview.Primitive))
- func (m *Pseudomodal) HasFocus() bool
- func (m *Pseudomodal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *Pseudomodal) SetBackgroundColor(color tcell.Color) *Pseudomodal
- func (m *Pseudomodal) SetButtonTextColor(color tcell.Color) *Pseudomodal
- func (m *Pseudomodal) SetButtonUnfocusedBackgroundColor(color tcell.Color) *Pseudomodal
- func (m *Pseudomodal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *Pseudomodal
- func (m *Pseudomodal) SetFocus(index int) *Pseudomodal
- func (m *Pseudomodal) SetText(text string) *Pseudomodal
- func (m *Pseudomodal) SetTextColor(color tcell.Color) *Pseudomodal
- type ReviewPage
- type StakewiseConfigPage
Constants ¶
const ( // Background for all UI elements BackgroundColor tcell.Color = tcell.ColorDarkSlateGray // Border BorderColor tcell.Color = tcell.ColorGold // Unfocused buttons ButtonUnfocusedBackgroundColor tcell.Color = tcell.ColorBlack ButtonUnfocusedTextColor tcell.Color = tcell.ColorLightGray // Focused buttons ButtonFocusedBackgroundColor tcell.Color = tcell.Color46 // A lovely bright green ButtonFocusedTextColor tcell.Color = tcell.ColorBlack // Unfocused home buttons HomeButtonUnfocusedBackgroundColor tcell.Color = tcell.ColorDarkSlateGray HomeButtonUnfocusedTextColor tcell.Color = tcell.ColorLightGray )
const DirectionalModalHorizontal int = 0
const DirectionalModalVertical int = 1
Variables ¶
This section is empty.
Functions ¶
func NewMainDisplay ¶
func NewMainDisplay(app *tview.Application, previousConfig *client.GlobalConfig, config *client.GlobalConfig, isNew bool, isUpdate bool) *mainDisplay
Creates a new MainDisplay instance.
Types ¶
type BeaconConfigPage ¶
type BeaconConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the BN configs
func NewBeaconConfigPage ¶
func NewBeaconConfigPage(home *settingsHome) *BeaconConfigPage
Creates a new page for the Beacon Node settings
type DirectionalModal ¶
DirectionalModal is an extension of Modal that allows for vertically stacked buttons.
func NewDirectionalModal ¶
func NewDirectionalModal(direction int, app *tview.Application) *DirectionalModal
NewDirectionalModal returns a new modal message window.
func (*DirectionalModal) AddButtons ¶
func (m *DirectionalModal) AddButtons(labels []string) *DirectionalModal
AddButtons adds buttons to the window. There must be at least one button and a "done" handler so the window can be closed again.
func (*DirectionalModal) ClearButtons ¶
func (m *DirectionalModal) ClearButtons() *DirectionalModal
ClearButtons removes all buttons from the window.
func (*DirectionalModal) Draw ¶
func (m *DirectionalModal) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*DirectionalModal) Focus ¶
func (m *DirectionalModal) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*DirectionalModal) HasFocus ¶
func (m *DirectionalModal) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*DirectionalModal) InputHandler ¶
func (m *DirectionalModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns the handler for this primitive.
func (*DirectionalModal) SetBackgroundColor ¶
func (m *DirectionalModal) SetBackgroundColor(color tcell.Color) *DirectionalModal
SetBackgroundColor sets the color of the modal frame background.
func (*DirectionalModal) SetButtonTextColor ¶
func (m *DirectionalModal) SetButtonTextColor(color tcell.Color) *DirectionalModal
SetButtonTextColor sets the color of the button texts.
func (*DirectionalModal) SetButtonUnfocusedBackgroundColor ¶ added in v0.2.3
func (m *DirectionalModal) SetButtonUnfocusedBackgroundColor(color tcell.Color) *DirectionalModal
SetButtonUnfocusedBackgroundColor sets the background color of the buttons.
func (*DirectionalModal) SetDoneFunc ¶
func (m *DirectionalModal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *DirectionalModal
SetDoneFunc sets a handler which is called when one of the buttons was pressed. It receives the index of the button as well as its label text. The handler is also called when the user presses the Escape key. The index will then be negative and the label text an emptry string.
func (*DirectionalModal) SetFocus ¶
func (m *DirectionalModal) SetFocus(index int) *DirectionalModal
SetFocus shifts the focus to the button with the given index.
func (*DirectionalModal) SetText ¶
func (m *DirectionalModal) SetText(text string) *DirectionalModal
SetText sets the message text of the window. The text may contain line breaks. Note that words are wrapped, too, based on the final size of the window.
func (*DirectionalModal) SetTextColor ¶
func (m *DirectionalModal) SetTextColor(color tcell.Color) *DirectionalModal
SetTextColor sets the color of the message text.
type DropDown ¶
DropDown implements a selection widget whose options become visible in a drop-down list when activated.
See https://github.com/rivo/tview/wiki/DropDown for an example.
func (*DropDown) AddOption ¶
AddOption adds a new selectable option to this drop-down. The "selected" callback is called when this option was selected. It may be nil.
func (*DropDown) CloseList ¶
func (d *DropDown) CloseList(app *tview.Application)
Closes a list, reverting the selected index.
func (*DropDown) Draw ¶
func (d *DropDown) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*DropDown) GetCurrentOption ¶
GetCurrentOption returns the index of the currently selected option as well as its text. If no option was selected, -1 and an empty string is returned.
func (*DropDown) GetFieldHeight ¶
GetFieldHeight returns this primitive's field height.
func (*DropDown) GetFieldWidth ¶
GetFieldWidth returns this primitive's field screen width.
func (*DropDown) InputHandler ¶
InputHandler returns the handler for this primitive.
func (*DropDown) MouseHandler ¶
func (d *DropDown) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
MouseHandler returns the mouse handler for this primitive.
func (*DropDown) SetChangedFunc ¶
func (*DropDown) SetCurrentOption ¶
SetCurrentOption sets the index of the currently selected option. This may be a negative value to indicate that no option is currently selected. Calling this function will also trigger the "selected" callback (if there is one).
func (*DropDown) SetDisabled ¶ added in v0.2.3
SetDisabled sets whether or not the item is disabled / read-only.
func (*DropDown) SetDoneFunc ¶
SetDoneFunc sets a handler which is called when the user is done selecting options. The callback function is provided with the key that was pressed, which is one of the following:
- KeyEscape: Abort selection.
- KeyTab: Move to the next field.
- KeyBacktab: Move to the previous field.
func (*DropDown) SetFieldBackgroundColor ¶
SetFieldBackgroundColor sets the background color of the options area.
func (*DropDown) SetFieldTextColor ¶
SetFieldTextColor sets the text color of the options area.
func (*DropDown) SetFieldWidth ¶
SetFieldWidth sets the screen width of the options area. A value of 0 means extend to as long as the longest option text.
func (*DropDown) SetFinishedFunc ¶
SetFinishedFunc sets a callback invoked when the user leaves this form item.
func (*DropDown) SetFormAttributes ¶
func (d *DropDown) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes sets attributes shared by all form items.
func (*DropDown) SetLabelColor ¶
SetLabelColor sets the color of the label.
func (*DropDown) SetLabelWidth ¶
SetLabelWidth sets the screen width of the label. A value of 0 will cause the primitive to use the width of the label string.
func (*DropDown) SetListStyles ¶
SetListStyles sets the styles of the items in the drop-down list (unselected as well as selected items). Style attributes are currently ignored but may be used in the future.
func (*DropDown) SetOptions ¶
SetOptions replaces all current options with the ones provided and installs one callback function which is called when one of the options is selected. It will be called with the option's text and its index into the options slice. The "selected" parameter may be nil.
func (*DropDown) SetPrefixTextColor ¶
SetPrefixTextColor sets the color of the prefix string. The prefix string is shown when the user starts typing text, which directly selects the first option that starts with the typed string.
func (*DropDown) SetSelectedFunc ¶
SetSelectedFunc sets a handler which is called when the user changes the drop-down's option. This handler will be called in addition and prior to an option's optional individual handler. The handler is provided with the selected option's text and index. If "no option" was selected, these values are an empty string and -1.
func (*DropDown) SetTextOptions ¶
func (d *DropDown) SetTextOptions(prefix, suffix, currentPrefix, currentSuffix, noSelection string) *DropDown
SetTextOptions sets the text to be placed before and after each drop-down option (prefix/suffix), the text placed before and after the currently selected option (currentPrefix/currentSuffix) as well as the text to be displayed when no option is currently selected. Per default, all of these strings are empty.
type ExecutionConfigPage ¶
type ExecutionConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the EC config
func NewExecutionConfigPage ¶
func NewExecutionConfigPage(home *settingsHome) *ExecutionConfigPage
Creates a new page for the Execution client settings
type FallbackConfigPage ¶
type FallbackConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the fallback config
func NewFallbackConfigPage ¶
func NewFallbackConfigPage(home *settingsHome) *FallbackConfigPage
Creates a new page for the fallback client settings
type Form ¶
Form allows you to combine multiple one-line form elements into a vertical or horizontal layout. Form elements include types such as InputField or Checkbox. These elements can be optionally followed by one or more buttons for which you can define form-wide actions (e.g. Save, Clear, Cancel).
See https://github.com/rivo/tview/wiki/Form for an example.
func (*Form) AddButton ¶
AddButton adds a new button to the form. The "selected" function is called when the user selects this button. It may be nil.
func (*Form) AddCheckbox ¶
AddCheckbox adds a checkbox to the form. It has a label, an initial state, and an (optional) callback function which is invoked when the state of the checkbox was changed by the user.
func (*Form) AddDropDown ¶
func (f *Form) AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *Form
AddDropDown adds a drop-down element to the form. It has a label, options, and an (optional) callback function which is invoked when an option was selected. The initial option may be a negative value to indicate that no option is currently selected.
func (*Form) AddFormItem ¶
AddFormItem adds a new item to the form. This can be used to add your own objects to the form. Note, however, that the Form class will override some of its attributes to make it work in the form context. Specifically, these are:
- The label width
- The label color
- The background color
- The field text color
- The field background color
func (*Form) AddInputField ¶
func (f *Form) AddInputField(label, value string, fieldWidth int, accept func(textToCheck string, lastChar rune) bool, changed func(text string)) *Form
AddInputField adds an input field to the form. It has a label, an optional initial value, a field width (a value of 0 extends it as far as possible), an optional accept function to validate the item's value (set to nil to accept any text), and an (optional) callback function which is invoked when the input field's text has changed.
func (*Form) AddPasswordField ¶
func (f *Form) AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) *Form
AddPasswordField adds a password field to the form. This is similar to an input field except that the user's input not shown. Instead, a "mask" character is displayed. The password field has a label, an optional initial value, a field width (a value of 0 extends it as far as possible), and an (optional) callback function which is invoked when the input field's text has changed.
func (*Form) Clear ¶
Clear removes all input elements from the form, including the buttons if specified.
func (*Form) ClearButtons ¶
ClearButtons removes all buttons from the form.
func (*Form) Draw ¶
func (f *Form) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*Form) GetButton ¶
GetButton returns the button at the specified 0-based index. Note that buttons have been specially prepared for this form and modifying some of their attributes may have unintended side effects.
func (*Form) GetButtonCount ¶
GetButtonCount returns the number of buttons in this form.
func (*Form) GetButtonIndex ¶
GetButtonIndex returns the index of the button with the given label, starting with 0 for the button that was added first. If no such label was found, -1 is returned.
func (*Form) GetFocusedItemIndex ¶
GetFocusedItemIndex returns the indices of the form element or button which currently has focus. If they don't, -1 is returned resepectively.
func (*Form) GetFormItem ¶
GetFormItem returns the form item at the given position, starting with index 0. Elements are referenced in the order they were added. Buttons are not included.
func (*Form) GetFormItemByLabel ¶
GetFormItemByLabel returns the first form element with the given label. If no such element is found, nil is returned. Buttons are not searched and will therefore not be returned.
func (*Form) GetFormItemCount ¶
GetFormItemCount returns the number of items in the form (not including the buttons).
func (*Form) GetFormItemIndex ¶
GetFormItemIndex returns the index of the first form element with the given label. If no such element is found, -1 is returned. Buttons are not searched and will therefore not be returned.
func (*Form) InputHandler ¶
InputHandler returns the handler for this primitive.
func (*Form) MouseHandler ¶
func (f *Form) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
MouseHandler returns the mouse handler for this primitive.
func (*Form) RemoveButton ¶
RemoveButton removes the button at the specified position, starting with 0 for the button that was added first.
func (*Form) RemoveFormItem ¶
RemoveFormItem removes the form element at the given position, starting with index 0. Elements are referenced in the order they were added. Buttons are not included.
func (*Form) SetButtonBackgroundActivatedColor ¶
SetButtonUnfocusedBackgroundColor sets the background color of the buttons when activated.
func (*Form) SetButtonBackgroundColor ¶
SetButtonBackgroundColor sets the background color of the buttons.
func (*Form) SetButtonTextActivatedColor ¶
SetButtonTextColor sets the color of the button texts when activated.
func (*Form) SetButtonTextColor ¶
SetButtonTextColor sets the color of the button texts.
func (*Form) SetButtonsAlign ¶
SetButtonsAlign sets how the buttons align horizontally, one of AlignLeft (the default), AlignCenter, and AlignRight. This is only
func (*Form) SetCancelFunc ¶
SetCancelFunc sets a handler which is called when the user hits the Escape key.
func (*Form) SetChangedFunc ¶
SetChangedFunc sets a handler which is called when the user moves to another field in the form.
func (*Form) SetFieldBackgroundColor ¶
SetFieldBackgroundColor sets the background color of the input areas.
func (*Form) SetFieldTextColor ¶
SetFieldTextColor sets the text color of the input areas.
func (*Form) SetFocus ¶
SetFocus shifts the focus to the form element with the given index, counting non-button items first and buttons last. Note that this index is only used when the form itself receives focus.
func (*Form) SetHorizontal ¶
SetHorizontal sets the direction the form elements are laid out. If set to true, instead of positioning them from top to bottom (the default), they are positioned from left to right, moving into the next row if there is not enough space.
func (*Form) SetItemPadding ¶
SetItemPadding sets the number of empty rows between form items for vertical layouts and the number of empty cells between form items for horizontal layouts.
func (*Form) SetLabelColor ¶
SetLabelColor sets the color of the labels.
type HyperdriveConfigPage ¶
type HyperdriveConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the Hyperdrive config
func NewHyperdriveConfigPage ¶
func NewHyperdriveConfigPage(home *settingsHome) *HyperdriveConfigPage
Creates a new page for the Hyperdrive settings
type LoggingConfigPage ¶ added in v1.0.0
type LoggingConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the logging config
func NewLoggingConfigPage ¶ added in v1.0.0
func NewLoggingConfigPage(home *settingsHome) *LoggingConfigPage
Creates a new page for the logging settings
type MetricsConfigPage ¶
type MetricsConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the metrics config
func NewMetricsConfigPage ¶
func NewMetricsConfigPage(home *settingsHome) *MetricsConfigPage
Creates a new page for the metrics / stats settings
type ModulesPage ¶
type ModulesPage struct {
// contains filtered or unexported fields
}
The addons page
type Pseudomodal ¶
func NewPseudomodal ¶
func NewPseudomodal(direction int, app *tview.Application) *Pseudomodal
NewPseudomodal returns a new modal message window.
func (*Pseudomodal) AddButtons ¶
func (m *Pseudomodal) AddButtons(labels []string) *Pseudomodal
AddButtons adds buttons to the window. There must be at least one button and a "done" handler so the window can be closed again.
func (*Pseudomodal) ClearButtons ¶
func (m *Pseudomodal) ClearButtons() *Pseudomodal
ClearButtons removes all buttons from the window.
func (*Pseudomodal) Draw ¶
func (m *Pseudomodal) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*Pseudomodal) Focus ¶
func (m *Pseudomodal) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*Pseudomodal) HasFocus ¶
func (m *Pseudomodal) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*Pseudomodal) InputHandler ¶
func (m *Pseudomodal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns the handler for this primitive.
func (*Pseudomodal) SetBackgroundColor ¶
func (m *Pseudomodal) SetBackgroundColor(color tcell.Color) *Pseudomodal
SetBackgroundColor sets the color of the modal frame background.
func (*Pseudomodal) SetButtonTextColor ¶
func (m *Pseudomodal) SetButtonTextColor(color tcell.Color) *Pseudomodal
SetButtonTextColor sets the color of the button texts.
func (*Pseudomodal) SetButtonUnfocusedBackgroundColor ¶ added in v0.2.3
func (m *Pseudomodal) SetButtonUnfocusedBackgroundColor(color tcell.Color) *Pseudomodal
SetButtonUnfocusedBackgroundColor sets the background color of the buttons.
func (*Pseudomodal) SetDoneFunc ¶
func (m *Pseudomodal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *Pseudomodal
SetDoneFunc sets a handler which is called when one of the buttons was pressed. It receives the index of the button as well as its label text. The handler is also called when the user presses the Escape key. The index will then be negative and the label text an emptry string.
func (*Pseudomodal) SetFocus ¶
func (m *Pseudomodal) SetFocus(index int) *Pseudomodal
SetFocus shifts the focus to the button with the given index.
func (*Pseudomodal) SetText ¶
func (m *Pseudomodal) SetText(text string) *Pseudomodal
SetText sets the message text of the window. The text may contain line breaks. Note that words are wrapped, too, based on the final size of the window.
func (*Pseudomodal) SetTextColor ¶
func (m *Pseudomodal) SetTextColor(color tcell.Color) *Pseudomodal
SetTextColor sets the color of the message text.
type ReviewPage ¶
type ReviewPage struct {
// contains filtered or unexported fields
}
The changed settings review page
func NewReviewPage ¶
func NewReviewPage(md *mainDisplay, oldConfig *client.GlobalConfig, newConfig *client.GlobalConfig) *ReviewPage
Create a page to review any changes
type StakewiseConfigPage ¶
type StakewiseConfigPage struct {
// contains filtered or unexported fields
}
The page wrapper for the Stakewise config
func NewStakewiseConfigPage ¶
func NewStakewiseConfigPage(modulesPage *ModulesPage) *StakewiseConfigPage
Creates a new page for the Stakewise settings
Source Files ¶
- cfg-form.go
- checkbox-modal-layout.go
- checkbox-wizard-step.go
- choice-modal-layout.go
- choice-wizard-step.go
- directional-modal.go
- dropdown.go
- form.go
- main-display.go
- modules.go
- page.go
- pseudomodal.go
- review-page.go
- settings-beacon.go
- settings-execution.go
- settings-fallback.go
- settings-home.go
- settings-hyperdrive.go
- settings-logging.go
- settings-metrics.go
- settings-stakewise.go
- settings.go
- standard-layout.go
- step-checkpoint-sync.go
- step-external-bn-select.go
- step-external-bn-settings.go
- step-external-ec-select.go
- step-external-ec-settings.go
- step-external-prysm-settings.go
- step-fallback-normal.go
- step-fallback-prysm.go
- step-finished.go
- step-local-bn-warning.go
- step-local-bn.go
- step-local-ec.go
- step-metrics.go
- step-mode.go
- step-modules.go
- step-network.go
- step-random-bn.go
- step-random-ec.go
- step-use-fallback.go
- step-welcome.go
- textbox-modal-layout.go
- textbox-wizard-step.go
- types.go
- wizard.go