mixins

package
v0.0.0-...-c6be5d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2015 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BubbleOverlay

type BubbleOverlay struct {
	base.Container
	// contains filtered or unexported fields
}

func (*BubbleOverlay) Brush

func (o *BubbleOverlay) Brush() gxui.Brush

func (*BubbleOverlay) DesiredSize

func (o *BubbleOverlay) DesiredSize(min, max math.Size) math.Size

func (*BubbleOverlay) Hide

func (o *BubbleOverlay) Hide()

func (*BubbleOverlay) Init

func (o *BubbleOverlay) Init(outer BubbleOverlayOuter, theme gxui.Theme)

func (*BubbleOverlay) LayoutChildren

func (o *BubbleOverlay) LayoutChildren()

func (*BubbleOverlay) Paint

func (o *BubbleOverlay) Paint(c gxui.Canvas)

func (*BubbleOverlay) Pen

func (o *BubbleOverlay) Pen() gxui.Pen

func (*BubbleOverlay) SetBrush

func (o *BubbleOverlay) SetBrush(brush gxui.Brush)

func (*BubbleOverlay) SetPen

func (o *BubbleOverlay) SetPen(pen gxui.Pen)

func (*BubbleOverlay) Show

func (o *BubbleOverlay) Show(control gxui.Control, target math.Point)

type BubbleOverlayOuter

type BubbleOverlayOuter interface {
	base.ContainerOuter
}

type Button

type Button struct {
	LinearLayout
	parts.Focusable
	// contains filtered or unexported fields
}

func (*Button) Click

func (b *Button) Click(ev gxui.MouseEvent) (consume bool)

InputEventHandler override

func (*Button) Init

func (b *Button) Init(outer ButtonOuter, theme gxui.Theme)

func (*Button) IsChecked

func (b *Button) IsChecked() bool

func (*Button) KeyPress

func (b *Button) KeyPress(ev gxui.KeyboardEvent) (consume bool)

func (*Button) Label

func (b *Button) Label() gxui.Label

func (*Button) SetChecked

func (b *Button) SetChecked(checked bool)

func (*Button) SetText

func (b *Button) SetText(text string)

func (*Button) SetType

func (b *Button) SetType(buttonType gxui.ButtonType)

func (*Button) Text

func (b *Button) Text() string

func (*Button) Type

func (b *Button) Type() gxui.ButtonType

type ButtonOuter

type ButtonOuter interface {
	LinearLayoutOuter
	IsChecked() bool
	SetChecked(bool)
}

type CodeEditor

type CodeEditor struct {
	TextBox
	// contains filtered or unexported fields
}

func (*CodeEditor) Click

func (t *CodeEditor) Click(ev gxui.MouseEvent) (consume bool)

mixins.List overrides

func (*CodeEditor) CreateLine

func (t *CodeEditor) CreateLine(theme gxui.Theme, index int) (TextBoxLine, gxui.Control)

mixins.TextBox overrides

func (*CodeEditor) CreateSuggestionList

func (t *CodeEditor) CreateSuggestionList() gxui.List

func (*CodeEditor) HideSuggestionList

func (t *CodeEditor) HideSuggestionList()

func (*CodeEditor) Init

func (t *CodeEditor) Init(outer CodeEditorOuter, driver gxui.Driver, theme gxui.Theme, font gxui.Font)

func (*CodeEditor) IsSuggestionListShowing

func (t *CodeEditor) IsSuggestionListShowing() bool

func (*CodeEditor) ItemSize

func (t *CodeEditor) ItemSize(theme gxui.Theme) math.Size

func (*CodeEditor) KeyPress

func (t *CodeEditor) KeyPress(ev gxui.KeyboardEvent) (consume bool)

func (*CodeEditor) KeyStroke

func (t *CodeEditor) KeyStroke(ev gxui.KeyStrokeEvent) (consume bool)

func (*CodeEditor) Line

func (t *CodeEditor) Line(idx int) TextBoxLine

func (*CodeEditor) SetSuggestionProvider

func (t *CodeEditor) SetSuggestionProvider(provider gxui.CodeSuggestionProvider)

func (*CodeEditor) SetSyntaxLayers

func (t *CodeEditor) SetSyntaxLayers(layers gxui.CodeSyntaxLayers)

func (*CodeEditor) SetTabWidth

func (t *CodeEditor) SetTabWidth(tabWidth int)

func (*CodeEditor) ShowSuggestionList

func (t *CodeEditor) ShowSuggestionList()

func (*CodeEditor) SortSuggestionList

func (t *CodeEditor) SortSuggestionList()

func (*CodeEditor) SuggestionProvider

func (t *CodeEditor) SuggestionProvider() gxui.CodeSuggestionProvider

func (*CodeEditor) SyntaxLayers

func (t *CodeEditor) SyntaxLayers() gxui.CodeSyntaxLayers

func (*CodeEditor) TabWidth

func (t *CodeEditor) TabWidth() int

type CodeEditorLine

type CodeEditorLine struct {
	DefaultTextBoxLine
	// contains filtered or unexported fields
}

CodeEditorLine

func (*CodeEditorLine) Init

func (l *CodeEditorLine) Init(outer CodeEditorLineOuter, theme gxui.Theme, ce *CodeEditor, lineIndex int)

func (*CodeEditorLine) Paint

