1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Panel input helpers.
//!
//! Re-exports `register_input_coordinator_panel` and provides lightweight
//! helpers for column sort, scroll, and action click.
pub use register_input_coordinator_panel;
use PanelState;
// ---------------------------------------------------------------------------
// Column sort
// ---------------------------------------------------------------------------
/// Handle a column-header click — toggle sort state.
///
/// - If `column_id` is the current sort column → flip `sort_ascending`.
/// - Otherwise → set `sort_column = Some(column_id)`, `sort_ascending = true`.
// ---------------------------------------------------------------------------
// Scroll
// ---------------------------------------------------------------------------
/// Apply a scroll wheel delta (pixels) to the panel scroll state.
///
/// `delta` — positive scrolls down.
/// `content_height` / `viewport_height` — used to clamp the offset.
// ---------------------------------------------------------------------------
// Action click
// ---------------------------------------------------------------------------
/// Handle a header action button click — returns the action id for the caller
/// to dispatch. Clears `hovered_action` on the state.