Documentation ¶
Index ¶
- Constants
- Variables
- func BreadcrumbsAt(p Container, pnt math.Point) string
- func ChildToParent(coord math.Point, from Control, to Parent) math.Point
- func Dump(c interface{})
- func EventLoop(driver Driver)
- func FunctionName(i interface{}) string
- func ParentToChild(coord math.Point, from Parent, to Control) math.Point
- func Path(p interface{}) string
- func RuneArrayToString(arr []rune) string
- func SetFocus(focusable Focusable)
- func StringToRuneArray(str string) []rune
- func TransformCoordinate(coord math.Point, from, to Control) math.Point
- func ValidateHierarchy(p Parent)
- func WindowToChild(coord math.Point, to Control) math.Point
- type Adapter
- type AdapterBase
- type AdapterItemId
- type AspectMode
- type Brush
- type BubbleOverlay
- type Button
- type ButtonType
- type Canvas
- type ChanneledEvent
- type CodeEditor
- type CodeSuggestion
- type CodeSuggestionProvider
- type CodeSyntaxLayer
- func (l *CodeSyntaxLayer) Add(start, count int)
- func (l *CodeSyntaxLayer) AddData(start, count int, data interface{})
- func (l *CodeSyntaxLayer) AddSpan(span interval.IntData)
- func (l *CodeSyntaxLayer) BackgroundColor() *Color
- func (l *CodeSyntaxLayer) BorderColor() *Color
- func (l *CodeSyntaxLayer) Clear()
- func (l *CodeSyntaxLayer) ClearBackgroundColor()
- func (l *CodeSyntaxLayer) ClearBorderColor()
- func (l *CodeSyntaxLayer) ClearColor()
- func (l *CodeSyntaxLayer) Color() *Color
- func (l *CodeSyntaxLayer) Data() interface{}
- func (l *CodeSyntaxLayer) SetBackgroundColor(color Color)
- func (l *CodeSyntaxLayer) SetBorderColor(color Color)
- func (l *CodeSyntaxLayer) SetColor(color Color)
- func (l *CodeSyntaxLayer) SetData(data interface{})
- func (l *CodeSyntaxLayer) SpanAt(runeIndex int) *interval.IntData
- func (l *CodeSyntaxLayer) Spans() interval.IntDataList
- func (l *CodeSyntaxLayer) UpdateSpans(runeCount int, edits []TextBoxEdit)
- type CodeSyntaxLayers
- type Color
- type Container
- type Control
- type ControlList
- type ControlPoint
- type ControlPointList
- type DefaultAdapter
- func (a *DefaultAdapter) Count() int
- func (a *DefaultAdapter) Create(theme Theme, index int) Control
- func (a *DefaultAdapter) Data() interface{}
- func (a *DefaultAdapter) IdOf(data interface{}) AdapterItemId
- func (a *DefaultAdapter) ItemId(index int) AdapterItemId
- func (a *DefaultAdapter) ItemIndex(id AdapterItemId) int
- func (a *DefaultAdapter) ItemSize(theme Theme) math.Size
- func (a *DefaultAdapter) SetData(data interface{})
- func (a *DefaultAdapter) SetItemSize(s math.Size)
- func (a *DefaultAdapter) SetItemSizeAsLargest(theme Theme)
- func (a *DefaultAdapter) SetStyleLabel(f func(Theme, Label))
- func (a *DefaultAdapter) ValueOf(id AdapterItemId) interface{}
- type Driver
- type DropDownList
- type Event
- type EventBase
- func (e *EventBase) Fire(args ...interface{})
- func (e *EventBase) InvokeListeners(args []interface{})
- func (e *EventBase) Listen(listener interface{}) EventSubscription
- func (e *EventBase) ParameterTypes() []reflect.Type
- func (e *EventBase) String() string
- func (e *EventBase) VerifyArguments(args []interface{})
- func (e *EventBase) VerifySignature(argTys []reflect.Type, isVariadic bool)
- type EventListener
- type EventSubscription
- type FilteredListAdapter
- func (a *FilteredListAdapter) Count() int
- func (a *FilteredListAdapter) Create(theme Theme, index int) Control
- func (a *FilteredListAdapter) Item(id AdapterItemId) FilteredListItem
- func (a *FilteredListAdapter) ItemId(index int) AdapterItemId
- func (a *FilteredListAdapter) ItemIndex(id AdapterItemId) int
- func (a *FilteredListAdapter) ItemSize(theme Theme) math.Size
- func (a *FilteredListAdapter) Len() int
- func (a *FilteredListAdapter) Less(i, j int) bool
- func (a *FilteredListAdapter) SetItems(items []FilteredListItem)
- func (a *FilteredListAdapter) Sort(partial string)
- func (a *FilteredListAdapter) Swap(i, j int)
- type FilteredListItem
- type FocusController
- func (c *FocusController) Focus() Focusable
- func (c *FocusController) FocusNext()
- func (c *FocusController) FocusPrev()
- func (c *FocusController) Focusable(ctrl Control) Focusable
- func (c *FocusController) NextChildFocusable(p Container, after Control, forwards bool) Focusable
- func (c *FocusController) NextFocusable(after Control, forwards bool) Focusable
- func (c *FocusController) SetFocus(f Focusable)
- func (c *FocusController) SetFocusCount() int
- type Focusable
- type Font
- type HorizontalAlignment
- type Image
- type KeyStrokeEvent
- type KeyboardController
- type KeyboardEvent
- type KeyboardKey
- type KeyboardModifier
- type Label
- type LinearLayout
- type List
- type MouseButton
- type MouseController
- type MouseEvent
- type Orientation
- type PanelHolder
- type Parent
- type ParentPoint
- type Pen
- type Polygon
- type PolygonVertex
- type ProgressBar
- type ScalingMode
- type ScrollBar
- type ScrollLayout
- type SelectionTransform
- type SimpleEvent
- type SplitterLayout
- type Stringer
- type TextBox
- type TextBoxController
- func (t *TextBoxController) AddCaret(c int)
- func (t *TextBoxController) AddCarets(transform SelectionTransform)
- func (t *TextBoxController) AddCaretsDown()
- func (t *TextBoxController) AddCaretsUp()
- func (t *TextBoxController) AddSelection(s TextSelection)
- func (t *TextBoxController) Backspace()
- func (t *TextBoxController) Caret(i int) int
- func (t *TextBoxController) Carets() []int
- func (t *TextBoxController) ClearSelections()
- func (t *TextBoxController) Delete()
- func (t *TextBoxController) Deselect(moveCaretToStart bool) (deselected bool)
- func (t *TextBoxController) FirstCaret() int
- func (t *TextBoxController) FirstSelection() TextSelection
- func (t *TextBoxController) GrowSelections(transform SelectionTransform)
- func (t *TextBoxController) IndentSelection(tabWidth int)
- func (t *TextBoxController) IndexDown(i int) int
- func (t *TextBoxController) IndexEnd(i int) int
- func (t *TextBoxController) IndexFirst(i int) int
- func (t *TextBoxController) IndexHome(i int) int
- func (t *TextBoxController) IndexLast(i int) int
- func (t *TextBoxController) IndexLeft(i int) int
- func (t *TextBoxController) IndexRight(i int) int
- func (t *TextBoxController) IndexUp(i int) int
- func (t *TextBoxController) IndexWordLeft(i int) int
- func (t *TextBoxController) IndexWordRight(i int) int
- func (t *TextBoxController) LastCaret() int
- func (t *TextBoxController) LastSelection() TextSelection
- func (t *TextBoxController) Line(i int) string
- func (t *TextBoxController) LineAndRow(index int) (line, row int)
- func (t *TextBoxController) LineCount() int
- func (t *TextBoxController) LineEnd(i int) int
- func (t *TextBoxController) LineIndent(i int) int
- func (t *TextBoxController) LineIndex(p int) int
- func (t *TextBoxController) LineRunes(i int) []rune
- func (t *TextBoxController) LineStart(i int) int
- func (t *TextBoxController) MoveDown()
- func (t *TextBoxController) MoveEnd()
- func (t *TextBoxController) MoveFirst()
- func (t *TextBoxController) MoveHome()
- func (t *TextBoxController) MoveLast()
- func (t *TextBoxController) MoveLeft()
- func (t *TextBoxController) MoveLeftByWord()
- func (t *TextBoxController) MoveRight()
- func (t *TextBoxController) MoveRightByWord()
- func (t *TextBoxController) MoveSelections(transform SelectionTransform)
- func (t *TextBoxController) MoveUp()
- func (t *TextBoxController) OnSelectionChanged(f func()) EventSubscription
- func (t *TextBoxController) OnTextChanged(f func([]TextBoxEdit)) EventSubscription
- func (t *TextBoxController) Replace(f func(sel TextSelection) string)
- func (t *TextBoxController) ReplaceAll(str string)
- func (t *TextBoxController) ReplaceAllRunes(str []rune)
- func (t *TextBoxController) ReplaceAt(text []rune, s, e int, replacement []rune) ([]rune, TextBoxEdit)
- func (t *TextBoxController) ReplaceRunes(f func(sel TextSelection) []rune)
- func (t *TextBoxController) ReplaceWithNewline()
- func (t *TextBoxController) ReplaceWithNewlineKeepIndent()
- func (t *TextBoxController) RestoreNextSelections()
- func (t *TextBoxController) RestorePreviousSelections()
- func (t *TextBoxController) RuneInWord(r rune) bool
- func (t *TextBoxController) SelectAll()
- func (t *TextBoxController) SelectDown()
- func (t *TextBoxController) SelectEnd()
- func (t *TextBoxController) SelectFirst()
- func (t *TextBoxController) SelectHome()
- func (t *TextBoxController) SelectLast()
- func (t *TextBoxController) SelectLeft()
- func (t *TextBoxController) SelectLeftByWord()
- func (t *TextBoxController) SelectRight()
- func (t *TextBoxController) SelectRightByWord()
- func (t *TextBoxController) SelectUp()
- func (t *TextBoxController) Selection(i int) TextSelection
- func (t *TextBoxController) SelectionCount() int
- func (t *TextBoxController) SelectionLineText(i int) string
- func (t *TextBoxController) SelectionText(i int) string
- func (t *TextBoxController) Selections() TextSelectionList
- func (t *TextBoxController) SetCaret(c int)
- func (t *TextBoxController) SetSelection(s TextSelection)
- func (t *TextBoxController) SetSelections(s TextSelectionList)
- func (t *TextBoxController) SetText(str string)
- func (t *TextBoxController) SetTextEdits(text []rune, edits []TextBoxEdit)
- func (t *TextBoxController) SetTextRunes(text []rune)
- func (t *TextBoxController) StoreCaretLocations()
- func (t *TextBoxController) Text() string
- func (t *TextBoxController) TextRange(s, e int) string
- func (t *TextBoxController) TextRunes() []rune
- func (t *TextBoxController) UnindentSelection(tabWidth int)
- func (t *TextBoxController) WordAt(runeIdx int) (s, e int)
- type TextBoxEdit
- type TextSelection
- func (i TextSelection) Caret() int
- func (i TextSelection) CaretAtStart() bool
- func (i TextSelection) End() int
- func (i TextSelection) First() int
- func (i TextSelection) From() int
- func (i TextSelection) Last() int
- func (i TextSelection) Length() int
- func (t TextSelection) Offset(i int) TextSelection
- func (i TextSelection) Range() (start, end int)
- func (i TextSelection) Span() (start, end uint64)
- func (i TextSelection) Start() int
- type TextSelectionList
- func (l TextSelectionList) Cap() int
- func (l TextSelectionList) Copy(to, from, count int)
- func (l TextSelectionList) GetInterval(index int) (start, end uint64)
- func (l *TextSelectionList) GrowTo(length, capacity int)
- func (l TextSelectionList) Len() int
- func (l TextSelectionList) MergeData(index int, i interval.Node)
- func (l TextSelectionList) SetInterval(index int, start, end uint64)
- func (l *TextSelectionList) SetLen(len int)
- func (l TextSelectionList) Transform(from int, transform func(i int) int) TextSelectionList
- func (l TextSelectionList) TransformCarets(from int, transform func(i int) int) TextSelectionList
- type Texture
- type Theme
- type ToolTipController
- type ToolTipCreator
- type Tree
- type TreeAdapter
- type TreeAdapterNode
- type VerticalAlignment
- type Viewer
- type Viewport
- type Window
Constants ¶
View Source
const ( AspectStretch = iota AspectCorrectLetterbox AspectCorrectCrop )
Variables ¶
View Source
var Black = Color{0.0, 0.0, 0.0, 1.0}
View Source
var BlackBrush = CreateBrush(Black)
View Source
var Blue = Color{0.0, 0.0, 1.0, 1.0}
View Source
var Blue10 = Color{0.0, 0.0, 0.1, 1.0}
View Source
var Blue20 = Color{0.0, 0.0, 0.2, 1.0}
View Source
var Blue30 = Color{0.0, 0.0, 0.3, 1.0}
View Source
var Blue40 = Color{0.0, 0.0, 0.4, 1.0}
View Source
var Blue50 = Color{0.0, 0.0, 0.5, 1.0}
View Source
var Blue60 = Color{0.0, 0.0, 0.6, 1.0}
View Source
var Blue70 = Color{0.0, 0.0, 0.7, 1.0}
View Source
var Blue80 = Color{0.0, 0.0, 0.8, 1.0}
View Source
var Blue90 = Color{0.0, 0.0, 0.9, 1.0}
View Source
var DefaultBrush = WhiteBrush
View Source
var Gray10 = Color{0.1, 0.1, 0.1, 1.0}
View Source
var Gray15 = Color{0.15, 0.15, 0.15, 1.0}
View Source
var Gray20 = Color{0.2, 0.2, 0.2, 1.0}
View Source
var Gray30 = Color{0.3, 0.3, 0.3, 1.0}
View Source
var Gray40 = Color{0.4, 0.4, 0.4, 1.0}
View Source
var Gray50 = Color{0.5, 0.5, 0.5, 1.0}
View Source
var Gray60 = Color{0.6, 0.6, 0.6, 1.0}
View Source
var Gray70 = Color{0.7, 0.7, 0.7, 1.0}
View Source
var Gray80 = Color{0.8, 0.8, 0.8, 1.0}
View Source
var Gray90 = Color{0.9, 0.9, 0.9, 1.0}
View Source
var Green = Color{0.0, 1.0, 0.0, 1.0}
View Source
var Green10 = Color{0.0, 0.1, 0.0, 1.0}
View Source
var Green20 = Color{0.0, 0.2, 0.0, 1.0}
View Source
var Green30 = Color{0.0, 0.3, 0.0, 1.0}
View Source
var Green40 = Color{0.0, 0.4, 0.0, 1.0}
View Source
var Green50 = Color{0.0, 0.5, 0.0, 1.0}
View Source
var Green60 = Color{0.0, 0.6, 0.0, 1.0}
View Source
var Green70 = Color{0.0, 0.7, 0.0, 1.0}
View Source
var Green80 = Color{0.0, 0.8, 0.0, 1.0}
View Source
var Green90 = Color{0.0, 0.9, 0.0, 1.0}
View Source
var Red = Color{1.0, 0.0, 0.0, 1.0}
View Source
var Red10 = Color{0.1, 0.0, 0.0, 1.0}
View Source
var Red20 = Color{0.2, 0.0, 0.0, 1.0}
View Source
var Red30 = Color{0.3, 0.0, 0.0, 1.0}
View Source
var Red40 = Color{0.4, 0.0, 0.0, 1.0}
View Source
var Red50 = Color{0.5, 0.0, 0.0, 1.0}
View Source
var Red60 = Color{0.6, 0.0, 0.0, 1.0}
View Source
var Red70 = Color{0.7, 0.0, 0.0, 1.0}
View Source
var Red80 = Color{0.8, 0.0, 0.0, 1.0}
View Source
var Red90 = Color{0.9, 0.0, 0.0, 1.0}
View Source
var Transparent = Color{0.0, 0.0, 0.0, 0.0}
View Source
var TransparentBrush = CreateBrush(Transparent)
View Source
var White = Color{1.0, 1.0, 1.0, 1.0}
View Source
var WhiteBrush = CreateBrush(White)
View Source
var Yellow = Color{1.0, 1.0, 0.0, 1.0}
Functions ¶
func FunctionName ¶
func FunctionName(i interface{}) string
func RuneArrayToString ¶
func StringToRuneArray ¶
func ValidateHierarchy ¶
func ValidateHierarchy(p Parent)
Types ¶
type Adapter ¶
type Adapter interface { ItemSize(theme Theme) math.Size Count() int ItemId(index int) AdapterItemId ItemIndex(id AdapterItemId) int Create(theme Theme, index int) Control OnDataChanged(func()) EventSubscription OnDataReplaced(func()) EventSubscription }
type AdapterBase ¶
type AdapterBase struct {
// contains filtered or unexported fields
}
func (*AdapterBase) DataChanged ¶
func (a *AdapterBase) DataChanged()
func (*AdapterBase) DataReplaced ¶
func (a *AdapterBase) DataReplaced()
func (*AdapterBase) OnDataChanged ¶
func (a *AdapterBase) OnDataChanged(f func()) EventSubscription
func (*AdapterBase) OnDataReplaced ¶
func (a *AdapterBase) OnDataReplaced(f func()) EventSubscription
type AdapterItemId ¶
type AdapterItemId uint64
const InvalidAdapterItemId AdapterItemId = 0xFFFFFFFFFFFFFFFF
func (AdapterItemId) IsValid ¶
func (i AdapterItemId) IsValid() bool
type AspectMode ¶
type AspectMode int
type BubbleOverlay ¶
type Button ¶
type Button interface { LinearLayout Text() string SetText(string) Type() ButtonType SetType(ButtonType) IsChecked() bool SetChecked(bool) }
type Canvas ¶
type Canvas interface { Size() math.Size Complete() Push() Pop() AddClip(math.Rect) Clear(Color) DrawCanvas(c Canvas, position math.Point) DrawTexture(t Texture, bounds math.Rect) DrawText(Font, string, Color, math.Rect, HorizontalAlignment, VerticalAlignment) DrawRunes(font Font, runes []rune, color Color, points []math.Point, origin math.Point) DrawLines(Polygon, Pen) DrawPolygon(Polygon, Pen, Brush) DrawRect(math.Rect, Brush) DrawRoundedRect(rect math.Rect, tl, tr, bl, br float32, p Pen, b Brush) Release() }
type ChanneledEvent ¶
func (*ChanneledEvent) Fire ¶
func (e *ChanneledEvent) Fire(args ...interface{})
func (*ChanneledEvent) Listen ¶
func (e *ChanneledEvent) Listen(listener interface{}) EventSubscription
func (*ChanneledEvent) ParameterTypes ¶
func (e *ChanneledEvent) ParameterTypes() []reflect.Type
type CodeEditor ¶
type CodeEditor interface { TextBox SyntaxLayers() CodeSyntaxLayers SetSyntaxLayers(CodeSyntaxLayers) TabWidth() int SetTabWidth(int) SuggestionProvider() CodeSuggestionProvider SetSuggestionProvider(CodeSuggestionProvider) ShowSuggestionList() HideSuggestionList() }
type CodeSuggestion ¶
type CodeSuggestionProvider ¶
type CodeSuggestionProvider interface {
SuggestionsAt(runeIndex int) []CodeSuggestion
}
type CodeSyntaxLayer ¶
type CodeSyntaxLayer struct {
// contains filtered or unexported fields
}
func CreateCodeSyntaxLayer ¶
func CreateCodeSyntaxLayer() *CodeSyntaxLayer
func (*CodeSyntaxLayer) Add ¶
func (l *CodeSyntaxLayer) Add(start, count int)
func (*CodeSyntaxLayer) AddData ¶
func (l *CodeSyntaxLayer) AddData(start, count int, data interface{})
func (*CodeSyntaxLayer) AddSpan ¶
func (l *CodeSyntaxLayer) AddSpan(span interval.IntData)
func (*CodeSyntaxLayer) BackgroundColor ¶
func (l *CodeSyntaxLayer) BackgroundColor() *Color
func (*CodeSyntaxLayer) BorderColor ¶
func (l *CodeSyntaxLayer) BorderColor() *Color
func (*CodeSyntaxLayer) Clear ¶
func (l *CodeSyntaxLayer) Clear()
func (*CodeSyntaxLayer) ClearBackgroundColor ¶
func (l *CodeSyntaxLayer) ClearBackgroundColor()
func (*CodeSyntaxLayer) ClearBorderColor ¶
func (l *CodeSyntaxLayer) ClearBorderColor()
func (*CodeSyntaxLayer) ClearColor ¶
func (l *CodeSyntaxLayer) ClearColor()
func (*CodeSyntaxLayer) Color ¶
func (l *CodeSyntaxLayer) Color() *Color
func (*CodeSyntaxLayer) Data ¶
func (l *CodeSyntaxLayer) Data() interface{}
func (*CodeSyntaxLayer) SetBackgroundColor ¶
func (l *CodeSyntaxLayer) SetBackgroundColor(color Color)
func (*CodeSyntaxLayer) SetBorderColor ¶
func (l *CodeSyntaxLayer) SetBorderColor(color Color)
func (*CodeSyntaxLayer) SetColor ¶
func (l *CodeSyntaxLayer) SetColor(color Color)
func (*CodeSyntaxLayer) SetData ¶
func (l *CodeSyntaxLayer) SetData(data interface{})
func (*CodeSyntaxLayer) Spans ¶
func (l *CodeSyntaxLayer) Spans() interval.IntDataList
func (*CodeSyntaxLayer) UpdateSpans ¶
func (l *CodeSyntaxLayer) UpdateSpans(runeCount int, edits []TextBoxEdit)
type CodeSyntaxLayers ¶
type CodeSyntaxLayers []*CodeSyntaxLayer
func (*CodeSyntaxLayers) Clear ¶
func (l *CodeSyntaxLayers) Clear()
func (*CodeSyntaxLayers) Get ¶
func (l *CodeSyntaxLayers) Get(idx int) *CodeSyntaxLayer
type Container ¶
type Container interface { Parent Relayout() Redraw() ChildCount() int ChildIndex(child Control) int ChildAt(int) Control AddChild(child Control) AddChildAt(index int, child Control) RemoveChild(child Control) RemoveChildAt(index int) RemoveAll() Padding() math.Spacing SetPadding(math.Spacing) }
func CommonAncestor ¶
type Control ¶
type Control interface { Layout(math.Rect) Draw() Canvas Bounds() math.Rect Parent() Container SetParent(Container) Attached() bool Attach() Detach() DesiredSize(min, max math.Size) math.Size Margin() math.Spacing SetMargin(math.Spacing) IsVisible() bool SetVisible(bool) ContainsPoint(math.Point) bool IsMouseOver() bool IsMouseDown(button MouseButton) bool Click(MouseEvent) (consume bool) DoubleClick(MouseEvent) (consume bool) KeyPress(KeyboardEvent) (consume bool) KeyStroke(KeyStrokeEvent) (consume bool) MouseScroll(MouseEvent) (consume bool) MouseMove(MouseEvent) MouseEnter(MouseEvent) MouseExit(MouseEvent) MouseDown(MouseEvent) MouseUp(MouseEvent) KeyDown(KeyboardEvent) KeyUp(KeyboardEvent) KeyRepeat(KeyboardEvent) OnAttach(func()) EventSubscription OnDetach(func()) EventSubscription OnClick(func(MouseEvent)) EventSubscription OnDoubleClick(func(MouseEvent)) EventSubscription OnKeyPress(func(KeyboardEvent)) EventSubscription OnKeyStroke(func(KeyStrokeEvent)) EventSubscription OnMouseMove(func(MouseEvent)) EventSubscription OnMouseEnter(func(MouseEvent)) EventSubscription OnMouseExit(func(MouseEvent)) EventSubscription OnMouseDown(func(MouseEvent)) EventSubscription OnMouseUp(func(MouseEvent)) EventSubscription OnMouseScroll(func(MouseEvent)) EventSubscription OnKeyDown(func(KeyboardEvent)) EventSubscription OnKeyUp(func(KeyboardEvent)) EventSubscription OnKeyRepeat(func(KeyboardEvent)) EventSubscription }
type ControlList ¶
type ControlList []Control
func (ControlList) Contains ¶
func (l ControlList) Contains(c Control) bool
type ControlPoint ¶
type ControlPointList ¶
type ControlPointList []ControlPoint
func ControlsUnder ¶
func ControlsUnder(p math.Point, c Parent) ControlPointList
func TopControlsUnder ¶
func TopControlsUnder(p math.Point, c Parent) ControlPointList
func (ControlPointList) Contains ¶
func (l ControlPointList) Contains(c Control) bool
type DefaultAdapter ¶
type DefaultAdapter struct { AdapterBase // contains filtered or unexported fields }
func CreateDefaultAdapter ¶
func CreateDefaultAdapter() *DefaultAdapter
func (*DefaultAdapter) Count ¶
func (a *DefaultAdapter) Count() int
func (*DefaultAdapter) Data ¶
func (a *DefaultAdapter) Data() interface{}
func (*DefaultAdapter) IdOf ¶
func (a *DefaultAdapter) IdOf(data interface{}) AdapterItemId
func (*DefaultAdapter) ItemId ¶
func (a *DefaultAdapter) ItemId(index int) AdapterItemId
func (*DefaultAdapter) ItemIndex ¶
func (a *DefaultAdapter) ItemIndex(id AdapterItemId) int
func (*DefaultAdapter) SetData ¶
func (a *DefaultAdapter) SetData(data interface{})
func (*DefaultAdapter) SetItemSize ¶
func (a *DefaultAdapter) SetItemSize(s math.Size)
func (*DefaultAdapter) SetItemSizeAsLargest ¶
func (a *DefaultAdapter) SetItemSizeAsLargest(theme Theme)
func (*DefaultAdapter) SetStyleLabel ¶
func (a *DefaultAdapter) SetStyleLabel(f func(Theme, Label))
func (*DefaultAdapter) ValueOf ¶
func (a *DefaultAdapter) ValueOf(id AdapterItemId) interface{}
type Driver ¶
type Driver interface { // Events returns the event queue for the UI. The application should pull each // func from the returned chan and execute it on the main UI go-routine. The // application is free to write additional funcs to this chan in order for // them to be executed on the main UI go-routine. Events() chan func() Terminate() SetClipboard(str string) GetClipboard() (string, error) // CreateFont loads a font from the provided TrueType bytes. CreateFont(data []byte, size int) (Font, error) CreateViewport(width, height int, name string) Viewport CreateCanvas(math.Size) Canvas CreateTexture(img image.Image, pixelsPerDip float32) Texture }
type DropDownList ¶
type DropDownList interface { Focusable Container SetBubbleOverlay(BubbleOverlay) BubbleOverlay() BubbleOverlay Adapter() Adapter SetAdapter(Adapter) BorderPen() Pen SetBorderPen(Pen) BackgroundBrush() Brush SetBackgroundBrush(Brush) Selected() AdapterItemId Select(AdapterItemId) OnSelectionChanged(func(AdapterItemId)) EventSubscription OnShowList(func()) EventSubscription OnHideList(func()) EventSubscription }
type Event ¶
type Event interface { Fire(args ...interface{}) Listen(interface{}) EventSubscription ParameterTypes() []reflect.Type }
func CreateChanneledEvent ¶
func CreateChanneledEvent(signature interface{}, channel chan func()) Event
func CreateEvent ¶
func CreateEvent(signature interface{}) Event
type EventBase ¶
type EventBase struct {
// contains filtered or unexported fields
}
func (*EventBase) InvokeListeners ¶
func (e *EventBase) InvokeListeners(args []interface{})
func (*EventBase) Listen ¶
func (e *EventBase) Listen(listener interface{}) EventSubscription
Event compliance
func (*EventBase) ParameterTypes ¶
func (*EventBase) VerifyArguments ¶
func (e *EventBase) VerifyArguments(args []interface{})
type EventListener ¶
type EventSubscription ¶
type EventSubscription interface {
Unlisten()
}
type FilteredListAdapter ¶
type FilteredListAdapter struct { AdapterBase // contains filtered or unexported fields }
func (*FilteredListAdapter) Count ¶
func (a *FilteredListAdapter) Count() int
func (*FilteredListAdapter) Create ¶
func (a *FilteredListAdapter) Create(theme Theme, index int) Control
func (*FilteredListAdapter) Item ¶
func (a *FilteredListAdapter) Item(id AdapterItemId) FilteredListItem
func (*FilteredListAdapter) ItemId ¶
func (a *FilteredListAdapter) ItemId(index int) AdapterItemId
func (*FilteredListAdapter) ItemIndex ¶
func (a *FilteredListAdapter) ItemIndex(id AdapterItemId) int
func (*FilteredListAdapter) ItemSize ¶
func (a *FilteredListAdapter) ItemSize(theme Theme) math.Size
Adapter compliance
func (*FilteredListAdapter) Less ¶
func (a *FilteredListAdapter) Less(i, j int) bool
func (*FilteredListAdapter) SetItems ¶
func (a *FilteredListAdapter) SetItems(items []FilteredListItem)
func (*FilteredListAdapter) Sort ¶
func (a *FilteredListAdapter) Sort(partial string)
func (*FilteredListAdapter) Swap ¶
func (a *FilteredListAdapter) Swap(i, j int)
type FilteredListItem ¶
type FilteredListItem struct { Name string Data interface{} }
type FocusController ¶
type FocusController struct {
// contains filtered or unexported fields
}
func CreateFocusController ¶
func CreateFocusController(window Window) *FocusController
func (*FocusController) Focus ¶
func (c *FocusController) Focus() Focusable
func (*FocusController) FocusNext ¶
func (c *FocusController) FocusNext()
func (*FocusController) FocusPrev ¶
func (c *FocusController) FocusPrev()
func (*FocusController) Focusable ¶
func (c *FocusController) Focusable(ctrl Control) Focusable
func (*FocusController) NextChildFocusable ¶
func (c *FocusController) NextChildFocusable(p Container, after Control, forwards bool) Focusable
func (*FocusController) NextFocusable ¶
func (c *FocusController) NextFocusable(after Control, forwards bool) Focusable
func (*FocusController) SetFocus ¶
func (c *FocusController) SetFocus(f Focusable)
func (*FocusController) SetFocusCount ¶
func (c *FocusController) SetFocusCount() int
type Focusable ¶
type Focusable interface { Control IsFocusable() bool HasFocus() bool GainedFocus() LostFocus() OnGainedFocus(func()) EventSubscription OnLostFocus(func()) EventSubscription }
type HorizontalAlignment ¶
type HorizontalAlignment int
const ( AlignLeft HorizontalAlignment = iota AlignCenter AlignRight )
type Image ¶
type Image interface { Control Texture() Texture SetTexture(Texture) Polygon() (Polygon, Pen, Brush) SetPolygon(Polygon, Pen, Brush) BorderPen() Pen SetBorderPen(Pen) BackgroundBrush() Brush SetBackgroundBrush(Brush) ScalingMode() ScalingMode SetScalingMode(ScalingMode) SetExplicitSize(math.Size) AspectMode() AspectMode SetAspectMode(AspectMode) PixelAt(math.Point) (math.Point, bool) }
type KeyStrokeEvent ¶
type KeyStrokeEvent struct { Character rune Modifier KeyboardModifier }
type KeyboardController ¶
type KeyboardController struct {
// contains filtered or unexported fields
}
func CreateKeyboardController ¶
func CreateKeyboardController(w Window) *KeyboardController
type KeyboardEvent ¶
type KeyboardEvent struct { Key KeyboardKey Modifier KeyboardModifier }
type KeyboardKey ¶
type KeyboardKey int
const ( KeyUnknown KeyboardKey = iota KeySpace KeyApostrophe KeyComma KeyMinus KeyPeriod KeySlash Key0 Key1 Key2 Key3 Key4 Key5 Key6 Key7 Key8 Key9 KeySemicolon KeyEqual KeyA KeyB KeyC KeyD KeyE KeyF KeyG KeyH KeyI KeyJ KeyK KeyL KeyM KeyN KeyO KeyP KeyQ KeyR KeyS KeyT KeyU KeyV KeyW KeyX KeyY KeyZ KeyLeftBracket KeyBackslash KeyRightBracket KeyGraveAccent KeyWorld1 KeyWorld2 KeyEscape KeyEnter KeyTab KeyBackspace KeyInsert KeyDelete KeyRight KeyLeft KeyDown KeyUp KeyPageUp KeyPageDown KeyHome KeyEnd KeyCapsLock KeyScrollLock KeyNumLock KeyPrintScreen KeyPause KeyF1 KeyF2 KeyF3 KeyF4 KeyF5 KeyF6 KeyF7 KeyF8 KeyF9 KeyF10 KeyF11 KeyF12 KeyKp0 KeyKp1 KeyKp2 KeyKp3 KeyKp4 KeyKp5 KeyKp6 KeyKp7 KeyKp8 KeyKp9 KeyKpDecimal KeyKpDivide KeyKpMultiply KeyKpSubtract KeyKpAdd KeyKpEnter KeyKpEqual KeyLeftShift KeyLeftControl KeyLeftAlt KeyLeftSuper KeyRightShift KeyRightControl KeyRightAlt KeyRightSuper KeyMenu KeyLast )
type KeyboardModifier ¶
type KeyboardModifier int
const ( ModNone KeyboardModifier = 0 ModShift KeyboardModifier = 1 ModControl KeyboardModifier = 2 ModAlt KeyboardModifier = 4 ModSuper KeyboardModifier = 8 )
func (KeyboardModifier) Alt ¶
func (m KeyboardModifier) Alt() bool
func (KeyboardModifier) Control ¶
func (m KeyboardModifier) Control() bool
func (KeyboardModifier) Shift ¶
func (m KeyboardModifier) Shift() bool
func (KeyboardModifier) Super ¶
func (m KeyboardModifier) Super() bool
type Label ¶
type Label interface { Control Text() string SetText(string) Color() Color SetColor(Color) Multiline() bool SetMultiline(bool) SetHorizontalAlignment(HorizontalAlignment) HorizontalAlignment() HorizontalAlignment SetVerticalAlignment(VerticalAlignment) VerticalAlignment() VerticalAlignment }
type LinearLayout ¶
type LinearLayout interface { Control Container Orientation() Orientation SetOrientation(Orientation) HorizontalAlignment() HorizontalAlignment SetHorizontalAlignment(HorizontalAlignment) VerticalAlignment() VerticalAlignment SetVerticalAlignment(VerticalAlignment) BorderPen() Pen SetBorderPen(Pen) BackgroundBrush() Brush SetBackgroundBrush(Brush) }
type List ¶
type List interface { Focusable Parent Adapter() Adapter SetAdapter(Adapter) SetOrientation(Orientation) Orientation() Orientation BorderPen() Pen SetBorderPen(Pen) BackgroundBrush() Brush SetBackgroundBrush(Brush) ScrollTo(AdapterItemId) IsItemVisible(AdapterItemId) bool Item(AdapterItemId) Control Selected() AdapterItemId Select(AdapterItemId) OnSelectionChanged(func(AdapterItemId)) EventSubscription OnItemClicked(func(MouseEvent, AdapterItemId)) EventSubscription }
type MouseButton ¶
type MouseButton int
const ( MouseButtonLeft MouseButton = iota MouseButtonMiddle MouseButtonRight )
type MouseController ¶
type MouseController struct {
// contains filtered or unexported fields
}
func CreateMouseController ¶
func CreateMouseController(w Window, focusController *FocusController) *MouseController
type MouseEvent ¶
type MouseEvent struct { Button MouseButton Point math.Point // Local to the event receiver WindowPoint math.Point Window Window ScrollX, ScrollY int Modifier KeyboardModifier }
type Orientation ¶
type Orientation int
const ( Vertical Orientation = iota Horizontal )
func (Orientation) Flip ¶
func (o Orientation) Flip() Orientation
func (Orientation) Horizontal ¶
func (o Orientation) Horizontal() bool
func (Orientation) Major ¶
func (o Orientation) Major(x, y int) int
func (Orientation) Minor ¶
func (o Orientation) Minor(x, y int) int
func (Orientation) Vertical ¶
func (o Orientation) Vertical() bool
type PanelHolder ¶
type ParentPoint ¶
type Pen ¶
var TransparentPen Pen = CreatePen(0.0, Transparent)
type Polygon ¶
type Polygon []PolygonVertex
type PolygonVertex ¶
type ProgressBar ¶
type ScalingMode ¶
type ScalingMode int
const ( Scaling1to1 ScalingMode = iota ScalingExpandGreedy ScalingExplicitSize )
type ScrollBar ¶
type ScrollBar interface { Control OnScroll(func(from, to int)) EventSubscription ScrollPosition() (from, to int) SetScrollPosition(from, to int) ScrollLimit() int SetScrollLimit(l int) AutoHide() bool SetAutoHide(l bool) Orientation() Orientation SetOrientation(Orientation) }
type ScrollLayout ¶
type SelectionTransform ¶
type SimpleEvent ¶
type SimpleEvent struct {
EventBase
}
type SplitterLayout ¶
type SplitterLayout interface { Control Container ChildWeight(Control) float32 SetChildWeight(Control, float32) Orientation() Orientation SetOrientation(Orientation) }
type TextBox ¶
type TextBox interface { Focusable OnSelectionChanged(func()) EventSubscription OnTextChanged(func([]TextBoxEdit)) EventSubscription Padding() math.Spacing SetPadding(math.Spacing) Runes() []rune Text() string SetText(string) Font() Font SetFont(Font) Multiline() bool SetMultiline(bool) DesiredWidth() int SetDesiredWidth(desiredWidth int) TextColor() Color SetTextColor(Color) Select(TextSelectionList) SelectAll() Carets() []int RuneIndexAt(p math.Point) (idx int, found bool) TextAt(s, e int) string WordAt(runeIndex int) string ScrollToLine(int) ScrollToRune(int) LineIndex(runeIndex int) int LineStart(line int) int LineEnd(line int) int }
type TextBoxController ¶
type TextBoxController struct {
// contains filtered or unexported fields
}
func CreateTextBoxController ¶
func CreateTextBoxController() *TextBoxController
func (*TextBoxController) AddCaret ¶
func (t *TextBoxController) AddCaret(c int)
func (*TextBoxController) AddCarets ¶
func (t *TextBoxController) AddCarets(transform SelectionTransform)
func (*TextBoxController) AddCaretsDown ¶
func (t *TextBoxController) AddCaretsDown()
func (*TextBoxController) AddCaretsUp ¶
func (t *TextBoxController) AddCaretsUp()
func (*TextBoxController) AddSelection ¶
func (t *TextBoxController) AddSelection(s TextSelection)
func (*TextBoxController) Backspace ¶
func (t *TextBoxController) Backspace()
func (*TextBoxController) Caret ¶
func (t *TextBoxController) Caret(i int) int
func (*TextBoxController) Carets ¶
func (t *TextBoxController) Carets() []int
func (*TextBoxController) ClearSelections ¶
func (t *TextBoxController) ClearSelections()
func (*TextBoxController) Delete ¶
func (t *TextBoxController) Delete()
func (*TextBoxController) Deselect ¶
func (t *TextBoxController) Deselect(moveCaretToStart bool) (deselected bool)
func (*TextBoxController) FirstCaret ¶
func (t *TextBoxController) FirstCaret() int
func (*TextBoxController) FirstSelection ¶
func (t *TextBoxController) FirstSelection() TextSelection
func (*TextBoxController) GrowSelections ¶
func (t *TextBoxController) GrowSelections(transform SelectionTransform)
func (*TextBoxController) IndentSelection ¶
func (t *TextBoxController) IndentSelection(tabWidth int)
func (*TextBoxController) IndexDown ¶
func (t *TextBoxController) IndexDown(i int) int
func (*TextBoxController) IndexEnd ¶
func (t *TextBoxController) IndexEnd(i int) int
func (*TextBoxController) IndexFirst ¶
func (t *TextBoxController) IndexFirst(i int) int
func (*TextBoxController) IndexHome ¶
func (t *TextBoxController) IndexHome(i int) int
func (*TextBoxController) IndexLast ¶
func (t *TextBoxController) IndexLast(i int) int
func (*TextBoxController) IndexLeft ¶
func (t *TextBoxController) IndexLeft(i int) int
func (*TextBoxController) IndexRight ¶
func (t *TextBoxController) IndexRight(i int) int
func (*TextBoxController) IndexUp ¶
func (t *TextBoxController) IndexUp(i int) int
func (*TextBoxController) IndexWordLeft ¶
func (t *TextBoxController) IndexWordLeft(i int) int
func (*TextBoxController) IndexWordRight ¶
func (t *TextBoxController) IndexWordRight(i int) int
func (*TextBoxController) LastCaret ¶
func (t *TextBoxController) LastCaret() int
func (*TextBoxController) LastSelection ¶
func (t *TextBoxController) LastSelection() TextSelection
func (*TextBoxController) Line ¶
func (t *TextBoxController) Line(i int) string
func (*TextBoxController) LineAndRow ¶
func (t *TextBoxController) LineAndRow(index int) (line, row int)
func (*TextBoxController) LineCount ¶
func (t *TextBoxController) LineCount() int
func (*TextBoxController) LineEnd ¶
func (t *TextBoxController) LineEnd(i int) int
func (*TextBoxController) LineIndent ¶
func (t *TextBoxController) LineIndent(i int) int
func (*TextBoxController) LineIndex ¶
func (t *TextBoxController) LineIndex(p int) int
func (*TextBoxController) LineRunes ¶
func (t *TextBoxController) LineRunes(i int) []rune
func (*TextBoxController) LineStart ¶
func (t *TextBoxController) LineStart(i int) int
func (*TextBoxController) MoveDown ¶
func (t *TextBoxController) MoveDown()
func (*TextBoxController) MoveEnd ¶
func (t *TextBoxController) MoveEnd()
func (*TextBoxController) MoveFirst ¶
func (t *TextBoxController) MoveFirst()
func (*TextBoxController) MoveHome ¶
func (t *TextBoxController) MoveHome()
func (*TextBoxController) MoveLast ¶
func (t *TextBoxController) MoveLast()
func (*TextBoxController) MoveLeft ¶
func (t *TextBoxController) MoveLeft()
func (*TextBoxController) MoveLeftByWord ¶
func (t *TextBoxController) MoveLeftByWord()
func (*TextBoxController) MoveRight ¶
func (t *TextBoxController) MoveRight()
func (*TextBoxController) MoveRightByWord ¶
func (t *TextBoxController) MoveRightByWord()
func (*TextBoxController) MoveSelections ¶
func (t *TextBoxController) MoveSelections(transform SelectionTransform)
func (*TextBoxController) MoveUp ¶
func (t *TextBoxController) MoveUp()
func (*TextBoxController) OnSelectionChanged ¶
func (t *TextBoxController) OnSelectionChanged(f func()) EventSubscription
func (*TextBoxController) OnTextChanged ¶
func (t *TextBoxController) OnTextChanged(f func([]TextBoxEdit)) EventSubscription
func (*TextBoxController) Replace ¶
func (t *TextBoxController) Replace(f func(sel TextSelection) string)
func (*TextBoxController) ReplaceAll ¶
func (t *TextBoxController) ReplaceAll(str string)
func (*TextBoxController) ReplaceAllRunes ¶
func (t *TextBoxController) ReplaceAllRunes(str []rune)
func (*TextBoxController) ReplaceAt ¶
func (t *TextBoxController) ReplaceAt(text []rune, s, e int, replacement []rune) ([]rune, TextBoxEdit)
func (*TextBoxController) ReplaceRunes ¶
func (t *TextBoxController) ReplaceRunes(f func(sel TextSelection) []rune)
func (*TextBoxController) ReplaceWithNewline ¶
func (t *TextBoxController) ReplaceWithNewline()
func (*TextBoxController) ReplaceWithNewlineKeepIndent ¶
func (t *TextBoxController) ReplaceWithNewlineKeepIndent()
func (*TextBoxController) RestoreNextSelections ¶
func (t *TextBoxController) RestoreNextSelections()
func (*TextBoxController) RestorePreviousSelections ¶
func (t *TextBoxController) RestorePreviousSelections()
func (*TextBoxController) RuneInWord ¶
func (t *TextBoxController) RuneInWord(r rune) bool
func (*TextBoxController) SelectAll ¶
func (t *TextBoxController) SelectAll()
func (*TextBoxController) SelectDown ¶
func (t *TextBoxController) SelectDown()
func (*TextBoxController) SelectEnd ¶
func (t *TextBoxController) SelectEnd()
func (*TextBoxController) SelectFirst ¶
func (t *TextBoxController) SelectFirst()
func (*TextBoxController) SelectHome ¶
func (t *TextBoxController) SelectHome()
func (*TextBoxController) SelectLast ¶
func (t *TextBoxController) SelectLast()
func (*TextBoxController) SelectLeft ¶
func (t *TextBoxController) SelectLeft()
func (*TextBoxController) SelectLeftByWord ¶
func (t *TextBoxController) SelectLeftByWord()
func (*TextBoxController) SelectRight ¶
func (t *TextBoxController) SelectRight()
func (*TextBoxController) SelectRightByWord ¶
func (t *TextBoxController) SelectRightByWord()
func (*TextBoxController) SelectUp ¶
func (t *TextBoxController) SelectUp()
func (*TextBoxController) Selection ¶
func (t *TextBoxController) Selection(i int) TextSelection
func (*TextBoxController) SelectionCount ¶
func (t *TextBoxController) SelectionCount() int
func (*TextBoxController) SelectionLineText ¶
func (t *TextBoxController) SelectionLineText(i int) string
func (*TextBoxController) SelectionText ¶
func (t *TextBoxController) SelectionText(i int) string
func (*TextBoxController) Selections ¶
func (t *TextBoxController) Selections() TextSelectionList
func (*TextBoxController) SetCaret ¶
func (t *TextBoxController) SetCaret(c int)
func (*TextBoxController) SetSelection ¶
func (t *TextBoxController) SetSelection(s TextSelection)
func (*TextBoxController) SetSelections ¶
func (t *TextBoxController) SetSelections(s TextSelectionList)
func (*TextBoxController) SetText ¶
func (t *TextBoxController) SetText(str string)
func (*TextBoxController) SetTextEdits ¶
func (t *TextBoxController) SetTextEdits(text []rune, edits []TextBoxEdit)
func (*TextBoxController) SetTextRunes ¶
func (t *TextBoxController) SetTextRunes(text []rune)
func (*TextBoxController) StoreCaretLocations ¶
func (t *TextBoxController) StoreCaretLocations()
func (*TextBoxController) Text ¶
func (t *TextBoxController) Text() string
func (*TextBoxController) TextRange ¶
func (t *TextBoxController) TextRange(s, e int) string
func (*TextBoxController) TextRunes ¶
func (t *TextBoxController) TextRunes() []rune
func (*TextBoxController) UnindentSelection ¶
func (t *TextBoxController) UnindentSelection(tabWidth int)
func (*TextBoxController) WordAt ¶
func (t *TextBoxController) WordAt(runeIdx int) (s, e int)
type TextBoxEdit ¶
type TextSelection ¶
type TextSelection struct {
// contains filtered or unexported fields
}
func CreateTextSelection ¶
func CreateTextSelection(start, end int, caretAtStart bool) TextSelection
func (TextSelection) Caret ¶
func (i TextSelection) Caret() int
func (TextSelection) CaretAtStart ¶
func (i TextSelection) CaretAtStart() bool
func (TextSelection) End ¶
func (i TextSelection) End() int
func (TextSelection) First ¶
func (i TextSelection) First() int
func (TextSelection) From ¶
func (i TextSelection) From() int
func (TextSelection) Last ¶
func (i TextSelection) Last() int
func (TextSelection) Length ¶
func (i TextSelection) Length() int
func (TextSelection) Offset ¶
func (t TextSelection) Offset(i int) TextSelection
func (TextSelection) Range ¶
func (i TextSelection) Range() (start, end int)
func (TextSelection) Span ¶
func (i TextSelection) Span() (start, end uint64)
func (TextSelection) Start ¶
func (i TextSelection) Start() int
type TextSelectionList ¶
type TextSelectionList []TextSelection
func (TextSelectionList) Cap ¶
func (l TextSelectionList) Cap() int
func (TextSelectionList) Copy ¶
func (l TextSelectionList) Copy(to, from, count int)
func (TextSelectionList) GetInterval ¶
func (l TextSelectionList) GetInterval(index int) (start, end uint64)
func (*TextSelectionList) GrowTo ¶
func (l *TextSelectionList) GrowTo(length, capacity int)
func (TextSelectionList) Len ¶
func (l TextSelectionList) Len() int
func (TextSelectionList) MergeData ¶
func (l TextSelectionList) MergeData(index int, i interval.Node)
func (TextSelectionList) SetInterval ¶
func (l TextSelectionList) SetInterval(index int, start, end uint64)
func (*TextSelectionList) SetLen ¶
func (l *TextSelectionList) SetLen(len int)
func (TextSelectionList) Transform ¶
func (l TextSelectionList) Transform(from int, transform func(i int) int) TextSelectionList
func (TextSelectionList) TransformCarets ¶
func (l TextSelectionList) TransformCarets(from int, transform func(i int) int) TextSelectionList
type Theme ¶
type Theme interface { Driver() Driver DefaultFont() Font SetDefaultFont(Font) CreateBubbleOverlay() BubbleOverlay CreateButton() Button CreateCodeEditor() CodeEditor CreateDropDownList() DropDownList CreateImage() Image CreateLabel() Label CreateLinearLayout() LinearLayout CreateList() List CreatePanelHolder() PanelHolder CreateProgressBar() ProgressBar CreateScrollBar() ScrollBar CreateScrollLayout() ScrollLayout CreateSplitterLayout() SplitterLayout CreateTextBox() TextBox CreateTree() Tree CreateWindow(width, height int, title string) Window }
type ToolTipController ¶
type ToolTipController struct {
// contains filtered or unexported fields
}
func CreateToolTipController ¶
func CreateToolTipController(bubbleOverlay BubbleOverlay, driver Driver) *ToolTipController
func (*ToolTipController) AddToolTip ¶
func (c *ToolTipController) AddToolTip(control Control, delaySeconds float32, creator ToolTipCreator)
func (*ToolTipController) ShowToolTip ¶
func (c *ToolTipController) ShowToolTip(toolTip Control, at math.Point)
type ToolTipCreator ¶
type Tree ¶
type Tree interface { Focusable SetAdapter(TreeAdapter) Adapter() TreeAdapter // Show makes the item with the specified id visible, expanding the tree if // necessary. Show(AdapterItemId) // ExpandAll expands all tree nodes. ExpandAll() // CollapseAll collapses all tree nodes. CollapseAll() Selected() AdapterItemId Select(AdapterItemId) OnSelectionChanged(func(AdapterItemId)) EventSubscription }
type TreeAdapter ¶
type TreeAdapter interface { TreeAdapterNode ItemSize(theme Theme) math.Size OnDataChanged(func()) EventSubscription OnDataReplaced(func()) EventSubscription }
type TreeAdapterNode ¶
type TreeAdapterNode interface { Count() int ItemId(index int) AdapterItemId ItemIndex(id AdapterItemId) int Create(theme Theme, index int) Control CreateNode(index int) TreeAdapterNode }
type VerticalAlignment ¶
type VerticalAlignment int
const ( AlignTop VerticalAlignment = iota AlignMiddle AlignBottom )
type Viewport ¶
type Viewport interface { SizeDips() math.Size SizePixels() math.Size Title() string SetTitle(string) Show() Hide() Close() SetCanvas(Canvas) OnClose(func()) EventSubscription OnResize(func()) EventSubscription OnMouseMove(func(MouseEvent)) EventSubscription OnMouseEnter(func(MouseEvent)) EventSubscription OnMouseExit(func(MouseEvent)) EventSubscription OnMouseDown(func(MouseEvent)) EventSubscription OnMouseUp(func(MouseEvent)) EventSubscription OnMouseScroll(func(MouseEvent)) EventSubscription OnKeyDown(func(KeyboardEvent)) EventSubscription OnKeyUp(func(KeyboardEvent)) EventSubscription OnKeyRepeat(func(KeyboardEvent)) EventSubscription OnKeyStroke(func(KeyStrokeEvent)) EventSubscription }
type Window ¶
type Window interface { Container Viewport() Viewport Title() string SetTitle(string) Show() Hide() Close() Focus() Focusable SetFocus(Control) bool Click(MouseEvent) DoubleClick(MouseEvent) KeyPress(KeyboardEvent) KeyStroke(KeyStrokeEvent) // Events OnClose(func()) EventSubscription OnResize(func()) EventSubscription OnMouseMove(func(MouseEvent)) EventSubscription OnMouseEnter(func(MouseEvent)) EventSubscription OnMouseExit(func(MouseEvent)) EventSubscription OnMouseDown(func(MouseEvent)) EventSubscription OnMouseUp(func(MouseEvent)) EventSubscription OnMouseScroll(func(MouseEvent)) EventSubscription OnKeyDown(func(KeyboardEvent)) EventSubscription OnKeyUp(func(KeyboardEvent)) EventSubscription OnKeyRepeat(func(KeyboardEvent)) EventSubscription OnKeyStroke(func(KeyStrokeEvent)) EventSubscription }
func WindowContaining ¶
Source Files ¶
- adapter.go
- adapter_base.go
- alignment.go
- brush.go
- bubble_overlay.go
- button.go
- canvas.go
- channeled_event.go
- code_editor.go
- code_syntax_layer.go
- color.go
- container.go
- control.go
- control_list.go
- debug.go
- default_adapter.go
- driver.go
- drop_down_list.go
- event.go
- event_base.go
- event_loop.go
- filtered_list_adapter.go
- focus_controller.go
- focusable.go
- font.go
- image.go
- keyboard_controller.go
- keyboard_event.go
- keyboard_key.go
- keyboard_modifier.go
- keystroke_event.go
- label.go
- linear_layout.go
- list.go
- mouse_button.go
- mouse_controller.go
- mouse_event.go
- orientation.go
- panel_holder.go
- pen.go
- polygon.go
- progress_bar.go
- scroll_bar.go
- scroll_layout.go
- simple_event.go
- splitter_layout.go
- text_selection.go
- text_selection_list.go
- textbox.go
- textbox_controller.go
- texture.go
- theme.go
- tooltip_controller.go
- tree.go
- tree_adapter.go
- utils.go
- viewport.go
- window.go
Click to show internal directories.
Click to hide internal directories.