Home /Modules/user-interface/WIDGETS.DESCRIPTION.md

WIDGETS.DESCRIPTION.md

user-interface/WIDGETS.DESCRIPTION.md · 138 line(s) · markdown

SleelaUI™ Widget Collection

The complete catalogue of widgets in SleelaUI™ — SLeeLa's own, original cross-platform UI toolkit (not GTK/Qt). Every widget is drawn by the toolkit's own software rasterizer and reads only theme roles, so each is pixel-identical on Windows, macOS, and Linux/Unix and obeys the project's UI principles: one palette, one accent per group, an always-visible focus ring, WCAG AA contrast, and ≥32px hit targets. The default look is Slick Black (see THEMING.md).

Each row lists the native C ABI constructor (include/sleela_ui.h), the SLeeLa class (/lib/user-interface), what it is, and whether it takes keyboard focus. This table is the one-stop find for "which widget do I want, and what is it called in C and in SLeeLa?"

Containers & structure

WidgetC ABI constructorSLeeLa classDescriptionFocus
Boxslui_boxSLBoxVertical/horizontal box; GTK/CSS box layout (natural sizes, then expand, then align).—
Gridslui_gridSLGridFixed row/column grid; children fill cells row-major, cells sized to the largest child.—
Frameslui_frameSLFrameTitled, 1px-bordered group container with a vertical child stack.—
Cardslui_cardSLCardRaised rounded surface panel with a hairline and padding.—
Header Barslui_header_barSLHeaderBarTitle-bar strip: chrome fill + bottom hairline; holds brand, spacer, actions.—
Status Barslui_status_barSLStatusBarFooter strip: chrome band + top hairline; horizontal child layout.—
Separatorslui_separatorSLSeparator1px hairline rule, horizontal or vertical.—
Spacerslui_spacerSLSpacerInvisible flexible gap that absorbs surplus space along its box axis.—

Buttons & actions

WidgetC ABI constructorSLeeLa classDescriptionFocus
Buttonslui_buttonSLButtonPush button; suggested (accent) and destructive (danger) variants.✓
Link Buttonslui_link_buttonSLLinkButtonHyperlink-style accent text that underlines on hover/focus.✓
Toggleslui_toggleSLToggleOn/off switch (pill track + sliding knob) with a trailing label.✓

Selection & boolean

WidgetC ABI constructorSLeeLa classDescriptionFocus
Check Boxslui_check_boxSLCheckBoxLabelled square with an accent tick when checked.✓
Radio Buttonslui_radio_buttonSLRadioButtonLabelled circle with an accent dot; mutually exclusive within a group.✓
Combo Boxslui_combo_boxSLComboBoxDrop-down showing the current option and a chevron; cycles options.✓
Spin Buttonslui_spin_buttonSLSpinButtonNumeric value with − / + steppers, clamped to [min,max].✓

Text input

WidgetC ABI constructorSLeeLa classDescriptionFocus
Entryslui_entrySLEntrySingle-line UTF-8 text field with caret, placeholder, and editing keys.✓
Search Entryslui_search_entrySLSearchEntryEntry with a leading magnifier glyph and a "Search" placeholder.✓
Password Entryslui_password_entrySLPasswordEntryEntry that renders bullet dots instead of its characters.✓

Ranges & indicators

WidgetC ABI constructorSLeeLa classDescriptionFocus
Sliderslui_sliderSLSliderHorizontal slider over a [min,max] range with a draggable knob.✓
Scroll Barslui_scroll_barSLScrollBarThin track with a draggable thumb covering a page fraction.✓
Progress Barslui_progress_barSLProgressBarDeterminate accent fill proportional to a fraction in [0,1].—
Level Barslui_level_barSLLevelBarSegmented level (battery/volume style) over [0,1].—
Spinnerslui_spinnerSLSpinnerIndeterminate activity: an accent arc riding a faint ring.—

Text & display

WidgetC ABI constructorSLeeLa classDescriptionFocus
Labelslui_labelSLLabelNon-interactive run of body text; alignable within its cell.—
Headingslui_headingSLHeadingTitle text at a larger point size for sections/pages.—
Imageslui_imageSLImageFixed-size rounded tile with a centred glyph (picture/icon placeholder).—
Avatarslui_avatarSLAvatarRound accent disc showing an initial, for a person/account.—

Tags & feedback

WidgetC ABI constructorSLeeLa classDescriptionFocus
Badgeslui_badgeSLBadgeSmall accent count/status pill to annotate a control.—
Chipslui_chipSLChipRounded surface pill with a hairline, for tags/filters/selections.—
Info Barslui_info_barSLInfoBarInline tinted notice strip with a left severity bar (info/warning/error).—
Tooltipslui_tooltipSLTooltipSmall raised bubble with short explanatory text.—

Motion & drawing

WidgetC ABI constructorSLeeLa classDescriptionFocus
Throbberslui_throbberSLThrobberWidth-adjustable, full-motion, colour-predictive water-like flowing activity field (see THROBBER.md).—
Canvas Viewslui_canvas_viewSLCanvasViewA general animated drawing surface: your draw callback paints its double-buffered context each frame with the Draw API.—

Both are animated widgets: while visible the window's frame loop advances them and repaints at their requested rate. The comprehensive developer drawing surface they expose — primitives, pixel-level control, buffering, blend modes, and a refresh-rate frame clock — is documented in DRAW-API.md with SLeeLa bindings SLDrawContext and SLFrameClock.

Lighting, shadow & relief

Canvas-aware objects can be lit: place lights and give an object a material with a relief profile, and the toolkit shades its pixels with directional highlights, raised/recessed relief, soft cast shadows, and ambient occlusion — on Sleela's deep warm #2B1608 base. Lights come from a source (reserves its anchor object — the object is used as the light) or an emitter (reserves nothing, reusable); both light and shadow are emissions, chosen by polarity. Full reference: LIGHTING.md, SLeeLa bindings SLLight, SLLightScene, SLMaterial.

Fonts & font effects

Any text can be rendered with a font that carries a stack of effects — drop/inner shadow, glow, light sheen, an emitter (text that radiates light into a scene — reserving nothing, or binding as a source on an anchor), outline, relief emboss/engrave, and gradient fill — each with a quality knob (draft .. ultra). Attach a styled font to any text widget with slui_widget_set_font / SLWidget.setFont. Full reference: FONTS.md, SLeeLa bindings SLFont, SLFontEffect.

Totals

See also

— SleelaUI™ · MEARVK LLC · 2026