func (t *CodeEditorLine) Paint(c gxui.Canvas)

DefaultTextBoxLine overrides

func (*CodeEditorLine) PaintBackgroundSpans

func (t *CodeEditorLine) PaintBackgroundSpans(c gxui.Canvas, info CodeEditorLinePaintInfo)

func (*CodeEditorLine) PaintBorders

func (t *CodeEditorLine) PaintBorders(c gxui.Canvas, info CodeEditorLinePaintInfo)

func (*CodeEditorLine) PaintGlyphs

func (t *CodeEditorLine) PaintGlyphs(c gxui.Canvas, info CodeEditorLinePaintInfo)

type CodeEditorLineOuter

type CodeEditorLineOuter interface {
	DefaultTextBoxLineOuter
	PaintBackgroundSpans(c gxui.Canvas, info CodeEditorLinePaintInfo)
	PaintGlyphs(c gxui.Canvas, info CodeEditorLinePaintInfo)
	PaintBorders(c gxui.Canvas, info CodeEditorLinePaintInfo)
}

type CodeEditorLinePaintInfo

type CodeEditorLinePaintInfo struct {
	LineSpan     interval.IntData
	Runes        []rune
	GlyphOffsets []math.Point
	GlyphWidth   int
	LineHeight   int
	Font         gxui.Font
}

type CodeEditorOuter

type CodeEditorOuter interface {
	TextBoxOuter
	CreateSuggestionList() gxui.List
}

type CreateExpandButton

type CreateExpandButton func(theme gxui.Theme, node *TreeInternalNode) gxui.Button

type DefaultTextBoxLine

type DefaultTextBoxLine struct {
	base.Control
	// contains filtered or unexported fields
}

DefaultTextBoxLine

func (*DefaultTextBoxLine) DesiredSize

func (t *DefaultTextBoxLine) DesiredSize(min, max math.Size) math.Size

func (*DefaultTextBoxLine) Init

func (t *DefaultTextBoxLine) Init(outer DefaultTextBoxLineOuter, theme gxui.Theme, textbox *TextBox, lineIndex int)

func (*DefaultTextBoxLine) MeasureRunes

func (t *DefaultTextBoxLine) MeasureRunes(s, e int) math.Size

func (*DefaultTextBoxLine) Paint

func (t *DefaultTextBoxLine) Paint(c gxui.Canvas)

func (*DefaultTextBoxLine) PaintCaret

func (t *DefaultTextBoxLine) PaintCaret(c gxui.Canvas, top, bottom math.Point)

func (*DefaultTextBoxLine) PaintCarets

func (t *DefaultTextBoxLine) PaintCarets(c gxui.Canvas)

func (*DefaultTextBoxLine) PaintSelection

func (t *DefaultTextBoxLine) PaintSelection(c gxui.Canvas, top, bottom math.Point)

func (*DefaultTextBoxLine) PaintSelections

func (t *DefaultTextBoxLine) PaintSelections(c gxui.Canvas)

func (*DefaultTextBoxLine) PaintText

func (t *DefaultTextBoxLine) PaintText(c gxui.Canvas)

func (*DefaultTextBoxLine) PositionAt

func (t *DefaultTextBoxLine) PositionAt(runeIndex int) math.Point

func (*DefaultTextBoxLine) RuneIndexAt

func (t *DefaultTextBoxLine) RuneIndexAt(p math.Point) int

TextBoxLine compliance

func (*DefaultTextBoxLine) SetCaretWidth

func (t *DefaultTextBoxLine) SetCaretWidth(width int)

type DefaultTextBoxLineOuter

type DefaultTextBoxLineOuter interface {
	base.ControlOuter
	MeasureRunes(s, e int) math.Size
	PaintText(c gxui.Canvas)
	PaintCarets(c gxui.Canvas)
	PaintCaret(c gxui.Canvas, top, bottom math.Point)
	PaintSelections(c gxui.Canvas)
	PaintSelection(c gxui.Canvas, top, bottom math.Point)
}
type DropDownList struct {
	base.Container
	parts.BackgroundBorderPainter
	parts.Focusable
	// contains filtered or unexported fields
}
func (l *DropDownList) Adapter() gxui.ListAdapter
func (l *DropDownList) BubbleOverlay() gxui.BubbleOverlay
func (l *DropDownList) Click(ev gxui.MouseEvent) (consume bool)

InputEventHandler override

func (l *DropDownList) DataReplaced()
func (l *DropDownList) DesiredSize(min, max math.Size) math.Size
func (l *DropDownList) HideList()
func (l *DropDownList) Init(outer DropDownListOuter, theme gxui.Theme)
func (l *DropDownList) KeyPress(ev gxui.KeyboardEvent) (consume bool)

InputEventHandler overrides

func (l *DropDownList) LayoutChildren()
func (l *DropDownList) List() gxui.List
func (l *DropDownList) ListShowing() bool
func (l *DropDownList) OnHideList(f func()) gxui.EventSubscription
func (l *DropDownList) OnSelectionChanged(f func(gxui.AdapterItem)) gxui.EventSubscription
func (l *DropDownList) OnShowList(f func()) gxui.EventSubscription
func (l *DropDownList) Paint(c gxui.Canvas)

parts.Container overrides

