API Reference
This section provides detailed documentation for all public modules, structs, enums, traits, and macros within the OSUI library.
Core Concepts & Structure
- Screen: The main application context for managing widgets and extensions.
- Widget Model:
Element
,Component
,Widget
(Static/Dynamic), andWidgetLoad
. - Rendering & Scope:
RenderScope
,RenderMethod
, andElementRenderer
. - State Management:
State<T>
andDependencyHandler
for reactivity. - Frontend & Macros:
RsxElement
,Rsx
, and theevent!
,component!
,transform!
,rsx!
macros. - Utilities: Helper functions for terminal control and string manipulation.
Built-in Components & Extensions
- Style & Layout:
Transform
,Position
,Dimension
,Style
,Background
. - Extensions Overview: The
Extension
trait,Event
trait, andContext
for global behaviors. - Focus Extension:
AlwaysFocused
,Focused
,RelativeFocusExtension
for keyboard navigation. - ID Extension:
IdExtension
,Id
for unique widget identification. - Input Handling Extension:
InputExtension
for keyboard and mouse input. - Tick Extension:
TickExtension
,TickEvent
for timed events. - Velocity Extension:
VelocityExtension
,Velocity
for simple animations.
Built-in UI Elements
- Elements Overview: General Element trait and String as an Element.
- Div: A generic container element.
- Flex Containers:
FlexRow
andFlexCol
for automatic horizontal/vertical layout. - Heading: Renders large ASCII art text.
- Input: An interactive text input field.
- Paginator: Manages and navigates between multiple pages/children.