fui/controls/internal/
pressable_indicator_presenter.rs1use crate::node::FlexBox;
2
3#[derive(Clone, Copy, Debug, PartialEq)]
4pub struct PressableIndicatorMetrics {
5 pub width: f32,
6 pub height: f32,
7}
8
9impl PressableIndicatorMetrics {
10 pub const fn new(width: f32, height: f32) -> Self {
11 Self { width, height }
12 }
13}
14
15#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
16pub struct PressableIndicatorVisualState {
17 pub hovered: bool,
18 pub pressed: bool,
19 pub focused: bool,
20 pub enabled: bool,
21}
22
23pub trait PressableIndicatorPresenter {
24 fn root(&self) -> FlexBox;
25 fn metrics(&self) -> PressableIndicatorMetrics;
26}