GUIEvent

Superclass: Environment

related classes: Conductor, ConductorGUI

GUIEvent defines a default 'sytle sheet' for ConductorGUI objects. Currently, GUIEvent defines a 

single Event, held in the classvar osx.  (Eventually, events for linux and win32 will also be defined.)

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

window // arguments: name, rect

nextLine // argument: win

resizeWindowToContents // argument: win

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


h: 20, // default view height

w: 800, // default view width

labelW: 80, // width of a label and numberbox

vh: 200, // height of a vertical slider

vw: 20, // width 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

 

label // SCStaticText

numberBox // SCNumberBox

smallNumberBox // SCNumberBox

slider // SCSlider

rangeSlider // SCRangeSlider

twodSlider // SC2DSlider

popup // SCPopupMenu

list // SCListView

movie // SCMovieView

popup // SCPopupMenu

scmultislider // SCMultiSliderView

knob // SCKnob, uses SCCompositeView

vnumerical // SCNumberBox, uses SCCompositeView

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

// horizontal orientation

nslider // slider with label and numerical

rslider // range slider with label, needs 2 CVs

numerical // numberBox

smallNumerical // smallNumberBox

radiobuttons // automatically scaled to range of the cv

multislider // scmultislider, CV should have multiple values

// vertical orientation

vslider // slider

vrslider // Vertical rslider, needs 2 CVs

tdslider // needs 2 CVs


// these are primitives that require SV's

popup // SCPopupView

list // SCListView

Of course, this collection of functions is readily extensible, either by adding new keys to the 

ConductorGUI or to GUIEvent-osx.