func (l *DropDownList) Select(item gxui.AdapterItem)
func (l *DropDownList) Selected() gxui.AdapterItem
func (l *DropDownList) SetAdapter(adapter gxui.ListAdapter)
func (l *DropDownList) SetBubbleOverlay(overlay gxui.BubbleOverlay)

gxui.DropDownList compliance

func (l *DropDownList) ShowList() bool
type DropDownListOuter interface {
	base.ContainerOuter
}

type Image

type Image struct {
	base.Control
	parts.BackgroundBorderPainter
	// contains filtered or unexported fields
}

func (*Image) AspectMode

func (i *Image) AspectMode() gxui.AspectMode

func (*Image) Canvas

func (i *Image) Canvas() gxui.Canvas

func (*Image) DesiredSize

func (i *Image) DesiredSize(min, max math.Size) math.Size

func (*Image) Init

func (i *Image) Init(outer ImageOuter, theme gxui.Theme)

func (*Image) Paint

func (i *Image) Paint(c gxui.Canvas)

func (*Image) PixelAt

func (i *Image) PixelAt(p math.Point) (math.Point, bool)

func (*Image) ScalingMode

func (i *Image) ScalingMode() gxui.ScalingMode

func (*Image) SetAspectMode

func (i *Image) SetAspectMode(mode gxui.AspectMode)

func (*Image) SetCanvas

func (i *Image) SetCanvas(canvas gxui.Canvas)

func (*Image) SetExplicitSize

func (i *Image) SetExplicitSize(explicitSize math.Size)

func (*Image) SetScalingMode

func (i *Image) SetScalingMode(mode gxui.ScalingMode)

func (*Image) SetTexture

func (i *Image) SetTexture(tex gxui.Texture)

func (*Image) Texture

func (i *Image) Texture() gxui.Texture

type ImageOuter

type ImageOuter interface {
	base.ControlOuter
}

type Label

type Label struct {
	base.Control
	// contains filtered or unexported fields
}

func (*Label) Color

func (l *Label) Color() gxui.Color

func (*Label) DesiredSize

func (l *Label) DesiredSize(min, max math.Size) math.Size

func (*Label) Font

func (l *Label) Font() gxui.Font

func (*Label) HorizontalAlignment

func (l *Label) HorizontalAlignment() gxui.HorizontalAlignment

func (*Label) Init

func (l *Label) Init(outer LabelOuter, theme gxui.Theme, font gxui.Font, color gxui.Color)

func (*Label) Multiline

func (l *Label) Multiline() bool

func (*Label) Paint

func (l *Label) Paint(c gxui.Canvas)

parts.DrawPaint overrides

func (*Label) SetColor

func (l *Label) SetColor(color gxui.Color)

func (*Label) SetFont

func (l *Label) SetFont(font gxui.Font)

func (*Label) SetHorizontalAlignment

func (l *Label) SetHorizontalAlignment(horizontalAlignment gxui.HorizontalAlignment)

func (*Label) SetMultiline

func (l *Label) SetMultiline(multiline bool)

func (*Label) SetText

func (l *Label) SetText(text string)

func (*Label) SetVerticalAlignment

func (l *Label) SetVerticalAlignment(verticalAlignment gxui.VerticalAlignment)

func (*Label) Text

func (l *Label) Text() string

func (*Label) VerticalAlignment

func (l *Label) VerticalAlignment() gxui.VerticalAlignment

type LabelOuter

type LabelOuter interface {
	base.ControlOuter
}

type LinearLayout

func (*LinearLayout) Init

func (l *LinearLayout) Init(outer LinearLayoutOuter, theme gxui.Theme)

func (*LinearLayout) Paint

func (l *LinearLayout) Paint(c gxui.Canvas)

type LinearLayoutOuter

type LinearLayoutOuter interface {
	base.ContainerOuter
}

type List

type List struct {
	base.Container
	parts.BackgroundBorderPainter
	parts.Focusable
	// contains filtered or unexported fields
}

func (*List) Adapter

func (l *List) Adapter() gxui.ListAdapter

gxui.List compliance

func (*List) ContainsItem

func (l *List) ContainsItem(item gxui.AdapterItem) bool

func (*List) DataChanged

func (l *List) DataChanged()

func (*List) DataReplaced

func (l *List) DataReplaced()

func (*List) DesiredSize

func (l *List) DesiredSize(min, max math.Size) math.Size

func (*List) Init

func (l *List) Init(outer ListOuter, theme gxui.Theme)

func (*List) IsItemVisible

func (l *List) IsItemVisible(item gxui.AdapterItem) bool

func (*List) ItemClicked

func (l *List) ItemClicked(ev gxui.MouseEvent, item gxui.AdapterItem)

func (*List) ItemControl

func (l *List) ItemControl(item gxui.AdapterItem) gxui.Control

func (*List) KeyPress

func (l *List) KeyPress(ev gxui.KeyboardEvent) (consume bool)

func (*List) LayoutChildren

func (l *List) LayoutChildren()

func (*List) MajorAxisItemSize

func (l *List) MajorAxisItemSize() int

func (*List) MouseExit

func (l *List) MouseExit(ev gxui.MouseEvent)

func (*List) MouseMove

func (l *List) MouseMove(ev gxui.MouseEvent)

InputEventHandler override

func (*List) MouseScroll

func (l *List) MouseScroll(ev gxui.MouseEvent) (consume bool)

