Skip to main content

Module compose

Module compose 

Source
Expand description

High-level helpers that compose multiple primitives into reusable interaction patterns.

The primitives module provides stateless descriptors (MenuBar, ContextMenu, Form, etc.). This module provides controllers that own the interaction state machine for common compositions — so apps define structure + handle semantic events, without reimplementing open/close/navigate/hover logic.

crate::ScrollView is a primitives type, not a controller here — it is the generic seam for a host that scrolls content it lays out itself. FormController, TreeController, and ChatController keep their own row-indexed scroll state unchanged; a future controller for scrolling arbitrary child content (a help panel, a form section) composes crate::ScrollView the same way these compose their own primitive instead of duplicating offset/thumb math.

Re-exports§

pub use app_shell::AppShell;
pub use app_shell::AppShellEvent;
pub use app_shell::AppShellLayout;
pub use app_shell::BottomBand;
pub use app_shell::PanelDefinition;
pub use app_shell::ShellPosition;
pub use bottom_panel::BackendWidget;
pub use bottom_panel::BottomPanelConfig;
pub use bottom_panel::BottomPanelController;
pub use bottom_panel::BottomPanelEvent;
pub use bottom_panel::BottomPanelLayout;
pub use bottom_panel::BottomPanelTab;
pub use chat_controller::ChatController;
pub use chat_controller::ChatControllerEvent;
pub use chat_controller::ChatRole;
pub use chat_controller::ChatTurn;
pub use context_menu_controller::ContextMenuController;
pub use context_menu_controller::ContextMenuOutcome;
pub use dual_mode_palette::DualModePaletteController;
pub use dual_mode_palette::DualModePaletteEvent;
pub use file_picker::FilePickerController;
pub use file_picker::FilePickerEvent;
pub use file_picker::FilePickerMode;
pub use focus_group::FocusGroup;
pub use focus_ring::FocusRing;
pub use folder_picker::FolderPickerController;
pub use folder_picker::FolderPickerEvent;
pub use folder_picker::PALETTE_CHROME_ROWS;
pub use form_controller::FormController;
pub use form_controller::FormControllerEvent;
pub use help_layer::filter_help_actions;
pub use help_layer::help_actions_to_palette_items;
pub use help_layer::HelpAction;
pub use help_layer::HelpNote;
pub use help_layer::HelpOverlayController;
pub use help_layer::HelpOverlayEvent;
pub use help_layer::HelpRegistry;
pub use help_layer::ViewHelp;
pub use markdown::render_markdown_to_styled_wrapped;
pub use markdown::CodeBlockRange;
pub use markdown::RenderedMarkdown;
pub use menu_system::MenuDef;
pub use menu_system::MenuEvent;
pub use menu_system::MenuSystem;
pub use message_dialog::MessageDialogController;
pub use message_dialog::MessageDialogEvent;
pub use notification::notify_or_toast;
pub use sidebar_panel_body::SidebarPanelBody;
pub use sidebar_panel_body::SidebarPanelBodyLayout;
pub use sidebar_panel_body::SidebarPanelChrome;
pub use sidebar_system::NavigationMode;
pub use sidebar_system::SectionKind;
pub use sidebar_system::SidebarEvent;
pub use sidebar_system::SidebarSectionDef;
pub use sidebar_system::SidebarSystem;
pub use status_bar_interaction::StatusBarAction;
pub use status_bar_interaction::StatusBarInteraction;
pub use tab_group::resolve_tab_drop;
pub use tab_group::GroupLayout;
pub use tab_group::Pane;
pub use tab_group::PaneDragRect;
pub use tab_group::PaneTab;
pub use tab_group::TabDragSource;
pub use tab_group::TabDropInstruction;
pub use tab_group::TabGroupController;
pub use tab_group::TabGroupEvent;
pub use tab_group::TabGroupLayout;
pub use toast_stack::ToastStackController;
pub use toast_stack::ToastStackEvent;
pub use toolbar_hover_tracker::ToolbarHoverTracker;
pub use tree_controller::TreeController;
pub use tree_controller::TreeControllerEvent;
pub use workspace::WorkspaceController;
pub use workspace::WorkspaceDoc;
pub use workspace::WorkspaceEvent;
pub use workspace::WorkspaceLayout;

Modules§

app_shell
AppShell — a composed controller for the activity bar + sidebar panel container pattern (VS Code / JetBrains / Zellij-style app shell).
bottom_panel
BottomPanel — a tabbed dockable panel for the bottom of an [AppShell].
chat_controller
ChatController — composed chat overlay controller.
context_menu_controller
ContextMenuController — the “one call” context-menu entry point, composed on top of the existing ContextMenu primitive, Backend::draw_context_menu rasteriser, Backend::show_context_menu native path, and [ModalStack].
dual_mode_palette
DualModePaletteController — a compose controller that wraps the Palette primitive and provides toggling between two interaction modes:
file_picker
FilePickerController — engine-level file open/save picker.
focus_group
FocusGroup — a tiny helper for Tab-cycling between N focusable regions by index.
focus_ring
FocusRing — a compose helper for Tab/Shift+Tab focus cycling through a list of WidgetIds.
folder_picker
FolderPickerController — engine-level folder/workspace directory picker.
form_controller
FormController — a composed controller for a single Form with built-in scrollbar support.
help_layer
Reusable context-sensitive help layer for ShellApp consumers.
markdown
Markdown → StyledText adapter.
menu_system
MenuSystem — a composed controller for MenuBar + ContextMenu dropdown interaction.
message_dialog
MessageDialogController — engine-level message/alert box driver.
notification
notify_or_toast — send a system Notification where the backend has one, degrade to the in-canvas Toast primitive where it doesn’t.
sidebar_panel_body
SidebarPanelBody — composes the four layers every sidebar-panel renderer hand-rolls: a background fill, optional header/search chrome, the panel’s own body widget, and an optional scrollbar gutter.
sidebar_system
SidebarSystem — a composed controller for MSV sidebar panels.
status_bar_interaction
Lightweight hover/press state tracker for crate::StatusBar.
tab_group
TabGroup — tabbed split-pane compose helper.
toast_stack
ToastStackController — VS Code-style keyboard-focus driver for the in-canvas ToastOverlay primitive.
toolbar_hover_tracker
ToolbarHoverTracker — host-side state holder that converts MouseMoved events into hovered_id: Option<WidgetId> for the Toolbar primitive.
tree_controller
TreeController — a composed controller for a single keyboard-navigable TreeView with scrollbar.
workspace
WorkspaceController — an open-N-view-one set of opaque document ids with exactly one active, rendered through the TabBar primitive.