utopia

package module
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT, Unlicense Imports: 51 Imported by: 24

README

UtopiaGio

Only coded and running on Windows OS.

Work is proceeding on Linux OS versions, but help is required to port to MacOS.

UtopiaGio is a Go framework library built on top of the Gio library module. Gio is a cross-platform immediate mode GUI.

The GoApplication class/structure maintains a list of GoWindows and manages the control of the GoWindows and their running threads.

Each GoWindow runs it's own message loop, but it will be possible to send and receive communications over channels between windows.

The framework allows the building of more complex programs without the necessity to access the Gio backend. In turn this means reduced calls to Gio directly, but the ability to write specific Gio routines still remains. It is also possible to use all of the Gio widget classes by encapsulating within the GioObject structure inside the Layout function.

Inheritance is achieved using the new GioObject, and the user interface is provided by the new GioWidget.

New layout methods have been introduced requiring a very small change to the Gio package layout module. The Gio widget module is still used on some of the widgets, but the intention is to move any relevant code for GioWidgets to the internal/widget package.

Access to the underlying OS Screen and Main Window has been provided through the desktop package, making it possible to retrieve position, size and scaling of gio windows. The Pos function has been added to the Gio package, which along with the Size function allows positioning and sizing of the gio window. Also available at run time using GoWindowObj SetPos() and SetSize() functions.

A simple GoMainWindow
    package main

    import (
        ui "github.com/utopiagio/utopia"
    )

    var mainwin *ui.GoWindowObj

    func main() {
        // create application instance before any other objects
        app := ui.GoApplication("GoMainWindowDemo")
	
        // create application window
        mainwin = ui.GoMainWindow("GoMainWindow Demo - UtopiaGio Package")
	
        // set the window layout style to stack widgets vertically
        mainwin.SetLayoutStyle(ui.VFlexBoxLayout)
        mainwin.SetMargin(10,10,10,10)
        mainwin.SetBorder(ui.BorderSingleLine, 2, 10, ui.Color_Blue)
        mainwin.SetPadding(10,10,10,10)
	
        // show the application window
        mainwin.Show()

        // run the application
        app.Run()
    }

Every GoWindowObj uses a main layout to allow the positioning of child controls (GioWidgets). The main layout is accessible through the GoWindowObj.Layout() function.

All child controls are created by passing the parent control as the first parameter.

    lblHello := ui.GoLabel(mainwin.Layout(), "Hello")
GoLayout

Usually the main window will be constructed using multiple layouts to allow the positioning of child controls into regions within the main window.

    ....
    layoutTop := ui.GoHFlexBoxLayout(mainwin.Layout())
    layoutBottom := ui.GoHFlexBoxLayout(mainwin.Layout())
    ....

GoLayout has four possible configurations.

1 GoHBoxLayout aligns the child controls horizontally within the layout. No attempt is made to constrain the child controls to fit within the bounds of the layout control. However if the chid controls exceed the horizontal extents of the layout a horizontal scroll bar will be displayed and the layout can be scrolled.

2 GoVBoxLayout aligns the child controls vertically within the layout. No attempt is made to constrain the child controls to fit within the bounds of the layout control. However if the chid controls exceed the vertical extents of the layout a vertical scroll bar will be displayed and the layout can be scrolled.

3 GoHFlexBoxLayout aligns the child controls horizontally and attempts to constrain the child control widths to fit within the layout.

4 GoVFlexBoxLayout aligns the child controls vertically and attempts to constrain the child control heights to fit within the layout.

The sizing method of each child control is determined by the child control's GoSizePolicy.

All controls (GioWidgets), including layouts, have margin, border and padding (GoMargin ,GoBorder, GoPadding) properties, which can be set at run time. Defaults are provided for controls where possible. These are the main windows layout properties

    ....
    mainwin.SetMargin(10,10,10,10)
    mainwin.SetBorder(ui.BorderSingleLine, 2, 10, ui.Color_Blue)
    mainwin.SetPadding(10,10,10,10)
    ....

Usually the main window will only have padding.

    mainwin.SetPadding(10,10,10,10)

