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>andDependencyHandlerfor 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
Extensiontrait,Eventtrait, andContextfor global behaviors. - Focus Extension:
AlwaysFocused,Focused,RelativeFocusExtensionfor keyboard navigation. - ID Extension:
IdExtension,Idfor unique widget identification. - Input Handling Extension:
InputExtensionfor keyboard and mouse input. - Tick Extension:
TickExtension,TickEventfor timed events. - Velocity Extension:
VelocityExtension,Velocityfor simple animations.
Built-in UI Elements
- Elements Overview: General Element trait and String as an Element.
- Div: A generic container element.
- Flex Containers:
FlexRowandFlexColfor automatic horizontal/vertical layout. - Heading: Renders large ASCII art text.
- Input: An interactive text input field.
- Paginator: Manages and navigates between multiple pages/children.