giox

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 2 Imported by: 1

README

giox - GIO UI Extensions

Versioning Note

Please note: version 1.2.0 is not backward compatible. I resolved to violate slightly Go module versioning rules because GIOUI is actively WIP.

Description

Extensions for GIO UI immediate GUI library for Golang

Implements additional widgets:

  • Combobox (expandable-style)
  • Shortcut functions for frequent use cases:
    • RigidEditor
    • RigidButton
    • RigidSection
    • RigidLabel
    • RigidCheckbox

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Combo

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

Combo holds combobox state

func MakeCombo

func MakeCombo(items []string, hint string) Combo

MakeCombo Creates new combobox widget

func (*Combo) Button

func (c *Combo) Button(index int) *widget.Clickable

Button returns a pointer to correspoding button widget

func (*Combo) HasSelected

func (c *Combo) HasSelected() bool

HasSelected returns true if an item is selected

func (*Combo) Hint

func (c *Combo) Hint() string

Hint returns control's hint test

func (*Combo) IsExpanded

func (c *Combo) IsExpanded() bool

IsExpanded checks wheather box is expanded

func (*Combo) Item

func (c *Combo) Item(index int) string

Item returns a text for corresponding item

func (*Combo) Items

func (c *Combo) Items() []string

Items returns current list of items

func (*Combo) Len

func (c *Combo) Len() int

Len returns number of items

func (*Combo) SelectButton

func (c *Combo) SelectButton() *widget.Clickable

SelectButton returns a points to main (open) combobox button

func (*Combo) SelectIndex

func (c *Combo) SelectIndex(index int) error

SelectIndex sets currenly selected item by index

func (*Combo) SelectItem

func (c *Combo) SelectItem(item string) error

SelectItem sets currenly selected item by value

func (*Combo) SelectedText

func (c *Combo) SelectedText() string

SelectedText returns currently selected item

func (*Combo) Toggle

func (c *Combo) Toggle() bool

Toggle expands and collapses a combobox

func (*Combo) Unselect

func (c *Combo) Unselect()

Unselect removes current selection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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