cursive_core/views/
mod.rs1#[macro_export]
20macro_rules! impl_enabled {
21 (self.$x:ident) => {
22 pub fn disable(&mut self) {
26 self.$x = false;
27 }
28
29 #[must_use]
33 pub fn disabled(self) -> Self {
34 use $crate::traits::With as _;
35 self.with(Self::disable)
36 }
37
38 pub fn enable(&mut self) {
40 self.$x = true;
41 }
42
43 pub fn set_enabled(&mut self, enabled: bool) {
45 self.$x = enabled;
46 }
47
48 #[must_use]
52 pub fn with_enabled(mut self, is_enabled: bool) -> Self {
53 self.set_enabled(is_enabled);
54 self
55 }
56
57 pub fn is_enabled(&self) -> bool {
59 self.$x
60 }
61 };
62}
63
64mod boxed_view;
65mod button;
66mod canvas;
67mod checkbox;
68mod circular_focus;
69mod debug_view;
70mod dialog;
71mod dummy;
72mod edit_view;
73mod enableable_view;
74mod fixed_layout;
75mod focus_tracker;
76mod gradient_view;
77mod hideable_view;
78mod last_size_view;
79mod layer;
80mod linear_layout;
81mod list_view;
82mod menu_popup;
83mod menubar;
84mod named_view;
85mod on_event_view;
86mod on_layout_view;
87mod padded_view;
88mod panel;
89mod progress_bar;
90mod radio;
91mod resized_view;
92mod screens_view;
93mod scroll_view;
94mod select_view;
95mod shadow_view;
96mod slider_view;
97pub mod stack_view;
98mod text_area;
99mod text_view;
100mod themed_view;
101mod tracked_view;
102
103pub use self::{
104 boxed_view::BoxedView,
105 button::Button,
106 canvas::Canvas,
107 checkbox::Checkbox,
108 circular_focus::CircularFocus,
109 debug_view::DebugView,
110 dialog::{Dialog, DialogFocus},
111 dummy::DummyView,
112 edit_view::EditView,
113 enableable_view::EnableableView,
114 fixed_layout::FixedLayout,
115 focus_tracker::FocusTracker,
116 gradient_view::GradientView,
117 hideable_view::HideableView,
118 last_size_view::LastSizeView,
119 layer::Layer,
120 linear_layout::LinearLayout,
121 list_view::{ListChild, ListView},
122 menu_popup::MenuPopup,
123 menubar::Menubar,
124 named_view::{NamedView, ViewRef},
125 on_event_view::OnEventView,
126 on_layout_view::OnLayoutView,
127 padded_view::PaddedView,
128 panel::Panel,
129 progress_bar::ProgressBar,
130 radio::{RadioButton, RadioGroup},
131 resized_view::ResizedView,
132 screens_view::ScreensView,
133 scroll_view::ScrollView,
134 select_view::SelectView,
135 shadow_view::ShadowView,
136 slider_view::SliderView,
137 stack_view::{LayerPosition, StackView},
138 text_area::TextArea,
139 text_view::{TextContent, TextContentRef, TextView},
140 themed_view::ThemedView,
141 tracked_view::TrackedView,
142};