func (*List) OnItemClicked

func (l *List) OnItemClicked(f func(gxui.MouseEvent, gxui.AdapterItem)) gxui.EventSubscription

func (*List) OnSelectionChanged

func (l *List) OnSelectionChanged(f func(gxui.AdapterItem)) gxui.EventSubscription

func (*List) Orientation

func (l *List) Orientation() gxui.Orientation

func (*List) Paint

func (l *List) Paint(c gxui.Canvas)

func (*List) PaintChild

func (l *List) PaintChild(c gxui.Canvas, child *gxui.Child, idx int)

PaintChildren overrides

func (*List) PaintMouseOverBackground

func (l *List) PaintMouseOverBackground(c gxui.Canvas, r math.Rect)

func (*List) PaintSelection

func (l *List) PaintSelection(c gxui.Canvas, r math.Rect)

func (*List) RemoveAll

func (l *List) RemoveAll()

func (*List) ScrollBarEnabled

func (l *List) ScrollBarEnabled(bool) bool

func (*List) ScrollTo

func (l *List) ScrollTo(item gxui.AdapterItem)

func (*List) Select

func (l *List) Select(item gxui.AdapterItem) bool

func (*List) SelectNext

func (l *List) SelectNext()

func (*List) SelectPrevious

func (l *List) SelectPrevious()

func (*List) Selected

func (l *List) Selected() gxui.AdapterItem

func (*List) SetAdapter

func (l *List) SetAdapter(adapter gxui.ListAdapter)

func (*List) SetOrientation

func (l *List) SetOrientation(o gxui.Orientation)

func (*List) SetScrollBarEnabled

func (l *List) SetScrollBarEnabled(enabled bool)

func (*List) SetScrollOffset

func (l *List) SetScrollOffset(scrollOffset int)

func (*List) SetSize

func (l *List) SetSize(size math.Size)

func (*List) SizeChanged

func (l *List) SizeChanged()

func (*List) UpdateItemMouseOver

func (l *List) UpdateItemMouseOver()

func (*List) VisibleItemRange

func (l *List) VisibleItemRange(includePartiallyVisible bool) (startIndex, endIndex int)

type ListOuter

type ListOuter interface {
	base.ContainerOuter
	ContainsItem(gxui.AdapterItem) bool
	PaintBackground(c gxui.Canvas, r math.Rect)
	PaintMouseOverBackground(c gxui.Canvas, r math.Rect)
	PaintSelection(c gxui.Canvas, r math.Rect)
	PaintBorder(c gxui.Canvas, r math.Rect)
}

type PanelEntry

type PanelEntry struct {
	Tab                   PanelTab
	Panel                 gxui.Control
	MouseDownSubscription gxui.EventSubscription
}

type PanelHolder

type PanelHolder struct {
	base.Container
	// contains filtered or unexported fields
}

func (*PanelHolder) AddPanel

func (p *PanelHolder) AddPanel(panel gxui.Control, name string)

gxui.PanelHolder compliance

func (*PanelHolder) AddPanelAt

func (p *PanelHolder) AddPanelAt(panel gxui.Control, name string, index int)

func (*PanelHolder) DesiredSize

func (p *PanelHolder) DesiredSize(min, max math.Size) math.Size

func (*PanelHolder) Init

func (p *PanelHolder) Init(outer PanelHolderOuter, theme gxui.Theme)

func (*PanelHolder) LayoutChildren

func (p *PanelHolder) LayoutChildren()

func (*PanelHolder) Panel

func (p *PanelHolder) Panel(index int) gxui.Control

func (*PanelHolder) PanelCount

func (p *PanelHolder) PanelCount() int

func (*PanelHolder) PanelIndex

func (p *PanelHolder) PanelIndex(panel gxui.Control) int

func (*PanelHolder) RemovePanel

func (p *PanelHolder) RemovePanel(panel gxui.Control)

func (*PanelHolder) Select

func (p *PanelHolder) Select(index int)

func (*PanelHolder) SelectedPanel

func (p *PanelHolder) SelectedPanel() gxui.Control

func (*PanelHolder) Tab

func (p *PanelHolder) Tab(index int) gxui.Control

type PanelTab

type PanelTab interface {
	gxui.Control
	SetText(string)
	SetActive(bool)
}

type PanelTabCreater

type PanelTabCreater interface {
	CreatePanelTab() PanelTab
}

type ProgressBar

type ProgressBar struct {
	base.Control
	parts.BackgroundBorderPainter
	// contains filtered or unexported fields
}

func (*ProgressBar) DesiredSize

func (b *ProgressBar) DesiredSize(min, max math.Size) math.Size

func (*ProgressBar) Init

func (b *ProgressBar) Init(outer ProgressBarOuter, theme gxui.Theme)

func (*ProgressBar) Paint

func (b *ProgressBar) Paint(c gxui.Canvas)

func (*ProgressBar) PaintProgress

func (b *ProgressBar) PaintProgress(c gxui.Canvas, r math.Rect, frac float32)

func (*ProgressBar) Progress

func (b *ProgressBar) Progress() int

func (*ProgressBar) SetDesiredSize

func (b *ProgressBar) SetDesiredSize(size math.Size)

gxui.ProgressBar compliance

func (*ProgressBar) SetProgress

