JITView:
Filter:
Classes (extension) | GUI | Libraries > JITLib > GUI

JITView : Object
ExtensionExtension

a modal view to show any object.
Source: JITView.sc
Subclasses: MView

Ndef

Description

JITView can display an object as its source code, change it by code, and do multiple actions with it. It has a UserView for configurable display and interaction modes. Its action is an MFunc to allow configurable actions when activated. For flexible display of number(s), see its subclass MView. For modal guis for JIT-style objects, see MGui.

Class Methods

JITView.initClass

prepare styleDict

JITView.styleDict

a dictionary with colors and fonts for display. it is parent to a local dict in a JITView, so many display params can be individually overwritten.

JITView.new(value, parent, bounds, options)

make a new JITView

Arguments:

parent

a parent on which to display; if none is given, one is created.

bounds

the bounds within which to display; if not given, bounds will be created.

options

provision for display options, not used yet.

Inherited class methods

Instance Methods

.value

.value = obj

get and set view's value, can be any object

.valueAction = obj

set view's value and do its action

.action

the view's action, a modal MFunc.

.doAction

evaluate the action.

.parent

the parent view or window used for display.

.bounds

the bounds used for display

.dict

a dict for various data useful for the display.

.putDict( ... pairs)

put things into dict by pairs of key, value, key value.

.uv

the userview which handles display.

.doEnter(uv, mod: 0)

evaluate the action from keys.

.drawFunc

the drawFunc of the user view, an MFunc which handles all configurable aspects of display.

.prepDraw

prepare general data for display

.drawLabel

.drawValue: METHOD NOT FOUND!

.drawEditStr

.drawHilite

methods for drawing label, value and editStr.

.refresh

redraw user view.

.hilite(hiLabel, hiColor)

hilite a JITView with a label and a color

.nohilite

.funcs

get all of uv's actions in one array [drawFunc, keyDownAction, mouseDownAction, mouseMoveAction]

.mode

.mode = name

set and get the current mode. modes must be present in the various action functions.

.makeVals(func, n)

make n values with a function

.checkNum(val)

check whether a possible next value is a number or numbers or not.

Returns:

0 if not a number, 1 if a single number, 2 if array of all numbers.

Inherited instance methods

Undocumented instance methods

.asView

.code

.drawValueAsCode

.label

.label = val

Examples