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

JITView
ExtensionExtension

a modal view to show any object.

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

.initClass

prepare styleDict

.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.

.new

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.

Instance Methods

.value

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

.valueAction

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

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

.uv

the userview which handles display.

.doEnter

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

.drawEditStr

.drawHilite

methods for drawing label, value and editStr.

.refresh

redraw user view.

.hilite

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

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

.makeVals

make n values with a function

.checkNum

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.

Examples