17.1.2 widget methods:

parent-w ( – optr  ) minos2 “parent-w”

pointer to parent widget

act ( – optr  ) minos2 “act”

pointer to actor

name$ ( – addr u  ) minos2 “name-string”

Widget name for debugging and searching

x ( – r  ) minos2 “x”

widget x coordinate

y ( – r  ) minos2 “y”

widget y coordinate

w ( – r  ) minos2 “w”

widget width

h ( – r  ) minos2 “h”

widget height above baseline

d ( – r  ) minos2 “d”

widget depth below baseline

gap ( – r  ) minos2 “gap”

gap between lines

baseline ( – r  ) minos2 “baseline”

minimun skip per line

kerning ( – r  ) minos2 “kerning”

add kerning

raise ( – r  ) minos2 “raise”

raise/lower box

border ( – r  ) minos2 “border”

surrounding border, all directions

borderv ( – r  ) minos2 “borderv”

vertical border offset

bordert ( – r  ) minos2 “bordert”

top border offset

borderl ( – r  ) minos2 “borderl”

left border offset

w-color ( – r  ) minos2 “w-color”

widget color index (into color map), if any

draw-init ( ) minos2 “draw-init”

init draw

draw ( ) minos2 “draw”

draw widget

split ( firstflag rstart1 rx – o rstart2  ) minos2 “split”

split a widget into parts for typesetting paragraphs

lastfit ( ) minos2 “lastfit”

fit last widget element in a box

hglue ( – rtyp rsub radd  ) minos2 “hglue”

calculate horizontal glue

dglue ( – rtyp rsub radd  ) minos2 “dglue”

calculate vertical glue below baseline

vglue ( – rtyp rsub radd  ) minos2 “vglue”

calculate vertical glue above baseline

hglue@ ( – rtyp rsub radd  ) minos2 “hglue-fetch”

cached variant of hglue

dglue@ ( – rtyp rsub radd  ) minos2 “dglue-fetch”

cached variant of dglue

vglue@ ( – rtyp rsub radd  ) minos2 “vglue-fetch”

cached variant of vglue

xywh ( – rx0 ry0 rw rh  ) minos2 “xywh”

widget bounding box, starting at the top left corner

xywhd ( – rx ry rw rh rd  ) minos2 “xywhd”

widget bounding box, starting at the left baseline point

!resize ( rx ry rw rh rd –  ) minos2 “store-resize”

resize a widget

!size ( ) minos2 “store-size”

let the widget self-determine its size

dispose-widget ( ) minos2 “dispose-widget”

get rid of a widget

.widget ( ) minos2 “print-widget”

debugging: Print informations about the widget

par-split ( rw –  ) minos2 “par-split”

split a paragraph by width rw

resized ( ) minos2 “resized”

widget is resized

Components are composed using a boxes&glue model similar to LaTeX, including paragraph breaking. For the sake of simplicity and portability, MINOS2 only supports a single window, and uses OpenGL for rendering.

MINOS2 furthermore supports animations with the animation class. A color index texture is used for different color schemes, and transition between neighboring schemes can also be animated.

>animate ( rdelta addr xt –  ) minos2 “to-animate”

create a new animation, calling xt with stack effect ( addr r0..1 -- ) repeatedly, until the rdelta timeout expired; last call is always with argument 1e for the time.

You can create named color indexes and assign them color values for the currently active color scheme.

color: ( rgba "name" –  ) minos2 “color:”

Create a (possibly shared) color index initialized with rgba

new-color: ( rgba "name" –  ) minos2 “new-color:”

Create a unique color index initialized with rgba

text-color: ( rgba "name" –  ) minos2 “text-color:”

Create a unique text color index initialized with rgba, the corresponding emoji color is set to white.

text-emoji-color: ( rgbatext rgbaemoji "name" –  ) minos2 “text-emoji-color:”

Create a unique text color index initialized with rgbatext, the corresponding emoji color is set to rgbaemoji.

fade-color: ( rgba1 rgba2 "name" –  ) minos2 “fade-color:”

Create a unique pair of text color index initialized with rgba1 and rgba2, the corresponding emoji color is set to white. By slowly shifting the index from one to the next index, the object will shift its color using a linear interpolation when redrawn.

text-emoji-fade-color: ( rgbatext1 ~2 rgbaemoji1 ~2 "name" –  ) minos2 “text-emoji-fade-color:”

Create a unique pair of text color index initialized with rgbatext1 and ~2, the corresponding emoji color pair is set to rgbaemoji1 to ~2. By slowly shifting the index from one to the next index, the object will shift its color using a linear interpolation when redrawn.

re-color ( rgba "name" –  ) minos2 “re-color”

assign the named color index "name" in the current color scheme with the value rgba.

re-text-color ( rgba "name" –  ) minos2 “re-text-color”

assign the named text color index "name" in the current color scheme with the value rgba.

re-emoji-color ( rgbatext rgbaemoji "name" –  ) minos2 “re-emoji-color”

assign the named text and emoji color index "name" in the current color scheme with the value rgbatext and rgbaemoji.

re-fade-color ( rgba1 rgba2 "name" –  ) minos2 “re-fade-color”

assign the named color index pair "name" in the current color scheme with the value rgba1 and rgba2.

re-text-emoji-fade-color ( rgbatext1 ~2 rgbaemoji1 ~2 "name" –  ) minos2 “re-text-emoji-fade-color”

assign the named color index pair "name" in the current color scheme with the value rgbatext1 and ~2 resp. rgbaemoji1 and ~2.

For a number of specific objects, there are early bound methods, that only work on these objects