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 tree_table;
43mod tree_view;
44mod virtual_list;
45mod virtual_table;
46mod virtual_tree_table;
47mod virtual_tree_view;
48mod xypad;
49
50pub use accordion::*;
51pub use avatar::*;
52pub use badge::*;
53pub use button::*;
54pub use calendar::*;
55pub use card::*;
56pub use checkbox::*;
57pub use chip::*;
58pub use collapsible::*;
59pub use combobox::*;
60pub use divider::*;
61pub use dropdown::*;
62pub use element::*;
63pub use frame::*;
64pub use grid::*;
65pub use image::*;
66pub use knob::*;
67pub use label::*;
68pub use list::*;
69#[cfg(feature = "markdown")]
70pub use markdown::*;
71pub use menu::*;
72pub use popup::*;
73pub use progressbar::*;
74pub use radio::*;
75pub use rating::*;
76pub use resizable::*;
77pub use scrollbar::*;
78pub use scrollview::*;
79pub use select::*;
80pub use sidebar::*;
81pub use slider::*;
82pub use spinbox::*;
83pub use stack::*;
84pub use switch::*;
85pub use table::*;
86pub use tabview::*;
87pub use textbox::*;
88pub use toggle_button::*;
89pub use tooltip::*;
90pub use tree_table::*;
91pub use tree_view::*;
92pub use virtual_list::*;
93pub use virtual_table::*;
94pub use virtual_tree_table::*;
95pub use virtual_tree_view::*;
96pub use xypad::*;
97
98use crate::prelude::*;
99
100/// The orientation of a widget, such as a slider or scrollbar
101#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
102pub enum Orientation {
103    #[default]
104    /// A horizontal orientation.
105    Horizontal,
106    /// A vertical orientation.
107    Vertical,
108}
109
110impl_res_simple!(Orientation);
111
112/// Describes the placement of a view relative to its parent element.
113#[derive(Debug, Clone, Copy, PartialEq, Eq)]
114pub enum Placement {
115    /// The view should be placed above its parent with its left edge aligned with the left edge of its parent.
116    TopStart,
117    /// The view should be placed above its parent with its center aligned with the center of its parent.
118    Top,
119    /// The view should be placed above its parent with its right edge aligned with the right edge of its parent.
120    TopEnd,
121    /// The view should be placed below its parent with its left edge aligned with the left edge of its parent.
122    BottomStart,
123    /// The view should be placed below its parent with its center aligned with the center of its parent.
124    Bottom,
125    /// The view should be placed below its parent with its right edge aligned with the right edge of its parent.
126    BottomEnd,
127    /// The view should be placed to the right of its parent with its top edge aligned with the top edge of its parent.
128    RightStart,
129    /// The view should be placed to the right of its parent with its center aligned with the center of its parent.
130    Right,
131    /// The view should be placed to the right of its parent with its bottom edge aligned with the bottom edge of its parent.
132    RightEnd,
133    /// The view should be placed to the left of its parent with its top edge aligned with the top edge of its parent.
134    LeftStart,
135    /// The view should be placed to the left of its parent with its center aligned with the center of its parent.
136    Left,
137    /// The view should be placed to the left of its parent with its bottom edge aligned with the bottom edge of its parent.
138    LeftEnd,
139    /// The view should be placed over its parent.
140    Over,
141    /// The view should follow the cursor.
142    Cursor,
143}
144
145impl_res_simple!(Placement);