Documentation ¶
Index ¶
- Variables
- type Annotation
- type AnnotationGroup
- type Annotations
- type AnnotationsIndexOf
- type BgFill
- type Colorize
- type ColorizeGroup
- type ColorizeOp
- type CurColors
- type Cursor
- type CursorDelay
- type DrawRune
- type DrawRuneDelay
- type Drawer
- func (d *Drawer) AnnotationsIndexOf(p image.Point) (int, int, bool)
- func (d *Drawer) Bounds() image.Rectangle
- func (d *Drawer) ContentChanged()
- func (d *Drawer) Draw(img draw.Image)
- func (d *Drawer) FirstLineOffsetX() int
- func (d *Drawer) FontFace() *fontutil.FontFace
- func (d *Drawer) LineHeight() int
- func (d *Drawer) LocalIndexOf(p image.Point) int
- func (d *Drawer) LocalPointOf(index int) image.Point
- func (d *Drawer) Measure() image.Point
- func (d *Drawer) RangeVisible(offset, length int) bool
- func (d *Drawer) RangeVisibleOffset(offset, length int, align drawutil.RangeAlignment) int
- func (d *Drawer) Reader() iorw.ReaderAt
- func (d *Drawer) RuneOffset() int
- func (d *Drawer) ScrollOffset() image.Point
- func (d *Drawer) ScrollPageSizeY(up bool) int
- func (d *Drawer) ScrollSize() image.Point
- func (d *Drawer) ScrollViewSize() image.Point
- func (d *Drawer) ScrollWheelSizeY(up bool) int
- func (d *Drawer) SetBounds(r image.Rectangle)
- func (d *Drawer) SetCursorOffset(v int)
- func (d *Drawer) SetFg(fg color.Color)
- func (d *Drawer) SetFirstLineOffsetX(x int)
- func (d *Drawer) SetFontFace(ff *fontutil.FontFace)
- func (d *Drawer) SetReader(r iorw.ReaderAt)
- func (d *Drawer) SetRuneOffset(v int)
- func (d *Drawer) SetScrollOffset(o image.Point)
- type EarlyExit
- type FnIter
- type Indent
- type IndexOf
- type Iterator
- type Line
- type LineStart
- type LineWrap
- type Measure
- type ParenthesisHighlight
- type PenVisibility
- type PointOf
- type RuneReader
- type State
- type SyntaxHighlight
Constants ¶
This section is empty.
Variables ¶
View Source
var NoPaddedIndentedLines bool
View Source
var WrapLineRune = rune('←') // positioned at the start of wrapped line (left)
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type AnnotationGroup ¶ added in v1.3.7
type AnnotationGroup struct { sync.RWMutex Anns []*Annotation }
func NewAnnotationGroup ¶ added in v1.3.7
func NewAnnotationGroup(n int) *AnnotationGroup
type Annotations ¶
type Annotations struct {
// contains filtered or unexported fields
}
func (*Annotations) End ¶
func (ann *Annotations) End()
func (*Annotations) Init ¶
func (ann *Annotations) Init()
func (*Annotations) Iter ¶
func (ann *Annotations) Iter()
type AnnotationsIndexOf ¶
type AnnotationsIndexOf struct {
// contains filtered or unexported fields
}
func (*AnnotationsIndexOf) End ¶
func (aio *AnnotationsIndexOf) End()
func (*AnnotationsIndexOf) Init ¶
func (aio *AnnotationsIndexOf) Init()
func (*AnnotationsIndexOf) Iter ¶
func (aio *AnnotationsIndexOf) Iter()
type ColorizeGroup ¶
type ColorizeGroup struct { Off bool Ops []*ColorizeOp }
type ColorizeOp ¶
type CursorDelay ¶
type CursorDelay struct {
// contains filtered or unexported fields
}
type DrawRuneDelay ¶
type DrawRuneDelay struct {
// contains filtered or unexported fields
}
type Drawer ¶
type Drawer struct { // external options Opt struct { QuickMeasure bool // just return the bounds size EarlyExitMeasure bool // allow early exit RuneReader struct { StartOffsetX int } LineWrap struct { On bool Fg, Bg color.Color } Cursor struct { On bool Fg color.Color AddedWidth int } Colorize struct { Groups []*ColorizeGroup } Annotations struct { On bool Fg, Bg color.Color Selected struct { EntryIndex int Fg, Bg color.Color } Entries *AnnotationGroup // must be ordered by offset } WordHighlight struct { On bool Fg, Bg color.Color Group ColorizeGroup } ParenthesisHighlight struct { On bool Fg, Bg color.Color Group ColorizeGroup } SyntaxHighlight struct { On bool Comment struct { Defs []*drawutil.SyntaxHighlightComment Fg, Bg color.Color } String struct { Fg, Bg color.Color } Group ColorizeGroup } } // contains filtered or unexported fields }
func (*Drawer) AnnotationsIndexOf ¶
func (*Drawer) ContentChanged ¶
func (d *Drawer) ContentChanged()
func (*Drawer) FirstLineOffsetX ¶
func (*Drawer) LineHeight ¶
func (*Drawer) RangeVisible ¶
func (*Drawer) RangeVisibleOffset ¶
func (d *Drawer) RangeVisibleOffset(offset, length int, align drawutil.RangeAlignment) int
func (*Drawer) RuneOffset ¶
func (*Drawer) ScrollOffset ¶
func (*Drawer) ScrollPageSizeY ¶
func (*Drawer) ScrollSize ¶
func (*Drawer) ScrollViewSize ¶
func (*Drawer) ScrollWheelSizeY ¶
func (*Drawer) SetCursorOffset ¶
func (*Drawer) SetFirstLineOffsetX ¶
func (*Drawer) SetFontFace ¶ added in v1.3.0
func (*Drawer) SetRuneOffset ¶
func (*Drawer) SetScrollOffset ¶
type ParenthesisHighlight ¶ added in v1.3.7
type ParenthesisHighlight struct {
// contains filtered or unexported fields
}
type PenVisibility ¶ added in v1.1.0
type PenVisibility struct {
// contains filtered or unexported fields
}
type RuneReader ¶
type RuneReader struct {
// contains filtered or unexported fields
}
func (*RuneReader) End ¶
func (rr *RuneReader) End()
func (*RuneReader) Init ¶
func (rr *RuneReader) Init()
func (*RuneReader) Iter ¶
func (rr *RuneReader) Iter()
type State ¶
type State struct {
// contains filtered or unexported fields
}
State should not be stored/restored except in initializations. ex: runeR.extra and runeR.ru won't be correctly set if the iterators were stopped.
type SyntaxHighlight ¶
type SyntaxHighlight struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.