world
Factor handbook » UI framework » Building user interfaces » Top-level windows

Prev:ungraft* ( gadget -- )
Next:WINDOW:


Vocabulary
ui.gadgets.worlds

Class description
A gadget which appears at the top of the gadget hieararchy, and in turn may be displayed in a native window. Worlds have the following slots:
active?an integer initially set to 0. The active ui-backend increases the value in steps up to 100 while the native window containing the world is being initialized but not yet visible on the screen. The world is only redrawn when the value is 100 which prevents redundant redraws from happening during initialization. The slot is set to 0 if an error is thrown while drawing the world; this prevents multiple debugger windows from being shown.
layersa sequence of glass panes in front of the primary gadget, used to implement behaviors such as popup menus which are hidden when the mouse is clicked outside the menu. See Glass layers.
titlea string to be displayed in the title bar of the native window containing the world.
statusa model holding a string to be displayed in the world's status bar.
status-ownerthe gadget that displayed the most recent status message.
focusthe current owner of the keyboard focus in the world.
focused?a boolean indicating if the native window containing the world has keyboard focus.
grab-input?if set to t, the world will hide the mouse cursor and disable normal mouse input while focused. Use grab-input and ungrab-input to change this setting.
handlea backend-specific native handle representing the native window containing the world, or f if the world is not grafted.
window-locthe on-screen location of the native window containing the world. The coordinate system here is backend-specific.
window-controlsthe set of Window controls with which the world window was created.


Definition


TUPLE: world < track
active? focused? grab-input? fullscreen? saved-position
layers title status status-owner text-handle handle images
window-loc pixel-format-attributes background-color promise
window-controls window-resources ;


Methods