dialogs

package
v0.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// top dialog header label.
	MessageSystemInfo messageInfo = 0 + iota
	MessagePodInfo
	MessageContainerInfo
	MessageVolumeInfo
	MessageImageInfo
	MessageNetworkInfo
)

Variables

This section is empty.

Functions

func GetRoot

func GetRoot(app *tview.Application) tview.Primitive

Types

type ConfirmDialog

type ConfirmDialog struct {
	*tview.Box
	// contains filtered or unexported fields
}

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

type MessageDialog struct {
	*tview.Box
	// contains filtered or unexported fields
}

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) Hide

func (d *MessageDialog) Hide()

Hide stops displaying this primitive.

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 struct {
	tview.Primitive
	// contains filtered or unexported fields
}

func ShowModal

func ShowModal(app *tview.Application, p tview.Primitive) *Modal

func (*Modal) Draw

func (m *Modal) Draw(screen tcell.Screen)

func (*Modal) Hide

func (m *Modal) Hide()

func (*Modal) InputHandler

func (m *Modal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))

type SimpleInputDialog

type SimpleInputDialog struct {
	*tview.Box
	// contains filtered or unexported fields
}

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

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.

Jump to

Keyboard shortcuts

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