raygui/layout
container controls for grouping and scrolling GUI elements.
Since: Phase 2
gui-window-box
(gui-window-box [r : Rect title : cstr] :)
draw a titled window frame with a close button.
| r | bounding Rect | |
| title | window title string |
1 if the close button was clicked this frame, 0 otherwise.
(when (gui-window-box (rect 50.0 50.0 300.0 250.0) "Settings")
(set! show-settings 0))
Since: Phase 2
gui-group-box
(gui-group-box [r : Rect text : cstr] :)
draw a labeled rectangle border around a group of controls.
| r | bounding Rect | |
| text | group label shown in the top border |
(gui-group-box (rect 10.0 10.0 200.0 100.0) "Physics")
Since: Phase 2
gui-line
(gui-line [r : Rect text : cstr] :)
draw a horizontal separator line, optionally labeled.
| r | bounding Rect (height determines the line y position) | |
| text | optional label; pass "" for a plain line |
(gui-line (rect 10.0 50.0 200.0 16.0) "")
Since: Phase 2
gui-panel
(gui-panel [r : Rect text : cstr] :)
draw a filled panel background.
| r | bounding Rect | |
| text | panel title (shown in header bar if non-empty) |
(gui-panel (rect 10.0 10.0 300.0 200.0) "Inspector")
Since: Phase 2
gui-tab-bar
(gui-tab-bar [r : Rect text : cstr count : int active : int] :)
draw a tab bar; returns the currently active tab index.
| r | bounding Rect for the entire tab bar | |
| text | semicolon-separated tab labels ("File;Edit;View") | |
| count | number of tabs | |
| active | index of the active tab |
Index of the active tab after this frame.
(set! tab (gui-tab-bar (rect 10.0 10.0 400.0 30.0) "File;Edit;View" 3 tab))
Since: Phase 2
gui-scroll-panel
(gui-scroll-panel [r : Rect text : cstr content : Rect scroll : int] :)
draw a scroll panel; returns packed scroll vector as int.
| r | bounding Rect of the scroll container | |
| text | optional panel title | |
| content | Rect describing the total scrollable content size | |
| scroll | current scroll position (packed int, 0 for initial) |
New packed scroll vector after this frame.
(set! scroll (gui-scroll-panel (rect 10.0 10.0 300.0 400.0)
"Props" content-rect scroll))
Since: Phase 2
gui-dummy-rec
(gui-dummy-rec [r : Rect text : cstr] :)
draw a placeholder rectangle (for layout prototyping).
| r | bounding Rect | |
| text | placeholder label |
(gui-dummy-rec (rect 10.0 10.0 200.0 60.0) "TODO")
Since: Phase 2
gui-status-bar
(gui-status-bar [r : Rect text : cstr] :)
draw a status bar along the bottom of a window.
| r | bounding Rect (typically a thin full-width strip) | |
| text | status message text |
(gui-status-bar (rect 0.0 580.0 800.0 20.0) "Ready")
Since: Phase 2