Documentation
¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func GetTime() float32
- func InitWidget(child, parent Widget)
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- func SetDebug(d bool)
- type AdvancedGridLayout
- func (a *AdvancedGridLayout) Anchor(widget Widget) Anchor
- func (a *AdvancedGridLayout) AppendCol(size int, defaultStretch ...float32)
- func (a *AdvancedGridLayout) AppendRow(size int, defaultStretch ...float32)
- func (a *AdvancedGridLayout) ColCount() int
- func (a *AdvancedGridLayout) Margin() int
- func (a *AdvancedGridLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (a *AdvancedGridLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (a *AdvancedGridLayout) RowCount() int
- func (a *AdvancedGridLayout) SetAnchor(widget Widget, anchor Anchor)
- func (a *AdvancedGridLayout) SetColStretch(index int, stretch float32)
- func (a *AdvancedGridLayout) SetMargin(m int)
- func (a *AdvancedGridLayout) SetRowStretch(index int, stretch float32)
- func (a *AdvancedGridLayout) String() string
- type Alignment
- type Anchor
- type App
- type BoxLayout
- func (b *BoxLayout) Alignment() Alignment
- func (b *BoxLayout) Margin() int
- func (b *BoxLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (b *BoxLayout) Orientation() Orientation
- func (b *BoxLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (b *BoxLayout) SetAlignment(a Alignment)
- func (b *BoxLayout) SetMargin(m int)
- func (b *BoxLayout) SetOrientation(o Orientation)
- func (b *BoxLayout) SetSpacing(s int)
- func (b *BoxLayout) Spacing() int
- func (b *BoxLayout) String() string
- type Button
- func (b *Button) BackgroundColor() vg.Color
- func (b *Button) ButtonGroup() []*Button
- func (b *Button) Caption() string
- func (b *Button) Draw(self Widget, ctx *vg.Context)
- func (b *Button) Flags() ButtonFlags
- func (b *Button) FontSize() int
- func (b *Button) Icon() Icon
- func (b *Button) IconPosition() ButtonIconPosition
- func (b *Button) ImageIcon() int
- func (b *Button) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (b *Button) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (b *Button) Pushed() bool
- func (b *Button) SetBackgroundColor(c vg.Color)
- func (b *Button) SetButtonGroup(group []*Button)
- func (b *Button) SetCallback(callback func())
- func (b *Button) SetCaption(caption string)
- func (b *Button) SetChangeCallback(callback func(bool))
- func (b *Button) SetFlags(f ButtonFlags)
- func (b *Button) SetFontSize(size int)
- func (b *Button) SetIcon(i Icon)
- func (b *Button) SetIconPosition(p ButtonIconPosition)
- func (b *Button) SetImageIcon(i int)
- func (b *Button) SetPushed(p bool)
- func (b *Button) SetTextColor(c vg.Color)
- func (b *Button) String() string
- func (b *Button) TextColor() vg.Color
- type ButtonFlags
- type ButtonIconPosition
- type CheckBox
- func (c *CheckBox) Caption() string
- func (c *CheckBox) Checked() bool
- func (c *CheckBox) Draw(self Widget, ctx *vg.Context)
- func (c *CheckBox) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (c *CheckBox) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (c *CheckBox) Pushed() bool
- func (c *CheckBox) SetCallback(callback func(bool))
- func (c *CheckBox) SetCaption(caption string)
- func (c *CheckBox) SetChecked(checked bool)
- func (c *CheckBox) SetPushed(pushed bool)
- func (c *CheckBox) String() string
- type CloseEvent
- type ColorPicker
- type ColorWheel
- func (c *ColorWheel) Color() vg.Color
- func (c *ColorWheel) Draw(self Widget, ctx *vg.Context)
- func (c *ColorWheel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (c *ColorWheel) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (c *ColorWheel) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (c *ColorWheel) SetCallback(callback func(color vg.Color))
- func (c *ColorWheel) SetColor(color vg.Color)
- func (c *ColorWheel) String() string
- type ColorWheelRegion
- type ComboBox
- func (c *ComboBox) Items() []string
- func (c *ComboBox) SelectedIndex() int
- func (c *ComboBox) SetCallback(callback func(int))
- func (c *ComboBox) SetItems(items []string, shortItems ...[]string)
- func (c *ComboBox) SetSelectedIndex(i int)
- func (c *ComboBox) ShortItems() []string
- func (c *ComboBox) String() string
- type Cursor
- type DropEvent
- type EditAction
- type EventQueue
- type ExpandBoxLayout
- func (b *ExpandBoxLayout) Alignment() Alignment
- func (b *ExpandBoxLayout) Margin() int
- func (b *ExpandBoxLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (b *ExpandBoxLayout) Orientation() Orientation
- func (b *ExpandBoxLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (b *ExpandBoxLayout) SetAlignment(a Alignment)
- func (b *ExpandBoxLayout) SetMargin(m int)
- func (b *ExpandBoxLayout) SetOrientation(o Orientation)
- func (b *ExpandBoxLayout) SetSpacing(s int)
- func (b *ExpandBoxLayout) Spacing() int
- func (b *ExpandBoxLayout) String() string
- type ExpandListLayout
- func (g *ExpandListLayout) ColAlignment() Alignment
- func (g *ExpandListLayout) ColSpacing() int
- func (g *ExpandListLayout) ColumnWidths() []int
- func (g *ExpandListLayout) ExpandPolicy(axis int) ExpandPolicy
- func (g *ExpandListLayout) Margin() int
- func (g *ExpandListLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (g *ExpandListLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (g *ExpandListLayout) Resolution() int
- func (g *ExpandListLayout) RowAlignment() Alignment
- func (g *ExpandListLayout) RowSpacing() int
- func (g *ExpandListLayout) SeColumnWidths(lengths []int)
- func (g *ExpandListLayout) SetColAlignment(a Alignment)
- func (g *ExpandListLayout) SetColSpacing(s int)
- func (g *ExpandListLayout) SetExpandPolicy(axis int, policy ExpandPolicy)
- func (g *ExpandListLayout) SetMargin(m int)
- func (g *ExpandListLayout) SetRowAlignment(a Alignment)
- func (g *ExpandListLayout) SetRowSpacing(s int)
- func (g *ExpandListLayout) SetStretches(stretches []float32)
- func (g *ExpandListLayout) Stretches() []float32
- func (g *ExpandListLayout) String() string
- type ExpandPolicy
- type FlexibleWidget
- type FloatBox
- type GLEvent
- type GLShader
- type Graph
- func (g *Graph) BackgroundColor() vg.Color
- func (g *Graph) Caption() string
- func (g *Graph) Draw(self Widget, ctx *vg.Context)
- func (g *Graph) Footer() string
- func (g *Graph) ForegroundColor() vg.Color
- func (g *Graph) Header() string
- func (g *Graph) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (g *Graph) SetBackgroundColor(color vg.Color)
- func (g *Graph) SetCaption(caption string)
- func (g *Graph) SetFooter(footer string)
- func (g *Graph) SetForegroundColor(color vg.Color)
- func (g *Graph) SetHeader(header string)
- func (g *Graph) SetTextColor(color vg.Color)
- func (g *Graph) SetValues(values []float32)
- func (g *Graph) String() string
- func (g *Graph) TextColor() vg.Color
- func (g *Graph) Values() []float32
- type GridLayout
- func (g *GridLayout) Alignment(axis, item int) Alignment
- func (g *GridLayout) ColAlignment() []Alignment
- func (g *GridLayout) ColDefaultAlignment() Alignment
- func (g *GridLayout) ColSpacing() int
- func (g *GridLayout) Margin() int
- func (g *GridLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (g *GridLayout) Orientation() Orientation
- func (g *GridLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (g *GridLayout) Resolution() int
- func (g *GridLayout) RowAlignment() []Alignment
- func (g *GridLayout) RowDefaultAlignment() Alignment
- func (g *GridLayout) RowSpacing() int
- func (g *GridLayout) SetColAlignment(a ...Alignment)
- func (g *GridLayout) SetColDefaultAlignment(a Alignment)
- func (g *GridLayout) SetColSpacing(s int)
- func (g *GridLayout) SetMargin(m int)
- func (g *GridLayout) SetOrientation(o Orientation)
- func (g *GridLayout) SetResolution(r int)
- func (g *GridLayout) SetRowAlignment(a ...Alignment)
- func (g *GridLayout) SetRowDefaultAlignment(a Alignment)
- func (g *GridLayout) SetRowSpacing(s int)
- func (g *GridLayout) String() string
- type GroupLayout
- func (g *GroupLayout) GroupIndent() int
- func (g *GroupLayout) GroupSpacing() int
- func (g *GroupLayout) Margin() int
- func (g *GroupLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
- func (g *GroupLayout) PreferredSize(widget Widget, ctx *vg.Context) (int, int)
- func (g *GroupLayout) SetGroupIndent(m int)
- func (g *GroupLayout) SetGroupSpacing(s int)
- func (g *GroupLayout) SetMargin(m int)
- func (g *GroupLayout) SetSpacing(s int)
- func (g *GroupLayout) Spacing() int
- func (g *GroupLayout) String() string
- type IPanel
- type Icon
- type Image
- type ImagePanel
- func (i *ImagePanel) Draw(self Widget, ctx *vg.Context)
- func (i *ImagePanel) Images() []Image
- func (i *ImagePanel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (i *ImagePanel) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (i *ImagePanel) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (i *ImagePanel) SetCallback(callback func(int))
- func (i *ImagePanel) SetImages(images []Image)
- func (i *ImagePanel) String() string
- type ImageSizePolicy
- type ImageView
- func (i *ImageView) Draw(self Widget, ctx *vg.Context)
- func (i *ImageView) Image() int
- func (i *ImageView) Policy() ImageSizePolicy
- func (i *ImageView) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (i *ImageView) SetImage(image int)
- func (i *ImageView) SetPolicy(policy ImageSizePolicy)
- func (i *ImageView) String() string
- type IntBox
- type KeyEvent
- type Label
- func (l *Label) Caption() string
- func (l *Label) Color() vg.Color
- func (l *Label) ColumnWidth() int
- func (l *Label) Draw(self Widget, ctx *vg.Context)
- func (l *Label) Font() string
- func (l *Label) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (l *Label) SetCaption(caption string)
- func (l *Label) SetColor(color vg.Color)
- func (l *Label) SetColumnWidth(width int)
- func (l *Label) SetFont(fontFace string)
- func (l *Label) SetWrap(wrap bool)
- func (l *Label) String() string
- func (l *Label) Wrap() bool
- type Layout
- type MouseButtonEvent
- type MouseMoveEvent
- type Orientation
- type PaintEvent
- type Panel
- func (w *Panel) ButtonPanel() Widget
- func (w *Panel) Center()
- func (w *Panel) Depth() int
- func (w *Panel) Dispose()
- func (w *Panel) Draggable() bool
- func (w *Panel) Draw(self Widget, ctx *vg.Context)
- func (w *Panel) FindPanel() IPanel
- func (w *Panel) Modal() bool
- func (w *Panel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (w *Panel) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (w *Panel) OnPerformLayout(self Widget, ctx *vg.Context)
- func (w *Panel) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (w *Panel) RefreshRelativePlacement()
- func (w *Panel) ScrollEvent(self Widget, x, y, relX, relY int) bool
- func (w *Panel) SetDepth(d int)
- func (w *Panel) SetDraggable(flag bool)
- func (w *Panel) SetModal(m bool)
- func (w *Panel) SetTitle(title string)
- func (w *Panel) String() string
- func (w *Panel) Title() string
- type Popup
- func (p *Popup) AnchorHeight() int
- func (p *Popup) AnchorPosition() (int, int)
- func (p *Popup) Draw(self Widget, ctx *vg.Context)
- func (p *Popup) FindPanel() IPanel
- func (p *Popup) IsPositionAbsolute() bool
- func (p *Popup) OnPerformLayout(self Widget, ctx *vg.Context)
- func (p *Popup) ParentPanel() IPanel
- func (p *Popup) RefreshRelativePlacement()
- func (p *Popup) SetAnchorHeight(h int)
- func (p *Popup) SetAnchorPosition(x, y int)
- func (p *Popup) SetParentPanel(w *Panel)
- func (p *Popup) String() string
- type PopupButton
- func (p *PopupButton) ChevronIcon() Icon
- func (p *PopupButton) Draw(self Widget, ctx *vg.Context)
- func (p *PopupButton) OnPerformLayout(self Widget, ctx *vg.Context)
- func (p *PopupButton) Popup() Widget
- func (p *PopupButton) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (p *PopupButton) SetChevronIcon(icon Icon)
- func (p *PopupButton) String() string
- type ProgressBar
- type ResizeEvent
- type RuneEvent
- type ScrollEvent
- type Slider
- func (s *Slider) Draw(self Widget, ctx *vg.Context)
- func (s *Slider) HighlightColor() vg.Color
- func (s *Slider) HighlightedRange() (float32, float32)
- func (s *Slider) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (s *Slider) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (s *Slider) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (s *Slider) SetCallback(callback func(float32))
- func (s *Slider) SetFinalCallback(callback func(float32))
- func (s *Slider) SetHighlightColor(c vg.Color)
- func (s *Slider) SetHighlightedRange(l, h float32)
- func (s *Slider) SetValue(v float32)
- func (s *Slider) String() string
- func (s *Slider) Value() float32
- type Spinner
- func (s *Spinner) Active() bool
- func (s *Spinner) Draw(self Widget, ctx *vg.Context)
- func (s *Spinner) IsPositionAbsolute() bool
- func (s *Spinner) LineCount() int
- func (s *Spinner) LineWidth() float32
- func (s *Spinner) OnPerformLayout(self Widget, ctx *vg.Context)
- func (s *Spinner) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (s *Spinner) Radius() (int, int)
- func (s *Spinner) SetActive(flag bool)
- func (s *Spinner) SetLineCount(num int)
- func (s *Spinner) SetLineWidth(lineWidth float32)
- func (s *Spinner) SetRadius(c1, c2 int)
- func (s *Spinner) SetSpeed(speed float32)
- func (s *Spinner) Speed() float32
- func (s *Spinner) String() string
- type SpinnerFilter
- func (sf *SpinnerFilter) Draw(self Widget, ctx *vg.Context)
- func (sf *SpinnerFilter) FocusEvent(self Widget, f bool) bool
- func (sf *SpinnerFilter) IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool
- func (sf *SpinnerFilter) IMEStatusEvent(self Widget) bool
- func (sf *SpinnerFilter) IsPositionAbsolute() bool
- func (sf *SpinnerFilter) KeyboardCharacterEvent(self Widget, codePoint rune) bool
- func (sf *SpinnerFilter) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, ...) bool
- func (sf *SpinnerFilter) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (sf *SpinnerFilter) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (sf *SpinnerFilter) MouseEnterEvent(self Widget, x, y int, enter bool) bool
- func (sf *SpinnerFilter) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (sf *SpinnerFilter) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (sf *SpinnerFilter) ScrollEvent(self Widget, x, y, relX, relY int) bool
- func (sf *SpinnerFilter) String() string
- type SpinnerState
- type TextAlignment
- type TextBox
- func (t *TextBox) Alignment() TextAlignment
- func (t *TextBox) CopySelection() bool
- func (t *TextBox) DefaultValue() string
- func (t *TextBox) DeleteSelection() bool
- func (t *TextBox) Draw(self Widget, ctx *vg.Context)
- func (t *TextBox) Editable() bool
- func (t *TextBox) FocusEvent(self Widget, focused bool) bool
- func (t *TextBox) Font() string
- func (t *TextBox) Format() string
- func (t *TextBox) IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool
- func (t *TextBox) IMEStatusEvent(self Widget) bool
- func (t *TextBox) KeyboardCharacterEvent(self Widget, codePoint rune) bool
- func (t *TextBox) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, ...) bool
- func (t *TextBox) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (t *TextBox) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (t *TextBox) MouseEnterEvent(self Widget, x, y int, enter bool) bool
- func (t *TextBox) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (t *TextBox) PasteFromClipboard()
- func (t *TextBox) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (t *TextBox) SetAlignment(a TextAlignment)
- func (t *TextBox) SetCallback(callback func(string) bool)
- func (t *TextBox) SetDefaultValue(value string)
- func (t *TextBox) SetEditable(e bool)
- func (t *TextBox) SetFont(fontFace string)
- func (t *TextBox) SetFormat(format string) error
- func (t *TextBox) SetUnitImage(img int)
- func (t *TextBox) SetUnits(units string)
- func (t *TextBox) SetValue(value string)
- func (t *TextBox) String() string
- func (t *TextBox) UnitImage() int
- func (t *TextBox) Units() string
- func (t *TextBox) Value() string
- type Theme
- type VScrollPanel
- func (v *VScrollPanel) Draw(self Widget, ctx *vg.Context)
- func (v *VScrollPanel) IsClipped(x, y, w, h int) bool
- func (v *VScrollPanel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (v *VScrollPanel) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (v *VScrollPanel) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (v *VScrollPanel) OnPerformLayout(self Widget, ctx *vg.Context)
- func (v *VScrollPanel) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (v *VScrollPanel) Scroll() float32
- func (v *VScrollPanel) ScrollEvent(self Widget, x, y, relX, relY int) bool
- func (v *VScrollPanel) SetScroll(scroll float32)
- func (v *VScrollPanel) String() string
- type VScrollPanelChild
- func (v *VScrollPanelChild) FixedHeight() int
- func (v *VScrollPanelChild) FixedSize() (int, int)
- func (v *VScrollPanelChild) FixedWidth() int
- func (v *VScrollPanelChild) Height() int
- func (v *VScrollPanelChild) IsClipped(cx, cy, cw, ch int) bool
- func (v *VScrollPanelChild) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (v *VScrollPanelChild) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (v *VScrollPanelChild) ScrollEvent(self Widget, x, y, relX, relY int) bool
- func (v *VScrollPanelChild) SetFixedHeight(h int)
- func (v *VScrollPanelChild) SetFixedSize(w, h int)
- func (v *VScrollPanelChild) SetFixedWidth(w int)
- func (v *VScrollPanelChild) SetHeight(h int)
- func (v *VScrollPanelChild) SetSize(w, h int)
- func (v *VScrollPanelChild) SetVisible(flag bool)
- func (v *VScrollPanelChild) SetWidth(w int)
- func (v *VScrollPanelChild) Size() (int, int)
- func (v *VScrollPanelChild) String() string
- func (v *VScrollPanelChild) Visible() bool
- func (v *VScrollPanelChild) Width() int
- type Widget
- type WidgetImplement
- func (w *WidgetImplement) AbsolutePosition() (int, int)
- func (w *WidgetImplement) AddChild(self, child Widget)
- func (w *WidgetImplement) ChildCount() int
- func (w *WidgetImplement) Children() []Widget
- func (w *WidgetImplement) Clamp() [2]bool
- func (w *WidgetImplement) Contains(x, y int) bool
- func (w *WidgetImplement) Cursor() Cursor
- func (w *WidgetImplement) Depth() int
- func (w *WidgetImplement) Draw(self Widget, ctx *vg.Context)
- func (w *WidgetImplement) Enabled() bool
- func (w *WidgetImplement) FindPanel() IPanel
- func (w *WidgetImplement) FindWidget(self Widget, x, y int) Widget
- func (w *WidgetImplement) FixedHeight() int
- func (w *WidgetImplement) FixedSize() (int, int)
- func (w *WidgetImplement) FixedWidth() int
- func (w *WidgetImplement) FocusEvent(self Widget, f bool) bool
- func (w *WidgetImplement) Focused() bool
- func (w *WidgetImplement) FontSize() int
- func (w *WidgetImplement) HasFontSize() bool
- func (w *WidgetImplement) Height() int
- func (w *WidgetImplement) ID() string
- func (w *WidgetImplement) IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool
- func (w *WidgetImplement) IMEStatusEvent(self Widget) bool
- func (w WidgetImplement) IsClipped(cx, cy, cw, ch int) bool
- func (w *WidgetImplement) IsPositionAbsolute() bool
- func (w *WidgetImplement) KeyboardCharacterEvent(self Widget, codePoint rune) bool
- func (w *WidgetImplement) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, ...) bool
- func (w *WidgetImplement) Layout() Layout
- func (w *WidgetImplement) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, ...) bool
- func (w *WidgetImplement) MouseDragEvent(self Widget, x, y, relX, relY int, button int, modifier glfw.ModifierKey) bool
- func (w *WidgetImplement) MouseEnterEvent(self Widget, x, y int, enter bool) bool
- func (w *WidgetImplement) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
- func (w *WidgetImplement) OnPerformLayout(self Widget, ctx *vg.Context)
- func (w *WidgetImplement) Parent() Widget
- func (w *WidgetImplement) Position() (int, int)
- func (w *WidgetImplement) PreferredSize(self Widget, ctx *vg.Context) (int, int)
- func (wg *WidgetImplement) RemoveChild(w Widget)
- func (w *WidgetImplement) RemoveChildByIndex(index int)
- func (w *WidgetImplement) RequestFocus(self Widget)
- func (w *WidgetImplement) ScrollEvent(self Widget, x, y, relX, relY int) bool
- func (w *WidgetImplement) SetChildren(children []Widget)
- func (w *WidgetImplement) SetClampHeight(clamp bool)
- func (w *WidgetImplement) SetClampWidth(clamp bool)
- func (w *WidgetImplement) SetCursor(c Cursor)
- func (w *WidgetImplement) SetEnabled(e bool)
- func (w *WidgetImplement) SetFixedHeight(h int)
- func (wg *WidgetImplement) SetFixedSize(w, h int)
- func (wg *WidgetImplement) SetFixedWidth(w int)
- func (w *WidgetImplement) SetFocused(f bool)
- func (w *WidgetImplement) SetFontSize(s int)
- func (w *WidgetImplement) SetHeight(h int)
- func (w *WidgetImplement) SetID(id string)
- func (w *WidgetImplement) SetLayout(layout Layout)
- func (w *WidgetImplement) SetParent(parent Widget)
- func (w *WidgetImplement) SetPosition(x, y int)
- func (wg *WidgetImplement) SetSize(w, h int)
- func (w *WidgetImplement) SetTheme(theme *Theme)
- func (w *WidgetImplement) SetTooltip(s string)
- func (w *WidgetImplement) SetVisible(v bool)
- func (wg *WidgetImplement) SetWidth(w int)
- func (w *WidgetImplement) Size() (int, int)
- func (w *WidgetImplement) String() string
- func (w *WidgetImplement) StringHelper(name, extra string) string
- func (w *WidgetImplement) Theme() *Theme
- func (w *WidgetImplement) Tooltip() string
- func (w *WidgetImplement) Visible() bool
- func (w *WidgetImplement) VisibleRecursive() bool
- func (w *WidgetImplement) Width() int
- type Window
- func (w *Window) BackgroundColor() vg.Color
- func (w *Window) Caption() string
- func (w *Window) CenterPanel(panel *Panel)
- func (w *Window) DebugPrint()
- func (w *Window) DisposePanel(panel *Panel)
- func (w *Window) GLFWWindow() *glfw.Window
- func (w *Window) InitializeGfx()
- func (w *Window) IsClipped(cx, cy, cw, ch int) bool
- func (w *Window) KeyboardCharacterEvent(self Widget, codePoint rune) bool
- func (w *Window) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, ...) bool
- func (w *Window) MakeCurrent()
- func (w *Window) MousePosition() (int, int)
- func (w *Window) MovePanelToFront(panel IPanel)
- func (w *Window) NVGContext() *vg.Context
- func (w *Window) OnCloseEvent() bool
- func (w *Window) OnDropEvent(e *DropEvent) bool
- func (w *Window) OnKeyEvent(e *KeyEvent) bool
- func (w *Window) OnMouseButton(e *MouseButtonEvent) bool
- func (w *Window) OnMouseMove(e *MouseMoveEvent) bool
- func (w *Window) OnPaint()
- func (w *Window) OnResizeEvent(e *ResizeEvent) bool
- func (w *Window) OnRuneEvent(e *RuneEvent) bool
- func (w *Window) OnScrollEvent(e *ScrollEvent) bool
- func (w *Window) PerformLayout()
- func (w *Window) PreeditCursorPos() (int, int, int)
- func (w *Window) SetBackgroundColor(color vg.Color)
- func (w *Window) SetCaption(caption string)
- func (w *Window) SetDrawContentsCallback(callback func())
- func (w *Window) SetDropEventCallback(callback func([]string) bool)
- func (w *Window) SetOnLoad(callback func())
- func (w *Window) SetPreeditCursorPos(x, y, h int)
- func (w *Window) SetResizeEventCallback(callback func(x, y int) bool)
- func (w *Window) SetShutdownGLFWOnDestruct(v bool)
- func (w *Window) SetSize(width, height int)
- func (w *Window) SetVisible(flag bool)
- func (w *Window) ShutdownGLFWOnDestruct() bool
- func (w *Window) String() string
- func (w *Window) UpdateFocus(widget Widget)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/
foo.txt
img/
a.png
b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func InitWidget ¶
func InitWidget(child, parent Widget)
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type AdvancedGridLayout ¶
type AdvancedGridLayout struct {
// contains filtered or unexported fields
}
func NewAdvancedGridLayout ¶
func NewAdvancedGridLayout(sizes ...[]int) *AdvancedGridLayout
func (*AdvancedGridLayout) Anchor ¶
func (a *AdvancedGridLayout) Anchor(widget Widget) Anchor
func (*AdvancedGridLayout) AppendCol ¶
func (a *AdvancedGridLayout) AppendCol(size int, defaultStretch ...float32)
func (*AdvancedGridLayout) AppendRow ¶
func (a *AdvancedGridLayout) AppendRow(size int, defaultStretch ...float32)
func (*AdvancedGridLayout) ColCount ¶
func (a *AdvancedGridLayout) ColCount() int
func (*AdvancedGridLayout) Margin ¶
func (a *AdvancedGridLayout) Margin() int
func (*AdvancedGridLayout) OnPerformLayout ¶
func (a *AdvancedGridLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
func (*AdvancedGridLayout) PreferredSize ¶
func (*AdvancedGridLayout) RowCount ¶
func (a *AdvancedGridLayout) RowCount() int
func (*AdvancedGridLayout) SetAnchor ¶
func (a *AdvancedGridLayout) SetAnchor(widget Widget, anchor Anchor)
func (*AdvancedGridLayout) SetColStretch ¶
func (a *AdvancedGridLayout) SetColStretch(index int, stretch float32)
func (*AdvancedGridLayout) SetMargin ¶
func (a *AdvancedGridLayout) SetMargin(m int)
func (*AdvancedGridLayout) SetRowStretch ¶
func (a *AdvancedGridLayout) SetRowStretch(index int, stretch float32)
func (*AdvancedGridLayout) String ¶
func (a *AdvancedGridLayout) String() string
type Anchor ¶
type Anchor struct {
// contains filtered or unexported fields
}
func NewAnchorWithSize ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is a window manager and pumps events to windows
type BoxLayout ¶
type BoxLayout struct {
// contains filtered or unexported fields
}
func NewBoxLayout ¶
func NewBoxLayout(orientation Orientation, alignment Alignment, setting ...int) *BoxLayout
func (*BoxLayout) OnPerformLayout ¶
func (*BoxLayout) Orientation ¶
func (b *BoxLayout) Orientation() Orientation
func (*BoxLayout) PreferredSize ¶
func (*BoxLayout) SetAlignment ¶
func (*BoxLayout) SetOrientation ¶
func (b *BoxLayout) SetOrientation(o Orientation)
func (*BoxLayout) SetSpacing ¶
type Button ¶
type Button struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewToolButton ¶
func NewToolButtonByImage ¶
func (*Button) BackgroundColor ¶
func (*Button) ButtonGroup ¶
ButtonGroup returns the button group
func (*Button) Flags ¶
func (b *Button) Flags() ButtonFlags
func (*Button) IconPosition ¶
func (b *Button) IconPosition() ButtonIconPosition
func (*Button) MouseButtonEvent ¶
func (b *Button) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*Button) PreferredSize ¶
func (*Button) SetBackgroundColor ¶
func (*Button) SetButtonGroup ¶
SetButtonGroup set the button group (for radio buttons)
func (*Button) SetCallback ¶
func (b *Button) SetCallback(callback func())
SetCallback set the push callback (for any type of button)
func (*Button) SetCaption ¶
func (*Button) SetChangeCallback ¶
SetChangeCallback set the change callback (for toggle buttons)
func (*Button) SetFlags ¶
func (b *Button) SetFlags(f ButtonFlags)
func (*Button) SetFontSize ¶
func (*Button) SetIconPosition ¶
func (b *Button) SetIconPosition(p ButtonIconPosition)
func (*Button) SetImageIcon ¶
func (*Button) SetTextColor ¶
type ButtonFlags ¶
type ButtonFlags int
const ( NormalButtonType ButtonFlags = 1 RadioButtonType ButtonFlags = 2 ToggleButtonType ButtonFlags = 4 PopupButtonType ButtonFlags = 8 )
type ButtonIconPosition ¶
type ButtonIconPosition int
const ( ButtonIconLeft ButtonIconPosition = iota ButtonIconLeftCentered ButtonIconRight ButtonIconRightCentered )
type CheckBox ¶
type CheckBox struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewCheckBox ¶
func (*CheckBox) MouseButtonEvent ¶
func (c *CheckBox) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*CheckBox) PreferredSize ¶
func (*CheckBox) SetCallback ¶
func (*CheckBox) SetCaption ¶
func (*CheckBox) SetChecked ¶
type CloseEvent ¶
type CloseEvent struct{}
type ColorPicker ¶
type ColorPicker struct {
PopupButton
// contains filtered or unexported fields
}
func NewColorPicker ¶
func NewColorPicker(parent Widget, colors ...vg.Color) *ColorPicker
func (*ColorPicker) Color ¶
func (c *ColorPicker) Color() vg.Color
func (*ColorPicker) SetCallback ¶
func (c *ColorPicker) SetCallback(callback func(color vg.Color))
func (*ColorPicker) SetColor ¶
func (c *ColorPicker) SetColor(color vg.Color)
func (*ColorPicker) String ¶
func (c *ColorPicker) String() string
type ColorWheel ¶
type ColorWheel struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewColorWheel ¶
func NewColorWheel(parent Widget, colors ...vg.Color) *ColorWheel
func (*ColorWheel) Color ¶
func (c *ColorWheel) Color() vg.Color
func (*ColorWheel) MouseButtonEvent ¶
func (c *ColorWheel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*ColorWheel) MouseDragEvent ¶
func (c *ColorWheel) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*ColorWheel) PreferredSize ¶
func (*ColorWheel) SetCallback ¶
func (c *ColorWheel) SetCallback(callback func(color vg.Color))
func (*ColorWheel) SetColor ¶
func (c *ColorWheel) SetColor(color vg.Color)
func (*ColorWheel) String ¶
func (c *ColorWheel) String() string
type ColorWheelRegion ¶
type ColorWheelRegion int
const ( RegionNone ColorWheelRegion = 0 RegionInnerTriangle ColorWheelRegion = 1 RegionOuterCircle ColorWheelRegion = 2 RegionBoth ColorWheelRegion = 3 )
type ComboBox ¶
type ComboBox struct {
PopupButton
// contains filtered or unexported fields
}
func NewComboBox ¶
func (*ComboBox) SelectedIndex ¶
func (*ComboBox) SetCallback ¶
func (*ComboBox) SetSelectedIndex ¶
func (*ComboBox) ShortItems ¶
type EditAction ¶
type EditAction int
const ( EditActionNone EditAction = iota EditActionMoveLeft EditActionMoveRight EditActionMoveLineTop EditActionMoveLineEnd EditActionBackspace EditActionDelete EditActionCutUntilLineEnd EditActionYank EditActionDeleteLeftWord EditActionEnter EditActionSelectAll EditActionCopy EditActionCut EditActionPaste )
func DetectEditAction ¶
func DetectEditAction(key glfw.Key, modifier glfw.ModifierKey) EditAction
type EventQueue ¶
type EventQueue struct {
// contains filtered or unexported fields
}
EventQueue is an infinitely buffered double-ended queue of Events. The zero value is usable, but a Queue value must not be copied
func (*EventQueue) NextEvent ¶
func (q *EventQueue) NextEvent() interface{}
func (*EventQueue) Send ¶
func (q *EventQueue) Send(event interface{})
func (*EventQueue) SendFirst ¶
func (q *EventQueue) SendFirst(event interface{})
type ExpandBoxLayout ¶
type ExpandBoxLayout struct {
// contains filtered or unexported fields
}
func NewExpandBoxLayout ¶
func NewExpandBoxLayout(orientation Orientation, alignment Alignment, setting ...int) *ExpandBoxLayout
func (*ExpandBoxLayout) Alignment ¶
func (b *ExpandBoxLayout) Alignment() Alignment
func (*ExpandBoxLayout) Margin ¶
func (b *ExpandBoxLayout) Margin() int
func (*ExpandBoxLayout) OnPerformLayout ¶
func (b *ExpandBoxLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
func (*ExpandBoxLayout) Orientation ¶
func (b *ExpandBoxLayout) Orientation() Orientation
func (*ExpandBoxLayout) PreferredSize ¶
func (*ExpandBoxLayout) SetAlignment ¶
func (b *ExpandBoxLayout) SetAlignment(a Alignment)
func (*ExpandBoxLayout) SetMargin ¶
func (b *ExpandBoxLayout) SetMargin(m int)
func (*ExpandBoxLayout) SetOrientation ¶
func (b *ExpandBoxLayout) SetOrientation(o Orientation)
func (*ExpandBoxLayout) SetSpacing ¶
func (b *ExpandBoxLayout) SetSpacing(s int)
func (*ExpandBoxLayout) Spacing ¶
func (b *ExpandBoxLayout) Spacing() int
func (*ExpandBoxLayout) String ¶
func (b *ExpandBoxLayout) String() string
type ExpandListLayout ¶
type ExpandListLayout struct {
// contains filtered or unexported fields
}
func NewExpandListLayout ¶
func NewExpandListLayout(widths []int, setting ...int) *ExpandListLayout
func (*ExpandListLayout) ColAlignment ¶
func (g *ExpandListLayout) ColAlignment() Alignment
func (*ExpandListLayout) ColSpacing ¶
func (g *ExpandListLayout) ColSpacing() int
func (*ExpandListLayout) ColumnWidths ¶
func (g *ExpandListLayout) ColumnWidths() []int
func (*ExpandListLayout) ExpandPolicy ¶
func (g *ExpandListLayout) ExpandPolicy(axis int) ExpandPolicy
func (*ExpandListLayout) Margin ¶
func (g *ExpandListLayout) Margin() int
func (*ExpandListLayout) OnPerformLayout ¶
func (g *ExpandListLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
func (*ExpandListLayout) PreferredSize ¶
func (*ExpandListLayout) Resolution ¶
func (g *ExpandListLayout) Resolution() int
func (*ExpandListLayout) RowAlignment ¶
func (g *ExpandListLayout) RowAlignment() Alignment
func (*ExpandListLayout) RowSpacing ¶
func (g *ExpandListLayout) RowSpacing() int
func (*ExpandListLayout) SeColumnWidths ¶
func (g *ExpandListLayout) SeColumnWidths(lengths []int)
func (*ExpandListLayout) SetColAlignment ¶
func (g *ExpandListLayout) SetColAlignment(a Alignment)
func (*ExpandListLayout) SetColSpacing ¶
func (g *ExpandListLayout) SetColSpacing(s int)
func (*ExpandListLayout) SetExpandPolicy ¶
func (g *ExpandListLayout) SetExpandPolicy(axis int, policy ExpandPolicy)
func (*ExpandListLayout) SetMargin ¶
func (g *ExpandListLayout) SetMargin(m int)
func (*ExpandListLayout) SetRowAlignment ¶
func (g *ExpandListLayout) SetRowAlignment(a Alignment)
func (*ExpandListLayout) SetRowSpacing ¶
func (g *ExpandListLayout) SetRowSpacing(s int)
func (*ExpandListLayout) SetStretches ¶
func (g *ExpandListLayout) SetStretches(stretches []float32)
func (*ExpandListLayout) Stretches ¶
func (g *ExpandListLayout) Stretches() []float32
func (*ExpandListLayout) String ¶
func (g *ExpandListLayout) String() string
type FlexibleWidget ¶
type FloatBox ¶
type FloatBox struct {
TextBox
// contains filtered or unexported fields
}
func NewFloatBox ¶
func (*FloatBox) DefaultValue ¶
func (*FloatBox) SetCallback ¶
func (*FloatBox) SetDefaultValue ¶
type Graph ¶
type Graph struct {
WidgetImplement
// contains filtered or unexported fields
}
func (*Graph) BackgroundColor ¶
func (*Graph) ForegroundColor ¶
func (*Graph) PreferredSize ¶
func (*Graph) SetBackgroundColor ¶
func (*Graph) SetCaption ¶
func (*Graph) SetForegroundColor ¶
func (*Graph) SetTextColor ¶
type GridLayout ¶
type GridLayout struct {
// contains filtered or unexported fields
}
func NewGridLayout ¶
func NewGridLayout(orientation Orientation, resolution int, alignment Alignment, setting ...int) *GridLayout
func (*GridLayout) Alignment ¶
func (g *GridLayout) Alignment(axis, item int) Alignment
func (*GridLayout) ColAlignment ¶
func (g *GridLayout) ColAlignment() []Alignment
func (*GridLayout) ColDefaultAlignment ¶
func (g *GridLayout) ColDefaultAlignment() Alignment
func (*GridLayout) ColSpacing ¶
func (g *GridLayout) ColSpacing() int
func (*GridLayout) Margin ¶
func (g *GridLayout) Margin() int
func (*GridLayout) OnPerformLayout ¶
func (g *GridLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
func (*GridLayout) Orientation ¶
func (g *GridLayout) Orientation() Orientation
func (*GridLayout) PreferredSize ¶
func (*GridLayout) Resolution ¶
func (g *GridLayout) Resolution() int
func (*GridLayout) RowAlignment ¶
func (g *GridLayout) RowAlignment() []Alignment
func (*GridLayout) RowDefaultAlignment ¶
func (g *GridLayout) RowDefaultAlignment() Alignment
func (*GridLayout) RowSpacing ¶
func (g *GridLayout) RowSpacing() int
func (*GridLayout) SetColAlignment ¶
func (g *GridLayout) SetColAlignment(a ...Alignment)
func (*GridLayout) SetColDefaultAlignment ¶
func (g *GridLayout) SetColDefaultAlignment(a Alignment)
func (*GridLayout) SetColSpacing ¶
func (g *GridLayout) SetColSpacing(s int)
func (*GridLayout) SetMargin ¶
func (g *GridLayout) SetMargin(m int)
func (*GridLayout) SetOrientation ¶
func (g *GridLayout) SetOrientation(o Orientation)
func (*GridLayout) SetResolution ¶
func (g *GridLayout) SetResolution(r int)
func (*GridLayout) SetRowAlignment ¶
func (g *GridLayout) SetRowAlignment(a ...Alignment)
func (*GridLayout) SetRowDefaultAlignment ¶
func (g *GridLayout) SetRowDefaultAlignment(a Alignment)
func (*GridLayout) SetRowSpacing ¶
func (g *GridLayout) SetRowSpacing(s int)
func (*GridLayout) String ¶
func (g *GridLayout) String() string
type GroupLayout ¶
type GroupLayout struct {
// contains filtered or unexported fields
}
Special layout for widgets grouped by labels
This widget resembles a box layout in that it arranges a set of widgets vertically. All widgets are indented on the horizontal axis except for Label widgets, which are not indented.
This creates a pleasing layout where a number of widgets are grouped under some high-level heading.
func (*GroupLayout) GroupIndent ¶
func (g *GroupLayout) GroupIndent() int
func (*GroupLayout) GroupSpacing ¶
func (g *GroupLayout) GroupSpacing() int
func (*GroupLayout) Margin ¶
func (g *GroupLayout) Margin() int
func (*GroupLayout) OnPerformLayout ¶
func (g *GroupLayout) OnPerformLayout(widget Widget, ctx *vg.Context)
func (*GroupLayout) PreferredSize ¶
func (*GroupLayout) SetGroupIndent ¶
func (g *GroupLayout) SetGroupIndent(m int)
func (*GroupLayout) SetGroupSpacing ¶
func (g *GroupLayout) SetGroupSpacing(s int)
func (*GroupLayout) SetMargin ¶
func (g *GroupLayout) SetMargin(m int)
func (*GroupLayout) SetSpacing ¶
func (g *GroupLayout) SetSpacing(s int)
func (*GroupLayout) Spacing ¶
func (g *GroupLayout) Spacing() int
func (*GroupLayout) String ¶
func (g *GroupLayout) String() string
type Icon ¶
type Icon rune
const ( IconNote Icon = 0x266a IconNoteBeamed Icon = 0x266b IconMusic Icon = 0x1f3b5 IconSearch Icon = 0x1f50d IconFlashlight Icon = 0x1f526 IconMail Icon = 0x2709 IconHeart Icon = 0x2665 IconHeartEmpty Icon = 0x2661 IconStar Icon = 0x2605 IconStarEmpty Icon = 0x2606 IconUser Icon = 0x1f464 IconUsers Icon = 0x1f465 IconUserAdd Icon = 0xe700 IconVideo Icon = 0x1f3ac IconPicture Icon = 0x1f304 IconCamera Icon = 0x1f4f7 IconLayout Icon = 0x268f IconMenu Icon = 0x2630 IconCheck Icon = 0x2713 IconCancel Icon = 0x2715 IconCancelCircled Icon = 0x2716 IconCancelSquared Icon = 0x274e IconPlus Icon = 0x2b IconPlusCircled Icon = 0x2795 IconPlusSquared Icon = 0x229e IconMinus Icon = 0x2d IconMinusCircled Icon = 0x2796 IconMinusSquared Icon = 0x229f IconHelp Icon = 0x2753 IconHelpCircled Icon = 0xe704 IconInfo Icon = 0x2139 IconInfoCircled Icon = 0xe705 IconBack Icon = 0x1f519 IconHome Icon = 0x2302 IconLink Icon = 0x1f517 IconAttach Icon = 0x1f4ce IconLock Icon = 0x1f512 IconLockOpen Icon = 0x1f513 IconTag Icon = 0xe70c IconBookmark Icon = 0x1f516 IconBookmarks Icon = 0x1f4d1 IconFlag Icon = 0x2691 IconThumbsUp Icon = 0x1f44d IconThumbsDown Icon = 0x1f44e IconDownload Icon = 0x1f4e5 IconUpload Icon = 0x1f4e4 IconUploadCloud Icon = 0xe711 IconReply Icon = 0xe712 IconReplyAll Icon = 0xe713 IconForward Icon = 0x27a6 IconQuote Icon = 0x275e IconCode Icon = 0xe714 IconExport Icon = 0xe715 IconFeather Icon = 0x2712 IconPrint Icon = 0xe716 IconRetweet Icon = 0xe717 IconKeyboard Icon = 0x2328 IconComment Icon = 0xe718 IconChat Icon = 0xe720 IconBell Icon = 0x1f514 IconAttention Icon = 0x26a0 IconAlert Icon = 0x1f4a5 IconVcard Icon = 0xe722 IconAddress Icon = 0xe723 IconLocation Icon = 0xe724 IconMap Icon = 0xe727 IconDirection Icon = 0x27a2 IconCompass Icon = 0xe728 IconCup Icon = 0x2615 IconTrash Icon = 0xe729 IconDoc Icon = 0xe730 IconDocs Icon = 0xe736 IconDocLandscape Icon = 0xe737 IconDocText Icon = 0x1f4c4 IconDocTextInv Icon = 0xe731 IconNewspaper Icon = 0x1f4f0 IconBookOpen Icon = 0x1f4d6 IconBook Icon = 0x1f4d5 IconFolder Icon = 0x1f4c1 IconArchive Icon = 0xe738 IconBox Icon = 0x1f4e6 IconRss Icon = 0xe73a IconPhone Icon = 0x1f4de IconCog Icon = 0x2699 IconTools Icon = 0x2692 IconBasket Icon = 0xe73d IconBag Icon = 0x1f45c IconCalendar Icon = 0x1f4c5 IconLogin Icon = 0xe740 IconLogout Icon = 0xe741 IconMic Icon = 0x1f3a4 IconMute Icon = 0x1f507 IconSound Icon = 0x1f50a IconVolume Icon = 0xe742 IconClock Icon = 0x1f554 IconHourglass Icon = 0x23f3 IconLamp Icon = 0x1f4a1 IconLightDown Icon = 0x1f505 IconLightUp Icon = 0x1f506 IconAdjust Icon = 0x25d1 IconBlock Icon = 0x1f6ab IconResizeFull Icon = 0xe744 IconResizeSmall Icon = 0xe746 IconPopup Icon = 0xe74c IconPublish Icon = 0xe74d IconPanel Icon = 0xe74e IconArrowCombo Icon = 0xe74f IconDownCircled Icon = 0xe758 IconLeftCircled Icon = 0xe759 IconRightCircled Icon = 0xe75a IconUpCircled Icon = 0xe75b IconDownOpen Icon = 0xe75c IconLeftOpen Icon = 0xe75d IconRightOpen Icon = 0xe75e IconUpOpen Icon = 0xe75f IconDownOpenMini Icon = 0xe760 IconLeftOpenMini Icon = 0xe761 IconRightOpenMini Icon = 0xe762 IconUpOpenMini Icon = 0xe763 IconDownOpenBig Icon = 0xe764 IconLeftOpenBig Icon = 0xe765 IconRightOpenBig Icon = 0xe766 IconUpOpenBig Icon = 0xe767 IconDown Icon = 0x2b07 IconLeft Icon = 0x2b05 IconRight Icon = 0x27a1 IconUp Icon = 0x2b06 IconDownDir Icon = 0x25be IconLeftDir Icon = 0x25c2 IconRightDir Icon = 0x25b8 IconUpDir Icon = 0x25b4 IconDownBold Icon = 0xe4b0 IconLeftBold Icon = 0xe4ad IconRightBold Icon = 0xe4ae IconUpBold Icon = 0xe4af IconDownThin Icon = 0x2193 IconLeftThin Icon = 0x2190 IconRightThin Icon = 0x2192 IconUpThin Icon = 0x2191 IconCcw Icon = 0x27f2 IconCw Icon = 0x27f3 IconArrowsCcw Icon = 0x1f504 IconLevelDown Icon = 0x21b3 IconLevelUp Icon = 0x21b0 IconShuffle Icon = 0x1f500 IconLoop Icon = 0x1f501 IconSwitch Icon = 0x21c6 IconPlay Icon = 0x25b6 IconStop Icon = 0x25a0 IconPause Icon = 0x2389 IconRecord Icon = 0x26ab IconToEnd Icon = 0x23ed IconToStart Icon = 0x23ee IconFastForward Icon = 0x23e9 IconFastBackward Icon = 0x23ea IconProgress0 Icon = 0xe768 IconProgress1 Icon = 0xe769 IconProgress2 Icon = 0xe76a IconProgress3 Icon = 0xe76b IconTarget Icon = 0x1f3af IconPalette Icon = 0x1f3a8 IconList Icon = 0xe005 IconListAdd Icon = 0xe003 IconSignal Icon = 0x1f4f6 IconTrophy Icon = 0x1f3c6 IconBattery Icon = 0x1f50b IconBackInTime Icon = 0xe771 IconMonitor Icon = 0x1f4bb IconMobile Icon = 0x1f4f1 IconNetwork Icon = 0xe776 IconInbox Icon = 0xe777 IconInstall Icon = 0xe778 IconGlobe Icon = 0x1f30e IconCloud Icon = 0x2601 IconCloudThunder Icon = 0x26c8 IconFlash Icon = 0x26a1 IconMoon Icon = 0x263d IconFlight Icon = 0x2708 IconPaperPlane Icon = 0xe79b IconLeaf Icon = 0x1f342 IconLifebuoy Icon = 0xe788 IconMouse Icon = 0xe789 IconBriefcase Icon = 0x1f4bc IconSuitcase Icon = 0xe78e IconDot Icon = 0xe78b IconDot2 Icon = 0xe78c IconDot3 Icon = 0xe78d IconBrush Icon = 0xe79a IconMagnet Icon = 0xe7a1 IconInfinity Icon = 0x221e IconErase Icon = 0x232b IconChartPie Icon = 0xe751 IconChartLine Icon = 0x1f4c8 IconChartBar Icon = 0x1f4ca IconChartArea Icon = 0x1f53e IconTape Icon = 0x2707 IconGraduationCap Icon = 0x1f393 IconLanguage Icon = 0xe752 IconTicket Icon = 0x1f3ab IconWater Icon = 0x1f4a6 IconDroplet Icon = 0x1f4a7 IconAir Icon = 0xe753 IconCreditCard Icon = 0x1f4b3 IconFloppy Icon = 0x1f4be IconClipboard Icon = 0x1f4cb IconMegaphone Icon = 0x1f4e3 IconDatabase Icon = 0xe754 IconDrive Icon = 0xe755 IconBucket Icon = 0xe756 IconThermometer Icon = 0xe757 IconKey Icon = 0x1f511 IconFlowCascade Icon = 0xe790 IconFlowBranch Icon = 0xe791 IconFlowTree Icon = 0xe792 IconFlowLine Icon = 0xe793 IconFlowParallel Icon = 0xe794 IconRocket Icon = 0x1f680 IconGauge Icon = 0xe7a2 IconTrafficCone Icon = 0xe7a3 IconCc Icon = 0xe7a5 IconCcBy Icon = 0xe7a6 IconCcNc Icon = 0xe7a7 IconCcNcEu Icon = 0xe7a8 IconCcNcJp Icon = 0xe7a9 IconCcSa Icon = 0xe7aa IconCcNd Icon = 0xe7ab IconCcPd Icon = 0xe7ac IconCcZero Icon = 0xe7ad IconCcRemix Icon = 0xe7af IconGithub Icon = 0xf300 IconGithubCircled Icon = 0xf301 IconFlickr Icon = 0xf303 IconFlickrCircled Icon = 0xf304 IconVimeo Icon = 0xf306 IconVimeoCircled Icon = 0xf307 IconTwitter Icon = 0xf309 IconTwitterCircled Icon = 0xf30a IconFacebook Icon = 0xf30c IconFacebookCircled Icon = 0xf30d IconFacebookSquared Icon = 0xf30e IconGplus Icon = 0xf30f IconGplusCircled Icon = 0xf310 IconPinterest Icon = 0xf312 IconPinterestCircled Icon = 0xf313 IconTumblr Icon = 0xf315 IconTumblrCircled Icon = 0xf316 IconLinkedin Icon = 0xf318 IconLinkedinCircled Icon = 0xf319 IconDribbble Icon = 0xf31b IconDribbbleCircled Icon = 0xf31c IconStumbleupon Icon = 0xf31e IconStumbleuponCircled Icon = 0xf31f IconLastfm Icon = 0xf321 IconLastfmCircled Icon = 0xf322 IconRdio Icon = 0xf324 IconRdioCircled Icon = 0xf325 IconSpotify Icon = 0xf327 IconSpotifyCircled Icon = 0xf328 IconQq Icon = 0xf32a IconInstagrem Icon = 0xf32d IconDropbox Icon = 0xf330 IconEvernote Icon = 0xf333 IconFlattr Icon = 0xf336 IconSkype Icon = 0xf339 IconSkypeCircled Icon = 0xf33a IconRenren Icon = 0xf33c IconSinaWeibo Icon = 0xf33f IconPaypal Icon = 0xf342 IconPicasa Icon = 0xf345 IconSoundcloud Icon = 0xf348 IconMixi Icon = 0xf34b IconBehance Icon = 0xf34e IconGoogleCircles Icon = 0xf351 IconVkontakte Icon = 0xf354 IconSmashing Icon = 0xf357 IconSweden Icon = 0xf601 IconDbShape Icon = 0xf600 IconLogoDb Icon = 0xf603 )
type ImagePanel ¶
type ImagePanel struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewImagePanel ¶
func NewImagePanel(parent Widget) *ImagePanel
func (*ImagePanel) Images ¶
func (i *ImagePanel) Images() []Image
func (*ImagePanel) MouseButtonEvent ¶
func (i *ImagePanel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*ImagePanel) MouseMotionEvent ¶
func (i *ImagePanel) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*ImagePanel) PreferredSize ¶
func (*ImagePanel) SetCallback ¶
func (i *ImagePanel) SetCallback(callback func(int))
func (*ImagePanel) SetImages ¶
func (i *ImagePanel) SetImages(images []Image)
func (*ImagePanel) String ¶
func (i *ImagePanel) String() string
type ImageSizePolicy ¶
type ImageSizePolicy int
const ( ImageSizePolicyFixed ImageSizePolicy = iota ImageSizePolicyExpand )
type ImageView ¶
type ImageView struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewImageView ¶
func (*ImageView) Policy ¶
func (i *ImageView) Policy() ImageSizePolicy
func (*ImageView) PreferredSize ¶
func (*ImageView) SetPolicy ¶
func (i *ImageView) SetPolicy(policy ImageSizePolicy)
type IntBox ¶
type IntBox struct {
TextBox
// contains filtered or unexported fields
}
func (*IntBox) DefaultValue ¶
func (*IntBox) SetCallback ¶
func (*IntBox) SetDefaultValue ¶
type Label ¶
type Label struct {
WidgetImplement
// contains filtered or unexported fields
}
Text label widget The font and color can be customized. When SetFixedWidth() is used, the text is wrapped when it surpasses the specified width
func (*Label) ColumnWidth ¶
func (*Label) PreferredSize ¶
func (*Label) SetCaption ¶
SetCaption() sets the label's text caption
func (*Label) SetColumnWidth ¶
type Layout ¶
type Layout interface {
OnPerformLayout(widget Widget, ctx *vg.Context)
PreferredSize(widget Widget, ctx *vg.Context) (int, int)
String() string
}
func NewGroupLayout ¶
type MouseButtonEvent ¶
type MouseButtonEvent struct {
Button glfw.MouseButton
Action glfw.Action
Modifier glfw.ModifierKey
}
type MouseMoveEvent ¶
type MouseMoveEvent struct {
X, Y float64
}
type Orientation ¶
type Orientation int
const ( Horizontal Orientation = iota Vertical )
func (Orientation) String ¶
func (o Orientation) String() string
type PaintEvent ¶
type PaintEvent struct{}
type Panel ¶
type Panel struct {
WidgetImplement
// contains filtered or unexported fields
}
func (*Panel) ButtonPanel ¶
func (*Panel) Center ¶
func (w *Panel) Center()
Center() makes the panel center in the current Window
func (*Panel) MouseButtonEvent ¶
func (w *Panel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*Panel) MouseDragEvent ¶
func (*Panel) PreferredSize ¶
func (*Panel) RefreshRelativePlacement ¶
func (w *Panel) RefreshRelativePlacement()
RefreshRelativePlacement is internal helper function to maintain nested panel position values; overridden in \ref Popup
func (*Panel) SetDraggable ¶
type Popup ¶
type Popup struct {
Panel
// contains filtered or unexported fields
}
func (*Popup) AnchorHeight ¶
AnchorHeight() returns the anchor height; this determines the vertical shift relative to the anchor position
func (*Popup) AnchorPosition ¶
AnchorPosition() returns the anchor position in the parent panel; the placement of the popup is relative to it
func (*Popup) IsPositionAbsolute ¶
func (*Popup) ParentPanel ¶
ParentPanel() returns the parent panel of the popup
func (*Popup) RefreshRelativePlacement ¶
func (p *Popup) RefreshRelativePlacement()
RefreshRelativePlacement is internal helper function to maintain nested panel position values; overridden in \ref Popup
func (*Popup) SetAnchorHeight ¶
SetAnchorHeight() sets the anchor height; this determines the vertical shift relative to the anchor position
func (*Popup) SetAnchorPosition ¶
SetAnchorPosition() sets the anchor position in the parent panel; the placement of the popup is relative to it
func (*Popup) SetParentPanel ¶
SetParentPanel() sets the parent panel of the popup
type PopupButton ¶
type PopupButton struct {
Button
// contains filtered or unexported fields
}
func NewPopupButton ¶
func NewPopupButton(parent Widget, captions ...string) *PopupButton
func (*PopupButton) ChevronIcon ¶
func (p *PopupButton) ChevronIcon() Icon
func (*PopupButton) OnPerformLayout ¶
func (p *PopupButton) OnPerformLayout(self Widget, ctx *vg.Context)
func (*PopupButton) Popup ¶
func (p *PopupButton) Popup() Widget
func (*PopupButton) PreferredSize ¶
func (*PopupButton) SetChevronIcon ¶
func (p *PopupButton) SetChevronIcon(icon Icon)
func (*PopupButton) String ¶
func (p *PopupButton) String() string
type ProgressBar ¶
type ProgressBar struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewProgressBar ¶
func NewProgressBar(parent Widget) *ProgressBar
func (*ProgressBar) PreferredSize ¶
func (*ProgressBar) SetValue ¶
func (p *ProgressBar) SetValue(value float32)
func (*ProgressBar) String ¶
func (p *ProgressBar) String() string
func (*ProgressBar) Value ¶
func (p *ProgressBar) Value() float32
type ResizeEvent ¶
type ResizeEvent struct {
Width, Height int
}
type ScrollEvent ¶
type ScrollEvent struct {
Dx, Dy float64
}
type Slider ¶
type Slider struct {
WidgetImplement
// contains filtered or unexported fields
}
func (*Slider) HighlightColor ¶
func (*Slider) HighlightedRange ¶
func (*Slider) MouseButtonEvent ¶
func (s *Slider) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*Slider) MouseDragEvent ¶
func (*Slider) PreferredSize ¶
func (*Slider) SetCallback ¶
func (*Slider) SetFinalCallback ¶
func (*Slider) SetHighlightColor ¶
func (*Slider) SetHighlightedRange ¶
type Spinner ¶
type Spinner struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewSpinner ¶
func (*Spinner) IsPositionAbsolute ¶
func (*Spinner) PreferredSize ¶
func (*Spinner) SetLineCount ¶
func (*Spinner) SetLineWidth ¶
type SpinnerFilter ¶
type SpinnerFilter struct {
WidgetImplement
// contains filtered or unexported fields
}
func (*SpinnerFilter) FocusEvent ¶
func (sf *SpinnerFilter) FocusEvent(self Widget, f bool) bool
func (*SpinnerFilter) IMEPreeditEvent ¶
func (*SpinnerFilter) IMEStatusEvent ¶
func (sf *SpinnerFilter) IMEStatusEvent(self Widget) bool
func (*SpinnerFilter) IsPositionAbsolute ¶
func (sf *SpinnerFilter) IsPositionAbsolute() bool
func (*SpinnerFilter) KeyboardCharacterEvent ¶
func (sf *SpinnerFilter) KeyboardCharacterEvent(self Widget, codePoint rune) bool
func (*SpinnerFilter) KeyboardEvent ¶
func (sf *SpinnerFilter) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, modifier glfw.ModifierKey) bool
func (*SpinnerFilter) MouseButtonEvent ¶
func (sf *SpinnerFilter) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*SpinnerFilter) MouseDragEvent ¶
func (sf *SpinnerFilter) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*SpinnerFilter) MouseEnterEvent ¶
func (sf *SpinnerFilter) MouseEnterEvent(self Widget, x, y int, enter bool) bool
func (*SpinnerFilter) MouseMotionEvent ¶
func (sf *SpinnerFilter) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*SpinnerFilter) PreferredSize ¶
func (*SpinnerFilter) ScrollEvent ¶
func (sf *SpinnerFilter) ScrollEvent(self Widget, x, y, relX, relY int) bool
func (*SpinnerFilter) String ¶
func (sf *SpinnerFilter) String() string
type SpinnerState ¶
type SpinnerState int
const ( SpinnerStop SpinnerState = iota SpinnerFadeIn SpinnerFadeOut )
type TextAlignment ¶
type TextAlignment int
const ( TextCenter TextAlignment = iota TextLeft TextRight )
type TextBox ¶
type TextBox struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewTextBox ¶
func (*TextBox) Alignment ¶
func (t *TextBox) Alignment() TextAlignment
func (*TextBox) CopySelection ¶
func (*TextBox) DefaultValue ¶
func (*TextBox) DeleteSelection ¶
func (*TextBox) IMEPreeditEvent ¶
func (*TextBox) IMEStatusEvent ¶
func (*TextBox) KeyboardCharacterEvent ¶
func (*TextBox) KeyboardEvent ¶
func (*TextBox) MouseButtonEvent ¶
func (t *TextBox) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*TextBox) MouseDragEvent ¶
func (*TextBox) MouseEnterEvent ¶
func (*TextBox) MouseMotionEvent ¶
func (*TextBox) PasteFromClipboard ¶
func (t *TextBox) PasteFromClipboard()
func (*TextBox) PreferredSize ¶
func (*TextBox) SetAlignment ¶
func (t *TextBox) SetAlignment(a TextAlignment)
func (*TextBox) SetCallback ¶
func (*TextBox) SetDefaultValue ¶
func (*TextBox) SetEditable ¶
func (*TextBox) SetUnitImage ¶
type Theme ¶
type Theme struct {
StandardFontSize int
ButtonFontSize int
TextBoxFontSize int
PanelCornerRadius int
PanelHeaderHeight int
PanelDropShadowSize int
ButtonCornerRadius int
DropShadow vg.Color
Transparent vg.Color
BorderDark vg.Color
BorderLight vg.Color
BorderMedium vg.Color
TextColor vg.Color
DisabledTextColor vg.Color
TextColorShadow vg.Color
IconColor vg.Color
ButtonGradientTopFocused vg.Color
ButtonGradientBotFocused vg.Color
ButtonGradientTopUnfocused vg.Color
ButtonGradientBotUnfocused vg.Color
ButtonGradientTopPushed vg.Color
ButtonGradientBotPushed vg.Color
/* Panel-related */
PanelFillUnfocused vg.Color
PanelFillFocused vg.Color
PanelTitleUnfocused vg.Color
PanelTitleFocused vg.Color
PanelHeaderGradientTop vg.Color
PanelHeaderGradientBot vg.Color
PanelHeaderSepTop vg.Color
PanelHeaderSepBot vg.Color
PanelPopup vg.Color
PanelPopupTransparent vg.Color
FontNormal string
FontBold string
FontIcons string
}
func NewStandardTheme ¶
func NewStandardTheme() *Theme
type VScrollPanel ¶
type VScrollPanel struct {
WidgetImplement
// contains filtered or unexported fields
}
func NewVScrollPanel ¶
func NewVScrollPanel(parent Widget) *VScrollPanel
func (*VScrollPanel) IsClipped ¶
func (v *VScrollPanel) IsClipped(x, y, w, h int) bool
func (*VScrollPanel) MouseButtonEvent ¶
func (v *VScrollPanel) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*VScrollPanel) MouseDragEvent ¶
func (v *VScrollPanel) MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*VScrollPanel) MouseMotionEvent ¶
func (v *VScrollPanel) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*VScrollPanel) OnPerformLayout ¶
func (v *VScrollPanel) OnPerformLayout(self Widget, ctx *vg.Context)
func (*VScrollPanel) PreferredSize ¶
func (*VScrollPanel) Scroll ¶
func (v *VScrollPanel) Scroll() float32
func (*VScrollPanel) ScrollEvent ¶
func (v *VScrollPanel) ScrollEvent(self Widget, x, y, relX, relY int) bool
func (*VScrollPanel) SetScroll ¶
func (v *VScrollPanel) SetScroll(scroll float32)
func (*VScrollPanel) String ¶
func (v *VScrollPanel) String() string
type VScrollPanelChild ¶
type VScrollPanelChild struct {
WidgetImplement
}
func NewVScrollPanelChild ¶
func NewVScrollPanelChild(parent *VScrollPanel) *VScrollPanelChild
func (*VScrollPanelChild) FixedHeight ¶
func (v *VScrollPanelChild) FixedHeight() int
func (*VScrollPanelChild) FixedSize ¶
func (v *VScrollPanelChild) FixedSize() (int, int)
func (*VScrollPanelChild) FixedWidth ¶
func (v *VScrollPanelChild) FixedWidth() int
func (*VScrollPanelChild) Height ¶
func (v *VScrollPanelChild) Height() int
func (*VScrollPanelChild) IsClipped ¶
func (v *VScrollPanelChild) IsClipped(cx, cy, cw, ch int) bool
func (*VScrollPanelChild) MouseButtonEvent ¶
func (v *VScrollPanelChild) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
func (*VScrollPanelChild) MouseMotionEvent ¶
func (v *VScrollPanelChild) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
func (*VScrollPanelChild) ScrollEvent ¶
func (v *VScrollPanelChild) ScrollEvent(self Widget, x, y, relX, relY int) bool
func (*VScrollPanelChild) SetFixedHeight ¶
func (v *VScrollPanelChild) SetFixedHeight(h int)
func (*VScrollPanelChild) SetFixedSize ¶
func (v *VScrollPanelChild) SetFixedSize(w, h int)
func (*VScrollPanelChild) SetFixedWidth ¶
func (v *VScrollPanelChild) SetFixedWidth(w int)
func (*VScrollPanelChild) SetHeight ¶
func (v *VScrollPanelChild) SetHeight(h int)
func (*VScrollPanelChild) SetSize ¶
func (v *VScrollPanelChild) SetSize(w, h int)
func (*VScrollPanelChild) SetVisible ¶
func (v *VScrollPanelChild) SetVisible(flag bool)
func (*VScrollPanelChild) SetWidth ¶
func (v *VScrollPanelChild) SetWidth(w int)
func (*VScrollPanelChild) Size ¶
func (v *VScrollPanelChild) Size() (int, int)
func (*VScrollPanelChild) String ¶
func (v *VScrollPanelChild) String() string
func (*VScrollPanelChild) Visible ¶
func (v *VScrollPanelChild) Visible() bool
func (*VScrollPanelChild) Width ¶
func (v *VScrollPanelChild) Width() int
type Widget ¶
type Widget interface {
Parent() Widget
SetParent(parent Widget)
Layout() Layout
SetLayout(layout Layout)
Theme() *Theme
SetTheme(theme *Theme)
Position() (int, int)
SetPosition(x, y int)
AbsolutePosition() (int, int)
IsPositionAbsolute() bool
Size() (int, int)
SetSize(w, h int)
Width() int
SetWidth(w int)
Height() int
SetHeight(h int)
FixedSize() (int, int)
SetFixedSize(w, h int)
FixedWidth() int
SetFixedWidth(w int)
FixedHeight() int
SetFixedHeight(h int)
Clamp() [2]bool
SetClampWidth(clamp bool)
SetClampHeight(clamp bool)
Visible() bool
SetVisible(v bool)
VisibleRecursive() bool
ChildCount() int
Children() []Widget
SetChildren([]Widget)
AddChild(self, w Widget)
RemoveChildByIndex(i int)
RemoveChild(w Widget)
FindPanel() IPanel
SetID(id string)
ID() string
Enabled() bool
SetEnabled(e bool)
Focused() bool
SetFocused(f bool)
RequestFocus(self Widget)
Tooltip() string
SetTooltip(s string)
FontSize() int
SetFontSize(s int)
HasFontSize() bool
Cursor() Cursor
SetCursor(c Cursor)
Contains(x, y int) bool
IsClipped(x, y, w, h int) bool
FindWidget(self Widget, x, y int) Widget
MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
MouseDragEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
MouseEnterEvent(self Widget, x, y int, enter bool) bool
ScrollEvent(self Widget, x, y, relX, relY int) bool
FocusEvent(self Widget, f bool) bool
KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, modifier glfw.ModifierKey) bool
KeyboardCharacterEvent(self Widget, codePoint rune) bool
IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool
IMEStatusEvent(self Widget) bool
PreferredSize(self Widget, ctx *vg.Context) (int, int)
OnPerformLayout(self Widget, ctx *vg.Context)
Draw(self Widget, ctx *vg.Context)
Depth() int
String() string
}
Widget is base class of all widgets
Widget is the base class of all widgets in ui. It can also be used as an panel to arrange an arbitrary number of child widgets using a layout generator (see Layout)
type WidgetImplement ¶
type WidgetImplement struct {
// contains filtered or unexported fields
}
func (*WidgetImplement) AbsolutePosition ¶
func (w *WidgetImplement) AbsolutePosition() (int, int)
AbsolutePosition() returns the absolute position on screen
func (*WidgetImplement) AddChild ¶
func (w *WidgetImplement) AddChild(self, child Widget)
AddChild() adds a child widget to the current widget This function almost never needs to be called by hand, since the constructor of \ref Widget automatically adds the current widget to its parent
func (*WidgetImplement) ChildCount ¶
func (w *WidgetImplement) ChildCount() int
ChildCount() returns the number of child widgets
func (*WidgetImplement) Children ¶
func (w *WidgetImplement) Children() []Widget
Children() returns the list of child widgets of the current widget
func (*WidgetImplement) Clamp ¶
func (w *WidgetImplement) Clamp() [2]bool
Clamp() returns whether preferred size is used as fixed size
func (*WidgetImplement) Contains ¶
func (w *WidgetImplement) Contains(x, y int) bool
Contains() checks if the widget contains a certain position
func (*WidgetImplement) Cursor ¶
func (w *WidgetImplement) Cursor() Cursor
Cursor() returns a pointer to the cursor of the widget
func (*WidgetImplement) Depth ¶
func (w *WidgetImplement) Depth() int
func (*WidgetImplement) Draw ¶
func (w *WidgetImplement) Draw(self Widget, ctx *vg.Context)
Draw() draws the widget (and all child widgets)
func (*WidgetImplement) Enabled ¶
func (w *WidgetImplement) Enabled() bool
Enabled() returns whether or not this widget is currently enabled
func (*WidgetImplement) FindPanel ¶
func (w *WidgetImplement) FindPanel() IPanel
FindPanel() walks up the hierarchy and return the parent panel
func (*WidgetImplement) FindWidget ¶
func (w *WidgetImplement) FindWidget(self Widget, x, y int) Widget
FindWidget() determines the widget located at the given position value (recursive)
func (*WidgetImplement) FixedHeight ¶
func (w *WidgetImplement) FixedHeight() int
FixedHeight() returns the fixed height (see SetFixedSize())
func (*WidgetImplement) FixedSize ¶
func (w *WidgetImplement) FixedSize() (int, int)
Return the fixed size (see SetFixedSize())
func (*WidgetImplement) FixedWidth ¶
func (w *WidgetImplement) FixedWidth() int
FixedWidth() returns the fixed width (see SetFixedSize())
func (*WidgetImplement) FocusEvent ¶
func (w *WidgetImplement) FocusEvent(self Widget, f bool) bool
FocusEvent() handles a focus change event (default implementation: record the focus status, but do nothing)
func (*WidgetImplement) Focused ¶
func (w *WidgetImplement) Focused() bool
Focused() returns whether or not this widget is currently focused
func (*WidgetImplement) FontSize ¶
func (w *WidgetImplement) FontSize() int
FontSize() returns current font size. If not set the default of the current theme will be returned
func (*WidgetImplement) HasFontSize ¶
func (w *WidgetImplement) HasFontSize() bool
HasFontSize() return whether the font size is explicitly specified for this widget
func (*WidgetImplement) Height ¶
func (w *WidgetImplement) Height() int
Height() returns the height of the widget
func (*WidgetImplement) ID ¶
func (w *WidgetImplement) ID() string
ID() returns the ID value associated with this widget, if any
func (*WidgetImplement) IMEPreeditEvent ¶
func (w *WidgetImplement) IMEPreeditEvent(self Widget, text []rune, blocks []int, focusedBlock int) bool
IMEPreeditEvent() handles preedit text changes of IME (default implementation: do nothing)
func (*WidgetImplement) IMEStatusEvent ¶
func (w *WidgetImplement) IMEStatusEvent(self Widget) bool
IMEStatusEvent() handles IME status change event (default implementation: do nothing)
func (WidgetImplement) IsClipped ¶
func (w WidgetImplement) IsClipped(cx, cy, cw, ch int) bool
func (*WidgetImplement) IsPositionAbsolute ¶
func (w *WidgetImplement) IsPositionAbsolute() bool
AbsolutePosition() returns whether the the object should be skipped by layout engines.
func (*WidgetImplement) KeyboardCharacterEvent ¶
func (w *WidgetImplement) KeyboardCharacterEvent(self Widget, codePoint rune) bool
KeyboardCharacterEvent() handles text input (UTF-32 format) (default implementation: do nothing)
func (*WidgetImplement) KeyboardEvent ¶
func (w *WidgetImplement) KeyboardEvent(self Widget, key glfw.Key, scanCode int, action glfw.Action, modifier glfw.ModifierKey) bool
KeyboardEvent() handles a keyboard event (default implementation: do nothing)
func (*WidgetImplement) Layout ¶
func (w *WidgetImplement) Layout() Layout
Layout() returns the used layout generator
func (*WidgetImplement) MouseButtonEvent ¶
func (w *WidgetImplement) MouseButtonEvent(self Widget, x, y int, button glfw.MouseButton, down bool, modifier glfw.ModifierKey) bool
MouseButtonEvent() handles a mouse button event (default implementation: propagate to children)
func (*WidgetImplement) MouseDragEvent ¶
func (w *WidgetImplement) MouseDragEvent(self Widget, x, y, relX, relY int, button int, modifier glfw.ModifierKey) bool
MouseDragEvent() handles a mouse drag event (default implementation: do nothing)
func (*WidgetImplement) MouseEnterEvent ¶
func (w *WidgetImplement) MouseEnterEvent(self Widget, x, y int, enter bool) bool
MouseEnterEvent() handles a mouse enter/leave event (default implementation: record this fact, but do nothing)
func (*WidgetImplement) MouseMotionEvent ¶
func (w *WidgetImplement) MouseMotionEvent(self Widget, x, y, relX, relY, button int, modifier glfw.ModifierKey) bool
MouseMotionEvent() handles a mouse motion event (default implementation: propagate to children)
func (*WidgetImplement) OnPerformLayout ¶
func (w *WidgetImplement) OnPerformLayout(self Widget, ctx *vg.Context)
PerformLayout() invokes the associated layout generator to properly place child widgets, if any
func (*WidgetImplement) Parent ¶
func (w *WidgetImplement) Parent() Widget
Parent() returns the parent widget
func (*WidgetImplement) Position ¶
func (w *WidgetImplement) Position() (int, int)
Position() returns the position relative to the parent widget
func (*WidgetImplement) PreferredSize ¶
PreferredSize() computes the preferred size of the widget
func (*WidgetImplement) RemoveChild ¶
func (wg *WidgetImplement) RemoveChild(w Widget)
RemoveChild() removes a child widget by value
func (*WidgetImplement) RemoveChildByIndex ¶
func (w *WidgetImplement) RemoveChildByIndex(index int)
RemoveChildByIndex() removes a child widget by index
func (*WidgetImplement) RequestFocus ¶
func (w *WidgetImplement) RequestFocus(self Widget)
RequestFocus() requests the focus to be moved to this widget
func (*WidgetImplement) ScrollEvent ¶
func (w *WidgetImplement) ScrollEvent(self Widget, x, y, relX, relY int) bool
ScrollEvent() handles a mouse scroll event (default implementation: propagate to children)
func (*WidgetImplement) SetChildren ¶
func (w *WidgetImplement) SetChildren(children []Widget)
func (*WidgetImplement) SetClampHeight ¶
func (w *WidgetImplement) SetClampHeight(clamp bool)
SetClampHeight() set the preferred height as fixed height
func (*WidgetImplement) SetClampWidth ¶
func (w *WidgetImplement) SetClampWidth(clamp bool)
SetClampWidth() set the preferred width as fixed width
func (*WidgetImplement) SetCursor ¶
func (w *WidgetImplement) SetCursor(c Cursor)
SetCursor() set the cursor of the widget
func (*WidgetImplement) SetEnabled ¶
func (w *WidgetImplement) SetEnabled(e bool)
/ SetEnabled() set whether or not this widget is currently enabled
func (*WidgetImplement) SetFixedHeight ¶
func (w *WidgetImplement) SetFixedHeight(h int)
SetFixedSize() set the fixed height (see SetFixedSize())
func (*WidgetImplement) SetFixedSize ¶
func (wg *WidgetImplement) SetFixedSize(w, h int)
SetFixedSize() set the fixed size of this widget. If nonzero, components of the fixed size attribute override any values computed by a layout generator associated with this widget. Note that just setting the fixed size alone is not enough to actually change its size; this is done with a call to \ref SetSize or a call to PerformLayout() in the parent widget.
func (*WidgetImplement) SetFixedWidth ¶
func (wg *WidgetImplement) SetFixedWidth(w int)
SetFixedWidth() set the fixed width (see SetFixedSize())
func (*WidgetImplement) SetFocused ¶
func (w *WidgetImplement) SetFocused(f bool)
SetFocused() set whether or not this widget is currently focused
func (*WidgetImplement) SetFontSize ¶
func (w *WidgetImplement) SetFontSize(s int)
SetFontSize() set the font size of this widget
func (*WidgetImplement) SetHeight ¶
func (w *WidgetImplement) SetHeight(h int)
SetHeight() set the height of the widget
func (*WidgetImplement) SetID ¶
func (w *WidgetImplement) SetID(id string)
SetID() associates this widget with an ID value (optional)
func (*WidgetImplement) SetLayout ¶
func (w *WidgetImplement) SetLayout(layout Layout)
SetLayout() set the used layout generator
func (*WidgetImplement) SetParent ¶
func (w *WidgetImplement) SetParent(parent Widget)
SetParent() set the parent widget
func (*WidgetImplement) SetPosition ¶
func (w *WidgetImplement) SetPosition(x, y int)
SetPosition() set the position relative to the parent widget
func (*WidgetImplement) SetSize ¶
func (wg *WidgetImplement) SetSize(w, h int)
SetSize() set the size of the widget
func (*WidgetImplement) SetTheme ¶
func (w *WidgetImplement) SetTheme(theme *Theme)
SetTheme() set the theme used to draw this widget
func (*WidgetImplement) SetTooltip ¶
func (w *WidgetImplement) SetTooltip(s string)
SetTooltip() set tooltip string
func (*WidgetImplement) SetVisible ¶
func (w *WidgetImplement) SetVisible(v bool)
SetVisible() set whether or not the widget is currently visible (assuming all parents are visible)
func (*WidgetImplement) SetWidth ¶
func (wg *WidgetImplement) SetWidth(w int)
SetWidth() set the width of the widget
func (*WidgetImplement) Size ¶
func (w *WidgetImplement) Size() (int, int)
Size() returns the size of the widget
func (*WidgetImplement) String ¶
func (w *WidgetImplement) String() string
func (*WidgetImplement) StringHelper ¶
func (w *WidgetImplement) StringHelper(name, extra string) string
func (*WidgetImplement) Theme ¶
func (w *WidgetImplement) Theme() *Theme
Theme() returns the theme used to draw this widget
func (*WidgetImplement) Tooltip ¶
func (w *WidgetImplement) Tooltip() string
Tooltip() returns tooltip string
func (*WidgetImplement) Visible ¶
func (w *WidgetImplement) Visible() bool
Visible() returns whether or not the widget is currently visible (assuming all parents are visible)
func (*WidgetImplement) VisibleRecursive ¶
func (w *WidgetImplement) VisibleRecursive() bool
VisibleRecursive() checks if this widget is currently visible, taking parent widgets into account
func (*WidgetImplement) Width ¶
func (w *WidgetImplement) Width() int
Width() returns the width of the widget
type Window ¶
type Window struct {
WidgetImplement
EventQueue
// contains filtered or unexported fields
}
func (*Window) BackgroundColor ¶
BackgroundColor() returns the screen's background color
func (*Window) CenterPanel ¶
CenterPanel is an internal helper function
func (*Window) DebugPrint ¶
func (w *Window) DebugPrint()
func (*Window) DisposePanel ¶
DisposePanel is an internal helper function
func (*Window) GLFWWindow ¶
GLFWWindow() returns a pointer to the underlying GLFW panel data structure
func (*Window) InitializeGfx ¶
func (w *Window) InitializeGfx()
func (*Window) KeyboardCharacterEvent ¶
func (*Window) KeyboardEvent ¶
func (*Window) MakeCurrent ¶
func (w *Window) MakeCurrent()
func (*Window) MousePosition ¶
MousePosition() returns the last observed mouse position value
func (*Window) MovePanelToFront ¶
MovePanelToFront is an internal helper function
func (*Window) NVGContext ¶
NVGContext() returns a pointer to the underlying nanoVGo draw context
func (*Window) OnCloseEvent ¶
func (*Window) OnDropEvent ¶
func (*Window) OnKeyEvent ¶
KeyboardEvent() is a default key event handler
func (*Window) OnMouseButton ¶
func (w *Window) OnMouseButton(e *MouseButtonEvent) bool
func (*Window) OnMouseMove ¶
func (w *Window) OnMouseMove(e *MouseMoveEvent) bool
func (*Window) OnResizeEvent ¶
func (w *Window) OnResizeEvent(e *ResizeEvent) bool
func (*Window) OnRuneEvent ¶
KeyboardCharacterEvent() is a text input event handler: codepoint is native endian UTF-32 format
func (*Window) OnScrollEvent ¶
func (w *Window) OnScrollEvent(e *ScrollEvent) bool
func (*Window) PerformLayout ¶
func (w *Window) PerformLayout()
func (*Window) SetBackgroundColor ¶
SetBackgroundColor() sets the screen's background color
func (*Window) SetCaption ¶
SetCaption() sets the panel title bar caption
func (*Window) SetDrawContentsCallback ¶
func (w *Window) SetDrawContentsCallback(callback func())
SetDrawContentsCallback() sets event handler to use OpenGL draw call
func (*Window) SetDropEventCallback ¶
SetDropEventCallback() sets event handler to handle a file drop event
func (*Window) SetResizeEventCallback ¶
SetResizeEventCallback() sets panel resize event handler
func (*Window) SetShutdownGLFWOnDestruct ¶
func (*Window) SetVisible ¶
SetVisible() sets the top-level panel visibility (no effect on full-screen panels)
func (*Window) ShutdownGLFWOnDestruct ¶
func (*Window) UpdateFocus ¶
UpdateFocus is an internal helper function
Source Files
¶
- app.go
- button.go
- checkbox.go
- colorpicker.go
- colorwheel.go
- combobox.go
- constant.go
- entypoicons.go
- eventqueue.go
- events.go
- extlayout.go
- fonts.go
- global.go
- glshader.go
- graph.go
- imagepanel.go
- imageview.go
- keyboard.go
- label.go
- layout.go
- panel.go
- popup.go
- popupbutton.go
- progressbar.go
- slider.go
- spinner.go
- textbox.go
- theme.go
- util.go
- vscrollpanel.go
- widget.go
- window.go