Documentation ¶
Index ¶
- type ChangeEvent
- type CommandEvent
- type DownEvent
- type Editor
- func (e *Editor) CaretLine()
- func (e *Editor) Events(gtx *layout.Context) []EditorEvent
- func (e *Editor) Focus()
- func (e *Editor) Layout(gtx *layout.Context, sh *text.Shaper, font text.Font)
- func (e *Editor) LayoutCaret() (carLine, carCol int, x fixed.Int26_6, y int)
- func (e *Editor) Len() int
- func (e *Editor) PaintCaret(gtx *layout.Context)
- func (e *Editor) PaintText(gtx *layout.Context)
- func (e *Editor) SetText(s string)
- func (e *Editor) Text() string
- type EditorEvent
- type EditorStyle
- type Label
- type Piece
- type PieceTable
- type SubmitEvent
- type UpEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeEvent ¶
type ChangeEvent struct{}
A ChangeEvent is generated for every user change to the text.
type CommandEvent ¶
A CommandEvent is generated for when moving the cursor and when command keys like enter and arrows-keys is pressed
type Editor ¶
type Editor struct { Alignment text.Alignment // SingleLine force the text to stay on a single line. // SingleLine also sets the scrolling direction to // horizontal. SingleLine bool // Submit enabled translation of carriage return keys to SubmitEvents. // If not enabled, carriage returns are inserted as newlines in the text. Submit bool // contains filtered or unexported fields }
Editor implements an editable and scrollable text area.
func (*Editor) Events ¶
func (e *Editor) Events(gtx *layout.Context) []EditorEvent
Events returns available editor events.
func (*Editor) LayoutCaret ¶
func (*Editor) PaintCaret ¶
type EditorEvent ¶
type EditorEvent interface {
// contains filtered or unexported methods
}
type EditorStyle ¶
type Label ¶
type Label struct { // Alignment specify the text alignment. Alignment text.Alignment // MaxLines limits the number of lines. Zero means no limit. MaxLines int }
Label is a widget for laying out and drawing text.
type PieceTable ¶
type PieceTable struct { }
func (PieceTable) Delete ¶
func (pt PieceTable) Delete()
func (PieceTable) Empty ¶
func (pt PieceTable) Empty()
func (PieceTable) Insert ¶
func (pt PieceTable) Insert()
func (PieceTable) ItemAt ¶
func (pt PieceTable) ItemAt()
type SubmitEvent ¶
type SubmitEvent struct{}
Click to show internal directories.
Click to hide internal directories.