func (b *ProgressBar) SetProgress(progress int)

func (*ProgressBar) SetTarget

func (b *ProgressBar) SetTarget(target int)

func (*ProgressBar) Target

func (b *ProgressBar) Target() int

type ProgressBarOuter

type ProgressBarOuter interface {
	base.ControlOuter
	PaintProgress(gxui.Canvas, math.Rect, float32)
}

type ScrollBar

type ScrollBar struct {
	base.Control
	// contains filtered or unexported fields
}

func (*ScrollBar) AutoHide

func (s *ScrollBar) AutoHide() bool

func (*ScrollBar) BarBrush

func (s *ScrollBar) BarBrush() gxui.Brush

func (*ScrollBar) BarPen

func (s *ScrollBar) BarPen() gxui.Pen

func (*ScrollBar) Click

func (s *ScrollBar) Click(ev gxui.MouseEvent) (consume bool)

InputEventHandler overrides

func (*ScrollBar) DesiredSize

func (s *ScrollBar) DesiredSize(min, max math.Size) math.Size

func (*ScrollBar) Init

func (s *ScrollBar) Init(outer ScrollBarOuter, theme gxui.Theme)

func (*ScrollBar) IsVisible

func (s *ScrollBar) IsVisible() bool

func (*ScrollBar) MouseDown

func (s *ScrollBar) MouseDown(ev gxui.MouseEvent)

func (*ScrollBar) OnScroll

func (s *ScrollBar) OnScroll(f func(from, to int)) gxui.EventSubscription

func (*ScrollBar) Orientation

func (s *ScrollBar) Orientation() gxui.Orientation

func (*ScrollBar) Paint

func (s *ScrollBar) Paint(c gxui.Canvas)

func (*ScrollBar) RailBrush

func (s *ScrollBar) RailBrush() gxui.Brush

func (*ScrollBar) RailPen

func (s *ScrollBar) RailPen() gxui.Pen

func (*ScrollBar) ScrollFraction

func (s *ScrollBar) ScrollFraction() (from, to float32)

func (*ScrollBar) ScrollLimit

func (s *ScrollBar) ScrollLimit() int

func (*ScrollBar) ScrollPosition

func (s *ScrollBar) ScrollPosition() (from, to int)

func (*ScrollBar) SetAutoHide

func (s *ScrollBar) SetAutoHide(autoHide bool)

func (*ScrollBar) SetBarBrush

func (s *ScrollBar) SetBarBrush(b gxui.Brush)

func (*ScrollBar) SetBarPen

func (s *ScrollBar) SetBarPen(b gxui.Pen)

func (*ScrollBar) SetOrientation

func (s *ScrollBar) SetOrientation(o gxui.Orientation)

func (*ScrollBar) SetRailBrush

func (s *ScrollBar) SetRailBrush(b gxui.Brush)

func (*ScrollBar) SetRailPen

func (s *ScrollBar) SetRailPen(b gxui.Pen)

func (*ScrollBar) SetScrollLimit

func (s *ScrollBar) SetScrollLimit(l int)

func (*ScrollBar) SetScrollPosition

func (s *ScrollBar) SetScrollPosition(from, to int)

type ScrollBarOuter

type ScrollBarOuter interface {
	base.ControlOuter
}

type ScrollLayout

type ScrollLayout struct {
	base.Container
	parts.BackgroundBorderPainter
	// contains filtered or unexported fields
}

func (*ScrollLayout) Child

func (l *ScrollLayout) Child() gxui.Control

func (*ScrollLayout) DesiredSize

func (l *ScrollLayout) DesiredSize(min, max math.Size) math.Size

func (*ScrollLayout) Init

func (l *ScrollLayout) Init(outer ScrollLayoutOuter, theme gxui.Theme)

func (*ScrollLayout) LayoutChildren

func (l *ScrollLayout) LayoutChildren()

func (*ScrollLayout) MouseScroll

func (l *ScrollLayout) MouseScroll(ev gxui.MouseEvent) (consume bool)

InputEventHandler override

func (*ScrollLayout) ScrollAxis

func (l *ScrollLayout) ScrollAxis() (horizontal, vertical bool)

func (*ScrollLayout) SetChild

func (l *ScrollLayout) SetChild(control gxui.Control)

gxui.ScrollLayout complaince

func (*ScrollLayout) SetScrollAxis

func (l *ScrollLayout) SetScrollAxis(horizontal, vertical bool)

func (*ScrollLayout) SetScrollOffset

func (l *ScrollLayout) SetScrollOffset(scrollOffset math.Point) bool

type ScrollLayoutOuter

type ScrollLayoutOuter interface {
	base.ContainerOuter
}

type SplitterBar

type SplitterBar struct {
	base.Control
	// contains filtered or unexported fields
}

func (*SplitterBar) Init

func (b *SplitterBar) Init(outer SplitterBarOuter, theme gxui.Theme)

func (*SplitterBar) IsDragging

func (b *SplitterBar) IsDragging() bool

func (*SplitterBar) MouseDown

func (b *SplitterBar) MouseDown(e gxui.MouseEvent)

InputEventHandler overrides

func (*SplitterBar) OnDragEnd

func (b *SplitterBar) OnDragEnd(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*SplitterBar) OnDragStart

func (b *SplitterBar) OnDragStart(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*SplitterBar) OnSplitterDragged

