libshumate/auto/compass.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::{Viewport, ffi};
7use glib::{
8 prelude::*,
9 signal::{SignalHandlerId, connect_raw},
10 translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15 /// A widget displaying a compass.
16 ///
17 /// # CSS nodes
18 ///
19 /// ```text
20 /// map-compass
21 /// ├── revealer
22 /// ├──── image
23 /// ```
24 ///
25 /// `ShumateCompass` uses a single CSS node with name map-compass. It also uses an
26 /// image named "map-compass".
27 ///
28 /// ## Properties
29 ///
30 ///
31 /// #### `viewport`
32 /// The viewport to use.
33 ///
34 /// Readable | Writeable
35 /// <details><summary><h4>Widget</h4></summary>
36 ///
37 ///
38 /// #### `can-focus`
39 /// Whether the widget or any of its descendents can accept
40 /// the input focus.
41 ///
42 /// This property is meant to be set by widget implementations,
43 /// typically in their instance init function.
44 ///
45 /// Readable | Writeable
46 ///
47 ///
48 /// #### `can-target`
49 /// Whether the widget can receive pointer events.
50 ///
51 /// Readable | Writeable
52 ///
53 ///
54 /// #### `css-classes`
55 /// A list of css classes applied to this widget.
56 ///
57 /// Readable | Writeable
58 ///
59 ///
60 /// #### `css-name`
61 /// The name of this widget in the CSS tree.
62 ///
63 /// This property is meant to be set by widget implementations,
64 /// typically in their instance init function.
65 ///
66 /// Readable | Writeable | Construct Only
67 ///
68 ///
69 /// #### `cursor`
70 /// The cursor used by @widget.
71 ///
72 /// Readable | Writeable
73 ///
74 ///
75 /// #### `focus-on-click`
76 /// Whether the widget should grab focus when it is clicked with the mouse.
77 ///
78 /// This property is only relevant for widgets that can take focus.
79 ///
80 /// Readable | Writeable
81 ///
82 ///
83 /// #### `focusable`
84 /// Whether this widget itself will accept the input focus.
85 ///
86 /// Readable | Writeable
87 ///
88 ///
89 /// #### `halign`
90 /// How to distribute horizontal space if widget gets extra space.
91 ///
92 /// Readable | Writeable
93 ///
94 ///
95 /// #### `has-default`
96 /// Whether the widget is the default widget.
97 ///
98 /// Readable
99 ///
100 ///
101 /// #### `has-focus`
102 /// Whether the widget has the input focus.
103 ///
104 /// Readable
105 ///
106 ///
107 /// #### `has-tooltip`
108 /// Enables or disables the emission of the [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip]
109 /// signal on @widget.
110 ///
111 /// A true value indicates that @widget can have a tooltip, in this case
112 /// the widget will be queried using [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] to
113 /// determine whether it will provide a tooltip or not.
114 ///
115 /// Readable | Writeable
116 ///
117 ///
118 /// #### `height-request`
119 /// Overrides for height request of the widget.
120 ///
121 /// If this is -1, the natural request will be used.
122 ///
123 /// Readable | Writeable
124 ///
125 ///
126 /// #### `hexpand`
127 /// Whether to expand horizontally.
128 ///
129 /// Readable | Writeable
130 ///
131 ///
132 /// #### `hexpand-set`
133 /// Whether to use the `hexpand` property.
134 ///
135 /// Readable | Writeable
136 ///
137 ///
138 /// #### `layout-manager`
139 /// The [`gtk::LayoutManager`][crate::gtk::LayoutManager] instance to use to compute
140 /// the preferred size of the widget, and allocate its children.
141 ///
142 /// This property is meant to be set by widget implementations,
143 /// typically in their instance init function.
144 ///
145 /// Readable | Writeable
146 ///
147 ///
148 /// #### `limit-events`
149 /// Makes this widget act like a modal dialog, with respect to
150 /// event delivery.
151 ///
152 /// Global event controllers will not handle events with targets
153 /// inside the widget, unless they are set up to ignore propagation
154 /// limits. See `Gtk::EventController::set_propagation_limit()`.
155 ///
156 /// Readable | Writeable
157 ///
158 ///
159 /// #### `margin-bottom`
160 /// Margin on bottom side of widget.
161 ///
162 /// This property adds margin outside of the widget's normal size
163 /// request, the margin will be added in addition to the size from
164 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
165 ///
166 /// Readable | Writeable
167 ///
168 ///
169 /// #### `margin-end`
170 /// Margin on end of widget, horizontally.
171 ///
172 /// This property supports left-to-right and right-to-left text
173 /// directions.
174 ///
175 /// This property adds margin outside of the widget's normal size
176 /// request, the margin will be added in addition to the size from
177 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
178 ///
179 /// Readable | Writeable
180 ///
181 ///
182 /// #### `margin-start`
183 /// Margin on start of widget, horizontally.
184 ///
185 /// This property supports left-to-right and right-to-left text
186 /// directions.
187 ///
188 /// This property adds margin outside of the widget's normal size
189 /// request, the margin will be added in addition to the size from
190 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
191 ///
192 /// Readable | Writeable
193 ///
194 ///
195 /// #### `margin-top`
196 /// Margin on top side of widget.
197 ///
198 /// This property adds margin outside of the widget's normal size
199 /// request, the margin will be added in addition to the size from
200 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
201 ///
202 /// Readable | Writeable
203 ///
204 ///
205 /// #### `name`
206 /// The name of the widget.
207 ///
208 /// Readable | Writeable
209 ///
210 ///
211 /// #### `opacity`
212 /// The requested opacity of the widget.
213 ///
214 /// Readable | Writeable
215 ///
216 ///
217 /// #### `overflow`
218 /// How content outside the widget's content area is treated.
219 ///
220 /// This property is meant to be set by widget implementations,
221 /// typically in their instance init function.
222 ///
223 /// Readable | Writeable
224 ///
225 ///
226 /// #### `parent`
227 /// The parent widget of this widget.
228 ///
229 /// Readable
230 ///
231 ///
232 /// #### `receives-default`
233 /// Whether the widget will receive the default action when it is focused.
234 ///
235 /// Readable | Writeable
236 ///
237 ///
238 /// #### `root`
239 /// The `GtkRoot` widget of the widget tree containing this widget.
240 ///
241 /// This will be `NULL` if the widget is not contained in a root widget.
242 ///
243 /// Readable
244 ///
245 ///
246 /// #### `scale-factor`
247 /// The scale factor of the widget.
248 ///
249 /// Readable
250 ///
251 ///
252 /// #### `sensitive`
253 /// Whether the widget responds to input.
254 ///
255 /// Readable | Writeable
256 ///
257 ///
258 /// #### `tooltip-markup`
259 /// Sets the text of tooltip to be the given string, which is marked up
260 /// with Pango markup.
261 ///
262 /// Also see `Gtk::Tooltip::set_markup()`.
263 ///
264 /// This is a convenience property which will take care of getting the
265 /// tooltip shown if the given string is not `NULL`:
266 /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
267 /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
268 /// the default signal handler.
269 ///
270 /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
271 /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
272 ///
273 /// Readable | Writeable
274 ///
275 ///
276 /// #### `tooltip-text`
277 /// Sets the text of tooltip to be the given string.
278 ///
279 /// Also see `Gtk::Tooltip::set_text()`.
280 ///
281 /// This is a convenience property which will take care of getting the
282 /// tooltip shown if the given string is not `NULL`:
283 /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
284 /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
285 /// the default signal handler.
286 ///
287 /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
288 /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
289 ///
290 /// Readable | Writeable
291 ///
292 ///
293 /// #### `valign`
294 /// How to distribute vertical space if widget gets extra space.
295 ///
296 /// Readable | Writeable
297 ///
298 ///
299 /// #### `vexpand`
300 /// Whether to expand vertically.
301 ///
302 /// Readable | Writeable
303 ///
304 ///
305 /// #### `vexpand-set`
306 /// Whether to use the `vexpand` property.
307 ///
308 /// Readable | Writeable
309 ///
310 ///
311 /// #### `visible`
312 /// Whether the widget is visible.
313 ///
314 /// Readable | Writeable
315 ///
316 ///
317 /// #### `width-request`
318 /// Overrides for width request of the widget.
319 ///
320 /// If this is -1, the natural request will be used.
321 ///
322 /// Readable | Writeable
323 /// </details>
324 /// <details><summary><h4>Accessible</h4></summary>
325 ///
326 ///
327 /// #### `accessible-role`
328 /// The accessible role of the given [`gtk::Accessible`][crate::gtk::Accessible] implementation.
329 ///
330 /// The accessible role cannot be changed once set.
331 ///
332 /// Readable | Writeable
333 /// </details>
334 ///
335 /// # Implements
336 ///
337 /// [`trait@gtk::prelude::WidgetExt`], [`trait@glib::ObjectExt`], [`trait@gtk::prelude::AccessibleExt`], [`trait@gtk::prelude::BuildableExt`], [`trait@gtk::prelude::ConstraintTargetExt`]
338 #[doc(alias = "ShumateCompass")]
339 pub struct Compass(Object<ffi::ShumateCompass, ffi::ShumateCompassClass>) @extends gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget;
340
341 match fn {
342 type_ => || ffi::shumate_compass_get_type(),
343 }
344}
345
346impl Compass {
347 /// Creates an instance of #ShumateCompass.
348 /// ## `viewport`
349 /// a #ShumateViewport
350 ///
351 /// # Returns
352 ///
353 /// a new #ShumateCompass.
354 #[doc(alias = "shumate_compass_new")]
355 pub fn new(viewport: Option<&Viewport>) -> Compass {
356 assert_initialized_main_thread!();
357 unsafe { from_glib_none(ffi::shumate_compass_new(viewport.to_glib_none().0)) }
358 }
359
360 // rustdoc-stripper-ignore-next
361 /// Creates a new builder-pattern struct instance to construct [`Compass`] objects.
362 ///
363 /// This method returns an instance of [`CompassBuilder`](crate::builders::CompassBuilder) which can be used to create [`Compass`] objects.
364 pub fn builder() -> CompassBuilder {
365 CompassBuilder::new()
366 }
367
368 /// Gets the viewport used by the compass.
369 ///
370 /// # Returns
371 ///
372 /// The #ShumateViewport used by the compass
373 #[doc(alias = "shumate_compass_get_viewport")]
374 #[doc(alias = "get_viewport")]
375 pub fn viewport(&self) -> Option<Viewport> {
376 unsafe { from_glib_none(ffi::shumate_compass_get_viewport(self.to_glib_none().0)) }
377 }
378
379 /// Sets the compass viewport.
380 /// ## `viewport`
381 /// a [`Viewport`][crate::Viewport]
382 #[doc(alias = "shumate_compass_set_viewport")]
383 #[doc(alias = "viewport")]
384 pub fn set_viewport(&self, viewport: Option<&Viewport>) {
385 unsafe {
386 ffi::shumate_compass_set_viewport(self.to_glib_none().0, viewport.to_glib_none().0);
387 }
388 }
389
390 #[doc(alias = "viewport")]
391 pub fn connect_viewport_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
392 unsafe extern "C" fn notify_viewport_trampoline<F: Fn(&Compass) + 'static>(
393 this: *mut ffi::ShumateCompass,
394 _param_spec: glib::ffi::gpointer,
395 f: glib::ffi::gpointer,
396 ) {
397 unsafe {
398 let f: &F = &*(f as *const F);
399 f(&from_glib_borrow(this))
400 }
401 }
402 unsafe {
403 let f: Box_<F> = Box_::new(f);
404 connect_raw(
405 self.as_ptr() as *mut _,
406 c"notify::viewport".as_ptr(),
407 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
408 notify_viewport_trampoline::<F> as *const (),
409 )),
410 Box_::into_raw(f),
411 )
412 }
413 }
414}
415
416impl Default for Compass {
417 fn default() -> Self {
418 glib::object::Object::new::<Self>()
419 }
420}
421
422// rustdoc-stripper-ignore-next
423/// A [builder-pattern] type to construct [`Compass`] objects.
424///
425/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
426#[must_use = "The builder must be built to be used"]
427pub struct CompassBuilder {
428 builder: glib::object::ObjectBuilder<'static, Compass>,
429}
430
431impl CompassBuilder {
432 fn new() -> Self {
433 Self {
434 builder: glib::object::Object::builder(),
435 }
436 }
437
438 /// The viewport to use.
439 pub fn viewport(self, viewport: &Viewport) -> Self {
440 Self {
441 builder: self.builder.property("viewport", viewport.clone()),
442 }
443 }
444
445 /// Whether the widget or any of its descendents can accept
446 /// the input focus.
447 ///
448 /// This property is meant to be set by widget implementations,
449 /// typically in their instance init function.
450 pub fn can_focus(self, can_focus: bool) -> Self {
451 Self {
452 builder: self.builder.property("can-focus", can_focus),
453 }
454 }
455
456 /// Whether the widget can receive pointer events.
457 pub fn can_target(self, can_target: bool) -> Self {
458 Self {
459 builder: self.builder.property("can-target", can_target),
460 }
461 }
462
463 /// A list of css classes applied to this widget.
464 pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
465 Self {
466 builder: self.builder.property("css-classes", css_classes.into()),
467 }
468 }
469
470 /// The name of this widget in the CSS tree.
471 ///
472 /// This property is meant to be set by widget implementations,
473 /// typically in their instance init function.
474 pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
475 Self {
476 builder: self.builder.property("css-name", css_name.into()),
477 }
478 }
479
480 /// The cursor used by @widget.
481 pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
482 Self {
483 builder: self.builder.property("cursor", cursor.clone()),
484 }
485 }
486
487 /// Whether the widget should grab focus when it is clicked with the mouse.
488 ///
489 /// This property is only relevant for widgets that can take focus.
490 pub fn focus_on_click(self, focus_on_click: bool) -> Self {
491 Self {
492 builder: self.builder.property("focus-on-click", focus_on_click),
493 }
494 }
495
496 /// Whether this widget itself will accept the input focus.
497 pub fn focusable(self, focusable: bool) -> Self {
498 Self {
499 builder: self.builder.property("focusable", focusable),
500 }
501 }
502
503 /// How to distribute horizontal space if widget gets extra space.
504 pub fn halign(self, halign: gtk::Align) -> Self {
505 Self {
506 builder: self.builder.property("halign", halign),
507 }
508 }
509
510 /// Enables or disables the emission of the [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip]
511 /// signal on @widget.
512 ///
513 /// A true value indicates that @widget can have a tooltip, in this case
514 /// the widget will be queried using [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] to
515 /// determine whether it will provide a tooltip or not.
516 pub fn has_tooltip(self, has_tooltip: bool) -> Self {
517 Self {
518 builder: self.builder.property("has-tooltip", has_tooltip),
519 }
520 }
521
522 /// Overrides for height request of the widget.
523 ///
524 /// If this is -1, the natural request will be used.
525 pub fn height_request(self, height_request: i32) -> Self {
526 Self {
527 builder: self.builder.property("height-request", height_request),
528 }
529 }
530
531 /// Whether to expand horizontally.
532 pub fn hexpand(self, hexpand: bool) -> Self {
533 Self {
534 builder: self.builder.property("hexpand", hexpand),
535 }
536 }
537
538 /// Whether to use the `hexpand` property.
539 pub fn hexpand_set(self, hexpand_set: bool) -> Self {
540 Self {
541 builder: self.builder.property("hexpand-set", hexpand_set),
542 }
543 }
544
545 /// The [`gtk::LayoutManager`][crate::gtk::LayoutManager] instance to use to compute
546 /// the preferred size of the widget, and allocate its children.
547 ///
548 /// This property is meant to be set by widget implementations,
549 /// typically in their instance init function.
550 pub fn layout_manager(self, layout_manager: &impl IsA<gtk::LayoutManager>) -> Self {
551 Self {
552 builder: self
553 .builder
554 .property("layout-manager", layout_manager.clone().upcast()),
555 }
556 }
557
558 /// Makes this widget act like a modal dialog, with respect to
559 /// event delivery.
560 ///
561 /// Global event controllers will not handle events with targets
562 /// inside the widget, unless they are set up to ignore propagation
563 /// limits. See `Gtk::EventController::set_propagation_limit()`.
564 #[cfg(feature = "gtk_v4_18")]
565 #[cfg_attr(docsrs, doc(cfg(feature = "gtk_v4_18")))]
566 pub fn limit_events(self, limit_events: bool) -> Self {
567 Self {
568 builder: self.builder.property("limit-events", limit_events),
569 }
570 }
571
572 /// Margin on bottom side of widget.
573 ///
574 /// This property adds margin outside of the widget's normal size
575 /// request, the margin will be added in addition to the size from
576 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
577 pub fn margin_bottom(self, margin_bottom: i32) -> Self {
578 Self {
579 builder: self.builder.property("margin-bottom", margin_bottom),
580 }
581 }
582
583 /// Margin on end of widget, horizontally.
584 ///
585 /// This property supports left-to-right and right-to-left text
586 /// directions.
587 ///
588 /// This property adds margin outside of the widget's normal size
589 /// request, the margin will be added in addition to the size from
590 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
591 pub fn margin_end(self, margin_end: i32) -> Self {
592 Self {
593 builder: self.builder.property("margin-end", margin_end),
594 }
595 }
596
597 /// Margin on start of widget, horizontally.
598 ///
599 /// This property supports left-to-right and right-to-left text
600 /// directions.
601 ///
602 /// This property adds margin outside of the widget's normal size
603 /// request, the margin will be added in addition to the size from
604 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
605 pub fn margin_start(self, margin_start: i32) -> Self {
606 Self {
607 builder: self.builder.property("margin-start", margin_start),
608 }
609 }
610
611 /// Margin on top side of widget.
612 ///
613 /// This property adds margin outside of the widget's normal size
614 /// request, the margin will be added in addition to the size from
615 /// [`WidgetExtManual::set_size_request()`][crate::gtk::prelude::WidgetExtManual::set_size_request()] for example.
616 pub fn margin_top(self, margin_top: i32) -> Self {
617 Self {
618 builder: self.builder.property("margin-top", margin_top),
619 }
620 }
621
622 /// The name of the widget.
623 pub fn name(self, name: impl Into<glib::GString>) -> Self {
624 Self {
625 builder: self.builder.property("name", name.into()),
626 }
627 }
628
629 /// The requested opacity of the widget.
630 pub fn opacity(self, opacity: f64) -> Self {
631 Self {
632 builder: self.builder.property("opacity", opacity),
633 }
634 }
635
636 /// How content outside the widget's content area is treated.
637 ///
638 /// This property is meant to be set by widget implementations,
639 /// typically in their instance init function.
640 pub fn overflow(self, overflow: gtk::Overflow) -> Self {
641 Self {
642 builder: self.builder.property("overflow", overflow),
643 }
644 }
645
646 /// Whether the widget will receive the default action when it is focused.
647 pub fn receives_default(self, receives_default: bool) -> Self {
648 Self {
649 builder: self.builder.property("receives-default", receives_default),
650 }
651 }
652
653 /// Whether the widget responds to input.
654 pub fn sensitive(self, sensitive: bool) -> Self {
655 Self {
656 builder: self.builder.property("sensitive", sensitive),
657 }
658 }
659
660 /// Sets the text of tooltip to be the given string, which is marked up
661 /// with Pango markup.
662 ///
663 /// Also see `Gtk::Tooltip::set_markup()`.
664 ///
665 /// This is a convenience property which will take care of getting the
666 /// tooltip shown if the given string is not `NULL`:
667 /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
668 /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
669 /// the default signal handler.
670 ///
671 /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
672 /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
673 pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
674 Self {
675 builder: self
676 .builder
677 .property("tooltip-markup", tooltip_markup.into()),
678 }
679 }
680
681 /// Sets the text of tooltip to be the given string.
682 ///
683 /// Also see `Gtk::Tooltip::set_text()`.
684 ///
685 /// This is a convenience property which will take care of getting the
686 /// tooltip shown if the given string is not `NULL`:
687 /// [`has-tooltip`][struct@crate::gtk::Widget#has-tooltip] will automatically be set to true
688 /// and there will be taken care of [`query-tooltip`][struct@crate::gtk::Widget#query-tooltip] in
689 /// the default signal handler.
690 ///
691 /// Note that if both [`tooltip-text`][struct@crate::gtk::Widget#tooltip-text] and
692 /// [`tooltip-markup`][struct@crate::gtk::Widget#tooltip-markup] are set, the last one wins.
693 pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
694 Self {
695 builder: self.builder.property("tooltip-text", tooltip_text.into()),
696 }
697 }
698
699 /// How to distribute vertical space if widget gets extra space.
700 pub fn valign(self, valign: gtk::Align) -> Self {
701 Self {
702 builder: self.builder.property("valign", valign),
703 }
704 }
705
706 /// Whether to expand vertically.
707 pub fn vexpand(self, vexpand: bool) -> Self {
708 Self {
709 builder: self.builder.property("vexpand", vexpand),
710 }
711 }
712
713 /// Whether to use the `vexpand` property.
714 pub fn vexpand_set(self, vexpand_set: bool) -> Self {
715 Self {
716 builder: self.builder.property("vexpand-set", vexpand_set),
717 }
718 }
719
720 /// Whether the widget is visible.
721 pub fn visible(self, visible: bool) -> Self {
722 Self {
723 builder: self.builder.property("visible", visible),
724 }
725 }
726
727 /// Overrides for width request of the widget.
728 ///
729 /// If this is -1, the natural request will be used.
730 pub fn width_request(self, width_request: i32) -> Self {
731 Self {
732 builder: self.builder.property("width-request", width_request),
733 }
734 }
735
736 /// The accessible role of the given [`gtk::Accessible`][crate::gtk::Accessible] implementation.
737 ///
738 /// The accessible role cannot be changed once set.
739 pub fn accessible_role(self, accessible_role: gtk::AccessibleRole) -> Self {
740 Self {
741 builder: self.builder.property("accessible-role", accessible_role),
742 }
743 }
744
745 // rustdoc-stripper-ignore-next
746 /// Build the [`Compass`].
747 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
748 pub fn build(self) -> Compass {
749 assert_initialized_main_thread!();
750 self.builder.build()
751 }
752}