GUIEvent:
Filter:
Conductor/Classes (extension) | Control

GUIEvent
ExtensionExtension

Defines a "style sheet" for ConductorGUI objects.

Description

GUIEvent defines a default 'sytle sheet' for ConductorGUI objects. Currently, GUIEvent defines a single Event, held in the classvar osx.

NOTE: Eventually, events for linux and win32 will also be defined.

The event defines a set of functions that create and adjust windows:

windowarguments: name, rect
nextLineargument: win
resizeWindowToContentsargument: win

It also defines a set of values that establish default sizes for different view orientations:

h: 20default view height
w: 800default view width
labelW: 80width of a label and numberbox
vh: 200height of a vertical slider
vw: 20width of a vertical slider

It uses those values to define a set of fuctions that create default boundary rectangles for different views:

numericalRect:{ Rect(0,0, ~labelW, ~h) }
smallNumericalRect:{ Rect(0,0, ~labelW/2, ~h) }
sliderRect:{ Rect(0,0, ~w, ~h) }
vsliderRect:{ Rect(0,0, ~vw, ~vh) }
msliderRect:{ Rect(0,0, ~w, ~vh) }
tdsliderRect:{ Rect(0,0, ~vh, ~vh) }
movieRect:{ Rect(0,0, 240, 320) }
labelRect:{ Rect(0,0, ~labelW, ~h) }
popupRect:{ Rect(0,0, ~labelW, ~h) }
listRect:{ Rect(0,0, ~labelW, ~h) }
radioButtonsRect:{ Rect(0,0,10,~h) }

It defines a set of view functions that all take window, name, cv, and rect as arguments. The argument cv can be single CV or an array. In the latter case, the array is iterated and each element receives its own view. If rect is defined, it overrides the default Rects defined above. Below are the keys of the functions that call SCViews directly.

primitives: items that directly use SCView classes

labelSCStaticText
numberBoxSCNumberBox
smallNumberBoxSCNumberBox
sliderSCSlider
rangeSliderSCRangeSlider
twodSliderSC2DSlider
popupSCPopupMenu
listSCListView
movieSCMovieView
popupSCPopupMenu
scmultisliderSCMultiSliderView
knobSCKnob, uses SCCompositeView
vnumericalSCNumberBox, uses SCCompositeView

Another set of keys define labeled guis in terms of the primitives above:

horizontal orientation

nsliderslider with label and numerical
rsliderrange slider with label, needs 2 CVs
numericalnumberBox
smallNumericalsmallNumberBox
radiobuttonsautomatically scaled to range of the cv
multisliderscmultislider, CV should have multiple values

vertical orientation

vsliderslider
vrsliderVertical rslider, needs 2 CVs
tdsliderneeds 2 CVs

these are primitives that require SV's

popupSCPopupView
listSCListView

Of course, this collection of functions is readily extensible, either by adding new keys to the ConductorGUI or to GUIEvent-osx.