Documentation ¶
Overview ¶
Package ui provides the user interface for Stimmtausch.
Index ¶
- func New(c *client.Client) *tui
- type History
- func (h *History) AddPostWriteHook(f func(*HistoryLine) error)
- func (h *History) Back() *HistoryLine
- func (h *History) Close() error
- func (h *History) Current() *HistoryLine
- func (h *History) Forward() *HistoryLine
- func (h *History) Last() *HistoryLine
- func (h *History) Size() int
- func (h *History) String() string
- func (h *History) Write(line []byte) (int, error)
- type HistoryLine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type History ¶
type History struct {
// contains filtered or unexported fields
}
History represents a rolling buffer of lines used for input and output.
func NewHistory ¶
NewHistory returns a new history buffer.
func (*History) AddPostWriteHook ¶
func (h *History) AddPostWriteHook(f func(*HistoryLine) error)
AddPostWriteHook accepts a function to be run whenever a write to the buffer succeeds.
func (*History) Back ¶
func (h *History) Back() *HistoryLine
Back moves the cursor back in time one line and returns the current line's content.
func (*History) Current ¶
func (h *History) Current() *HistoryLine
Current returns the current line in the buffer.
func (*History) Forward ¶
func (h *History) Forward() *HistoryLine
Forward moves the cursor forward in time one line and returns the current line's content.
func (*History) Last ¶
func (h *History) Last() *HistoryLine
Last moves the cursor to the last line.
type HistoryLine ¶
HistoryLine represents a timestamped line of text.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.