Documentation
¶
Index ¶
- Constants
- type CommandDialog
- func (cmd *CommandDialog) Display()
- func (cmd *CommandDialog) Draw(screen tcell.Screen)
- func (cmd *CommandDialog) Focus(delegate func(p tview.Primitive))
- func (cmd *CommandDialog) GetCommandCount() int
- func (cmd *CommandDialog) GetSelectedItem() string
- func (cmd *CommandDialog) HasFocus() bool
- func (cmd *CommandDialog) Hide()
- func (cmd *CommandDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (cmd *CommandDialog) IsDisplay() bool
- func (cmd *CommandDialog) SetCancelFunc(handler func()) *CommandDialog
- func (cmd *CommandDialog) SetRect(x, y, width, height int)
- func (cmd *CommandDialog) SetSelectedFunc(handler func()) *CommandDialog
- type ConfirmDialog
- func (d *ConfirmDialog) Display()
- 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()
- 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)
- func (d *ConfirmDialog) SetTitle(title string)
- type ErrorDialog
- func (d *ErrorDialog) Display()
- func (d *ErrorDialog) Draw(screen tcell.Screen)
- func (d *ErrorDialog) Focus(delegate func(p tview.Primitive))
- func (d *ErrorDialog) GetRect() (int, int, int, int)
- func (d *ErrorDialog) HasFocus() bool
- func (d *ErrorDialog) Hide()
- func (d *ErrorDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *ErrorDialog) IsDisplay() bool
- func (d *ErrorDialog) SetDoneFunc(handler func()) *ErrorDialog
- func (d *ErrorDialog) SetRect(x, y, width, height int)
- func (d *ErrorDialog) SetText(message string)
- type MessageDialog
- func (d *MessageDialog) Display()
- 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) SetSelectedFunc(handler func()) *MessageDialog
- func (d *MessageDialog) SetText(message string)
- func (d *MessageDialog) SetTitle(title string)
- func (d *MessageDialog) TextScrollToEnd()
- type ProgressDialog
- func (d *ProgressDialog) Display()
- func (d *ProgressDialog) Draw(screen tcell.Screen)
- func (d *ProgressDialog) Focus(delegate func(p tview.Primitive))
- func (d *ProgressDialog) HasFocus() bool
- func (d *ProgressDialog) Hide()
- func (d *ProgressDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *ProgressDialog) IsDisplay() bool
- func (d *ProgressDialog) SetRect(x, y, width, height int)
- func (d *ProgressDialog) SetTitle(title string)
- type SimpleInputDialog
- func (d *SimpleInputDialog) Display()
- 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()
- 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)
- func (d *SimpleInputDialog) SetInputText(text string)
- func (d *SimpleInputDialog) SetLabel(text string)
- func (d *SimpleInputDialog) SetRect(x, y, width, height int)
- func (d *SimpleInputDialog) SetSelectButtonLabel(label string)
- func (d *SimpleInputDialog) SetSelectedFunc(handler func()) *SimpleInputDialog
- func (d *SimpleInputDialog) SetTitle(title string)
- type TopDialog
- func (d *TopDialog) Display()
- func (d *TopDialog) Draw(screen tcell.Screen)
- func (d *TopDialog) Focus(delegate func(p tview.Primitive))
- func (d *TopDialog) HasFocus() bool
- func (d *TopDialog) Hide()
- func (d *TopDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (d *TopDialog) IsDisplay() bool
- func (d *TopDialog) SetDoneFunc(handler func()) *TopDialog
- func (d *TopDialog) SetRect(x, y, width, height int)
- func (d *TopDialog) SetTitle(title string)
- func (d *TopDialog) UpdateResults(data [][]string)
Constants ¶
const ( // DialogPadding dialog inner paddign DialogPadding = 3 // DialogFormHeight dialog "Enter"/"Cancel" form height DialogFormHeight = 3 // DialogMinWidth dialog min width DialogMinWidth = 40 // TableHeightOffset table hight offset for border TableHeightOffset = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandDialog ¶
CommandDialog is a commands list dialog
func NewCommandDialog ¶
func NewCommandDialog(options [][]string) *CommandDialog
NewCommandDialog returns a command list primitive.
func (*CommandDialog) Draw ¶
func (cmd *CommandDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*CommandDialog) Focus ¶
func (cmd *CommandDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus
func (*CommandDialog) GetCommandCount ¶
func (cmd *CommandDialog) GetCommandCount() int
GetCommandCount returns number of commands
func (*CommandDialog) GetSelectedItem ¶
func (cmd *CommandDialog) GetSelectedItem() string
GetSelectedItem returns selected row item
func (*CommandDialog) HasFocus ¶
func (cmd *CommandDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus
func (*CommandDialog) InputHandler ¶
func (cmd *CommandDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive
func (*CommandDialog) IsDisplay ¶
func (cmd *CommandDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown
func (*CommandDialog) SetCancelFunc ¶
func (cmd *CommandDialog) SetCancelFunc(handler func()) *CommandDialog
SetCancelFunc sets form cancel button selected function
func (*CommandDialog) SetRect ¶
func (cmd *CommandDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*CommandDialog) SetSelectedFunc ¶
func (cmd *CommandDialog) SetSelectedFunc(handler func()) *CommandDialog
SetSelectedFunc sets form enter button selected function
type ConfirmDialog ¶
ConfirmDialog is a simple confirmation dialog primitive
func NewConfirmDialog ¶
func NewConfirmDialog() *ConfirmDialog
NewConfirmDialog returns new confirm dialog 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) 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)
SetText sets dialog title
func (*ConfirmDialog) SetTitle ¶
func (d *ConfirmDialog) SetTitle(title string)
SetTitle sets dialog title
type ErrorDialog ¶
ErrorDialog is an error dialog primitive
func NewErrorDialog ¶
func NewErrorDialog() *ErrorDialog
NewErrorDialog returns new error dialog primitive
func (*ErrorDialog) Draw ¶
func (d *ErrorDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*ErrorDialog) Focus ¶
func (d *ErrorDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus
func (*ErrorDialog) GetRect ¶
func (d *ErrorDialog) GetRect() (int, int, int, int)
GetRect returns the current position of the primitive, x, y, width, and height.
func (*ErrorDialog) HasFocus ¶
func (d *ErrorDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus
func (*ErrorDialog) InputHandler ¶
func (d *ErrorDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive
func (*ErrorDialog) IsDisplay ¶
func (d *ErrorDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown
func (*ErrorDialog) SetDoneFunc ¶
func (d *ErrorDialog) SetDoneFunc(handler func()) *ErrorDialog
SetDoneFunc sets modal done function
func (*ErrorDialog) SetRect ¶
func (d *ErrorDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*ErrorDialog) SetText ¶
func (d *ErrorDialog) SetText(message string)
SetText sets error dialog message
type MessageDialog ¶
MessageDialog is a simple message dialog primitive
func NewMessageDialog ¶
func NewMessageDialog(text string) *MessageDialog
NewMessageDialog returns new message dialog 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) SetSelectedFunc ¶
func (d *MessageDialog) SetSelectedFunc(handler func()) *MessageDialog
SetSelectedFunc sets form enter button selected function
func (*MessageDialog) SetText ¶
func (d *MessageDialog) SetText(message string)
SetText sets message dialog text messages
func (*MessageDialog) SetTitle ¶
func (d *MessageDialog) SetTitle(title string)
SetTitle sets input dialog title
func (*MessageDialog) TextScrollToEnd ¶
func (d *MessageDialog) TextScrollToEnd()
TextScrollToEnd scroll downs the text view
type ProgressDialog ¶
ProgressDialog represents progress bar permitive
func NewProgressDialog ¶
func NewProgressDialog() *ProgressDialog
NewProgressDialog returns new progress dialog primitive
func (*ProgressDialog) Draw ¶
func (d *ProgressDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*ProgressDialog) Focus ¶
func (d *ProgressDialog) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus
func (*ProgressDialog) HasFocus ¶
func (d *ProgressDialog) HasFocus() bool
HasFocus returns whether or not this primitive has focus
func (*ProgressDialog) InputHandler ¶
func (d *ProgressDialog) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns input handler function for this primitive
func (*ProgressDialog) IsDisplay ¶
func (d *ProgressDialog) IsDisplay() bool
IsDisplay returns true if primitive is shown
func (*ProgressDialog) SetRect ¶
func (d *ProgressDialog) SetRect(x, y, width, height int)
SetRect set rects for this primitive.
func (*ProgressDialog) SetTitle ¶
func (d *ProgressDialog) SetTitle(title string)
SetTitle sets title for this primitive
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()
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()
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)
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)
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)
SetSelectButtonLabel sets form select/enter button name
func (*SimpleInputDialog) SetSelectedFunc ¶
func (d *SimpleInputDialog) SetSelectedFunc(handler func()) *SimpleInputDialog
SetSelectedFunc sets form enter button selected function
func (*SimpleInputDialog) SetTitle ¶
func (d *SimpleInputDialog) SetTitle(title string)
SetTitle sets input dialog title
type TopDialog ¶
TopDialog is a simple dialog with pod/container top result table
func (*TopDialog) Draw ¶
func (d *TopDialog) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*TopDialog) InputHandler ¶
InputHandler returns input handler function for this primitive
func (*TopDialog) SetDoneFunc ¶
SetDoneFunc sets form button selected function
func (*TopDialog) UpdateResults ¶
UpdateResults updates result table