1use crate::{
6 ffi, Accessible, AccessibleRole, Align, Buildable, ConstraintTarget, LayoutManager, Overflow,
7 SelectionModel, StackPage, StackTransitionType, Widget,
8};
9use glib::{
10 prelude::*,
11 signal::{connect_raw, SignalHandlerId},
12 translate::*,
13};
14use std::boxed::Box as Box_;
15
16glib::wrapper! {
17 #[doc(alias = "GtkStack")]
18 pub struct Stack(Object<ffi::GtkStack>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget;
19
20 match fn {
21 type_ => || ffi::gtk_stack_get_type(),
22 }
23}
24
25impl Stack {
26 #[doc(alias = "gtk_stack_new")]
27 pub fn new() -> Stack {
28 assert_initialized_main_thread!();
29 unsafe { Widget::from_glib_none(ffi::gtk_stack_new()).unsafe_cast() }
30 }
31
32 pub fn builder() -> StackBuilder {
37 StackBuilder::new()
38 }
39
40 #[doc(alias = "gtk_stack_add_child")]
41 pub fn add_child(&self, child: &impl IsA<Widget>) -> StackPage {
42 unsafe {
43 from_glib_none(ffi::gtk_stack_add_child(
44 self.to_glib_none().0,
45 child.as_ref().to_glib_none().0,
46 ))
47 }
48 }
49
50 #[doc(alias = "gtk_stack_add_named")]
51 pub fn add_named(&self, child: &impl IsA<Widget>, name: Option<&str>) -> StackPage {
52 unsafe {
53 from_glib_none(ffi::gtk_stack_add_named(
54 self.to_glib_none().0,
55 child.as_ref().to_glib_none().0,
56 name.to_glib_none().0,
57 ))
58 }
59 }
60
61 #[doc(alias = "gtk_stack_add_titled")]
62 pub fn add_titled(
63 &self,
64 child: &impl IsA<Widget>,
65 name: Option<&str>,
66 title: &str,
67 ) -> StackPage {
68 unsafe {
69 from_glib_none(ffi::gtk_stack_add_titled(
70 self.to_glib_none().0,
71 child.as_ref().to_glib_none().0,
72 name.to_glib_none().0,
73 title.to_glib_none().0,
74 ))
75 }
76 }
77
78 #[doc(alias = "gtk_stack_get_child_by_name")]
79 #[doc(alias = "get_child_by_name")]
80 pub fn child_by_name(&self, name: &str) -> Option<Widget> {
81 unsafe {
82 from_glib_none(ffi::gtk_stack_get_child_by_name(
83 self.to_glib_none().0,
84 name.to_glib_none().0,
85 ))
86 }
87 }
88
89 #[doc(alias = "gtk_stack_get_hhomogeneous")]
90 #[doc(alias = "get_hhomogeneous")]
91 #[doc(alias = "hhomogeneous")]
92 pub fn is_hhomogeneous(&self) -> bool {
93 unsafe { from_glib(ffi::gtk_stack_get_hhomogeneous(self.to_glib_none().0)) }
94 }
95
96 #[doc(alias = "gtk_stack_get_interpolate_size")]
97 #[doc(alias = "get_interpolate_size")]
98 #[doc(alias = "interpolate-size")]
99 pub fn interpolates_size(&self) -> bool {
100 unsafe { from_glib(ffi::gtk_stack_get_interpolate_size(self.to_glib_none().0)) }
101 }
102
103 #[doc(alias = "gtk_stack_get_page")]
104 #[doc(alias = "get_page")]
105 pub fn page(&self, child: &impl IsA<Widget>) -> StackPage {
106 unsafe {
107 from_glib_none(ffi::gtk_stack_get_page(
108 self.to_glib_none().0,
109 child.as_ref().to_glib_none().0,
110 ))
111 }
112 }
113
114 #[doc(alias = "gtk_stack_get_pages")]
115 #[doc(alias = "get_pages")]
116 pub fn pages(&self) -> SelectionModel {
117 unsafe { from_glib_full(ffi::gtk_stack_get_pages(self.to_glib_none().0)) }
118 }
119
120 #[doc(alias = "gtk_stack_get_transition_duration")]
121 #[doc(alias = "get_transition_duration")]
122 #[doc(alias = "transition-duration")]
123 pub fn transition_duration(&self) -> u32 {
124 unsafe { ffi::gtk_stack_get_transition_duration(self.to_glib_none().0) }
125 }
126
127 #[doc(alias = "gtk_stack_get_transition_running")]
128 #[doc(alias = "get_transition_running")]
129 #[doc(alias = "transition-running")]
130 pub fn is_transition_running(&self) -> bool {
131 unsafe { from_glib(ffi::gtk_stack_get_transition_running(self.to_glib_none().0)) }
132 }
133
134 #[doc(alias = "gtk_stack_get_transition_type")]
135 #[doc(alias = "get_transition_type")]
136 #[doc(alias = "transition-type")]
137 pub fn transition_type(&self) -> StackTransitionType {
138 unsafe { from_glib(ffi::gtk_stack_get_transition_type(self.to_glib_none().0)) }
139 }
140
141 #[doc(alias = "gtk_stack_get_vhomogeneous")]
142 #[doc(alias = "get_vhomogeneous")]
143 #[doc(alias = "vhomogeneous")]
144 pub fn is_vhomogeneous(&self) -> bool {
145 unsafe { from_glib(ffi::gtk_stack_get_vhomogeneous(self.to_glib_none().0)) }
146 }
147
148 #[doc(alias = "gtk_stack_get_visible_child")]
149 #[doc(alias = "get_visible_child")]
150 #[doc(alias = "visible-child")]
151 pub fn visible_child(&self) -> Option<Widget> {
152 unsafe { from_glib_none(ffi::gtk_stack_get_visible_child(self.to_glib_none().0)) }
153 }
154
155 #[doc(alias = "gtk_stack_get_visible_child_name")]
156 #[doc(alias = "get_visible_child_name")]
157 #[doc(alias = "visible-child-name")]
158 pub fn visible_child_name(&self) -> Option<glib::GString> {
159 unsafe { from_glib_none(ffi::gtk_stack_get_visible_child_name(self.to_glib_none().0)) }
160 }
161
162 #[doc(alias = "gtk_stack_remove")]
163 pub fn remove(&self, child: &impl IsA<Widget>) {
164 unsafe {
165 ffi::gtk_stack_remove(self.to_glib_none().0, child.as_ref().to_glib_none().0);
166 }
167 }
168
169 #[doc(alias = "gtk_stack_set_hhomogeneous")]
170 #[doc(alias = "hhomogeneous")]
171 pub fn set_hhomogeneous(&self, hhomogeneous: bool) {
172 unsafe {
173 ffi::gtk_stack_set_hhomogeneous(self.to_glib_none().0, hhomogeneous.into_glib());
174 }
175 }
176
177 #[doc(alias = "gtk_stack_set_interpolate_size")]
178 #[doc(alias = "interpolate-size")]
179 pub fn set_interpolate_size(&self, interpolate_size: bool) {
180 unsafe {
181 ffi::gtk_stack_set_interpolate_size(
182 self.to_glib_none().0,
183 interpolate_size.into_glib(),
184 );
185 }
186 }
187
188 #[doc(alias = "gtk_stack_set_transition_duration")]
189 #[doc(alias = "transition-duration")]
190 pub fn set_transition_duration(&self, duration: u32) {
191 unsafe {
192 ffi::gtk_stack_set_transition_duration(self.to_glib_none().0, duration);
193 }
194 }
195
196 #[doc(alias = "gtk_stack_set_transition_type")]
197 #[doc(alias = "transition-type")]
198 pub fn set_transition_type(&self, transition: StackTransitionType) {
199 unsafe {
200 ffi::gtk_stack_set_transition_type(self.to_glib_none().0, transition.into_glib());
201 }
202 }
203
204 #[doc(alias = "gtk_stack_set_vhomogeneous")]
205 #[doc(alias = "vhomogeneous")]
206 pub fn set_vhomogeneous(&self, vhomogeneous: bool) {
207 unsafe {
208 ffi::gtk_stack_set_vhomogeneous(self.to_glib_none().0, vhomogeneous.into_glib());
209 }
210 }
211
212 #[doc(alias = "gtk_stack_set_visible_child")]
213 #[doc(alias = "visible-child")]
214 pub fn set_visible_child(&self, child: &impl IsA<Widget>) {
215 unsafe {
216 ffi::gtk_stack_set_visible_child(
217 self.to_glib_none().0,
218 child.as_ref().to_glib_none().0,
219 );
220 }
221 }
222
223 #[doc(alias = "gtk_stack_set_visible_child_full")]
224 pub fn set_visible_child_full(&self, name: &str, transition: StackTransitionType) {
225 unsafe {
226 ffi::gtk_stack_set_visible_child_full(
227 self.to_glib_none().0,
228 name.to_glib_none().0,
229 transition.into_glib(),
230 );
231 }
232 }
233
234 #[doc(alias = "gtk_stack_set_visible_child_name")]
235 #[doc(alias = "visible-child-name")]
236 pub fn set_visible_child_name(&self, name: &str) {
237 unsafe {
238 ffi::gtk_stack_set_visible_child_name(self.to_glib_none().0, name.to_glib_none().0);
239 }
240 }
241
242 #[doc(alias = "hhomogeneous")]
243 pub fn connect_hhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
244 unsafe extern "C" fn notify_hhomogeneous_trampoline<F: Fn(&Stack) + 'static>(
245 this: *mut ffi::GtkStack,
246 _param_spec: glib::ffi::gpointer,
247 f: glib::ffi::gpointer,
248 ) {
249 let f: &F = &*(f as *const F);
250 f(&from_glib_borrow(this))
251 }
252 unsafe {
253 let f: Box_<F> = Box_::new(f);
254 connect_raw(
255 self.as_ptr() as *mut _,
256 b"notify::hhomogeneous\0".as_ptr() as *const _,
257 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
258 notify_hhomogeneous_trampoline::<F> as *const (),
259 )),
260 Box_::into_raw(f),
261 )
262 }
263 }
264
265 #[doc(alias = "interpolate-size")]
266 pub fn connect_interpolate_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
267 unsafe extern "C" fn notify_interpolate_size_trampoline<F: Fn(&Stack) + 'static>(
268 this: *mut ffi::GtkStack,
269 _param_spec: glib::ffi::gpointer,
270 f: glib::ffi::gpointer,
271 ) {
272 let f: &F = &*(f as *const F);
273 f(&from_glib_borrow(this))
274 }
275 unsafe {
276 let f: Box_<F> = Box_::new(f);
277 connect_raw(
278 self.as_ptr() as *mut _,
279 b"notify::interpolate-size\0".as_ptr() as *const _,
280 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
281 notify_interpolate_size_trampoline::<F> as *const (),
282 )),
283 Box_::into_raw(f),
284 )
285 }
286 }
287
288 #[doc(alias = "pages")]
289 pub fn connect_pages_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
290 unsafe extern "C" fn notify_pages_trampoline<F: Fn(&Stack) + 'static>(
291 this: *mut ffi::GtkStack,
292 _param_spec: glib::ffi::gpointer,
293 f: glib::ffi::gpointer,
294 ) {
295 let f: &F = &*(f as *const F);
296 f(&from_glib_borrow(this))
297 }
298 unsafe {
299 let f: Box_<F> = Box_::new(f);
300 connect_raw(
301 self.as_ptr() as *mut _,
302 b"notify::pages\0".as_ptr() as *const _,
303 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
304 notify_pages_trampoline::<F> as *const (),
305 )),
306 Box_::into_raw(f),
307 )
308 }
309 }
310
311 #[doc(alias = "transition-duration")]
312 pub fn connect_transition_duration_notify<F: Fn(&Self) + 'static>(
313 &self,
314 f: F,
315 ) -> SignalHandlerId {
316 unsafe extern "C" fn notify_transition_duration_trampoline<F: Fn(&Stack) + 'static>(
317 this: *mut ffi::GtkStack,
318 _param_spec: glib::ffi::gpointer,
319 f: glib::ffi::gpointer,
320 ) {
321 let f: &F = &*(f as *const F);
322 f(&from_glib_borrow(this))
323 }
324 unsafe {
325 let f: Box_<F> = Box_::new(f);
326 connect_raw(
327 self.as_ptr() as *mut _,
328 b"notify::transition-duration\0".as_ptr() as *const _,
329 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
330 notify_transition_duration_trampoline::<F> as *const (),
331 )),
332 Box_::into_raw(f),
333 )
334 }
335 }
336
337 #[doc(alias = "transition-running")]
338 pub fn connect_transition_running_notify<F: Fn(&Self) + 'static>(
339 &self,
340 f: F,
341 ) -> SignalHandlerId {
342 unsafe extern "C" fn notify_transition_running_trampoline<F: Fn(&Stack) + 'static>(
343 this: *mut ffi::GtkStack,
344 _param_spec: glib::ffi::gpointer,
345 f: glib::ffi::gpointer,
346 ) {
347 let f: &F = &*(f as *const F);
348 f(&from_glib_borrow(this))
349 }
350 unsafe {
351 let f: Box_<F> = Box_::new(f);
352 connect_raw(
353 self.as_ptr() as *mut _,
354 b"notify::transition-running\0".as_ptr() as *const _,
355 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
356 notify_transition_running_trampoline::<F> as *const (),
357 )),
358 Box_::into_raw(f),
359 )
360 }
361 }
362
363 #[doc(alias = "transition-type")]
364 pub fn connect_transition_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
365 unsafe extern "C" fn notify_transition_type_trampoline<F: Fn(&Stack) + 'static>(
366 this: *mut ffi::GtkStack,
367 _param_spec: glib::ffi::gpointer,
368 f: glib::ffi::gpointer,
369 ) {
370 let f: &F = &*(f as *const F);
371 f(&from_glib_borrow(this))
372 }
373 unsafe {
374 let f: Box_<F> = Box_::new(f);
375 connect_raw(
376 self.as_ptr() as *mut _,
377 b"notify::transition-type\0".as_ptr() as *const _,
378 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
379 notify_transition_type_trampoline::<F> as *const (),
380 )),
381 Box_::into_raw(f),
382 )
383 }
384 }
385
386 #[doc(alias = "vhomogeneous")]
387 pub fn connect_vhomogeneous_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
388 unsafe extern "C" fn notify_vhomogeneous_trampoline<F: Fn(&Stack) + 'static>(
389 this: *mut ffi::GtkStack,
390 _param_spec: glib::ffi::gpointer,
391 f: glib::ffi::gpointer,
392 ) {
393 let f: &F = &*(f as *const F);
394 f(&from_glib_borrow(this))
395 }
396 unsafe {
397 let f: Box_<F> = Box_::new(f);
398 connect_raw(
399 self.as_ptr() as *mut _,
400 b"notify::vhomogeneous\0".as_ptr() as *const _,
401 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
402 notify_vhomogeneous_trampoline::<F> as *const (),
403 )),
404 Box_::into_raw(f),
405 )
406 }
407 }
408
409 #[doc(alias = "visible-child")]
410 pub fn connect_visible_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
411 unsafe extern "C" fn notify_visible_child_trampoline<F: Fn(&Stack) + 'static>(
412 this: *mut ffi::GtkStack,
413 _param_spec: glib::ffi::gpointer,
414 f: glib::ffi::gpointer,
415 ) {
416 let f: &F = &*(f as *const F);
417 f(&from_glib_borrow(this))
418 }
419 unsafe {
420 let f: Box_<F> = Box_::new(f);
421 connect_raw(
422 self.as_ptr() as *mut _,
423 b"notify::visible-child\0".as_ptr() as *const _,
424 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
425 notify_visible_child_trampoline::<F> as *const (),
426 )),
427 Box_::into_raw(f),
428 )
429 }
430 }
431
432 #[doc(alias = "visible-child-name")]
433 pub fn connect_visible_child_name_notify<F: Fn(&Self) + 'static>(
434 &self,
435 f: F,
436 ) -> SignalHandlerId {
437 unsafe extern "C" fn notify_visible_child_name_trampoline<F: Fn(&Stack) + 'static>(
438 this: *mut ffi::GtkStack,
439 _param_spec: glib::ffi::gpointer,
440 f: glib::ffi::gpointer,
441 ) {
442 let f: &F = &*(f as *const F);
443 f(&from_glib_borrow(this))
444 }
445 unsafe {
446 let f: Box_<F> = Box_::new(f);
447 connect_raw(
448 self.as_ptr() as *mut _,
449 b"notify::visible-child-name\0".as_ptr() as *const _,
450 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
451 notify_visible_child_name_trampoline::<F> as *const (),
452 )),
453 Box_::into_raw(f),
454 )
455 }
456 }
457}
458
459impl Default for Stack {
460 fn default() -> Self {
461 Self::new()
462 }
463}
464
465#[must_use = "The builder must be built to be used"]
470pub struct StackBuilder {
471 builder: glib::object::ObjectBuilder<'static, Stack>,
472}
473
474impl StackBuilder {
475 fn new() -> Self {
476 Self {
477 builder: glib::object::Object::builder(),
478 }
479 }
480
481 pub fn hhomogeneous(self, hhomogeneous: bool) -> Self {
482 Self {
483 builder: self.builder.property("hhomogeneous", hhomogeneous),
484 }
485 }
486
487 pub fn interpolate_size(self, interpolate_size: bool) -> Self {
488 Self {
489 builder: self.builder.property("interpolate-size", interpolate_size),
490 }
491 }
492
493 pub fn transition_duration(self, transition_duration: u32) -> Self {
494 Self {
495 builder: self
496 .builder
497 .property("transition-duration", transition_duration),
498 }
499 }
500
501 pub fn transition_type(self, transition_type: StackTransitionType) -> Self {
502 Self {
503 builder: self.builder.property("transition-type", transition_type),
504 }
505 }
506
507 pub fn vhomogeneous(self, vhomogeneous: bool) -> Self {
508 Self {
509 builder: self.builder.property("vhomogeneous", vhomogeneous),
510 }
511 }
512
513 pub fn visible_child(self, visible_child: &impl IsA<Widget>) -> Self {
514 Self {
515 builder: self
516 .builder
517 .property("visible-child", visible_child.clone().upcast()),
518 }
519 }
520
521 pub fn visible_child_name(self, visible_child_name: impl Into<glib::GString>) -> Self {
522 Self {
523 builder: self
524 .builder
525 .property("visible-child-name", visible_child_name.into()),
526 }
527 }
528
529 pub fn can_focus(self, can_focus: bool) -> Self {
530 Self {
531 builder: self.builder.property("can-focus", can_focus),
532 }
533 }
534
535 pub fn can_target(self, can_target: bool) -> Self {
536 Self {
537 builder: self.builder.property("can-target", can_target),
538 }
539 }
540
541 pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
542 Self {
543 builder: self.builder.property("css-classes", css_classes.into()),
544 }
545 }
546
547 pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
548 Self {
549 builder: self.builder.property("css-name", css_name.into()),
550 }
551 }
552
553 pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
554 Self {
555 builder: self.builder.property("cursor", cursor.clone()),
556 }
557 }
558
559 pub fn focus_on_click(self, focus_on_click: bool) -> Self {
560 Self {
561 builder: self.builder.property("focus-on-click", focus_on_click),
562 }
563 }
564
565 pub fn focusable(self, focusable: bool) -> Self {
566 Self {
567 builder: self.builder.property("focusable", focusable),
568 }
569 }
570
571 pub fn halign(self, halign: Align) -> Self {
572 Self {
573 builder: self.builder.property("halign", halign),
574 }
575 }
576
577 pub fn has_tooltip(self, has_tooltip: bool) -> Self {
578 Self {
579 builder: self.builder.property("has-tooltip", has_tooltip),
580 }
581 }
582
583 pub fn height_request(self, height_request: i32) -> Self {
584 Self {
585 builder: self.builder.property("height-request", height_request),
586 }
587 }
588
589 pub fn hexpand(self, hexpand: bool) -> Self {
590 Self {
591 builder: self.builder.property("hexpand", hexpand),
592 }
593 }
594
595 pub fn hexpand_set(self, hexpand_set: bool) -> Self {
596 Self {
597 builder: self.builder.property("hexpand-set", hexpand_set),
598 }
599 }
600
601 pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
602 Self {
603 builder: self
604 .builder
605 .property("layout-manager", layout_manager.clone().upcast()),
606 }
607 }
608
609 #[cfg(feature = "v4_18")]
610 #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
611 pub fn limit_events(self, limit_events: bool) -> Self {
612 Self {
613 builder: self.builder.property("limit-events", limit_events),
614 }
615 }
616
617 pub fn margin_bottom(self, margin_bottom: i32) -> Self {
618 Self {
619 builder: self.builder.property("margin-bottom", margin_bottom),
620 }
621 }
622
623 pub fn margin_end(self, margin_end: i32) -> Self {
624 Self {
625 builder: self.builder.property("margin-end", margin_end),
626 }
627 }
628
629 pub fn margin_start(self, margin_start: i32) -> Self {
630 Self {
631 builder: self.builder.property("margin-start", margin_start),
632 }
633 }
634
635 pub fn margin_top(self, margin_top: i32) -> Self {
636 Self {
637 builder: self.builder.property("margin-top", margin_top),
638 }
639 }
640
641 pub fn name(self, name: impl Into<glib::GString>) -> Self {
642 Self {
643 builder: self.builder.property("name", name.into()),
644 }
645 }
646
647 pub fn opacity(self, opacity: f64) -> Self {
648 Self {
649 builder: self.builder.property("opacity", opacity),
650 }
651 }
652
653 pub fn overflow(self, overflow: Overflow) -> Self {
654 Self {
655 builder: self.builder.property("overflow", overflow),
656 }
657 }
658
659 pub fn receives_default(self, receives_default: bool) -> Self {
660 Self {
661 builder: self.builder.property("receives-default", receives_default),
662 }
663 }
664
665 pub fn sensitive(self, sensitive: bool) -> Self {
666 Self {
667 builder: self.builder.property("sensitive", sensitive),
668 }
669 }
670
671 pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
672 Self {
673 builder: self
674 .builder
675 .property("tooltip-markup", tooltip_markup.into()),
676 }
677 }
678
679 pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
680 Self {
681 builder: self.builder.property("tooltip-text", tooltip_text.into()),
682 }
683 }
684
685 pub fn valign(self, valign: Align) -> Self {
686 Self {
687 builder: self.builder.property("valign", valign),
688 }
689 }
690
691 pub fn vexpand(self, vexpand: bool) -> Self {
692 Self {
693 builder: self.builder.property("vexpand", vexpand),
694 }
695 }
696
697 pub fn vexpand_set(self, vexpand_set: bool) -> Self {
698 Self {
699 builder: self.builder.property("vexpand-set", vexpand_set),
700 }
701 }
702
703 pub fn visible(self, visible: bool) -> Self {
704 Self {
705 builder: self.builder.property("visible", visible),
706 }
707 }
708
709 pub fn width_request(self, width_request: i32) -> Self {
710 Self {
711 builder: self.builder.property("width-request", width_request),
712 }
713 }
714
715 pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
716 Self {
717 builder: self.builder.property("accessible-role", accessible_role),
718 }
719 }
720
721 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
724 pub fn build(self) -> Stack {
725 assert_initialized_main_thread!();
726 self.builder.build()
727 }
728}