Documentation ¶
Index ¶
- Variables
- func CropView(atablelist *process.ANSITableList, lines []*SubLine, x, y, width, height int) string
- func NewCropViewportModel() tea.Model
- type CropViewportModel
- func (c *CropViewportModel) BackToLeft()
- func (c *CropViewportModel) BackToTop()
- func (c *CropViewportModel) Init() tea.Cmd
- func (c *CropViewportModel) NextCol(step int)
- func (c *CropViewportModel) NextLine(step int)
- func (c *CropViewportModel) PrevCol(step int)
- func (c *CropViewportModel) PrevLine(step int)
- func (c *CropViewportModel) SetBlock(x, y, width, height int)
- func (c *CropViewportModel) SetContent(s string) (*process.ANSITableList, []*SubLine)
- func (c *CropViewportModel) SetContentGivenData(tableList *process.ANSITableList, lines []*SubLine)
- func (c *CropViewportModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (c *CropViewportModel) View() string
- type RuneData
- type RuneDataList
- type SubLine
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SPACE_HODLER = []byte(" ") SPACE_RUNEDATA = &RuneData{ Byte: SPACE_HODLER, } )
View Source
var NO_CONTENT_TABLE, NO_CONTENT_SUBLINES = ProcessContent("No content available")
const NO_CONTENT = "No content available" var NO_CONTENT_TABLE, NO_CONTENT_SUBLINES = process.ProcessContent("No content available")
Functions ¶
func CropView ¶ added in v0.2.0
func CropView(atablelist *process.ANSITableList, lines []*SubLine, x, y, width, height int) string
extract certain area of the given lines, and render ansi sequence
func NewCropViewportModel ¶
Types ¶
type CropViewportModel ¶
type CropViewportModel struct { ANSITableList *process.ANSITableList KeyMap map[string]func() tea.Cmd Sublines []*SubLine Block [4]int }
func (*CropViewportModel) BackToLeft ¶
func (c *CropViewportModel) BackToLeft()
func (*CropViewportModel) BackToTop ¶
func (c *CropViewportModel) BackToTop()
func (*CropViewportModel) NextCol ¶
func (c *CropViewportModel) NextCol(step int)
func (*CropViewportModel) NextLine ¶
func (c *CropViewportModel) NextLine(step int)
func (*CropViewportModel) PrevCol ¶
func (c *CropViewportModel) PrevCol(step int)
func (*CropViewportModel) PrevLine ¶
func (c *CropViewportModel) PrevLine(step int)
func (*CropViewportModel) SetBlock ¶
func (c *CropViewportModel) SetBlock(x, y, width, height int)
func (*CropViewportModel) SetContent ¶
func (c *CropViewportModel) SetContent(s string) (*process.ANSITableList, []*SubLine)
func (*CropViewportModel) SetContentGivenData ¶
func (c *CropViewportModel) SetContentGivenData(tableList *process.ANSITableList, lines []*SubLine)
func (*CropViewportModel) View ¶
func (c *CropViewportModel) View() string
type RuneDataList ¶ added in v0.2.0
type RuneDataList struct { L []process.BoundsStruct TotalWidth int }
func (*RuneDataList) Init ¶ added in v0.2.0
func (r *RuneDataList) Init(s []rune) *RuneDataList
init RuneData list given runes
RuneDataList can only be set with this function, no more process allowed afterwards
type SubLine ¶ added in v0.2.0
type SubLine struct { Data *RuneDataList Bound [2]int }
func ProcessContent ¶ added in v0.2.0
func ProcessContent(s string) (*process.ANSITableList, []*SubLine)
separate ansi and normal string, separate lines into RuneData list
func SplitLines ¶ added in v0.2.2
Click to show internal directories.
Click to hide internal directories.