Documentation ¶
Index ¶
- Constants
- Variables
- func Collection() []font_gio.FontFace
- func ColorToRGB(color GoColor) (r uint8, g uint8, b uint8)
- func DisabledBlend(c color.NRGBA) (d color.NRGBA)
- func HoveredBlend(c color.NRGBA) (h color.NRGBA)
- func MulAlpha(col color.NRGBA, alpha uint8) color.NRGBA
- func PaintRect(gtx layout_gio.Context, size image.Point, fill GoColor)
- type AnchorStrategy
- type Buttons
- type C
- type D
- type GioObject
- func (ob *GioObject) AddControl(control GoObject)
- func (ob *GioObject) Clear()
- func (ob *GioObject) DeleteControl(control GoObject)
- func (ob *GioObject) Draw(layout_gio.Context) layout_gio.Dimensions
- func (ob *GioObject) InsertControl(control GoObject, idx int)
- func (ob *GioObject) Objects() (controls []GoObject)
- func (ob *GioObject) ParentControl() (control GoObject)
- func (ob *GioObject) ParentWindow() (window *GoWindowObj)
- func (ob *GioObject) RemoveControl(control GoObject)
- func (ob *GioObject) SetConstraints(size GoSize, cs layout_gio.Constraints) layout_gio.Constraints
- func (ob *GioObject) SetHorizSizePolicy(horiz GoSizeType)
- func (ob *GioObject) SetSizePolicy(horiz GoSizeType, vert GoSizeType)
- func (ob *GioObject) SetVertSizePolicy(vert GoSizeType)
- func (ob *GioObject) SizePolicy() *GoSizePolicy
- type GioWidget
- func (w *GioWidget) ChangeFocus(focus bool) bool
- func (w *GioWidget) ClearFocus() bool
- func (w *GioWidget) Click(e GoPointerEvent)
- func (w *GioWidget) Clicked() (clicked bool)
- func (w *GioWidget) HasFocus() bool
- func (w *GioWidget) Hide()
- func (w *GioWidget) IsFocusEnabled() bool
- func (w *GioWidget) IsHovered() bool
- func (w *GioWidget) IsSelected() bool
- func (w *GioWidget) IsVisible() bool
- func (w *GioWidget) Margin() (margin GoMargin)
- func (w *GioWidget) Padding() (padding GoPadding)
- func (w *GioWidget) ReceiveEvents(gtx layout_gio.Context, keyFilters []event_gio.Filter)
- func (w *GioWidget) SetBackgroundColor(color GoColor)
- func (w *GioWidget) SetBorder(style GoBorderStyle, width int, radius int, color GoColor)
- func (w *GioWidget) SetBorderColor(color GoColor)
- func (w *GioWidget) SetBorderRadius(radius int)
- func (w *GioWidget) SetBorderStyle(style GoBorderStyle)
- func (w *GioWidget) SetBorderWidth(width int)
- func (w *GioWidget) SetFocus() bool
- func (w *GioWidget) SetFocusPolicy(focusPolicy GoFocusPolicy)
- func (w *GioWidget) SetHeight(height int)
- func (w *GioWidget) SetMargin(left int, top int, right int, bottom int)
- func (w *GioWidget) SetMaxHeight(maxHeight int)
- func (w *GioWidget) SetMaxWidth(maxWidth int)
- func (w *GioWidget) SetMinHeight(minHeight int)
- func (w *GioWidget) SetMinWidth(minWidth int)
- func (w *GioWidget) SetOnClearFocus(f func())
- func (w *GioWidget) SetOnKeyEdit(f func(e key_gio.EditEvent))
- func (w *GioWidget) SetOnKeyPress(f func(e key_gio.Event))
- func (w *GioWidget) SetOnKeyRelease(f func(e key_gio.Event))
- func (w *GioWidget) SetOnPointerClick(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerDoubleClick(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerDrag(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerEnter(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerLeave(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerMove(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerPress(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnPointerRelease(f func(e GoPointerEvent))
- func (w *GioWidget) SetOnSetFocus(f func())
- func (w *GioWidget) SetPadding(left int, top int, right int, bottom int)
- func (w *GioWidget) SetSelected(selected bool)
- func (w *GioWidget) SetWidth(width int)
- func (w *GioWidget) Show()
- func (w *GioWidget) SignalEvents(gtx layout_gio.Context)
- func (w *GioWidget) Size() GoSize
- type GoApplicationMode
- type GoApplicationObj
- func (a *GoApplicationObj) AddWindow(w *GoWindowObj)
- func (a *GoApplicationObj) ClipBoard() (clipboard *GoClipBoardObj)
- func (a *GoApplicationObj) Keyboard() (keyboard *GoKeyboardObj)
- func (a *GoApplicationObj) RemoveWindow(w *GoWindowObj)
- func (a *GoApplicationObj) Run()
- func (a *GoApplicationObj) SetModal(modalWin *GoWindowObj)
- func (a *GoApplicationObj) Theme() (theme *GoThemeObj)
- type GoBorder
- type GoBorderStyle
- type GoButtonGroupObj
- func (ob *GoButtonGroupObj) Focused() (string, bool)
- func (ob *GoButtonGroupObj) Hovered() (string, bool)
- func (ob *GoButtonGroupObj) Layout(gtx layout.Context, k string, content layout.Widget) layout.Dimensions
- func (ob *GoButtonGroupObj) Update(gtx layout.Context) bool
- func (ob *GoButtonGroupObj) Value() string
- type GoButtonObj
- func (ob *GoButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoButtonObj) ObjectType() string
- func (ob *GoButtonObj) SetFaceColor(color GoColor)
- func (ob *GoButtonObj) SetOnClick(f func())
- func (ob *GoButtonObj) SetText(text string)
- func (ob *GoButtonObj) SetTextColor(color GoColor)
- func (ob *GoButtonObj) Text() (text string)
- func (ob *GoButtonObj) Widget() *GioWidget
- type GoCanvasCircleObj
- func (ob *GoCanvasCircleObj) Advance()
- func (ob *GoCanvasCircleObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasCircleObj) Centre(x float32, y float32)
- func (ob *GoCanvasCircleObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasCircleObj) Hide()
- func (ob *GoCanvasCircleObj) IsActive() (active bool)
- func (ob *GoCanvasCircleObj) IsAnimated() (animated bool)
- func (ob *GoCanvasCircleObj) IsEnabled() (enabled bool)
- func (ob *GoCanvasCircleObj) IsSelected() (selected bool)
- func (ob *GoCanvasCircleObj) IsVisible() (visible bool)
- func (ob *GoCanvasCircleObj) Move(x float32, y float32)
- func (ob *GoCanvasCircleObj) SetActive(active bool)
- func (ob *GoCanvasCircleObj) SetAnimated(animated bool)
- func (ob *GoCanvasCircleObj) SetEnabled(enabled bool)
- func (ob *GoCanvasCircleObj) SetFillColor(color GoColor)
- func (ob *GoCanvasCircleObj) SetLineColor(color GoColor)
- func (ob *GoCanvasCircleObj) SetLineWidth(width float32)
- func (ob *GoCanvasCircleObj) SetPos(x float32, y float32)
- func (ob *GoCanvasCircleObj) SetRadius(radius float32)
- func (ob *GoCanvasCircleObj) SetSelected(selected bool)
- func (ob *GoCanvasCircleObj) SetVelocity(x int, y int)
- func (ob *GoCanvasCircleObj) SetVisible(visible bool)
- func (ob *GoCanvasCircleObj) SetXVelocity(x int)
- func (ob *GoCanvasCircleObj) SetYVelocity(y int)
- func (ob *GoCanvasCircleObj) SetZ(z int)
- func (ob *GoCanvasCircleObj) Show()
- func (ob *GoCanvasCircleObj) Type() (typeId int)
- func (ob *GoCanvasCircleObj) XVelocity() (x int)
- func (ob *GoCanvasCircleObj) YVelocity() (y int)
- func (ob *GoCanvasCircleObj) Z() (z int)
- type GoCanvasEllipseObj
- func (ob *GoCanvasEllipseObj) Advance()
- func (ob *GoCanvasEllipseObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasEllipseObj) Centre(x float32, y float32)
- func (ob *GoCanvasEllipseObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasEllipseObj) Height() (height float32)
- func (ob *GoCanvasEllipseObj) Hide()
- func (ob *GoCanvasEllipseObj) IsActive() (active bool)
- func (ob *GoCanvasEllipseObj) IsAnimated() (animated bool)
- func (ob *GoCanvasEllipseObj) IsEnabled() (enabled bool)
- func (ob *GoCanvasEllipseObj) IsSelected() (selected bool)
- func (ob *GoCanvasEllipseObj) IsVisible() (visible bool)
- func (ob *GoCanvasEllipseObj) Move(x float32, y float32)
- func (ob *GoCanvasEllipseObj) SetActive(active bool)
- func (ob *GoCanvasEllipseObj) SetAnimated(animated bool)
- func (ob *GoCanvasEllipseObj) SetEnabled(enabled bool)
- func (ob *GoCanvasEllipseObj) SetFillColor(color GoColor)
- func (ob *GoCanvasEllipseObj) SetHeight(height float32)
- func (ob *GoCanvasEllipseObj) SetLineColor(color GoColor)
- func (ob *GoCanvasEllipseObj) SetLineWidth(width float32)
- func (ob *GoCanvasEllipseObj) SetPos(x float32, y float32)
- func (ob *GoCanvasEllipseObj) SetSelected(selected bool)
- func (ob *GoCanvasEllipseObj) SetSize(width float32, height float32)
- func (ob *GoCanvasEllipseObj) SetVelocity(x int, y int)
- func (ob *GoCanvasEllipseObj) SetVisible(visible bool)
- func (ob *GoCanvasEllipseObj) SetWidth(width float32)
- func (ob *GoCanvasEllipseObj) SetXVelocity(x int)
- func (ob *GoCanvasEllipseObj) SetYVelocity(y int)
- func (ob *GoCanvasEllipseObj) SetZ(z int)
- func (ob *GoCanvasEllipseObj) Show()
- func (ob *GoCanvasEllipseObj) Type() (typeId int)
- func (ob *GoCanvasEllipseObj) Width() (width float32)
- func (ob *GoCanvasEllipseObj) XVelocity() (x int)
- func (ob *GoCanvasEllipseObj) YVelocity() (y int)
- func (ob *GoCanvasEllipseObj) Z() (z int)
- type GoCanvasItem
- type GoCanvasLineObj
- func (ob *GoCanvasLineObj) Advance()
- func (ob *GoCanvasLineObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasLineObj) Centre(x float32, y float32)
- func (ob *GoCanvasLineObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasLineObj) Hide()
- func (ob *GoCanvasLineObj) IsActive() (active bool)
- func (ob *GoCanvasLineObj) IsAnimated() (animated bool)
- func (ob *GoCanvasLineObj) IsEnabled() (enabled bool)
- func (ob *GoCanvasLineObj) IsSelected() (selected bool)
- func (ob *GoCanvasLineObj) IsVisible() (visible bool)
- func (ob *GoCanvasLineObj) Move(x float32, y float32)
- func (ob *GoCanvasLineObj) SetActive(active bool)
- func (ob *GoCanvasLineObj) SetAnimated(animated bool)
- func (ob *GoCanvasLineObj) SetEnabled(enabled bool)
- func (ob *GoCanvasLineObj) SetLineColor(color GoColor)
- func (ob *GoCanvasLineObj) SetLineWidth(width float32)
- func (ob *GoCanvasLineObj) SetPoints(startX, startY, endX, endY float32)
- func (ob *GoCanvasLineObj) SetSelected(selected bool)
- func (ob *GoCanvasLineObj) SetVelocity(x int, y int)
- func (ob *GoCanvasLineObj) SetVisible(visible bool)
- func (ob *GoCanvasLineObj) SetXVelocity(x int)
- func (ob *GoCanvasLineObj) SetYVelocity(y int)
- func (ob *GoCanvasLineObj) SetZ(z int)
- func (ob *GoCanvasLineObj) Show()
- func (ob *GoCanvasLineObj) Type() (typeId int)
- func (ob *GoCanvasLineObj) XVelocity() (x int)
- func (ob *GoCanvasLineObj) YVelocity() (y int)
- func (ob *GoCanvasLineObj) Z() (z int)
- type GoCanvasObj
- func (ob *GoCanvasObj) AddCircle(radius, centreX, centreY float32) (hCanvasCircle *GoCanvasCircleObj)
- func (ob *GoCanvasObj) AddEllipse(height, width, centreX, centreY float32) (hCanvasEllipse *GoCanvasEllipseObj)
- func (ob *GoCanvasObj) AddItem(item GoCanvasItem)
- func (ob *GoCanvasObj) AddLine(startX, startY, endX, endY float32) (hCanvasLine *GoCanvasLineObj)
- func (ob *GoCanvasObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoCanvasObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoCanvasObj) ObjectType() string
- func (ob *GoCanvasObj) RemoveItem(item GoCanvasItem)
- func (ob *GoCanvasObj) SetBackgroundColor(color GoColor)
- func (ob *GoCanvasObj) Update()
- func (ob *GoCanvasObj) Widget() *GioWidget
- type GoCanvasPathObj
- func (ob *GoCanvasPathObj) AddPoint(x float32, y float32)
- func (ob *GoCanvasPathObj) Advance()
- func (ob *GoCanvasPathObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasPathObj) Centre(x float32, y float32)
- func (ob *GoCanvasPathObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasPathObj) Hide()
- func (ob *GoCanvasPathObj) IsActive() (active bool)
- func (ob *GoCanvasPathObj) IsAnimated() (animated bool)
- func (ob *GoCanvasPathObj) IsEnabled() (enabled bool)
- func (ob *GoCanvasPathObj) IsSelected() (selected bool)
- func (ob *GoCanvasPathObj) IsVisible() (visible bool)
- func (ob *GoCanvasPathObj) Move(x float32, y float32)
- func (ob *GoCanvasPathObj) SetActive(active bool)
- func (ob *GoCanvasPathObj) SetAnimated(animated bool)
- func (ob *GoCanvasPathObj) SetEnabled(enabled bool)
- func (ob *GoCanvasPathObj) SetFillColor(color GoColor)
- func (ob *GoCanvasPathObj) SetLineColor(color GoColor)
- func (ob *GoCanvasPathObj) SetLineWidth(width float32)
- func (ob *GoCanvasPathObj) SetPos(x float32, y float32)
- func (ob *GoCanvasPathObj) SetSelected(selected bool)
- func (ob *GoCanvasPathObj) SetVelocity(x int, y int)
- func (ob *GoCanvasPathObj) SetVisible(visible bool)
- func (ob *GoCanvasPathObj) SetXVelocity(x int)
- func (ob *GoCanvasPathObj) SetYVelocity(y int)
- func (ob *GoCanvasPathObj) SetZ(z int)
- func (ob *GoCanvasPathObj) Show()
- func (ob *GoCanvasPathObj) Type() (typeId int)
- func (ob *GoCanvasPathObj) XVelocity() (x int)
- func (ob *GoCanvasPathObj) YVelocity() (y int)
- func (ob *GoCanvasPathObj) Z() (z int)
- type GoCanvasRectObj
- func (ob *GoCanvasRectObj) Advance()
- func (ob *GoCanvasRectObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasRectObj) Centre(x float32, y float32)
- func (ob *GoCanvasRectObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasRectObj) Height() (height float32)
- func (ob *GoCanvasRectObj) Hide()
- func (ob *GoCanvasRectObj) IsActive() (active bool)
- func (ob *GoCanvasRectObj) IsAnimated() (animated bool)
- func (ob *GoCanvasRectObj) IsEnabled() (enabled bool)
- func (ob *GoCanvasRectObj) IsSelected() (selected bool)
- func (ob *GoCanvasRectObj) IsVisible() (visible bool)
- func (ob *GoCanvasRectObj) Move(x float32, y float32)
- func (ob *GoCanvasRectObj) SetActive(active bool)
- func (ob *GoCanvasRectObj) SetAnimated(animated bool)
- func (ob *GoCanvasRectObj) SetEnabled(enabled bool)
- func (ob *GoCanvasRectObj) SetFillColor(color GoColor)
- func (ob *GoCanvasRectObj) SetHeight(height float32)
- func (ob *GoCanvasRectObj) SetLineColor(color GoColor)
- func (ob *GoCanvasRectObj) SetLineWidth(width float32)
- func (ob *GoCanvasRectObj) SetPos(x float32, y float32)
- func (ob *GoCanvasRectObj) SetSelected(selected bool)
- func (ob *GoCanvasRectObj) SetSize(width float32, height float32)
- func (ob *GoCanvasRectObj) SetVelocity(x int, y int)
- func (ob *GoCanvasRectObj) SetVisible(visible bool)
- func (ob *GoCanvasRectObj) SetWidth(width float32)
- func (ob *GoCanvasRectObj) SetXVelocity(x int)
- func (ob *GoCanvasRectObj) SetYVelocity(y int)
- func (ob *GoCanvasRectObj) SetZ(z int)
- func (ob *GoCanvasRectObj) Show()
- func (ob *GoCanvasRectObj) Type() (typeId int)
- func (ob *GoCanvasRectObj) Width() (width float32)
- func (ob *GoCanvasRectObj) XVelocity() (x int)
- func (ob *GoCanvasRectObj) YVelocity() (y int)
- func (ob *GoCanvasRectObj) Z() (z int)
- type GoCanvasSplineObj
- func (ob *GoCanvasSplineObj) AddPoint(x float32, y float32)
- func (ob *GoCanvasSplineObj) Advance()
- func (ob *GoCanvasSplineObj) BoundingRect() (x float32, y float32, width float32, height float32)
- func (ob *GoCanvasSplineObj) Centre(x float32, y float32)
- func (ob *GoCanvasSplineObj) Draw(ops *op_gio.Ops)
- func (ob *GoCanvasSplineObj) Hide()
- func (ob *GoCanvasSplineObj) Move(x float32, y float32)
- func (ob *GoCanvasSplineObj) Show()
- func (ob *GoCanvasSplineObj) Type() (typeId int)
- type GoCheckBoxObj
- type GoClipBoardObj
- type GoColor
- type GoEventMaskObj
- type GoFit
- type GoFocusPolicy
- type GoFontStyle
- type GoFontWeight
- type GoIconButtonObj
- func (ob *GoIconButtonObj) Click(e GoPointerEvent)
- func (ob *GoIconButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoIconButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoIconButtonObj) ObjectType() string
- func (ob *GoIconButtonObj) SetFaceColor(color GoColor)
- func (ob *GoIconButtonObj) SetOnClick(f func())
- func (ob *GoIconButtonObj) SetSize(size int)
- func (ob *GoIconButtonObj) SetTextColor(color GoColor)
- func (ob *GoIconButtonObj) Widget() *GioWidget
- type GoIconLabelObj
- type GoIconPNGObj
- type GoIconVGObj
- type GoImageObj
- type GoKeyboardObj
- func (k *GoKeyboardObj) ClearFocus(w *GioWidget) bool
- func (k *GoKeyboardObj) GetFocus() (w *GioWidget)
- func (k *GoKeyboardObj) HasFocus() (focus bool)
- func (k *GoKeyboardObj) SetFocus(w *GioWidget) bool
- func (k *GoKeyboardObj) SetFocusControl(w *GioWidget)
- func (k *GoKeyboardObj) Update() (ok bool)
- type GoLabelObj
- func GoLabel(parent GoObject, text string) (hObj *GoLabelObj)
- func H1Label(parent GoObject, text string) (hObj *GoLabelObj)
- func H2Label(parent GoObject, text string) (hObj *GoLabelObj)
- func H3Label(parent GoObject, text string) (hObj *GoLabelObj)
- func H4Label(parent GoObject, text string) (hObj *GoLabelObj)
- func H5Label(parent GoObject, text string) (hObj *GoLabelObj)
- func H6Label(parent GoObject, text string) (hObj *GoLabelObj)
- func (ob *GoLabelObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoLabelObj) GotFocus()
- func (ob *GoLabelObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoLabelObj) LayoutDetailed(gtx layout_gio.Context, lt *text_gio.Shaper, font font_gio.Font, ...) (dims layout_gio.Dimensions, textInfo TextInfo)
- func (ob *GoLabelObj) LostFocus()
- func (ob *GoLabelObj) ObjectType() string
- func (ob *GoLabelObj) SetExpandingHeight()
- func (ob *GoLabelObj) SetExpandingWidth()
- func (ob *GoLabelObj) SetFixedHeight(height int)
- func (ob *GoLabelObj) SetFixedWidth(width int)
- func (ob *GoLabelObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
- func (ob *GoLabelObj) SetFontBold(bold bool)
- func (ob *GoLabelObj) SetFontItalic(italic bool)
- func (ob *GoLabelObj) SetFontSize(size int)
- func (ob *GoLabelObj) SetFontWeight(weight GoFontWeight)
- func (ob *GoLabelObj) SetHiliteColor(color GoColor)
- func (ob *GoLabelObj) SetMaxLines(size int)
- func (ob *GoLabelObj) SetPreferredHeight()
- func (ob *GoLabelObj) SetPreferredWidth()
- func (ob *GoLabelObj) SetSelectable(selectable bool)
- func (ob *GoLabelObj) SetText(text string)
- func (ob *GoLabelObj) SetTextAlignment(alignment GoTextAlignment)
- func (ob *GoLabelObj) SetTextColor(color GoColor)
- func (ob *GoLabelObj) SetWrap(wrap bool)
- func (ob *GoLabelObj) Text() (text string)
- func (ob *GoLabelObj) TextColor() (color GoColor)
- func (ob *GoLabelObj) Widget() *GioWidget
- type GoLayoutAlignment
- type GoLayoutDirection
- type GoLayoutObj
- func GoBoxLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
- func GoFlexBoxLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
- func GoHBoxLayout(parent GoObject) (hObj *GoLayoutObj)
- func GoHFlexBoxLayout(parent GoObject) (hObj *GoLayoutObj)
- func GoLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
- func GoPopupMenuLayout(parent GoObject) (hObj *GoLayoutObj)
- func GoVBoxLayout(parent GoObject) (hObj *GoLayoutObj)
- func GoVFlexBoxLayout(parent GoObject) (hObj *GoLayoutObj)
- func (ob *GoLayoutObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoLayoutObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
- func (ob *GoLayoutObj) ObjectType() string
- func (ob *GoLayoutObj) ScrollBy(num float32)
- func (ob *GoLayoutObj) ScrollTo(num int)
- func (ob *GoLayoutObj) ScrollToOffset(dx int)
- func (ob *GoLayoutObj) SetAlignment(alignment GoLayoutAlignment)
- func (ob *GoLayoutObj) SetSpacing(spacing GoLayoutSpacing)
- func (ob *GoLayoutObj) Style() GoLayoutStyle
- func (ob *GoLayoutObj) Widget() *GioWidget
- type GoLayoutSpacing
- type GoLayoutStyle
- type GoListBoxObj
- func (ob *GoListBoxObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoListBoxObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
- func (ob *GoListBoxObj) ObjectType() string
- func (ob *GoListBoxObj) SetLayoutMode(mode GoLayoutDirection)
- func (ob *GoListBoxObj) Widget() *GioWidget
- type GoListViewItemObj
- func (ob *GoListViewItemObj) AddListItem(iconData []byte, labelText string) (listItem *GoListViewItemObj)
- func (ob *GoListViewItemObj) ClearHighlight()
- func (ob *GoListViewItemObj) Clicked(e GoPointerEvent)
- func (ob *GoListViewItemObj) DoubleClicked(e GoPointerEvent)
- func (ob *GoListViewItemObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoListViewItemObj) Expand()
- func (ob *GoListViewItemObj) Icon() []byte
- func (ob *GoListViewItemObj) IconSize() int
- func (ob *GoListViewItemObj) Id() int
- func (ob *GoListViewItemObj) InsertListItem(iconData []byte, labelText string, idx int) (listItem *GoListViewItemObj)
- func (ob *GoListViewItemObj) IsExpanded() (expanded bool)
- func (ob *GoListViewItemObj) Item(id int) *GoListViewItemObj
- func (ob *GoListViewItemObj) ItemClicked(nodeId []int)
- func (ob *GoListViewItemObj) ItemCount() (count int)
- func (ob *GoListViewItemObj) ItemDoubleClicked(nodeId []int)
- func (ob *GoListViewItemObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoListViewItemObj) ListView() *GoListViewObj
- func (ob *GoListViewItemObj) MaxLines() int
- func (ob *GoListViewItemObj) ObjectType() string
- func (ob *GoListViewItemObj) PointerEnter(e GoPointerEvent)
- func (ob *GoListViewItemObj) PointerLeave(e GoPointerEvent)
- func (ob *GoListViewItemObj) RemoveListItem(item GoObject, idx int)
- func (ob *GoListViewItemObj) SetExpanded(state bool)
- func (ob *GoListViewItemObj) SetHighlight()
- func (ob *GoListViewItemObj) SetIconColor(color GoColor)
- func (ob *GoListViewItemObj) SetIconSize(size int)
- func (ob *GoListViewItemObj) SetId(id int)
- func (ob *GoListViewItemObj) SetMaxLines(maxlines int)
- func (ob *GoListViewItemObj) Text() string
- func (ob *GoListViewItemObj) Trigger()
- func (ob *GoListViewItemObj) Widget() *GioWidget
- type GoListViewObj
- func (ob *GoListViewObj) AddListItem(iconData []byte, labelText string) (listItem *GoListViewItemObj)
- func (ob *GoListViewObj) ClearList()
- func (ob *GoListViewObj) CurrentSelection() *GoListViewItemObj
- func (ob *GoListViewObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoListViewObj) InsertListItem(iconData []byte, labelText string, idx int) (listItem *GoListViewItemObj)
- func (ob *GoListViewObj) Item(nodeId []int) *GoListViewItemObj
- func (ob *GoListViewObj) ItemByLabel(nodeLabel []string) *GoListViewItemObj
- func (ob *GoListViewObj) ItemClicked(nodeId []int)
- func (ob *GoListViewObj) ItemDoubleClicked(nodeId []int)
- func (ob *GoListViewObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
- func (ob *GoListViewObj) ObjectType() string
- func (ob *GoListViewObj) RemoveListItem(item GoObject)
- func (ob *GoListViewObj) SetLayoutMode(mode GoLayoutDirection)
- func (ob *GoListViewObj) SetOnItemClicked(f func([]int))
- func (ob *GoListViewObj) SetOnItemDoubleClicked(f func([]int))
- func (ob *GoListViewObj) SwitchFocus(item *GoListViewItemObj)
- func (ob *GoListViewObj) Widget() *GioWidget
- type GoLoaderObj
- type GoMargin
- type GoMenuBarObj
- func (ob *GoMenuBarObj) AddMenu(text string) *GoMenuObj
- func (ob *GoMenuBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoMenuBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoMenuBarObj) MenuOffset(id int) int
- func (ob *GoMenuBarObj) ObjectType() string
- func (ob *GoMenuBarObj) SetFixedHeight(height int)
- func (ob *GoMenuBarObj) Widget() *GioWidget
- type GoMenuItemObj
- func (ob *GoMenuItemObj) AddAction(text string, action func()) *GoMenuItemObj
- func (ob *GoMenuItemObj) AddItem(text string) *GoMenuItemObj
- func (ob *GoMenuItemObj) CalcSize(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoMenuItemObj) Click(e GoPointerEvent)
- func (ob *GoMenuItemObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoMenuItemObj) ItemOffset(id int) (offsetX int, offsetY int)
- func (ob *GoMenuItemObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoMenuItemObj) ObjectType() string
- func (ob *GoMenuItemObj) SetOnClick(f func())
- func (ob *GoMenuItemObj) SetText(text string)
- func (ob *GoMenuItemObj) Text() (text string)
- func (ob *GoMenuItemObj) Widget() *GioWidget
- type GoMenuObj
- func (ob *GoMenuObj) AddAction(text string, action func())
- func (ob *GoMenuObj) AddItem(text string) *GoMenuItemObj
- func (ob *GoMenuObj) Click(e GoPointerEvent)
- func (ob *GoMenuObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoMenuObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoMenuObj) MenuOffset() int
- func (ob *GoMenuObj) ObjectType() string
- func (ob *GoMenuObj) SetOnClick(f func())
- func (ob *GoMenuObj) SetText(text string)
- func (ob *GoMenuObj) Text() (text string)
- func (ob *GoMenuObj) Widget() *GioWidget
- type GoObject
- type GoPadding
- type GoPalette
- type GoPointerEvent
- type GoPopupMenuObj
- func (ob *GoPopupMenuObj) Clear()
- func (ob *GoPopupMenuObj) Click(e GoPointerEvent)
- func (ob *GoPopupMenuObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoPopupMenuObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoPopupMenuObj) ObjectType() string
- func (ob *GoPopupMenuObj) Widget() *GioWidget
- type GoPopupWindowObj
- func (ob *GoPopupWindowObj) Click(e GoPointerEvent)
- func (ob *GoPopupWindowObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoPopupWindowObj) Hide()
- func (ob *GoPopupWindowObj) Layout() *GoLayoutObj
- func (ob *GoPopupWindowObj) ObjectType() string
- func (ob *GoPopupWindowObj) SetLayoutStyle(style GoLayoutStyle)
- func (ob *GoPopupWindowObj) SetSize(width int, height int)
- func (ob *GoPopupWindowObj) Show()
- func (ob *GoPopupWindowObj) Widget() *GioWidget
- type GoPos
- type GoPosDp
- type GoProgressBarObj
- func (ob *GoProgressBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoProgressBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoProgressBarObj) LineThickness() int
- func (ob *GoProgressBarObj) ObjectType() string
- func (ob *GoProgressBarObj) Progress() int
- func (ob *GoProgressBarObj) SetLineThickness(thickness int)
- func (ob *GoProgressBarObj) SetProgress(progress int)
- func (ob *GoProgressBarObj) SetTotalSteps(totalSteps int)
- func (ob *GoProgressBarObj) TotalSteps() int
- func (ob *GoProgressBarObj) Widget() *GioWidget
- type GoProgressCircleObj
- type GoRadioButtonObj
- func (ob *GoRadioButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoRadioButtonObj) Focused() (focused bool)
- func (ob *GoRadioButtonObj) Hovered() (hovered bool)
- func (ob *GoRadioButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoRadioButtonObj) ObjectType() string
- func (ob *GoRadioButtonObj) Selected() (selected bool)
- func (ob *GoRadioButtonObj) SetOnChange(f func(bool))
- func (ob *GoRadioButtonObj) SetOnFocus(f func(string))
- func (ob *GoRadioButtonObj) SetOnHover(f func(string))
- func (ob *GoRadioButtonObj) State() (state bool)
- func (ob *GoRadioButtonObj) Widget() *GioWidget
- type GoRect
- type GoRichTextObj
- func (ob *GoRichTextObj) AddContent(spans []richtext.SpanStyle)
- func (ob *GoRichTextObj) AddSpan(text string)
- func (ob *GoRichTextObj) AnchorTable(ref string) (offset int)
- func (ob *GoRichTextObj) Clear()
- func (ob *GoRichTextObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoRichTextObj) Font() font_gio.Font
- func (ob *GoRichTextObj) FontBold() bool
- func (ob *GoRichTextObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoRichTextObj) LoadMarkDown(src string)
- func (ob *GoRichTextObj) Name() string
- func (ob *GoRichTextObj) ObjectType() string
- func (ob *GoRichTextObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
- func (ob *GoRichTextObj) SetFontBold(bold bool)
- func (ob *GoRichTextObj) SetFontColor(color GoColor)
- func (ob *GoRichTextObj) SetFontSize(size int)
- func (ob *GoRichTextObj) SetFontWeight(weight GoFontWeight)
- func (ob *GoRichTextObj) SetOnLinkClick(f func(string))
- func (ob *GoRichTextObj) Title() string
- func (ob *GoRichTextObj) Widget() *GioWidget
- type GoScrollbar
- type GoSize
- type GoSizeDp
- type GoSizePolicy
- type GoSizeType
- type GoSliderObj
- func (ob *GoSliderObj) Changed() bool
- func (ob *GoSliderObj) Dragging() bool
- func (ob *GoSliderObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoSliderObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoSliderObj) ObjectType() string
- func (ob *GoSliderObj) SetMaxValue(max int)
- func (ob *GoSliderObj) SetMinValue(min int)
- func (ob *GoSliderObj) SetOnChange(f func(int))
- func (ob *GoSliderObj) SetOnDrag(f func(float32))
- func (ob *GoSliderObj) SetValue(value int)
- func (ob *GoSliderObj) Value() int
- func (ob *GoSliderObj) Widget() *GioWidget
- type GoSpacerObj
- type GoStatusBarObj
- func (ob *GoStatusBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoStatusBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoStatusBarObj) ObjectType() string
- func (ob *GoStatusBarObj) SetFixedHeight(height int)
- func (ob *GoStatusBarObj) Widget() *GioWidget
- type GoSwitchObj
- func (ob *GoSwitchObj) Clicked(e GoPointerEvent)
- func (ob *GoSwitchObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoSwitchObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoSwitchObj) ObjectType() string
- func (ob *GoSwitchObj) SetOnChange(f func(bool))
- func (ob *GoSwitchObj) Widget() *GioWidget
- type GoTextAlignment
- type GoTextEditObj
- func (ob *GoTextEditObj) ClearSelection()
- func (ob *GoTextEditObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
- func (ob *GoTextEditObj) Focused() bool
- func (ob *GoTextEditObj) Font() font_gio.Font
- func (ob *GoTextEditObj) FontBold() bool
- func (ob *GoTextEditObj) GotFocus()
- func (ob *GoTextEditObj) Insert(text string)
- func (ob *GoTextEditObj) KeyEdit(e key_gio.EditEvent)
- func (ob *GoTextEditObj) KeyPressed(e key_gio.Event)
- func (ob *GoTextEditObj) KeyReleased(e key_gio.Event)
- func (ob *GoTextEditObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
- func (ob *GoTextEditObj) Length() (length int)
- func (ob *GoTextEditObj) LostFocus()
- func (ob *GoTextEditObj) ObjectType() string
- func (ob *GoTextEditObj) PointerDragged(e GoPointerEvent)
- func (ob *GoTextEditObj) PointerPressed(e GoPointerEvent)
- func (ob *GoTextEditObj) PointerReleased(e GoPointerEvent)
- func (ob *GoTextEditObj) SelectedText() (text string)
- func (ob *GoTextEditObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
- func (ob *GoTextEditObj) SetFontBold(bold bool)
- func (ob *GoTextEditObj) SetFontColor(color GoColor)
- func (ob *GoTextEditObj) SetFontSize(size int)
- func (ob *GoTextEditObj) SetFontWeight(weight GoFontWeight)
- func (ob *GoTextEditObj) SetKeys(ctlKeys []event_gio.Filter)
- func (ob *GoTextEditObj) SetSingleLine(singleLine bool)
- func (ob *GoTextEditObj) SetText(text string)
- func (ob *GoTextEditObj) SingleLine() (singleLine bool)
- func (ob *GoTextEditObj) Text() (text string)
- func (ob *GoTextEditObj) Widget() *GioWidget
- type GoThemeObj
- type GoWindowMode
- type GoWindowObj
- func (ob *GoWindowObj) AddPopupMenu() (popupMenu *GoPopupMenuObj)
- func (ob *GoWindowObj) Centre()
- func (ob *GoWindowObj) ClearPopupMenus()
- func (ob *GoWindowObj) ClientPos() (xDp int, yDp int)
- func (ob *GoWindowObj) ClientSize() (widthDp int, heightp int)
- func (ob *GoWindowObj) Close()
- func (ob *GoWindowObj) EscFullScreen()
- func (ob *GoWindowObj) GoFullScreen()
- func (ob *GoWindowObj) IsMainWindow() (isMain bool)
- func (ob *GoWindowObj) IsModal() (isModal bool)
- func (ob *GoWindowObj) Layout() (layout *GoLayoutObj)
- func (ob *GoWindowObj) Maximize()
- func (ob *GoWindowObj) MenuBar() *GoMenuBarObj
- func (ob *GoWindowObj) MenuPopup(idx int) (popupMenu *GoPopupMenuObj)
- func (ob *GoWindowObj) Minimize()
- func (ob *GoWindowObj) ModalStyle() string
- func (ob *GoWindowObj) ObjectType() string
- func (ob *GoWindowObj) PopupWindow() *GoPopupWindowObj
- func (ob *GoWindowObj) Pos() (xDp int, yDp int)
- func (ob *GoWindowObj) Raise()
- func (ob *GoWindowObj) Refresh()
- func (ob *GoWindowObj) SetBorder(style GoBorderStyle, width int, radius int, color GoColor)
- func (ob *GoWindowObj) SetBorderColor(color GoColor)
- func (ob *GoWindowObj) SetBorderRadius(radius int)
- func (ob *GoWindowObj) SetBorderStyle(style GoBorderStyle)
- func (ob *GoWindowObj) SetBorderWidth(width int)
- func (ob *GoWindowObj) SetLayoutStyle(style GoLayoutStyle)
- func (ob *GoWindowObj) SetMargin(left int, top int, right int, bottom int)
- func (ob *GoWindowObj) SetOnClose(f func())
- func (ob *GoWindowObj) SetOnConfig(f func())
- func (ob *GoWindowObj) SetOnPointerMove(f func(e pointer_gio.Event))
- func (ob *GoWindowObj) SetOnPointerPress(f func(e pointer_gio.Event))
- func (ob *GoWindowObj) SetOnPointerRelease(f func(e pointer_gio.Event))
- func (ob *GoWindowObj) SetPadding(left int, top int, right int, bottom int)
- func (ob *GoWindowObj) SetPos(xDp int, yDp int)
- func (ob *GoWindowObj) SetSize(widthDp int, heightDp int)
- func (ob *GoWindowObj) SetSpacing(spacing GoLayoutSpacing)
- func (ob *GoWindowObj) SetTitle(title string)
- func (ob *GoWindowObj) Show()
- func (ob *GoWindowObj) ShowModal() (action int, info string)
- func (ob *GoWindowObj) Size() (widthDp int, heightDp int)
- func (ob *GoWindowObj) SizePx() (widthPx int, heightPx int)
- func (ob *GoWindowObj) StatusBar() *GoStatusBarObj
- func (ob *GoWindowObj) Title() (title string)
- func (ob *GoWindowObj) Widget() *GioWidget
- type ID
- type Modifiers
- type Priority
- type ScrollIndicatorStyle
- type ScrollTrackStyle
- type Source
- type TextInfo
- type Type
Constants ¶
const ( CanvasLine int = iota CanvasRectangle CanvasCircle CanvasEllipse CanvasPath CanvasSpline )
const ( Horizontal = 0 Vertical = 1 )
Variables ¶
var GoDpr float32 = 1
var GoSpr float32 = 1
Functions ¶
func Collection ¶ added in v0.0.2
Regular returns a collection of all available Go font faces.
func DisabledBlend ¶
Disabled blends color towards the luminance and multiplies alpha. Blending towards luminance will desaturate the color. Multiplying alpha blends the color together more with the background.
func HoveredBlend ¶
Hovered blends dark colors towards white, and light colors towards black. It is approximate because it operates in non-linear sRGB space.
Types ¶
type AnchorStrategy ¶
type AnchorStrategy uint8
AnchorStrategy defines a means of attaching a scrollbar to content.
const ( // Occupy reserves space for the scrollbar, making the underlying // content region smaller on one axis. Occupy AnchorStrategy = iota // Overlay causes the scrollbar to float atop the content without // occupying any space. Content in the underlying area can be occluded // by the scrollbar. Overlay )
type Buttons ¶ added in v0.0.10
type Buttons uint8
Buttons is a set of mouse buttons
const ( // ButtonPrimary is the primary button, usually the left button for a // right-handed user. ButtonPrimary Buttons = 1 << iota // ButtonSecondary is the secondary button, usually the right button for a // right-handed user. ButtonSecondary // ButtonTertiary is the tertiary button, usually the middle button. ButtonTertiary )
type C ¶
type C = layout_gio.Context
type D ¶
type D = layout_gio.Dimensions
type GioObject ¶
type GioObject struct { Parent GoObject Window *GoWindowObj Controls []GoObject GoSizePolicy *GoSizePolicy }
func (*GioObject) AddControl ¶
func (*GioObject) DeleteControl ¶
func (*GioObject) Draw ¶
func (ob *GioObject) Draw(layout_gio.Context) layout_gio.Dimensions
func (*GioObject) InsertControl ¶
func (*GioObject) ParentControl ¶
func (*GioObject) ParentWindow ¶
func (ob *GioObject) ParentWindow() (window *GoWindowObj)
func (*GioObject) RemoveControl ¶
func (*GioObject) SetConstraints ¶ added in v0.0.6
func (ob *GioObject) SetConstraints(size GoSize, cs layout_gio.Constraints) layout_gio.Constraints
func (*GioObject) SetHorizSizePolicy ¶ added in v0.0.3
func (ob *GioObject) SetHorizSizePolicy(horiz GoSizeType)
func (*GioObject) SetSizePolicy ¶
func (ob *GioObject) SetSizePolicy(horiz GoSizeType, vert GoSizeType)
func (*GioObject) SetVertSizePolicy ¶ added in v0.0.3
func (ob *GioObject) SetVertSizePolicy(vert GoSizeType)
func (*GioObject) SizePolicy ¶
func (ob *GioObject) SizePolicy() *GoSizePolicy
type GioWidget ¶
type GioWidget struct { GoBorder // border drawn surrounding widget GoMargin // clear margin surrounding widget GoPadding // clear padding within widget GoSize // Fixed, Min and Max sizes Visible bool // windows 10 System Colors BackColor GoColor // COLOR_WINDOW BackgroundColor GoColor // COLOR_WINDOW ButtonText GoColor // COLOR_BTNTEXT Foreground color for button text. FaceColor GoColor // COLOR_BTNFACE Background color for button. ForeColor GoColor // COLOR_WINDOWTEXT GrayText GoColor // COLOR_GRAYTEXT Foreground color for disabled button text. Highlight GoColor // COLOR_HIGHLIGHT Background color for slected button. HighlightText GoColor // COLOR_HIGHLIGHTTEXT Foreground color for slected button text. Hotlight GoColor // COLOR_HOTLIGHT Hyperlink color. FocusPolicy GoFocusPolicy // contains filtered or unexported fields }
func (*GioWidget) ChangeFocus ¶
func (*GioWidget) ChangeFocus(focus bool) (bool) Changes focus on the widget if it can accept keyboard focus
func (*GioWidget) ClearFocus ¶
func (*GioWidget) ClearFocus() (bool) Notifies the App to switch the keyboard focus to nil
func (*GioWidget) Click ¶
func (w *GioWidget) Click(e GoPointerEvent)
func (*GioWidget) IsFocusEnabled ¶
func (*GioWidget) IsSelected ¶
func (*GioWidget) Margin ¶
func (*GioWidget) Margin() (margin GoMargin) Returns the margin rect for the positioning dimensions for this goWidget within its parent. see goWidget positioning and geometry.
func (*GioWidget) Padding ¶
func (*GioWidget) Padding() (padding GoPadding) Returns the padding dimensions for the positioning of clients within their parent. see goWidget positioning and geometry.
func (*GioWidget) ReceiveEvents ¶
func (w *GioWidget) ReceiveEvents(gtx layout_gio.Context, keyFilters []event_gio.Filter)
func (*GioWidget) SetBackgroundColor ¶
func (*GioWidget) SetBorder ¶
func (w *GioWidget) SetBorder(style GoBorderStyle, width int, radius int, color GoColor)
func (*GioWidget) SetBorderColor ¶
func (*GioWidget) SetBorderRadius ¶
func (*GioWidget) SetBorderStyle ¶
func (w *GioWidget) SetBorderStyle(style GoBorderStyle)
func (*GioWidget) SetBorderWidth ¶
func (*GioWidget) SetFocus ¶
func (*GioWidget) SetFocus() (bool) Notifies the App to switch the keyboard focus to this widget
func (*GioWidget) SetFocusPolicy ¶
func (w *GioWidget) SetFocusPolicy(focusPolicy GoFocusPolicy)
func (*GioWidget) SetFocusPolicy(focusPolicy GoFocusPolicy) Sets the keyboard focus policy for this widget
func (*GioWidget) SetMaxHeight ¶
func (*GioWidget) SetMaxWidth ¶
func (*GioWidget) SetMinHeight ¶
func (*GioWidget) SetMinWidth ¶
func (*GioWidget) SetOnClearFocus ¶
func (w *GioWidget) SetOnClearFocus(f func())
func (*GioWidget) SetOnKeyEdit ¶
func (*GioWidget) SetOnKeyPress ¶
func (*GioWidget) SetOnKeyRelease ¶
func (*GioWidget) SetOnPointerClick ¶
func (w *GioWidget) SetOnPointerClick(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerDoubleClick ¶
func (w *GioWidget) SetOnPointerDoubleClick(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerDrag ¶
func (w *GioWidget) SetOnPointerDrag(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerEnter ¶
func (w *GioWidget) SetOnPointerEnter(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerLeave ¶
func (w *GioWidget) SetOnPointerLeave(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerMove ¶
func (w *GioWidget) SetOnPointerMove(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerPress ¶
func (w *GioWidget) SetOnPointerPress(f func(e GoPointerEvent))
func (*GioWidget) SetOnPointerRelease ¶
func (w *GioWidget) SetOnPointerRelease(f func(e GoPointerEvent))
func (*GioWidget) SetOnSetFocus ¶
func (w *GioWidget) SetOnSetFocus(f func())
func (*GioWidget) SetPadding ¶
func (*GioWidget) SetSelected ¶
func (*GioWidget) SignalEvents ¶
func (w *GioWidget) SignalEvents(gtx layout_gio.Context)
type GoApplicationMode ¶ added in v0.0.8
type GoApplicationMode int
const ( WindowedMode GoApplicationMode = iota // enables all GoWindows. ModalMode // sets modal window on top. )
type GoApplicationObj ¶
type GoApplicationObj struct {
// contains filtered or unexported fields
}
var GoApp *GoApplicationObj = nil
func GoApplication ¶
func GoApplication(appName string) (a *GoApplicationObj)
- <a name=\"goApplication\"></a> [**GoApplication**](api.GoApplication#goApplication)( appName **string** ) ( app [***GoApplicationObj**](#goApplicationObj) )\n - Initialise the application. Instantiate the GoApp global reference.\n\n
func (*GoApplicationObj) AddWindow ¶
func (a *GoApplicationObj) AddWindow(w *GoWindowObj)
- <a name=\"addWindow\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**AddWindow(** win [***GoWindowObj**](api.GoWindow#) **)**\n - - Add a new window to the application.\n\n
func (*GoApplicationObj) ClipBoard ¶
func (a *GoApplicationObj) ClipBoard() (clipboard *GoClipBoardObj)
- <a name=\"clipBoard\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**ClipBoard() (** clipboard [***GoClipBoardObj**](api.GoClipBoard#) **)**\n - - Return the application clipboard.\n\n
func (*GoApplicationObj) Keyboard ¶
func (a *GoApplicationObj) Keyboard() (keyboard *GoKeyboardObj)
- <a name=\"keyboard\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**Keyboard() (** keyboard [***GoKeyboardObj**](api.GoKeyboard#) **)**\n - - Return the application keyboard.\n\n
func (*GoApplicationObj) RemoveWindow ¶
func (a *GoApplicationObj) RemoveWindow(w *GoWindowObj)
- <a name=\"removeWindow\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**RemoveWindow(** win [***GoWindowObj**](api.GoWindow#) **)**\n - - Remove a window from the application.\nIf the window is the main window then the application will be shut down.\n\n
func (*GoApplicationObj) Run ¶
func (a *GoApplicationObj) Run()
- <a name=\"run\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**Run()**\n - - Run the application main loop.\n\n
func (*GoApplicationObj) SetModal ¶ added in v0.0.8
func (a *GoApplicationObj) SetModal(modalWin *GoWindowObj)
- <a name=\"setModal\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**SetModal(** modalWin [***GoWindowObj**](api.GoWindow#) **)**\n - - Set the window to run as a modal window.\n All other windows running under the application will be disabled.\n\n
func (*GoApplicationObj) Theme ¶
func (a *GoApplicationObj) Theme() (theme *GoThemeObj)
- <a name=\"theme\"></a> **(ob** [***GoApplicationObj**](api.GoApplication#)**)**.**Theme() (** theme [***GoThemeObj**](api.GoTheme#) **)**\n - - Return the application main theme.\n\n
type GoBorder ¶
type GoBorder struct { BStyle GoBorderStyle BColor GoColor BRadius int BWidth int FillColor GoColor }
func (GoBorder) Layout ¶
func (b GoBorder) Layout(gtx layout_gio.Context, w layout_gio.Widget) layout_gio.Dimensions
type GoBorderStyle ¶
type GoBorderStyle int
const ( BorderNone GoBorderStyle = iota BorderSingleLine BorderSunken BorderSunkenThick BorderRaised )
type GoButtonGroupObj ¶ added in v0.0.3
type GoButtonGroupObj struct {
// contains filtered or unexported fields
}
func GoButtonGroup ¶ added in v0.0.3
func GoButtonGroup() *GoButtonGroupObj
func (*GoButtonGroupObj) Focused ¶ added in v0.0.3
func (ob *GoButtonGroupObj) Focused() (string, bool)
Focused reports the focused key, or false if no key is focused.
func (*GoButtonGroupObj) Hovered ¶ added in v0.0.3
func (ob *GoButtonGroupObj) Hovered() (string, bool)
Hovered returns the key that is highlighted, or false if none are.
func (*GoButtonGroupObj) Layout ¶ added in v0.0.3
func (ob *GoButtonGroupObj) Layout(gtx layout.Context, k string, content layout.Widget) layout.Dimensions
Layout adds the event handler for the key k.
func (*GoButtonGroupObj) Update ¶ added in v0.0.3
func (ob *GoButtonGroupObj) Update(gtx layout.Context) bool
Value has changed by user interaction.
func (*GoButtonGroupObj) Value ¶ added in v0.0.3
func (ob *GoButtonGroupObj) Value() string
type GoButtonObj ¶
func GoButton ¶
func GoButton(parent GoObject, text string) (hObj *GoButtonObj)
func (*GoButtonObj) Draw ¶
func (ob *GoButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoButtonObj) Layout ¶
func (ob *GoButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoButtonObj) ObjectType ¶
func (ob *GoButtonObj) ObjectType() string
func (*GoButtonObj) SetFaceColor ¶ added in v0.0.6
func (ob *GoButtonObj) SetFaceColor(color GoColor)
func (*GoButtonObj) SetOnClick ¶
func (ob *GoButtonObj) SetOnClick(f func())
func (*GoButtonObj) SetText ¶
func (ob *GoButtonObj) SetText(text string)
func (*GoButtonObj) SetTextColor ¶ added in v0.0.6
func (ob *GoButtonObj) SetTextColor(color GoColor)
func (*GoButtonObj) Text ¶
func (ob *GoButtonObj) Text() (text string)
func (*GoButtonObj) Widget ¶
func (ob *GoButtonObj) Widget() *GioWidget
type GoCanvasCircleObj ¶
type GoCanvasCircleObj struct {
// contains filtered or unexported fields
}
func GoCanvasCircle ¶
func GoCanvasCircle(parent *GoCanvasObj) (hCanvasCircle *GoCanvasCircleObj)
func (*GoCanvasCircleObj) Advance ¶
func (ob *GoCanvasCircleObj) Advance()
func (*GoCanvasCircleObj) BoundingRect ¶
func (ob *GoCanvasCircleObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasCircleObj) Centre ¶
func (ob *GoCanvasCircleObj) Centre(x float32, y float32)
func (*GoCanvasCircleObj) Draw ¶
func (ob *GoCanvasCircleObj) Draw(ops *op_gio.Ops)
func (*GoCanvasCircleObj) Hide ¶
func (ob *GoCanvasCircleObj) Hide()
func (*GoCanvasCircleObj) IsAnimated ¶
func (ob *GoCanvasCircleObj) IsAnimated() (animated bool)
func (*GoCanvasCircleObj) IsSelected ¶
func (ob *GoCanvasCircleObj) IsSelected() (selected bool)
func (*GoCanvasCircleObj) Move ¶
func (ob *GoCanvasCircleObj) Move(x float32, y float32)
func (*GoCanvasCircleObj) SetAnimated ¶
func (ob *GoCanvasCircleObj) SetAnimated(animated bool)
func (*GoCanvasCircleObj) SetEnabled ¶
func (ob *GoCanvasCircleObj) SetEnabled(enabled bool)
func (*GoCanvasCircleObj) SetFillColor ¶
func (ob *GoCanvasCircleObj) SetFillColor(color GoColor)
func (*GoCanvasCircleObj) SetLineColor ¶
func (ob *GoCanvasCircleObj) SetLineColor(color GoColor)
func (*GoCanvasCircleObj) SetLineWidth ¶
func (ob *GoCanvasCircleObj) SetLineWidth(width float32)
func (*GoCanvasCircleObj) SetPos ¶
func (ob *GoCanvasCircleObj) SetPos(x float32, y float32)
func (*GoCanvasCircleObj) SetRadius ¶
func (ob *GoCanvasCircleObj) SetRadius(radius float32)
func (*GoCanvasCircleObj) SetSelected ¶
func (ob *GoCanvasCircleObj) SetSelected(selected bool)
func (*GoCanvasCircleObj) SetVelocity ¶
func (*GoCanvasCircleObj) SetVisible ¶
func (ob *GoCanvasCircleObj) SetVisible(visible bool)
func (*GoCanvasCircleObj) SetXVelocity ¶
func (ob *GoCanvasCircleObj) SetXVelocity(x int)
func (*GoCanvasCircleObj) SetYVelocity ¶
func (ob *GoCanvasCircleObj) SetYVelocity(y int)
type GoCanvasEllipseObj ¶
type GoCanvasEllipseObj struct {
// contains filtered or unexported fields
}
func GoCanvasEllipse ¶
func GoCanvasEllipse(parent *GoCanvasObj) (hCanvasEllipse *GoCanvasEllipseObj)
func (*GoCanvasEllipseObj) Advance ¶
func (ob *GoCanvasEllipseObj) Advance()
func (*GoCanvasEllipseObj) BoundingRect ¶
func (ob *GoCanvasEllipseObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasEllipseObj) Centre ¶
func (ob *GoCanvasEllipseObj) Centre(x float32, y float32)
func (*GoCanvasEllipseObj) Draw ¶
func (ob *GoCanvasEllipseObj) Draw(ops *op_gio.Ops)
func (*GoCanvasEllipseObj) Height ¶
func (ob *GoCanvasEllipseObj) Height() (height float32)
func (*GoCanvasEllipseObj) Hide ¶
func (ob *GoCanvasEllipseObj) Hide()
func (*GoCanvasEllipseObj) IsAnimated ¶
func (ob *GoCanvasEllipseObj) IsAnimated() (animated bool)
func (*GoCanvasEllipseObj) IsSelected ¶
func (ob *GoCanvasEllipseObj) IsSelected() (selected bool)
func (*GoCanvasEllipseObj) Move ¶
func (ob *GoCanvasEllipseObj) Move(x float32, y float32)
func (*GoCanvasEllipseObj) SetAnimated ¶
func (ob *GoCanvasEllipseObj) SetAnimated(animated bool)
func (*GoCanvasEllipseObj) SetEnabled ¶
func (ob *GoCanvasEllipseObj) SetEnabled(enabled bool)
func (*GoCanvasEllipseObj) SetFillColor ¶
func (ob *GoCanvasEllipseObj) SetFillColor(color GoColor)
func (*GoCanvasEllipseObj) SetHeight ¶
func (ob *GoCanvasEllipseObj) SetHeight(height float32)
func (*GoCanvasEllipseObj) SetLineColor ¶
func (ob *GoCanvasEllipseObj) SetLineColor(color GoColor)
func (*GoCanvasEllipseObj) SetLineWidth ¶
func (ob *GoCanvasEllipseObj) SetLineWidth(width float32)
func (*GoCanvasEllipseObj) SetPos ¶
func (ob *GoCanvasEllipseObj) SetPos(x float32, y float32)
func (*GoCanvasEllipseObj) SetSelected ¶
func (ob *GoCanvasEllipseObj) SetSelected(selected bool)
func (*GoCanvasEllipseObj) SetSize ¶
func (ob *GoCanvasEllipseObj) SetSize(width float32, height float32)
func (*GoCanvasEllipseObj) SetVelocity ¶
func (*GoCanvasEllipseObj) SetVisible ¶
func (ob *GoCanvasEllipseObj) SetVisible(visible bool)
func (*GoCanvasEllipseObj) SetWidth ¶
func (ob *GoCanvasEllipseObj) SetWidth(width float32)
func (*GoCanvasEllipseObj) SetXVelocity ¶
func (ob *GoCanvasEllipseObj) SetXVelocity(x int)
func (*GoCanvasEllipseObj) SetYVelocity ¶
func (ob *GoCanvasEllipseObj) SetYVelocity(y int)
func (*GoCanvasEllipseObj) Width ¶
func (ob *GoCanvasEllipseObj) Width() (width float32)
type GoCanvasItem ¶
type GoCanvasLineObj ¶
type GoCanvasLineObj struct {
// contains filtered or unexported fields
}
func GoCanvasLine ¶
func GoCanvasLine(parent *GoCanvasObj) (hCanvasLine *GoCanvasLineObj)
func (*GoCanvasLineObj) Advance ¶
func (ob *GoCanvasLineObj) Advance()
func (*GoCanvasLineObj) BoundingRect ¶
func (ob *GoCanvasLineObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasLineObj) Centre ¶
func (ob *GoCanvasLineObj) Centre(x float32, y float32)
func (*GoCanvasLineObj) Draw ¶
func (ob *GoCanvasLineObj) Draw(ops *op_gio.Ops)
func (*GoCanvasLineObj) IsAnimated ¶
func (ob *GoCanvasLineObj) IsAnimated() (animated bool)
func (*GoCanvasLineObj) IsSelected ¶
func (ob *GoCanvasLineObj) IsSelected() (selected bool)
func (*GoCanvasLineObj) Move ¶
func (ob *GoCanvasLineObj) Move(x float32, y float32)
func (*GoCanvasLineObj) SetAnimated ¶
func (ob *GoCanvasLineObj) SetAnimated(animated bool)
func (*GoCanvasLineObj) SetEnabled ¶
func (ob *GoCanvasLineObj) SetEnabled(enabled bool)
func (*GoCanvasLineObj) SetLineColor ¶
func (ob *GoCanvasLineObj) SetLineColor(color GoColor)
func (*GoCanvasLineObj) SetLineWidth ¶
func (ob *GoCanvasLineObj) SetLineWidth(width float32)
func (*GoCanvasLineObj) SetPoints ¶
func (ob *GoCanvasLineObj) SetPoints(startX, startY, endX, endY float32)
func (*GoCanvasLineObj) SetSelected ¶
func (ob *GoCanvasLineObj) SetSelected(selected bool)
func (*GoCanvasLineObj) SetVelocity ¶
func (*GoCanvasLineObj) SetVisible ¶
func (ob *GoCanvasLineObj) SetVisible(visible bool)
func (*GoCanvasLineObj) SetXVelocity ¶
func (ob *GoCanvasLineObj) SetXVelocity(x int)
func (*GoCanvasLineObj) SetYVelocity ¶
func (ob *GoCanvasLineObj) SetYVelocity(y int)
type GoCanvasObj ¶
func GoCanvas ¶
func GoCanvas(parent GoObject) (hObj *GoCanvasObj)
func (*GoCanvasObj) AddCircle ¶
func (ob *GoCanvasObj) AddCircle(radius, centreX, centreY float32) (hCanvasCircle *GoCanvasCircleObj)
func (*GoCanvasObj) AddEllipse ¶
func (ob *GoCanvasObj) AddEllipse(height, width, centreX, centreY float32) (hCanvasEllipse *GoCanvasEllipseObj)
func (*GoCanvasObj) AddItem ¶
func (ob *GoCanvasObj) AddItem(item GoCanvasItem)
func (*GoCanvasObj) AddLine ¶
func (ob *GoCanvasObj) AddLine(startX, startY, endX, endY float32) (hCanvasLine *GoCanvasLineObj)
func (*GoCanvasObj) Draw ¶
func (ob *GoCanvasObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoCanvasObj) Layout ¶
func (ob *GoCanvasObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoCanvasObj) ObjectType ¶
func (ob *GoCanvasObj) ObjectType() string
func (*GoCanvasObj) RemoveItem ¶
func (ob *GoCanvasObj) RemoveItem(item GoCanvasItem)
func (*GoCanvasObj) SetBackgroundColor ¶
func (ob *GoCanvasObj) SetBackgroundColor(color GoColor)
func (*GoCanvasObj) Update ¶
func (ob *GoCanvasObj) Update()
func (*GoCanvasObj) Widget ¶
func (ob *GoCanvasObj) Widget() *GioWidget
type GoCanvasPathObj ¶
type GoCanvasPathObj struct {
// contains filtered or unexported fields
}
func GoCanvasPath ¶
func GoCanvasPath(parent *GoCanvasObj) (hCanvasPath *GoCanvasPathObj)
func (*GoCanvasPathObj) AddPoint ¶
func (ob *GoCanvasPathObj) AddPoint(x float32, y float32)
func (*GoCanvasPathObj) Advance ¶
func (ob *GoCanvasPathObj) Advance()
func (*GoCanvasPathObj) BoundingRect ¶
func (ob *GoCanvasPathObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasPathObj) Centre ¶
func (ob *GoCanvasPathObj) Centre(x float32, y float32)
func (*GoCanvasPathObj) Draw ¶
func (ob *GoCanvasPathObj) Draw(ops *op_gio.Ops)
func (*GoCanvasPathObj) Hide ¶
func (ob *GoCanvasPathObj) Hide()
func (*GoCanvasPathObj) IsAnimated ¶
func (ob *GoCanvasPathObj) IsAnimated() (animated bool)
func (*GoCanvasPathObj) IsSelected ¶
func (ob *GoCanvasPathObj) IsSelected() (selected bool)
func (*GoCanvasPathObj) Move ¶
func (ob *GoCanvasPathObj) Move(x float32, y float32)
func (*GoCanvasPathObj) SetAnimated ¶
func (ob *GoCanvasPathObj) SetAnimated(animated bool)
func (*GoCanvasPathObj) SetEnabled ¶
func (ob *GoCanvasPathObj) SetEnabled(enabled bool)
func (*GoCanvasPathObj) SetFillColor ¶
func (ob *GoCanvasPathObj) SetFillColor(color GoColor)
func (*GoCanvasPathObj) SetLineColor ¶
func (ob *GoCanvasPathObj) SetLineColor(color GoColor)
func (*GoCanvasPathObj) SetLineWidth ¶
func (ob *GoCanvasPathObj) SetLineWidth(width float32)
func (*GoCanvasPathObj) SetPos ¶
func (ob *GoCanvasPathObj) SetPos(x float32, y float32)
func (*GoCanvasPathObj) SetSelected ¶
func (ob *GoCanvasPathObj) SetSelected(selected bool)
func (*GoCanvasPathObj) SetVelocity ¶
func (*GoCanvasPathObj) SetVisible ¶
func (ob *GoCanvasPathObj) SetVisible(visible bool)
func (*GoCanvasPathObj) SetXVelocity ¶
func (ob *GoCanvasPathObj) SetXVelocity(x int)
func (*GoCanvasPathObj) SetYVelocity ¶
func (ob *GoCanvasPathObj) SetYVelocity(y int)
type GoCanvasRectObj ¶
type GoCanvasRectObj struct {
// contains filtered or unexported fields
}
func GoCanvasRect ¶
func GoCanvasRect(parent *GoCanvasObj) (hCanvasRect *GoCanvasRectObj)
func (*GoCanvasRectObj) Advance ¶
func (ob *GoCanvasRectObj) Advance()
func (*GoCanvasRectObj) BoundingRect ¶
func (ob *GoCanvasRectObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasRectObj) Centre ¶
func (ob *GoCanvasRectObj) Centre(x float32, y float32)
func (*GoCanvasRectObj) Draw ¶
func (ob *GoCanvasRectObj) Draw(ops *op_gio.Ops)
func (*GoCanvasRectObj) Height ¶
func (ob *GoCanvasRectObj) Height() (height float32)
func (*GoCanvasRectObj) Hide ¶
func (ob *GoCanvasRectObj) Hide()
func (*GoCanvasRectObj) IsAnimated ¶
func (ob *GoCanvasRectObj) IsAnimated() (animated bool)
func (*GoCanvasRectObj) IsSelected ¶
func (ob *GoCanvasRectObj) IsSelected() (selected bool)
func (*GoCanvasRectObj) Move ¶
func (ob *GoCanvasRectObj) Move(x float32, y float32)
func (*GoCanvasRectObj) SetAnimated ¶
func (ob *GoCanvasRectObj) SetAnimated(animated bool)
func (*GoCanvasRectObj) SetEnabled ¶
func (ob *GoCanvasRectObj) SetEnabled(enabled bool)
func (*GoCanvasRectObj) SetFillColor ¶
func (ob *GoCanvasRectObj) SetFillColor(color GoColor)
func (*GoCanvasRectObj) SetHeight ¶
func (ob *GoCanvasRectObj) SetHeight(height float32)
func (*GoCanvasRectObj) SetLineColor ¶
func (ob *GoCanvasRectObj) SetLineColor(color GoColor)
func (*GoCanvasRectObj) SetLineWidth ¶
func (ob *GoCanvasRectObj) SetLineWidth(width float32)
func (*GoCanvasRectObj) SetPos ¶
func (ob *GoCanvasRectObj) SetPos(x float32, y float32)
func (*GoCanvasRectObj) SetSelected ¶
func (ob *GoCanvasRectObj) SetSelected(selected bool)
func (*GoCanvasRectObj) SetSize ¶
func (ob *GoCanvasRectObj) SetSize(width float32, height float32)
func (*GoCanvasRectObj) SetVelocity ¶
func (*GoCanvasRectObj) SetVisible ¶
func (ob *GoCanvasRectObj) SetVisible(visible bool)
func (*GoCanvasRectObj) SetWidth ¶
func (ob *GoCanvasRectObj) SetWidth(width float32)
func (*GoCanvasRectObj) SetXVelocity ¶
func (ob *GoCanvasRectObj) SetXVelocity(x int)
func (*GoCanvasRectObj) SetYVelocity ¶
func (ob *GoCanvasRectObj) SetYVelocity(y int)
func (*GoCanvasRectObj) Width ¶
func (ob *GoCanvasRectObj) Width() (width float32)
type GoCanvasSplineObj ¶
type GoCanvasSplineObj struct {
// contains filtered or unexported fields
}
func GoCanvasSpline ¶
func GoCanvasSpline(parent *GoCanvasObj) (hCanvasSpline *GoCanvasSplineObj)
func (*GoCanvasSplineObj) AddPoint ¶
func (ob *GoCanvasSplineObj) AddPoint(x float32, y float32)
func (*GoCanvasSplineObj) Advance ¶
func (ob *GoCanvasSplineObj) Advance()
func (*GoCanvasSplineObj) BoundingRect ¶
func (ob *GoCanvasSplineObj) BoundingRect() (x float32, y float32, width float32, height float32)
func (*GoCanvasSplineObj) Centre ¶
func (ob *GoCanvasSplineObj) Centre(x float32, y float32)
func (*GoCanvasSplineObj) Draw ¶
func (ob *GoCanvasSplineObj) Draw(ops *op_gio.Ops)
func (*GoCanvasSplineObj) Hide ¶
func (ob *GoCanvasSplineObj) Hide()
func (*GoCanvasSplineObj) Move ¶
func (ob *GoCanvasSplineObj) Move(x float32, y float32)
func (*GoCanvasSplineObj) Show ¶
func (ob *GoCanvasSplineObj) Show()
func (*GoCanvasSplineObj) Type ¶
func (ob *GoCanvasSplineObj) Type() (typeId int)
type GoCheckBoxObj ¶
func GoCheckBox ¶
func GoCheckBox(parent GoObject, label string) (hObj *GoCheckBoxObj)
func (*GoCheckBoxObj) Draw ¶
func (ob *GoCheckBoxObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoCheckBoxObj) Layout ¶
func (ob *GoCheckBoxObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout updates the checkBox and displays it.
func (*GoCheckBoxObj) ObjectType ¶
func (ob *GoCheckBoxObj) ObjectType() string
func (*GoCheckBoxObj) Widget ¶
func (ob *GoCheckBoxObj) Widget() *GioWidget
type GoClipBoardObj ¶
type GoClipBoardObj struct {
// contains filtered or unexported fields
}
func GoClipBoard ¶
func GoClipBoard() (hObj *GoClipBoardObj)
func (*GoClipBoardObj) ReadData ¶
func (clpbd *GoClipBoardObj) ReadData() (imdata []byte)
ReadData returns a byte data buffer from the clipboard or nil if the clipboard is empty or does not contain byte data.
func (*GoClipBoardObj) ReadText ¶
func (clpbd *GoClipBoardObj) ReadText() (text string)
ReadText returns a string of text from the clipboard or nil if the clipboard is empty or does not contain text.
func (*GoClipBoardObj) WriteData ¶
func (clpbd *GoClipBoardObj) WriteData(imdata []byte)
func (*GoClipBoardObj) WriteText ¶
func (clpbd *GoClipBoardObj) WriteText(text string) (err error)
WriteText sends a string of text to the clipboard or nil if the clipboard is empty or does not contain text.
type GoColor ¶
type GoColor uint32
const ( Transparent GoColor = 0x00000000 Color_AliceBlue GoColor = 0xFFF0F8FF Color_AntiqueWhite GoColor = 0xFFFAEBD7 Color_Aqua GoColor = 0xFF00FFFF Color_Aquamarine GoColor = 0xFF7FFFD4 Color_Azure GoColor = 0xFFF0FFFF Color_Beige GoColor = 0xFFF5F5DC Color_Bisque GoColor = 0xFFFFE4C4 Color_Black GoColor = 0xFF000000 Color_BlanchedAlmond GoColor = 0xFFFFEBCD Color_Blue GoColor = 0xFF0000FF Color_BlueViolet GoColor = 0xFF8A2BE2 Color_Brown GoColor = 0xFFA52A2A Color_BurlyWood GoColor = 0xFFDEB887 Color_CadetBlue GoColor = 0xFF5F9EA0 Color_Chartreuse GoColor = 0xFF7FFF00 Color_Chocolate GoColor = 0xFFD2691E Color_Coral GoColor = 0xFFFF7F50 Color_CornflowerBlue = 0xFF6495ED Color_Cornsilk = 0xFFFFF8DC Color_Crimson GoColor = 0xFFDC143C Color_Cyan GoColor = 0xFF00FFFF Color_DarkBlue GoColor = 0xFF00008B Color_DarkCyan GoColor = 0xFF008B8B Color_DarkGoldenrod GoColor = 0xFFB8860B Color_DarkGray GoColor = 0xFFA9A9A9 Color_DarkGrey GoColor = 0xFFA9A9A9 Color_DarkGreen GoColor = 0xFF006400 Color_DarkKhaki GoColor = 0xFFBDB76B Color_DarkMagenta GoColor = 0xFF8B008B Color_DarkOliveGreen GoColor = 0xFF556B2F Color_DarkOrange GoColor = 0xFFFF8C00 Color_DarkOrchid GoColor = 0xFF9932CC Color_DarkRed GoColor = 0xFF8B0000 Color_DarkSalmon GoColor = 0xFFE9967A Color_DarkSeaGreen GoColor = 0xFF8FBC8F Color_DarkSlateBlue GoColor = 0xFF483D8B Color_DarkSlateGray GoColor = 0xFF2F4F4F Color_DarkTurquoise GoColor = 0xFF00CED1 Color_DarkViolet GoColor = 0xFF9400D3 Color_DeepPink GoColor = 0xFFFF1493 Color_DeepSkyBlue GoColor = 0xFF00BFFF Color_DimGray GoColor = 0xFF696969 Color_DodgerBlue GoColor = 0xFF1E90FF Color_Firebrick GoColor = 0xFFB22222 Color_FloralWhite GoColor = 0xFFFFFAF0 Color_ForestGreen GoColor = 0xFF228B22 Color_Fuchsia GoColor = 0xFFFF00FF Color_Gainsboro GoColor = 0xFFDCDCDC Color_GhostWhite GoColor = 0xFFF8F8FF Color_Gold GoColor = 0xFFFFD700 Color_Goldenrod GoColor = 0xFFDAA520 Color_Gray GoColor = 0xFF808080 Color_Grey GoColor = 0xFF808080 Color_Green GoColor = 0xFF008000 Color_GreenYellow GoColor = 0xFFADFF2F Color_Honeydew GoColor = 0xFFF0FFF0 Color_HotPink GoColor = 0xFFFF69B4 Color_IndianRed GoColor = 0xFFCD5C5C Color_Indigo GoColor = 0xFF4B0082 Color_Ivory GoColor = 0xFFFFFFF0 Color_Khaki GoColor = 0xFFF0E68C Color_Lavender GoColor = 0xFFE6E6FA Color_LavenderBlush GoColor = 0xFFFFF0F5 Color_LawnGreen GoColor = 0xFF7CFC00 Color_LemonChiffon GoColor = 0xFFFFFACD Color_LightBlue GoColor = 0xFFADD8E6 Color_LightCoral GoColor = 0xFFF08080 Color_LightCyan GoColor = 0xFFE0FFFF Color_LightGoldenrodYellow GoColor = 0xFFFAFAD2 Color_LightGray GoColor = 0xFFD3D3D3 Color_LightGrey GoColor = 0xFFD3D3D3 Color_LightGreen GoColor = 0xFF90EE90 Color_LightPink GoColor = 0xFFFFB6C1 Color_LightSalmon GoColor = 0xFFFFA07A Color_LightSeaGreen GoColor = 0xFF20B2AA Color_LightSkyBlue GoColor = 0xFF87CEFA Color_LightSlateGray GoColor = 0xFF778899 Color_LightSteelBlue GoColor = 0xFFB0C4DE Color_Lime GoColor = 0xFF00FF00 Color_LimeGreen GoColor = 0xFF32CD32 Color_Linen GoColor = 0xFFFAF0E6 Color_Magenta GoColor = 0xFFFF00FF Color_Maroon GoColor = 0xFF800000 Color_MediumAquamarine GoColor = 0xFF66CDAA Color_MediumBlue GoColor = 0xFF0000CD Color_MediumOrchid GoColor = 0xFFBA55D3 Color_MediumPurple GoColor = 0xFF9370DB Color_MediumSeaGreen GoColor = 0xFF3CB371 Color_MediumSlateBlue GoColor = 0xFF7B68EE Color_MediumSpringGreen GoColor = 0xFF00FA9A Color_MediumTurquoise GoColor = 0xFF48D1CC Color_MediumVioletRed GoColor = 0xFFC71585 Color_MidnightBlue GoColor = 0xFF191970 Color_MintCream GoColor = 0xFFF5FFFA Color_MistyRose GoColor = 0xFFFFE4E1 Color_Moccasin GoColor = 0xFFFFE4B5 Color_OldLace GoColor = 0xFFFDF5E6 Color_Olive GoColor = 0xFF808000 Color_OliveDrab GoColor = 0xFF6B8E23 Color_Orange GoColor = 0xFFFFA500 Color_OrangeRed GoColor = 0xFFFF4500 Color_Orchid GoColor = 0xFFDA70D6 Color_PaleGoldenrod GoColor = 0xFFEEE8AA Color_PaleGreen GoColor = 0xFF98FB98 Color_PaleTurquoise GoColor = 0xFFAFEEEE Color_PaleVioletRed GoColor = 0xFFDB7093 Color_PapayaWhip GoColor = 0xFFFFEFD5 Color_PeachPuff GoColor = 0xFFFFDAB9 Color_Peru GoColor = 0xFFCD853F Color_Pink GoColor = 0xFFFFC0CB Color_Plum GoColor = 0xFFDDA0DD Color_PowderBlue GoColor = 0xFFB0E0E6 Color_Purple GoColor = 0xFF800080 Color_Red GoColor = 0xFFFF0000 Color_RosyBrown GoColor = 0xFFBC8F8F Color_RoyalBlue GoColor = 0xFF4169E1 Color_SaddleBrown GoColor = 0xFF8B4513 Color_Salmon GoColor = 0xFFFA8072 Color_SandyBrown GoColor = 0xFFF4A460 Color_SeaGreen GoColor = 0xFF2E8B57 Color_SeaShell GoColor = 0xFFFFF5EE Color_Sienna GoColor = 0xFFA0522D Color_Silver GoColor = 0xFFC0C0C0 Color_SkyBlue GoColor = 0xFF87CEEB Color_SlateBlue GoColor = 0xFF6A5ACD Color_SlateGray GoColor = 0xFF708090 Color_Snow GoColor = 0xFFFFFAFA Color_SpringGreen GoColor = 0xFF00FF7F Color_SteelBlue GoColor = 0xFF4682B4 Color_Tan GoColor = 0xFFD2B48C Color_Teal GoColor = 0xFF008080 Color_Thistle GoColor = 0xFFD8BFD8 Color_Tomato GoColor = 0xFFFF6347 Color_Transparent GoColor = 0x00FFFFFF Color_Turquoise GoColor = 0xFF40E0D0 Color_Violet GoColor = 0xFFEE82EE Color_Wheat GoColor = 0xFFF5DEB3 Color_White GoColor = 0xFFFFFFFF Color_WhiteSmoke GoColor = 0xFFF5F5F5 Color_Yellow GoColor = 0xFFFFFF00 Color_YellowGreen GoColor = 0xFF9ACD32 )
func ColorIndex ¶
func NRGBAColor ¶
type GoEventMaskObj ¶ added in v0.0.8
func GoEventMask ¶ added in v0.0.8
func GoEventMask(parent GoObject) (hEventMask *GoEventMaskObj)
func (*GoEventMaskObj) Draw ¶ added in v0.0.8
func (ob *GoEventMaskObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoEventMaskObj) Layout ¶ added in v0.0.8
func (ob *GoEventMaskObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout draws the scrim using the provided animation. If the animation indicates that the scrim is not visible, this is a no-op.
func (*GoEventMaskObj) ObjectType ¶ added in v0.0.8
func (ob *GoEventMaskObj) ObjectType() string
func (*GoEventMaskObj) Widget ¶ added in v0.0.8
func (ob *GoEventMaskObj) Widget() *GioWidget
type GoFit ¶
type GoFit uint8
Fit scales a widget to fit and clip to the constraints.
const ( // Unscaled does not alter the scale of a widget. Unscaled GoFit = iota // Contain scales widget as large as possible without cropping // and it preserves aspect-ratio. Contain // Cover scales the widget to cover the constraint area and // preserves aspect-ratio. Cover // ScaleDown scales the widget smaller without cropping, // when it exceeds the constraint area. // It preserves aspect-ratio. ScaleDown // Fill stretches the widget to the constraints and does not // preserve aspect-ratio. Fill )
type GoFocusPolicy ¶
type GoFocusPolicy int
const ( NoFocus GoFocusPolicy = iota // the widget does not accept focus. TabFocus // the widget accepts focus by tabbing. ClickFocus // the widget accepts focus by clicking. StrongFocus // the widget accepts focus by both tabbing and clicking. *** WheelFocus // like StrongFocus plus the widget accepts focus by using the mouse wheel. )
type GoFontStyle ¶
type GoFontStyle int
Style is the font style.
const ( Regular GoFontStyle = iota Italic )
type GoFontWeight ¶
type GoFontWeight int
Weight is a font weight, in CSS units subtracted 400 so the zero value is normal text weight.
const ( Thin GoFontWeight = 100 - 400 Hairline GoFontWeight = Thin ExtraLight GoFontWeight = 200 - 400 UltraLight GoFontWeight = ExtraLight Light GoFontWeight = 300 - 400 Normal GoFontWeight = 400 - 400 Medium GoFontWeight = 500 - 400 SemiBold GoFontWeight = 600 - 400 DemiBold GoFontWeight = SemiBold Bold GoFontWeight = 700 - 400 ExtraBold GoFontWeight = 800 - 400 UltraBold GoFontWeight = ExtraBold Black GoFontWeight = 900 - 400 Heavy GoFontWeight = Black ExtraBlack GoFontWeight = 950 - 400 UltraBlack GoFontWeight = ExtraBlack )
type GoIconButtonObj ¶
func GoIconPNGButton ¶
func GoIconPNGButton(parent GoObject, icon *GoIconPNGObj) *GoIconButtonObj
func GoIconButton(parent GoObject, icon *GoIconObj), description string) *GoIconButtonObj {
func GoIconVGButton ¶
func GoIconVGButton(parent GoObject, icon *GoIconVGObj) *GoIconButtonObj
func GoIconButton(parent GoObject, icon *GoIconObj), description string) *GoIconButtonObj {
func (*GoIconButtonObj) Click ¶
func (ob *GoIconButtonObj) Click(e GoPointerEvent)
func (*GoIconButtonObj) Draw ¶
func (ob *GoIconButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoIconButtonObj) Layout ¶
func (ob *GoIconButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoIconButtonObj) ObjectType ¶
func (ob *GoIconButtonObj) ObjectType() string
func (*GoIconButtonObj) SetFaceColor ¶ added in v0.0.6
func (ob *GoIconButtonObj) SetFaceColor(color GoColor)
func (*GoIconButtonObj) SetOnClick ¶
func (ob *GoIconButtonObj) SetOnClick(f func())
func (*GoIconButtonObj) SetSize ¶
func (ob *GoIconButtonObj) SetSize(size int)
func (*GoIconButtonObj) SetTextColor ¶ added in v0.0.6
func (ob *GoIconButtonObj) SetTextColor(color GoColor)
func (*GoIconButtonObj) Widget ¶
func (ob *GoIconButtonObj) Widget() *GioWidget
type GoIconLabelObj ¶
func GoIconLabel ¶
func GoIconLabel(parent GoObject, data []byte, args ...interface{}) *GoIconLabelObj
GoIcon returns a new Icon from IconVG data.
func (*GoIconLabelObj) Draw ¶
func (ob *GoIconLabelObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoIconLabelObj) IconSize ¶ added in v0.0.6
func (ob *GoIconLabelObj) IconSize() int
func (*GoIconLabelObj) Layout ¶
func (ob *GoIconLabelObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout displays the icon with its size set to the X minimum constraint.
func (*GoIconLabelObj) ObjectType ¶
func (ob *GoIconLabelObj) ObjectType() string
func (*GoIconLabelObj) Widget ¶
func (ob *GoIconLabelObj) Widget() *GioWidget
type GoIconPNGObj ¶
type GoIconPNGObj struct {
// contains filtered or unexported fields
}
func GoIconPNG ¶
func GoIconPNG(filePath string, args ...interface{}) *GoIconPNGObj
Icon returns a new Icon from IconVG data.
func (*GoIconPNGObj) Layout ¶
func (ob *GoIconPNGObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoIconPNGObj) ObjectType ¶
func (ob *GoIconPNGObj) ObjectType() string
func (*GoIconPNGObj) Size ¶
func (ob *GoIconPNGObj) Size() int
type GoIconVGObj ¶
type GoIconVGObj struct {
// contains filtered or unexported fields
}
func GoIconVG ¶
func GoIconVG(data []byte, args ...interface{}) *GoIconVGObj
Icon returns a new Icon from IconVG data.
func (*GoIconVGObj) Layout ¶
func (ob *GoIconVGObj) Layout(gtx layout_gio.Context, color GoColor) layout_gio.Dimensions
Layout displays the icon with its size set to the X minimum constraint.
func (*GoIconVGObj) ObjectType ¶
func (ob *GoIconVGObj) ObjectType() string
func (*GoIconVGObj) Size ¶
func (ob *GoIconVGObj) Size() int
type GoImageObj ¶
type GoImageObj struct { GioObject GioWidget // Src is the image to display. Src paint_gio.ImageOp // Fit specifies how to scale the image to the constraints. // By default it does not do any scaling. Fit GoFit // Position specifies where to position the image within // the constraints. Position layout_gio.Direction // Scale is the ratio of image pixels to // dps. If Scale is zero Image falls back to // a scale that match a standard 72 DPI. Scale float32 }
Image is a widget that displays an image.
func GoImage ¶
func GoImage(parent GoObject, src string) (hObj *GoImageObj)
func (*GoImageObj) Draw ¶
func (ob *GoImageObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoImageObj) ObjectType ¶
func (ob *GoImageObj) ObjectType() string
func (*GoImageObj) Widget ¶
func (ob *GoImageObj) Widget() *GioWidget
type GoKeyboardObj ¶
type GoKeyboardObj struct {
// contains filtered or unexported fields
}
func GoKeyboard ¶
func GoKeyboard() (hObj *GoKeyboardObj)
func (*GoKeyboardObj) ClearFocus ¶
func (k *GoKeyboardObj) ClearFocus(w *GioWidget) bool
func (*GoKeyboardObj) GetFocus ¶
func (k *GoKeyboardObj) GetFocus() (w *GioWidget)
func (*GoKeyboardObj) HasFocus ¶
func (k *GoKeyboardObj) HasFocus() (focus bool)
func (*GoKeyboardObj) SetFocus ¶
func (k *GoKeyboardObj) SetFocus(w *GioWidget) bool
func (*GoKeyboardObj) SetFocusControl ¶
func (k *GoKeyboardObj) SetFocusControl(w *GioWidget)
func (*GoKeyboardObj) Update ¶
func (k *GoKeyboardObj) Update() (ok bool)
type GoLabelObj ¶
func GoLabel ¶
func GoLabel(parent GoObject, text string) (hObj *GoLabelObj)
func H1Label ¶
func H1Label(parent GoObject, text string) (hObj *GoLabelObj)
func H2Label ¶
func H2Label(parent GoObject, text string) (hObj *GoLabelObj)
func H3Label ¶
func H3Label(parent GoObject, text string) (hObj *GoLabelObj)
func H4Label ¶
func H4Label(parent GoObject, text string) (hObj *GoLabelObj)
func H5Label ¶
func H5Label(parent GoObject, text string) (hObj *GoLabelObj)
func H6Label ¶
func H6Label(parent GoObject, text string) (hObj *GoLabelObj)
func (*GoLabelObj) Draw ¶
func (ob *GoLabelObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoLabelObj) GotFocus ¶
func (ob *GoLabelObj) GotFocus()
func (*GoLabelObj) Layout ¶ added in v0.0.3
func (ob *GoLabelObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoLabelObj) LayoutDetailed ¶
func (ob *GoLabelObj) LayoutDetailed(gtx layout_gio.Context, lt *text_gio.Shaper, font font_gio.Font, size unit_gio.Sp, txt string, textMaterial op_gio.CallOp) (dims layout_gio.Dimensions, textInfo TextInfo)
Layout the label with the given shaper, font, size, text, and material, returning metadata about the shaped text.
func (*GoLabelObj) LostFocus ¶
func (ob *GoLabelObj) LostFocus()
func (*GoLabelObj) ObjectType ¶
func (ob *GoLabelObj) ObjectType() string
func (*GoLabelObj) SetExpandingHeight ¶ added in v0.0.3
func (ob *GoLabelObj) SetExpandingHeight()
func (*GoLabelObj) SetExpandingWidth ¶ added in v0.0.3
func (ob *GoLabelObj) SetExpandingWidth()
func (*GoLabelObj) SetFixedHeight ¶ added in v0.0.3
func (ob *GoLabelObj) SetFixedHeight(height int)
func (*GoLabelObj) SetFixedWidth ¶ added in v0.0.3
func (ob *GoLabelObj) SetFixedWidth(width int)
func (*GoLabelObj) SetFont ¶
func (ob *GoLabelObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
func (*GoLabelObj) SetFontBold ¶
func (ob *GoLabelObj) SetFontBold(bold bool)
func (*GoLabelObj) SetFontItalic ¶
func (ob *GoLabelObj) SetFontItalic(italic bool)
func (*GoLabelObj) SetFontSize ¶
func (ob *GoLabelObj) SetFontSize(size int)
func (*GoLabelObj) SetFontWeight ¶
func (ob *GoLabelObj) SetFontWeight(weight GoFontWeight)
func (*GoLabelObj) SetHiliteColor ¶
func (ob *GoLabelObj) SetHiliteColor(color GoColor)
func (*GoLabelObj) SetMaxLines ¶
func (ob *GoLabelObj) SetMaxLines(size int)
func (*GoLabelObj) SetPreferredHeight ¶ added in v0.0.3
func (ob *GoLabelObj) SetPreferredHeight()
func (*GoLabelObj) SetPreferredWidth ¶ added in v0.0.3
func (ob *GoLabelObj) SetPreferredWidth()
func (*GoLabelObj) SetSelectable ¶
func (ob *GoLabelObj) SetSelectable(selectable bool)
func (*GoLabelObj) SetText ¶
func (ob *GoLabelObj) SetText(text string)
func (*GoLabelObj) SetTextAlignment ¶
func (ob *GoLabelObj) SetTextAlignment(alignment GoTextAlignment)
func (*GoLabelObj) SetTextColor ¶
func (ob *GoLabelObj) SetTextColor(color GoColor)
func (*GoLabelObj) SetWrap ¶ added in v0.0.3
func (ob *GoLabelObj) SetWrap(wrap bool)
func (*GoLabelObj) Text ¶
func (ob *GoLabelObj) Text() (text string)
func (*GoLabelObj) TextColor ¶
func (ob *GoLabelObj) TextColor() (color GoColor)
func (*GoLabelObj) Widget ¶
func (ob *GoLabelObj) Widget() *GioWidget
type GoLayoutAlignment ¶
type GoLayoutAlignment uint8
const ( LayoutStart GoLayoutAlignment = iota LayoutEnd LayoutMiddle LayoutBaseline )
type GoLayoutDirection ¶
type GoLayoutDirection int
type GoLayoutObj ¶
type GoLayoutObj struct { GioObject GioWidget Scrollbar GoScrollbar AnchorStrategy // contains filtered or unexported fields }
func GoBoxLayout ¶
func GoBoxLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
func GoFlexBoxLayout ¶
func GoFlexBoxLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
func GoHBoxLayout ¶
func GoHBoxLayout(parent GoObject) (hObj *GoLayoutObj)
func GoHFlexBoxLayout ¶
func GoHFlexBoxLayout(parent GoObject) (hObj *GoLayoutObj)
func GoLayout ¶
func GoLayout(parent GoObject, style GoLayoutStyle) (hObj *GoLayoutObj)
func GoPopupMenuLayout ¶
func GoPopupMenuLayout(parent GoObject) (hObj *GoLayoutObj)
func GoVBoxLayout ¶
func GoVBoxLayout(parent GoObject) (hObj *GoLayoutObj)
func GoVFlexBoxLayout ¶
func GoVFlexBoxLayout(parent GoObject) (hObj *GoLayoutObj)
func (*GoLayoutObj) Draw ¶
func (ob *GoLayoutObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoLayoutObj) Layout ¶ added in v0.0.7
func (ob *GoLayoutObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
layout the list and its scrollbar.
func (*GoLayoutObj) ObjectType ¶
func (ob *GoLayoutObj) ObjectType() string
func (*GoLayoutObj) ScrollBy ¶ added in v0.0.8
func (ob *GoLayoutObj) ScrollBy(num float32)
ScrollBy scrolls the list by a relative amount of items. Fractional scrolling may be inaccurate for items of differing dimensions. This includes scrolling by integer amounts if the current l.Position.Offset is non-zero.
func (*GoLayoutObj) ScrollTo ¶ added in v0.0.8
func (ob *GoLayoutObj) ScrollTo(num int)
func (*GoLayoutObj) ScrollToOffset ¶ added in v0.0.8
func (ob *GoLayoutObj) ScrollToOffset(dx int)
func (*GoLayoutObj) SetAlignment ¶
func (ob *GoLayoutObj) SetAlignment(alignment GoLayoutAlignment)
func (*GoLayoutObj) SetSpacing ¶
func (ob *GoLayoutObj) SetSpacing(spacing GoLayoutSpacing)
func (*GoLayoutObj) Style ¶
func (ob *GoLayoutObj) Style() GoLayoutStyle
func (*GoLayoutObj) Widget ¶
func (ob *GoLayoutObj) Widget() *GioWidget
type GoLayoutSpacing ¶
type GoLayoutSpacing uint8
const ( // SpaceEnd leaves space at the end. SpaceEnd GoLayoutSpacing = iota // SpaceStart leaves space at the start. SpaceStart // SpaceSides shares space between the start and end. SpaceSides // SpaceAround distributes space evenly between children, // with half as much space at the start and end. SpaceAround // SpaceBetween distributes space evenly between children, // leaving no space at the start and end. SpaceBetween // SpaceEvenly distributes space evenly between children and // at the start and end. SpaceEvenly )
type GoLayoutStyle ¶
type GoLayoutStyle int
const ( NoLayout GoLayoutStyle = iota HBoxLayout // gio.List{Axis: layout_gio.Horizontal} VBoxLayout // gio.List{Axis: layout_gio.Vertical} HVBoxLayout // Not Implemented ******************* HFlexBoxLayout // gio.Flex{Axis: layout_gio.Horizontal, Spacing: 0, Alignment: Baseline, WeightSum: 0} VFlexBoxLayout // gio.Flex{Axis: layout_gio.Vertical, Spacing: 0, Alignment: Baseline, WeightSum: 0} PopupMenuLayout )
type GoListBoxObj ¶
type GoListBoxObj struct { GioObject GioWidget Scrollbar GoScrollbar AnchorStrategy // contains filtered or unexported fields }
ListStyle configures the presentation of a layout_gio.List with a scrollbar.
func GoListBox ¶
func GoListBox(parent GoObject) *GoListBoxObj
List constructs a ListStyle using the provided theme and state.
func (*GoListBoxObj) Draw ¶
func (ob *GoListBoxObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoListBoxObj) Layout ¶
func (ob *GoListBoxObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
layout the list and its scrollbar.
func (*GoListBoxObj) ObjectType ¶
func (ob *GoListBoxObj) ObjectType() string
func (*GoListBoxObj) SetLayoutMode ¶
func (ob *GoListBoxObj) SetLayoutMode(mode GoLayoutDirection)
func (*GoListBoxObj) Widget ¶
func (ob *GoListBoxObj) Widget() *GioWidget
type GoListViewItemObj ¶
func GoListViewItem ¶
func (*GoListViewItemObj) AddListItem ¶
func (ob *GoListViewItemObj) AddListItem(iconData []byte, labelText string) (listItem *GoListViewItemObj)
func (*GoListViewItemObj) ClearHighlight ¶
func (ob *GoListViewItemObj) ClearHighlight()
func (*GoListViewItemObj) Clicked ¶
func (ob *GoListViewItemObj) Clicked(e GoPointerEvent)
func (*GoListViewItemObj) DoubleClicked ¶
func (ob *GoListViewItemObj) DoubleClicked(e GoPointerEvent)
func (*GoListViewItemObj) Draw ¶
func (ob *GoListViewItemObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoListViewItemObj) Expand ¶ added in v0.0.6
func (ob *GoListViewItemObj) Expand()
func (*GoListViewItemObj) Icon ¶
func (ob *GoListViewItemObj) Icon() []byte
func (*GoListViewItemObj) IconSize ¶
func (ob *GoListViewItemObj) IconSize() int
func (*GoListViewItemObj) Id ¶
func (ob *GoListViewItemObj) Id() int
func (*GoListViewItemObj) InsertListItem ¶
func (ob *GoListViewItemObj) InsertListItem(iconData []byte, labelText string, idx int) (listItem *GoListViewItemObj)
func (*GoListViewItemObj) IsExpanded ¶
func (ob *GoListViewItemObj) IsExpanded() (expanded bool)
func (*GoListViewItemObj) Item ¶
func (ob *GoListViewItemObj) Item(id int) *GoListViewItemObj
func (*GoListViewItemObj) ItemClicked ¶
func (ob *GoListViewItemObj) ItemClicked(nodeId []int)
func (*GoListViewItemObj) ItemCount ¶
func (ob *GoListViewItemObj) ItemCount() (count int)
func (*GoListViewItemObj) ItemDoubleClicked ¶
func (ob *GoListViewItemObj) ItemDoubleClicked(nodeId []int)
func (*GoListViewItemObj) Layout ¶
func (ob *GoListViewItemObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
Layout displays the icon with its size set to the X minimum constraint.
func (*GoListViewItemObj) ListView ¶
func (ob *GoListViewItemObj) ListView() *GoListViewObj
func (*GoListViewItemObj) MaxLines ¶ added in v0.0.8
func (ob *GoListViewItemObj) MaxLines() int
func (*GoListViewItemObj) ObjectType ¶
func (ob *GoListViewItemObj) ObjectType() string
func (*GoListViewItemObj) PointerEnter ¶ added in v0.0.6
func (ob *GoListViewItemObj) PointerEnter(e GoPointerEvent)
func (*GoListViewItemObj) PointerLeave ¶ added in v0.0.6
func (ob *GoListViewItemObj) PointerLeave(e GoPointerEvent)
func (*GoListViewItemObj) RemoveListItem ¶
func (ob *GoListViewItemObj) RemoveListItem(item GoObject, idx int)
func (*GoListViewItemObj) SetExpanded ¶
func (ob *GoListViewItemObj) SetExpanded(state bool)
func (*GoListViewItemObj) SetHighlight ¶
func (ob *GoListViewItemObj) SetHighlight()
func (*GoListViewItemObj) SetIconColor ¶
func (ob *GoListViewItemObj) SetIconColor(color GoColor)
func (*GoListViewItemObj) SetIconSize ¶
func (ob *GoListViewItemObj) SetIconSize(size int)
func (*GoListViewItemObj) SetId ¶
func (ob *GoListViewItemObj) SetId(id int)
func (*GoListViewItemObj) SetMaxLines ¶ added in v0.0.8
func (ob *GoListViewItemObj) SetMaxLines(maxlines int)
func (*GoListViewItemObj) Text ¶
func (ob *GoListViewItemObj) Text() string
func (*GoListViewItemObj) Trigger ¶ added in v0.0.6
func (ob *GoListViewItemObj) Trigger()
func (*GoListViewItemObj) Widget ¶
func (ob *GoListViewItemObj) Widget() *GioWidget
type GoListViewObj ¶
type GoListViewObj struct { GioObject GioWidget Scrollbar GoScrollbar AnchorStrategy // contains filtered or unexported fields }
ListStyle configures the presentation of a layout_gio.List with a scrollbar.
func GoListView ¶
func GoListView(parent GoObject) (hObj *GoListViewObj)
List constructs a ListStyle using the provided theme and state.
func (*GoListViewObj) AddListItem ¶
func (ob *GoListViewObj) AddListItem(iconData []byte, labelText string) (listItem *GoListViewItemObj)
func (*GoListViewObj) ClearList ¶
func (ob *GoListViewObj) ClearList()
func (*GoListViewObj) CurrentSelection ¶
func (ob *GoListViewObj) CurrentSelection() *GoListViewItemObj
func (*GoListViewObj) Draw ¶
func (ob *GoListViewObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoListViewObj) InsertListItem ¶
func (ob *GoListViewObj) InsertListItem(iconData []byte, labelText string, idx int) (listItem *GoListViewItemObj)
func (*GoListViewObj) Item ¶
func (ob *GoListViewObj) Item(nodeId []int) *GoListViewItemObj
func (*GoListViewObj) ItemByLabel ¶ added in v0.0.8
func (ob *GoListViewObj) ItemByLabel(nodeLabel []string) *GoListViewItemObj
func (*GoListViewObj) ItemClicked ¶
func (ob *GoListViewObj) ItemClicked(nodeId []int)
func (*GoListViewObj) ItemDoubleClicked ¶
func (ob *GoListViewObj) ItemDoubleClicked(nodeId []int)
func (*GoListViewObj) Layout ¶
func (ob *GoListViewObj) Layout(gtx layout_gio.Context, length int, w layout_gio.ListElement) layout_gio.Dimensions
layout the list and its scrollbar.
func (*GoListViewObj) ObjectType ¶
func (ob *GoListViewObj) ObjectType() string
func (*GoListViewObj) RemoveListItem ¶
func (ob *GoListViewObj) RemoveListItem(item GoObject)
func (*GoListViewObj) SetLayoutMode ¶
func (ob *GoListViewObj) SetLayoutMode(mode GoLayoutDirection)
func (*GoListViewObj) SetOnItemClicked ¶
func (ob *GoListViewObj) SetOnItemClicked(f func([]int))
func (*GoListViewObj) SetOnItemDoubleClicked ¶
func (ob *GoListViewObj) SetOnItemDoubleClicked(f func([]int))
func (*GoListViewObj) SwitchFocus ¶ added in v0.0.8
func (ob *GoListViewObj) SwitchFocus(item *GoListViewItemObj)
func (*GoListViewObj) Widget ¶
func (ob *GoListViewObj) Widget() *GioWidget
type GoLoaderObj ¶
func GoLoader ¶
func GoLoader(parent GoObject) *GoLoaderObj
func (*GoLoaderObj) Draw ¶
func (ob *GoLoaderObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoLoaderObj) ObjectType ¶
func (ob *GoLoaderObj) ObjectType() string
func (*GoLoaderObj) Widget ¶
func (ob *GoLoaderObj) Widget() *GioWidget
type GoMargin ¶
func (*GoMargin) Layout ¶
func (m *GoMargin) Layout(gtx layout_gio.Context, w layout_gio.Widget) layout_gio.Dimensions
type GoMenuBarObj ¶
func GoMenuBar ¶
func GoMenuBar(parent GoObject) (hObj *GoMenuBarObj)
func (*GoMenuBarObj) AddMenu ¶
func (ob *GoMenuBarObj) AddMenu(text string) *GoMenuObj
func (*GoMenuBarObj) Draw ¶
func (ob *GoMenuBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoMenuBarObj) Layout ¶ added in v0.0.3
func (ob *GoMenuBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoMenuBarObj) MenuOffset ¶
func (ob *GoMenuBarObj) MenuOffset(id int) int
func (*GoMenuBarObj) ObjectType ¶
func (ob *GoMenuBarObj) ObjectType() string
func (*GoMenuBarObj) SetFixedHeight ¶
func (ob *GoMenuBarObj) SetFixedHeight(height int)
func (*GoMenuBarObj) Widget ¶
func (ob *GoMenuBarObj) Widget() *GioWidget
type GoMenuItemObj ¶
func GoMenuItem ¶
func GoMenuItem(parent GoObject, text string, menuId int, action func()) (hObj *GoMenuItemObj)
func (*GoMenuItemObj) AddAction ¶
func (ob *GoMenuItemObj) AddAction(text string, action func()) *GoMenuItemObj
func (*GoMenuItemObj) AddItem ¶
func (ob *GoMenuItemObj) AddItem(text string) *GoMenuItemObj
func (*GoMenuItemObj) CalcSize ¶ added in v0.0.6
func (ob *GoMenuItemObj) CalcSize(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoMenuItemObj) Click ¶
func (ob *GoMenuItemObj) Click(e GoPointerEvent)
func (*GoMenuItemObj) Draw ¶
func (ob *GoMenuItemObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoMenuItemObj) ItemOffset ¶
func (ob *GoMenuItemObj) ItemOffset(id int) (offsetX int, offsetY int)
func (*GoMenuItemObj) Layout ¶
func (ob *GoMenuItemObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoMenuItemObj) ObjectType ¶
func (ob *GoMenuItemObj) ObjectType() string
func (*GoMenuItemObj) SetOnClick ¶
func (ob *GoMenuItemObj) SetOnClick(f func())
func (*GoMenuItemObj) SetText ¶
func (ob *GoMenuItemObj) SetText(text string)
func (*GoMenuItemObj) Text ¶
func (ob *GoMenuItemObj) Text() (text string)
func (*GoMenuItemObj) Widget ¶
func (ob *GoMenuItemObj) Widget() *GioWidget
type GoMenuObj ¶
func (*GoMenuObj) AddItem ¶
func (ob *GoMenuObj) AddItem(text string) *GoMenuItemObj
func (*GoMenuObj) Click ¶
func (ob *GoMenuObj) Click(e GoPointerEvent)
func (*GoMenuObj) Draw ¶
func (ob *GoMenuObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoMenuObj) Layout ¶
func (ob *GoMenuObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoMenuObj) MenuOffset ¶
func (*GoMenuObj) ObjectType ¶
func (*GoMenuObj) SetOnClick ¶
func (ob *GoMenuObj) SetOnClick(f func())
type GoObject ¶
type GoObject interface { AddControl(GoObject) Clear() Objects() []GoObject DeleteControl(GoObject) Draw(layout_gio.Context) layout_gio.Dimensions InsertControl(GoObject, int) ObjectType() string ParentControl() GoObject ParentWindow() *GoWindowObj RemoveControl(GoObject) SizePolicy() *GoSizePolicy SetHorizSizePolicy(horiz GoSizeType) SetSizePolicy(horiz GoSizeType, vert GoSizeType) SetVertSizePolicy(vert GoSizeType) Widget() *GioWidget }
type GoPadding ¶
func (*GoPadding) Layout ¶
func (p *GoPadding) Layout(gtx layout_gio.Context, w layout_gio.Widget) layout_gio.Dimensions
type GoPalette ¶
type GoPalette struct { // BackColor is the background color atop which content is currently being // drawn. ColorBg GoColor // ForeColor is a color suitable for drawing on top of Bg. ColorFg GoColor // ContrastBg is a color used to draw attention to active, // important, interactive widgets such as buttons. ContrastBg GoColor // ContrastFg is a color suitable for content drawn on top of // ContrastBg. ContrastFg GoColor // Provisional colors corresponding to Windows 10 Color Scheme TextColor GoColor BackColor GoColor FaceColor GoColor GrayText GoColor Highlight GoColor HighlightText GoColor Hotlight GoColor }
Palette contains the minimal set of colors that a widget may need to draw itself.
type GoPointerEvent ¶ added in v0.0.10
type GoPointerEvent struct { Type Type Source Source // PointerID is the id for the pointer and can be used // to track a particular pointer from Press to // Release or Cancel. PointerID ID // Priority is the priority of the receiving handler // for this event. Priority Priority // Time is when the event was received. The // timestamp is relative to an undefined base. Time time.Duration // Buttons are the set of pressed mouse buttons for this event. Buttons Buttons // Position is the coordinates of the event in the local coordinate // system of the receiving tag. The transformation from global window // coordinates to local coordinates is performed by the inverse of // the effective transformation of the tag. Position f32.Point // Scroll is the scroll amount, if any. Scroll f32.Point // Modifiers is the set of active modifiers when // the mouse button was pressed. Modifiers Modifiers }
func GioPointerEvent ¶ added in v0.0.10
func GioPointerEvent(evt pointer_gio.Event) (ptrEvent GoPointerEvent)
func (GoPointerEvent) ButtonState ¶ added in v0.0.10
func (ev GoPointerEvent) ButtonState() Buttons
func (GoPointerEvent) Gio ¶ added in v0.0.10
func (evt GoPointerEvent) Gio() (e pointer_gio.Event)
func (GoPointerEvent) KeyModifiers ¶ added in v0.0.10
func (ev GoPointerEvent) KeyModifiers() Modifiers
func (GoPointerEvent) Pos ¶ added in v0.0.10
func (ev GoPointerEvent) Pos() (pos image.Point)
func (GoPointerEvent) X ¶ added in v0.0.10
func (ev GoPointerEvent) X() (x int)
func (GoPointerEvent) Y ¶ added in v0.0.10
func (ev GoPointerEvent) Y() (y int)
type GoPopupMenuObj ¶
func GoPopupMenu ¶
func GoPopupMenu(parent GoObject) (hPopupMenu *GoPopupMenuObj)
func (*GoPopupMenuObj) Clear ¶
func (ob *GoPopupMenuObj) Clear()
func (*GoPopupMenuObj) Click ¶
func (ob *GoPopupMenuObj) Click(e GoPointerEvent)
func (*GoPopupMenuObj) Draw ¶
func (ob *GoPopupMenuObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoPopupMenuObj) Layout ¶
func (ob *GoPopupMenuObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout draws the scrim using the provided animation. If the animation indicates that the scrim is not visible, this is a no-op.
func (*GoPopupMenuObj) ObjectType ¶
func (ob *GoPopupMenuObj) ObjectType() string
func (*GoPopupMenuObj) Widget ¶
func (ob *GoPopupMenuObj) Widget() *GioWidget
type GoPopupWindowObj ¶
func GoPopupWindow ¶
func GoPopupWindow(parent GoObject) (hPopupWindow *GoPopupWindowObj)
func (*GoPopupWindowObj) Click ¶
func (ob *GoPopupWindowObj) Click(e GoPointerEvent)
func (*GoPopupWindowObj) Draw ¶
func (ob *GoPopupWindowObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoPopupWindowObj) Hide ¶
func (ob *GoPopupWindowObj) Hide()
func (*GoPopupWindowObj) Layout ¶
func (ob *GoPopupWindowObj) Layout() *GoLayoutObj
func (*GoPopupWindowObj) ObjectType ¶
func (ob *GoPopupWindowObj) ObjectType() string
func (*GoPopupWindowObj) SetLayoutStyle ¶ added in v0.0.8
func (ob *GoPopupWindowObj) SetLayoutStyle(style GoLayoutStyle)
func (*GoPopupWindowObj) SetSize ¶ added in v0.0.8
func (ob *GoPopupWindowObj) SetSize(width int, height int)
func (*GoPopupWindowObj) Show ¶ added in v0.0.7
func (ob *GoPopupWindowObj) Show()
func (*GoPopupWindowObj) Widget ¶
func (ob *GoPopupWindowObj) Widget() *GioWidget
type GoProgressBarObj ¶
func GoProgressBar ¶
func GoProgressBar(parent GoObject, totalSteps int) *GoProgressBarObj
func (*GoProgressBarObj) Draw ¶
func (ob *GoProgressBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoProgressBarObj) Layout ¶ added in v0.0.3
func (ob *GoProgressBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoProgressBarObj) LineThickness ¶
func (ob *GoProgressBarObj) LineThickness() int
func (*GoProgressBarObj) ObjectType ¶
func (ob *GoProgressBarObj) ObjectType() string
func (*GoProgressBarObj) Progress ¶
func (ob *GoProgressBarObj) Progress() int
func (*GoProgressBarObj) SetLineThickness ¶
func (ob *GoProgressBarObj) SetLineThickness(thickness int)
func (*GoProgressBarObj) SetProgress ¶
func (ob *GoProgressBarObj) SetProgress(progress int)
func (*GoProgressBarObj) SetTotalSteps ¶
func (ob *GoProgressBarObj) SetTotalSteps(totalSteps int)
func (*GoProgressBarObj) TotalSteps ¶
func (ob *GoProgressBarObj) TotalSteps() int
func (*GoProgressBarObj) Widget ¶
func (ob *GoProgressBarObj) Widget() *GioWidget
type GoProgressCircleObj ¶
func GoProgressCircle ¶
func GoProgressCircle(parent GoObject, totalSteps int) *GoProgressCircleObj
func (*GoProgressCircleObj) Draw ¶
func (ob *GoProgressCircleObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoProgressCircleObj) ObjectType ¶
func (ob *GoProgressCircleObj) ObjectType() string
func (*GoProgressCircleObj) SetProgress ¶
func (ob *GoProgressCircleObj) SetProgress(progress int)
func (*GoProgressCircleObj) Widget ¶
func (ob *GoProgressCircleObj) Widget() *GioWidget
type GoRadioButtonObj ¶ added in v0.0.3
type GoRadioButtonObj struct { GioObject GioWidget Checkable *widget_int.GioCheckable Key string Group *GoButtonGroupObj // contains filtered or unexported fields }
func GoRadioButton ¶ added in v0.0.3
func GoRadioButton(parent GoObject, group *GoButtonGroupObj, key, label string) *GoRadioButtonObj
RadioButton returns a RadioButton with a label. The key specifies the value for the Enum.
func (*GoRadioButtonObj) Draw ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoRadioButtonObj) Focused ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Focused() (focused bool)
func (*GoRadioButtonObj) Hovered ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Hovered() (hovered bool)
func (*GoRadioButtonObj) Layout ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout updates enum and displays the radio button.
func (*GoRadioButtonObj) ObjectType ¶ added in v0.0.3
func (ob *GoRadioButtonObj) ObjectType() string
func (*GoRadioButtonObj) Selected ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Selected() (selected bool)
func (*GoRadioButtonObj) SetOnChange ¶ added in v0.0.3
func (ob *GoRadioButtonObj) SetOnChange(f func(bool))
func (*GoRadioButtonObj) SetOnFocus ¶ added in v0.0.3
func (ob *GoRadioButtonObj) SetOnFocus(f func(string))
func (*GoRadioButtonObj) SetOnHover ¶ added in v0.0.3
func (ob *GoRadioButtonObj) SetOnHover(f func(string))
func (*GoRadioButtonObj) State ¶ added in v0.0.3
func (ob *GoRadioButtonObj) State() (state bool)
func (*GoRadioButtonObj) Widget ¶ added in v0.0.3
func (ob *GoRadioButtonObj) Widget() *GioWidget
type GoRichTextObj ¶ added in v0.0.7
func GoRichText ¶ added in v0.0.7
func GoRichText(parent GoObject, name string) (hObj *GoRichTextObj)
func (*GoRichTextObj) AddContent ¶ added in v0.0.7
func (ob *GoRichTextObj) AddContent(spans []richtext.SpanStyle)
func (*GoRichTextObj) AddSpan ¶ added in v0.0.9
func (ob *GoRichTextObj) AddSpan(text string)
func (*GoRichTextObj) AnchorTable ¶ added in v0.0.8
func (ob *GoRichTextObj) AnchorTable(ref string) (offset int)
func (*GoRichTextObj) Clear ¶ added in v0.0.8
func (ob *GoRichTextObj) Clear()
func (*GoRichTextObj) Draw ¶ added in v0.0.7
func (ob *GoRichTextObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoRichTextObj) Font ¶ added in v0.0.9
func (ob *GoRichTextObj) Font() font_gio.Font
func (*GoRichTextObj) FontBold ¶ added in v0.0.9
func (ob *GoRichTextObj) FontBold() bool
func (*GoRichTextObj) Layout ¶ added in v0.0.7
func (ob *GoRichTextObj) Layout(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoRichTextObj) LoadMarkDown ¶ added in v0.0.7
func (ob *GoRichTextObj) LoadMarkDown(src string)
func (*GoRichTextObj) Name ¶ added in v0.0.8
func (ob *GoRichTextObj) Name() string
func (*GoRichTextObj) ObjectType ¶ added in v0.0.7
func (ob *GoRichTextObj) ObjectType() string
func (*GoRichTextObj) SetFont ¶ added in v0.0.9
func (ob *GoRichTextObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
func (*GoRichTextObj) SetFontBold ¶ added in v0.0.9
func (ob *GoRichTextObj) SetFontBold(bold bool)
func (*GoRichTextObj) SetFontColor ¶ added in v0.0.9
func (ob *GoRichTextObj) SetFontColor(color GoColor)
func (*GoRichTextObj) SetFontSize ¶ added in v0.0.9
func (ob *GoRichTextObj) SetFontSize(size int)
func (*GoRichTextObj) SetFontWeight ¶ added in v0.0.9
func (ob *GoRichTextObj) SetFontWeight(weight GoFontWeight)
func (*GoRichTextObj) SetOnLinkClick ¶ added in v0.0.8
func (ob *GoRichTextObj) SetOnLinkClick(f func(string))
func (*GoRichTextObj) Title ¶ added in v0.0.8
func (ob *GoRichTextObj) Title() string
func (*GoRichTextObj) Widget ¶ added in v0.0.7
func (ob *GoRichTextObj) Widget() *GioWidget
type GoScrollbar ¶ added in v0.0.7
type GoScrollbar struct { Scrollbar *widget_gio.Scrollbar Track ScrollTrackStyle Indicator ScrollIndicatorStyle }
ScrollbarStyle configures the presentation of a scrollbar.
func (*GoScrollbar) Layout ¶ added in v0.0.7
func (ob *GoScrollbar) Layout(gtx layout_gio.Context, axis layout_gio.Axis, viewportStart, viewportEnd float32) layout_gio.Dimensions
Layout the scrollbar.
func (*GoScrollbar) Width ¶ added in v0.0.7
func (ob *GoScrollbar) Width() unit_gio.Dp
Width returns the minor axis width of the scrollbar in its current configuration (taking padding for the scroll track into account).
type GoSize ¶
type GoSizePolicy ¶
type GoSizePolicy struct { Horiz GoSizeType Vert GoSizeType HFlex bool VFlex bool }
func ExpandingSizePolicy ¶
func ExpandingSizePolicy() *GoSizePolicy
func FixedSizePolicy ¶
func FixedSizePolicy() *GoSizePolicy
func GetSizePolicy ¶
func GetSizePolicy(horiz GoSizeType, vert GoSizeType) *GoSizePolicy
type GoSizeType ¶
type GoSizeType int
const ( FixedWidth GoSizeType = 0x0000 FixedHeight GoSizeType = 0x0001 MinimumWidth GoSizeType = 0x0002 MinimumHeight GoSizeType = 0x0004 MaximumWidth GoSizeType = 0x0008 MaximumHeight GoSizeType = 0x0010 PreferredWidth GoSizeType = 0x0020 PreferredHeight GoSizeType = 0x0040 ExpandingWidth GoSizeType = 0x0080 ExpandingHeight GoSizeType = 0x0100 )
type GoSliderObj ¶ added in v0.0.3
type GoSliderObj struct { GioObject GioWidget Axis layout_gio.Axis //invert bool Color GoColor GioFloat *widget_int.GioFloat FingerSize unit_gio.Dp ThumbRadius unit_gio.Dp TrackWidth unit_gio.Dp // contains filtered or unexported fields }
func GoSlider ¶ added in v0.0.3
func GoSlider(parent GoObject, min int, max int) *GoSliderObj
Slider is for selecting a value in a range.
func (*GoSliderObj) Changed ¶ added in v0.0.3
func (ob *GoSliderObj) Changed() bool
func (*GoSliderObj) Dragging ¶ added in v0.0.3
func (ob *GoSliderObj) Dragging() bool
func (*GoSliderObj) Draw ¶ added in v0.0.3
func (ob *GoSliderObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoSliderObj) Layout ¶ added in v0.0.3
func (ob *GoSliderObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoSliderObj) ObjectType ¶ added in v0.0.3
func (ob *GoSliderObj) ObjectType() string
func (*GoSliderObj) SetMaxValue ¶ added in v0.0.3
func (ob *GoSliderObj) SetMaxValue(max int)
func (*GoSliderObj) SetMinValue ¶ added in v0.0.3
func (ob *GoSliderObj) SetMinValue(min int)
func (*GoSliderObj) SetOnChange ¶ added in v0.0.3
func (ob *GoSliderObj) SetOnChange(f func(int))
func (*GoSliderObj) SetOnDrag ¶ added in v0.0.3
func (ob *GoSliderObj) SetOnDrag(f func(float32))
func (*GoSliderObj) SetValue ¶ added in v0.0.3
func (ob *GoSliderObj) SetValue(value int)
func (*GoSliderObj) Value ¶ added in v0.0.3
func (ob *GoSliderObj) Value() int
func (*GoSliderObj) Widget ¶ added in v0.0.3
func (ob *GoSliderObj) Widget() *GioWidget
type GoSpacerObj ¶
func GoSpacer ¶
func GoSpacer(parent GoObject, space int) (hObj *GoSpacerObj)
func (*GoSpacerObj) Draw ¶
func (ob *GoSpacerObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoSpacerObj) Layout ¶
func (ob *GoSpacerObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoSpacerObj) ObjectType ¶
func (ob *GoSpacerObj) ObjectType() string
func (*GoSpacerObj) Widget ¶
func (ob *GoSpacerObj) Widget() *GioWidget
type GoStatusBarObj ¶ added in v0.0.10
func GoStatusBar ¶ added in v0.0.10
func GoStatusBar(parent GoObject) (hObj *GoStatusBarObj)
func (*GoStatusBarObj) Draw ¶ added in v0.0.10
func (ob *GoStatusBarObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoStatusBarObj) Layout ¶ added in v0.0.10
func (ob *GoStatusBarObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoStatusBarObj) ObjectType ¶ added in v0.0.10
func (ob *GoStatusBarObj) ObjectType() string
func (*GoStatusBarObj) SetFixedHeight ¶ added in v0.0.10
func (ob *GoStatusBarObj) SetFixedHeight(height int)
func (*GoStatusBarObj) Widget ¶ added in v0.0.10
func (ob *GoStatusBarObj) Widget() *GioWidget
type GoSwitchObj ¶
func GoSwitch ¶
func GoSwitch(parent GoObject, description string) *GoSwitchObj
Switch is for selecting a boolean value.
func (*GoSwitchObj) Clicked ¶
func (ob *GoSwitchObj) Clicked(e GoPointerEvent)
func (*GoSwitchObj) Draw ¶
func (ob *GoSwitchObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoSwitchObj) Layout ¶ added in v0.0.3
func (ob *GoSwitchObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
Layout updates the switch and displays it.
func (*GoSwitchObj) ObjectType ¶
func (ob *GoSwitchObj) ObjectType() string
func (*GoSwitchObj) SetOnChange ¶
func (ob *GoSwitchObj) SetOnChange(f func(bool))
func (*GoSwitchObj) Widget ¶
func (ob *GoSwitchObj) Widget() *GioWidget
type GoTextAlignment ¶
type GoTextAlignment uint8
const ( TextStart GoTextAlignment = iota TextEnd TextMiddle )
type GoTextEditObj ¶
func GoTextEdit ¶
func GoTextEdit(parent GoObject, hintText string) *GoTextEditObj
func (*GoTextEditObj) ClearSelection ¶
func (ob *GoTextEditObj) ClearSelection()
func (*GoTextEditObj) Draw ¶
func (ob *GoTextEditObj) Draw(gtx layout_gio.Context) (dims layout_gio.Dimensions)
func (*GoTextEditObj) Focused ¶
func (ob *GoTextEditObj) Focused() bool
func (*GoTextEditObj) Font ¶
func (ob *GoTextEditObj) Font() font_gio.Font
func (*GoTextEditObj) FontBold ¶ added in v0.0.2
func (ob *GoTextEditObj) FontBold() bool
func (*GoTextEditObj) GotFocus ¶
func (ob *GoTextEditObj) GotFocus()
func (*GoTextEditObj) Insert ¶
func (ob *GoTextEditObj) Insert(text string)
func (*GoTextEditObj) KeyEdit ¶
func (ob *GoTextEditObj) KeyEdit(e key_gio.EditEvent)
func (*GoTextEditObj) KeyPressed ¶
func (ob *GoTextEditObj) KeyPressed(e key_gio.Event)
func (*GoTextEditObj) KeyReleased ¶
func (ob *GoTextEditObj) KeyReleased(e key_gio.Event)
func (*GoTextEditObj) Layout ¶
func (ob *GoTextEditObj) Layout(gtx layout_gio.Context) layout_gio.Dimensions
func (*GoTextEditObj) Length ¶
func (ob *GoTextEditObj) Length() (length int)
func (*GoTextEditObj) LostFocus ¶
func (ob *GoTextEditObj) LostFocus()
func (*GoTextEditObj) ObjectType ¶
func (ob *GoTextEditObj) ObjectType() string
func (*GoTextEditObj) PointerDragged ¶
func (ob *GoTextEditObj) PointerDragged(e GoPointerEvent)
func (*GoTextEditObj) PointerPressed ¶
func (ob *GoTextEditObj) PointerPressed(e GoPointerEvent)
func (*GoTextEditObj) PointerReleased ¶
func (ob *GoTextEditObj) PointerReleased(e GoPointerEvent)
func (*GoTextEditObj) SelectedText ¶
func (ob *GoTextEditObj) SelectedText() (text string)
func (*GoTextEditObj) SetFont ¶
func (ob *GoTextEditObj) SetFont(typeface string, style GoFontStyle, weight GoFontWeight)
func (*GoTextEditObj) SetFontBold ¶
func (ob *GoTextEditObj) SetFontBold(bold bool)
func (*GoTextEditObj) SetFontColor ¶
func (ob *GoTextEditObj) SetFontColor(color GoColor)
func (*GoTextEditObj) SetFontSize ¶
func (ob *GoTextEditObj) SetFontSize(size int)
func (*GoTextEditObj) SetFontWeight ¶
func (ob *GoTextEditObj) SetFontWeight(weight GoFontWeight)
func (*GoTextEditObj) SetKeys ¶ added in v0.0.8
func (ob *GoTextEditObj) SetKeys(ctlKeys []event_gio.Filter)
func (*GoTextEditObj) SetSingleLine ¶ added in v0.0.3
func (ob *GoTextEditObj) SetSingleLine(singleLine bool)
func (*GoTextEditObj) SetText ¶
func (ob *GoTextEditObj) SetText(text string)
func (*GoTextEditObj) SingleLine ¶ added in v0.0.3
func (ob *GoTextEditObj) SingleLine() (singleLine bool)
func (*GoTextEditObj) Text ¶
func (ob *GoTextEditObj) Text() (text string)
func (*GoTextEditObj) Widget ¶
func (ob *GoTextEditObj) Widget() *GioWidget
type GoThemeObj ¶
type GoThemeObj struct { Shaper *text_gio.Shaper GoPalette TextSize unit_gio.Sp Icon struct { CheckBoxChecked *widget_gio.Icon CheckBoxUnchecked *widget_gio.Icon RadioChecked *widget_gio.Icon RadioUnchecked *widget_gio.Icon } // FingerSize is the minimum touch target size. FingerSize unit_gio.Dp // ThumbRadius is the mimimum radius of slider finger ThumbRadius unit_gio.Dp // TrackWidth is the minimum size of slider track width TrackWidth unit_gio.Dp }
func GoTheme ¶
func GoTheme(fontCollection []text_gio.FontFace) *GoThemeObj
func (*GoThemeObj) WithPalette ¶
func (ob *GoThemeObj) WithPalette(p GoPalette) *GoThemeObj
type GoWindowMode ¶ added in v0.0.11
type GoWindowMode uint8
const ( // Windowed is the normal window mode with OS specific window decorations. Windowed GoWindowMode = iota // Fullscreen is the full screen window mode. Fullscreen // Minimized is for systems where the window can be minimized to an icon. Minimized // Maximized is for systems where the window can be made to fill the available monitor area. Maximized )
type GoWindowObj ¶
type GoWindowObj struct { GioObject //goWidget GoSize // Current, Min and Max sizes GoPos // Current top left position ModalAction int ModalInfo string // contains filtered or unexported fields }
func GoMainWindow ¶
func GoMainWindow(windowTitle string) (hWin *GoWindowObj)
- <a name=\"goMainWindow\"></a> [**GoMainWindow**](api.GoWindow#goMainWindow)( windowTitle **string** ) ( hWin [***GoWindowObj**](#goWindowObj) )\n - - Create a new main window\n\n
func GoModalWindow ¶
func GoModalWindow(modalStyle string, windowTitle string) (hWin *GoWindowObj)
- <a name=\"goModalWindow\"></a> [**GoModalWindow**](api.GoWindow#goModalWindow)( windowTitle **string** ) ( hWin [***GoWindowObj**](#goWindowObj) )\n - - Create a new modal window\n\n
func GoWindow ¶
func GoWindow(windowTitle string) (hWin *GoWindowObj)
- <a name=\"goWindow\"></a> [**GoWindow**](api.GoWindow#goWindow)( windowTitle **string** ) ( hWin [***GoWindowObj**](#goWindowObj) )\n - - Create a new window\n\n
func (*GoWindowObj) AddPopupMenu ¶
func (ob *GoWindowObj) AddPopupMenu() (popupMenu *GoPopupMenuObj)
- <a name=\"addPopupMenu\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**AddPopupMenu(** popupMenu [***GoPopupMenuObj**](api.GoPopupMenu#) **)**\n - - Add a new popup menu.\n\n
func (*GoWindowObj) Centre ¶ added in v0.0.6
func (ob *GoWindowObj) Centre()
- <a name=\"centre\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Centre()**\n - - Centre the window on the client screen.\n\n
func (*GoWindowObj) ClearPopupMenus ¶
func (ob *GoWindowObj) ClearPopupMenus()
- <a name=\"clearPopupMenus\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ClearPopupMenus()**\n - - Clear the popup menus.\n\n
func (*GoWindowObj) ClientPos ¶
func (ob *GoWindowObj) ClientPos() (xDp int, yDp int)
- <a name=\"clientPos\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ClientPos(** x **int,** y **int )**\n - - Returns the client postion of the window in device pixels.\nThis is usually set to (0,0)\n\n
func (*GoWindowObj) ClientSize ¶
func (ob *GoWindowObj) ClientSize() (widthDp int, heightp int)
- <a name=\"clientSize\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ClientSize() (** width **int,** height **int )**\n - - Returns the inner client size of the window in device pixels\n\n
func (*GoWindowObj) Close ¶
func (ob *GoWindowObj) Close()
- <a name=\"close\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Close()**\n - - Close the window.\n\n
func (*GoWindowObj) EscFullScreen ¶
func (ob *GoWindowObj) EscFullScreen()
- <a name=\"escFullScreen\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**EscFullScreen()**\n - - Escape fullscreen.\n\n
func (*GoWindowObj) GoFullScreen ¶
func (ob *GoWindowObj) GoFullScreen()
- <a name=\"goFullScreen\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**GoFullScreen()**\n - - Switch to fullscreen.\n\n
func (*GoWindowObj) IsMainWindow ¶
func (ob *GoWindowObj) IsMainWindow() (isMain bool)
- <a name=\"isMainWindow\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**IsMainWindow() ( bool )**\n - - Returns **true** if the window is the main window.\n\n
func (*GoWindowObj) IsModal ¶
func (ob *GoWindowObj) IsModal() (isModal bool)
- <a name=\"isModal\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**IsModal() ( bool )**\n - - Returns **true** if the window is a modal window.\n\n
func (*GoWindowObj) Layout ¶
func (ob *GoWindowObj) Layout() (layout *GoLayoutObj)
- <a name=\"layout\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Layout() ( layout** [***GoLayoutObj**](api.GoLayout#) **)**\n - - Returns a pointer to the window central layout.\n\n
func (*GoWindowObj) Maximize ¶
func (ob *GoWindowObj) Maximize()
- <a name=\"maximize\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Maximize()**\n - - Maximize the window.\n\n
func (*GoWindowObj) MenuBar ¶
func (ob *GoWindowObj) MenuBar() *GoMenuBarObj
- <a name=\"menubar\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**MenuBar() (** menubar [***GoMenuBarObj**](api.GoMenuBar#) **)**\n - - Installs and returns a pointer to the window main menu bar.\n\n
func (*GoWindowObj) MenuPopup ¶
func (ob *GoWindowObj) MenuPopup(idx int) (popupMenu *GoPopupMenuObj)
- <a name=\"menuPopup\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**MenuPopup() (** popupMenu [***GoPopupMenuObj**](api.GoPopupMenu#) **)**\n - - Returns a pointer to the popup menu at index idx.\n\n
func (*GoWindowObj) Minimize ¶
func (ob *GoWindowObj) Minimize()
- <a name=\"minimize\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Minimize()**\n - - Minimize the window.\n\n
func (*GoWindowObj) ModalStyle ¶
func (ob *GoWindowObj) ModalStyle() string
- <a name=\"modalStyle\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ModalStyle() (** style **string )**\n - - Returns the modal style of a modal window.\n\n
func (*GoWindowObj) ObjectType ¶
func (ob *GoWindowObj) ObjectType() string
- <a name=\"objectType\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ObjectType() (** type **string )**\n - - Returns the object type as a string definition \"GoWindowObj\".\n\n
func (*GoWindowObj) PopupWindow ¶
func (ob *GoWindowObj) PopupWindow() *GoPopupWindowObj
- <a name=\"popupWindow\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**PopupWindow() (** popupWindow [***GoPopupWindowObj**](api.GoPopupWindow#) **)**\n - - Returns a pointer to the windows popup window.\n\n
func (*GoWindowObj) Pos ¶
func (ob *GoWindowObj) Pos() (xDp int, yDp int)
- <a name=\"posDp\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**PosDp() (** x **int, y int )**\n - - Returns the screen postion of the window in device pixels.\n\n
func (*GoWindowObj) Raise ¶ added in v0.0.8
func (ob *GoWindowObj) Raise()
- <a name=\"raise\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Raise()**\n - - Raises the window to be top most window.\n\n
func (*GoWindowObj) Refresh ¶
func (ob *GoWindowObj) Refresh()
- <a name=\"refresh\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Refresh()**\n - - Refresh the window.\n\n
func (*GoWindowObj) SetBorder ¶
func (ob *GoWindowObj) SetBorder(style GoBorderStyle, width int, radius int, color GoColor)
- <a name=\"setBorder\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetBorder(** style [**GoBorderStyle**](api.GoBorderStyle#), width **int**, radius **int**, color [**GoColor**](api.GoColor#) **)**\n - - Add a border to the window.\n\n
func (*GoWindowObj) SetBorderColor ¶
func (ob *GoWindowObj) SetBorderColor(color GoColor)
- <a name=\"setBorderColor\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetBorderColor(** color [**GoColor**](api.GoColor#) **)**\n - - Change the border color of the window border.\n\n
func (*GoWindowObj) SetBorderRadius ¶
func (ob *GoWindowObj) SetBorderRadius(radius int)
- <a name=\"setBorderRadius\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetBorderRadius(** radius **int )**\n - - Change the border radius of the window border.\n\n
func (*GoWindowObj) SetBorderStyle ¶
func (ob *GoWindowObj) SetBorderStyle(style GoBorderStyle)
- <a name=\"setBorderStyle\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetBorderStyle(** style [**GoBorderStyle**](api.GoBorderStyle#) **)**\n - - Change the border style of the window border.\n\n
func (*GoWindowObj) SetBorderWidth ¶
func (ob *GoWindowObj) SetBorderWidth(width int)
- <a name=\"setBorderWidth\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetBorderWidth(** width **int )**\n - - Change the border width of the window border.\n\n
func (*GoWindowObj) SetLayoutStyle ¶
func (ob *GoWindowObj) SetLayoutStyle(style GoLayoutStyle)
- <a name=\"setLayoutStyle\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetLayoutStyle(** style [**GoLayoutStyle**](api.GoLayoutStyle#) **)**\n - - Changes the window central layout style.\n\n
func (*GoWindowObj) SetMargin ¶
func (ob *GoWindowObj) SetMargin(left int, top int, right int, bottom int)
- <a name=\"setMargin\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetMargin(** left **int,** top **int,** bottom **int,** right **int )**\n - - Sets the window margin sizes.\n\n
func (*GoWindowObj) SetOnClose ¶ added in v0.0.8
func (ob *GoWindowObj) SetOnClose(f func())
- <a name=\"setOnClose\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetOnClose(** f **func() )**\n - - Adds a function to be called when the window is closed.\n\n
func (*GoWindowObj) SetOnConfig ¶
func (ob *GoWindowObj) SetOnConfig(f func())
- <a name=\"setOnConfig\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetOnConfig(** f **func() )**\n - - Adds a function to be called when the window is reconfigured.\n\n
func (*GoWindowObj) SetOnPointerMove ¶ added in v0.0.10
func (ob *GoWindowObj) SetOnPointerMove(f func(e pointer_gio.Event))
func (*GoWindowObj) SetOnPointerPress ¶ added in v0.0.10
func (ob *GoWindowObj) SetOnPointerPress(f func(e pointer_gio.Event))
func (*GoWindowObj) SetOnPointerRelease ¶ added in v0.0.10
func (ob *GoWindowObj) SetOnPointerRelease(f func(e pointer_gio.Event))
func (*GoWindowObj) SetPadding ¶
func (ob *GoWindowObj) SetPadding(left int, top int, right int, bottom int)
- <a name=\"setPadding\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetPadding(** left **int,** top **int,** bottom **int,** right **int )**\n - - Sets the window padding sizes.\n\n
func (*GoWindowObj) SetPos ¶
func (ob *GoWindowObj) SetPos(xDp int, yDp int)
- <a name=\"setPos\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetPos(** x **int, y int )**\n - - Moves the position of the window on screen with sizes specified in device pixels.\n\n
func (*GoWindowObj) SetSize ¶
func (ob *GoWindowObj) SetSize(widthDp int, heightDp int)
- <a name=\"setSize\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetSize(** width **int, height int )**\n - - Resizes the window on screen with client sizes specified in device pixels.\n\n
func (*GoWindowObj) SetSpacing ¶
func (ob *GoWindowObj) SetSpacing(spacing GoLayoutSpacing)
- <a name=\"setSpacing\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetSpacing(** style [**GoLayoutSpacing**](api.GoLayoutSpacing#) **)**\n - - Changes the window central layout widget spacing.\n\n
func (*GoWindowObj) SetTitle ¶
func (ob *GoWindowObj) SetTitle(title string)
- <a name=\"setTitle\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SetTitle(** title **string )**\n - - Change the text displayed in the window title bar.\n\n
func (*GoWindowObj) Show ¶
func (ob *GoWindowObj) Show()
- <a name=\"show\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Show()**\n - - Activate the window loop and set as top window.\n\n
func (*GoWindowObj) ShowModal ¶
func (ob *GoWindowObj) ShowModal() (action int, info string)
- <a name=\"showModal\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**ShowModal()**\n - - Activate the window as a modal application window and set as topmost window.\n\n
func (*GoWindowObj) Size ¶
func (ob *GoWindowObj) Size() (widthDp int, heightDp int)
- <a name=\"sizeDp\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Size() (** width **int,** height **int )**\n - - Returns the outer size of the window in device pixels.\n\n
func (*GoWindowObj) SizePx ¶ added in v0.0.11
func (ob *GoWindowObj) SizePx() (widthPx int, heightPx int)
- <a name=\"sizePx\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**SizePx() (** width **int,** height **int )**\n - - Returns the outer size of the window in scrfeen pixels.\n\n
func (*GoWindowObj) StatusBar ¶ added in v0.0.10
func (ob *GoWindowObj) StatusBar() *GoStatusBarObj
- <a name=\"statusbar\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**StatusBar() (** statusbar [***GoStatusBarObj**](api.GoStatusBar#) **)**\n - - Installs and returns a pointer to the window status bar.\n\n
func (*GoWindowObj) Title ¶
func (ob *GoWindowObj) Title() (title string)
- <a name=\"title\"></a> **(ob** [***GoWindowObj**](api.GoWindow#)**)**.**Title() (** title **string )**\n - - Return the text displayed by the window title bar.\n\n
func (*GoWindowObj) Widget ¶
func (ob *GoWindowObj) Widget() *GioWidget
- <a name=\"widget\"></a> **(ob** [***GoWindowObj)**](api.GoWindow#).**Widget() (** widget [**GioWidget**](api.GioWidget#) **)**\n - - Returns a pointer to the window widget properties.\n\n
type Modifiers ¶ added in v0.0.10
type Modifiers uint32
Modifiers
const ( // ModCtrl is the ctrl modifier key. ModCtrl Modifiers = 1 << iota // ModCommand is the command modifier key // found on Apple keyboards. ModCommand // ModShift is the shift modifier key. ModShift // ModAlt is the alt modifier key, or the option // key on Apple keyboards. ModAlt // ModSuper is the "logo" modifier key, often // represented by a Windows logo. ModSuper )
type ScrollIndicatorStyle ¶
type ScrollIndicatorStyle struct { // MajorMinLen is the smallest that the scroll indicator is allowed to // be along the major axis. MajorMinLen unit_gio.Dp // MinorWidth is the width of the scroll indicator across the minor axis. MinorWidth unit_gio.Dp // Color and HoverColor are the normal and hovered colors of the scroll // indicator. Color, HoverColor color.NRGBA // CornerRadius is the corner radius of the rectangular indicator. 0 // will produce square corners. 0.5*MinorWidth will produce perfectly // round corners. CornerRadius unit_gio.Dp }
ScrollIndicatorStyle configures the presentation of a scroll indicator.
type ScrollTrackStyle ¶
type ScrollTrackStyle struct {
// MajorPadding and MinorPadding along the major and minor axis of the
// scrollbar's track. This is used to keep the scrollbar from touching
// the edges of the content area.
MajorPadding, MinorPadding unit_gio.Dp
// Color of the track background.
Color color.NRGBA
}
ScrollTrackStyle configures the presentation of a track for a scroll area.
type TextInfo ¶
type TextInfo struct { // Truncated contains the number of runes of text that are represented by a truncator // symbol in the text. If zero, there is no truncator symbol. Truncated int }
TextInfo provides metadata about shaped text.
type Type ¶ added in v0.0.10
type Type uint
Type of an Event.
const ( // A Cancel event is generated when the current gesture is // interrupted by other handlers or the system. Cancel Type = 1 << iota // Press of a pointer. Press // Release of a pointer. Release // Move of a pointer. Move // Drag of a pointer. Drag // Pointer enters an area watching for pointer input Enter // Pointer leaves an area watching for pointer input Leave // Scroll of a pointer. Scroll )
Source Files ¶
- application.go
- button.go
- buttongroup.go
- canvas.go
- canvascircle.go
- canvasellipse.go
- canvasitem.go
- canvasline.go
- canvaspath.go
- canvasrect.go
- canvasspline.go
- checkbox.go
- clipboard.go
- color.go
- eventmask.go
- iconlabel.go
- iconpng.go
- iconvg.go
- image.go
- keyboard.go
- label.go
- layout.go
- list.go
- listview.go
- listviewitem.go
- loader.go
- menu.go
- menubar.go
- menuitem.go
- object.go
- pointer.go
- popupmenu.go
- popupwindow.go
- progressbar.go
- progresscircle.go
- radiobutton.go
- rect.go
- richtext.go
- scrollbar.go
- slider.go
- spacer.go
- statusbar.go
- switch.go
- textedit.go
- theme_linux.go
- widget.go