Documentation ¶
Index ¶
- Constants
- func GetRoot(app *tview.Application) tview.Primitive
- type ConfirmDialog
- func (d *ConfirmDialog) Display() *ConfirmDialog
- func (d *ConfirmDialog) Draw(screen tcell.Screen)
- func (d *ConfirmDialog) Focus(delegate func(p tview.Primitive))
- func (d *ConfirmDialog) HasFocus() bool
- func (d *ConfirmDialog) Hide() *ConfirmDialog
- func (d *ConfirmDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *ConfirmDialog) IsDisplay() bool
- func (d *ConfirmDialog) SetCancelFunc(handler func()) *ConfirmDialog
- func (d *ConfirmDialog) SetRect(x, y, width, height int)
- func (d *ConfirmDialog) SetSelectedFunc(handler func()) *ConfirmDialog
- func (d *ConfirmDialog) SetText(message string) *ConfirmDialog
- func (d *ConfirmDialog) SetTitle(title string) *ConfirmDialog
- type MessageDialog
- func (d *MessageDialog) Display() *MessageDialog
- func (d *MessageDialog) Draw(screen tcell.Screen)
- func (d *MessageDialog) Focus(delegate func(p tview.Primitive))
- func (d *MessageDialog) HasFocus() bool
- func (d *MessageDialog) Hide()
- func (d *MessageDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *MessageDialog) IsDisplay() bool
- func (d *MessageDialog) SetCancelFunc(handler func()) *MessageDialog
- func (d *MessageDialog) SetRect(x, y, width, height int)
- func (d *MessageDialog) SetText(headerType messageInfo, headerMessage string, message string)
- func (d *MessageDialog) SetTitle(title string) *MessageDialog
- func (d *MessageDialog) TextScrollToEnd()
- type Modal
- type SimpleInputDialog
- func (d *SimpleInputDialog) Display() *SimpleInputDialog
- func (d *SimpleInputDialog) Draw(screen tcell.Screen)
- func (d *SimpleInputDialog) Focus(delegate func(p tview.Primitive))
- func (d *SimpleInputDialog) GetInputText() string
- func (d *SimpleInputDialog) GetRect() (int, int, int, int)
- func (d *SimpleInputDialog) HasFocus() bool
- func (d *SimpleInputDialog) Hide() *SimpleInputDialog
- func (d *SimpleInputDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *SimpleInputDialog) IsDisplay() bool
- func (d *SimpleInputDialog) SetCancelFunc(handler func()) *SimpleInputDialog
- func (d *SimpleInputDialog) SetDescription(text string) *SimpleInputDialog
- func (d *SimpleInputDialog) SetInputText(text string)
- func (d *SimpleInputDialog) SetLabel(text string) *SimpleInputDialog
- func (d *SimpleInputDialog) SetRect(x, y, width, height int)
- func (d *SimpleInputDialog) SetSelectButtonLabel(label string) *SimpleInputDialog
- func (d *SimpleInputDialog) SetSelectedFunc(handler func(value string)) *SimpleInputDialog
- func (d *SimpleInputDialog) SetTitle(title string) *SimpleInputDialog
Constants ¶
const ( // top dialog header label. MessageSystemInfo messageInfo = 0 + iota MessagePodInfo MessageContainerInfo MessageVolumeInfo MessageImageInfo MessageNetworkInfo )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfirmDialog ¶
ConfirmDialog is a simple confirmation dialog primitive.
func NewConfirmDialog ¶
func NewConfirmDialog() *ConfirmDialog
NewConfirmDialog returns new confirm dialog primitive.
func (*ConfirmDialog) Display ¶
func (d *ConfirmDialog) Display() *ConfirmDialog
Display displays this primitive.
func (*ConfirmDialog) Draw ¶
func (d *ConfirmDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*ConfirmDialog) Focus ¶
func (d *ConfirmDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*ConfirmDialog) HasFocus ¶
func (d *ConfirmDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*ConfirmDialog) Hide ¶
func (d *ConfirmDialog) Hide() *ConfirmDialog
Hide stops displaying this primitive.
func (*ConfirmDialog) InputHandler ¶
func (d *ConfirmDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive.
func (*ConfirmDialog) IsDisplay ¶
func (d *ConfirmDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown.
func (*ConfirmDialog) SetCancelFunc ¶
func (d *ConfirmDialog) SetCancelFunc(handler func()) *ConfirmDialog
SetCancelFunc sets form cancel button selected function.
func (*ConfirmDialog) SetRect ¶
func (d *ConfirmDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*ConfirmDialog) SetSelectedFunc ¶
func (d *ConfirmDialog) SetSelectedFunc(handler func()) *ConfirmDialog
SetSelectedFunc sets form select button selected function.
func (*ConfirmDialog) SetText ¶
func (d *ConfirmDialog) SetText(message string) *ConfirmDialog
SetText sets dialog title.
func (*ConfirmDialog) SetTitle ¶
func (d *ConfirmDialog) SetTitle(title string) *ConfirmDialog
SetTitle sets dialog title.
type MessageDialog ¶
MessageDialog is a simaple message dialog primitive.
func NewMessageDialog ¶
func NewMessageDialog(text string) *MessageDialog
NewMessageDialog returns new message dialog primitive.
func (*MessageDialog) Display ¶
func (d *MessageDialog) Display() *MessageDialog
Display displays this primitive.
func (*MessageDialog) Draw ¶
func (d *MessageDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*MessageDialog) Focus ¶
func (d *MessageDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*MessageDialog) HasFocus ¶
func (d *MessageDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*MessageDialog) InputHandler ¶
func (d *MessageDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive.
func (*MessageDialog) IsDisplay ¶
func (d *MessageDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown.
func (*MessageDialog) SetCancelFunc ¶
func (d *MessageDialog) SetCancelFunc(handler func()) *MessageDialog
SetCancelFunc sets form cancel button selected function.
func (*MessageDialog) SetRect ¶
func (d *MessageDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*MessageDialog) SetText ¶
func (d *MessageDialog) SetText(headerType messageInfo, headerMessage string, message string)
SetText sets message dialog text messages.
func (*MessageDialog) SetTitle ¶
func (d *MessageDialog) SetTitle(title string) *MessageDialog
SetTitle sets input dialog title.
func (*MessageDialog) TextScrollToEnd ¶
func (d *MessageDialog) TextScrollToEnd()
TextScrollToEnd scroll downs the text view.
type Modal ¶
func (*Modal) InputHandler ¶
type SimpleInputDialog ¶
SimpleInputDialog is an input dialog primitive.
func NewSimpleInputDialog ¶
func NewSimpleInputDialog(text string) *SimpleInputDialog
NewSimpleInputDialog returns new input dialog primitive.
func (*SimpleInputDialog) Display ¶
func (d *SimpleInputDialog) Display() *SimpleInputDialog
Display displays this primitive.
func (*SimpleInputDialog) Draw ¶
func (d *SimpleInputDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*SimpleInputDialog) Focus ¶
func (d *SimpleInputDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*SimpleInputDialog) GetInputText ¶
func (d *SimpleInputDialog) GetInputText() string
GetInputText returns input dialog input field value.
func (*SimpleInputDialog) GetRect ¶
func (d *SimpleInputDialog) GetRect() (int, int, int, int)
GetRect returns the current position of the primitive, x, y, width, and height.
func (*SimpleInputDialog) HasFocus ¶
func (d *SimpleInputDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*SimpleInputDialog) Hide ¶
func (d *SimpleInputDialog) Hide() *SimpleInputDialog
Hide stops displaying this primitive.
func (*SimpleInputDialog) InputHandler ¶
func (d *SimpleInputDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive.
func (*SimpleInputDialog) IsDisplay ¶
func (d *SimpleInputDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown.
func (*SimpleInputDialog) SetCancelFunc ¶
func (d *SimpleInputDialog) SetCancelFunc(handler func()) *SimpleInputDialog
SetCancelFunc sets form cancel button selected function.
func (*SimpleInputDialog) SetDescription ¶
func (d *SimpleInputDialog) SetDescription(text string) *SimpleInputDialog
SetDescription sets dialogs description.
func (*SimpleInputDialog) SetInputText ¶
func (d *SimpleInputDialog) SetInputText(text string)
SetInputText sets input dialog default value.
func (*SimpleInputDialog) SetLabel ¶
func (d *SimpleInputDialog) SetLabel(text string) *SimpleInputDialog
SetLabel sets input fields label message.
func (*SimpleInputDialog) SetRect ¶
func (d *SimpleInputDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*SimpleInputDialog) SetSelectButtonLabel ¶
func (d *SimpleInputDialog) SetSelectButtonLabel(label string) *SimpleInputDialog
SetSelectButtonLabel sets form select/enter button name.
func (*SimpleInputDialog) SetSelectedFunc ¶
func (d *SimpleInputDialog) SetSelectedFunc(handler func(value string)) *SimpleInputDialog
SetSelectedFunc sets form enter button selected function.
func (*SimpleInputDialog) SetTitle ¶
func (d *SimpleInputDialog) SetTitle(title string) *SimpleInputDialog
SetTitle sets input dialog title.