Documentation
¶
Index ¶
- type Model
- func (m *Model) Align() enums.Alignment
- func (m *Model) ApplyBoldToRange(start, end int)
- func (m *Model) ApplyColorToRange(start, end int, color string)
- func (m *Model) DecreaseLevel()
- func (m *Model) FocusAt(x, _ int, width int, _ int) int
- func (m *Model) Handle(msg tea.KeyMsg, ctx types.BlockContext) types.BlockUpdateResult
- func (m *Model) Height() int
- func (m *Model) IncreaseLevel()
- func (m *Model) IsBoldAt(col int) bool
- func (m *Model) Len() int
- func (m *Model) MergeFrom(other interfaces.EditorBlock) int
- func (m *Model) Render(ctx contexts.BlockRenderContext) string
- func (m *Model) SetAlign(align enums.Alignment)
- func (m *Model) SetLevel(level enums.BlockLevel)
- func (m *Model) SetSpans(spans []types.Span)
- func (m *Model) SetText(text string)
- func (m *Model) Spans() []types.Span
- func (m *Model) StyleName() string
- func (m *Model) Text() string
- func (m *Model) Value(contexts.BlockValueContext) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
func NewWithLevel ¶
func NewWithLevel(content string, level enums.BlockLevel) *Model
func (*Model) ApplyBoldToRange ¶
ApplyBoldToRange toggles bold on the character range [start, end).
func (*Model) ApplyColorToRange ¶
ApplyColorToRange sets the color on the character range [start, end). Pass "" to clear color on the range.
func (*Model) Handle ¶
func (m *Model) Handle(msg tea.KeyMsg, ctx types.BlockContext) types.BlockUpdateResult
func (*Model) IsBoldAt ¶
IsBoldAt reports whether the character at col is bold.
func (*Model) MergeFrom ¶
func (m *Model) MergeFrom(other interfaces.EditorBlock) int
func (*Model) Render ¶
func (m *Model) Render(ctx contexts.BlockRenderContext) string
func (*Model) SetLevel ¶
func (m *Model) SetLevel(level enums.BlockLevel)
func (*Model) Value ¶
func (m *Model) Value(contexts.BlockValueContext) string
Source Files
¶
- model.go
- mouse.go
- update.go
- view.go
Click to show internal directories.
Click to hide internal directories.