Documentation
¶
Index ¶
- type MarkdownView
- func (mv *MarkdownView) Clear() *MarkdownView
- func (mv *MarkdownView) Draw(screen tcell.Screen)
- func (mv *MarkdownView) Focus(delegate func(p tview.Primitive))
- func (mv *MarkdownView) GetMarkdown() []byte
- func (mv *MarkdownView) HasFocus() bool
- func (mv *MarkdownView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (mv *MarkdownView) SelectAnchor(anchor string) bool
- func (mv *MarkdownView) SelectNext(selector Selector) bool
- func (mv *MarkdownView) SelectPrevious(selector Selector) bool
- func (mv *MarkdownView) SelectSpan(span *renderer.NodeSpan, highlight bool)
- func (mv *MarkdownView) Selection() *renderer.NodeSpan
- func (mv *MarkdownView) SetGutter(showGutter bool) *MarkdownView
- func (mv *MarkdownView) SetText(name, markdown string) *MarkdownView
- func (mv *MarkdownView) SetWrap(wrap bool) *MarkdownView
- type Selector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MarkdownView ¶
func NewMarkdownView ¶
func NewMarkdownView(theme *chroma.Style) *MarkdownView
func (*MarkdownView) Clear ¶
func (mv *MarkdownView) Clear() *MarkdownView
Clear removes all text from the buffer.
func (*MarkdownView) Draw ¶
func (mv *MarkdownView) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*MarkdownView) Focus ¶
func (mv *MarkdownView) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus.
func (*MarkdownView) GetMarkdown ¶
func (mv *MarkdownView) GetMarkdown() []byte
func (*MarkdownView) HasFocus ¶
func (mv *MarkdownView) HasFocus() bool
HasFocus returns whether or not this primitive has focus.
func (*MarkdownView) InputHandler ¶
func (mv *MarkdownView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns the handler for this primitive.
func (*MarkdownView) SelectAnchor ¶
func (mv *MarkdownView) SelectAnchor(anchor string) bool
SelectAnchor selects the next heading with the given anchor.
func (*MarkdownView) SelectNext ¶
func (mv *MarkdownView) SelectNext(selector Selector) bool
SelectNext selects the first node after the current selection that matches the given selector.
func (*MarkdownView) SelectPrevious ¶
func (mv *MarkdownView) SelectPrevious(selector Selector) bool
SelectPrevious selects the first node before the current selection that matches the given selector.
func (*MarkdownView) SelectSpan ¶
func (mv *MarkdownView) SelectSpan(span *renderer.NodeSpan, highlight bool)
SelectSpan selects the given node span.
func (*MarkdownView) Selection ¶
func (mv *MarkdownView) Selection() *renderer.NodeSpan
func (*MarkdownView) SetGutter ¶
func (mv *MarkdownView) SetGutter(showGutter bool) *MarkdownView
SetGutter sets the gutter flag, that, if true, instructs the view to render a gutter in its bottommost line with the document name and view position.
func (*MarkdownView) SetText ¶
func (mv *MarkdownView) SetText(name, markdown string) *MarkdownView
SetText sets the text of this text view to the provided string. Previously contained text will be removed.
func (*MarkdownView) SetWrap ¶
func (mv *MarkdownView) SetWrap(wrap bool) *MarkdownView
SetWrap sets the flag that, if true, leads to lines that are longer than the available width being wrapped onto the next line. If false, any characters beyond the available width are not displayed.