func (b *SplitterBar) OnSplitterDragged(f func(wndPnt math.Point))

func (*SplitterBar) Paint

func (b *SplitterBar) Paint(c gxui.Canvas)

parts.DrawPaint overrides

func (*SplitterBar) SetBackgroundColor

func (b *SplitterBar) SetBackgroundColor(c gxui.Color)

func (*SplitterBar) SetForegroundColor

func (b *SplitterBar) SetForegroundColor(c gxui.Color)

type SplitterBarOuter

type SplitterBarOuter interface {
	base.ControlOuter
}

type SplitterLayout

type SplitterLayout struct {
	base.Container
	// contains filtered or unexported fields
}

func (*SplitterLayout) AddChildAt

func (l *SplitterLayout) AddChildAt(index int, control gxui.Control) *gxui.Child

parts.Container overrides

func (*SplitterLayout) ChildWeight

func (l *SplitterLayout) ChildWeight(child gxui.Control) float32

func (*SplitterLayout) CreateSplitterBar

func (l *SplitterLayout) CreateSplitterBar() gxui.Control

func (*SplitterLayout) DesiredSize

func (l *SplitterLayout) DesiredSize(min, max math.Size) math.Size

func (*SplitterLayout) Init

func (l *SplitterLayout) Init(outer SplitterLayoutOuter, theme gxui.Theme)

func (*SplitterLayout) LayoutChildren

func (l *SplitterLayout) LayoutChildren()

func (*SplitterLayout) Orientation

func (l *SplitterLayout) Orientation() gxui.Orientation

func (*SplitterLayout) RemoveChildAt

func (l *SplitterLayout) RemoveChildAt(index int)

func (*SplitterLayout) SetChildWeight

func (l *SplitterLayout) SetChildWeight(child gxui.Control, weight float32)

func (*SplitterLayout) SetOrientation

func (l *SplitterLayout) SetOrientation(o gxui.Orientation)

func (*SplitterLayout) SplitterDragged

func (l *SplitterLayout) SplitterDragged(splitter gxui.Control, wndPnt math.Point)

type SplitterLayoutOuter

type SplitterLayoutOuter interface {
	base.ContainerOuter
	CreateSplitterBar() gxui.Control
}

type SuggestionAdapter

type SuggestionAdapter struct {
	gxui.FilteredListAdapter
}

func (*SuggestionAdapter) SetSuggestions

func (a *SuggestionAdapter) SetSuggestions(suggestions []gxui.CodeSuggestion)

func (*SuggestionAdapter) Suggestion

type TextBox

type TextBox struct {
	List
	gxui.AdapterBase
	parts.Focusable
	// contains filtered or unexported fields
}

func (*TextBox) Carets

func (t *TextBox) Carets() []int

func (*TextBox) Click

func (t *TextBox) Click(ev gxui.MouseEvent) (consume bool)

func (*TextBox) CreateLine

func (t *TextBox) CreateLine(theme gxui.Theme, index int) (line TextBoxLine, container gxui.Control)

func (*TextBox) DesiredWidth

func (t *TextBox) DesiredWidth() int

func (*TextBox) DoubleClick

func (t *TextBox) DoubleClick(ev gxui.MouseEvent) (consume bool)

func (*TextBox) Font

func (t *TextBox) Font() gxui.Font

func (*TextBox) Init

func (t *TextBox) Init(outer TextBoxOuter, driver gxui.Driver, theme gxui.Theme, font gxui.Font)

func (*TextBox) KeyPress

func (t *TextBox) KeyPress(ev gxui.KeyboardEvent) (consume bool)

func (*TextBox) KeyStroke

func (t *TextBox) KeyStroke(ev gxui.KeyStrokeEvent) (consume bool)

func (*TextBox) LineEnd

func (t *TextBox) LineEnd(line int) int

func (*TextBox) LineIndex

func (t *TextBox) LineIndex(runeIndex int) int

func (*TextBox) LineStart

func (t *TextBox) LineStart(line int) int

func (*TextBox) MouseMove

func (t *TextBox) MouseMove(ev gxui.MouseEvent)

func (*TextBox) Multiline

func (t *TextBox) Multiline() bool

func (*TextBox) OnRedrawLines

func (t *TextBox) OnRedrawLines(f func()) gxui.EventSubscription

func (*TextBox) OnSelectionChanged

func (t *TextBox) OnSelectionChanged(f func()) gxui.EventSubscription

func (*TextBox) OnTextChanged

func (t *TextBox) OnTextChanged(f func([]gxui.TextBoxEdit)) gxui.EventSubscription

func (*TextBox) PaintMouseOverBackground

func (t *TextBox) PaintMouseOverBackground(c gxui.Canvas, r math.Rect)

func (*TextBox) PaintSelection

func (t *TextBox) PaintSelection(c gxui.Canvas, r math.Rect)

mixins.List overrides

func (*TextBox) RuneIndexAt

func (t *TextBox) RuneIndexAt(pnt math.Point) (index int, found bool)

func (*TextBox) Runes

func (t *TextBox) Runes() []rune

func (*TextBox) ScrollToLine

func (t *TextBox) ScrollToLine(i int)

func (*TextBox) ScrollToRune

func (t *TextBox) ScrollToRune(i int)

func (*TextBox) Select

