PdefGui:
Filter:
Classes | JITLib > GUI | Live Coding

PdefGui : TaskProxyGui : JITGui : Object

a line of editing controls for a Pdef, and optionally its envir

Description

A gui showing the Pdef's name, playing state, source state, and envir state. Optionally, its envir can also be edited.

First example

Details on the GUI elements

name button
when selected, typing the delete key will delete its Pdef.
play/stop button
indicates whether the Pdef is playing:
" >"if stopped,
" _"if playing and active,
" |"if it is playing, but the stream has ended.

pause/resume button
only visible if one can pause or resume the Pdef, i.e. while it is playing.
"paus"shown when you can pause it,
"rsum"shown when you can resume it.

src button
opens a document to edit the source (function) of the Pdef.
greena source exists,
whitethe source is nil.

env button
opens a document to edit the environment of the Pdef, which is where one can keep all variables the Pdef uses for easy access.
greenthe Pdef has an envir,
whitethe envir is nil.

Class Methods

Creation Methods

PdefGui.new(object, numItems: 0, parent, bounds, makeSkip: true, options: [ ])

From superclass: JITGui

Create a new JITGui that will be watching an object and display its state.

Arguments:

object

the object to watch

numItems

the number of display items to use, e.g. how many fields for text, or how many EZSliders for single-number parameters.

parent

a parent view on which to display. If nil, a new window is created; parent can also be an existing window or a composite view.

bounds

a desired size and position where to display a JITGui. can be nil, a Point, or a Rect. JITGuis know their minimum size ( minSize ), and if bounds is nil, minSize is used. if bounds is a Point or Rect, it will be set to at least minSize. With a rect one can also supply a position where to display. If a point,shown size is the maximum of bounds and minSize.

makeSkip

A flag whether to make a skipjack.

options

a list of additional information, e.g. flags about optional buttons. (this is used is some subclasses)

Inherited class methods

Undocumented class methods

PdefGui.observedClass

Instance Methods

.object

.object = obj

From superclass: JITGui

a Pdef, or nil

.numItems

From superclass: JITGui

the number of items in the envirGui

.parent

From superclass: JITGui

the parent view

.bounds

From superclass: JITGui

the bounds of the -zone

.zone

From superclass: JITGui

the CompositeView within which the PdefGui is shown

.nameBut

From superclass: TaskProxyGui

.playBut

From superclass: TaskProxyGui

.pauseBut

From superclass: TaskProxyGui

.srcBut

From superclass: TaskProxyGui

.envBut

From superclass: TaskProxyGui

the buttons

.envirGui

From superclass: TaskProxyGui

the gui for the Pdef's envir - nil if numItems is 0.

.object

.object = obj

From superclass: JITGui

put an object in the gui.

.moveTo(h, v)

From superclass: JITGui

(if the jitGui is in its own window)

move it to some specific location.

.clear

From superclass: TaskProxyGui

(if the jitGui is in its own window)

set the PdefGui's object to nil

.close

From superclass: JITGui

(if the jitGui is in its own window)

and close its window.

Internal methods

.srcString

From superclass: TaskProxyGui

a compileString that recreates the Pdef.

.editString(edKey)

From superclass: TaskProxyGui

a compileString that recreates the Pdef's envir at edKey.

.editStrings(edKeys)

From superclass: TaskProxyGui

a compileString that recreates the Pdef's envir at edKeys.

Arguments:

edKeys

Default value is nil.

.getUsedKeys

From superclass: TaskProxyGui

the keys in use in the envir

.openDoc(strings, bounds)

From superclass: TaskProxyGui

open a document with some strings at some location

.makeEnvirGui(lineWidth, height)

From superclass: TaskProxyGui

make an envirGui within zone - called internally.

Inherited instance methods

Examples