Documentation ¶
Index ¶
- Variables
- func StableOffsetScroll(o int, s, dn, in int) int
- type AEDragState
- type ApplyEvent
- type BgLayer
- type Border
- type BottomShadow
- type BottomShadowPart
- type BoxLayout
- type Button
- type CursorContext
- type ENode
- type EmbedNode
- func (en *EmbedNode) AddMarks(m Marks)
- func (en *EmbedNode) Append(nodes ...Node)
- func (en *EmbedNode) ChildsLayoutTree()
- func (en *EmbedNode) ChildsLen() int
- func (en *EmbedNode) ChildsPaintTree()
- func (en *EmbedNode) ChildsWrappers() []Node
- func (en *EmbedNode) Embed() *EmbedNode
- func (en *EmbedNode) FirstChild() *EmbedNode
- func (en *EmbedNode) FirstChildWrapper() Node
- func (en *EmbedNode) HasAnyMarks(m Marks) bool
- func (en *EmbedNode) InsertBefore(child Node, next *EmbedNode)
- func (en *EmbedNode) Iterate(f func(*EmbedNode) bool)
- func (en *EmbedNode) Iterate2(f func(*EmbedNode))
- func (en *EmbedNode) IterateReverse(f func(*EmbedNode) bool)
- func (en *EmbedNode) IterateReverse2(f func(*EmbedNode))
- func (en *EmbedNode) IterateWrappers(f func(Node) bool)
- func (en *EmbedNode) IterateWrappers2(f func(Node))
- func (en *EmbedNode) IterateWrappersReverse(f func(Node) bool)
- func (en *EmbedNode) IterateWrappersReverse2(f func(Node))
- func (en *EmbedNode) LastChild() *EmbedNode
- func (en *EmbedNode) LastChildWrapper() Node
- func (en *EmbedNode) Layout()
- func (en *EmbedNode) LayoutMarked()
- func (en *EmbedNode) LayoutTree()
- func (en *EmbedNode) MarkNeedsLayout()
- func (en *EmbedNode) MarkNeedsLayoutAndPaint()
- func (en *EmbedNode) MarkNeedsPaint()
- func (en *EmbedNode) Measure(hint image.Point) image.Point
- func (en *EmbedNode) NextSibling() *EmbedNode
- func (en *EmbedNode) NextSiblingWrapper() Node
- func (en *EmbedNode) OnChildMarked(child Node, newMarks Marks)
- func (en *EmbedNode) OnInputEvent(ev interface{}, p image.Point) event.Handled
- func (en *EmbedNode) OnThemeChange()
- func (en *EmbedNode) Paint()
- func (en *EmbedNode) PaintBase()
- func (en *EmbedNode) PaintMarked() image.Rectangle
- func (en *EmbedNode) PaintTree() bool
- func (en *EmbedNode) PrevSibling() *EmbedNode
- func (en *EmbedNode) PrevSiblingWrapper() Node
- func (en *EmbedNode) Remove(child Node)
- func (en *EmbedNode) RemoveMarks(m Marks)
- func (en *EmbedNode) SetTheme(t Theme)
- func (en *EmbedNode) SetThemeFontFace(ff *fontutil.FontFace)
- func (en *EmbedNode) SetThemePalette(p Palette)
- func (en *EmbedNode) SetThemePaletteColor(name string, c color.Color)
- func (en *EmbedNode) SetThemePaletteNamePrefix(prefix string)
- func (en *EmbedNode) SetWrapperForRoot(n Node)
- func (en *EmbedNode) Swap(u Node)
- func (en *EmbedNode) Theme() *Theme
- func (en *EmbedNode) ThemePalette() Palette
- func (en *EmbedNode) TreeNeedsLayout() bool
- func (en *EmbedNode) TreeNeedsPaint() bool
- func (en *EmbedNode) TreeThemeFontFace() *fontutil.FontFace
- func (en *EmbedNode) TreeThemePaletteColor(name string) color.Color
- type FloatBox
- type FloatBoxButton
- type FloatLayer
- type FreeLayout
- type ImageContext
- type Label
- type Marks
- type MultiLayer
- type Node
- type Pad
- type Padder
- type Palette
- type Rectangle
- type ScrollArea
- type ScrollBar
- type ScrollHandle
- type Scrollable
- type ScrollableNode
- type Separator
- type SeparatorHandle
- type SplBg
- type StartPercentLayout
- func (spl *StartPercentLayout) InsertBefore(n Node, mark *EmbedNode)
- func (spl *StartPercentLayout) Layout()
- func (spl *StartPercentLayout) MaximizeNode(node Node)
- func (spl *StartPercentLayout) Measure(hint image.Point) image.Point
- func (spl *StartPercentLayout) RawStartPercent(child Node) float64
- func (spl *StartPercentLayout) Remove(n Node)
- func (spl *StartPercentLayout) Resize(node Node, percent float64)
- func (spl *StartPercentLayout) ResizeWithMove(node Node, percent float64)
- func (spl *StartPercentLayout) SetPercentWithPush(node Node, percentPos float64)
- func (spl *StartPercentLayout) SetRawStartPercent(child Node, v float64)
- func (spl *StartPercentLayout) SetSizePercentWithPush(node Node, sizePercent float64)
- type Text
- func (t *Text) Bytes() ([]byte, error)
- func (t *Text) GetIndex(p image.Point) int
- func (t *Text) GetPoint(i int) image.Point
- func (t *Text) IndexVisible(offset int) bool
- func (t *Text) Layout()
- func (t *Text) Len() int
- func (t *Text) LineHeight() int
- func (t *Text) MakeIndexVisible(offset int)
- func (t *Text) MakeRangeVisible(offset, n int)
- func (t *Text) Measure(hint image.Point) image.Point
- func (t *Text) OnThemeChange()
- func (t *Text) Paint()
- func (t *Text) PaintBase()
- func (t *Text) RW() iorw.ReadWriterAt
- func (t *Text) RuneOffset() int
- func (t *Text) SetBytes(b []byte) error
- func (t *Text) SetRW(rw iorw.ReadWriterAt)
- func (t *Text) SetRuneOffset(v int)
- func (t *Text) SetScrollable(x, y bool)
- func (t *Text) SetStr(str string) error
- func (t *Text) Str() string
- type TextEdit
- func (te *TextEdit) AppendBytesClearHistory(b []byte) error
- func (te *TextEdit) BeginUndoGroup()
- func (te *TextEdit) ClearPos()
- func (te *TextEdit) ClearUndones()
- func (te *TextEdit) Cursor() rwedit.Cursor
- func (te *TextEdit) CursorIndex() int
- func (te *TextEdit) EditCtx() *rwedit.Ctx
- func (te *TextEdit) EndUndoGroup()
- func (te *TextEdit) HandleRWWrite2(ev *iorw.RWEvWrite2)
- func (te *TextEdit) MakeCursorVisible()
- func (te *TextEdit) OnInputEvent(ev interface{}, p image.Point) event.Handled
- func (te *TextEdit) RW() iorw.ReadWriterAt
- func (te *TextEdit) Redo() error
- func (te *TextEdit) SetBytes(b []byte) error
- func (te *TextEdit) SetBytesClearHistory(b []byte) error
- func (te *TextEdit) SetBytesClearPos(b []byte) error
- func (te *TextEdit) SetCursorIndex(i int)
- func (te *TextEdit) SetRW(rw iorw.ReadWriterAt)
- func (te *TextEdit) SetRWFromMaster(m *TextEdit)
- func (te *TextEdit) SetStr(str string) error
- func (te *TextEdit) SetStrClearHistory(str string) error
- func (te *TextEdit) SetStrClearPos(str string) error
- func (te *TextEdit) Undo() error
- type TextEditX
- func (te *TextEditX) EnableCursorWordHighlight(v bool)
- func (te *TextEditX) EnableParenthesisMatch(v bool)
- func (te *TextEditX) EnableSyntaxHighlight(v bool)
- func (te *TextEditX) FlashIndexLen(index int, len int)
- func (te *TextEditX) FlashLine(index int)
- func (te *TextEditX) OnThemeChange()
- func (te *TextEditX) Paint()
- func (te *TextEditX) PaintBase()
- func (te *TextEditX) SetCommentStrings(a ...interface{})
- type TextScroll
- func (ts *TextScroll) ScrollOffset() image.Point
- func (ts *TextScroll) ScrollPageSizeY(up bool) int
- func (ts *TextScroll) ScrollSize() image.Point
- func (ts *TextScroll) ScrollViewSize() image.Point
- func (ts *TextScroll) ScrollWheelSizeY(up bool) int
- func (ts *TextScroll) SetScrollOffset(o image.Point)
- type Theme
- type TopShadow
- type UIContext
- type XYAxis
- type XYAxisBoolPair
Constants ¶
This section is empty.
Variables ¶
var DefaultPalette = Palette{ "text_cursor_fg": nil, "text_fg": cint(0x0), "text_bg": cint(0xffffff), "text_selection_fg": nil, "text_selection_bg": cint(0xeeee9e), "text_colorize_string_fg": cint(0x008b00), "text_colorize_string_bg": nil, "text_colorize_comments_fg": cint(0x757575), "text_colorize_comments_bg": nil, "text_highlightword_fg": nil, "text_highlightword_bg": cint(0xc6ee9e), "text_wrapline_fg": cint(0x0), "text_wrapline_bg": cint(0xd8d8d8), "text_parenthesis_fg": cint(0x0), "text_parenthesis_bg": cint(0xc3c3c3), "text_annotations_fg": cint(0x0), "text_annotations_bg": cint(0xb0e0ef), "text_annotations_select_fg": cint(0x0), "text_annotations_select_bg": cint(0xefc7b0), "scrollbar_bg": cint(0xf2f2f2), "scrollhandle_normal": cint(0xb2b2b2), "scrollhandle_hover": cint(0x8e8e8e), "scrollhandle_select": cint(0x5f5f5f), "button_hover_fg": nil, "button_hover_bg": cint(0xdddddd), "button_down_fg": nil, "button_down_bg": cint(0xaaaaaa), "button_sticky_fg": cint(0xffffff), "button_sticky_bg": cint(0x0), "pad": cint(0x8080ff), "border": cint(0x00ff00), "rect": cint(0xff8000), }
Functions ¶
func StableOffsetScroll ¶
offset, start, deletedn, insertedn
Types ¶
type AEDragState ¶
type AEDragState struct {
// contains filtered or unexported fields
}
type ApplyEvent ¶
type ApplyEvent struct {
// contains filtered or unexported fields
}
func NewApplyEvent ¶
func NewApplyEvent(cctx CursorContext) *ApplyEvent
type Border ¶
type Border struct {
*Padder
}
func NewBorder ¶
func NewBorder(ctx ImageContext, child Node) *Border
type BottomShadow ¶
type BottomShadow struct { *BoxLayout Height int MaxDiff float64 // contains filtered or unexported fields }
func NewBottomShadow ¶
func NewBottomShadow(ctx ImageContext, content Node) *BottomShadow
type BottomShadowPart ¶
type BottomShadowPart struct { ENode // contains filtered or unexported fields }
func (*BottomShadowPart) Paint ¶
func (s *BottomShadowPart) Paint()
type BoxLayout ¶
func NewBoxLayout ¶
func NewBoxLayout() *BoxLayout
func (*BoxLayout) SetChildFill ¶
func (*BoxLayout) SetChildFlex ¶
type Button ¶
type Button struct { ENode Label *Label Sticky bool // stay down after click to behave like a menu button OnClick func(*event.MouseClick) // contains filtered or unexported fields }
func NewButton ¶
func NewButton(ctx ImageContext) *Button
type CursorContext ¶
type ENode ¶
type ENode struct {
EmbedNode
}
Doesn't allow embed to be assigned to a Node directly, which prevents a range of programming mistakes. This is the node other widgets should inherit from.
type EmbedNode ¶
type EmbedNode struct { Bounds image.Rectangle Cursor event.Cursor Wrapper Node Parent *EmbedNode // contains filtered or unexported fields }
func (*EmbedNode) Append ¶
If a node wants its InsertBefore implementation to be used, the wrapper must be set.
func (*EmbedNode) ChildsLayoutTree ¶
func (en *EmbedNode) ChildsLayoutTree()
func (*EmbedNode) ChildsPaintTree ¶
func (en *EmbedNode) ChildsPaintTree()
func (*EmbedNode) ChildsWrappers ¶
func (*EmbedNode) FirstChild ¶
func (*EmbedNode) FirstChildWrapper ¶
func (*EmbedNode) HasAnyMarks ¶
func (*EmbedNode) InsertBefore ¶
func (*EmbedNode) IterateReverse ¶
func (*EmbedNode) IterateReverse2 ¶
func (*EmbedNode) IterateWrappers ¶
func (*EmbedNode) IterateWrappers2 ¶
func (*EmbedNode) IterateWrappersReverse ¶
func (*EmbedNode) IterateWrappersReverse2 ¶
func (*EmbedNode) LastChildWrapper ¶
func (*EmbedNode) LayoutMarked ¶
func (en *EmbedNode) LayoutMarked()
func (*EmbedNode) LayoutTree ¶
func (en *EmbedNode) LayoutTree()
func (*EmbedNode) MarkNeedsLayout ¶
func (en *EmbedNode) MarkNeedsLayout()
func (*EmbedNode) MarkNeedsLayoutAndPaint ¶
func (en *EmbedNode) MarkNeedsLayoutAndPaint()
func (*EmbedNode) MarkNeedsPaint ¶
func (en *EmbedNode) MarkNeedsPaint()
func (*EmbedNode) NextSibling ¶
func (*EmbedNode) NextSiblingWrapper ¶
func (*EmbedNode) OnChildMarked ¶
func (*EmbedNode) OnInputEvent ¶
func (*EmbedNode) OnThemeChange ¶
func (en *EmbedNode) OnThemeChange()
func (*EmbedNode) PaintMarked ¶
func (*EmbedNode) PrevSibling ¶
func (*EmbedNode) PrevSiblingWrapper ¶
func (*EmbedNode) RemoveMarks ¶
func (*EmbedNode) SetThemeFontFace ¶
func (*EmbedNode) SetThemePalette ¶
func (*EmbedNode) SetThemePaletteColor ¶
func (*EmbedNode) SetThemePaletteNamePrefix ¶
func (*EmbedNode) SetWrapperForRoot ¶
Only the root node should need to set the wrapper explicitly.
func (*EmbedNode) Swap ¶
Doesn't use Remove/Insert. So implementing nodes overriding those will not see their functions used.
func (*EmbedNode) ThemePalette ¶
func (*EmbedNode) TreeNeedsLayout ¶
func (*EmbedNode) TreeNeedsPaint ¶
func (*EmbedNode) TreeThemeFontFace ¶
type FloatBox ¶
type FloatBox struct { ENode RefPoint image.Point MaxSize image.Point // contains filtered or unexported fields }
Should be a child of FloatLayer.
func NewFloatBox ¶
func NewFloatBox(ml *MultiLayer, content Node) *FloatBox
type FloatBoxButton ¶
type FloatBoxButton struct { *Button // contains filtered or unexported fields }
func NewFloatBoxButton ¶
func NewFloatBoxButton(ctx ImageContext, ml *MultiLayer, fl *FloatLayer, content Node) *FloatBoxButton
func (*FloatBoxButton) Close ¶
func (fbb *FloatBoxButton) Close()
func (*FloatBoxButton) Layout ¶
func (fbb *FloatBoxButton) Layout()
type FloatLayer ¶
type FloatLayer struct { ENode // contains filtered or unexported fields }
func (*FloatLayer) OnChildMarked ¶
func (fl *FloatLayer) OnChildMarked(child Node, newMarks Marks)
type FreeLayout ¶
type FreeLayout struct {
ENode
}
func NewFreeLayout ¶
func NewFreeLayout() *FreeLayout
func (*FreeLayout) Layout ¶
func (fl *FreeLayout) Layout()
type ImageContext ¶
type Label ¶
type Label struct { ENode Text *Text Border *Border Pad *Pad // contains filtered or unexported fields }
func NewLabel ¶
func NewLabel(ctx ImageContext) *Label
func (*Label) OnThemeChange ¶
func (l *Label) OnThemeChange()
type Marks ¶
type Marks uint16
const ( MarkNeedsPaint Marks = 1 << iota MarkNeedsLayout MarkChildNeedsPaint MarkChildNeedsLayout MarkPointerInside // mouseEnter/mouseLeave events MarkNotDraggable // won't emit mouseDrag events MarkForceZeroBounds // sets bounds to zero (aka not visible) MarkInBoundsHandlesEvent // helps with layer nodes keep events // For transparent widgets that cross two or more other widgets (ex: a non visible separator handle). Improves on detecting if others need paint. MarkNotPaintable )
type MultiLayer ¶
type MultiLayer struct { ENode BgLayer *BgLayer SeparatorLayer *ENode ContextLayer *FloatLayer MenuLayer *FloatLayer // contains filtered or unexported fields }
First/last child is the bottom/top layer.
func NewMultiLayer ¶
func NewMultiLayer() *MultiLayer
func (*MultiLayer) AddMarkRect ¶
func (ml *MultiLayer) AddMarkRect(r image.Rectangle)
func (*MultiLayer) InsertBefore ¶
func (ml *MultiLayer) InsertBefore(col Node, next *EmbedNode)
func (*MultiLayer) PaintMarked ¶
func (ml *MultiLayer) PaintMarked() image.Rectangle
type Node ¶
type Node interface { Embed() *EmbedNode InsertBefore(n Node, mark *EmbedNode) Append(n ...Node) Remove(child Node) Measure(hint image.Point) image.Point LayoutMarked() LayoutTree() Layout() // set childs bounds, don't call childs layout ChildsLayoutTree() PaintMarked() image.Rectangle PaintTree() bool PaintBase() // pre-paint step, useful for widgets with a pre-paint stage Paint() ChildsPaintTree() OnThemeChange() OnChildMarked(child Node, newMarks Marks) OnInputEvent(ev interface{}, p image.Point) event.Handled // contains filtered or unexported methods }
type Padder ¶
Used by Pad and Border.
func NewPadder ¶
func NewPadder(ctx ImageContext, child Node) *Padder
type Rectangle ¶
func NewRectangle ¶
func NewRectangle(ctx ImageContext) *Rectangle
type ScrollArea ¶
type ScrollArea struct { ENode ScrollWidth int LeftScroll bool YBar *ScrollBar XBar *ScrollBar // contains filtered or unexported fields }
func NewScrollArea ¶
func NewScrollArea(ctx ImageContext, scrollable ScrollableNode, xbar, ybar bool) *ScrollArea
func (*ScrollArea) Layout ¶
func (sa *ScrollArea) Layout()
func (*ScrollArea) OnChildMarked ¶
func (sa *ScrollArea) OnChildMarked(child Node, newMarks Marks)
func (*ScrollArea) OnInputEvent ¶
func (sa *ScrollArea) OnInputEvent(ev0 interface{}, p image.Point) event.Handled
func (*ScrollArea) SetBars ¶
func (sa *ScrollArea) SetBars(xbar, ybar bool)
type ScrollBar ¶
type ScrollBar struct { ENode Handle *ScrollHandle Horizontal bool // contains filtered or unexported fields }
Used by ScrollArea. Parent of ScrollHandle.
func NewScrollBar ¶
func NewScrollBar(ctx ImageContext, sa *ScrollArea) *ScrollBar
func (*ScrollBar) OnChildMarked ¶
func (*ScrollBar) OnInputEvent ¶
type ScrollHandle ¶
type ScrollHandle struct { ENode // contains filtered or unexported fields }
Used by ScrollBar.
func NewScrollHandle ¶
func NewScrollHandle(ctx ImageContext, sb *ScrollBar) *ScrollHandle
func (*ScrollHandle) OnInputEvent ¶
func (sh *ScrollHandle) OnInputEvent(ev interface{}, p image.Point) event.Handled
func (*ScrollHandle) Paint ¶
func (sh *ScrollHandle) Paint()
type Scrollable ¶
type Separator ¶
type Separator struct { Rectangle Handle *SeparatorHandle }
func NewSeparator ¶
func NewSeparator(ctx ImageContext, ml *MultiLayer) *Separator
type SeparatorHandle ¶
type SeparatorHandle struct { ENode Top, Bottom, Left, Right int DragPad image.Point // contains filtered or unexported fields }
A transparent widget added to a top layer (usually multilayer) to facilitate dragging. Calculations are made on top of the reference node (usually a thin separator that otherwise would not be easy to put the pointer over for dragging).
func NewSeparatorHandle ¶
func NewSeparatorHandle(ref Node) *SeparatorHandle
func (*SeparatorHandle) Layout ¶
func (sh *SeparatorHandle) Layout()
func (*SeparatorHandle) OnInputEvent ¶
func (sh *SeparatorHandle) OnInputEvent(ev0 interface{}, p image.Point) event.Handled
type SplBg ¶
type SplBg struct { ENode Spl *StartPercentLayout Bg Node }
Wraps a StartPercentLayout with a node that fills the first space background.
func (*SplBg) OnChildMarked ¶
type StartPercentLayout ¶
type StartPercentLayout struct { ENode YAxis bool MinimumChildSize int // contains filtered or unexported fields }
Start percent sets the child left X bound to the percent of the size. This ensures a change in the percentage of a middle child doesn't affect the bounds of the other childs (ex: like causing a small adjustment when resizing).
func NewStartPercentLayout ¶
func NewStartPercentLayout() *StartPercentLayout
func (*StartPercentLayout) InsertBefore ¶
func (spl *StartPercentLayout) InsertBefore(n Node, mark *EmbedNode)
func (*StartPercentLayout) Layout ¶
func (spl *StartPercentLayout) Layout()
func (*StartPercentLayout) MaximizeNode ¶
func (spl *StartPercentLayout) MaximizeNode(node Node)
func (*StartPercentLayout) Measure ¶
func (spl *StartPercentLayout) Measure(hint image.Point) image.Point
func (*StartPercentLayout) RawStartPercent ¶
func (spl *StartPercentLayout) RawStartPercent(child Node) float64
Used for encoding/decoding only. (Ex: sessions)
func (*StartPercentLayout) Remove ¶
func (spl *StartPercentLayout) Remove(n Node)
func (*StartPercentLayout) Resize ¶
func (spl *StartPercentLayout) Resize(node Node, percent float64)
func (*StartPercentLayout) ResizeWithMove ¶
func (spl *StartPercentLayout) ResizeWithMove(node Node, percent float64)
func (*StartPercentLayout) SetPercentWithPush ¶
func (spl *StartPercentLayout) SetPercentWithPush(node Node, percentPos float64)
func (*StartPercentLayout) SetRawStartPercent ¶
func (spl *StartPercentLayout) SetRawStartPercent(child Node, v float64)
Used for encoding/decoding only. (Ex: sessions)
func (*StartPercentLayout) SetSizePercentWithPush ¶
func (spl *StartPercentLayout) SetSizePercentWithPush(node Node, sizePercent float64)
type Text ¶
type Text struct { ENode TextScroll Drawer drawutil.Drawer // contains filtered or unexported fields }
func NewText ¶
func NewText(ctx ImageContext) *Text
func (*Text) Bytes ¶
Result might not be a copy, so changes to the slice might affect the text data.
func (*Text) IndexVisible ¶
func (*Text) LineHeight ¶
func (*Text) MakeIndexVisible ¶
func (*Text) MakeRangeVisible ¶
func (*Text) OnThemeChange ¶
func (t *Text) OnThemeChange()
func (*Text) RW ¶
func (t *Text) RW() iorw.ReadWriterAt
func (*Text) RuneOffset ¶
func (*Text) SetRW ¶
func (t *Text) SetRW(rw iorw.ReadWriterAt)
func (*Text) SetRuneOffset ¶
func (*Text) SetScrollable ¶
implements Scrollable interface.
type TextEdit ¶
type TextEdit struct { *Text RWEvReg *evreg.Register // the rwundo wraps the rwev, so on a write event callback, the undo data is not commited yet. It is incorrect to try to undo inside a write callback. If a rwev wraps rwundo, undoing will not trigger the outer rwev events, otherwise undoing would register as another undo event (cycle). // contains filtered or unexported fields }
func NewTextEdit ¶
func (*TextEdit) AppendBytesClearHistory ¶
func (*TextEdit) BeginUndoGroup ¶
func (te *TextEdit) BeginUndoGroup()
func (*TextEdit) ClearUndones ¶
func (te *TextEdit) ClearUndones()
func (*TextEdit) CursorIndex ¶
func (*TextEdit) EndUndoGroup ¶
func (te *TextEdit) EndUndoGroup()
func (*TextEdit) HandleRWWrite2 ¶
func (te *TextEdit) HandleRWWrite2(ev *iorw.RWEvWrite2)
Called when changes were made on another row
func (*TextEdit) MakeCursorVisible ¶
func (te *TextEdit) MakeCursorVisible()
func (*TextEdit) OnInputEvent ¶
func (*TextEdit) RW ¶
func (te *TextEdit) RW() iorw.ReadWriterAt
func (*TextEdit) SetBytesClearHistory ¶
Keeps position (useful for file save)
func (*TextEdit) SetBytesClearPos ¶
func (*TextEdit) SetCursorIndex ¶
func (*TextEdit) SetRW ¶
func (te *TextEdit) SetRW(rw iorw.ReadWriterAt)
func (*TextEdit) SetRWFromMaster ¶
func (*TextEdit) SetStrClearHistory ¶
func (*TextEdit) SetStrClearPos ¶
type TextEditX ¶
type TextEditX struct { *TextEdit // contains filtered or unexported fields }
textedit with extensions
func NewTextEditX ¶
func (*TextEditX) EnableCursorWordHighlight ¶
func (*TextEditX) EnableParenthesisMatch ¶
func (*TextEditX) EnableSyntaxHighlight ¶
func (*TextEditX) FlashIndexLen ¶
func (*TextEditX) OnThemeChange ¶
func (te *TextEditX) OnThemeChange()
func (*TextEditX) SetCommentStrings ¶
func (te *TextEditX) SetCommentStrings(a ...interface{})
type TextScroll ¶
type TextScroll struct {
*Text
}
func (*TextScroll) ScrollOffset ¶
func (ts *TextScroll) ScrollOffset() image.Point
func (*TextScroll) ScrollPageSizeY ¶
func (ts *TextScroll) ScrollPageSizeY(up bool) int
func (*TextScroll) ScrollSize ¶
func (ts *TextScroll) ScrollSize() image.Point
func (*TextScroll) ScrollViewSize ¶
func (ts *TextScroll) ScrollViewSize() image.Point
func (*TextScroll) ScrollWheelSizeY ¶
func (ts *TextScroll) ScrollWheelSizeY(up bool) int
func (*TextScroll) SetScrollOffset ¶
func (ts *TextScroll) SetScrollOffset(o image.Point)
type Theme ¶
func (*Theme) SetFontFace ¶
Can be set to nil to erase.
func (*Theme) SetPaletteColor ¶
Can be set to nil to erase.
func (*Theme) SetPaletteNamePrefix ¶
Can be set to "" to erase.
type TopShadow ¶
type TopShadow struct { ENode Height int MaxDiff float64 // contains filtered or unexported fields }
func NewTopShadow ¶
func NewTopShadow(ctx ImageContext, content Node) *TopShadow
func (*TopShadow) ChildsPaintTree ¶
func (s *TopShadow) ChildsPaintTree()
func (*TopShadow) OnChildMarked ¶
type UIContext ¶
type UIContext interface { Error(error) ImageContext CursorContext RunOnUIGoRoutine(f func()) SetClipboardData(event.ClipboardIndex, string) GetClipboardData(event.ClipboardIndex, func(string, error)) }
type XYAxis ¶
type XYAxis struct {
YAxis bool
}
Allows calculations to be done X oriented, and have it translated to Y axis. Useful for layouts that want to layout elements in a vertical or horizontal direction depending on a flag.
func (*XYAxis) BoolPair ¶
func (xy *XYAxis) BoolPair(bp XYAxisBoolPair) XYAxisBoolPair
type XYAxisBoolPair ¶
type XYAxisBoolPair struct {
X, Y bool
}
Source Files ¶
- applyevent.go
- border.go
- boxlayout.go
- button.go
- context.go
- floatbox.go
- floatboxbutton.go
- freelayout.go
- label.go
- multilayer.go
- node.go
- offsetscrollutil.go
- pad.go
- rectangle.go
- scrollable.go
- scrollarea.go
- scrollbar.go
- scrollhandle.go
- separator.go
- separatorhandle.go
- shadow.go
- splbg.go
- startpercentlayout.go
- text.go
- textedit.go
- texteditx.go
- textscroll.go
- theme.go
- xyaxis.go