Home/Examples/examples/gui

examples/gui

29 file(s) under examples/gui

check-all.sh

bash check-all.sh

CLASSIC-hello-window.sleela

sleela CLASSIC-hello-window.sleela

COMPONENT-buttons-actions.sleela

sleela COMPONENT-buttons-actions.sleela

COMPONENT-canvas-view.sleela

sleela COMPONENT-canvas-view.sleela

COMPONENT-containers-layout.sleela

sleela COMPONENT-containers-layout.sleela

COMPONENT-display-feedback.sleela

sleela COMPONENT-display-feedback.sleela

COMPONENT-progress-indicators.sleela

sleela COMPONENT-progress-indicators.sleela

COMPONENT-selection-controls.sleela

sleela COMPONENT-selection-controls.sleela

COMPONENT-tabs-notebook.sleela

sleela COMPONENT-tabs-notebook.sleela

COMPONENT-text-input.sleela

sleela COMPONENT-text-input.sleela

COMPONENT-widget-properties.sleela

sleela COMPONENT-widget-properties.sleela

FORM-settings-panel.sleela

sleela FORM-settings-panel.sleela

INTERACTION-button-events.sleela

sleela INTERACTION-button-events.sleela

NEW-custom-theme-roles.sleela

sleela NEW-custom-theme-roles.sleela

README.md

markdown README.md

SDK-ui-family-scope.md

markdown SDK-ui-family-scope.md

SDK-ui-object-model.sleela

sleela SDK-ui-object-model.sleela

SYSTEM-backend-screen-info.sleela

sleela SYSTEM-backend-screen-info.sleela

THEME-black.sleela

sleela THEME-black.sleela

THEME-blue.sleela

sleela THEME-blue.sleela

THEME-default-graphite.sleela

sleela THEME-default-graphite.sleela

THEME-gray.sleela

sleela THEME-gray.sleela

THEME-legacy-graphite.sleela

sleela THEME-legacy-graphite.sleela

THEME-legacy-slick-black.sleela

sleela THEME-legacy-slick-black.sleela

THEME-load-config.sleela

sleela THEME-load-config.sleela

THEME-white.sleela

sleela THEME-white.sleela

USED-theme-presets.sleela

sleela USED-theme-presets.sleela

USED-widget-gallery.sleela

sleela USED-widget-gallery.sleela

WINDOW-lifecycle-buffering.sleela

sleela WINDOW-lifecycle-buffering.sleela

About this collection

SleelaUI GUI examples

A practical, SLeeLa-source example collection for the native GUI API in /lib/user-interface (the high-level SL* object model) and the related /lib/ui SDK facade family.

These examples use the documented #sleela 2.5 user-interface classes and real SleelaUI bridge calls. They are intentionally organized around reusable patterns: application/window lifecycle, theme selection, component groups, layout, input, status/feedback, tabs, and interaction polling.

Start here

  1. CLASSIC Hello Window
  2. USED Full Widget Gallery
  3. USED Theme Presets Gallery
  4. NEW Custom Theme Roles
  5. Settings Panel

Theme examples

ExampleTheme
Default / graphiteSLTheme.DEFAULT
WhiteSLTheme.WHITE
BlueSLTheme.BLUE
BlackSLTheme.BLACK
GraySLTheme.GRAY
Legacy Slick BlackSLTheme.SLICK_BLACK
Legacy GraphiteSLTheme.GRAPHITE
Config-loaded themeExplicit .conf load

The five current named presets are Default, White, Blue, Black, and Gray. Legacy IDs Slick Black, Graphite, and Custom remain supported for ABI compatibility. No theme configuration is silently loaded.

Component examples

ExampleComponents / APIs
Containers and layoutBox, HeaderBar, Grid, Frame, Card, StatusBar, Separator, Spacer
Buttons and actionsButton, suggested/destructive, link button, icon
Text and inputLabel, Heading, Entry, SearchEntry, PasswordEntry
Selection controlsToggle, CheckBox, RadioButton, ComboBox, SpinButton
Progress and indicatorsSlider, ProgressBar, LevelBar, Spinner, ScrollBar, Throbber
Display and feedbackAvatar, Image, Badge, Chip, InfoBar, Tooltip
Canvas viewAnimated drawing surface and frame-rate target; draw handler binding is host-side
Tabs and pagesNotebook, TabBar, VerticalTabs
Widget common propertiesMargins, alignment, expansion, size, visibility, sensitivity
Button event pollingClick, hover, press/release latches
Settings panelComposed real-world preference form
SDK family scopeDistinguishes lib/ui model classes from native lib/user-interface bindings
SDK object modelExercises the current lib/ui model methods without claiming native rendering
Window lifecycleShow/hide, title, redraw, single/double/triple buffering
Backend and display infoBackend, toolkit version, screen dimensions

Running

From the repository root after building/installing SLeeLa and SleelaUI:

make -C impl
./impl/build/sleela check examples/gui/CLASSIC-hello-window.sleela
./impl/build/sleela run examples/gui/CLASSIC-hello-window.sleela

Validate every source example without opening windows:

sh examples/gui/check-all.sh

For an individual example, substitute the desired file name. A real desktop session is required for native windows; a headless build can validate/compile source but cannot present an interactive native window.

Theme and component design rules

API references

The lib/ui directory is the separate unified SDK front-end family; its classes and feature contracts should not be conflated with the 53-class native lib/user-interface wrapper family. These runnable GUI examples target the latter unless explicitly noted.