GUICV:
Filter:
Classes (extension) | Green > GUICV

GUICV : Object
ExtensionExtension

GUICV base class for look and feel
Source: GUICV.sc

Description

A helper class defining the look and feel of a few GUI widgets. Contains a skin and methods for generating styled views.

See GUICVOverview for practical usage.

Skin

Access the GUICV skin with...

and overwrite entries like this...

GUICV's skin expects the following entries...

background
a Color.
buttonHeight
an Integer.
fontColor
a Color.
fontSpecs
an Array with fontName String and fontSize Integer e.g. ["Menlo", 10].
fontSmallSpecs
an Array with fontName String and fontSize Integer e.g. ["Menlo", 8].
foreground
a Color.
highlight
a Color.
knobWidth
an Integer. Also used knob height and for horizontal sliders (knobWidth*2).
margin
an Integer.
sliderHeight
an Integer. For vertical sliders. Horizontal sliders use buttonHeight.
sliderWidth
an Integer. For vertical sliders. Horizontal sliders use knobWidth*2.
spacing
an Integer.
palette
a QPalette.

Methods

The methods for generating views are used like this...

Class Methods

GUICV.button(parent, bounds)

GUICV.knob(parent, bounds)

GUICV.levelIndicator(parent, bounds)

GUICV.numberBox(parent, bounds)

GUICV.popUpMenu(parent, bounds)

GUICV.slider(parent, bounds)

GUICV.staticText(parent, bounds)

GUICV.textField(parent, bounds)

Arguments:

parent
bounds

tools

GUICV.adapt(view)

Make a view green by setting the palette, font and various colours. The settings are from GUICV.skins.guiCV.

Arguments:

view

a View

Returns:

the same View

GUICV.fixDec(val, numDecimals: 2)

Float to String conversion with fixed number of decimals.

Arguments:

val

A Float.

numDecimals

Number of decimals in string.

Returns:

a String.

Inherited class methods

Instance Methods

Inherited instance methods