repose_core/
semantics.rs

1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2pub enum Role {
3    Text,
4    Button,
5    TextField,
6    Container,
7    Checkbox,
8    RadioButton,
9    Switch,
10    Slider,
11    ProgressBar,
12}
13
14#[derive(Clone, Debug)]
15pub struct Semantics {
16    pub role: Role,
17    pub label: Option<String>,
18    pub focused: bool,
19    pub enabled: bool,
20}
21
22impl Semantics {
23    pub fn new(role: Role) -> Self {
24        Self {
25            role,
26            label: None,
27            focused: false,
28            enabled: true,
29        }
30    }
31}