Documentation ¶
Index ¶
- type MainMenu
- func (m *MainMenu) AddItem(text string, shortcut rune) *MainMenu
- func (m *MainMenu) Clear() *MainMenu
- func (m *MainMenu) Draw(screen tcell.Screen)
- func (m *MainMenu) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *MainMenu) SetMainTextColor(c tcell.Color) *MainMenu
- func (m *MainMenu) SetSelectedBackgroundColor(c tcell.Color) *MainMenu
- func (m *MainMenu) SetSelectedFunc(handler func(int, string, rune)) *MainMenu
- func (m *MainMenu) SetSelectedTextColor(c tcell.Color) *MainMenu
- type Menubar
- type MessageList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MainMenu ¶
MainMenu is our main menu
func (*MainMenu) Draw ¶
func (m *MainMenu) Draw(screen tcell.Screen)
Draw will draw the main menu on screen
func (*MainMenu) InputHandler ¶
InputHandler will be called when the main menu is active and we have an input. It will deal with navigating through the main menu
func (*MainMenu) SetMainTextColor ¶
SetMainTextColor sets the main text color
func (*MainMenu) SetSelectedBackgroundColor ¶
SetSelectedBackgroundColor is the selected background color
func (*MainMenu) SetSelectedFunc ¶
SetSelectedFunc sets the function that is called when an item is selected
func (*MainMenu) SetSelectedTextColor ¶
SetSelectedTextColor is the selected text color
type Menubar ¶
Menubar is a structure that holds a menu bar in the bottom
func NewMenubar ¶
func NewMenubar(app *tview.Application) *Menubar
NewMenubar creates a new menu bar
func (*Menubar) Draw ¶
func (m *Menubar) Draw(screen tcell.Screen)
Draw will draw the menubar on the screen
func (*Menubar) SetDisplayTime ¶
SetDisplayTime will display or undisplay the time
type MessageList ¶
type MessageList struct { *tview.Box Items []message.DecryptedMessage // contains filtered or unexported fields }
MessageList holds a list of messages
func (*MessageList) Draw ¶
func (m *MessageList) Draw(screen tcell.Screen)
Draw will draw the message list on the screen
func (*MessageList) InputHandler ¶
func (m *MessageList) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler will be called when the focussed message list has input
func (*MessageList) SetSelectFunc ¶
func (m *MessageList) SetSelectFunc(f func(ml MessageList, idx int))
SetSelectFunc will set the handler that will be called when a message is selected