Skip to main content

ferroui_controls/
selection_mode.rs

1use bitflags::bitflags;
2
3bitflags! {
4    /// Defines the selection mode for a control which can select multiple
5    /// items.
6    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
7    pub struct SelectionMode: i32 {
8        /// One item can be selected.
9        const SINGLE = 0x00;
10
11        /// Multiple items can be selected.
12        const MULTIPLE = 0x01;
13
14        /// Item selection can be toggled by tapping/spacebar.
15        const TOGGLE = 0x02;
16
17        /// An item will always be selected as long as there are items to
18        /// select.
19        const ALWAYS_SELECTED = 0x04;
20    }
21}