Documentation ¶
Index ¶
- func ParseIRCStyles(c []ui.Cell) []ui.Cell
- func WrapCellsPadded(cells []ui.Cell, width uint, leftPadding int) []ui.Cell
- type ActivityType
- type ChatPane
- type InputMode
- type ModedText
- type ModedTextInput
- type StatusBarPane
- type TextInput
- func (i *TextInput) Append(in string)
- func (i *TextInput) Backspace()
- func (i *TextInput) Consume() string
- func (i *TextInput) CursorEndLine()
- func (i *TextInput) CursorNext()
- func (i *TextInput) CursorNextWord()
- func (i *TextInput) CursorPrev()
- func (i *TextInput) CursorPrevWord()
- func (i *TextInput) CursorStartLine()
- func (i *TextInput) DeleteNext()
- func (i *TextInput) Draw(buf *ui.Buffer)
- func (i *TextInput) Len() int
- func (i *TextInput) Peek() string
- func (i *TextInput) Pos() int
- func (i *TextInput) Reset()
- type UserList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActivityType ¶
type ActivityType int
const TabHasActivity ActivityType = 0
const TabHasNotice ActivityType = 1
type ChatPane ¶
type ChatPane struct { ui.Block Rows []string WrapText bool TextStyle ui.Style SelectedRow int LeftPadding int ModeText string ModeStyle ui.Style SubTitle string SubTitleStyle ui.Style }
A ChatPane contains the messages for the screen. This widget is based on the termui List widget. ChatPanes support both termui formatting as well as IRC formatting.
func NewChatPane ¶
func NewChatPane() *ChatPane
type InputMode ¶
type InputMode int
InputMode defines different kinds of input handled by a ModedTextInput.
type ModedTextInput ¶
type ModedTextInput struct { TextInput // contains filtered or unexported fields }
A ModedTextInput tracks the current editing mode of a TextInput.
func NewModedTextInput ¶
func NewModedTextInput() *ModedTextInput
NewModedTextInput creates a new ModedTextInput.
func (*ModedTextInput) Backspace ¶
func (i *ModedTextInput) Backspace()
func (*ModedTextInput) Consume ¶
func (i *ModedTextInput) Consume() ModedText
Consume returns and clears the ModedText in the ModedTextInput.
func (*ModedTextInput) Mode ¶
func (i *ModedTextInput) Mode() InputMode
Mode returns the current editing mode.
func (*ModedTextInput) Set ¶
func (i *ModedTextInput) Set(in ModedText)
func (*ModedTextInput) ToggleMode ¶
func (i *ModedTextInput) ToggleMode()
ToggleMode switches between the editing modes.
type StatusBarPane ¶
type StatusBarPane struct { *widgets.TabPane TabsWithActivity map[int]ActivityType NoticeStyle ui.Style ActivityStyle ui.Style }
StatusBarPane contains the tabs for available windows. This widget compounds a termui TabPane widget with highlighting of tabs in two additional ways: notice and activity. Notice is intended for when a tab wants extra attention (ie. user was mentioned) vs activity where there are just some new lines since last touched.
func NewStatusBarPane ¶
func NewStatusBarPane() *StatusBarPane
func (*StatusBarPane) Draw ¶
func (sb *StatusBarPane) Draw(buf *ui.Buffer)
type TextInput ¶
type TextInput struct { ui.Block Text string TextStyle ui.Style WrapText bool // If specified, called during Reset and the result is used // as the initial text in the text box. Prefix func() string // contains filtered or unexported fields }
A TextInput is a widget with editable contents. This widget is based on the termui Paragraph widget.
func NewTextInput ¶
func NewTextInput() *TextInput
func (*TextInput) Backspace ¶
func (i *TextInput) Backspace()
Backspace removes the previous character from the current position of the editable content.
func (*TextInput) CursorEndLine ¶
func (i *TextInput) CursorEndLine()
func (*TextInput) CursorNext ¶
func (i *TextInput) CursorNext()
func (*TextInput) CursorNextWord ¶
func (i *TextInput) CursorNextWord()
func (*TextInput) CursorPrev ¶
func (i *TextInput) CursorPrev()
func (*TextInput) CursorPrevWord ¶
func (i *TextInput) CursorPrevWord()
func (*TextInput) CursorStartLine ¶
func (i *TextInput) CursorStartLine()
func (*TextInput) DeleteNext ¶
func (i *TextInput) DeleteNext()
DeleteNext removes the next character from the current position of the editable content.
type UserList ¶
A UserList contains a list of users on a channel. This widget is based on the termui Table widget.
func NewUserList ¶
func NewUserList() *UserList