Immediate GUI
Experimental. Immediate GUI has the widgets an ordinary tool needs, and more may follow.
Immediate GUI is a third way to give a Divooka document a window. Instead of describing the screen once and changing it afterwards, one Events graph on the ImmediateGUIApplication base type declares the whole interface again on every frame, in its Frame callback. A button's own call answers whether it was pressed on that frame, so what a press does is written right where the button is, and nothing is kept between frames but the document's own data.
That suits interfaces whose shape follows what they show - a panel per selected item, a row per track, a control that exists only while something plays - and windows that are not ordinary windows: with no title bar, see-through, or always on top, such as an overlay drawn over the desktop.
What it has
- Callbacks: Start, before the window exists, for its size, title and kind (Set Window Size, Set Borderless, Set Overlay Window); Initialized, once it exists; and Frame, every frame.
- Widgets: labels and paragraphs, buttons, check boxes and radio buttons, sliders and progress bars, a text box, list boxes and combo boxes, menus, movable panels, and a surface you paint into yourself.
- Input: the pointer, keys and typed text, asked about on the frame.
The interface is drawn by Divooka's own canvas into a picture, which the window shows.
Example
GUI › Immediate in Divooka Explore: a full-screen painting canvas with no title bar. Hold the left button to draw, press 1 to 6 to choose a colour, and Escape to close.
See also
- Desktop GUI Applications: how it compares with the other ways.
- GUI Application, ShadowGUI and Glaze.