Skip to main content

init

Function init 

Source
pub fn init(cx: &mut App)
Expand description

Initialize the toolkit state this crate’s widgets depend on. Call once at application startup, before opening any window that hosts a SqllyDataTable:

fn setup(cx: &mut gpui::App) {
    sqlly_datatable::init(cx);
    // ... open windows ...
}

This currently forwards to gpui_component::init, which installs the global gpui_component::Theme used by the embedded gpui-component widgets (for example the pivot sidebar’s resizable divider). Skipping it panics on first render of those widgets. Hosts that already call gpui_component::init themselves do not need to call this again.