Documentation ¶
Index ¶
- func Setup() error
- type Content
- type EditorOnClose
- type ListView
- type MailView
- type Scroller
- func (v *Scroller) GetEndLine() int
- func (v *Scroller) GetLabel() (string, error)
- func (v *Scroller) GetLine(lineNumber int) (string, error)
- func (v *Scroller) GetSelectedLine() int
- func (v *Scroller) GetStartLine() int
- func (v *Scroller) HandleKey(ui *UI, key interface{}, mod gocui.Modifier, lineNumber int) error
- func (v *Scroller) UpdateHeight(height int) error
- func (v *Scroller) UpdateLinePos(dy int) error
- type SingleLineEditor
- type ThreadView
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Content ¶
type Content interface { GetLabel() (string, error) GetLine(lineNumber int) (string, error) GetMaxLines() (int, error) HandleKey(ui *UI, key interface{}, mod gocui.Modifier, lineNumber int) error }
Content defines the interface used to show contents in a Scroller
type EditorOnClose ¶
EditorOnClose defines a callback used in editors
type ListView ¶
type ListView struct {
// contains filtered or unexported fields
}
ListView displays a list of entries, which are read from 'query'
func NewListView ¶
NewListView creates a new ListView with a specific query
func (*ListView) GetMaxLines ¶
GetMaxLines returns the total number of lines in the ListView
type MailView ¶
type MailView struct {
// contains filtered or unexported fields
}
MailView displays an email message
func NewMailView ¶
NewMailView creates a new MailView, with the contents from 'filename'
func (*MailView) GetMaxLines ¶
GetMaxLines returns the number of lines in the message
type Scroller ¶
type Scroller struct {
// contains filtered or unexported fields
}
Scroller defines a scrollable scroller
func NewScroller ¶
NewScroller creates a new Scroller with a specific content
func (*Scroller) GetEndLine ¶
GetEndLine returns the current end line
func (*Scroller) GetSelectedLine ¶
GetSelectedLine returns the currently selected line
func (*Scroller) GetStartLine ¶
GetStartLine returns the current start line
func (*Scroller) UpdateHeight ¶
UpdateHeight recalculates start/end, and make sure that selected line is still visible
func (*Scroller) UpdateLinePos ¶
UpdateLinePos moves the currently selected line up or down according to 'dy' dy < 0 moves the currently selected line up, dy > 0 moves the currently selected line down
type SingleLineEditor ¶
type SingleLineEditor struct {
OnClose EditorOnClose
}
SingleLineEditor implements the Editor interface, and can be used to edit single line entries. When Enter is pressed, OnClose() will be called, with ok set to true, and contents in s If Esc is pressed, OnClose() will be called with ok set to false
type ThreadView ¶
type ThreadView struct {
// contains filtered or unexported fields
}
ThreadView displays a specific message thread
func NewThreadView ¶
func NewThreadView(thread models.Thread) (*ThreadView, error)
NewThreadView creates a new view for displaying a specific thread
func (*ThreadView) GetLabel ¶
func (v *ThreadView) GetLabel() (string, error)
GetLabel returns the label of the thread view
func (*ThreadView) GetLine ¶
func (v *ThreadView) GetLine(lineNumber int) (string, error)
GetLine returns the contents of a specific line in the thread view
func (*ThreadView) GetMaxLines ¶
func (v *ThreadView) GetMaxLines() (int, error)
GetMaxLines returns the total number of lines in the thread view
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
UI defines the base handler for the user interface
func (*UI) KeyBindings ¶
KeyBindings registers all bindings
func (*UI) NextView ¶
func (ui *UI) NextView()
NextView displays the next view from the list of available views
func (*UI) RenderHeader ¶
RenderHeader writes the contents of the current header to screen