Skip to main content

ftui_widgets/
mouse.rs

1//! Shared mouse event result type for widget mouse handling.
2
3/// Result of processing a mouse event on a widget.
4#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5pub enum MouseResult {
6    /// Event not relevant to this widget.
7    Ignored,
8    /// Selection changed to the given index.
9    Selected(usize),
10    /// Item activated (double-click, expand/collapse).
11    Activated(usize),
12    /// Scroll position changed.
13    Scrolled,
14    /// Hover state changed.
15    HoverChanged,
16}