Then to add child layouts to the main window and set parameters

    ....
    layoutTop := ui.GoHFlexBoxLayout(mainwin.Layout())
    layoutTop.SetMargin(0,0,0,0)                          // Same as default layout margin
    layoutTop.SetBorder(ui.BorderSingleLine, 2, 10, ui.Color_Blue)
    layoutTop.SetPadding(10,10,10,10)

    ui.GoSpacer(win.Layout(), 10)                         // Add spacer in between layouts

    layoutBottom := ui.GoHFlexBoxLayout(mainwin.Layout())
    layoutBottom.SetSizePolicy(ui.ExpandingWidth, ui.PreferredHeight)    // GoSizePolicy
    layoutBottom.SetMargin(0,0,0,0)                       // Same as default layout margin
    layoutBottom.SetBorder(ui.BorderSingleLine, 2, 10, ui.Color_Blue)
    layoutBottom.SetPadding(0,0,0,0)
    ....
    
GoSizePolicy

GioWidget sizing can be controlled using a sizing policy. There are basically six settings available FixedWidth and FixedHeight, PreferredWidth and PreferredHeight, ExpandingWidth and ExpandingHeight.

1 Fixed restrains the widget to its Width and Height parameters.

2 Preferred restrains the widget to the dimensions of its children.

3 Expanding expands the widget to use all the available remaining space.

The default for layouts is ExpandingWidth, ExpandingHeight.

GoTextEdit

Add a GoTextEdit control to the top layout and set its SizePolicy and Font.

    txtPad := ui.GoTextEdit(layoutTop, "Enter text here.")
    txtPad.SetSizePolicy(ui.ExpandingWidth, ui.ExpandingHeight)
    txtPad.SetFont("Go", ui.Regular, ui.Bold)

Notice the parent object layoutTop. This declaration renders the TextEdit as a child of this layout.

GoButton

Add a GoButtonObj to the bottom layout and set its border and padding along with the onClick action function.

    btnClose := ui.GoButton(layoutBottom, "Close")
    btnClose.SetBorder(ui.BorderSingleLine, 1, 6, ui.Color_Blue)
    btnClose.SetPadding(4,4,4,4)
    btnClose.SetOnClick(ActionExit_Clicked)

Notice the parent object layoutBottom. This declaration renders the Button as a child of this layout. Also because the layout has a SizePolicy of ui.PreferredHeight, the layout will size to contain the button object and not expand.

The GoButtonObj also has the default SizePolicy of ui.PreferredWidth and ui.PreferredWidth resulting in a button just big enough to display the caption of the button plus some default padding.

The function ActionExit_Clicked() must be declared outside the package main() function as an external function.

    func ActionExit_Clicked() {
        log.Println("ActionExit_Clicked().......")
        os.Exit(0)
    }
To see a demo GoHello run:
    go run github.com/utopiagio/demos/GoHello@latest

Documentation

Index

Constants

View Source
const (
	CanvasLine int = iota
	CanvasRectangle
	CanvasCircle
	CanvasEllipse
	CanvasPath
	CanvasSpline
)
View Source
const (
	Horizontal = 0
	Vertical   = 1
)

Variables

View Source
var GoDpr float32
View Source
var GoSpr float32

Functions

func Collection added in v0.0.2

func Collection() []font_gio.FontFace

Regular returns a collection of all available Go font faces.

func ColorToRGB

func ColorToRGB(color GoColor) (r uint8, g uint8, b uint8)

func DisabledBlend

func DisabledBlend(c color.NRGBA) (d color.NRGBA)

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

func HoveredBlend(c color.NRGBA) (h color.NRGBA)

Hovered blends dark colors towards white, and light colors towards black. It is approximate because it operates in non-linear sRGB space.

func MulAlpha

func MulAlpha(col color.NRGBA, alpha uint8) color.NRGBA

MulAlpha applies the alpha to the color.

func PaintRect

func PaintRect(gtx layout_gio.Context, size image.Point, fill GoColor)

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 GioObject

type GioObject struct {
	Parent       GoObject
	Window       *GoWindowObj
	Controls     []GoObject
	GoSizePolicy *GoSizePolicy
}

func (*GioObject) AddControl

func (ob *GioObject) AddControl(control GoObject)

func (*GioObject) Clear

func (ob *GioObject) Clear()

func (*GioObject) DeleteControl

func (ob *GioObject) DeleteControl(control GoObject)

func (*GioObject) Draw

func (*GioObject) InsertControl

func (ob *GioObject) InsertControl(control GoObject, idx int)

func (*GioObject) Objects

func (ob *GioObject) Objects() (controls []GoObject)

func (*GioObject) ParentControl

func (ob *GioObject) ParentControl() (control GoObject)

func (*GioObject) ParentWindow

func (ob *GioObject) ParentWindow() (window *GoWindowObj)

func (*GioObject) RemoveControl

