widgets

package
v0.0.0-...-8ea9ff3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package widgets holds all the components supported by thingopher

Package widgets holds all the components supported by thingopher

Package widgets holds all the components supported by thingopher

Package widgets holds all the components supported by Thinggopher

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GBaseComponent

type GBaseComponent interface{}

GBaseComponent is the base component of all the widgets.

func NewBaseComponent

func NewBaseComponent() GBaseComponent

NewBaseComponent returns a base component structure with default values.

type GComponent

type GComponent struct {
	GBaseComponent
	// contains filtered or unexported fields
}

GComponent parameters:

GBaseComponent	: @see gbasecomponent.
background		: Custom background color to use, instead of the default background color. Note: for components
					with gradients (buttons, menubars, etc...) this means that the background will be filled
					with solid color, and not a custom gradient.
foreground		: Custom foreground (text) color to use, instead of the default text color.
font			: Custom font for texts.
height			: Preferred height of the component, or 0. Default = 0.
width			: Fixed preferred width of the component irrespectively of its content. If it is 0, the
					component will be asked for the preferred width. Default = 0.
colspan			: Specifies the number of cells in a column in the component's display area. Default = 1.
rowspan			: Specifies the number of cells in a row occupied by the component. Default = 1.
weightx			: Used to determine how to distribute horizontal space among grid cells when more space is
					available for its parent component than required. Default = 0.
weighty			: The extra vertical space is distributed to each cell height in proportion to its weight.
					Default value is 0. The row contains 0 weighted components remains the calculated preferred
					size. Default = 0.
halign			: Horizontal alignment of the component when more space available in the cell. Possible values
					are: fill, center, left, and right. Default = fill.
valign			: Vertical alignment in the cell. Possible values are: fill, center, top, and bottom.
					Default = fill.

func NewComponent

func NewComponent() GComponent

NewComponent returns a component structure with default values.

type IListener

type IListener interface {
	Action()
}

IListener provides methods for the widgets to execute.

type Widget

type Widget interface {
	Init()
	FocusLost()
	FocusGained()
}

Widget interface provides the basic widgets calls.

Calls:
	Init		: A method to invoke only once when the loading of the xml resource is finished.
	FocusLost	: Invoked when a widget loses the keyboard focus, thusd is no longer the focus owner.
	FocusGained	: Invoked when a widget gains the keyboard focus, thus is now the focus owner.

Directories

Path Synopsis
Package buttons manage all related button widgets
Package buttons manage all related button widgets
Package display manage all non-input widgets.
Package display manage all non-input widgets.
Package input handles all widgets that are used to collect information.
Package input handles all widgets that are used to collect information.
Package items handles all widgets that can hold data.
Package items handles all widgets that can hold data.
Package layouts handles all panel related widgets.
Package layouts handles all panel related widgets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