ParamView:
Filter:
Classes | JITLib

ParamView : Object

show a parameter of a JITLib process
Source: ParamView.sc

Description

ParamView displays a parameter value, and switches representation as appropriate for value: A single number is shown by an EZSlider, a pair of numbers by an EZRanger, and anything else as code on an EZText.

First examples:

Class Methods

ParamView.new(parent, bounds, label, spec, action, initVal, initAction: false)

create a new ParamView with

Arguments:

parent

the parent window or view

bounds

the bounds of the view

label

a label to display

spec

a controlspec for the value

action

an action to do when the value changes

initVal

an initial value

initAction

a boolean whether to perform the action on init.

Inherited class methods

Instance Methods

.label

.label = alabel

get and set the view's label

.spec

.spec = newspec

get and set the view's control spec

.action

.action = value

get and set the paramview's action

.ezviews

.slider

.ranger

.textview

the 3 ezviews between which the ParamView switches

.currview

the currently shown view of these

.value

.value = val

get and set value

.valueAction = val

get and set value and do action

.doAction

do the view's action

.viewType

.viewType_(newType: 0, force: false)

get and set the view's type: 0 is single number -> EZSlider, 1 is pair of numbers -> EZRanger, 2 is anything else

.valueType(newval)

determine viewType for a given value

.background

.background = col

get and set background color

Inherited instance methods

Undocumented instance methods

.bounds

.bounds = bounds

.enabled

.enabled = bool: true

.useRanger

.useRanger = value

.visible

.visible = bool: true