Documentation
¶
Index ¶
- type ListRenderer
- func (l *ListRenderer) AddBody(line string)
- func (l *ListRenderer) GetCursor() int
- func (l *ListRenderer) MoveCursor(direction string) (items []string)
- func (l *ListRenderer) MoveCursorWithFocus(direction string) (items []string)
- func (l *ListRenderer) RenderActually() []string
- func (l *ListRenderer) ResetRender() (items []string)
- func (l *ListRenderer) SetBody(items []string)
- type ListRendererOption
- type ListWrapper
- func (l *ListWrapper) AddBody(line string)
- func (l *ListWrapper) GetCursor() int
- func (l *ListWrapper) GetHeight() int
- func (l *ListWrapper) GetWidget() ui.GridBufferer
- func (l *ListWrapper) GetWidth() int
- func (l *ListWrapper) MmoveCursorWithFocus(direction string)
- func (l *ListWrapper) MoveCursor(direction string)
- func (l *ListWrapper) Render()
- func (l *ListWrapper) ResetRender()
- func (l *ListWrapper) SetBody(items []string)
- type ListWrapperOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListRenderer ¶
type ListRenderer struct {
// contains filtered or unexported fields
}
ListRenderer make a List widget which includes multi-line texts look like scrolled
func NewListRenderer ¶
func NewListRenderer(opt *ListRendererOption) (l *ListRenderer)
NewListRenderer constructs a ListWrapper
func (*ListRenderer) AddBody ¶
func (l *ListRenderer) AddBody(line string)
AddBody add an another line of text to ListWrapper.body
func (*ListRenderer) GetCursor ¶
func (l *ListRenderer) GetCursor() int
GetCursor returns ListWrapper.cursor
func (*ListRenderer) MoveCursor ¶
func (l *ListRenderer) MoveCursor(direction string) (items []string)
MoveCursor moves cursor position to "direction" with no focuse
func (*ListRenderer) MoveCursorWithFocus ¶
func (l *ListRenderer) MoveCursorWithFocus(direction string) (items []string)
MoveCursorWithFocus moves cursor position to "direction" with a highlightened focus
func (*ListRenderer) RenderActually ¶
func (l *ListRenderer) RenderActually() []string
RenderActually renders list
func (*ListRenderer) ResetRender ¶
func (l *ListRenderer) ResetRender() (items []string)
ResetRender returns a initial multi-line texts
func (*ListRenderer) SetBody ¶
func (l *ListRenderer) SetBody(items []string)
SetBody replace strings on ListWrapper.body
type ListRendererOption ¶
ListRendererOption is the option argument for NewListWrapper
type ListWrapper ¶
type ListWrapper struct {
// contains filtered or unexported fields
}
ListWrapper make a List widget which includes multi-line texts look like scrolled
func NewListWrapper ¶
func NewListWrapper(opt *ListWrapperOption) (l *ListWrapper)
NewListWrapper constructs a ListWrapper
func (*ListWrapper) AddBody ¶
func (l *ListWrapper) AddBody(line string)
AddBody add an another line of textto ListWrapper.body
func (*ListWrapper) GetCursor ¶
func (l *ListWrapper) GetCursor() int
GetCursor returns ListWrapper.cursor
func (*ListWrapper) GetHeight ¶
func (l *ListWrapper) GetHeight() int
GetHeight is the implementation of widget.Render
func (*ListWrapper) GetWidget ¶
func (l *ListWrapper) GetWidget() ui.GridBufferer
GetWidget returns the instance of ui.List
func (*ListWrapper) GetWidth ¶
func (l *ListWrapper) GetWidth() int
GetWidth is the implementation of widget.Render
func (*ListWrapper) MmoveCursorWithFocus ¶
func (l *ListWrapper) MmoveCursorWithFocus(direction string)
MmoveCursorWithFocus moves cursor and update ui
func (*ListWrapper) MoveCursor ¶
func (l *ListWrapper) MoveCursor(direction string)
MoveCursor moves cursor
func (*ListWrapper) ResetRender ¶
func (l *ListWrapper) ResetRender()
ResetRender returns a initial multi-line texts
func (*ListWrapper) SetBody ¶
func (l *ListWrapper) SetBody(items []string)
SetBody replace strings on ListWrapper.body