func (t *TextBox) Select(sel gxui.TextSelectionList)

func (*TextBox) SelectAll

func (t *TextBox) SelectAll()

func (*TextBox) SetDesiredWidth

func (t *TextBox) SetDesiredWidth(desiredWidth int)

func (*TextBox) SetFont

func (t *TextBox) SetFont(font gxui.Font)

func (*TextBox) SetMultiline

func (t *TextBox) SetMultiline(multiline bool)

func (*TextBox) SetText

func (t *TextBox) SetText(text string)

func (*TextBox) SetTextColor

func (t *TextBox) SetTextColor(color gxui.Color)

func (*TextBox) Text

func (t *TextBox) Text() string

func (*TextBox) TextAt

func (t *TextBox) TextAt(s, e int) string

func (*TextBox) TextColor

func (t *TextBox) TextColor() gxui.Color

func (*TextBox) WordAt

func (t *TextBox) WordAt(runeIndex int) string

type TextBoxAdapter

type TextBoxAdapter struct {
	gxui.DefaultAdapter
	TextBox *TextBox
}

gxui.AdapterCompliance

func (*TextBoxAdapter) Count

func (t *TextBoxAdapter) Count() int

func (*TextBoxAdapter) Create

func (t *TextBoxAdapter) Create(theme gxui.Theme, index int) gxui.Control

func (*TextBoxAdapter) ItemAt

func (t *TextBoxAdapter) ItemAt(index int) gxui.AdapterItem

func (*TextBoxAdapter) ItemIndex

func (t *TextBoxAdapter) ItemIndex(item gxui.AdapterItem) int

func (*TextBoxAdapter) Size

func (t *TextBoxAdapter) Size(theme gxui.Theme) math.Size

type TextBoxLine

type TextBoxLine interface {
	gxui.Control
	RuneIndexAt(math.Point) int
	PositionAt(int) math.Point
}

type TextBoxOuter

type TextBoxOuter interface {
	ListOuter
	CreateLine(theme gxui.Theme, index int) (line TextBoxLine, container gxui.Control)
}

type Tree

type Tree struct {
	List
	parts.Focusable
	// contains filtered or unexported fields
}

func (*Tree) Adapter

func (t *Tree) Adapter() gxui.TreeAdapter

func (*Tree) CollapseAll

func (t *Tree) CollapseAll()

func (*Tree) ContainsItem

func (t *Tree) ContainsItem(item gxui.AdapterItem) bool

func (*Tree) CreateExpandButton

func (t *Tree) CreateExpandButton(theme gxui.Theme, node *TreeInternalNode) gxui.Button

func (*Tree) ExpandAll

func (t *Tree) ExpandAll()

func (*Tree) Init

func (t *Tree) Init(outer TreeOuter, theme gxui.Theme)

func (*Tree) KeyPress

func (t *Tree) KeyPress(ev gxui.KeyboardEvent) (consume bool)

InputEventHandler override

func (*Tree) PaintChild

func (t *Tree) PaintChild(c gxui.Canvas, child *gxui.Child, idx int)

List override

func (*Tree) PaintUnexpandedSelection

func (t *Tree) PaintUnexpandedSelection(c gxui.Canvas, r math.Rect)

func (*Tree) SetAdapter

func (t *Tree) SetAdapter(adapter gxui.TreeAdapter)

gxui.Tree complaince

func (*Tree) Show

func (t *Tree) Show(item gxui.AdapterItem)

type TreeInternalNode

type TreeInternalNode struct {
	// contains filtered or unexported fields
}

func CreateTreeInternalRoot

func CreateTreeInternalRoot(node gxui.TreeAdapter) *TreeInternalNode

func (*TreeInternalNode) Child

func (n *TreeInternalNode) Child(i int) (parent *TreeInternalNode)

func (*TreeInternalNode) Collapse

func (n *TreeInternalNode) Collapse() bool

func (*TreeInternalNode) CollapseAll

func (n *TreeInternalNode) CollapseAll()

func (*TreeInternalNode) Expand

func (n *TreeInternalNode) Expand() bool

func (*TreeInternalNode) ExpandAll

func (n *TreeInternalNode) ExpandAll()

func (*TreeInternalNode) FindByIndex

func (n *TreeInternalNode) FindByIndex(idx int) (parent *TreeInternalNode, childIndex int, depth int)

func (*TreeInternalNode) FindByItem

func (n *TreeInternalNode) FindByItem(item gxui.AdapterItem) (parent *TreeInternalNode, childIndex int, depth int)

func (*TreeInternalNode) IsExpanded

func (n *TreeInternalNode) IsExpanded() bool

func (*TreeInternalNode) IsLeaf

func (n *TreeInternalNode) IsLeaf() bool

func (*TreeInternalNode) Item

func (n *TreeInternalNode) Item() gxui.AdapterItem

func (*TreeInternalNode) ItemAt

func (n *TreeInternalNode) ItemAt(idx int) gxui.AdapterItem

func (*TreeInternalNode) ItemIndex

func (n *TreeInternalNode) ItemIndex(item gxui.AdapterItem) int

func (*TreeInternalNode) OnExpandedChanged

func (n *TreeInternalNode) OnExpandedChanged(f func(bool)) gxui.EventSubscription

type TreeOuter

