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