The primary classes of MINOS are gadgets (widgets and displays),
actors, and resources (xresource and font).
Resources just provide system-specific data like window handles,
display pointers, font informations, etc., they are critical for
system-specific parts of display implementations.
Widgets are the central objects represented on screen. Widgets draw
through displays, such as windows, viewports, etc. Since many displays
can be embedded into a bigger window, they also have all widget
functionality. Widgets are composed in boxes (horizontal and
vertical), and automatically layouted. Boxes certainly are widgets
themselves, and some of the more complicated widgets such as sliders
or textboxes are derived from boxes to layout the inner parts easily.
Actors are bound to associated actions when operating a widget
(i.e. clicking on it, pointing on it, or entering text). Actors
provide the way to script actions.
- ACTOR
All Actors have the following methods in common:
- called This variable points to the object that is being called
- caller This variable points to the object that is
calling (the widget).
- set ( -- ) sets the flag
- reset ( -- ) resets the flag
- toggle ( -- ) toggles the flag
- fetch ( -- x1 .. xn ) queries the value(s)
- store ( x1 .. xn -- ) changes the value(s)
- click ( x y b n -- ) performs the action for a click
- key ( key sh -- ) performs the action for a keystroke
- enter ( -- ) performs the action for entering the widget
- leave ( -- ) performs the action for leaving the widget
- assign ( x1 .. xn -- ) initially assigns the state
- set-called ( o -- ) sets the called object
The stack effect you see below is the stack effect of the init method.
- KEY-ACTOR This is an actor for keyboard macros. It
inserts keystrokes into the called widget.
- TOOLTIP ( actor tip -- ) A tooltip is a nested actor; it shows
the widget tip some time after entering with the mouse, and forwards the other
messages to actor
- EDIT-ACTION ( o xt -- ) This actor handles text input field key
events, and does all the editing stuff. After each keystroke and each click,
it calls xt ( -- ).
- NUMBER-ACTION ( o xt -- ) Same as EDIT-ACTION, but filters
out digits only
- SCALE-VAR ( o pos max -- ) Scaler actor,
keeps position and maximum value in own variables.
- SCALE-DO ( o pos max xt -- ) Same as SCALE-VAR, but executes
xt ( pos -- ) on changes
- SLIDER-VAR ( o pos max step -- ) Slider actor, keeps position,
step, and maximum value in own variables
- SLIDER-DO ( o pos max step xt -- ) Same as SLIDER-VAR,
but executes xt ( -- ) on changes
- SIMPLE ( o xt -- ) xt is executed at every store (no
state maintained)
- DRAG ( o xt -- ) Calls toggle on each click event
- REP ( o xt -- ) Calls toggle repeatedly while the user holds down
the mouse button
- TOGGLE-STATE ( o xtstore xtfetch -- ) allows generic fetch
and store functions
- SCALE-ACT ( o do-store do-fetch max -- ) Generic slider
actor (maximum slider position provided)
- SLIDER-ACT ( o do-store do-fetch max -- ) Generic scaler
actor (maximum scaler position provided)
- TOGGLE-VAR ( o addr xt -- ) keeps the flag in addr,
and executes xt on changes
- TOGGLE-NUM ( o n addr xt -- ) is responsible for state n in addr
(sets addr to n when set), and executes xt on changes
- TOGGLE ( o state xtset xtreset -- ) models a flag with
initial state and two functions for each state
- XRESOURCE
- FONT
- X-FONT
- GADGET
- WIDGET
- TERMINAL
- SCREDIT
- STREDIT
- ARULE
- BOXCHAR
- HRTSIZER
- HXRTSIZER
- HSIZER
- VRTSIZER
- VXRTSIZER
- VSIZER
- BUTTON
- ALERTBUTTON
- MENU-ENTRY
- EDIMENU-ENTRY
- MENU-TITLE
- SUB-MENU
- (TEXTFIELD
- ICON-BUTTON
- BIG-ICON
- ICON-BUT
- LBUTTON
- FILE-WIDGET
- TEXT-LABEL
- MENU-LABEL
- TOGGLECHAR
- FLIPICON
- TOGGLEICON
- TBUTTON
- TICONBUTTON
- TOGGLEBUTTON
- TOPINDEX
- FLIPBUTTON
- RBUTTON
- TRIBUTTON
- SLIDETRI
Bernd Paysan,
09feb1999, 21jul1999