func (ob *GioObject) RemoveControl(control GoObject)

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 (w *GioWidget) ChangeFocus(focus bool) bool

func (*GioWidget) ChangeFocus(focus bool) (bool) Changes focus on the widget if it can accept keyboard focus

func (*GioWidget) ClearFocus

func (w *GioWidget) ClearFocus() bool

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) Clicked

func (w *GioWidget) Clicked() (clicked bool)

func (*GioWidget) HasFocus

func (w *GioWidget) HasFocus() bool

func (*GioWidget) Hide

func (w *GioWidget) Hide()

func (*GioWidget) IsFocusEnabled

func (w *GioWidget) IsFocusEnabled() bool

func (*GioWidget) IsHovered

func (w *GioWidget) IsHovered() bool

func (*GioWidget) IsSelected

func (w *GioWidget) IsSelected() bool

func (*GioWidget) IsVisible

func (w *GioWidget) IsVisible() bool

func (*GioWidget) Margin

func (w *GioWidget) Margin() (margin GoMargin)

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 (w *GioWidget) Padding() (padding GoPadding)

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 (w *GioWidget) SetBackgroundColor(color GoColor)

func (*GioWidget) SetBorder

func (w *GioWidget) SetBorder(style GoBorderStyle, width int, radius int, color GoColor)

func (*GioWidget) SetBorderColor

func (w *GioWidget) SetBorderColor(color GoColor)

func (*GioWidget) SetBorderRadius

func (w *GioWidget) SetBorderRadius(radius int)

func (*GioWidget) SetBorderStyle

func (w *GioWidget) SetBorderStyle(style GoBorderStyle)

func (*GioWidget) SetBorderWidth

func (w *GioWidget) SetBorderWidth(width int)

func (*GioWidget) SetFocus

func (w *GioWidget) SetFocus() bool

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) SetHeight

func (w *GioWidget) SetHeight(height int)

func (*GioWidget) SetMargin

func (w *GioWidget) SetMargin(left int, top int, right int, bottom int)

func (*GioWidget) SetMaxHeight

func (w *GioWidget) SetMaxHeight(maxHeight int)

func (*GioWidget) SetMaxWidth

func (w *GioWidget) SetMaxWidth(maxWidth int)

func (*GioWidget) SetMinHeight

func (w *GioWidget) SetMinHeight(minHeight int)

func (*GioWidget) SetMinWidth

func (w *GioWidget) SetMinWidth(minWidth int)

func (*GioWidget) SetOnClearFocus

func (w *GioWidget) SetOnClearFocus(f func())

func (*GioWidget) SetOnKeyEdit

func (w *GioWidget) SetOnKeyEdit(f func(e key_gio.EditEvent))

func (*GioWidget) SetOnKeyPress

func (w *GioWidget) SetOnKeyPress(f func(e key_gio.Event))

func (*GioWidget) SetOnKeyRelease

func (w *GioWidget) SetOnKeyRelease(f func(e key_gio.Event))

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 (w *GioWidget) SetPadding(left int, top int, right int, bottom int)

func (*GioWidget) SetSelected

func (w *GioWidget) SetSelected(selected bool)

func (*GioWidget) SetWidth

func (w *GioWidget) SetWidth(width int)

func (*GioWidget) Show

func (w *GioWidget) Show()

func (*GioWidget) SignalEvents

func (w *GioWidget) SignalEvents(gtx layout_gio.Context)

func (*GioWidget) Size added in v0.0.6

func (w *GioWidget) Size() GoSize

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

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

type GoButtonObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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) IsActive

func (ob *GoCanvasCircleObj) IsActive() (active bool)

func (*GoCanvasCircleObj) IsAnimated

func (ob *GoCanvasCircleObj) IsAnimated() (animated bool)

func (*GoCanvasCircleObj) IsEnabled

func (ob *GoCanvasCircleObj) IsEnabled() (enabled bool)

func (*GoCanvasCircleObj) IsSelected

func (ob *GoCanvasCircleObj) IsSelected() (selected bool)

func (*GoCanvasCircleObj) IsVisible

func (ob *GoCanvasCircleObj) IsVisible() (visible bool)

func (*GoCanvasCircleObj) Move

func (ob *GoCanvasCircleObj) Move(x float32, y float32)

func (*GoCanvasCircleObj) SetActive

func (ob *GoCanvasCircleObj) SetActive(active bool)

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 (ob *GoCanvasCircleObj) SetVelocity(x int, y int)

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)

