appcui 0.5.1

A feature-rich and cross-platform TUI/CUI framework for Rust, enabling modern terminal-based applications on Windows, Linux, and macOS. Includes built-in UI components like buttons, menus, list views, tree views, checkboxes, and more. Perfect for building fast and interactive CLI tools and text-based interfaces.
Documentation
use EnumBitFlags::EnumBitFlags;

#[derive(Copy,Clone,PartialEq,Eq)]
/// Identifies one of the two panes of a [`super::VSplitter`].
///
/// `Left` is the left panel, `Right` the right panel.
pub enum Panel {
    /// The left pane.
    Left,
    /// The right pane.
    Right,
}

#[derive(Copy,Clone,PartialEq,Eq)]
/// How a [`super::VSplitter`] redistributes space when its parent is resized.
///
/// Preserve the relative split, keep the left panel's size, or keep the right
/// panel's size.
pub enum ResizeBehavior {
    /// Keep the same relative split (for example 30% / 70%) when the parent grows or shrinks.
    PreserveAspectRatio,
    /// Keep the left pane's width in character cells; the right pane absorbs the change.
    PreserveLeftPanelSize,
    /// Keep the right pane's width in character cells; the left pane absorbs the change.
    PreserveRightPanelSize,
}

#[EnumBitFlags(bits = 8)]
/// Initialization flags for a [`struct@super::VSplitter`].
///
/// Combine values with `|`. `Flags::None` draws the splitter independently of the
/// parent window frame.
pub enum Flags {
    /// Join the splitter line with neighboring window or panel borders.
    MergeBorders = 0x0001,
}