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

NdefGui : JITGui : Object

a gui for a NodeProxy or Ndef
Source: NdefGui.sc

Description

NdefGui provides controls for handling and editing a NodeProxy or Ndef, and its monitors. NdefGui replaces NodeProxyEditor. It provides:

Both NodeProxy and Ndef implement a .gui message, which returns a NdefGui for that NodeProxy. Overview: JITLib.

Class Methods

Creation

NdefGui.new(object, numItems: 4, parent, bounds, makeSkip: true, options)

Arguments:

object

the nodeproxy to be shown and edited, or nil.

numItems

How many sliders or textviews for parameters to provide. Default value is 0.

parent

a parent view where NdefGui is to be shown. If nil, a window is made.

bounds

bounds where the view (or window) will be shown.

makeSkip

a flag whether to create and start a SkipJack for auto-updating.

options

an array of symbols for options of what to display. See list below.

Preset options lists which can be used in *new:

NdefGui.big

two lines of controls for a big NdefGui, usually in its own window

NdefGui.full

two lines of controls for a very big NdefGui

NdefGui.audio

for ar proxies, used in ProxyMixer left hand side

NdefGui.audioSm

for ar proxies, used in ProxyMixer.small on left hand side

NdefGui.control

for kr proxies, used in ProxyMixer mid section

Class Variables

NdefGui.buttonSizes

a dict for the sizes of the different gui elements.

NdefGui.buttonFuncs

a lookup dict for making the different buttons.

NdefGui.makeButFuncs

not a class var, but the method that inits buttonFuncs.

Inherited class methods

Instance Methods

Variables

See JITGui for more instance methods.

Various views the NdefGui has if they were present in the options:

.nameView

From superclass: JITGui

.typeView

.monitorGui

.paramGui

.fadeBox

.pauseBut

.sendBut

.edBut

.wakeBut

Basic Methods

.edits

the paramGui's widgets (usually, EZSliders)

.editKeys

the currently used param names

.highlight(index, prefix, color)

.unhighlight(index)

highlight and unhighlight a single slider by index

.highlightName(prefix: "", color)

.unhighlightName

highlight and unhighlight the nameView

.highlightParams(parOffset, num, highNames, clearOthers: true)

highlight a contiguous group of sliders; used for showing assigned MIDI faderboxes etc.

.addReplaceKey(replaced, replacer, spec)

.removeReplaceKey(replaced)

editKeys with technical names can be replaced with more user-friendly ones.

.proxy

.proxy = proxy

an alias to method object, object_

Standard JITGui Methods

.setDefaults(options)

.accepts(obj)

.getState

.checkUpdate

GUI Element Creation

.makeViews(options)

creates all the views given in the options list. Internally this calls the following methods:

.makeNameView(width, height)

.makeTypeView(width, height)

.makeClrBut(width, height)

.makeWakeBut(width, height)

.makeResetBut(width, height)

.makeScopeBut(width, height)

.makeDocBut(width, height)

.makeEndBut(width, height)

.makeFadeBox(width: 60, height: 18)

.makePauseBut(width, height)

.makeSendBut(width, height)

.makeEdBut(width, height)

.makeRipBut(width, height)

.makePollBut(width, height)

.makeMonitor(width, height, npOptions)

Inherited instance methods

Examples

Some configuration options

Some configuration options

Test - drag and drop proxies between NdefGuis

This seems broken in 3.7.0 - drags are sticky and can't be dropped.

Test - replacing keys

This is used in ProxyChain (JITLibExtensions).