Classes | JITLib > GUI | Live Coding

EnvirGui : JITGui : Object

display the contents of an environment for editing
Source: EnvirGui.sc
Subclasses: NdefParamGui


EnvirGui displays all keys and values of an environment, so one can change them flexibly. Single number get displayed with an EZSlider, pairs of numbers with an EZRanger, and anything else is shown as an EZText (a text field).

Class Methods


EnvirGui.new(object, numItems: 8, parent, bounds, makeSkip: true, options: [ ])

create a new EnvirGui NdefParamGui



the envir to display


the number of items to display. If an envir is given, and no num, num is envir.size.


the parent view to display in; if none is given, a new window is created.


the bounds within which to display; if none is given, bounds are calculated.


flag whether to make a skipjack to manage updates of the envirgui.


configuration options

Inherited class methods

Instance Methods

Instance Variables


From superclass: JITGui

how many envir items to display


.envir = envir

the envir displayed - actually an alias for object.


From superclass: JITGui

the composite view the envirgui makes for itself


the paramViews that display the values:

See ParamView for details.


a local dictionary of the specs used for display ranges of numerical parameters by the paramViews of this envirgui. See the -getSpec method for details.


the keys of the currently displayed items in the dict.


if the size of envir exceeds numItems, the keys displayed can be rotated: e.g. with 10 keys displayed on 5 paramViews, keysRotation 0 means show keys (0..4), keysRotation 2 means show keys (2..6), etc.

gui elements present if requested in options





Some Methods


.object = obj

From superclass: JITGui

set the environment to show



can be nil, a dictionary, an environment, or an event.


.envir = envir

same as object_(obj)

.name = name

if in its own window, set the window's name

.getSpec(key, value)

For editing, numerical parameters need control specs for the ranges on the gui. These can be set locally in the EnvirGui, or global specs will be looked up. If no local or global specs exist for that parameter name, getSpec makes a usable guess for them. (With JITLibExtensions, one can also look up specs attached to an object such as a proxy.)



the parameter name for which to find a spec


the current value of that param, which is used when guessing specs.

.putSpec(key, obj)

add a spec for a given key, or (if it is a global key) override a global spec with a local one:

Keys with technical names can be replaced in the display with clearer names: method replaceKeys the current list of keys to replace

.addReplaceKey(replaced, replacer, spec)

add a key to replace and its replacer key


remove a replacer key



.highlight(index, prefix, color)

highlight the paramview at a given index, by color and optional prefix


remove highlighting at an index g.unhighlight(0);

Some internal methods


update the widgets for the current keys

.showFields(num: 0)

show (num) active fields, make others invisible.


.useRanger = value

set and get whether arrays of 2 number values should be displayed with EZRangers.

methods that make gui elements:


.makeOptionalViews(options, height: 20)

the method that makes all views specified in the options

.makeNameView(width, height)

.makeKnowBut(width, height)

.makeDocBut(width, height)

.makeClrBut(width, height)

.makeProtoBut(width, height)

.makeParentBut(width, height)

the methods that make the individual elements as specified

standard JITGui methods:






Inherited instance methods

Undocumented instance methods

.colorizeArea(area, hilite: true)