func (*GoCanvasCircleObj) SetZ

func (ob *GoCanvasCircleObj) SetZ(z int)

func (*GoCanvasCircleObj) Show

func (ob *GoCanvasCircleObj) Show()

func (*GoCanvasCircleObj) Type

func (ob *GoCanvasCircleObj) Type() (typeId int)

func (*GoCanvasCircleObj) XVelocity

func (ob *GoCanvasCircleObj) XVelocity() (x int)

func (*GoCanvasCircleObj) YVelocity

func (ob *GoCanvasCircleObj) YVelocity() (y int)

func (*GoCanvasCircleObj) Z

func (ob *GoCanvasCircleObj) Z() (z 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) IsActive

func (ob *GoCanvasEllipseObj) IsActive() (active bool)

func (*GoCanvasEllipseObj) IsAnimated

func (ob *GoCanvasEllipseObj) IsAnimated() (animated bool)

func (*GoCanvasEllipseObj) IsEnabled

func (ob *GoCanvasEllipseObj) IsEnabled() (enabled bool)

func (*GoCanvasEllipseObj) IsSelected

func (ob *GoCanvasEllipseObj) IsSelected() (selected bool)

func (*GoCanvasEllipseObj) IsVisible

func (ob *GoCanvasEllipseObj) IsVisible() (visible bool)

func (*GoCanvasEllipseObj) Move

func (ob *GoCanvasEllipseObj) Move(x float32, y float32)

func (*GoCanvasEllipseObj) SetActive

func (ob *GoCanvasEllipseObj) SetActive(active bool)

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 (ob *GoCanvasEllipseObj) SetVelocity(x int, y int)

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) SetZ

func (ob *GoCanvasEllipseObj) SetZ(z int)

func (*GoCanvasEllipseObj) Show

func (ob *GoCanvasEllipseObj) Show()

func (*GoCanvasEllipseObj) Type

func (ob *GoCanvasEllipseObj) Type() (typeId int)

func (*GoCanvasEllipseObj) Width

func (ob *GoCanvasEllipseObj) Width() (width float32)

func (*GoCanvasEllipseObj) XVelocity

func (ob *GoCanvasEllipseObj) XVelocity() (x int)

func (*GoCanvasEllipseObj) YVelocity

func (ob *GoCanvasEllipseObj) YVelocity() (y int)

func (*GoCanvasEllipseObj) Z

func (ob *GoCanvasEllipseObj) Z() (z int)

type GoCanvasItem

type GoCanvasItem interface {
	Advance()
	BoundingRect() (float32, float32, float32, float32)
	Draw(ops *op_gio.Ops)
	Hide()
	Move(x float32, y float32)
	Centre(x float32, y float32)
	Show()
	Type() int
}

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) Hide

func (ob *GoCanvasLineObj) Hide()

func (*GoCanvasLineObj) IsActive

func (ob *GoCanvasLineObj) IsActive() (active bool)

func (*GoCanvasLineObj) IsAnimated

func (ob *GoCanvasLineObj) IsAnimated() (animated bool)

func (*GoCanvasLineObj) IsEnabled

func (ob *GoCanvasLineObj) IsEnabled() (enabled bool)

func (*GoCanvasLineObj) IsSelected

func (ob *GoCanvasLineObj) IsSelected() (selected bool)

func (*GoCanvasLineObj) IsVisible

func (ob *GoCanvasLineObj) IsVisible() (visible bool)

func (*GoCanvasLineObj) Move

func (ob *GoCanvasLineObj) Move(x float32, y float32)

func (*GoCanvasLineObj) SetActive

func (ob *GoCanvasLineObj) SetActive(active bool)

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 (ob *GoCanvasLineObj) SetVelocity(x int, y int)

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)

func (*GoCanvasLineObj) SetZ

func (ob *GoCanvasLineObj) SetZ(z int)

func (*GoCanvasLineObj) Show

func (ob *GoCanvasLineObj) Show()

func (*GoCanvasLineObj) Type

func (ob *GoCanvasLineObj) Type() (typeId int)

func (*GoCanvasLineObj) XVelocity

func (ob *GoCanvasLineObj) XVelocity() (x int)

func (*GoCanvasLineObj) YVelocity

func (ob *GoCanvasLineObj) YVelocity() (y int)

func (*GoCanvasLineObj) Z

func (ob *GoCanvasLineObj) Z() (z int)

type GoCanvasObj

type GoCanvasObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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) IsActive

