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 Decoration
- type DecorationGroup
- type DecorationKind
- type Decorations
- type DrawDecorations
- 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) ContentColorizeChanged()
- func (d *Drawer) DecorationsChanged()
- func (d *Drawer) Draw(img draw.Image)
- func (d *Drawer) FirstLineOffsetX() int
- func (d *Drawer) FontFace() *fontutil.FontFace
- func (d *Drawer) InnerBounds() image.Rectangle
- 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)
- func (d *Drawer) SyntaxHighlightChanged()
- 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 WrapLineIndentTabs = 0.0
View Source
var WrapLineRune = rune('←') // positioned at the start of wrapped line (left)
View Source
var WrapWordLimit = 0
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
func (*AnnotationGroup) On ¶ added in v1.3.11
func (ag *AnnotationGroup) On() bool
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 Decoration ¶ added in v1.3.13
type Decoration struct {
Offset int
Kind DecorationKind
Fg color.Color
Thickness int
}
type DecorationGroup ¶ added in v1.3.13
type DecorationGroup struct {
Off bool
Entries []*Decoration
}
type DecorationKind ¶ added in v1.3.13
type DecorationKind uint8
const (
DecorationHorizontalRule DecorationKind = iota + 1
)
type Decorations ¶ added in v1.3.13
type Decorations struct {
// contains filtered or unexported fields
}
func (*Decorations) End ¶ added in v1.3.13
func (dc *Decorations) End()
func (*Decorations) Init ¶ added in v1.3.13
func (dc *Decorations) Init()
func (*Decorations) Iter ¶ added in v1.3.13
func (dc *Decorations) Iter()
type DrawDecorations ¶ added in v1.3.13
type DrawDecorations struct {
// contains filtered or unexported fields
}
func (*DrawDecorations) End ¶ added in v1.3.13
func (dd *DrawDecorations) End()
func (*DrawDecorations) Init ¶ added in v1.3.13
func (dd *DrawDecorations) Init()
func (*DrawDecorations) Iter ¶ added in v1.3.13
func (dd *DrawDecorations) Iter()
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
}
Decorations struct {
Groups []*DecorationGroup
}
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
}
ContentColorize struct {
Git struct {
On bool
AddFg color.Color
DeleteFg color.Color
}
Group ColorizeGroup
}
SyntaxHighlight struct {
On bool
Comment struct {
SCs []*drawutil.SyntaxComment
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) ContentColorizeChanged ¶ added in v1.3.13
func (d *Drawer) ContentColorizeChanged()
func (*Drawer) DecorationsChanged ¶ added in v1.3.13
func (d *Drawer) DecorationsChanged()
func (*Drawer) FirstLineOffsetX ¶
func (*Drawer) InnerBounds ¶ added in v1.3.13
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 ¶
func (*Drawer) SyntaxHighlightChanged ¶ added in v1.3.13
func (d *Drawer) SyntaxHighlightChanged()
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.