Skip to main content

vizia_core/views/
mod.rs

1//! Built-in views provided by vizia.
2
3mod accordion;
4mod avatar;
5mod badge;
6mod button;
7mod calendar;
8mod card;
9mod checkbox;
10mod chip;
11mod collapsible;
12mod combobox;
13mod divider;
14mod dropdown;
15mod element;
16mod frame;
17mod grid;
18mod image;
19mod knob;
20mod label;
21mod list;
22mod markdown;
23mod menu;
24mod popup;
25mod progressbar;
26mod radio;
27mod rating;
28mod resizable;
29mod scrollbar;
30mod scrollview;
31mod select;
32mod sidebar;
33mod slider;
34mod spinbox;
35mod stack;
36mod switch;
37mod table;
38mod tabview;
39mod textbox;
40mod toggle_button;
41mod tooltip;
42mod virtual_list;
43mod virtual_table;
44mod xypad;
45
46pub use accordion::*;
47pub use avatar::*;
48pub use badge::*;
49pub use button::*;
50pub use calendar::*;
51pub use card::*;
52pub use checkbox::*;
53pub use chip::*;
54pub use collapsible::*;
55pub use combobox::*;
56pub use divider::*;
57pub use dropdown::*;
58pub use element::*;
59pub use frame::*;
60pub use grid::*;
61pub use image::*;
62pub use knob::*;
63pub use label::*;
64pub use list::*;
65#[cfg(feature = "markdown")]
66pub use markdown::*;
67pub use menu::*;
68pub use popup::*;
69pub use progressbar::*;
70pub use radio::*;
71pub use rating::*;
72pub use resizable::*;
73pub use scrollbar::*;
74pub use scrollview::*;
75pub use select::*;
76pub use sidebar::*;
77pub use slider::*;
78pub use spinbox::*;
79pub use stack::*;
80pub use switch::*;
81pub use table::*;
82pub use tabview::*;
83pub use textbox::*;
84pub use toggle_button::*;
85pub use tooltip::*;
86pub use virtual_list::*;
87pub use virtual_table::*;
88pub use xypad::*;
89
90use crate::prelude::*;
91
92/// The orientation of a widget, such as a slider or scrollbar
93#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
94pub enum Orientation {
95    #[default]
96    /// A horizontal orientation.
97    Horizontal,
98    /// A vertical orientation.
99    Vertical,
100}
101
102impl_res_simple!(Orientation);
103
104/// Describes the placement of a view relative to its parent element.
105#[derive(Debug, Clone, Copy, PartialEq, Eq)]
106pub enum Placement {
107    /// The view should be placed above its parent with its left edge aligned with the left edge of its parent.
108    TopStart,
109    /// The view should be placed above its parent with its center aligned with the center of its parent.
110    Top,
111    /// The view should be placed above its parent with its right edge aligned with the right edge of its parent.
112    TopEnd,
113    /// The view should be placed below its parent with its left edge aligned with the left edge of its parent.
114    BottomStart,
115    /// The view should be placed below its parent with its center aligned with the center of its parent.
116    Bottom,
117    /// The view should be placed below its parent with its right edge aligned with the right edge of its parent.
118    BottomEnd,
119    /// The view should be placed to the right of its parent with its top edge aligned with the top edge of its parent.
120    RightStart,
121    /// The view should be placed to the right of its parent with its center aligned with the center of its parent.
122    Right,
123    /// The view should be placed to the right of its parent with its bottom edge aligned with the bottom edge of its parent.
124    RightEnd,
125    /// The view should be placed to the left of its parent with its top edge aligned with the top edge of its parent.
126    LeftStart,
127    /// The view should be placed to the left of its parent with its center aligned with the center of its parent.
128    Left,
129    /// The view should be placed to the left of its parent with its bottom edge aligned with the bottom edge of its parent.
130    LeftEnd,
131    /// The view should be placed over its parent.
132    Over,
133    /// The view should follow the cursor.
134    Cursor,
135}
136
137impl_res_simple!(Placement);