gtk4/auto/
shortcuts_shortcut.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    ffi, Accessible, AccessibleRole, Align, Buildable, ConstraintTarget, LayoutManager, Overflow,
7    ShortcutType, SizeGroup, TextDirection, 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 = "GtkShortcutsShortcut")]
18    pub struct ShortcutsShortcut(Object<ffi::GtkShortcutsShortcut, ffi::GtkShortcutsShortcutClass>) @extends Widget, @implements Accessible, Buildable, ConstraintTarget;
19
20    match fn {
21        type_ => || ffi::gtk_shortcuts_shortcut_get_type(),
22    }
23}
24
25impl ShortcutsShortcut {
26    // rustdoc-stripper-ignore-next
27    /// Creates a new builder-pattern struct instance to construct [`ShortcutsShortcut`] objects.
28    ///
29    /// This method returns an instance of [`ShortcutsShortcutBuilder`](crate::builders::ShortcutsShortcutBuilder) which can be used to create [`ShortcutsShortcut`] objects.
30    pub fn builder() -> ShortcutsShortcutBuilder {
31        ShortcutsShortcutBuilder::new()
32    }
33
34    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
35    #[doc(alias = "accel-size-group")]
36    pub fn set_accel_size_group(&self, accel_size_group: Option<&SizeGroup>) {
37        ObjectExt::set_property(self, "accel-size-group", accel_size_group)
38    }
39
40    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
41    pub fn accelerator(&self) -> Option<glib::GString> {
42        ObjectExt::property(self, "accelerator")
43    }
44
45    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
46    pub fn set_accelerator(&self, accelerator: Option<&str>) {
47        ObjectExt::set_property(self, "accelerator", accelerator)
48    }
49
50    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
51    #[doc(alias = "action-name")]
52    pub fn action_name(&self) -> Option<glib::GString> {
53        ObjectExt::property(self, "action-name")
54    }
55
56    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
57    #[doc(alias = "action-name")]
58    pub fn set_action_name(&self, action_name: Option<&str>) {
59        ObjectExt::set_property(self, "action-name", action_name)
60    }
61
62    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
63    pub fn icon(&self) -> Option<gio::Icon> {
64        ObjectExt::property(self, "icon")
65    }
66
67    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
68    pub fn set_icon<P: IsA<gio::Icon>>(&self, icon: Option<&P>) {
69        ObjectExt::set_property(self, "icon", icon)
70    }
71
72    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
73    #[doc(alias = "icon-set")]
74    pub fn is_icon_set(&self) -> bool {
75        ObjectExt::property(self, "icon-set")
76    }
77
78    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
79    #[doc(alias = "shortcut-type")]
80    pub fn shortcut_type(&self) -> ShortcutType {
81        ObjectExt::property(self, "shortcut-type")
82    }
83
84    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
85    #[doc(alias = "shortcut-type")]
86    pub fn set_shortcut_type(&self, shortcut_type: ShortcutType) {
87        ObjectExt::set_property(self, "shortcut-type", shortcut_type)
88    }
89
90    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
91    pub fn subtitle(&self) -> Option<glib::GString> {
92        ObjectExt::property(self, "subtitle")
93    }
94
95    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
96    pub fn set_subtitle(&self, subtitle: Option<&str>) {
97        ObjectExt::set_property(self, "subtitle", subtitle)
98    }
99
100    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
101    #[doc(alias = "subtitle-set")]
102    pub fn is_subtitle_set(&self) -> bool {
103        ObjectExt::property(self, "subtitle-set")
104    }
105
106    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
107    pub fn title(&self) -> Option<glib::GString> {
108        ObjectExt::property(self, "title")
109    }
110
111    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
112    pub fn set_title(&self, title: Option<&str>) {
113        ObjectExt::set_property(self, "title", title)
114    }
115
116    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
117    #[doc(alias = "title-size-group")]
118    pub fn set_title_size_group(&self, title_size_group: Option<&SizeGroup>) {
119        ObjectExt::set_property(self, "title-size-group", title_size_group)
120    }
121
122    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
123    #[doc(alias = "accel-size-group")]
124    pub fn connect_accel_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
125        unsafe extern "C" fn notify_accel_size_group_trampoline<
126            F: Fn(&ShortcutsShortcut) + 'static,
127        >(
128            this: *mut ffi::GtkShortcutsShortcut,
129            _param_spec: glib::ffi::gpointer,
130            f: glib::ffi::gpointer,
131        ) {
132            let f: &F = &*(f as *const F);
133            f(&from_glib_borrow(this))
134        }
135        unsafe {
136            let f: Box_<F> = Box_::new(f);
137            connect_raw(
138                self.as_ptr() as *mut _,
139                c"notify::accel-size-group".as_ptr() as *const _,
140                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
141                    notify_accel_size_group_trampoline::<F> as *const (),
142                )),
143                Box_::into_raw(f),
144            )
145        }
146    }
147
148    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
149    #[doc(alias = "accelerator")]
150    pub fn connect_accelerator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
151        unsafe extern "C" fn notify_accelerator_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
152            this: *mut ffi::GtkShortcutsShortcut,
153            _param_spec: glib::ffi::gpointer,
154            f: glib::ffi::gpointer,
155        ) {
156            let f: &F = &*(f as *const F);
157            f(&from_glib_borrow(this))
158        }
159        unsafe {
160            let f: Box_<F> = Box_::new(f);
161            connect_raw(
162                self.as_ptr() as *mut _,
163                c"notify::accelerator".as_ptr() as *const _,
164                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
165                    notify_accelerator_trampoline::<F> as *const (),
166                )),
167                Box_::into_raw(f),
168            )
169        }
170    }
171
172    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
173    #[doc(alias = "action-name")]
174    pub fn connect_action_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
175        unsafe extern "C" fn notify_action_name_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
176            this: *mut ffi::GtkShortcutsShortcut,
177            _param_spec: glib::ffi::gpointer,
178            f: glib::ffi::gpointer,
179        ) {
180            let f: &F = &*(f as *const F);
181            f(&from_glib_borrow(this))
182        }
183        unsafe {
184            let f: Box_<F> = Box_::new(f);
185            connect_raw(
186                self.as_ptr() as *mut _,
187                c"notify::action-name".as_ptr() as *const _,
188                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
189                    notify_action_name_trampoline::<F> as *const (),
190                )),
191                Box_::into_raw(f),
192            )
193        }
194    }
195
196    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
197    #[doc(alias = "direction")]
198    pub fn connect_direction_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
199        unsafe extern "C" fn notify_direction_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
200            this: *mut ffi::GtkShortcutsShortcut,
201            _param_spec: glib::ffi::gpointer,
202            f: glib::ffi::gpointer,
203        ) {
204            let f: &F = &*(f as *const F);
205            f(&from_glib_borrow(this))
206        }
207        unsafe {
208            let f: Box_<F> = Box_::new(f);
209            connect_raw(
210                self.as_ptr() as *mut _,
211                c"notify::direction".as_ptr() as *const _,
212                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
213                    notify_direction_trampoline::<F> as *const (),
214                )),
215                Box_::into_raw(f),
216            )
217        }
218    }
219
220    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
221    #[doc(alias = "icon")]
222    pub fn connect_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
223        unsafe extern "C" fn notify_icon_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
224            this: *mut ffi::GtkShortcutsShortcut,
225            _param_spec: glib::ffi::gpointer,
226            f: glib::ffi::gpointer,
227        ) {
228            let f: &F = &*(f as *const F);
229            f(&from_glib_borrow(this))
230        }
231        unsafe {
232            let f: Box_<F> = Box_::new(f);
233            connect_raw(
234                self.as_ptr() as *mut _,
235                c"notify::icon".as_ptr() as *const _,
236                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
237                    notify_icon_trampoline::<F> as *const (),
238                )),
239                Box_::into_raw(f),
240            )
241        }
242    }
243
244    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
245    #[doc(alias = "icon-set")]
246    pub fn connect_icon_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
247        unsafe extern "C" fn notify_icon_set_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
248            this: *mut ffi::GtkShortcutsShortcut,
249            _param_spec: glib::ffi::gpointer,
250            f: glib::ffi::gpointer,
251        ) {
252            let f: &F = &*(f as *const F);
253            f(&from_glib_borrow(this))
254        }
255        unsafe {
256            let f: Box_<F> = Box_::new(f);
257            connect_raw(
258                self.as_ptr() as *mut _,
259                c"notify::icon-set".as_ptr() as *const _,
260                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
261                    notify_icon_set_trampoline::<F> as *const (),
262                )),
263                Box_::into_raw(f),
264            )
265        }
266    }
267
268    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
269    #[doc(alias = "shortcut-type")]
270    pub fn connect_shortcut_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
271        unsafe extern "C" fn notify_shortcut_type_trampoline<
272            F: Fn(&ShortcutsShortcut) + 'static,
273        >(
274            this: *mut ffi::GtkShortcutsShortcut,
275            _param_spec: glib::ffi::gpointer,
276            f: glib::ffi::gpointer,
277        ) {
278            let f: &F = &*(f as *const F);
279            f(&from_glib_borrow(this))
280        }
281        unsafe {
282            let f: Box_<F> = Box_::new(f);
283            connect_raw(
284                self.as_ptr() as *mut _,
285                c"notify::shortcut-type".as_ptr() as *const _,
286                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
287                    notify_shortcut_type_trampoline::<F> as *const (),
288                )),
289                Box_::into_raw(f),
290            )
291        }
292    }
293
294    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
295    #[doc(alias = "subtitle")]
296    pub fn connect_subtitle_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
297        unsafe extern "C" fn notify_subtitle_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
298            this: *mut ffi::GtkShortcutsShortcut,
299            _param_spec: glib::ffi::gpointer,
300            f: glib::ffi::gpointer,
301        ) {
302            let f: &F = &*(f as *const F);
303            f(&from_glib_borrow(this))
304        }
305        unsafe {
306            let f: Box_<F> = Box_::new(f);
307            connect_raw(
308                self.as_ptr() as *mut _,
309                c"notify::subtitle".as_ptr() as *const _,
310                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
311                    notify_subtitle_trampoline::<F> as *const (),
312                )),
313                Box_::into_raw(f),
314            )
315        }
316    }
317
318    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
319    #[doc(alias = "subtitle-set")]
320    pub fn connect_subtitle_set_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
321        unsafe extern "C" fn notify_subtitle_set_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
322            this: *mut ffi::GtkShortcutsShortcut,
323            _param_spec: glib::ffi::gpointer,
324            f: glib::ffi::gpointer,
325        ) {
326            let f: &F = &*(f as *const F);
327            f(&from_glib_borrow(this))
328        }
329        unsafe {
330            let f: Box_<F> = Box_::new(f);
331            connect_raw(
332                self.as_ptr() as *mut _,
333                c"notify::subtitle-set".as_ptr() as *const _,
334                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
335                    notify_subtitle_set_trampoline::<F> as *const (),
336                )),
337                Box_::into_raw(f),
338            )
339        }
340    }
341
342    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
343    #[doc(alias = "title")]
344    pub fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
345        unsafe extern "C" fn notify_title_trampoline<F: Fn(&ShortcutsShortcut) + 'static>(
346            this: *mut ffi::GtkShortcutsShortcut,
347            _param_spec: glib::ffi::gpointer,
348            f: glib::ffi::gpointer,
349        ) {
350            let f: &F = &*(f as *const F);
351            f(&from_glib_borrow(this))
352        }
353        unsafe {
354            let f: Box_<F> = Box_::new(f);
355            connect_raw(
356                self.as_ptr() as *mut _,
357                c"notify::title".as_ptr() as *const _,
358                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
359                    notify_title_trampoline::<F> as *const (),
360                )),
361                Box_::into_raw(f),
362            )
363        }
364    }
365
366    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
367    #[doc(alias = "title-size-group")]
368    pub fn connect_title_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
369        unsafe extern "C" fn notify_title_size_group_trampoline<
370            F: Fn(&ShortcutsShortcut) + 'static,
371        >(
372            this: *mut ffi::GtkShortcutsShortcut,
373            _param_spec: glib::ffi::gpointer,
374            f: glib::ffi::gpointer,
375        ) {
376            let f: &F = &*(f as *const F);
377            f(&from_glib_borrow(this))
378        }
379        unsafe {
380            let f: Box_<F> = Box_::new(f);
381            connect_raw(
382                self.as_ptr() as *mut _,
383                c"notify::title-size-group".as_ptr() as *const _,
384                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
385                    notify_title_size_group_trampoline::<F> as *const (),
386                )),
387                Box_::into_raw(f),
388            )
389        }
390    }
391}
392
393// rustdoc-stripper-ignore-next
394/// A [builder-pattern] type to construct [`ShortcutsShortcut`] objects.
395///
396/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
397#[must_use = "The builder must be built to be used"]
398pub struct ShortcutsShortcutBuilder {
399    builder: glib::object::ObjectBuilder<'static, ShortcutsShortcut>,
400}
401
402impl ShortcutsShortcutBuilder {
403    fn new() -> Self {
404        Self {
405            builder: glib::object::Object::builder(),
406        }
407    }
408
409    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
410    pub fn accel_size_group(self, accel_size_group: &SizeGroup) -> Self {
411        Self {
412            builder: self
413                .builder
414                .property("accel-size-group", accel_size_group.clone()),
415        }
416    }
417
418    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
419    pub fn accelerator(self, accelerator: impl Into<glib::GString>) -> Self {
420        Self {
421            builder: self.builder.property("accelerator", accelerator.into()),
422        }
423    }
424
425    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
426    pub fn action_name(self, action_name: impl Into<glib::GString>) -> Self {
427        Self {
428            builder: self.builder.property("action-name", action_name.into()),
429        }
430    }
431
432    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
433    pub fn direction(self, direction: TextDirection) -> Self {
434        Self {
435            builder: self.builder.property("direction", direction),
436        }
437    }
438
439    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
440    pub fn icon(self, icon: &impl IsA<gio::Icon>) -> Self {
441        Self {
442            builder: self.builder.property("icon", icon.clone().upcast()),
443        }
444    }
445
446    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
447    pub fn icon_set(self, icon_set: bool) -> Self {
448        Self {
449            builder: self.builder.property("icon-set", icon_set),
450        }
451    }
452
453    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
454    pub fn shortcut_type(self, shortcut_type: ShortcutType) -> Self {
455        Self {
456            builder: self.builder.property("shortcut-type", shortcut_type),
457        }
458    }
459
460    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
461    pub fn subtitle(self, subtitle: impl Into<glib::GString>) -> Self {
462        Self {
463            builder: self.builder.property("subtitle", subtitle.into()),
464        }
465    }
466
467    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
468    pub fn subtitle_set(self, subtitle_set: bool) -> Self {
469        Self {
470            builder: self.builder.property("subtitle-set", subtitle_set),
471        }
472    }
473
474    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
475    pub fn title(self, title: impl Into<glib::GString>) -> Self {
476        Self {
477            builder: self.builder.property("title", title.into()),
478        }
479    }
480
481    #[cfg_attr(feature = "v4_18", deprecated = "Since 4.18")]
482    pub fn title_size_group(self, title_size_group: &SizeGroup) -> Self {
483        Self {
484            builder: self
485                .builder
486                .property("title-size-group", title_size_group.clone()),
487        }
488    }
489
490    pub fn can_focus(self, can_focus: bool) -> Self {
491        Self {
492            builder: self.builder.property("can-focus", can_focus),
493        }
494    }
495
496    pub fn can_target(self, can_target: bool) -> Self {
497        Self {
498            builder: self.builder.property("can-target", can_target),
499        }
500    }
501
502    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
503        Self {
504            builder: self.builder.property("css-classes", css_classes.into()),
505        }
506    }
507
508    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
509        Self {
510            builder: self.builder.property("css-name", css_name.into()),
511        }
512    }
513
514    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
515        Self {
516            builder: self.builder.property("cursor", cursor.clone()),
517        }
518    }
519
520    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
521        Self {
522            builder: self.builder.property("focus-on-click", focus_on_click),
523        }
524    }
525
526    pub fn focusable(self, focusable: bool) -> Self {
527        Self {
528            builder: self.builder.property("focusable", focusable),
529        }
530    }
531
532    pub fn halign(self, halign: Align) -> Self {
533        Self {
534            builder: self.builder.property("halign", halign),
535        }
536    }
537
538    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
539        Self {
540            builder: self.builder.property("has-tooltip", has_tooltip),
541        }
542    }
543
544    pub fn height_request(self, height_request: i32) -> Self {
545        Self {
546            builder: self.builder.property("height-request", height_request),
547        }
548    }
549
550    pub fn hexpand(self, hexpand: bool) -> Self {
551        Self {
552            builder: self.builder.property("hexpand", hexpand),
553        }
554    }
555
556    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
557        Self {
558            builder: self.builder.property("hexpand-set", hexpand_set),
559        }
560    }
561
562    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
563        Self {
564            builder: self
565                .builder
566                .property("layout-manager", layout_manager.clone().upcast()),
567        }
568    }
569
570    #[cfg(feature = "v4_18")]
571    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
572    pub fn limit_events(self, limit_events: bool) -> Self {
573        Self {
574            builder: self.builder.property("limit-events", limit_events),
575        }
576    }
577
578    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
579        Self {
580            builder: self.builder.property("margin-bottom", margin_bottom),
581        }
582    }
583
584    pub fn margin_end(self, margin_end: i32) -> Self {
585        Self {
586            builder: self.builder.property("margin-end", margin_end),
587        }
588    }
589
590    pub fn margin_start(self, margin_start: i32) -> Self {
591        Self {
592            builder: self.builder.property("margin-start", margin_start),
593        }
594    }
595
596    pub fn margin_top(self, margin_top: i32) -> Self {
597        Self {
598            builder: self.builder.property("margin-top", margin_top),
599        }
600    }
601
602    pub fn name(self, name: impl Into<glib::GString>) -> Self {
603        Self {
604            builder: self.builder.property("name", name.into()),
605        }
606    }
607
608    pub fn opacity(self, opacity: f64) -> Self {
609        Self {
610            builder: self.builder.property("opacity", opacity),
611        }
612    }
613
614    pub fn overflow(self, overflow: Overflow) -> Self {
615        Self {
616            builder: self.builder.property("overflow", overflow),
617        }
618    }
619
620    pub fn receives_default(self, receives_default: bool) -> Self {
621        Self {
622            builder: self.builder.property("receives-default", receives_default),
623        }
624    }
625
626    pub fn sensitive(self, sensitive: bool) -> Self {
627        Self {
628            builder: self.builder.property("sensitive", sensitive),
629        }
630    }
631
632    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
633        Self {
634            builder: self
635                .builder
636                .property("tooltip-markup", tooltip_markup.into()),
637        }
638    }
639
640    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
641        Self {
642            builder: self.builder.property("tooltip-text", tooltip_text.into()),
643        }
644    }
645
646    pub fn valign(self, valign: Align) -> Self {
647        Self {
648            builder: self.builder.property("valign", valign),
649        }
650    }
651
652    pub fn vexpand(self, vexpand: bool) -> Self {
653        Self {
654            builder: self.builder.property("vexpand", vexpand),
655        }
656    }
657
658    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
659        Self {
660            builder: self.builder.property("vexpand-set", vexpand_set),
661        }
662    }
663
664    pub fn visible(self, visible: bool) -> Self {
665        Self {
666            builder: self.builder.property("visible", visible),
667        }
668    }
669
670    pub fn width_request(self, width_request: i32) -> Self {
671        Self {
672            builder: self.builder.property("width-request", width_request),
673        }
674    }
675
676    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
677        Self {
678            builder: self.builder.property("accessible-role", accessible_role),
679        }
680    }
681
682    // rustdoc-stripper-ignore-next
683    /// Build the [`ShortcutsShortcut`].
684    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
685    pub fn build(self) -> ShortcutsShortcut {
686        assert_initialized_main_thread!();
687        self.builder.build()
688    }
689}