type TreeOuter interface {
	ListOuter
	CreateExpandButton(theme gxui.Theme, node *TreeInternalNode) gxui.Button
	PaintUnexpandedSelection(c gxui.Canvas, r math.Rect)
}

type TreeToListAdapter

type TreeToListAdapter struct {
	gxui.AdapterBase
	// contains filtered or unexported fields
}

func CreateTreeToListAdapter

func CreateTreeToListAdapter(adapter gxui.TreeAdapter, ceb CreateExpandButton) *TreeToListAdapter

func (TreeToListAdapter) Collapse

func (TreeToListAdapter) Contains

func (a TreeToListAdapter) Contains(item gxui.AdapterItem) bool

Contains returns true if the TreeAdapter contains the specified item, regardless of whether the item is part of the expanded tree or not.

func (TreeToListAdapter) Count

func (a TreeToListAdapter) Count() int

Adapter compliance

func (TreeToListAdapter) Create

func (a TreeToListAdapter) Create(theme gxui.Theme, index int) gxui.Control

func (TreeToListAdapter) DeepestVisibleAncestor

func (a TreeToListAdapter) DeepestVisibleAncestor(item gxui.AdapterItem) gxui.AdapterItem

func (TreeToListAdapter) Expand

func (a TreeToListAdapter) Expand(item gxui.AdapterItem) bool

func (TreeToListAdapter) ExpandAllParents

func (a TreeToListAdapter) ExpandAllParents(item gxui.AdapterItem)

func (TreeToListAdapter) ItemAt

func (a TreeToListAdapter) ItemAt(index int) gxui.AdapterItem

func (TreeToListAdapter) ItemIndex

func (a TreeToListAdapter) ItemIndex(item gxui.AdapterItem) int

func (TreeToListAdapter) Size

func (a TreeToListAdapter) Size(theme gxui.Theme) math.Size

type Window

type Window struct {
	parts.Attachable
	parts.BackgroundBorderPainter
	parts.Container
	parts.Paddable
	parts.PaintChildren
	// contains filtered or unexported fields
}

func (*Window) Click

func (w *Window) Click(ev gxui.MouseEvent)

func (*Window) Close

func (w *Window) Close()

func (*Window) DoubleClick

func (w *Window) DoubleClick(ev gxui.MouseEvent)

func (*Window) Draw

func (w *Window) Draw() gxui.Canvas

func (*Window) Focus

func (w *Window) Focus() gxui.Focusable

func (*Window) Fullscreen

func (w *Window) Fullscreen() bool

func (*Window) Hide

func (w *Window) Hide()

func (*Window) Init

func (w *Window) Init(outer WindowOuter, driver gxui.Driver, width, height int, title string)

func (*Window) IsVisible

func (w *Window) IsVisible() bool

func (*Window) KeyPress

func (w *Window) KeyPress(ev gxui.KeyboardEvent)

func (*Window) KeyStroke

func (w *Window) KeyStroke(gxui.KeyStrokeEvent)

func (*Window) LayoutChildren

func (w *Window) LayoutChildren()

func (*Window) OnClick

func (w *Window) OnClick(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnClose

func (w *Window) OnClose(f func()) gxui.EventSubscription

func (*Window) OnDoubleClick

func (w *Window) OnDoubleClick(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnKeyDown

func (w *Window) OnKeyDown(f func(gxui.KeyboardEvent)) gxui.EventSubscription

func (*Window) OnKeyRepeat

func (w *Window) OnKeyRepeat(f func(gxui.KeyboardEvent)) gxui.EventSubscription

func (*Window) OnKeyStroke

func (w *Window) OnKeyStroke(f func(gxui.KeyStrokeEvent)) gxui.EventSubscription

func (*Window) OnKeyUp

func (w *Window) OnKeyUp(f func(gxui.KeyboardEvent)) gxui.EventSubscription

func (*Window) OnMouseDown

func (w *Window) OnMouseDown(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnMouseEnter

func (w *Window) OnMouseEnter(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnMouseExit

func (w *Window) OnMouseExit(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnMouseMove

func (w *Window) OnMouseMove(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnMouseScroll

func (w *Window) OnMouseScroll(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnMouseUp

func (w *Window) OnMouseUp(f func(gxui.MouseEvent)) gxui.EventSubscription

func (*Window) OnResize

func (w *Window) OnResize(f func()) gxui.EventSubscription

func (*Window) Paint

func (w *Window) Paint(c gxui.Canvas)

func (*Window) Parent

func (w *Window) Parent() gxui.Container

func (*Window) Redraw

func (w *Window) Redraw()

func (*Window) Relayout

func (w *Window) Relayout()

func (*Window) Scale

func (w *Window) Scale() float32

func (*Window) SetFocus

func (w *Window) SetFocus(c gxui.Control) bool

func (*Window) SetFullscreen

func (w *Window) SetFullscreen(fullscreen bool)

func (*Window) SetScale

func (w *Window) SetScale(scale float32)

func (*Window) SetSize

func (w *Window) SetSize(size math.Size)

func (*Window) SetTitle

func (w *Window) SetTitle(t string)

func (*Window) Show

func (w *Window) Show()

func (*Window) Size

func (w *Window) Size() math.Size

func (*Window) Title

func (w *Window) Title() string

func (*Window) Viewport

func (w *Window) Viewport() gxui.Viewport

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL