sequoia_layout/overflow.rs
1#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
2#[non_exhaustive]
3pub enum Overflow {
4 #[default]
5 Visible,
6 Hidden,
7
8 Scroll,
9
10 Auto,
11}
12
13impl Overflow {
14 pub fn clips(self) -> bool {
15 matches!(self, Self::Hidden | Self::Scroll | Self::Auto)
16 }
17
18 pub fn is_scrollable(self) -> bool {
19 matches!(self, Self::Scroll | Self::Auto)
20 }
21
22 pub const fn is_visible(self) -> bool {
23 matches!(self, Self::Visible)
24 }
25}