Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 918 Bytes

File metadata and controls

34 lines (25 loc) · 918 Bytes

Data Visualization Components

Components meant to handle arrays or collections of data.

List

A scrollable, selectable list of strings.

let list = List::new(20, 10);
// list data is populated externally via your model

Table

A multi-column table with headers and row selection. Handles column alignment automatically.

// Define headers and widths
static char* headers[] = {"ID", "Name", "Status"};
static int widths[] = {4, 20, 10};

// Define data as a flat 1D array of strings (char**)
static char* data[] = {
    "1", "Process A", "Running",
    "2", "Process B", "Stopped"
};

let table = Table::new((void*)headers, 3, (int*)widths, (void*)data, 2);

TreeView

A hierarchical node tree that supports expanding and collapsing child nodes dynamically.

ScrollArea

A viewport wrapper that can take arbitrarily tall text content and provide a scrollable window over it.