pub struct AccessibilityBuilder { /* private fields */ }Implementations§
Source§impl AccessibilityBuilder
impl AccessibilityBuilder
pub fn new(root: Window) -> Self
pub fn exclude_widget<W: WidgetExt>(self, w: &W) -> Self
pub fn exclude_subtree<W: WidgetExt>(self, w: &W) -> Self
pub fn exclude_type<T: WidgetBase>(self) -> Self
pub fn exclude_if(self, pred: impl Fn(&Widget) -> bool + 'static) -> Self
Sourcepub fn attach(self) -> AccessibilityContext
pub fn attach(self) -> AccessibilityContext
Examples found in repository?
examples/custom_widget.rs (line 55)
42fn main() {
43 let a = app::App::default();
44 let mut w = window::Window::default()
45 .with_size(400, 300)
46 .with_label("Hello Window");
47 let col = group::Flex::default_fill().column();
48 let mut b1 = MyButton::new("Click 1");
49 let mut b2 = MyButton::new("Click 2");
50 b2.set_callback(|_| println!("clicked 2"));
51 col.end();
52 w.end();
53 w.show();
54
55 let ac = builder(w).attach();
56
57 b1.set_callback(|_| println!("clicked 1"));
58
59 a.run_with_accessibility(ac).unwrap();
60}More examples
examples/example2.rs (line 20)
6fn main() {
7 let a = app::App::default();
8 let mut w = window::Window::default()
9 .with_size(400, 300)
10 .with_label("Hello Window");
11 let col = group::Flex::default_fill().column();
12 let _b1 = button::Button::default().with_label("Increment");
13 let _f = frame::Frame::default().with_label("0");
14 let _b2 = button::Button::default().with_label("Decrement");
15 col.end();
16 w.end();
17 w.make_resizable(true);
18 w.show();
19
20 let ac = builder(w).attach();
21
22 a.run_with_accessibility(ac).unwrap();
23}examples/form.rs (line 27)
6fn main() {
7 let a = app::App::default().with_scheme(app::Scheme::Oxy);
8 let mut w = window::Window::default()
9 .with_size(400, 300)
10 .with_label("Hello fltk-accesskit");
11 let col = group::Flex::default()
12 .with_size(200, 100)
13 .center_of_parent()
14 .column();
15 let _inp = input::Input::default()
16 .with_id("inp")
17 .with_label("Enter name:");
18 let mut btn = button::Button::default().with_label("Greet");
19 let _out = output::Output::default().with_id("out");
20 col.end();
21 w.end();
22 w.make_resizable(true);
23 w.show();
24
25 btn.set_callback(btn_callback);
26
27 let ac = builder(w).attach();
28
29 a.run_with_accessibility(ac).unwrap();
30}Auto Trait Implementations§
impl Freeze for AccessibilityBuilder
impl !RefUnwindSafe for AccessibilityBuilder
impl !Send for AccessibilityBuilder
impl !Sync for AccessibilityBuilder
impl Unpin for AccessibilityBuilder
impl UnsafeUnpin for AccessibilityBuilder
impl !UnwindSafe for AccessibilityBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more