func (ob *GoCanvasPathObj) IsActive() (active bool)

func (*GoCanvasPathObj) IsAnimated

func (ob *GoCanvasPathObj) IsAnimated() (animated bool)

func (*GoCanvasPathObj) IsEnabled

func (ob *GoCanvasPathObj) IsEnabled() (enabled bool)

func (*GoCanvasPathObj) IsSelected

func (ob *GoCanvasPathObj) IsSelected() (selected bool)

func (*GoCanvasPathObj) IsVisible

func (ob *GoCanvasPathObj) IsVisible() (visible bool)

func (*GoCanvasPathObj) Move

func (ob *GoCanvasPathObj) Move(x float32, y float32)

func (*GoCanvasPathObj) SetActive

func (ob *GoCanvasPathObj) SetActive(active bool)

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 (ob *GoCanvasPathObj) SetVelocity(x int, y int)

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)

func (*GoCanvasPathObj) SetZ

func (ob *GoCanvasPathObj) SetZ(z int)

func (*GoCanvasPathObj) Show

func (ob *GoCanvasPathObj) Show()

func (*GoCanvasPathObj) Type

func (ob *GoCanvasPathObj) Type() (typeId int)

func (*GoCanvasPathObj) XVelocity

func (ob *GoCanvasPathObj) XVelocity() (x int)

func (*GoCanvasPathObj) YVelocity

func (ob *GoCanvasPathObj) YVelocity() (y int)

func (*GoCanvasPathObj) Z

func (ob *GoCanvasPathObj) Z() (z 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) IsActive

func (ob *GoCanvasRectObj) IsActive() (active bool)

func (*GoCanvasRectObj) IsAnimated

func (ob *GoCanvasRectObj) IsAnimated() (animated bool)

func (*GoCanvasRectObj) IsEnabled

func (ob *GoCanvasRectObj) IsEnabled() (enabled bool)

func (*GoCanvasRectObj) IsSelected

func (ob *GoCanvasRectObj) IsSelected() (selected bool)

func (*GoCanvasRectObj) IsVisible

func (ob *GoCanvasRectObj) IsVisible() (visible bool)

func (*GoCanvasRectObj) Move

func (ob *GoCanvasRectObj) Move(x float32, y float32)

func (*GoCanvasRectObj) SetActive

func (ob *GoCanvasRectObj) SetActive(active bool)

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 (ob *GoCanvasRectObj) SetVelocity(x int, y int)

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) SetZ

func (ob *GoCanvasRectObj) SetZ(z int)

func (*GoCanvasRectObj) Show

func (ob *GoCanvasRectObj) Show()

func (*GoCanvasRectObj) Type

func (ob *GoCanvasRectObj) Type() (typeId int)

func (*GoCanvasRectObj) Width

func (ob *GoCanvasRectObj) Width() (width float32)

func (*GoCanvasRectObj) XVelocity

func (ob *GoCanvasRectObj) XVelocity() (x int)

func (*GoCanvasRectObj) YVelocity

func (ob *GoCanvasRectObj) YVelocity() (y int)

func (*GoCanvasRectObj) Z

func (ob *GoCanvasRectObj) Z() (z int)

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

type GoCheckBoxObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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_NavajoWhite          GoColor = 0xFFFFDEAD
	Color_Navy                 GoColor = 0xFF000080
	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 ColorFromRGB

func ColorFromRGB(r uint8, g uint8, b uint8, a uint8) GoColor

func ColorIndex

func ColorIndex(idx int) GoColor

func NRGBAColor

func NRGBAColor(col color.NRGBA) GoColor

func RGBAColor

func RGBAColor(r uint8, g uint8, b uint8, a uint8) GoColor

func (GoColor) MulAlpha

func (c GoColor) MulAlpha(alpha uint8) (color GoColor)

MulAlpha applies the alpha to the color.

func (GoColor) NRGBA

func (c GoColor) NRGBA() color.NRGBA

func NRGBA returns NRGBA color from GoColor

func (GoColor) RGBA

func (c GoColor) RGBA() (r uint8, g uint8, b uint8, a uint8)

type GoEventMaskObj added in v0.0.8

type GoEventMaskObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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

type GoIconButtonObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*GoIconButtonObj) Layout

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

type GoIconLabelObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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 (*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

type GoLabelObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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

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

type GoListViewItemObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

func GoListViewItem

func GoListViewItem(parent GoObject, data []byte, text string, listLevel int, listId int) (hObj *GoListViewItemObj)

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 (*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

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

type GoLoaderObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

type GoMargin struct {
	Left   int
	Top    int
	Right  int
	Bottom int
}

func (*GoMargin) Layout

type GoMenuBarObj

type GoMenuBarObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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

type GoMenuItemObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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

type GoMenuObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

func GoMenu

func GoMenu(parent GoObject, text string, id int) (hObj *GoMenuObj)

func (*GoMenuObj) AddAction

func (ob *GoMenuObj) AddAction(text string, action func())

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 (*GoMenuObj) MenuOffset

func (ob *GoMenuObj) MenuOffset() int

func (*GoMenuObj) ObjectType

func (ob *GoMenuObj) ObjectType() string

func (*GoMenuObj) SetOnClick

func (ob *GoMenuObj) SetOnClick(f func())

func (*GoMenuObj) SetText

func (ob *GoMenuObj) SetText(text string)

func (*GoMenuObj) Text

func (ob *GoMenuObj) Text() (text string)

func (*GoMenuObj) Widget

func (ob *GoMenuObj) Widget() *GioWidget

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

type GoPadding struct {
	Left   int
	Top    int
	Right  int
	Bottom int
}

func (*GoPadding) Layout

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

type GoPopupMenuObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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

type GoPopupWindowObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

func GoPopupWindow

func GoPopupWindow(parent GoObject) (hPopupWindow *GoPopupWindowObj)

func (*GoPopupWindowObj) Click

func (ob *GoPopupWindowObj) Click(e GoPointerEvent)

func (*GoPopupWindowObj) Draw

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 GoPos

type GoPos struct {
	X int
	Y int
}

func (GoPos) ImPos

func (p GoPos) ImPos() image.Point

type GoPosDp added in v0.0.11

type GoPosDp struct {
	XDp unit_gio.Dp
	YDp unit_gio.Dp
}

type GoProgressBarObj

type GoProgressBarObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

func GoProgressBar

func GoProgressBar(parent GoObject, totalSteps int) *GoProgressBarObj

func (*GoProgressBarObj) Draw

func (*GoProgressBarObj) Layout added in v0.0.3

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

type GoProgressCircleObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

func GoProgressCircle

func GoProgressCircle(parent GoObject, totalSteps int) *GoProgressCircleObj

func (*GoProgressCircleObj) Draw

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 (*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

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 GoRect

type GoRect struct {
	Color color.NRGBA
	Size  image.Point
	Radii int
}

func (GoRect) Layout

func (r GoRect) Layout(gtx C) D

type GoRichTextObj added in v0.0.7

type GoRichTextObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 GoSize struct {
	MinWidth  int
	MinHeight int
	Width     int
	Height    int
	MaxWidth  int
	MaxHeight int
	AbsWidth  int
	AbsHeight int
}

func (GoSize) ImMax

func (s GoSize) ImMax() image.Point

func (GoSize) ImMin

func (s GoSize) ImMin() image.Point

func (GoSize) ImSize

func (s GoSize) ImSize() image.Point

type GoSizeDp added in v0.0.11

type GoSizeDp struct {
	MinWidthDp  unit_gio.Dp
	MinHeightDp unit_gio.Dp
	WidthDp     unit_gio.Dp
	HeightDp    unit_gio.Dp
	MaxWidthDp  unit_gio.Dp
	MaxHeightDp unit_gio.Dp
}

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 (*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

type GoSpacerObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*GoSpacerObj) ObjectType

func (ob *GoSpacerObj) ObjectType() string

func (*GoSpacerObj) Widget

func (ob *GoSpacerObj) Widget() *GioWidget

type GoStatusBarObj added in v0.0.10

type GoStatusBarObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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

type GoSwitchObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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

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

type GoTextEditObj struct {
	GioObject
	GioWidget
	// contains filtered or unexported fields
}

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 (*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 ID added in v0.0.10

type ID uint16

ID is the id for the pointer to track press release

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 Priority added in v0.0.10

type Priority uint8

Priority of an Event.

const (
	// Shared priority is for handlers that
	// are part of a matching set larger than 1.
	Shared Priority = iota
	// Foremost priority is like Shared, but the
	// handler is the foremost of the matching set.
	Foremost
	// Grabbed is used for matching sets of size 1.
	Grabbed
)

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 Source added in v0.0.10

type Source uint8

Source of an Event.

const (
	// Mouse generated event.
	Mouse Source = iota
	// Touch generated event.
	Touch
)

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
)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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