Package user-interface
astrophysics #sleela 2.5 (lib/user-interface/example/science/astrophysics.sleela)
ScienceAstrophysics class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
chemistry #sleela 2.5 (lib/user-interface/example/science/chemistry.sleela)
ScienceChemistry class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
gui-app-demo #sleela 2.5 (lib/user-interface/gui-app-demo.sleela)
GuiAppDemo class
Runnable demonstrator for the /lib/gui support structure. It boots an SLGuiApp (application + window + DOM + reconciler + host adapter + script engine), builds a small interface in the SLeeLa DOM, binds an onClick callback, drives part of the UI from a script, refreshes once to project the DOM onto real SleelaUI widgets, and (on a display) hands control to the run loop. On a headless host boot() returns false and it exits cleanly, like gui-demo.sleela. This proves the architectural wiring end to end: DOM -> reconcile -> widgets, and widget activations -> events -> handlers. Family: user-interface. SLeeLa owns the document and dispatch; SleelaUI renders it.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
boolToStr | String boolToStr(boolean b) | No description in source. |
banner | void banner(String t) | No description in source. |
run | int run() | No description in source. |
gui-dual-media-studio #sleela 2.5 (lib/user-interface/example/dual/gui-dual-media-studio.sleela)
GuiDualMediaStudio class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ALLOW_HORIZONTAL_OVERFLOW | static final int ALLOW_HORIZONTAL_OVERFLOW = 0 | SLUITheme preset ordinals (mirror SLUIThemeId in the toolkit C ABI). Static build policy: default keeps the normal layout within its parent width. Set to 1 only in builds that intentionally permit horizontal overflow. |
SCROLL_AUTO | int SCROLL_AUTO = 0 | Scroll-policy ordinal (mirror the toolkit C ABI: 0=auto on overflow). |
btnPlay | int btnPlay | Live handles the event loop reacts on/to. |
btnPause | int btnPause | No description in source. |
btnStop | int btnStop | No description in source. |
btnRec | int btnRec | No description in source. |
btnRecStop | int btnRecStop | No description in source. |
statusLabel | int statusLabel | No description in source. |
wifiButton | int wifiButton | Lower-right status-bar connectivity control and its dismissible menu. |
wifiPanel | int wifiPanel | No description in source. |
wifiStatusLabel | int wifiStatusLabel | No description in source. |
wifiScanButton | int wifiScanButton | No description in source. |
wifiConnectButton | int wifiConnectButton | No description in source. |
wifiDisconnectButton | int wifiDisconnectButton | No description in source. |
wifiSettingsButton | int wifiSettingsButton | No description in source. |
wifiInfoButton | int wifiInfoButton | No description in source. |
wifiProfileEntry | int wifiProfileEntry | No description in source. |
wifiCloseButton | int wifiCloseButton | No description in source. |
openMenuIndex | int openMenuIndex = -1 | Menubar strip and its dropdown panels (built from existing ui* widgets). |
menuFileButton | int menuFileButton | No description in source. |
menuFilePanel | int menuFilePanel | No description in source. |
menuFileItem1 | int menuFileItem1 | No description in source. |
menuFileItem2 | int menuFileItem2 | No description in source. |
menuMediaButton | int menuMediaButton | No description in source. |
menuMediaPanel | int menuMediaPanel | No description in source. |
menuMediaItem1 | int menuMediaItem1 | No description in source. |
menuMediaItem2 | int menuMediaItem2 | No description in source. |
menuPlaybackButton | int menuPlaybackButton | No description in source. |
menuPlaybackPanel | int menuPlaybackPanel | No description in source. |
menuPlaybackItem1 | int menuPlaybackItem1 | No description in source. |
menuPlaybackItem2 | int menuPlaybackItem2 | No description in source. |
menuHelpButton | int menuHelpButton | No description in source. |
menuHelpPanel | int menuHelpPanel | No description in source. |
menuHelpItem1 | int menuHelpItem1 | No description in source. |
menuHelpItem2 | int menuHelpItem2 | No description in source. |
THEME_GRAY | int THEME_GRAY = 7 | A cool "glass" studio theme for the DUAL line. Shared SLeeLa family palette: chrome/title bar #1D2025, Standard Pattern ordinal (mirror SLUIThemeId): 7=GRAY. dual uses GRAY. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
rgba | int rgba(int r, int g, int b, int a) | No description in source. |
rgb | int rgb(int r, int g, int b) | No description in source. |
clamp | int clamp(int v, int lo, int hi) | No description in source. |
intToStr | String intToStr(int v) | No description in source. |
canPlayType | boolean canPlayType(String mime) | Codec gate: the studio consults the registry before offering a control. |
playMedia | void playMedia() | Shared action helpers keep menu commands and transport buttons consistent. |
pauseMedia | void pauseMedia() | No description in source. |
stopMedia | void stopMedia() | No description in source. |
startRecording | void startRecording() | No description in source. |
stopRecording | void stopRecording() | No description in source. |
glassTheme | int glassTheme() | dual is the GRAY Standard Pattern: neutral mid-gray surfaces with light text, supplied by the toolkit preset (no per-colour overrides); metrics only. |
openMenu | void openMenu(int which) | Show one dropdown at a time; selecting the open menu closes it. |
wifiActionUnavailable | void wifiActionUnavailable(String action) | No description in source. |
main | void main() | No description in source. |
gui-events-demo #sleela 2.5 (lib/user-interface/gui-events-demo.sleela)
GuiEventsDemo class
Runnable demonstrator for the /lib/gui event + DHTML + scripting layer. It builds a small document (a window with a button and an entry), binds callbacks (onClick / onInput) the DHTML way, raises events and shows the dispatcher routing them to operations with the take-the-latch latch, demonstrates preventDefault/stopPropagation, mutates the DOM live (setText/setStyle/hide), and finally drives the SAME interface from an SLGuiScript command list — proving the UI can be authored and driven by scripting. Self-contained (inline flow + main), in the style of gui-demo.sleela. Family: user-interface. SLeeLa owns dispatch and the meaning of events; a host only raises them and mirrors the DOM onto widgets.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
boolToStr | String boolToStr(boolean b) | No description in source. |
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
gui-gual-settings-console #sleela 2.5 (lib/user-interface/example/gual/gui-gual-settings-console.sleela)
GuiGualSettingsConsole class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ALLOW_HORIZONTAL_OVERFLOW | static final int ALLOW_HORIZONTAL_OVERFLOW = 0 | SLUITheme preset ordinals (mirror SLUIThemeId in the toolkit C ABI). Static build policy: default keeps the normal layout within its parent width. Set to 1 only in builds that intentionally permit horizontal overflow. |
SCROLL_AUTO | int SCROLL_AUTO = 0 | Scroll-policy ordinal (mirror the toolkit C ABI: 0=auto on overflow). |
btnJfx | int btnJfx | Live handles the event loop reacts on/to. |
btnSwing | int btnSwing | No description in source. |
btnNative | int btnNative | No description in source. |
btnQt | int btnQt | No description in source. |
statusLabel | int statusLabel | No description in source. |
wifiButton | int wifiButton | Lower-right status-bar connectivity control and its dismissible menu. |
wifiPanel | int wifiPanel | No description in source. |
wifiStatusLabel | int wifiStatusLabel | No description in source. |
wifiScanButton | int wifiScanButton | No description in source. |
wifiConnectButton | int wifiConnectButton | No description in source. |
wifiDisconnectButton | int wifiDisconnectButton | No description in source. |
wifiSettingsButton | int wifiSettingsButton | No description in source. |
wifiInfoButton | int wifiInfoButton | No description in source. |
wifiProfileEntry | int wifiProfileEntry | No description in source. |
wifiCloseButton | int wifiCloseButton | No description in source. |
openMenuIndex | int openMenuIndex = -1 | Menubar strip and its dropdown panels (built from existing ui* widgets). |
menuFileButton | int menuFileButton | No description in source. |
menuFilePanel | int menuFilePanel | No description in source. |
menuFileItem1 | int menuFileItem1 | No description in source. |
menuFileItem2 | int menuFileItem2 | No description in source. |
menuSettingsButton | int menuSettingsButton | No description in source. |
menuSettingsPanel | int menuSettingsPanel | No description in source. |
menuSettingsItem1 | int menuSettingsItem1 | No description in source. |
menuSettingsItem2 | int menuSettingsItem2 | No description in source. |
menuBackendButton | int menuBackendButton | No description in source. |
menuBackendPanel | int menuBackendPanel | No description in source. |
menuBackendItem1 | int menuBackendItem1 | No description in source. |
menuBackendItem2 | int menuBackendItem2 | No description in source. |
menuHelpButton | int menuHelpButton | No description in source. |
menuHelpPanel | int menuHelpPanel | No description in source. |
menuHelpItem1 | int menuHelpItem1 | No description in source. |
menuHelpItem2 | int menuHelpItem2 | No description in source. |
THEME_BLACK | int THEME_BLACK = 5 | A hardened, neutral "settings" theme. Shared SLeeLa family palette: chrome/title bar #1D2025, Standard Pattern ordinal (mirror SLUIThemeId): 5=BLACK. gual uses BLACK. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
rgba | int rgba(int r, int g, int b, int a) | No description in source. |
rgb | int rgb(int r, int g, int b) | No description in source. |
selectBackend | void selectBackend(int which) | Mark one accepted backend button as selected (fail-closed: qt stays off). |
clamp | int clamp(int v, int lo, int hi) | Clamp an int into [lo, hi] — the heart of GUAL's settings discipline. |
intToStr | String intToStr(int v) | No description in source. |
settingsTheme | int settingsTheme() | gual is the BLACK Standard Pattern: deep black surfaces with light text, supplied by the toolkit preset (no per-colour overrides); metrics only. |
openMenu | void openMenu(int which) | Show one dropdown at a time; selecting the open menu closes it. |
wifiActionUnavailable | void wifiActionUnavailable(String action) | No description in source. |
main | void main() | No description in source. |
gui-menubar-expandable #sleela 2.5 (lib/user-interface/example/menus/gui-menubar-expandable.sleela)
GuiMenubarExpandable class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PAD | int PAD = 10 | No description in source. |
GAP | int GAP = 6 | No description in source. |
VERTICAL | int VERTICAL = 0 | No description in source. |
HORIZONTAL | int HORIZONTAL = 1 | No description in source. |
statusLabel | int statusLabel | No description in source. |
openMenuIndex | int openMenuIndex = -1 | No description in source. |
recentOpen | boolean recentOpen = false | No description in source. |
panelsOpen | boolean panelsOpen = false | No description in source. |
fileButton | int fileButton | No description in source. |
editButton | int editButton | No description in source. |
viewButton | int viewButton | No description in source. |
helpButton | int helpButton | No description in source. |
filePanel | int filePanel | No description in source. |
editPanel | int editPanel | No description in source. |
viewPanel | int viewPanel | No description in source. |
helpPanel | int helpPanel | No description in source. |
recentToggle | int recentToggle | No description in source. |
recentPanel | int recentPanel | No description in source. |
recentOne | int recentOne | No description in source. |
recentTwo | int recentTwo | No description in source. |
recentThree | int recentThree | No description in source. |
panelsToggle | int panelsToggle | No description in source. |
panelsPanel | int panelsPanel | No description in source. |
panelEditor | int panelEditor | No description in source. |
panelInspector | int panelInspector | No description in source. |
fileNew | int fileNew | No description in source. |
fileSave | int fileSave | No description in source. |
editUndo | int editUndo | No description in source. |
editSelectAll | int editSelectAll | No description in source. |
viewZoomIn | int viewZoomIn | No description in source. |
viewZoomOut | int viewZoomOut | No description in source. |
helpAbout | int helpAbout | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
setStatus | void setStatus(String message) | No description in source. |
openMenu | void openMenu(int which) | Exactly one top-level dropdown is open at a time. Clicking its heading again collapses it; choosing another heading switches directly to it. |
toggleRecentFiles | void toggleRecentFiles() | No description in source. |
togglePanels | void togglePanels() | No description in source. |
closeMenus | void closeMenus() | No description in source. |
main | void main() | No description in source. |
gui-military-command-console #sleela 2.5 (lib/user-interface/example/military/gui-military-command-console.sleela)
GuiMilitaryCommandConsole class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
THEME_CUSTOM | int THEME_CUSTOM = 2 | SLUITheme preset ordinals (mirror SLUIThemeId in the toolkit C ABI). |
SCROLL_AUTO | int SCROLL_AUTO = 0 | Scroll-policy ordinal (mirror the toolkit C ABI: 0=auto on overflow). |
btnAuthorize | int btnAuthorize | Live handles the event loop reacts on/to. |
btnRun | int btnRun | No description in source. |
btnReset | int btnReset | No description in source. |
statusLabel | int statusLabel | No description in source. |
wifiMenuOpen | boolean wifiMenuOpen = false | No description in source. |
wifiButton | int wifiButton | Lower-right status-bar connectivity control and its dismissible menu. |
wifiPanel | int wifiPanel | No description in source. |
wifiStatusLabel | int wifiStatusLabel | No description in source. |
wifiScanButton | int wifiScanButton | No description in source. |
wifiConnectButton | int wifiConnectButton | No description in source. |
wifiDisconnectButton | int wifiDisconnectButton | No description in source. |
wifiSettingsButton | int wifiSettingsButton | No description in source. |
wifiInfoButton | int wifiInfoButton | No description in source. |
wifiProfileEntry | int wifiProfileEntry | No description in source. |
wifiCloseButton | int wifiCloseButton | No description in source. |
consoleMenuIndex | int consoleMenuIndex = -1 | Reusable menu-bar interaction state for the command console. |
menuFileButton | int menuFileButton | No description in source. |
menuEditButton | int menuEditButton | No description in source. |
menuViewButton | int menuViewButton | No description in source. |
menuHelpButton | int menuHelpButton | No description in source. |
menuFilePanel | int menuFilePanel | No description in source. |
menuEditPanel | int menuEditPanel | No description in source. |
menuViewPanel | int menuViewPanel | No description in source. |
menuHelpPanel | int menuHelpPanel | No description in source. |
menuFileNew | int menuFileNew | No description in source. |
menuFileSave | int menuFileSave | No description in source. |
menuEditAudit | int menuEditAudit | No description in source. |
menuEditClear | int menuEditClear | No description in source. |
menuViewStatus | int menuViewStatus | No description in source. |
menuViewCertificates | int menuViewCertificates | No description in source. |
menuHelpAbout | int menuHelpAbout | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
openConsoleMenu | void openConsoleMenu(int index) | No description in source. |
closeConsoleMenus | void closeConsoleMenus() | No description in source. |
rgba | int rgba(int r, int g, int b, int a) | 0xRRGGBBAA colours for the military "metal / blue-hue" palette. |
rgb | int rgb(int r, int g, int b) | No description in source. |
militaryTheme | int militaryTheme() | Build the hardened metal/blue military theme and return its handle. Shared SLeeLa family palette: chrome/title bar #1D2025, URL-entry surface #383C47; keep these tokens aligned across all five lines. |
toggleWifiMenu | void toggleWifiMenu() | No description in source. |
closeWifiMenu | void closeWifiMenu() | No description in source. |
wifiActionUnavailable | void wifiActionUnavailable(String action) | No description in source. |
main | void main() | No description in source. |
gui-mual-text-editor #sleela 2.5 (lib/user-interface/example/mual/gui-mual-text-editor.sleela)
GuiMualTextEditor class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
VERTICAL | int VERTICAL = 0 | SLUITheme preset ordinals (mirror SLUIThemeId in the toolkit C ABI). Orientation + scroll-policy ordinals (mirror the toolkit C ABI). |
HORIZONTAL | int HORIZONTAL = 1 | No description in source. |
SCROLL_AUTO | int SCROLL_AUTO = 0 | No description in source. |
wifiButton | int wifiButton | int aboutPanel; // panel: about/help int statusLabel; // the status line text Lower-right status-bar connectivity control and its dismissible menu. |
wifiPanel | int wifiPanel | No description in source. |
wifiStatusLabel | int wifiStatusLabel | No description in source. |
wifiScanButton | int wifiScanButton | No description in source. |
wifiConnectButton | int wifiConnectButton | No description in source. |
wifiDisconnectButton | int wifiDisconnectButton | No description in source. |
wifiSettingsButton | int wifiSettingsButton | No description in source. |
wifiInfoButton | int wifiInfoButton | No description in source. |
wifiProfileEntry | int wifiProfileEntry | No description in source. |
wifiCloseButton | int wifiCloseButton | No description in source. |
btnDocs | int btnDocs | No description in source. |
btnAbout | int btnAbout | No description in source. |
btnSave | int btnSave | No description in source. |
btnNew | int btnNew | No description in source. |
openMenuIndex | int openMenuIndex = -1 | Menubar strip and its dropdown panels (built from existing ui* widgets). |
menuFileButton | int menuFileButton | No description in source. |
menuFilePanel | int menuFilePanel | No description in source. |
menuFileItem1 | int menuFileItem1 | No description in source. |
menuFileItem2 | int menuFileItem2 | No description in source. |
menuEditButton | int menuEditButton | No description in source. |
menuEditPanel | int menuEditPanel | No description in source. |
menuEditItem1 | int menuEditItem1 | No description in source. |
menuEditItem2 | int menuEditItem2 | No description in source. |
menuViewButton | int menuViewButton | No description in source. |
menuViewPanel | int menuViewPanel | No description in source. |
menuViewItem1 | int menuViewItem1 | No description in source. |
menuViewItem2 | int menuViewItem2 | No description in source. |
menuHelpButton | int menuHelpButton | No description in source. |
menuHelpPanel | int menuHelpPanel | No description in source. |
menuHelpItem1 | int menuHelpItem1 | No description in source. |
menuHelpItem2 | int menuHelpItem2 | No description in source. |
THEME_WHITE | int THEME_WHITE = 4 | Standard Pattern ordinal (mirror SLUIThemeId in the toolkit C ABI): 4=WHITE, 5=BLACK, 6=BLUE, 7=GRAY. This line (mual) uses WHITE. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
rgba | int rgba(int r, int g, int b, int a) | No description in source. |
rgb | int rgb(int r, int g, int b) | No description in source. |
baselineTheme | int baselineTheme() | Build the baseline editor theme and return its handle. mual is the WHITE Standard Pattern: a light surface family with dark text and a blue accent, supplied by the toolkit preset (no per-colour overrides); only the family metrics are tuned here. |
showPanel | void showPanel(int which) | Show exactly one panel; mark the active toolbar button as suggested. |
openMenu | void openMenu(int which) | Show one dropdown at a time; selecting the open menu closes it. |
wifiActionUnavailable | void wifiActionUnavailable(String action) | No description in source. |
main | void main() | No description in source. |
gui-thual-effects-showcase #sleela 2.5 (lib/user-interface/example/thual/gui-thual-effects-showcase.sleela)
GuiThualEffectsShowcase class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SCROLL_AUTO | int SCROLL_AUTO = 0 | SLUITheme preset ordinals (mirror SLUIThemeId in the toolkit C ABI). Scroll-policy ordinal (mirror the toolkit C ABI: 0=auto on overflow). |
btnConfirm | int btnConfirm | Live handles the event loop reacts on/to. |
btnFade | int btnFade | No description in source. |
statusLabel | int statusLabel | No description in source. |
wifiButton | int wifiButton | Lower-right status-bar connectivity control and its dismissible menu. |
wifiPanel | int wifiPanel | No description in source. |
wifiStatusLabel | int wifiStatusLabel | No description in source. |
wifiScanButton | int wifiScanButton | No description in source. |
wifiConnectButton | int wifiConnectButton | No description in source. |
wifiDisconnectButton | int wifiDisconnectButton | No description in source. |
wifiSettingsButton | int wifiSettingsButton | No description in source. |
wifiInfoButton | int wifiInfoButton | No description in source. |
wifiProfileEntry | int wifiProfileEntry | No description in source. |
wifiCloseButton | int wifiCloseButton | No description in source. |
openMenuIndex | int openMenuIndex = -1 | Menubar strip and its dropdown panels (built from existing ui* widgets). |
menuFileButton | int menuFileButton | No description in source. |
menuFilePanel | int menuFilePanel | No description in source. |
menuFileItem1 | int menuFileItem1 | No description in source. |
menuFileItem2 | int menuFileItem2 | No description in source. |
menuEffectsButton | int menuEffectsButton | No description in source. |
menuEffectsPanel | int menuEffectsPanel | No description in source. |
menuEffectsItem1 | int menuEffectsItem1 | No description in source. |
menuEffectsItem2 | int menuEffectsItem2 | No description in source. |
menuViewButton | int menuViewButton | No description in source. |
menuViewPanel | int menuViewPanel | No description in source. |
menuViewItem1 | int menuViewItem1 | No description in source. |
menuViewItem2 | int menuViewItem2 | No description in source. |
menuHelpButton | int menuHelpButton | No description in source. |
menuHelpPanel | int menuHelpPanel | No description in source. |
menuHelpItem1 | int menuHelpItem1 | No description in source. |
menuHelpItem2 | int menuHelpItem2 | No description in source. |
THEME_BLUE | int THEME_BLUE = 6 | A bright, dimensional "studio" theme for the effects line. Shared SLeeLa family palette: chrome/title bar #1D2025, Standard Pattern ordinal (mirror SLUIThemeId): 6=BLUE. thual uses BLUE. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
rgba | int rgba(int r, int g, int b, int a) | No description in source. |
rgb | int rgb(int r, int g, int b) | No description in source. |
clamp | int clamp(int v, int lo, int hi) | Every effect knob clamps to a safe window (the THUAL discipline). |
intToStr | String intToStr(int v) | No description in source. |
studioTheme | int studioTheme() | thual is the BLUE Standard Pattern: blue-tinted surfaces with light text, supplied by the toolkit preset (no per-colour overrides); metrics only. |
openMenu | void openMenu(int which) | Show one dropdown at a time; selecting the open menu closes it. |
wifiActionUnavailable | void wifiActionUnavailable(String action) | No description in source. |
main | void main() | No description in source. |
guide-chain-syntax #sleela 2.5 (lib/user-interface/example/science/guide-chain-syntax.sleela)
Perfect class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
growth | int growth | the seated growth, accumulated as each Guide fires |
trail | String trail | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create() | No description in source. |
patch | void patch() | --- the Guides: each a zero-argument method, seated via :: --- |
seed | void seed() | No description in source. |
aim | void aim() | No description in source. |
guide | void guide() | No description in source. |
total | int total() | No description in source. |
chain | String chain() | No description in source. |
GuideChainSyntax class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
math #sleela 2.5 (lib/user-interface/example/science/math.sleela)
ScienceMath class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
philosophers-constructor #sleela 2.5 (lib/user-interface/example/science/philosophers-constructor.sleela)
PhilosophersConstructorExample class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
buildOne | void buildOne(String title, int quorum, int seconds) | Build one Constructor, run it for a duration, and print its report. |
main | void main() | No description in source. |
physics #sleela 2.5 (lib/user-interface/example/science/physics.sleela)
SciencePhysics class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
SLAvatar #sleela 2.5 (lib/user-interface/SLAvatar.sleela)
SLAvatar class extends SLWidget
Defines SLAvatar — a SleelaUI round avatar: an accent disc of a fixed diameter showing a centred initial, used to represent a person or account. The constructor bottoms out in the `uiAvatar` built-in (SleelaUI C ABI slui_avatar()); the initial is updated through the inherited setText(). An SLAvatar IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String initial, int diameter) | Create an avatar inside `parent` with an initial and a diameter (px). |
createInHandle | void createInHandle(int parentHandle, String initial, int diameter) | No description in source. |
SLBadge #sleela 2.5 (lib/user-interface/SLBadge.sleela)
SLBadge class extends SLWidget
Defines SLBadge — a SleelaUI count/status pill: a small rounded accent pill with centred text, used to annotate a control with a count or short status (e.g. an unread count next to a title). The constructor bottoms out in the `uiBadge` built-in (SleelaUI C ABI slui_badge()); the text is updated through the inherited setText(). An SLBadge IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text) | Create a badge inside `parent` with text (often a small number). |
createInHandle | void createInHandle(int parentHandle, String text) | No description in source. |
SLBox #sleela 2.5 (lib/user-interface/SLBox.sleela)
SLBox class extends SLWidget
Defines SLBox — the primary SleelaUI container: a horizontal or vertical box that lays its children out with the GTK/CSS box model (natural sizes first, surplus split among expanding children, then cross-axis alignment). Children are added by constructing control classes against this box's handle. The constructor bottoms out in the `uiBox` built-in, which calls the SleelaUI C ABI slui_box(). A box IS an SLWidget, so it carries the full margin/align/expand surface and can itself be nested inside another box to build rich layouts. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int orientation, int spacing) | Create a box inside `parent` (an SLWidget). orientation is ORIENT_VERTICAL or ORIENT_HORIZONTAL; spacing is the gap between children in pixels. |
createInHandle | void createInHandle(int parentHandle, int orientation, int spacing) | No description in source. |
vertical | void vertical(SLWidget parent, int spacing) | Convenience constructors for the two orientations. |
horizontal | void horizontal(SLWidget parent, int spacing) | No description in source. |
SLButton #sleela 2.5 (lib/user-interface/SLButton.sleela)
SLButton class extends SLWidget
Defines SLButton — a SleelaUI push button: a rounded surface with centred text, a 1px hairline, a hover/active tint, and an accent focus ring when keyboard-focused. Mark it suggested() to make it the one accent action in its group, or destructive() to turn it red on hover. The constructor bottoms out in the `uiButton` built-in (SleelaUI C ABI slui_button()); clicks (and Enter/Space while focused) raise an activate event the host polls through the application's event loop. An SLButton IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String label) | Create a button inside `parent` with a label. |
createInHandle | void createInHandle(int parentHandle, String label) | No description in source. |
createInWithIcon | void createInWithIcon(SLWidget parent, String label, SLIcon icon) | Create a labelled button and attach an icon descriptor in one operation. |
createInHandleWithIcon | void createInHandleWithIcon(int parentHandle, String label, SLIcon icon) | No description in source. |
setIcon | void setIcon(SLIcon icon) | Attach a JPEG icon plus a named fallback symbol (for example, Wifi). |
setIconPath | void setIconPath(String assetPath, String symbolName) | No description in source. |
clicked | boolean clicked() | True if this button has an activation pending since the last check; the VM clears the latch on read, so each click is observed exactly once. |
hovered | boolean hovered() | True while the pointer is over the button. |
takePressed | boolean takePressed() | One-shot pointer press/release and hover transition events. |
takeReleased | boolean takeReleased() | No description in source. |
takeHoverEntered | boolean takeHoverEntered() | No description in source. |
takeHoverLeft | boolean takeHoverLeft() | No description in source. |
SLCalculus8 #sleela 2.5 (lib/user-interface/SLCalculus8.sleela)
SLCalculus8 class
Defines SLCalculus8 — the careful 8-stage calculus with 100 differentiable inputs that maps a SleelaUI light's control points directly into a MOOD. Each of the 100 inputs is a "differentiable" the host nudges in [0,1]; eight smooth, analytically-differentiable basis stages (identity, quadratic, smoothstep, sine, cosine, logistic, gaussian, tanh) combine them into a mood scalar in [0,1]. Because every stage is differentiable, eval returns both the mood and the slope d(mood)/d(input) so an adjuster can walk the gradient into a mood. Each method bottoms out in a `calc8*` SLVM built-in that calls the genuine C ABI (sleela_ui_mood.h). A calculus is a VM-local handle (-1 = none). Attach it to an SLMood with SLMood.setCalculus to drive where the mood's wash is sampled. Family: user-interface. Native VM/UI work crosses the explicit `calc8*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
INPUTS | static final int INPUTS = 100 | the 100 differentiables |
STAGES | static final int STAGES = 8 | the careful 8 stages |
calc | int calc | VM-local handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create() | No description in source. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
set | void set(int index, double value) | Set/get one of the 100 differentiables (index 0..99), each in [0,1]. |
get | double get(int index) | No description in source. |
mood | double mood() | Evaluate: the mood scalar in [0,1]. |
slope | double slope(int wrtIndex) | The slope d(mood)/d(input) along a given differentiable (differentiable calculus: nudging that input moves the mood by this slope). |
SLCanvasView #sleela 2.5 (lib/user-interface/SLCanvasView.sleela)
SLCanvasView class extends SLWidget
Defines SLCanvasView — a SleelaUI general animated drawing surface. It owns a double-buffered draw context sized to its bounds and, on every frame, invokes a developer draw routine that paints into that context with the comprehensive SleelaUI Draw API (see SLDrawContext), then presents and blits the result into the window. It is the host for custom visualisations and the substrate the SLThrobber is built on. The constructor bottoms out in the `uiCanvasView` built-in (SleelaUI C ABI slui_canvas_view()). The native toolkit drives the draw routine through a C function pointer each frame. From SLeeLa a draw routine is registered with the VM as a `ui*` draw handler keyed to this view's handle; the VM calls back into SLeeLa with an SLDrawContext bound to the view's per-frame surface, the animation time, and the per-frame delta. Set the refresh rate with setFps. An SLCanvasView IS an SLWidget and is an animated widget. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int width, int height) | Create a canvas view inside `parent` with an initial pixel size. |
createInHandle | void createInHandle(int parentHandle, int width, int height) | No description in source. |
setFps | void setFps(double fps) | The target refresh rate (frames per second) the window loop honours while this view is visible (0 = the window's default). |
setDrawHandler | void setDrawHandler(int handlerId) | Register the draw routine for this view. `handlerId` is a VM draw-handler ordinal the host has bound to a SLeeLa method; the VM invokes it each frame with an SLDrawContext, the animation time, and the per-frame delta. |
SLCard #sleela 2.5 (lib/user-interface/SLCard.sleela)
SLCard class extends SLWidget
Defines SLCard — a SleelaUI raised surface panel: a rounded surface fill with a 1px hairline, padding, and a vertical stack of children. Use it to lift a related cluster of content off the window floor. The constructor bottoms out in the `uiCard` built-in (SleelaUI C ABI slui_card()); children are added by constructing control classes against this card's handle. An SLCard IS an SLWidget container. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a card inside `parent`. |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
SLCheckBox #sleela 2.5 (lib/user-interface/SLCheckBox.sleela)
SLCheckBox class extends SLWidget
Defines SLCheckBox — a SleelaUI labelled check box: a rounded square that shows an accent tick when on, with a trailing label. Flipping it (click, or Space/Enter while focused) toggles the boolean state and raises an activate event. The constructor bottoms out in the `uiCheckBox` built-in (SleelaUI C ABI slui_check_box()); the state is read/written through isChecked()/setChecked(). An SLCheckBox IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String label, boolean checked) | Create a check box inside `parent` with a label and initial state. |
createInHandle | void createInHandle(int parentHandle, String label, boolean checked) | No description in source. |
isChecked | boolean isChecked() | No description in source. |
setChecked | void setChecked(boolean checked) | No description in source. |
changed | boolean changed() | True if the check box flipped since the last check (latch cleared on read). |
SLChip #sleela 2.5 (lib/user-interface/SLChip.sleela)
SLChip class extends SLWidget
Defines SLChip — a SleelaUI chip / tag: a rounded surface pill with a 1px hairline and text, used for filters, tags, or compact selections. The constructor bottoms out in the `uiChip` built-in (SleelaUI C ABI slui_chip()); the text is updated through the inherited setText(). An SLChip IS an SLWidget. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text) | Create a chip inside `parent` with a label. |
createInHandle | void createInHandle(int parentHandle, String text) | No description in source. |
SLColor #sleela 2.5 (lib/user-interface/SLColor.sleela)
SLColor class
Defines SLColor — a straight-alpha colour value for SleelaUI, packed as a single 0xRRGGBBAA word exactly as the toolkit's C ABI uses (SLUIColor). It provides the rgb()/rgba() builders (mirroring slui_rgb / slui_rgba) and channel accessors, so a SLeeLa program can compose a custom theme palette without touching native code. SLColor is a pure value helper — it holds no VM handle and makes no `ui*` calls; it only packs/unpacks the integer the theme built-ins consume. Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packed | int packed | 0xRRGGBBAA |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
rgb | void rgb(int r, int g, int b) | Opaque colour from 8-bit channels. |
rgba | void rgba(int r, int g, int b, int a) | Colour with explicit alpha. Channels are masked to 0..255. |
value | int value() | No description in source. |
setValue | void setValue(int word) | No description in source. |
red | int red() | No description in source. |
green | int green() | No description in source. |
blue | int blue() | No description in source. |
alpha | int alpha() | No description in source. |
SLComboBox #sleela 2.5 (lib/user-interface/SLComboBox.sleela)
SLComboBox class extends SLWidget
Defines SLComboBox — a SleelaUI drop-down selection control: a rounded surface showing the current option and a chevron. Options are added with addOption(); clicking (or arrow keys while focused) advances the selection and raises an activate event. The constructor bottoms out in the `uiComboBox` built-in (SleelaUI C ABI slui_combo_box()); options are added via `uiComboBoxAdd` and the selected index is read/written through selectedIndex()/setSelectedIndex(). An SLComboBox IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a combo box inside `parent`; add options afterwards. |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
addOption | void addOption(String option) | Append a selectable option. |
selectedIndex | double selectedIndex() | The currently-selected option index (0-based), as a value. The VM carries the index as a numeric; callers typically use selected() for the text. |
setSelectedIndex | void setSelectedIndex(int index) | No description in source. |
selected | String selected() | The currently-selected option text. |
changed | boolean changed() | True if the selection changed since the last check (latch cleared on read). |
SLDrawContext #sleela 2.5 (lib/user-interface/SLDrawContext.sleela)
SLDrawContext class
Defines SLDrawContext — the SLeeLa binding of the comprehensive SleelaUI Draw API (user-interface/include/sleela_ui_draw.h). It is an owned RGBA pixel surface with an optional back buffer, giving a SLeeLa program the PIXELS: clear/present buffering, pixel-level get/set/blend, a blend mode and layer opacity, a clip stack, and the full primitive set — rects, rounded rects, lines, polylines, circles, ellipses, arcs, triangles, linear/radial gradients, text, and surface-to-surface blits. Every method bottoms out in a `draw*` SLVM built-in that calls the genuine Draw API, which renders with the toolkit's own software rasterizer (identical pixels on every OS). A draw context can be free-standing (an image you render and read back) or handed to you by an SLCanvasView's per-frame draw routine. It is a VM-local handle (-1 = none). Colours are 0xRRGGBBAA words (see SLColor). Family: user-interface. Native VM/UI work crosses the explicit `draw*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
BUFFER_SINGLE | static final int BUFFER_SINGLE = 0 | Buffer-mode ordinals (mirror SLUIBufferMode). |
BUFFER_DOUBLE | static final int BUFFER_DOUBLE = 1 | No description in source. |
BLEND_OVER | static final int BLEND_OVER = 0 | Blend-mode ordinals (mirror SLUIBlendMode). |
BLEND_COPY | static final int BLEND_COPY = 1 | No description in source. |
BLEND_ADD | static final int BLEND_ADD = 2 | No description in source. |
BLEND_MULTIPLY | static final int BLEND_MULTIPLY = 3 | No description in source. |
BLEND_SCREEN | static final int BLEND_SCREEN = 4 | No description in source. |
BLEND_MAX | static final int BLEND_MAX = 5 | No description in source. |
ORIENT_VERTICAL | static final int ORIENT_VERTICAL = 0 | Orientation ordinals (mirror SLUIOrientation), for linear gradients. |
ORIENT_HORIZONTAL | static final int ORIENT_HORIZONTAL = 1 | No description in source. |
dc | int dc | VM-local draw-context handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create(int width, int height, int bufferMode) | Create a free-standing context of width x height device pixels. |
adopt | void adopt(int handle) | Adopt a context handed in by an SLCanvasView draw routine. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
resize | void resize(int width, int height) | No description in source. |
width | int width() | No description in source. |
height | int height() | No description in source. |
setBlend | void setBlend(int mode) | ---- state -------------------------------------------------------------- |
setOpacity | void setOpacity(double value) | No description in source. |
clipPush | void clipPush(int x, int y, int w, int h) | No description in source. |
clipPop | void clipPop() | No description in source. |
clipReset | void clipReset() | No description in source. |
clear | void clear(int color) | ---- buffering ---------------------------------------------------------- |
present | void present() | No description in source. |
setPixel | void setPixel(int x, int y, int color) | ---- pixel-level control ------------------------------------------------ |
getPixel | int getPixel(int x, int y) | No description in source. |
blendPixel | void blendPixel(int x, int y, int color, double coverage) | No description in source. |
fillRect | void fillRect(int x, int y, int w, int h, int color) | ---- primitives --------------------------------------------------------- |
fillRoundRect | void fillRoundRect(int x, int y, int w, int h, double radius, int color) | No description in source. |
strokeRect | void strokeRect(int x, int y, int w, int h, double thickness, int color) | No description in source. |
strokeRoundRect | void strokeRoundRect(int x, int y, int w, int h, double radius, | No description in source. |
line | void line(double x0, double y0, double x1, double y1, double thickness, | No description in source. |
fillCircle | void fillCircle(double cx, double cy, double radius, int color) | No description in source. |
strokeCircle | void strokeCircle(double cx, double cy, double radius, double thickness, | No description in source. |
fillEllipse | void fillEllipse(double cx, double cy, double rx, double ry, int color) | No description in source. |
arc | void arc(double cx, double cy, double radius, double startRad, | No description in source. |
fillTriangle | void fillTriangle(double x0, double y0, double x1, double y1, double x2, | No description in source. |
linearGradient | void linearGradient(int x, int y, int w, int h, int axis, int c0, int c1) | No description in source. |
radialGradient | void radialGradient(double cx, double cy, double radius, int inner, int outer) | No description in source. |
text | void text(String utf8, int x, int baseline, int color) | No description in source. |
blit | void blit(SLDrawContext src, int dx, int dy) | No description in source. |
SLEntry #sleela 2.5 (lib/user-interface/SLEntry.sleela)
SLEntry class extends SLWidget
Defines SLEntry — a SleelaUI single-line text field: a rounded surface with a hairline (accent when focused), placeholder text when empty, a blinking-free caret, and full UTF-8 editing (insert, backspace, Home/End, left/right). The constructor bottoms out in the `uiEntry` built-in (SleelaUI C ABI slui_entry()); the committed text is read/written through the inherited text()/setText(), and Enter raises an activate event. An SLEntry IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String placeholder) | Create an entry inside `parent` with placeholder text (shown when empty). |
createInHandle | void createInHandle(int parentHandle, String placeholder) | No description in source. |
submitted | boolean submitted() | True if Enter was pressed since the last check (latch cleared on read). |
SLFont #sleela 2.5 (lib/user-interface/SLFont.sleela)
SLFont class
Defines SLFont — a SleelaUI font for Sleela and her UI. A font bundles a face (family, size, weight, slant, letter spacing, line height) with an ordered stack of SLFontEffect entries — drop/inner shadows, a soft glow, a directional light sheen, an EMITTER (text that radiates light into a scene), an outline, a relief emboss/engrave, and a gradient fill — plus a QUALITY level (draft .. ultra) that trades samples for smoothness, so a program can "choose many quality effects". Each method bottoms out in a `font*` SLVM built-in that calls the SleelaUI Font C ABI (sleela_ui_font.h); the look comes from the toolkit's own rasterizer, so a styled string is pixel-identical on every OS. A font is a VM-local handle (-1 = none). Attach it to a text widget with SLWidget.setFont (uiWidgetSetFont) to render that widget's label with the font's effects, or draw directly into an SLDrawContext. Family: user-interface. Native VM/UI work crosses the explicit `font*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
THIN | static final int THIN = 100 | Weight ordinals (mirror SLUIFontWeight). |
LIGHT | static final int LIGHT = 300 | No description in source. |
REGULAR | static final int REGULAR = 400 | No description in source. |
MEDIUM | static final int MEDIUM = 500 | No description in source. |
SEMIBOLD | static final int SEMIBOLD = 600 | No description in source. |
BOLD | static final int BOLD = 700 | No description in source. |
BLACK | static final int BLACK = 900 | No description in source. |
UPRIGHT | static final int UPRIGHT = 0 | Slant ordinals (mirror SLUIFontSlant). |
ITALIC | static final int ITALIC = 1 | No description in source. |
OBLIQUE | static final int OBLIQUE = 2 | No description in source. |
QUALITY_DRAFT | static final int QUALITY_DRAFT = 0 | Quality ordinals (mirror SLUIFontQuality). |
QUALITY_LOW | static final int QUALITY_LOW = 1 | No description in source. |
QUALITY_MEDIUM | static final int QUALITY_MEDIUM = 2 | No description in source. |
QUALITY_HIGH | static final int QUALITY_HIGH = 3 | No description in source. |
QUALITY_ULTRA | static final int QUALITY_ULTRA = 4 | No description in source. |
font | int font | VM-local font handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create(String family, double sizePt) | Create a font with a family ("system"/"mono"/a real face) and point size. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
setFamily | void setFamily(String family) | ---- face attributes ---------------------------------------------------- |
setSize | void setSize(double sizePt) | No description in source. |
setWeight | void setWeight(int weight) | No description in source. |
setSlant | void setSlant(int slant) | No description in source. |
setLetterSpacing | void setLetterSpacing(double px) | No description in source. |
setLineHeight | void setLineHeight(double multiple) | No description in source. |
setQuality | void setQuality(int quality) | No description in source. |
size | double size() | No description in source. |
addEffect | void addEffect(SLFontEffect e) | ---- effect stack ------------------------------------------------------- Add an effect (applied back-to-front in add order). |
clearEffects | void clearEffects() | No description in source. |
effectCount | int effectCount() | No description in source. |
measure | double measure(String utf8) | ---- measuring ---------------------------------------------------------- |
ascent | double ascent() | No description in source. |
descent | double descent() | No description in source. |
lineHeight | double lineHeight() | No description in source. |
draw | void draw(SLDrawContext dc, String utf8, int x, int baseline, int color) | ---- drawing ------------------------------------------------------------ Draw into an SLDrawContext with the full effect stack at (x, baseline). |
emitInto | int emitInto(SLLightScene scene, int x, int baseline, String utf8) | If this font carries an EMITTER effect, register that emission into a light scene for text drawn at (x, baseline). A pure emitter reserves nothing; an anchored one binds as a source. Returns the light index or an error. |
SLFontEffect #sleela 2.5 (lib/user-interface/SLFontEffect.sleela)
SLFontEffect class
Defines SLFontEffect — one entry in an SLFont's effect stack. An effect is a drop/inner shadow, a soft glow, a directional light sheen, an EMITTER (the text radiates light into a scene — reserving nothing as an emitter, or binding as a source on an anchor), an outline, a relief emboss/engrave, or a gradient fill. It is a pure value object the host fills with the builder methods and adds to an SLFont; the font applies the stack back-to-front when drawing. Mirrors SLUIFontEffect in the SleelaUI Font C ABI (sleela_ui_font.h). Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
DROP_SHADOW | static final int DROP_SHADOW = 0 | Effect-type ordinals (mirror SLUIFontEffectType). |
INNER_SHADOW | static final int INNER_SHADOW = 1 | No description in source. |
GLOW | static final int GLOW = 2 | No description in source. |
LIGHT | static final int LIGHT = 3 | No description in source. |
EMITTER | static final int EMITTER = 4 | No description in source. |
OUTLINE | static final int OUTLINE = 5 | No description in source. |
RELIEF | static final int RELIEF = 6 | No description in source. |
GRADIENT_FILL | static final int GRADIENT_FILL= 7 | No description in source. |
EMBOSSED | static final int EMBOSSED = 0 | Relief direction (mirror SLUIFontRelief). |
ENGRAVED | static final int ENGRAVED = 1 | No description in source. |
type | int type | No description in source. |
color | int color | shadow/glow/light/outline/emitter colour (0xRRGGBBAA) |
color2 | int color2 | gradient bottom colour |
blur | double blur | shadow/glow softness radius (px) |
size | double size | outline width / relief depth / emitter radius (px) |
intensity | double intensity | 0..N strength (glow/light/emitter/relief) |
opacity | double opacity | 0..1 effect opacity |
relief | int relief | EMBOSSED / ENGRAVED for a RELIEF effect |
reservedAnchor | int reservedAnchor | EMITTER: -1 reserve nothing; >=0 bind as a source |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
base | void base(int t) | No description in source. |
dropShadow | void dropShadow(double ox, double oy, double softness, int c) | An offset, blurred, dark copy behind the glyph. |
innerShadow | void innerShadow(double ox, double oy, double softness, int c) | Shadow inside the glyph (a pressed-in look). |
glow | void glow(double radius, double i, int c) | A soft coloured halo around the glyph. |
light | void light(double ux, double uy, double i, int c) | A directional sheen lighting the glyph face. |
emitter | void emitter(double radius, double i, int c, int anchor) | The text radiates light into a scene. anchor < 0 => a pure emitter (reserves nothing); anchor >= 0 => bind as a light SOURCE on that anchor. |
outline | void outline(double width, int c) | A stroked edge of a chosen width + colour. |
reliefEffect | void reliefEffect(int direction, double depth, double i) | Emboss/engrave the glyph using lighting normals. |
gradientFill | void gradientFill(int top, int bottom) | Fill the glyph with a vertical gradient. |
SLFrame #sleela 2.5 (lib/user-interface/SLFrame.sleela)
SLFrame class extends SLWidget
Defines SLFrame — a SleelaUI titled, bordered group container: a 1px hairline rectangle with an optional dim title in the top-left, holding a vertical stack of children. Use it to visually group related controls. The constructor bottoms out in the `uiFrame` built-in (SleelaUI C ABI slui_frame()); children are added by constructing control classes against this frame's handle, and the title is updated through the inherited setText(). An SLFrame IS an SLWidget container. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String title) | Create a frame inside `parent` with a title (pass "" for no title). |
createInHandle | void createInHandle(int parentHandle, String title) | No description in source. |
SLFrameClock #sleela 2.5 (lib/user-interface/SLFrameClock.sleela)
SLFrameClock class
Defines SLFrameClock — the SLeeLa binding of the SleelaUI Draw API's refresh-rate controller. It paces a render loop: a target rate (FPS), a per-frame delta time, an elapsed animation clock, a smoothed measured rate, a sleep hint so the loop idles instead of busy-spinning, and a fixed-timestep accumulator for deterministic field/physics updates regardless of frame rate. Every method bottoms out in a `draw*` SLVM built-in that calls the genuine frame-clock API. Typical loop: SLFrameClock fc = new SLFrameClock(); fc.create(60.0); while (running) { double dt = fc.tick(); update(dt); draw(dc); dc.present(); int ms = fc.sleepHint(); if (ms > 0) host.sleep(ms); } A frame clock is a VM-local handle (-1 = none). Family: user-interface. Native VM/UI work crosses the explicit `draw*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
fc | int fc | VM-local frame-clock handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create(double targetFps) | Create a frame clock with a target refresh rate (0 = unthrottled). |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
setFps | void setFps(double targetFps) | No description in source. |
fps | double fps() | No description in source. |
tick | double tick() | Advance one frame; returns the delta time in seconds since the last tick. |
elapsed | double elapsed() | Seconds since the clock was created (monotonic animation time). |
measuredFps | double measuredFps() | The smoothed frames-per-second actually being achieved. |
sleepHint | int sleepHint() | Milliseconds the caller should idle to hit the target rate (0 if behind). |
fixedStep | boolean fixedStep(double step) | Fixed-timestep drain: after tick(), call repeatedly, running one fixed `step`-second update each time it returns true, until it returns false. |
SLGalleryDemo #sleela 2.5 (lib/user-interface/SLGalleryDemo.sleela)
SLGalleryDemo class
Defines SLGalleryDemo — a worked, runnable example that builds a complete Slick Black window from pure SLeeLa source using the /lib/user-interface classes. It opens an application, raises a window with a header bar and the full control set (label, entry, suggested/destructive buttons, toggle, slider, separator, a disabled button, a status line), and runs the toolkit's event loop. It is the SLeeLa-source twin of the native C gallery in /user-interface/examples/gallery.c, proving the toolkit is fully usable from the language itself. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ui | SLUserInterface ui | No description in source. |
win | SLWindow win | No description in source. |
save | SLButton save | No description in source. |
dark | SLToggle dark | No description in source. |
opacity | SLSlider opacity | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
run | int run() | Build the whole interface and return the application exit code. |
SLGrid #sleela 2.5 (lib/user-interface/SLGrid.sleela)
SLGrid class extends SLWidget
Defines SLGrid — a SleelaUI fixed row/column grid container. Children fill cells in row-major order across a fixed number of columns; the grid sizes every cell to the largest child and spreads them to fill the available width. Use it for form layouts and tiles. The constructor bottoms out in the `uiGrid` built-in (SleelaUI C ABI slui_grid()); children are added by constructing control classes against this grid's handle. An SLGrid IS an SLWidget container. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int columns, int spacing) | Create a grid inside `parent` with a column count and a spacing (px) applied between both rows and columns. |
createInHandle | void createInHandle(int parentHandle, int columns, int spacing) | No description in source. |
SLGuiApp #sleela 2.5 (lib/user-interface/SLGuiApp.sleela)
SLGuiApp class
Defines SLGuiApp — the top-level support structure that ties the whole /lib/gui dynamic stack together into one object: it opens a SleelaUI application and window (via /lib/user-interface), owns the SLeeLa DOM (SLGuiDom), the reconciler (SLGuiMount) that projects the DOM onto widgets, the host adapter (SLGuiHostAdapter) that raises widget activations back as events, and an optional script engine (SLGuiScript). Its run loop pumps the toolkit event loop, polls widget activations into the event bus, re-mounts any newly-created nodes, and reconciles dirty nodes each turn. This is the "basic support structure" a program (or the IDE) builds on: construct the DOM declaratively or by script, bind callbacks, and call run(). Family: user-interface. SLeeLa owns the DOM, dispatch, and script execution; SleelaUI owns presentation; this object is the wiring between them.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ui | SLUserInterface ui | No description in source. |
window | SLWindow window | No description in source. |
dom | SLGuiDom dom | No description in source. |
mount | SLGuiMount mount | No description in source. |
host | SLGuiHostAdapter host | No description in source. |
script | SLGuiScript script | No description in source. |
ready | int ready | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
boot | boolean boot(String appId, String title, int width, int height) | Open the application + window and stand up the DOM/mount/host wiring. Returns true when the toolkit came up (false on a headless host). |
isReady | boolean isReady() | No description in source. |
document | SLGuiDom document() | No description in source. |
scripting | SLGuiScript scripting() | No description in source. |
hostWindow | SLWindow hostWindow() | No description in source. |
add | SLGuiNode add(String parentId, String tag, String id) | Convenience: append an element to a parent in the DOM (then mount+show on the next loop turn, or immediately via refresh()). |
onClick | SLGuiHandler onClick(String id, String operation) | Bind a click callback (DHTML onClick) by node id. |
runScript | int runScript() | Run a UI script against the DOM (build + bind + fire), then refresh. |
run | int run() | Mount everything, show the window, then run the toolkit event loop: pump -> poll activations -> mount new nodes -> reconcile. Returns the process-style exit code. |
refresh | void refresh() | A single synchronous refresh (mount new + reconcile) without the loop, for building a UI up front or driving it from a test/host step. |
step | int step(boolean block) | Pump one turn (pump + poll + refresh); returns events raised this turn. |
quit | void quit(int code) | No description in source. |
shutdown | void shutdown() | No description in source. |
SLGuiDom #sleela 2.5 (lib/user-interface/SLGuiDom.sleela)
SLGuiDom class
Defines SLGuiDom — the DHTML-style document model for /lib/gui: a flat registry of SLGuiNode elements forming a tree, plus the manipulation API a browser DOM exposes — createElement, getElementById, appendChild, removeChild, setText/setAttribute/setStyle on an id, show/hide, and a simple getElementsByTag / querySelector-by-attribute lookup. It owns an SLGuiEventBus so handlers bind to node ids (onClick, onInput, on(type,...), addEventListener) and raised events route to SLeeLa operations. The DOM is the single SLeeLa-owned source of truth; a host walks the dirty nodes and mirrors them onto real SleelaUI widgets. Family: user-interface. SLeeLa owns the document and dispatch; the host mounts and paints it.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_NODES | static final int MAX_NODES = 65536 | No description in source. |
nodes | SLGuiNode[] nodes | No description in source. |
count | int count | No description in source. |
rootId | String rootId | No description in source. |
bus | SLGuiEventBus bus | No description in source. |
types | SLGuiEventType types | name<->ordinal helper |
idSeq | int idSeq | auto-id counter for createElement without an id |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init() | No description in source. |
events | SLGuiEventBus events() | No description in source. |
size | int size() | No description in source. |
createElement | SLGuiNode createElement(String tag, String id) | createElement(tag, id): id "" generates a stable auto id ("n<seq>"). |
createRoot | SLGuiNode createRoot(String tag, String id) | The document root (the window element). Created once. |
root | SLGuiNode root() | No description in source. |
getElementById | SLGuiNode getElementById(String id) | No description in source. |
indexOfId | int indexOfId(String id) | No description in source. |
appendChild | boolean appendChild(String parentId, String childId) | appendChild(parentId, childId): link child under parent in both directions. |
appendElement | SLGuiNode appendElement(String parentId, String tag, String id) | Convenience: create a child element already appended to a parent. |
removeChild | boolean removeChild(String childId) | removeChild: detach from parent, remove its handlers, and drop the node (and recursively its subtree). |
setText | void setText(String id, String text) | No description in source. |
setAttribute | void setAttribute(String id, String name, String value) | No description in source. |
setStyle | void setStyle(String id, String prop, String value) | No description in source. |
show | void show(String id) | No description in source. |
hide | void hide(String id) | No description in source. |
setEnabled | void setEnabled(String id, boolean on) | No description in source. |
getElementsByTag | int getElementsByTag(String tag, String[] out, int cap) | Fill `out` with the ids of every node with the given tag; returns the count. |
querySelectorByAttr | String querySelectorByAttr(String name, String value) | Return the first node id whose attribute `name` equals `value` (or null). |
addEventListener | SLGuiHandler addEventListener(String id, String eventName, String operation) | No description in source. |
removeEventListener | boolean removeEventListener(String id, String eventName, String operation) | No description in source. |
onClick | SLGuiHandler onClick(String id, String operation) | Shorthands mirroring onclick=/oninput= style bindings. |
onInput | SLGuiHandler onInput(String id, String operation) | No description in source. |
onChange | SLGuiHandler onChange(String id, String operation) | No description in source. |
onKeyDown | SLGuiHandler onKeyDown(String id, String operation) | No description in source. |
onSubmit | SLGuiHandler onSubmit(String id, String operation) | No description in source. |
dispatchEvent | int dispatchEvent(SLGuiEvent event) | The host raises an activation on a node; dispatch it through the bus. Returns how many handlers fired. |
fire | int fire(int eventType, String targetId, String value) | No description in source. |
dirtyCount | int dirtyCount() | The number of nodes needing a host re-sync (dirty), for the mount walk. |
nodeAt | SLGuiNode nodeAt(int i) | No description in source. |
autoId | String autoId() | No description in source. |
removeSubtree | void removeSubtree(String id) | No description in source. |
removeNode | void removeNode(String id) | No description in source. |
SLGuiEvent #sleela 2.5 (lib/user-interface/SLGuiEvent.sleela)
SLGuiEvent class
Defines SLGuiEvent — one dispatched GUI event, the DHTML-style event object a handler receives. It names the event type (an SLGuiEventType ordinal), the target node id it was raised on, and the payload the kind carries: a string value (entry text / changed value), a key name (for key events), pointer coordinates (for pointer events), and a toggle state. It also carries the two propagation controls a handler can set — preventDefault() and stopPropagation() — exactly like a browser event, so SLeeLa handlers can cancel the host's default action or halt bubbling. Family: user-interface. The host raises the activation; SLeeLa reads this event and decides what it means.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
type | int type | SLGuiEventType ordinal |
targetId | String targetId | the node id the event was raised on |
value | String value | string payload (entry text, changed value, custom data) |
key | String key | key name for KEYDOWN/KEYUP (e.g. "Enter", "a") |
x | int x | pointer x within the target (pointer events) |
y | int y | pointer y within the target (pointer events) |
toggleState | int toggleState | 1/0 for TOGGLE events |
defaultPrevented | int defaultPrevented | 1 once preventDefault() is called |
propagationStopped | int propagationStopped | 1 once stopPropagation() is called |
timestamp | int timestamp | host-supplied monotonic tick (0 if unknown) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int eventType, String target) | No description in source. |
getType | int getType() | No description in source. |
target | String target() | No description in source. |
setValue | void setValue(String v) | Payload setters (the host fills in what the kind carries). |
getValue | String getValue() | No description in source. |
setKey | void setKey(String k) | No description in source. |
getKey | String getKey() | No description in source. |
setPointer | void setPointer(int px, int py) | No description in source. |
pointerX | int pointerX() | No description in source. |
pointerY | int pointerY() | No description in source. |
setToggle | void setToggle(int on) | No description in source. |
toggledOn | boolean toggledOn() | No description in source. |
setTimestamp | void setTimestamp(int t) | No description in source. |
when | int when() | No description in source. |
preventDefault | void preventDefault() | DHTML-style propagation controls. |
isDefaultPrevented | boolean isDefaultPrevented() | No description in source. |
stopPropagation | void stopPropagation() | No description in source. |
isPropagationStopped | boolean isPropagationStopped() | No description in source. |
SLGuiEventBus #sleela 2.5 (lib/user-interface/SLGuiEventBus.sleela)
SLGuiEventBus class
Defines SLGuiEventBus — the event dispatcher and listener table for the /lib/gui event layer. It is the engine behind addEventListener / removeEventListener and the onClick/onInput shorthands: handlers register against a (type, target) pair, and dispatch(event) delivers a raised SLGuiEvent to every matching SLGuiHandler, honouring the DHTML-style phase order (capture handlers first, then target/bubble), stopPropagation() to halt delivery, and once handlers that auto-remove after firing. The bus is the SLeeLa-owned meaning layer: the host raises typed activations, the bus routes them to the bound operations. Family: user-interface. SLeeLa owns dispatch and the meaning of events; the host only raises them.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_HANDLERS | static final int MAX_HANDLERS = 8192 | No description in source. |
handlers | SLGuiHandler[] handlers | No description in source. |
count | int count | No description in source. |
lastDelivered | int lastDelivered | how many handlers the last dispatch fired |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init() | No description in source. |
size | int size() | No description in source. |
addListener | SLGuiHandler addListener(String targetId, int eventType, String operation) | addEventListener(target, type, operation): register a handler and return it. |
addListenerEx | SLGuiHandler addListenerEx(String targetId, int eventType, String operation, | addEventListener with options (once / capture). |
removeListener | boolean removeListener(String targetId, int eventType, String operation) | removeEventListener: drop the first handler matching (target, type, op). |
removeTarget | int removeTarget(String targetId) | Remove every handler bound to a target (used when a node is destroyed). |
dispatch | int dispatch(SLGuiEvent event) | Dispatch a raised event: capture-phase handlers first, then bubble-phase, stopping early if a handler calls stopPropagation(). once handlers are removed after they fire. Returns the number of handlers that fired. |
deliverPhase | void deliverPhase(SLGuiEvent event, boolean capturePhase) | No description in source. |
raise | int raise(int eventType, String targetId, String value) | Convenience: build and dispatch a simple typed event with a string value. |
poll | boolean poll(SLGuiHandler handler) | Poll a handler's latch (for hosts that poll rather than get called back). |
deliveredLast | int deliveredLast() | No description in source. |
removeAt | void removeAt(int index) | No description in source. |
sweepOnce | void sweepOnce() | Remove handlers flagged once that have fired at least once. |
SLGuiEventType #sleela 2.5 (lib/user-interface/SLGuiEventType.sleela)
SLGuiEventType class
Defines SLGuiEventType — the catalogue of GUI event kinds the /lib/gui event layer understands. These are the SLeeLa-facing names a handler binds to (the DHTML-style "click", "input", "change", "keydown", ...). The host raises one of these on a target; SLeeLa decides what it means. Each kind has a stable ordinal (used by the dispatch tables) and a canonical lowercase name (the string an onX binding or addEventListener uses), mirroring the activation model already in SLGuiAction. Family: user-interface. Java/native raise typed activations; SLeeLa owns their meaning.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CLICK | static final int CLICK = 0 | Ordinals (stable; used as table indices). a primary activation (click / Enter / Space) |
DBLCLICK | static final int DBLCLICK = 1 | a double activation |
INPUT | static final int INPUT = 2 | live text input (per keystroke) |
CHANGE | static final int CHANGE = 3 | a committed value change (blur/Enter) |
FOCUS | static final int FOCUS = 4 | the target gained focus |
BLUR | static final int BLUR = 5 | the target lost focus |
KEYDOWN | static final int KEYDOWN = 6 | a key went down while focused |
KEYUP | static final int KEYUP = 7 | a key came up while focused |
POINTERDOWN | static final int POINTERDOWN= 8 | a pointer press began on the target |
POINTERUP | static final int POINTERUP = 9 | a pointer press ended on the target |
POINTERMOVE | static final int POINTERMOVE=10 | the pointer moved over the target |
SCROLL | static final int SCROLL =11 | the target scrolled |
SUBMIT | static final int SUBMIT =12 | a form-like submit (Enter in an entry) |
TOGGLE | static final int TOGGLE =13 | a toggle/checkbox flipped |
CUSTOM | static final int CUSTOM =14 | a host- or script-defined event |
COUNT | static final int COUNT =15 | number of defined event kinds |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
nameOf | String nameOf(int type) | The canonical lowercase name for an ordinal (the addEventListener string). |
typeOf | int typeOf(String name) | The ordinal for a canonical name (-1 when the name is not recognised). |
valid | boolean valid(int type) | No description in source. |
SLGuiHandler #sleela 2.5 (lib/user-interface/SLGuiHandler.sleela)
SLGuiHandler class
Defines SLGuiHandler — one registered event callback: the triple (event type, target node id, SLeeLa operation). It is the /lib/gui generalisation of SLGuiAction from a single click to any SLGuiEventType, and it is what addEventListener(target, type, operation) and the onClick/onInput shorthands create. When the dispatcher matches a raised SLGuiEvent to this handler it invokes the bound operation; the handler latches each fire so a host that polls (rather than calls back) still observes each activation exactly once, the same take-the-latch discipline as SLGuiAction. Family: user-interface. The host raises activations; this binding maps them to a SLeeLa operation whose meaning SLeeLa owns.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
type | int type | SLGuiEventType ordinal this handler listens for |
targetId | String targetId | node id it is bound to ("*" matches any target) |
operation | String operation | the SLeeLa operation invoked when it fires |
once | int once | 1 = auto-remove after the first fire |
capture | int capture | 1 = fire during capture phase, 0 = bubble phase |
enabled | int enabled | 1 while active |
pending | int pending | activation latch (set on fire, cleared on take) |
fired | int fired | total times fired |
lastValue | String lastValue | the value carried by the most recent matching event |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int eventType, String target, String op) | No description in source. |
getType | int getType() | No description in source. |
getTarget | String getTarget() | No description in source. |
getOperation | String getOperation() | No description in source. |
bound | boolean bound() | No description in source. |
setOnce | void setOnce(boolean on) | No description in source. |
isOnce | boolean isOnce() | No description in source. |
setCapture | void setCapture(boolean on) | No description in source. |
isCapture | boolean isCapture() | No description in source. |
setEnabled | void setEnabled(boolean on) | No description in source. |
isEnabled | boolean isEnabled() | No description in source. |
matches | boolean matches(SLGuiEvent event) | Does this handler match the given event? "*" target is a wildcard. |
fire | void fire(SLGuiEvent event) | Fire against a matching event: record it and raise the latch. The dispatcher calls this; a host that polls then reads it with take(). |
take | boolean take() | Take-the-latch read: true once per fire, then cleared. |
activations | int activations() | No description in source. |
value | String value() | No description in source. |
SLGuiHostAdapter #sleela 2.5 (lib/user-interface/SLGuiHostAdapter.sleela)
SLGuiHostAdapter class
Defines SLGuiHostAdapter — the toolkit->SLeeLa half of the loop. Where SLGuiMount pushes DOM state onto widgets, the host adapter reads the widgets back: once per frame it polls each mounted interactive node's widget activation latch (uiWidgetTakeActivated, the same latch SLButton and SLEntry expose) and, when a widget fired, builds the matching SLGuiEvent (CLICK for a button, SUBMIT for an entry, TOGGLE for a toggle — carrying the widget's current text/toggle state as the event value) and dispatches it through the DOM's SLGuiEventBus so the bound onClick/onSubmit/onToggle handlers fire. This is what turns a real user interaction into a SLeeLa event; the DOM stays authoritative for what the event means. Family: user-interface. The adapter crosses the `ui*` SLVM bridge inbound; dispatch and meaning stay SLeeLa-owned.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
dom | SLGuiDom dom | No description in source. |
mount | SLGuiMount mount | No description in source. |
factory | SLGuiWidgetFactory factory | No description in source. |
tick | int tick | monotonic frame counter stamped onto events |
raisedLast | int raisedLast | events raised on the last poll pass |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLGuiDom document, SLGuiMount mountEngine) | No description in source. |
poll | int poll() | Poll every mounted interactive node once; raise an SLGuiEvent for each that fired since the last poll. Returns the number of events dispatched. |
raiseFor | void raiseFor(SLGuiNode node, int widgetHandle) | Build and dispatch the event a fired widget implies. |
raiseInput | int raiseInput(String nodeId, String text) | Also feed a synthetic input event (per-keystroke) for an entry, used by a host that wants live INPUT handlers in addition to the committed SUBMIT. |
raisedCount | int raisedCount() | No description in source. |
frame | int frame() | No description in source. |
SLGuiMount #sleela 2.5 (lib/user-interface/SLGuiMount.sleela)
SLGuiMount class
Defines SLGuiMount — the reconciler that reflects the SLeeLa-owned DOM (SLGuiDom / SLGuiNode) onto real SleelaUI widgets. It mounts the tree depth-first (a parent is constructed before its children so each child has a real parent handle), records an id->widget-handle map, and on each pass applies every dirty node's state to its widget through the `ui*` built-ins: text (uiWidgetSetText), visibility (uiWidgetVisible), sensitivity (uiWidgetSensitive), and the style-derived accents (suggested/destructive) and minimum size. This is the one-way SLeeLa->toolkit half of the loop (SLGuiHostAdapter is the toolkit->SLeeLa half). The DOM stays the single source of truth; the widgets are its projection. Family: user-interface. The reconciler crosses the `ui*` SLVM bridge; SLeeLa owns the document it mirrors.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_NODES | static final int MAX_NODES = 65536 | No description in source. |
dom | SLGuiDom dom | No description in source. |
factory | SLGuiWidgetFactory factory | No description in source. |
ids | String[] ids | id -> widget handle map (parallel arrays). |
handles | int[] handles | No description in source. |
mapCount | int mapCount | No description in source. |
rootHandle | int rootHandle | the host-supplied root container the window gives us |
mounted | int mounted | total nodes mounted so far |
applied | int applied | dirty nodes applied on the last reconcile pass |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLGuiDom document, int windowRootHandle) | No description in source. |
handleOf | int handleOf(String id) | No description in source. |
record | void record(String id, int handle) | No description in source. |
indexOf | int indexOf(String id) | No description in source. |
isMounted | boolean isMounted(String id) | No description in source. |
mountAll | void mountAll() | Mount the whole document under the window root, depth-first. |
mountChildren | void mountChildren(SLGuiNode parent) | Recursively construct and mount every child of `parent`. |
mountNew | void mountNew() | Mount any nodes added since the last pass (nodes the DOM grew via script or SLeeLa after the initial mountAll). |
reconcile | int reconcile() | Push every dirty node's state onto its widget, then clear the dirty flag. Returns how many nodes were applied this pass. |
apply | void apply(SLGuiNode node) | Apply one node's state to its live widget via the `ui*` built-ins. |
mountedCount | int mountedCount() | No description in source. |
appliedLast | int appliedLast() | No description in source. |
labelFor | String labelFor(SLGuiNode node) | The construction label for a node: its text, or its "placeholder" attr for entries, or empty. |
intAttr | int intAttr(String s) | Parse a non-negative integer from a decimal string ("" / null -> 0). |
digit | int digit(String ch) | No description in source. |
SLGuiNode #sleela 2.5 (lib/user-interface/SLGuiNode.sleela)
SLGuiNode class
Defines SLGuiNode — a DHTML-style element node in the /lib/gui document model. Like a DOM element it has a tag (e.g. "window", "box", "button", "label", "entry"), a unique id, text content, a parent id, an ordered list of child ids, a flat attribute map, a flat style map, and a visibility/enabled state. SLeeLa code (or a script) manipulates the tree through these — setAttribute, setStyle, show/hide, enable/disable, setText — and the host reflects the node onto a real SleelaUI widget. A node carries an optional widget handle so a change can be pushed to the live control, but the node itself is the SLeeLa-owned source of truth. Family: user-interface. The DOM is SLeeLa-owned; the host mirrors it onto widgets.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_CHILDREN | static final int MAX_CHILDREN = 4096 | No description in source. |
MAX_PAIRS | static final int MAX_PAIRS = 64 | attributes / style entries per node |
id | String id | No description in source. |
tag | String tag | No description in source. |
textContent | String textContent | No description in source. |
parentId | String parentId | "" for the root |
childIds | String[] childIds | No description in source. |
childCount | int childCount | No description in source. |
attrNames | String[] attrNames | Attribute map (name -> value). |
attrValues | String[] attrValues | No description in source. |
attrCount | int attrCount | No description in source. |
styleProps | String[] styleProps | Style map (property -> value), the DHTML inline-style equivalent. |
styleValues | String[] styleValues | No description in source. |
styleCount | int styleCount | No description in source. |
visible | int visible | 1 = shown |
enabled | int enabled | 1 = sensitive |
widget | int widget | live SleelaUI widget handle (-1 = not mounted) |
dirty | int dirty | 1 when the host must re-sync this node |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String nodeId, String nodeTag, String parent) | No description in source. |
getId | String getId() | No description in source. |
getTag | String getTag() | No description in source. |
getParent | String getParent() | No description in source. |
setParent | void setParent(String p) | No description in source. |
appendChild | boolean appendChild(String childId) | ---- children ----------------------------------------------------------- |
removeChild | boolean removeChild(String childId) | No description in source. |
children | int children() | No description in source. |
childAt | String childAt(int i) | No description in source. |
setText | void setText(String t) | ---- text --------------------------------------------------------------- |
text | String text() | No description in source. |
setAttribute | void setAttribute(String name, String value) | ---- attributes --------------------------------------------------------- |
getAttribute | String getAttribute(String name) | No description in source. |
hasAttribute | boolean hasAttribute(String name) | No description in source. |
attrIndex | int attrIndex(String name) | No description in source. |
setStyle | void setStyle(String prop, String value) | ---- style (DHTML inline style) ----------------------------------------- |
getStyle | String getStyle(String prop) | No description in source. |
styleIndex | int styleIndex(String prop) | No description in source. |
styleEntries | int styleEntries() | No description in source. |
show | void show() | ---- visibility / enabled ----------------------------------------------- |
hide | void hide() | No description in source. |
isVisible | boolean isVisible() | No description in source. |
setEnabled | void setEnabled(boolean on) | No description in source. |
isEnabled | boolean isEnabled() | No description in source. |
mount | void mount(int widgetHandle) | ---- host mount --------------------------------------------------------- |
widgetHandle | int widgetHandle() | No description in source. |
mounted | boolean mounted() | No description in source. |
isDirty | boolean isDirty() | No description in source. |
clearDirty | void clearDirty() | No description in source. |
SLGuiScript #sleela 2.5 (lib/user-interface/SLGuiScript.sleela)
SLGuiScript class
Defines SLGuiScript — the scripting engine for /lib/gui. It holds an ordered list of SLGuiScriptCommands and runs them against an SLGuiDom (and, for the `call` verb, across the native boundary via SLGuiBridge). This is the "support for scripting" layer: a UI can be described and driven by a command list rather than hand-written SLeeLa, which is what makes DHTML-style authoring and tooling (serialising a UI, replaying interactions, data-driven screens) possible. The engine is deliberately NOT a general interpreter — it is a bounded, auditable verb list that only touches the SLeeLa-owned DOM/event bus and the documented operation bridge, so a script can never do more than the DOM API already allows. Family: user-interface. SLeeLa owns execution; scripts express UI intent declaratively.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_COMMANDS | static final int MAX_COMMANDS = 65536 | No description in source. |
commands | SLGuiScriptCommand[] commands | No description in source. |
count | int count | No description in source. |
dom | SLGuiDom dom | the document the script manipulates |
bridge | SLGuiBridge bridge | native boundary for the `call` verb (may be null) |
types | SLGuiEventType types | event-name -> ordinal |
pc | int pc | program counter of the last executed command |
executed | int executed | total commands executed |
lastError | String lastError | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLGuiDom document) | No description in source. |
attachBridge | void attachBridge(SLGuiBridge b) | Attach a created native bridge so `call` can cross to a SLeeLa operation. |
size | int size() | No description in source. |
add | SLGuiScriptCommand add(int verb, String a, String b, String c, String d) | No description in source. |
create | void create(String tag, String id, String parentId) | Typed builders (the common verbs) for readable script assembly. |
append | void append(String parentId, String childId) | No description in source. |
text | void text(String id, String value) | No description in source. |
attr | void attr(String id, String name, String value) | No description in source. |
style | void style(String id, String prop, String value) | No description in source. |
show | void show(String id) | No description in source. |
hide | void hide(String id) | No description in source. |
enable | void enable(String id, boolean on) | No description in source. |
on | void on(String id, String eventName, String op) | No description in source. |
fire | void fire(String id, String eventName, String value) | No description in source. |
call | void call(String operation, String arguments) | No description in source. |
remove | void remove(String id) | No description in source. |
run | int run() | Run the whole script top-down against the DOM. Returns the number of commands that executed successfully; stops and records lastError on the first command that fails. |
step | boolean step(SLGuiScriptCommand cmd) | Execute one command against the DOM / bridge. Returns false on failure. |
programCounter | int programCounter() | No description in source. |
executedCount | int executedCount() | No description in source. |
error | String error() | No description in source. |
ok | boolean ok() | No description in source. |
SLGuiScriptCommand #sleela 2.5 (lib/user-interface/SLGuiScriptCommand.sleela)
SLGuiScriptCommand class
Defines SLGuiScriptCommand — one instruction of a /lib/gui UI script. The scripting support is a small, safe, declarative command list (not an arbitrary interpreter): each command is a verb plus up to four string operands. The verbs mirror the DOM/event API so a script can build and drive an interface without native code — create, append, text, attr, style, show, hide, enable, on (bind a handler), fire (raise an event), and call (cross the native bridge to a SLeeLa operation). An ordinal verb keeps dispatch cheap; the operands are interpreted per verb by SLGuiScript. Family: user-interface. Scripts describe UI intent; SLeeLa (via SLGuiScript) executes it against the SLeeLa-owned DOM and event bus.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CREATE | static final int CREATE = 0 | Verb ordinals. create <tag> <id> [parentId] |
APPEND | static final int APPEND = 1 | append <parentId> <childId> |
TEXT | static final int TEXT = 2 | text <id> <value> |
ATTR | static final int ATTR = 3 | attr <id> <name> <value> |
STYLE | static final int STYLE = 4 | style <id> <prop> <value> |
SHOW | static final int SHOW = 5 | show <id> |
HIDE | static final int HIDE = 6 | hide <id> |
ENABLE | static final int ENABLE = 7 | enable <id> <"1"|"0"> |
ON | static final int ON = 8 | on <id> <eventName> <operation> |
FIRE | static final int FIRE = 9 | fire <id> <eventName> [value] |
CALL | static final int CALL =10 | call <operation> [arguments] |
REMOVE | static final int REMOVE =11 | remove <id> |
NOP | static final int NOP =12 | no-op / comment |
verb | int verb | No description in source. |
a | String a | operand 1 |
b | String b | operand 2 |
c | String c | operand 3 |
d | String d | operand 4 |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int v, String o1, String o2, String o3, String o4) | No description in source. |
getVerb | int getVerb() | No description in source. |
op1 | String op1() | No description in source. |
op2 | String op2() | No description in source. |
op3 | String op3() | No description in source. |
op4 | String op4() | No description in source. |
verbOf | int verbOf(String word) | Map a verb keyword to its ordinal (-1 when unknown). |
valid | boolean valid() | No description in source. |
SLGuiWidgetFactory #sleela 2.5 (lib/user-interface/SLGuiWidgetFactory.sleela)
SLGuiWidgetFactory class
Defines SLGuiWidgetFactory — the single place that knows how a DOM tag maps to a real SleelaUI widget. Given a node's tag and a parent widget handle it calls the matching `ui*` built-in (uiBox / uiButton / uiLabel / uiEntry / uiToggle / uiHeaderBar / uiStatusBar / ...) and returns the new widget handle, so the reconciler (SLGuiMount) never hard-codes toolkit knowledge. Tags mirror the SleelaUI vocabulary; an unknown tag falls back to a vertical box so an unrecognised element still has a container to hold children. This is the DOM->toolkit construction seam. Family: user-interface. The factory crosses the `ui*` SLVM bridge to the real toolkit; SLeeLa still owns the node that the widget mirrors.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ORIENT_VERTICAL | static final int ORIENT_VERTICAL = 0 | Orientation ordinals (mirror SLUIOrientation / SLWidget). |
ORIENT_HORIZONTAL | static final int ORIENT_HORIZONTAL = 1 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
construct | int construct(int parentHandle, String tag, String label) | Construct the widget for `node` inside `parentHandle`. Returns the new widget handle, or -1 when it could not be created. `label` is the node's initial text/placeholder (empty string when it has none). |
interactive | boolean interactive(String tag) | Is this tag an interactive control the host should poll for activations? |
activationEvent | int activationEvent(String tag) | Which SLGuiEventType an activation on this tag should raise. Buttons -> CLICK; entries -> SUBMIT (Enter); toggles -> TOGGLE. |
isContainer | boolean isContainer(String tag) | No description in source. |
SLHeaderBar #sleela 2.5 (lib/user-interface/SLHeaderBar.sleela)
SLHeaderBar class extends SLWidget
Defines SLHeaderBar — a SleelaUI title-bar strip: a horizontal box that also paints the chrome fill and a 1px bottom hairline, the quiet frame edge of a window. It is where a brand label, a spacer, and action buttons (e.g. a settings gear) typically live. The constructor bottoms out in the `uiHeaderBar` built-in, which calls the SleelaUI C ABI slui_header_bar(). An SLHeaderBar IS an SLWidget and behaves like a horizontal SLBox for the purpose of adding children. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a header bar inside `parent` (normally the window root). |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
SLHeading #sleela 2.5 (lib/user-interface/SLHeading.sleela)
SLHeading class extends SLWidget
Defines SLHeading — a SleelaUI title label drawn at a larger point size than body text, used for section and page headings. The constructor bottoms out in the `uiHeading` built-in (SleelaUI C ABI slui_heading()); the text is updated through the inherited setText(). An SLHeading IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text, int sizePt) | Create a heading inside `parent` with text at a point size (e.g. 16, 20). |
createInHandle | void createInHandle(int parentHandle, String text, int sizePt) | No description in source. |
SLIcon #sleela 2.5 (lib/user-interface/SLIcon.sleela)
SLIcon class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
pathValue | String pathValue | No description in source. |
symbolValue | String symbolValue | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String assetPath, String symbolName) | No description in source. |
assetPath | String assetPath() | No description in source. |
symbolName | String symbolName() | No description in source. |
SLImage #sleela 2.5 (lib/user-interface/SLImage.sleela)
SLImage class extends SLWidget
Defines SLImage — a SleelaUI image/icon tile: a rounded surface of a fixed size with a centred glyph, used as a picture or icon placeholder in a layout. The constructor bottoms out in the `uiImage` built-in (SleelaUI C ABI slui_image()); the glyph is updated through the inherited setText(). An SLImage IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String glyph, int width, int height) | Create an image tile inside `parent` with a centred glyph and a size. |
createInHandle | void createInHandle(int parentHandle, String glyph, int width, int height) | No description in source. |
SLInfoBar #sleela 2.5 (lib/user-interface/SLInfoBar.sleela)
SLInfoBar class extends SLWidget
Defines SLInfoBar — a SleelaUI inline notice bar: a tinted, rounded surface strip with a left severity bar and a message, used for non-modal feedback (info, warning, error). The constructor bottoms out in the `uiInfoBar` built-in (SleelaUI C ABI slui_info_bar()); the message is updated through the inherited setText(). An SLInfoBar IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
INFO | static final int INFO = 0 | Severity ordinals (mirror InfoBar::Severity in the toolkit). |
WARNING | static final int WARNING = 1 | No description in source. |
ERROR | static final int ERROR = 2 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text, int severity) | Create an info bar inside `parent` with a message and a severity. |
createInHandle | void createInHandle(int parentHandle, String text, int severity) | No description in source. |
info | void info(SLWidget parent, String text) | No description in source. |
warning | void warning(SLWidget parent, String text) | No description in source. |
error | void error(SLWidget parent, String text) | No description in source. |
SLLabel #sleela 2.5 (lib/user-interface/SLLabel.sleela)
SLLabel class extends SLWidget
Defines SLLabel — a SleelaUI text label: a non-interactive run of text drawn in the theme's primary (or dim, when insensitive) colour. The constructor bottoms out in the `uiLabel` built-in, which calls the SleelaUI C ABI slui_label(); the text is updated through the inherited setText(). An SLLabel IS an SLWidget, so it carries margin and alignment; set its horizontal alignment to START/CENTER/END to place the text within its cell. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text) | Create a label inside `parent` with initial text. |
createInHandle | void createInHandle(int parentHandle, String text) | No description in source. |
SLLayout #sleela 2.5 (lib/user-interface/SLLayout.sleela)
SLLayout class
Defines SLLayout — a flow/layout manager for the SleelaUI. It treats a UI as an ORTHOGONAL CONFLATION of unit parts (what each item measures) and organizations (how items are grouped and flowed): items have NAMES, groups have NAMES, and you adjust a single named item, a whole named group, or an N-ARY selection (any subset of a group of some size). Several flow solutions arrange a group: STACK, WRAP, GRID, DOCK, and CENTRAL (weight/mass packing). Placement is Named for the ergonomics of publics — MEDIUM implies CENTER and CENTRAL implies weight/mass — and named ergonomic presets tune a group for a common public use. Each method bottoms out in a `layout*` SLVM built-in calling the C ABI (sleela_ui_layout.h). A layout is a VM-local handle (-1 = none). Sizes are SLMeasure values (US/metric/px). After adjustment call arrange(), then read item rects. Family: user-interface. Native VM/UI work crosses the explicit `layout*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
FLOW_STACK | static final int FLOW_STACK = 0 | Flow ordinals (mirror SLUIFlowKind) — several layout solutions. one row/column (the box model) |
FLOW_WRAP | static final int FLOW_WRAP = 1 | wraps to new lines when full |
FLOW_GRID | static final int FLOW_GRID = 2 | fixed-column grid |
FLOW_DOCK | static final int FLOW_DOCK = 3 | edges dock, centre fills |
FLOW_CENTRAL | static final int FLOW_CENTRAL = 4 | weight/mass packing |
AXIS_HORIZONTAL | static final int AXIS_HORIZONTAL = 0 | Axis ordinals (mirror SLUIAxis). |
AXIS_VERTICAL | static final int AXIS_VERTICAL = 1 | No description in source. |
START | static final int START = 0 | Placement ordinals (mirror SLUIPlacement). The ergonomics of publics, Named: MEDIUM is center; CENTRAL is weight/mass. |
MEDIUM | static final int MEDIUM = 1 | implies CENTER |
END | static final int END = 2 | No description in source. |
FILL | static final int FILL = 3 | No description in source. |
CENTRAL | static final int CENTRAL = 4 | implies weight/mass |
ERGO_READING | static final int ERGO_READING = 0 | Named ergonomic presets (mirror SLUIErgonomics). |
ERGO_GALLERY | static final int ERGO_GALLERY = 1 | No description in source. |
ERGO_DASHBOARD | static final int ERGO_DASHBOARD = 2 | No description in source. |
ERGO_CONSOLE | static final int ERGO_CONSOLE = 3 | No description in source. |
ERGO_PORTRAIT | static final int ERGO_PORTRAIT = 4 | No description in source. |
ERGO_TOOLBAR | static final int ERGO_TOOLBAR = 5 | No description in source. |
layout | int layout | VM-local handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create() | No description in source. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
setDpi | void setDpi(double dpi) | No description in source. |
setEm | void setEm(double emPx) | No description in source. |
group | int group(String groupName, int flow, int axis) | ---- groups (named) ----------------------------------------------------- |
groupCount | int groupCount() | No description in source. |
setFlow | void setFlow(String groupName, int flow, int axis) | No description in source. |
setSpacing | void setSpacing(String groupName, SLMeasure spacing) | No description in source. |
setPadding | void setPadding(String groupName, SLMeasure padding) | No description in source. |
setAlign | void setAlign(String groupName, int mainAlign, int crossAlign) | No description in source. |
setColumns | void setColumns(String groupName, int columns) | No description in source. |
setErgonomics | void setErgonomics(String groupName, int ergo) | A named ergonomic preset for the ergonomics of publics. |
item | int item(String groupName, String itemName, int widgetHandle, SLMeasure size) | ---- items (named) ------------------------------------------------------ Add a named item (an optional widget handle, -1 for a pure placeholder) into a named group, with a main-axis size (fr makes it flexible). |
itemCount | int itemCount(String groupName) | No description in source. |
setItemSize | void setItemSize(String itemName, SLMeasure size) | ---- adjustment: single ------------------------------------------------ |
setItemMass | void setItemMass(String itemName, double mass) | No description in source. |
setItemAlign | void setItemAlign(String itemName, int crossAlign) | No description in source. |
setGroupSize | void setGroupSize(String groupName, SLMeasure size) | ---- adjustment: whole group ------------------------------------------- |
setGroupMass | void setGroupMass(String groupName, double mass) | No description in source. |
setNarySize | void setNarySize(String[] itemNames, int count, SLMeasure size) | ---- adjustment: n-ary (a subset of a group of some size) -------------- `itemNames` is an array of the names to adjust; count its length. |
setNaryMass | void setNaryMass(String[] itemNames, int count, double mass) | No description in source. |
setNaryAlign | void setNaryAlign(String[] itemNames, int count, int crossAlign) | No description in source. |
arrange | void arrange(String groupName, int x, int y, int w, int h) | ---- resolution --------------------------------------------------------- Lay a named group out within a device-pixel rectangle; then read item rects with itemX/itemY/itemWidth/itemHeight. |
itemX | int itemX(String itemName) | No description in source. |
itemY | int itemY(String itemName) | No description in source. |
itemWidth | int itemWidth(String itemName) | No description in source. |
itemHeight | int itemHeight(String itemName) | No description in source. |
SLLevelBar #sleela 2.5 (lib/user-interface/SLLevelBar.sleela)
SLLevelBar class extends SLWidget
Defines SLLevelBar — a SleelaUI segmented level indicator (battery/volume style): a row of ten segments, the leading ones lit in the accent colour in proportion to a fraction in [0,1]. Use it for a discrete "how full / how strong" reading. The constructor bottoms out in the `uiLevelBar` built-in (SleelaUI C ABI slui_level_bar()); the fraction is read/written through level()/setLevel(). An SLLevelBar IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, double level) | Create a level bar inside `parent` with an initial level in [0,1]. |
createInHandle | void createInHandle(int parentHandle, double level) | No description in source. |
level | double level() | No description in source. |
setLevel | void setLevel(double level) | No description in source. |
SLLight #sleela 2.5 (lib/user-interface/SLLight.sleela)
SLLight class
Defines SLLight — a SleelaUI light descriptor used to light and relieve Canvas-aware objects. A light has a KIND (point, directional, ambient), a ROLE, a POLARITY, a position/direction, a reach, an intensity, a softness (penumbra width), and a colour. It is a pure value object the host fills and hands to an SLLightScene; the scene decides whether it is a SOURCE (reserves an anchor object — the object is used as the light) or an EMITTER (reserves nothing, reusable). Both light and shadow come from either a source or an emitter: the POLARITY decides whether the emission brightens (light) or darkens (shadow/umbra). Family: user-interface. Mirrors SLUILight in the SleelaUI Lighting C ABI (sleela_ui_light.h).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
POINT | static final int POINT = 0 | Kind ordinals (mirror SLUILightKind). |
DIRECTIONAL | static final int DIRECTIONAL = 1 | No description in source. |
AMBIENT | static final int AMBIENT = 2 | No description in source. |
SOURCE | static final int SOURCE = 0 | Role ordinals (mirror SLUILightRole). reserves its anchor object (object USED) |
EMITTER | static final int EMITTER = 1 | reserves nothing; reusable |
LIGHT | static final int LIGHT = 0 | Polarity ordinals (mirror SLUIPolarity). brightens |
SHADOW | static final int SHADOW = 1 | darkens (umbra emission) |
kind | int kind | No description in source. |
role | int role | No description in source. |
polarity | int polarity | No description in source. |
radius | double radius | point reach in px (0 = infinite) |
intensity | double intensity | 0..N emission multiplier |
softness | double softness | 0..1 penumbra width for cast shadows |
color | int color | 0xRRGGBBAA emission (shadow colour if SHADOW) |
anchor | int anchor | for a SOURCE: the reserved anchor id |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
point | void point(double px, double py, double reach, double i, int c) | A point light at (x,y) reaching `radius` px, with an intensity + colour. |
directional | void directional(double ux, double uy, double i, int c) | A directional "sun" travelling along (ux,uy). |
ambient | void ambient(double i, int c) | A uniform ambient fill. |
asShadow | void asShadow() | Turn this light into a shadow (negative-polarity) emission. |
asLight | void asLight() | Turn this light into a light (positive-polarity) emission. |
SLLightScene #sleela 2.5 (lib/user-interface/SLLightScene.sleela)
SLLightScene class
Defines SLLightScene — a collection of SleelaUI lights applied to a draw context to light and relieve Canvas-aware objects. The scene owns the SOURCE RESERVATION table: an anchor object can be used as a source at most once (addSource refuses a second), while EMITTERS reserve nothing and may be added freely and reused. It also holds the base ambient illumination so even an unlit object is not pure black. Each method bottoms out in a `light*` SLVM built-in that calls the SleelaUI Lighting C ABI (sleela_ui_light.h). A scene is a VM-local handle (-1 = none). An SLLight is passed by its descriptor fields through the built-ins. Family: user-interface. Native VM/UI work crosses the explicit `light*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
scene | int scene | VM-local scene handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create() | No description in source. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
clear | void clear() | No description in source. |
count | int count() | No description in source. |
addEmitter | int addEmitter(SLLight l) | Add an EMITTER (reserves nothing). Returns its index (>=0), reusable. |
addSource | int addSource(int anchor, SLLight l) | Add a SOURCE bound to `anchor` (reserves it; the object is USED as a source). Returns the light index (>=0), or a negative error if `anchor` is already reserved by another source in this scene. |
anchorReserved | boolean anchorReserved(int anchor) | True if `anchor` is currently reserved as a source in this scene. |
releaseSource | void releaseSource(int anchor) | Release a source's reservation so the anchor can be a source again. |
setAmbient | void setAmbient(double intensity, int color) | The base ambient illumination applied before any light. |
SLLinkButton #sleela 2.5 (lib/user-interface/SLLinkButton.sleela)
SLLinkButton class extends SLWidget
Defines SLLinkButton — a SleelaUI hyperlink-style button: accent-coloured text that underlines on hover/focus and activates like a button (click, or Enter/Space while focused). Use it for navigation and "learn more" affordances where a full button would be too heavy. The constructor bottoms out in the `uiLinkButton` built-in (SleelaUI C ABI slui_link_button()); the text is updated through the inherited setText(). An SLLinkButton IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String label) | Create a link button inside `parent` with a label. |
createInHandle | void createInHandle(int parentHandle, String label) | No description in source. |
clicked | boolean clicked() | True if the link was activated since the last check (latch cleared on read). |
SLLoadingDemo #sleela 2.5 (lib/user-interface/SLLoadingDemo.sleela)
SLLoadingDemo class
Defines SLLoadingDemo — a worked, runnable example that builds a Slick Black window from pure SLeeLa source showing the activity family: a flowing SLThrobber, an arc SLSpinner, a determinate SLProgressBar, and the unified SLLoadingIndicator stepping from an indeterminate "Resolving…" phase into a determinate "Compiling… NN%" phase and finally done(). It is the SLeeLa-source twin of the gallery, proving the loading indicators are fully usable from the language itself. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ui | SLUserInterface ui | No description in source. |
win | SLWindow win | No description in source. |
loader | SLLoadingIndicator loader | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
run | int run() | No description in source. |
SLLoadingIndicator #sleela 2.5 (lib/user-interface/SLLoadingIndicator.sleela)
SLLoadingIndicator class extends SLWidget
Defines SLLoadingIndicator — a SleelaUI composite "loading" widget that unifies the three activity primitives behind one caption, with no new C ABI. It is a horizontal row of {activity visual, caption label} that switches between two modes: - INDETERMINATE (unknown length): shows an SLThrobber (the water-flow field) or an SLSpinner (the accent arc), advanced each frame by the window loop / a host phase; - DETERMINATE (known length): shows an SLProgressBar filled to a fraction in [0,1], with the caption optionally carrying a percentage. A task begins indeterminate ("Resolving…"), may switch to determinate once a total is known ("Compiling… 60%"), and ends with done()/fail() which hide the activity visual and set a final caption. This is the IDE-friendly loading indicator built from SLThrobber + SLSpinner + SLProgressBar. An SLLoadingIndicator IS an SLWidget container (its handle is the row box). Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODE_IDLE | static final int MODE_IDLE = 0 | Mode ordinals. |
MODE_INDETERMINATE | static final int MODE_INDETERMINATE = 1 | No description in source. |
MODE_DETERMINATE | static final int MODE_DETERMINATE = 2 | No description in source. |
MODE_DONE | static final int MODE_DONE = 3 | No description in source. |
MODE_FAILED | static final int MODE_FAILED = 4 | No description in source. |
STYLE_THROBBER | static final int STYLE_THROBBER = 0 | Which indeterminate visual to use. the water-flow field (default) |
STYLE_SPINNER | static final int STYLE_SPINNER = 1 | the accent arc on a ring |
row | SLBox row | horizontal: [visual] [caption] |
throbber | SLThrobber throbber | indeterminate (STYLE_THROBBER) |
spinner | SLSpinner spinner | indeterminate (STYLE_SPINNER) |
bar | SLProgressBar bar | determinate |
caption | SLLabel caption | the status text |
style | int style | STYLE_THROBBER | STYLE_SPINNER |
mode | int mode | No description in source. |
fraction | double fraction | current determinate fraction [0,1] |
phase | double phase | current indeterminate phase [0,1] |
showPercent | boolean showPercent | append " NN%" to the caption in determinate mode |
baseCaption | String baseCaption | the caption text without any appended percentage |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int style0, int visualWidth) | Create the indicator inside `parent`. style picks the indeterminate visual; visualWidth sizes the throbber (ignored for the spinner). |
beginIndeterminate | void beginIndeterminate(String text) | Begin an indeterminate task of unknown length. |
beginDeterminate | void beginDeterminate(String text, double initial) | Begin (or switch to) a determinate task; `initial` is the starting [0,1]. |
setFraction | void setFraction(double value) | Update determinate progress; clamps to [0,1] and refreshes the caption. |
getFraction | double getFraction() | No description in source. |
tick | void tick(double delta) | Advance the indeterminate visual (host calls this each frame; phase wraps). |
done | void done(String text) | Finish successfully: hide the activity visual, set a final caption. |
fail | void fail(String text) | Finish with an error: hide the activity visual, set a failure caption. |
reset | void reset() | Reset to idle (hidden). |
currentMode | int currentMode() | No description in source. |
busy | boolean busy() | No description in source. |
finished | boolean finished() | No description in source. |
failed | boolean failed() | No description in source. |
setStyle | void setStyle(int style0) | Choose the indeterminate visual (throbber vs spinner) at any time. |
setShowPercent | void setShowPercent(boolean on) | Whether to append a percentage to the determinate caption. |
setCaption | void setCaption(String text) | Set the base caption text (without any appended percentage). |
applyMode | void applyMode() | Show exactly the visual the current mode needs; hide the rest. |
refreshCaption | void refreshCaption() | Rebuild the caption, appending " NN%" in determinate mode when enabled. |
percentText | String percentText(double f) | fraction[0,1] -> integer percent 0..100 without a float->int cast. |
clamp01 | double clamp01(double v) | No description in source. |
SLMaterial #sleela 2.5 (lib/user-interface/SLMaterial.sleela)
SLMaterial class
Defines SLMaterial — how a Canvas-aware object catches light. The RELIEF profile is a height model the lighting uses to compute surface normals, which is what produces the raised/recessed "quality relief": a smooth dome (ROUNDED), a crisp chamfer (BEVEL), an inset the shape reads as pressed INTO the floor (ENGRAVED), or a raised plateau standing OFF the floor (EMBOSSED). It also carries depth (how pronounced), gloss (specular sheen), occlusion (how much darkness pools in the creases), and the edge band width. It is a pure value object passed to SLLightScene painting helpers and to a canvas widget's light attachment. Family: user-interface. Mirrors SLUIMaterial in the SleelaUI Lighting C ABI.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
FLAT | static final int FLAT = 0 | Relief-profile ordinals (mirror SLUIReliefProfile). |
ROUNDED | static final int ROUNDED = 1 | No description in source. |
BEVEL | static final int BEVEL = 2 | No description in source. |
ENGRAVED | static final int ENGRAVED = 3 | No description in source. |
EMBOSSED | static final int EMBOSSED = 4 | No description in source. |
profile | int profile | No description in source. |
depth | double depth | relief height in px |
gloss | double gloss | 0 matte .. 1 mirror (specular sheen) |
occlusion | double occlusion | 0..1 ambient-occlusion darkening in the creases |
edgePx | double edgePx | bevel/edge band width in px |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | void of(int reliefProfile, double reliefDepth) | Fill a material for a profile at a given relief depth, with sensible defaults for gloss/occlusion/edge the host may then tune. |
rounded | void rounded(double depth) | Common relief shorthands. |
bevel | void bevel(double depth) | No description in source. |
engraved | void engraved(double depth) | No description in source. |
embossed | void embossed(double depth) | No description in source. |
SLMeasure #sleela 2.5 (lib/user-interface/SLMeasure.sleela)
SLMeasure class
Defines SLMeasure — a standardized unit of measurement for the SleelaUI layout system, spanning US customary (inch, foot, point, pica), Eurasian metric (mm, cm, m), device pixels (px), and relative units (percent, flexible fraction fr, em). A measure is a (value, unit) pair that resolves to device pixels at a DPI — one vocabulary across US and Eurasian countries, with px available of course. It is a pure value helper mirroring SLUIMeasure in the SleelaUI Layout C ABI (sleela_ui_layout.h). Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PX | static final int PX = 0 | Unit ordinals (mirror SLUIUnitKind). device pixels |
MM | static final int MM = 1 | millimetre (metric) |
CM | static final int CM = 2 | centimetre (metric) |
M | static final int M = 3 | metre (metric) |
IN | static final int IN = 4 | inch (US) |
FT | static final int FT = 5 | foot (US) |
PT | static final int PT = 6 | typographic point (US, 1/72in) |
PICA | static final int PICA = 7 | pica (US, 12pt) |
PCT | static final int PCT = 8 | percent of the reference extent |
FR | static final int FR = 9 | flexible fraction / weight share |
EM | static final int EM = 10 | multiples of the base font size |
value | double value | No description in source. |
unit | int unit | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | void of(double v, int u) | No description in source. |
px | void px(double v) | US customary + metric + device + relative builders. |
mm | void mm(double v) | No description in source. |
cm | void cm(double v) | No description in source. |
meters | void meters(double v) | No description in source. |
inch | void inch(double v) | No description in source. |
feet | void feet(double v) | No description in source. |
points | void points(double v) | No description in source. |
pica | void pica(double v) | No description in source. |
percent | void percent(double v) | No description in source. |
fraction | void fraction(double v) | No description in source. |
em | void em(double v) | No description in source. |
toPixels | double toPixels(double dpi, double referencePx, double emPx) | Resolve to device pixels at `dpi`, with a reference extent (for percent) and em size (for em). |
isFlexible | boolean isFlexible() | No description in source. |
SLMm #sleela 2.5 (lib/user-interface/SLMm.sleela)
SLMm class
Defines SLMm — a millimetre placement for a SleelaUI light/dark/ shadow emitter, relative to the text's font-paint location. It holds a left/right offset, an up/down offset, and a HEIGHT the light shines down from, all in millimetres, and converts to device pixels at a DPI. This is the mm-precise placement the lighting design calls for: the light shines down from some mm of height, and left/right/up/down are all supported. Mirrors SLUIMm in the SleelaUI Mood/Light C ABI (sleela_ui_mood.h). SLMm is a pure value helper (no VM handle); feed it to SLMood.placeLight or the `light*` built-ins. Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
rightMm | double rightMm | +right, -left |
downMm | double downMm | +down, -up |
heightMm | double heightMm | above the plane the light shines down from |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
of | void of(double right, double down, double height) | No description in source. |
left | void left(double mm, double height) | No description in source. |
right | void right(double mm, double height) | No description in source. |
up | void up(double mm, double height) | No description in source. |
down | void down(double mm, double height) | No description in source. |
toPixels | double toPixels(double mm, double dpi) | Millimetres to device pixels at `dpi` (25.4 mm per inch). |
SLMood #sleela 2.5 (lib/user-interface/SLMood.sleela)
SLMood class
Defines SLMood — a named, adjustable SleelaUI mood: an Excellent Wash + a natural tanor + a Calculus-8, together. The mood's colour is the wash sampled at the calculus's mood scalar, freshened over time by the tanor's refresh and its gentle "a little left" bias. A tanor is a soft, portrait-quality ambient glow for "lightless bulbs" (light-of-effect with no hard source). Applying a mood to a light sets its colour and folds in the tanor's portrait softness/depth — so inputs flow into direct moods in one call. Each method bottoms out in a `mood*`/`light*` SLVM built-in calling the C ABI (sleela_ui_mood.h). A mood is a VM-local handle (-1 = none). Family: user-interface. Native VM/UI work crosses the explicit `mood*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CALM | static final int CALM = 0 | Mood-kind ordinals (mirror SLUIMoodKind). |
WARM | static final int WARM = 1 | No description in source. |
COOL | static final int COOL = 2 | No description in source. |
VIVID | static final int VIVID = 3 | No description in source. |
SOMBER | static final int SOMBER = 4 | No description in source. |
TENDER | static final int TENDER = 5 | No description in source. |
RADIANT | static final int RADIANT = 6 | No description in source. |
CUSTOM | static final int CUSTOM = 7 | No description in source. |
SOURCE | static final int SOURCE = 0 | Role/polarity ordinals (mirror the Lighting C ABI) for placeLight. |
EMITTER | static final int EMITTER = 1 | No description in source. |
LIGHT | static final int LIGHT = 0 | No description in source. |
SHADOW | static final int SHADOW = 1 | No description in source. |
mood | int mood | VM-local handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | void create(int kind) | Create a mood from a built-in kind (pre-filled tasteful wash + tanor) or CUSTOM to set your own. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
setWash | void setWash(SLWash wash) | Give the mood an Excellent Wash and a Calculus-8 (borrowed). |
setCalculus | void setCalculus(SLCalculus8 calc) | No description in source. |
setTanor | void setTanor(double warmth, double diffusion, double refreshHz, | Configure the natural tanor (lightless-bulb glow): warmth 0 cool..1 warm, diffusion 0..1 portrait softness, refreshHz pattern refresh, leftBias "a little left", depth 0..1, tone 0xRRGGBBAA. |
color | int color(double timeS) | The mood's current colour, freshened at time_s seconds (0xRRGGBBAA). |
placeLight | int placeLight(SLLightScene scene, double fontX, double fontBaseline, | Build a mm-placed, mood-coloured light for text painted at (fontX, fontBaseline). mm places it (height it shines down from, plus left/right/up/down); dpi resolves mm to pixels; role/polarity choose source vs emitter and light vs shadow. Adds it to `scene` and returns the light index (or a negative error). |
SLNotebook #sleela 2.5 (lib/user-interface/SLNotebook.sleela)
SLNotebook class extends SLWidget
Defines SLNotebook — a browser-style horizontal tab strip and page stack. It uses themed native buttons, selected accent, quiet inactive tabs, a compact strip, and a clearly separated content region. A dirty marker can be shown per tab (e.g. an unsaved editor). Pointer hover/press visuals are provided by the native Button widget; clicked() is the one-shot release-on- target activation latch. This stays in SLeeLa over SleelaUI primitives. An SLNotebook IS an SLWidget container. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_PAGES | static final int MAX_PAGES = 4096 | No description in source. |
column | SLBox column | vertical: tab strip over the content area |
strip | SLBox strip | horizontal tab strip |
stack | SLBox stack | the content area (one page visible at a time) |
tabs | SLButton[] tabs | one tab button per page |
pages | SLBox[] pages | one content container per page |
titles | String[] titles | base tab titles (without the dirty marker) |
dirty | boolean[] dirty | per-page dirty flag (adds a '*' to the tab) |
count | int count | No description in source. |
active | int active | active page index, -1 when empty |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | No description in source. |
addPage | int addPage(String title) | Add a page with a tab title; returns the page index. The returned page's content() is the container child widgets attach to. |
pageContent | SLWidget pageContent(int index) | The content container for page `index` (attach children with createIn). |
select | void select(int index) | Show page `index`, hide the rest, accent its tab. |
activeIndex | int activeIndex() | No description in source. |
selectPrevious | void selectPrevious() | Browser-style convenience: activate the previous or next tab. |
selectNext | void selectNext() | No description in source. |
takeClickedTab | int takeClickedTab() | Poll the tab strip: if a tab was clicked since the last check, make it active and return its index; otherwise return -1. |
setDirty | void setDirty(int index, boolean isDirty) | Mark a page dirty/clean; refreshes its tab label with a '*' suffix. |
isDirty | boolean isDirty(int index) | No description in source. |
setTitle | void setTitle(int index, String title) | Rename a tab (keeps the current dirty marker). |
pageCount | int pageCount() | No description in source. |
SLPackage #sleela 2.5 (lib/user-interface/SLPackage.sleela)
SLPackage class
Defines the SLeeLa standard-library package for user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean available() | No description in source. |
SLPasswordEntry #sleela 2.5 (lib/user-interface/SLPasswordEntry.sleela)
SLPasswordEntry class extends SLWidget
Defines SLPasswordEntry — a SleelaUI password field: a single-line entry that renders a bullet dot for each character instead of the character itself, used for secret input. It behaves like SLEntry otherwise (UTF-8 editing, caret, Enter raises an activate event); the underlying text is still readable through text() so the host can submit it. The constructor bottoms out in the `uiPasswordEntry` built-in (SleelaUI C ABI slui_password_entry()). An SLPasswordEntry IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String placeholder) | Create a password entry inside `parent` (placeholder defaults to "Password"). |
createInHandle | void createInHandle(int parentHandle, String placeholder) | No description in source. |
submitted | boolean submitted() | True if Enter was pressed since the last check (latch cleared on read). |
SLProgressBar #sleela 2.5 (lib/user-interface/SLProgressBar.sleela)
SLProgressBar class extends SLWidget
Defines SLProgressBar — a SleelaUI determinate progress bar: a rounded trough with an accent fill proportional to a fraction in [0,1]. Use it to show how far a known-length task has advanced. The constructor bottoms out in the `uiProgressBar` built-in (SleelaUI C ABI slui_progress_bar()); the fraction is read/written through fraction()/setFraction(). An SLProgressBar IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, double fraction) | Create a progress bar inside `parent` with an initial fraction in [0,1]. |
createInHandle | void createInHandle(int parentHandle, double fraction) | No description in source. |
fraction | double fraction() | No description in source. |
setFraction | void setFraction(double fraction) | No description in source. |
SLRadioButton #sleela 2.5 (lib/user-interface/SLRadioButton.sleela)
SLRadioButton class extends SLWidget
Defines SLRadioButton — a SleelaUI labelled radio button: a circle with an accent dot when selected. Radio buttons that share a group ordinal AND the same parent are mutually exclusive — selecting one clears the others in its group. Selecting (click, or Space/Enter while focused) raises an activate event. The constructor bottoms out in the `uiRadioButton` built-in (SleelaUI C ABI slui_radio_button()); the state is read through isSelected(). An SLRadioButton IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String label, int group, boolean selected) | Create a radio inside `parent`, in exclusivity `group`, with a label and initial selected state. |
createInHandle | void createInHandle(int parentHandle, String label, int group, | No description in source. |
isSelected | boolean isSelected() | No description in source. |
select | void select() | No description in source. |
changed | boolean changed() | True if this radio was just selected since the last check (latch cleared). |
SLScrollBar #sleela 2.5 (lib/user-interface/SLScrollBar.sleela)
SLScrollBar class extends SLWidget
Defines SLScrollBar — a SleelaUI scroll bar indicator: a thin rounded track with a draggable thumb. The thumb covers a `page` fraction of the track and sits at a `value` position in [0,1]; dragging it reports a new value. The constructor bottoms out in the `uiScrollBar` built-in (SleelaUI C ABI slui_scroll_bar()); the position is read/written through position()/setPosition(). An SLScrollBar IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int orientation, double value, double page) | Create a scroll bar inside `parent`. orientation is ORIENT_VERTICAL or ORIENT_HORIZONTAL; value is the initial position in [0,1]; page is the visible fraction the thumb covers (0..1). |
createInHandle | void createInHandle(int parentHandle, int orientation, double value, | No description in source. |
position | double position() | No description in source. |
setPosition | void setPosition(double value) | No description in source. |
changed | boolean changed() | True if the position changed since the last check (latch cleared on read). |
SLScrollView #sleela 2.5 (lib/user-interface/SLScrollView.sleela)
SLScrollView class extends SLWidget
Defines SLScrollView — a SleelaUI scrollable viewport. It is a composite SleelaUI widget (it adds no new C ABI): a vertical content box held inside a clipping frame, with an SLScrollBar on the needed axes. The content box is the parent handle children attach to; the view tracks the content's natural extent against the viewport extent and only shows a bar when the content overflows. Scroll position is reported in [0,1] by the bars and converted to a pixel offset the toolkit applies to the content. An SLScrollView IS an SLWidget container built from SLFrame + SLBox + SLScrollBar, so any widget set (a tree, a list, a text view) becomes scrollable by being built into its content(). Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
clip | SLFrame clip | the clipping viewport |
layout | SLBox layout | horizontal: content column + vertical scrollbar |
content | SLBox content | the vertical content column children attach to |
vbar | SLScrollBar vbar | vertical scrollbar (shown only when overflowing) |
hbar | SLScrollBar hbar | horizontal scrollbar (optional) |
contentExtent | int contentExtent | natural content height in pixels |
viewportExtent | int viewportExtent | visible viewport height in pixels |
horizontal | boolean horizontal | whether a horizontal bar is enabled |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, boolean horizontalBar) | Create a scroll view inside `parent`. horizontalBar enables the x-axis bar. |
contentArea | SLWidget contentArea() | The container children attach to (via createIn(scroll.content(), ...)). |
setExtents | void setExtents(int content_px, int viewport_px) | Tell the view how tall its content and viewport are so it can size the thumb (page fraction) and decide whether the bar is needed. |
overflowing | boolean overflowing() | Whether the content currently overflows the viewport (bar is meaningful). |
scrollOffset | int scrollOffset() | Current vertical scroll offset in pixels, derived from the bar position. The position is a [0,1] double; we convert through a permille integer so the result stays in integer pixel space with no float->int cast. |
positionPermille | int positionPermille() | The bar position in integer permille (0..1000), i.e. floor(position*1000). |
scrollToPixel | void scrollToPixel(int y) | Scroll so the pixel row `y` is visible (used by tree/list/text to follow the caret or selection). |
scrolled | boolean scrolled() | True if the user moved either bar since the last check. |
clamp01 | double clamp01(double v) | No description in source. |
SLSearchEntry #sleela 2.5 (lib/user-interface/SLSearchEntry.sleela)
SLSearchEntry class extends SLWidget
Defines SLSearchEntry — a SleelaUI search field: a single-line entry with a leading magnifier glyph and a "Search" placeholder, used for filter/search inputs. It behaves like SLEntry otherwise (UTF-8 editing, caret, Enter raises an activate event). The constructor bottoms out in the `uiSearchEntry` built-in (SleelaUI C ABI slui_search_entry()); the committed text is read/written through the inherited text()/setText(). An SLSearchEntry IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String placeholder) | Create a search entry inside `parent` (placeholder defaults to "Search"). |
createInHandle | void createInHandle(int parentHandle, String placeholder) | No description in source. |
submitted | boolean submitted() | True if Enter was pressed since the last check (latch cleared on read). |
SLSeparator #sleela 2.5 (lib/user-interface/SLSeparator.sleela)
SLSeparator class extends SLWidget
Defines SLSeparator — a SleelaUI 1px hairline rule in the theme's border colour, used to divide sections of a layout. It can be horizontal (a full-width rule in a vertical box) or vertical (a full-height rule in a horizontal box). The constructor bottoms out in the `uiSeparator` built-in, which calls the SleelaUI C ABI slui_separator(). An SLSeparator IS an SLWidget but is non-interactive and non-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int orientation) | Create a separator inside `parent`. orientation is ORIENT_HORIZONTAL (a horizontal rule) or ORIENT_VERTICAL (a vertical rule). |
createInHandle | void createInHandle(int parentHandle, int orientation) | No description in source. |
horizontal | void horizontal(SLWidget parent) | No description in source. |
vertical | void vertical(SLWidget parent) | No description in source. |
SLSlider #sleela 2.5 (lib/user-interface/SLSlider.sleela)
SLSlider class extends SLWidget
Defines SLSlider — a SleelaUI horizontal slider: a thin trough with an accent fill up to the current value and a round knob, draggable with the pointer or nudgeable with the arrow keys when focused. The constructor bottoms out in the `uiSlider` built-in (SleelaUI C ABI slui_slider()); the value is read/written through value()/setValue(), clamped to the [min, max] range given at construction. An SLSlider IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, double min, double max, double value) | Create a slider inside `parent` spanning [min, max] with an initial value. |
createInHandle | void createInHandle(int parentHandle, double min, double max, double value) | No description in source. |
value | double value() | No description in source. |
setValue | void setValue(double value) | No description in source. |
changed | boolean changed() | True if the value changed since the last check (latch cleared on read). |
SLSpacer #sleela 2.5 (lib/user-interface/SLSpacer.sleela)
SLSpacer class extends SLWidget
Defines SLSpacer — a SleelaUI flexible gap: an invisible, zero-natural-size child that expands to absorb surplus space along its box's main axis. It is the idiom for pushing a control to the far edge of a box (e.g. a settings gear to the right of a header bar). The constructor bottoms out in the `uiSpacer` built-in, which calls the SleelaUI C ABI slui_spacer(). An SLSpacer IS an SLWidget but has no painted content; it only consumes space. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a flexible spacer inside `parent`. |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
SLSpinButton #sleela 2.5 (lib/user-interface/SLSpinButton.sleela)
SLSpinButton class extends SLWidget
Defines SLSpinButton — a SleelaUI numeric spin button: a value between two steppers (minus / plus) that increment by a fixed step, clamped to a [min, max] range (arrow keys also step while focused). Use it for bounded numeric input. The constructor bottoms out in the `uiSpinButton` built-in (SleelaUI C ABI slui_spin_button()); the value is read/written through value()/setValue(). An SLSpinButton IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, double min, double max, double step, | Create a spin button inside `parent` spanning [min, max], stepping by `step`, with an initial value. |
createInHandle | void createInHandle(int parentHandle, double min, double max, double step, | No description in source. |
value | double value() | No description in source. |
setValue | void setValue(double value) | No description in source. |
changed | boolean changed() | True if the value changed since the last check (latch cleared on read). |
SLSpinner #sleela 2.5 (lib/user-interface/SLSpinner.sleela)
SLSpinner class extends SLWidget
Defines SLSpinner — a SleelaUI indeterminate activity spinner: an accent arc riding a faint ring, used while a task of unknown length runs. The host advances the arc by setting a phase in [0,1] each frame (the toolkit draws the arc at that position). The constructor bottoms out in the `uiSpinner` built-in (SleelaUI C ABI slui_spinner()); the phase is set through setPhase(). An SLSpinner IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a spinner inside `parent`. |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
setPhase | void setPhase(double phase) | Advance the bright arc; phase wraps over [0,1]. |
phase | double phase() | No description in source. |
SLStatusBar #sleela 2.5 (lib/user-interface/SLStatusBar.sleela)
SLStatusBar class extends SLWidget
Defines SLStatusBar — a SleelaUI footer status strip: a chrome band with a 1px top hairline that lays its children out horizontally. Use it for a resting status line (e.g. "Ready", a spacer, the version). The constructor bottoms out in the `uiStatusBar` built-in (SleelaUI C ABI slui_status_bar()); children are added by constructing control classes against this status bar's handle. An SLStatusBar IS an SLWidget container (horizontal). Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | Create a status bar inside `parent` (normally the window root). |
createInHandle | void createInHandle(int parentHandle) | No description in source. |
SLTabBar #sleela 2.5 (lib/user-interface/SLTabBar.sleela)
SLTabBar class extends SLWidget
A reusable horizontal browser-style tab bar. It uses the existing native SLButton visual states and current window theme, with a clear selected accent, consistent inactive tabs, compact spacing, and one-shot click activation. Page content is deliberately left to the caller. Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_TABS | static final int MAX_TABS = 512 | No description in source. |
strip | SLBox strip | No description in source. |
tabs | SLButton[] tabs | No description in source. |
titles | String[] titles | No description in source. |
dirty | boolean[] dirty | No description in source. |
count | int count | No description in source. |
active | int active | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | No description in source. |
addTab | int addTab(String title) | No description in source. |
select | void select(int index) | No description in source. |
selectedIndex | int selectedIndex() | No description in source. |
tabCount | int tabCount() | No description in source. |
takeClickedTab | int takeClickedTab() | Poll after the UI event loop has dispatched input. Returns index or -1. |
selectPrevious | void selectPrevious() | No description in source. |
selectNext | void selectNext() | No description in source. |
setTitle | void setTitle(int index, String title) | No description in source. |
setDirty | void setDirty(int index, boolean value) | No description in source. |
isDirty | boolean isDirty(int index) | No description in source. |
refreshTitle | void refreshTitle(int index) | No description in source. |
SLTextView #sleela 2.5 (lib/user-interface/SLTextView.sleela)
SLTextView class extends SLWidget
Defines SLTextView — a competent SleelaUI multi-line editable text / code editor, written entirely in SLeeLa. It owns the text model (a line buffer, a caret at line/column, and an optional selection span) and renders it onto an SLCanvasView via the SleelaUI Draw API: a gutter with 1-based line numbers, the text lines in a monospace metric, the current-line highlight, the selection band, and a block caret. It exposes real editing operations — insert text, newline, backspace, delete, and caret movement — and a dirty flag that distinguishes a load from user edits. This is the code editor an IDE needs, with no new C ABI: it composes SLCanvasView + SLDrawContext. An SLTextView IS an SLWidget (its handle is the canvas view's handle). Family: user-interface. Native VM/UI work crosses the explicit `ui*`/`draw*` SLVM bridges.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_LINES | static final int MAX_LINES = 1048576 | No description in source. |
LINE_HEIGHT | static final int LINE_HEIGHT = 18 | px per text row |
CHAR_WIDTH | static final int CHAR_WIDTH = 9 | px per monospace cell |
GUTTER_W | static final int GUTTER_W = 52 | px line-number gutter |
PAD_X | static final int PAD_X = 8 | px left padding inside the text area |
COL_BG | static final int COL_BG = 0x151515FF | Slick Black palette (0xRRGGBBAA), consistent with the SleelaUI theme. |
COL_GUTTER_BG | static final int COL_GUTTER_BG = 0x1E1E1EFF | No description in source. |
COL_GUTTER_FG | static final int COL_GUTTER_FG = 0x6A6A6AFF | No description in source. |
COL_TEXT | static final int COL_TEXT = 0xE6E6E6FF | No description in source. |
COL_CARET | static final int COL_CARET = 0x3BE07AFF | brand green |
COL_SELECT | static final int COL_SELECT = 0x294C38FF | No description in source. |
COL_CURLINE | static final int COL_CURLINE = 0x1C1C1CFF | No description in source. |
canvas | SLCanvasView canvas | No description in source. |
lines | String[] lines | Text model. |
lineCount | int lineCount | No description in source. |
caretLine | int caretLine | Caret and selection (line/column are 0-based). |
caretCol | int caretCol | No description in source. |
anchorLine | int anchorLine | selection anchor; equal to caret when there is no selection |
anchorCol | int anchorCol | No description in source. |
dirty | boolean dirty | No description in source. |
topLine | int topLine | first visible line (vertical scroll in lines) |
viewportRows | int viewportRows | visible text rows (set from the canvas height) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int width, int height) | No description in source. |
setDrawHandler | void setDrawHandler(int handlerId) | Register the SLeeLa draw-handler ordinal the VM calls each frame; the handler body should call render(ctx) with its SLDrawContext. |
loadLines | void loadLines(String[] newLines, int n) | Replace the whole buffer from a list of lines (a load, not an edit). |
getLineCount | int getLineCount() | No description in source. |
lineAt | String lineAt(int i) | No description in source. |
isDirty | boolean isDirty() | No description in source. |
markSaved | void markSaved() | No description in source. |
clearSelection | void clearSelection() | No description in source. |
hasSelection | boolean hasSelection() | No description in source. |
moveTo | void moveTo(int line, int col, boolean extend) | No description in source. |
moveLeft | void moveLeft(boolean extend) | No description in source. |
moveRight | void moveRight(boolean extend) | No description in source. |
moveUp | void moveUp(boolean extend) | No description in source. |
moveDown | void moveDown(boolean extend) | No description in source. |
moveHome | void moveHome(boolean extend) | No description in source. |
moveEnd | void moveEnd(boolean extend) | No description in source. |
clickAt | void clickAt(int px, int py, boolean extend) | Map a pixel click inside the text area to a caret position. |
insert | void insert(String s) | Insert a run of text with no newlines at the caret. |
newline | void newline() | Split the current line at the caret (Enter). |
backspace | void backspace() | Backspace: delete the selection, else the char before the caret, else join with the previous line. |
deleteForward | void deleteForward() | Forward delete. |
deleteSelection | void deleteSelection() | Delete the current selection and place the caret at its start. Only the single-line and whole-line-span common cases are modeled here; a full multi-line splice is a host-assisted operation. |
render | void render(SLDrawContext ctx) | Paint the editor into `ctx` (an SLDrawContext bound to the canvas frame). |
paintSelectionBand | void paintSelectionBand(SLDrawContext ctx, int line, int y, int w) | No description in source. |
paintCaret | void paintCaret(SLDrawContext ctx) | No description in source. |
followCaret | void followCaret() | No description in source. |
insertLineAt | void insertLineAt(int index, String value) | No description in source. |
removeLineAt | void removeLineAt(int index) | No description in source. |
clampLine | int clampLine(int line) | No description in source. |
clampCol | int clampCol(int line, int col) | No description in source. |
selectionForward | boolean selectionForward() | Normalized selection bounds (start precedes end in document order). |
selStartLine | int selStartLine() | No description in source. |
selStartCol | int selStartCol() | No description in source. |
selEndLine | int selEndLine() | No description in source. |
selEndCol | int selEndCol() | No description in source. |
len | int len(String s) | No description in source. |
substr | String substr(String s, int from, int to) | No description in source. |
SLTheme #sleela 2.5 (lib/user-interface/SLTheme.sleela)
SLTheme class
Defines SLTheme — a SleelaUI palette handle. A theme is the single source of truth for a window's look: a flat set of named role colours plus a corner radius, spacing unit, control height, and font. This class wraps the toolkit's theme built-ins: uiThemePreset (fill from a built-in preset), the role setters (uiThemeSet*), metric/font setters, and the base-colour hooks. Each bottoms out in the SleelaUI C ABI (slui_theme_preset + the SLUITheme fields). The DEFAULT is a cool graphite/charcoal palette with a steel-blue accent. White, blue, black and gray are selectable named presets. Apps may choose a preset directly in source or explicitly load a named theme from a key=value configuration file. Configuration is never silently auto-loaded. A theme is a VM-local handle (-1 = none). Pass handle() to SLUserInterface.openWindow() or SLWindow.setTheme(); pass -1 anywhere a theme is expected to get the default. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SLICK_BLACK | static final int SLICK_BLACK = 0 | Preset ordinals mirror SLUIThemeId in the toolkit C ABI. |
GRAPHITE | static final int GRAPHITE = 1 | No description in source. |
CUSTOM | static final int CUSTOM = 2 | No description in source. |
SLEELA_BASE | static final int SLEELA_BASE = 3 | DEFAULT is the coordinated graphite/charcoal + steel-blue palette. |
DEFAULT | static final int DEFAULT = 3 | No description in source. |
WHITE | static final int WHITE = 4 | No description in source. |
BLACK | static final int BLACK = 5 | No description in source. |
BLUE | static final int BLUE = 6 | No description in source. |
GRAY | static final int GRAY = 7 | No description in source. |
BASE_COLOR_DEFAULT | static final int BASE_COLOR_DEFAULT = 0x1D2025FF | No description in source. |
theme | int theme | VM-local theme handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
preset | void preset(int presetId) | Select one preset directly in source: DEFAULT, WHITE, BLUE, BLACK, or GRAY. |
sleelaBase | void sleelaBase() | No description in source. |
defaultTheme | void defaultTheme() | No description in source. |
white | void white() | No description in source. |
blue | void blue() | No description in source. |
black | void black() | No description in source. |
gray | void gray() | No description in source. |
slickBlack | void slickBlack() | No description in source. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
setBaseColor | void setBaseColor(int baseColor) | Re-derive a neutral/cool palette from a custom base colour (0xRRGGBBAA). |
loadConfig | boolean loadConfig(String path) | Load theme=default|white|blue|black|gray plus optional overrides from a key=value config file. Returns true on success. Config is never auto-loaded. |
setBackground | void setBackground(int color) | ---- Role colours (each takes an SLColor word, 0xRRGGBBAA) ------------- |
setSurface | void setSurface(int color) | No description in source. |
setSurfaceHi | void setSurfaceHi(int color) | No description in source. |
setChrome | void setChrome(int color) | No description in source. |
setBorder | void setBorder(int color) | No description in source. |
setForeground | void setForeground(int color) | No description in source. |
setForegroundDim | void setForegroundDim(int color) | No description in source. |
setAccent | void setAccent(int color) | No description in source. |
setAccentForeground | void setAccentForeground(int color) | No description in source. |
setDanger | void setDanger(int color) | No description in source. |
setRadius | void setRadius(int px) | ---- Metrics and typography -------------------------------------------- |
setControlHeight | void setControlHeight(int px) | No description in source. |
setFont | void setFont(String family, int sizePt) | No description in source. |
setAccentColor | void setAccentColor(SLColor c) | Convenience: set a role colour from an SLColor object. |
close | void close() | No description in source. |
SLThrobber #sleela 2.5 (lib/user-interface/SLThrobber.sleela)
SLThrobber class extends SLWidget
Defines SLThrobber — a SleelaUI width-adjustable, full-motion, colour-predictive, water-like flowing activity throbber. Unlike a spinning ring, it is a fluid field: crests travel, disperse, and recombine like ripples on water, their colour arriving slightly AHEAD of the motion (the hue leads the local velocity), with latent hues surfacing on the brightest crests under strong flow and receding as it calms. The width is adjustable at any time and the field rescales while keeping the same physical feel. The constructor bottoms out in the `uiThrobber` built-in (SleelaUI C ABI slui_throbber()); it is an animated widget — while visible the window's frame loop advances it and repaints it at its refresh rate. An SLThrobber IS an SLWidget. Height follows setSizeRequest (a slim seam by default); set the width with setWidth, the flow vigour with setIntensity, and the base hue with setHue. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int widthPx) | Create a throbber inside `parent` with an initial pixel width. |
createInHandle | void createInHandle(int parentHandle, int widthPx) | No description in source. |
setWidth | void setWidth(int widthPx) | Adjust the width in pixels; the water field rescales to fit. |
setIntensity | void setIntensity(double intensity) | Flow vigour in [0,1]: 0 = a calm trickle, 1 = vigorous flow. Drives both the speed and the colour spread of the field. |
setHue | void setHue(double hueDegrees) | Base hue in degrees the predictive colouring flows around (205 ~ water; 150 ~ green water; 30 ~ warm). The actual rendered hue leads this by the local flow velocity. |
SLToggle #sleela 2.5 (lib/user-interface/SLToggle.sleela)
SLToggle class extends SLWidget
Defines SLToggle — a SleelaUI toggle switch: a pill track with a sliding knob and a trailing label. On uses the theme accent; off uses a neutral surface with a hairline. Flipping it (click, or Enter/Space while focused) raises an activate event and updates the boolean state. The constructor bottoms out in the `uiToggle` built-in (SleelaUI C ABI slui_toggle()); the state is read/written through isOn()/setOn(). An SLToggle IS an SLWidget and is keyboard-focusable. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String label, boolean initialOn) | Create a toggle inside `parent` with a label and initial state. |
createInHandle | void createInHandle(int parentHandle, String label, boolean initialOn) | No description in source. |
isOn | boolean isOn() | No description in source. |
setOn | void setOn(boolean on) | No description in source. |
changed | boolean changed() | True if the toggle flipped since the last check (latch cleared on read). |
SLTooltip #sleela 2.5 (lib/user-interface/SLTooltip.sleela)
SLTooltip class extends SLWidget
Defines SLTooltip — a SleelaUI tooltip bubble: a small raised surface with a 1px hairline and short explanatory text, used to annotate a control. The constructor bottoms out in the `uiTooltip` built-in (SleelaUI C ABI slui_tooltip()); the text is updated through the inherited setText(). An SLTooltip IS an SLWidget but is non-interactive. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, String text) | Create a tooltip inside `parent` with a message. |
createInHandle | void createInHandle(int parentHandle, String text) | No description in source. |
SLTreeView #sleela 2.5 (lib/user-interface/SLTreeView.sleela)
SLTreeView class extends SLWidget
Defines SLTreeView — a competent SleelaUI hierarchical tree. It is a composite widget (no new C ABI): an SLScrollView whose content column holds one SLLabel row per *visible* node, indented by depth and prefixed with a disclosure marker. Nodes carry a stable id, a display label, a parent id, a depth, an expanded flag, and a leaf flag. Expanding/collapsing a branch recomputes the visible row set; clicking a row selects it and reports the selected node id. This is the data widget an IDE project explorer needs, written entirely in SLeeLa over the SleelaUI primitives. An SLTreeView IS an SLWidget (its handle is the scroll view's frame). Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_NODES | static final int MAX_NODES = 65536 | No description in source. |
ROW_HEIGHT | static final int ROW_HEIGHT = 22 | pixels per row (for scroll math) |
scroll | SLScrollView scroll | No description in source. |
ids | String[] ids | Node model (parallel arrays keyed by node index). |
labels | String[] labels | No description in source. |
parents | int[] parents | index of parent node, -1 for a root |
depths | int[] depths | No description in source. |
expanded | boolean[] expanded | No description in source. |
leaf | boolean[] leaf | No description in source. |
count | int count | No description in source. |
visible | int[] visible | Visible-row projection (indices into the node arrays, in display order). |
visibleCount | int visibleCount | No description in source. |
rows | SLLabel[] rows | One reusable label row per visible slot. |
rowCapacity | int rowCapacity | No description in source. |
selectedRow | int selectedRow | index into `visible`, -1 when nothing selected |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent, int visibleRows) | No description in source. |
addNode | int addNode(String id, String label, String parentId, boolean isLeaf) | Add a node under `parentId` ("" / null for a root). Returns its index. |
indexOfId | int indexOfId(String id) | No description in source. |
rebuild | void rebuild() | Recompute the visible rows: a node is visible when every ancestor is expanded. Walks nodes in insertion order (parents precede children). |
ancestorsExpanded | boolean ancestorsExpanded(int node) | No description in source. |
paint | void paint() | Repaint the visible slice into the reusable row labels. |
firstVisibleRow | int firstVisibleRow() | No description in source. |
rowText | String rowText(int node) | " > Branch" / " file.sleela" — indent by depth, disclosure marker. |
indent | String indent(int depth) | No description in source. |
toggle | void toggle(String id) | Toggle a branch open/closed by node id; leaves are ignored. |
selectRow | void selectRow(int visibleIndex) | Select a visible row (0-based into the visible projection). |
selectedId | String selectedId() | The selected node id, or null when nothing is selected. |
selectionIsLeaf | boolean selectionIsLeaf() | No description in source. |
nodeCount | int nodeCount() | No description in source. |
visibleRowCount | int visibleRowCount() | No description in source. |
SLUserInterface #sleela 2.5 (lib/user-interface/SLUserInterface.sleela)
SLUserInterface class
Defines SLUserInterface — the capstone facade of the /lib/user-interface family. It is the single object a developer reaches for to open a window and build a graphical interface from SLeeLa source using SleelaUI™, SLeeLa's OWN original cross-platform UI toolkit (not GTK/Qt). Every method bottoms out in a `ui*` SLVM built-in that calls the GENUINE SleelaUI C ABI (include/sleela_ui.h) — which in turn drives the real host window system: X11 on Linux/Unix, Cocoa on macOS, Win32 on Windows 10+. So the same SLeeLa program raises a real window on whichever platform runs it, with the signature Slick Black look identical on all three. This is the general entry point: create the application, open a window, hand back its root container, then run the toolkit's event loop. The individual widget classes (SLButton, SLLabel, …) build on the same `ui*` built-ins. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge, the same discipline as /lib/os's `os*` bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
BACKEND_UNKNOWN | static final int BACKEND_UNKNOWN = 0 | Backend ordinals (mirror SLUIBackend in the toolkit C ABI). |
BACKEND_WIN32 | static final int BACKEND_WIN32 = 1 | No description in source. |
BACKEND_COCOA | static final int BACKEND_COCOA = 2 | No description in source. |
BACKEND_X11 | static final int BACKEND_X11 = 3 | No description in source. |
appId | String appId | application identifier, e.g. "com.mearvk.App" |
app | int app | VM-local application handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String id) | No description in source. |
open | boolean open() | Create the SleelaUI application connection (opens the host display). Returns true if the toolkit came up (false if, e.g., no display on X11). |
active | boolean active() | No description in source. |
backend | String backend() | The window-system backend driving this process: "x11" / "cocoa" / "win32". |
backendId | int backendId() | No description in source. |
version | String version() | No description in source. |
isLinux | boolean isLinux() | No description in source. |
isMac | boolean isMac() | No description in source. |
isWindows | boolean isWindows() | No description in source. |
screenWidth | int screenWidth() | The primary screen / display size in pixels, straight from the host window system (uiScreenWidth / uiScreenHeight bottom out in slui_screen_size). Returns 0 when the toolkit cannot report a size — e.g. a headless host, or before open() has connected the display — so callers can fall back to a modeled resolution (see SLGuiScreenFit). Needs an open application. |
screenHeight | int screenHeight() | No description in source. |
screenKnown | boolean screenKnown() | No description in source. |
openWindow | SLWindow openWindow(String title, int width, int height, int themeHandle) | Open a window on this application. title/width/height describe the content area; theme is an SLTheme handle (pass -1 for the Slick Black default). Returns an SLWindow bound to the new native window. |
run | int run() | Run the toolkit's own event loop until every window closes (or quit()). Returns the process-style exit code. |
pump | int pump(boolean block) | Process pending host events once; block != 0 waits for at least one. Returns the number of events dispatched, or a negative error. |
quit | void quit(int exitCode) | Ask the event loop to stop; run() returns exitCode. |
close | void close() | Release the application and all its windows. |
SLVerticalTabs #sleela 2.5 (lib/user-interface/SLVerticalTabs.sleela)
SLVerticalTabs class extends SLWidget
A vertical navigation-tabs composite for settings, tool panels, and application sections. A narrow themed button rail sits beside a page stack; selecting a rail item reveals exactly one content container. Uses existing native button states and the active theme without fixed colors. Family: user-interface.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_PAGES | static final int MAX_PAGES = 512 | No description in source. |
layout | SLBox layout | No description in source. |
rail | SLBox rail | No description in source. |
stack | SLBox stack | No description in source. |
tabs | SLButton[] tabs | No description in source. |
pages | SLBox[] pages | No description in source. |
titles | String[] titles | No description in source. |
dirty | boolean[] dirty | No description in source. |
count | int count | No description in source. |
active | int active | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
createIn | void createIn(SLWidget parent) | No description in source. |
addPage | int addPage(String title) | No description in source. |
pageContent | SLWidget pageContent(int index) | No description in source. |
select | void select(int index) | No description in source. |
selectedIndex | int selectedIndex() | No description in source. |
pageCount | int pageCount() | No description in source. |
takeClickedTab | int takeClickedTab() | Poll after the UI event loop has dispatched input. Returns index or -1. |
setTitle | void setTitle(int index, String title) | No description in source. |
setDirty | void setDirty(int index, boolean value) | No description in source. |
isDirty | boolean isDirty(int index) | No description in source. |
refreshTitle | void refreshTitle(int index) | No description in source. |
SLWash #sleela 2.5 (lib/user-interface/SLWash.sleela)
SLWash class
Defines SLWash — an "Excellent Wash": a soft, multi-stop graded colour field (up to 8 stops) that paints a SleelaUI mood. Stops are sampled with smoothstep so the wash reads as a gentle gradient, not hard bands. Light colours are known and adjustable; the wash is how a mood colours the light. It is a VM-local handle built up stop by stop and handed to an SLMood. Each method bottoms out in a `wash*` SLVM built-in calling the C ABI (sleela_ui_mood.h). Family: user-interface. Native VM/UI work crosses the explicit `wash*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
wash | int wash | VM-local handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
begin | void begin() | No description in source. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
stop | void stop(double position, int color) | Add a colour stop at position in [0,1]. Softness (0..1) extra-blurs between stops for a gentler wash. |
setSoftness | void setSoftness(double softness) | No description in source. |
linear | void linear(int a, int b) | Two- and three-stop shortcuts for the common washes. |
triad | void triad(int a, int b, int c) | No description in source. |
sample | int sample(double t) | Sample the wash at t in [0,1] -> colour (0xRRGGBBAA). |
SLWidget #sleela 2.5 (lib/user-interface/SLWidget.sleela)
SLWidget class
Defines SLWidget — the base class for every SleelaUI control and container reached from SLeeLa source. It holds the VM-local widget handle and the common configuration the toolkit exposes on all widgets: margins, alignment, expansion, a minimum size request, sensitivity (grey-out), visibility, text, and the suggested/destructive accents. Each setter bottoms out in a `ui*` built-in that calls the SleelaUI C ABI. Subclasses (SLBox, SLHeaderBar, SLLabel, SLButton, SLToggle, SLEntry, SLSlider, SLSeparator, SLSpacer) are constructed against a parent handle and then inherit all of this common configuration surface. Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ALIGN_START | static final int ALIGN_START = 0 | Alignment ordinals (mirror SLUIAlign in the toolkit C ABI). |
ALIGN_CENTER | static final int ALIGN_CENTER = 1 | No description in source. |
ALIGN_END | static final int ALIGN_END = 2 | No description in source. |
ALIGN_FILL | static final int ALIGN_FILL = 3 | No description in source. |
ORIENT_VERTICAL | static final int ORIENT_VERTICAL = 0 | Orientation ordinals (mirror SLUIOrientation). |
ORIENT_HORIZONTAL | static final int ORIENT_HORIZONTAL = 1 | No description in source. |
widget | int widget | VM-local widget handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
adopt | void adopt(int handle) | Adopt an existing handle (used for the window's root container). |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
setMargin | void setMargin(int top, int right, int bottom, int left) | ---- Box model: margin, alignment, expansion, minimum size ------------- |
setMarginAll | void setMarginAll(int all) | No description in source. |
setAlign | void setAlign(int horizontal, int vertical) | No description in source. |
setExpand | void setExpand(boolean horizontal, boolean vertical) | No description in source. |
setSizeRequest | void setSizeRequest(int minWidth, int minHeight) | No description in source. |
setSensitive | void setSensitive(boolean sensitive) | ---- State ------------------------------------------------------------- |
setVisible | void setVisible(boolean visible) | No description in source. |
setText | void setText(String text) | ---- Text (label / button / entry) ------------------------------------- |
text | String text() | No description in source. |
createPopupPanel | int createPopupPanel() | ---- Accents ----------------------------------------------------------- Create a reusable hidden popup panel within a parent layout. The caller should place it in a stack/overlay-capable container and manage visibility. |
setPopupOpen | void setPopupOpen(int popupHandle, boolean open) | No description in source. |
isPopupOpen | boolean isPopupOpen(int popupHandle) | No description in source. |
wifiScan | int wifiScan() | ---- Native Wi-Fi provider (shared wifi-common C/C++ core) ------------- Scan returns WIFI_STATUS_OK on success; query the bounded result cache with wifiNetworkCount/SSID/BSSID/signal/security. Indexes are zero-based. |
wifiNetworkCount | int wifiNetworkCount() | No description in source. |
wifiNetworkSsid | String wifiNetworkSsid(int index) | No description in source. |
wifiNetworkBssid | String wifiNetworkBssid(int index) | No description in source. |
wifiNetworkSignal | int wifiNetworkSignal(int index) | No description in source. |
wifiNetworkSecurity | String wifiNetworkSecurity(int index) | No description in source. |
wifiConnect | int wifiConnect(int index, String profileName) | Connect through OS-managed authentication or a trusted saved profile. The bridge never accepts raw passwords from Sleela source or places credentials on command lines. |
wifiDisconnect | int wifiDisconnect() | No description in source. |
wifiStatusName | String wifiStatusName(int status) | No description in source. |
setSuggested | void setSuggested(boolean suggested) | Mark this as the SINGLE suggested (accent) action in its group. |
setDestructive | void setDestructive(boolean destructive) | Mark this as destructive (uses the danger colour on hover). |
setFont | void setFont(SLFont font) | Give this text widget a styled SLFont so its label renders with the font's effects (shadows, glow, outline, relief, gradient). The widget borrows the font. Pass null to revert to plain theme text. |
SLWindow #sleela 2.5 (lib/user-interface/SLWindow.sleela)
SLWindow class
Defines SLWindow — a top-level SleelaUI window opened from SLeeLa source. It wraps the toolkit's window built-ins: uiWindowCreate (bound to an application + theme), uiWindowShow/Hide, uiWindowSetTitle, uiWindowRoot (the root container to add widgets to), uiWindowSetTheme, and uiWindowRedraw. Underneath, the VM calls the SleelaUI C ABI, which creates a real native window (X11/Cocoa/Win32) and paints it with the toolkit's own software rasterizer, so the window looks identical on every platform. Lifecycle: configureOn(app, title, w, h, theme) is called by SLUserInterface; then show(), set the title, add widgets to root(), and the application's run loop drives it. A window is a VM-local handle (-1 = none). Family: user-interface. Native VM/UI work crosses the explicit `ui*` SLVM bridge.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
window | int window | VM-local window handle (-1 = none) |
root | int root | VM-local handle of the window's root container widget |
title | String title | No description in source. |
MIN_WINDOW_W | static final int MIN_WINDOW_W = 160 | ---- assumed starting size + full-screen intent ------------------------- Absolute assumed floor for a usable native window, mirroring the pure-SLeeLa lib/ui/SLLayoutFrame floor so both UI systems agree on "at least so large". |
MIN_WINDOW_H | static final int MIN_WINDOW_H = 120 | No description in source. |
FULLSCREEN | static final int FULLSCREEN = 100000 | A very large extent treated as "fill the screen" when a real screen size is not known. A native host that knows its monitor passes the true pixels to configureFullscreen() instead of relying on this sentinel. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configureOn | void configureOn(int app, String windowTitle, int width, int height, | Called by SLUserInterface.openWindow(). themeHandle -1 selects the built-in Slick Black default theme. |
valid | boolean valid() | No description in source. |
rootWidget | SLWidget rootWidget() | The root container widget. Add boxes/controls to this to build the UI. |
rootHandle | int rootHandle() | Raw root handle, for widget constructors that attach to a parent handle. |
show | void show() | No description in source. |
hide | void hide() | No description in source. |
setTitle | void setTitle(String t) | No description in source. |
windowTitle | String windowTitle() | No description in source. |
setTheme | void setTheme(int themeHandle) | Swap the whole palette live (pass an SLTheme handle). |
requestRedraw | void requestRedraw() | Ask the toolkit to repaint this window on the next turn. |
setBuffering | void setBuffering(int mode) | Presentation buffering: how a painted frame reaches the screen. 0 = single (direct blit; may tear on resize) 1 = double (one off-screen back buffer; frame lands atomically) 2 = triple (two back buffers; default for SLeeLa GUI setup) Programs can override this with setBuffering(mode). |
buffering | int buffering() | No description in source. |
setMinSize | int setMinSize(int width, int height) | No description in source. |
setMaxSize | int setMaxSize(int width, int height) | No description in source. |
setSizeLimits | int setSizeLimits(int minWidth, int minHeight, int maxWidth, int maxHeight) | No description in source. |
minWidth | int minWidth() | No description in source. |
minHeight | int minHeight() | No description in source. |
maxWidth | int maxWidth() | Maximum getters return 0 for unbounded and -1 when the window is invalid. |
maxHeight | int maxHeight() | No description in source. |
assumeSize | int assumeSize(int assumedW, int assumedH) | No description in source. |
configureAssumed | void configureAssumed(int app, String windowTitle, int assumedW, int assumedH, | No description in source. |
configureFullscreen | void configureFullscreen(int app, String windowTitle, int screenW, int screenH, | No description in source. |
handle | int handle() | No description in source. |
sociology #sleela 2.5 (lib/user-interface/example/science/sociology.sleela)
ScienceSociology class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |