Skip to main content

fresh/app/types/
hover.rs

1use crate::app::file_open::SortMode;
2use crate::model::event::{ContainerId, LeafId, SplitDirection};
3
4/// Types of UI elements that can be hovered over
5#[derive(Debug, Clone, PartialEq)]
6pub enum HoverTarget {
7    /// Hovering over a split separator (container_id, direction)
8    SplitSeparator(ContainerId, SplitDirection),
9    /// Hovering over a scrollbar thumb (split_id)
10    ScrollbarThumb(LeafId),
11    /// Hovering over a scrollbar track (split_id, relative_row)
12    ScrollbarTrack(LeafId, u16),
13    /// Hovering over a menu bar item (menu_index)
14    MenuBarItem(usize),
15    /// Hovering over a menu dropdown item (menu_index, item_index)
16    MenuDropdownItem(usize, usize),
17    /// Hovering over a submenu item (depth, item_index) - depth 1+ for nested submenus
18    SubmenuItem(usize, usize),
19    /// Hovering over a popup list item (popup_index in stack, item_index)
20    PopupListItem(usize, usize),
21    /// Hovering over a suggestion item (item_index)
22    SuggestionItem(usize),
23    /// Hovering over the file explorer border (for resize)
24    FileExplorerBorder,
25    /// Hovering over a file browser navigation shortcut
26    FileBrowserNavShortcut(usize),
27    /// Hovering over a file browser file/directory entry
28    FileBrowserEntry(usize),
29    /// Hovering over a file browser column header
30    FileBrowserHeader(SortMode),
31    /// Hovering over the file browser scrollbar
32    FileBrowserScrollbar,
33    /// Hovering over the file browser "Show Hidden" checkbox
34    FileBrowserShowHiddenCheckbox,
35    /// Hovering over the file browser "Detect Encoding" checkbox
36    FileBrowserDetectEncodingCheckbox,
37    /// Hovering over a tab name (target, split_id) - for non-active tabs
38    TabName(crate::view::split::TabTarget, LeafId),
39    /// Hovering over a tab close button (target, split_id)
40    TabCloseButton(crate::view::split::TabTarget, LeafId),
41    /// Hovering over a close split button (split_id)
42    CloseSplitButton(LeafId),
43    /// Hovering over a maximize/unmaximize split button (split_id)
44    MaximizeSplitButton(LeafId),
45    /// Hovering over the file explorer close button
46    FileExplorerCloseButton,
47    /// Hovering over a file explorer item's status indicator (path)
48    FileExplorerStatusIndicator(std::path::PathBuf),
49    /// Hovering over the status bar LSP indicator
50    StatusBarLspIndicator,
51    /// Hovering over the status bar remote-authority indicator
52    StatusBarRemoteIndicator,
53    /// Hovering over the status bar workspace-trust indicator
54    StatusBarTrustIndicator,
55    /// Hovering over the status bar warning badge
56    StatusBarWarningBadge,
57    /// Hovering over the status bar line ending indicator
58    StatusBarLineEndingIndicator,
59    /// Hovering over the status bar encoding indicator
60    StatusBarEncodingIndicator,
61    /// Hovering over the status bar language indicator
62    StatusBarLanguageIndicator,
63    /// Hovering over the search options "Case Sensitive" checkbox
64    SearchOptionCaseSensitive,
65    /// Hovering over the search options "Whole Word" checkbox
66    SearchOptionWholeWord,
67    /// Hovering over the search options "Regex" checkbox
68    SearchOptionRegex,
69    /// Hovering over the search options "Confirm Each" checkbox
70    SearchOptionConfirmEach,
71    /// Hovering over a tab context menu item (item_index)
72    TabContextMenuItem(usize),
73    /// Hovering over a file explorer context menu item (item_index)
74    FileExplorerContextMenuItem(usize),
75    /// Hovering over a "+" new-tab popup menu item (item_index)
76    NewTabMenuItem(usize),
77}