gtk3Import

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEntryChangedEvent

func GetEntryChangedEvent(
	entryCtrl interface{},
	storeIn interface{}, setDefault bool,
	callback ...func(value interface{}) bool) (signalHandle glib.SignalHandle)

GetEntryChangedEvent: Retrieval of the value entered in real time. This means that the '&storeIn' variable will always contain the content of the 'entryCtrl' object. Works with: GtkEntry, GtkSearchEntry and GtkSpinButton. The 'setDefault' flag determine if the given '&storeIn' that hold value, will be set as default. The 'callback' func (if used), controls whether the obtained value should be or not modified / recorded (returned 'bool'). e.g:

GetEntryChangedEvent(Entry, &entryValue, true, func(val interface{}) bool {
		valPtr := val.(*string) // or valPtr := val.(*float64) for GtkSpinbutton
		if *valPtr == "xxx" {
			*valPtr = "xxx forbidden !"
		}
		return true
	})

func GetEntryText

func GetEntryText(entry *gtk.Entry) (outString string)

GetEntryText: retrieve value of an entry control.

func GetEntryTextAsInt

func GetEntryTextAsInt(entry *gtk.Entry) (outint int)

GetEntryTextAsInt: retrieve value of an entry control as integer

func GetExtEntry

func GetExtEntry(e *gtk.Entry, separator string) (out []string)

GetExtEntry: Sanitize and get extension entries

func GetSepEntry

func GetSepEntry(e *gtk.Entry, separator string) (out []string)

GetSepEntry: Sanitize and get separated entries

func SetExtEntry

func SetExtEntry(e *gtk.Entry, separator string, in []string)

SetExtEntry: set extension entries

func SetSepEntry

func SetSepEntry(e *gtk.Entry, separator string, in []string)

SetSepEntry: set separated entries

func SpinbuttonSetValues

func SpinbuttonSetValues(widget interface{}, min, max, value float64, step ...float64) (adjustment *gtk.Adjustment, err error)

SpinbuttonSetValues: Configure a GtkSpinButton: where 'step' values means in order: stepIncrement, pageIncrement, pageSize 'nil' value send as 'sb' will just return a configured *gtk.Adjustment. Otherwise, the GtkSpinButton will be configured with the given values. Note: Accept GtkSpinButton, GtkScale as arguments.

Types

type SpinScaleSet

type SpinScaleSet struct {
	Widget interface{}
	Value,
	Min,
	Max,
	IncStep,
	PageIncrement,
	PageSize,
	SpinSetAccell float64
	SetDispDigits uint
	SpinSetNumeric,
	SpinSetSnapToTicks,
	SpinSetWrap,
	ScaleSetDrawValue,
	ScaleSetHasOrig,

	AutoUpdateOnSignalCall bool
	ScaleSetValuePos gtk.PositionType
	CallbackOnChange interface{}
	Adjustment       *gtk.Adjustment
}

SpinScaleSet: is a structure which contains parameters for the simple configuration of GtkSpinButton / GtkScaleButton. The options available are the most commonly used. If a callback function is present and 'AutoUpdateOnSignalCall' flag is set to 'true' (default value = false), the object's parameters will be updated on each 'value-updated' signal. Note: GtkSpinButton, GtkScaleButton are accepted as arguments, a GtkAdjustement object is created and linked to the given widget, it remain accessible using the main structure as all others parameters.

func SpinScaleSetNew

func SpinScaleSetNew(widget interface{}, min, max, value, step float64, callbackChangeOnChange ...interface{}) (*SpinScaleSet, error)

SpinScaleSetNew: create a new structure to which contains parameters for the simple configuration of GtkSpinButton / GtkScaleButton.

func (*SpinScaleSet) SetDigits

func (sss *SpinScaleSet) SetDigits(v uint)

func (*SpinScaleSet) SetIncStep

func (sss *SpinScaleSet) SetIncStep(v float64)

func (*SpinScaleSet) SetMax

func (sss *SpinScaleSet) SetMax(v float64)

func (*SpinScaleSet) SetMin

func (sss *SpinScaleSet) SetMin(v float64)

Set values ...

func (*SpinScaleSet) SetPageIncrement

func (sss *SpinScaleSet) SetPageIncrement(v float64)

func (*SpinScaleSet) SetPageSize

func (sss *SpinScaleSet) SetPageSize(v float64)

func (*SpinScaleSet) SetScaleDrawValue

func (sss *SpinScaleSet) SetScaleDrawValue(v bool)

func (*SpinScaleSet) SetScaleHasOrig

func (sss *SpinScaleSet) SetScaleHasOrig(v bool)

func (*SpinScaleSet) SetScaleValuePos

func (sss *SpinScaleSet) SetScaleValuePos(v gtk.PositionType)

func (*SpinScaleSet) SetSpinAccell

func (sss *SpinScaleSet) SetSpinAccell(v float64)

func (*SpinScaleSet) SetSpinNumeric

func (sss *SpinScaleSet) SetSpinNumeric(v bool)

func (*SpinScaleSet) SetSpinSnapToTicks

func (sss *SpinScaleSet) SetSpinSnapToTicks(v bool)

func (*SpinScaleSet) SetSpinWrap

func (sss *SpinScaleSet) SetSpinWrap(v bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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