Documentation ¶
Index ¶
- type Editor
- func (editor *Editor) GetCurrentMentionIndices() (int, int)
- func (editor *Editor) GetFormItem() tview.FormItem
- func (editor *Editor) GetPrimitive() tview.Primitive
- func (editor *Editor) GetRequestedHeight() int
- func (editor *Editor) GetText() string
- func (editor *Editor) SetBackgroundColor(color tcell.Color)
- func (editor *Editor) SetInputCapture(captureFunc func(event *tcell.EventKey) *tcell.EventKey)
- func (editor *Editor) SetMentionHideHandler(handlerFunc func())
- func (editor *Editor) SetMentionShowHandler(handlerFunc func(namePart string))
- func (editor *Editor) SetOnHeightChangeRequest(handler func(requestHeight int))
- func (editor *Editor) SetText(text string)
- type NonotaUI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Editor ¶
type Editor struct { CancelFunc func() AcceptFunc func() // contains filtered or unexported fields }
Editor is a simple component that wraps tview.TextView in order to gove the user minimal text edit functionality.
func (*Editor) GetCurrentMentionIndices ¶
GetCurrentMentionIndices gets the starting and ending indices of the input box text which are to be replaced
func (*Editor) GetFormItem ¶
func (*Editor) GetPrimitive ¶
GetPrimitive returnbs the internal component that can be added to a layout
func (*Editor) GetRequestedHeight ¶
GetRequestedHeight returns the currently requested size.
func (*Editor) SetBackgroundColor ¶
SetBackgroundColor sets the background color of the internal TextView
func (*Editor) SetInputCapture ¶
SetInputCapture sets the alternative input capture that will be used if the components default controls aren't being triggered.
func (*Editor) SetMentionHideHandler ¶
func (editor *Editor) SetMentionHideHandler(handlerFunc func())
SetMentionHideHandler sets the handler for when a mention is no longer being requested
func (*Editor) SetMentionShowHandler ¶
SetMentionShowHandler sets the handler for when a mention is being requested
func (*Editor) SetOnHeightChangeRequest ¶
SetOnHeightChangeRequest handles the cases where the component thinks it needs more space or would be fine with less.