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 
5 use crate::Align;
6 use crate::BaselinePosition;
7 use crate::Box;
8 use crate::Buildable;
9 use crate::Container;
10 use crate::Orientable;
11 use crate::Orientation;
12 use crate::ResizeMode;
13 use crate::SizeGroup;
14 use crate::Widget;
15 use glib::object::Cast;
16 use glib::object::IsA;
17 use glib::object::ObjectType as ObjectType_;
18 use glib::signal::connect_raw;
19 use glib::signal::SignalHandlerId;
20 use glib::translate::*;
21 use glib::StaticType;
22 use glib::ToValue;
23 use std::boxed::Box as Box_;
24 use std::fmt;
25 use std::mem::transmute;
26 
27 glib::wrapper! {
28     #[doc(alias = "GtkShortcutsGroup")]
29     pub struct ShortcutsGroup(Object<ffi::GtkShortcutsGroup, ffi::GtkShortcutsGroupClass>) @extends Box, Container, Widget, @implements Buildable, Orientable;
30 
31     match fn {
32         type_ => || ffi::gtk_shortcuts_group_get_type(),
33     }
34 }
35 
36 impl ShortcutsGroup {
37     // rustdoc-stripper-ignore-next
38     /// Creates a new builder-pattern struct instance to construct [`ShortcutsGroup`] objects.
39     ///
40     /// This method returns an instance of [`ShortcutsGroupBuilder`] which can be used to create [`ShortcutsGroup`] objects.
builder() -> ShortcutsGroupBuilder41     pub fn builder() -> ShortcutsGroupBuilder {
42         ShortcutsGroupBuilder::default()
43     }
44 
45     #[doc(alias = "accel-size-group")]
set_accel_size_group<P: IsA<SizeGroup>>(&self, accel_size_group: Option<&P>)46     pub fn set_accel_size_group<P: IsA<SizeGroup>>(&self, accel_size_group: Option<&P>) {
47         unsafe {
48             glib::gobject_ffi::g_object_set_property(
49                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
50                 b"accel-size-group\0".as_ptr() as *const _,
51                 accel_size_group.to_value().to_glib_none().0,
52             );
53         }
54     }
55 
height(&self) -> u3256     pub fn height(&self) -> u32 {
57         unsafe {
58             let mut value = glib::Value::from_type(<u32 as StaticType>::static_type());
59             glib::gobject_ffi::g_object_get_property(
60                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
61                 b"height\0".as_ptr() as *const _,
62                 value.to_glib_none_mut().0,
63             );
64             value
65                 .get()
66                 .expect("Return Value for property `height` getter")
67         }
68     }
69 
title(&self) -> Option<glib::GString>70     pub fn title(&self) -> Option<glib::GString> {
71         unsafe {
72             let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
73             glib::gobject_ffi::g_object_get_property(
74                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
75                 b"title\0".as_ptr() as *const _,
76                 value.to_glib_none_mut().0,
77             );
78             value
79                 .get()
80                 .expect("Return Value for property `title` getter")
81         }
82     }
83 
set_title(&self, title: Option<&str>)84     pub fn set_title(&self, title: Option<&str>) {
85         unsafe {
86             glib::gobject_ffi::g_object_set_property(
87                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
88                 b"title\0".as_ptr() as *const _,
89                 title.to_value().to_glib_none().0,
90             );
91         }
92     }
93 
94     #[doc(alias = "title-size-group")]
set_title_size_group<P: IsA<SizeGroup>>(&self, title_size_group: Option<&P>)95     pub fn set_title_size_group<P: IsA<SizeGroup>>(&self, title_size_group: Option<&P>) {
96         unsafe {
97             glib::gobject_ffi::g_object_set_property(
98                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
99                 b"title-size-group\0".as_ptr() as *const _,
100                 title_size_group.to_value().to_glib_none().0,
101             );
102         }
103     }
104 
view(&self) -> Option<glib::GString>105     pub fn view(&self) -> Option<glib::GString> {
106         unsafe {
107             let mut value = glib::Value::from_type(<glib::GString as StaticType>::static_type());
108             glib::gobject_ffi::g_object_get_property(
109                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
110                 b"view\0".as_ptr() as *const _,
111                 value.to_glib_none_mut().0,
112             );
113             value
114                 .get()
115                 .expect("Return Value for property `view` getter")
116         }
117     }
118 
set_view(&self, view: Option<&str>)119     pub fn set_view(&self, view: Option<&str>) {
120         unsafe {
121             glib::gobject_ffi::g_object_set_property(
122                 self.as_ptr() as *mut glib::gobject_ffi::GObject,
123                 b"view\0".as_ptr() as *const _,
124                 view.to_value().to_glib_none().0,
125             );
126         }
127     }
128 
129     #[doc(alias = "accel-size-group")]
connect_accel_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId130     pub fn connect_accel_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
131         unsafe extern "C" fn notify_accel_size_group_trampoline<
132             F: Fn(&ShortcutsGroup) + 'static,
133         >(
134             this: *mut ffi::GtkShortcutsGroup,
135             _param_spec: glib::ffi::gpointer,
136             f: glib::ffi::gpointer,
137         ) {
138             let f: &F = &*(f as *const F);
139             f(&from_glib_borrow(this))
140         }
141         unsafe {
142             let f: Box_<F> = Box_::new(f);
143             connect_raw(
144                 self.as_ptr() as *mut _,
145                 b"notify::accel-size-group\0".as_ptr() as *const _,
146                 Some(transmute::<_, unsafe extern "C" fn()>(
147                     notify_accel_size_group_trampoline::<F> as *const (),
148                 )),
149                 Box_::into_raw(f),
150             )
151         }
152     }
153 
154     #[doc(alias = "height")]
connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId155     pub fn connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
156         unsafe extern "C" fn notify_height_trampoline<F: Fn(&ShortcutsGroup) + 'static>(
157             this: *mut ffi::GtkShortcutsGroup,
158             _param_spec: glib::ffi::gpointer,
159             f: glib::ffi::gpointer,
160         ) {
161             let f: &F = &*(f as *const F);
162             f(&from_glib_borrow(this))
163         }
164         unsafe {
165             let f: Box_<F> = Box_::new(f);
166             connect_raw(
167                 self.as_ptr() as *mut _,
168                 b"notify::height\0".as_ptr() as *const _,
169                 Some(transmute::<_, unsafe extern "C" fn()>(
170                     notify_height_trampoline::<F> as *const (),
171                 )),
172                 Box_::into_raw(f),
173             )
174         }
175     }
176 
177     #[doc(alias = "title")]
connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId178     pub fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
179         unsafe extern "C" fn notify_title_trampoline<F: Fn(&ShortcutsGroup) + 'static>(
180             this: *mut ffi::GtkShortcutsGroup,
181             _param_spec: glib::ffi::gpointer,
182             f: glib::ffi::gpointer,
183         ) {
184             let f: &F = &*(f as *const F);
185             f(&from_glib_borrow(this))
186         }
187         unsafe {
188             let f: Box_<F> = Box_::new(f);
189             connect_raw(
190                 self.as_ptr() as *mut _,
191                 b"notify::title\0".as_ptr() as *const _,
192                 Some(transmute::<_, unsafe extern "C" fn()>(
193                     notify_title_trampoline::<F> as *const (),
194                 )),
195                 Box_::into_raw(f),
196             )
197         }
198     }
199 
200     #[doc(alias = "title-size-group")]
connect_title_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId201     pub fn connect_title_size_group_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
202         unsafe extern "C" fn notify_title_size_group_trampoline<
203             F: Fn(&ShortcutsGroup) + 'static,
204         >(
205             this: *mut ffi::GtkShortcutsGroup,
206             _param_spec: glib::ffi::gpointer,
207             f: glib::ffi::gpointer,
208         ) {
209             let f: &F = &*(f as *const F);
210             f(&from_glib_borrow(this))
211         }
212         unsafe {
213             let f: Box_<F> = Box_::new(f);
214             connect_raw(
215                 self.as_ptr() as *mut _,
216                 b"notify::title-size-group\0".as_ptr() as *const _,
217                 Some(transmute::<_, unsafe extern "C" fn()>(
218                     notify_title_size_group_trampoline::<F> as *const (),
219                 )),
220                 Box_::into_raw(f),
221             )
222         }
223     }
224 
225     #[doc(alias = "view")]
connect_view_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId226     pub fn connect_view_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
227         unsafe extern "C" fn notify_view_trampoline<F: Fn(&ShortcutsGroup) + 'static>(
228             this: *mut ffi::GtkShortcutsGroup,
229             _param_spec: glib::ffi::gpointer,
230             f: glib::ffi::gpointer,
231         ) {
232             let f: &F = &*(f as *const F);
233             f(&from_glib_borrow(this))
234         }
235         unsafe {
236             let f: Box_<F> = Box_::new(f);
237             connect_raw(
238                 self.as_ptr() as *mut _,
239                 b"notify::view\0".as_ptr() as *const _,
240                 Some(transmute::<_, unsafe extern "C" fn()>(
241                     notify_view_trampoline::<F> as *const (),
242                 )),
243                 Box_::into_raw(f),
244             )
245         }
246     }
247 }
248 
249 #[derive(Clone, Default)]
250 // rustdoc-stripper-ignore-next
251 /// A [builder-pattern] type to construct [`ShortcutsGroup`] objects.
252 ///
253 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
254 pub struct ShortcutsGroupBuilder {
255     accel_size_group: Option<SizeGroup>,
256     title: Option<String>,
257     title_size_group: Option<SizeGroup>,
258     view: Option<String>,
259     baseline_position: Option<BaselinePosition>,
260     homogeneous: Option<bool>,
261     spacing: Option<i32>,
262     border_width: Option<u32>,
263     child: Option<Widget>,
264     resize_mode: Option<ResizeMode>,
265     app_paintable: Option<bool>,
266     can_default: Option<bool>,
267     can_focus: Option<bool>,
268     events: Option<gdk::EventMask>,
269     expand: Option<bool>,
270     #[cfg(any(feature = "v3_20", feature = "dox"))]
271     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
272     focus_on_click: Option<bool>,
273     halign: Option<Align>,
274     has_default: Option<bool>,
275     has_focus: Option<bool>,
276     has_tooltip: Option<bool>,
277     height_request: Option<i32>,
278     hexpand: Option<bool>,
279     hexpand_set: Option<bool>,
280     is_focus: Option<bool>,
281     margin: Option<i32>,
282     margin_bottom: Option<i32>,
283     margin_end: Option<i32>,
284     margin_start: Option<i32>,
285     margin_top: Option<i32>,
286     name: Option<String>,
287     no_show_all: Option<bool>,
288     opacity: Option<f64>,
289     parent: Option<Container>,
290     receives_default: Option<bool>,
291     sensitive: Option<bool>,
292     tooltip_markup: Option<String>,
293     tooltip_text: Option<String>,
294     valign: Option<Align>,
295     vexpand: Option<bool>,
296     vexpand_set: Option<bool>,
297     visible: Option<bool>,
298     width_request: Option<i32>,
299     orientation: Option<Orientation>,
300 }
301 
302 impl ShortcutsGroupBuilder {
303     // rustdoc-stripper-ignore-next
304     /// Create a new [`ShortcutsGroupBuilder`].
new() -> Self305     pub fn new() -> Self {
306         Self::default()
307     }
308 
309     // rustdoc-stripper-ignore-next
310     /// Build the [`ShortcutsGroup`].
build(self) -> ShortcutsGroup311     pub fn build(self) -> ShortcutsGroup {
312         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
313         if let Some(ref accel_size_group) = self.accel_size_group {
314             properties.push(("accel-size-group", accel_size_group));
315         }
316         if let Some(ref title) = self.title {
317             properties.push(("title", title));
318         }
319         if let Some(ref title_size_group) = self.title_size_group {
320             properties.push(("title-size-group", title_size_group));
321         }
322         if let Some(ref view) = self.view {
323             properties.push(("view", view));
324         }
325         if let Some(ref baseline_position) = self.baseline_position {
326             properties.push(("baseline-position", baseline_position));
327         }
328         if let Some(ref homogeneous) = self.homogeneous {
329             properties.push(("homogeneous", homogeneous));
330         }
331         if let Some(ref spacing) = self.spacing {
332             properties.push(("spacing", spacing));
333         }
334         if let Some(ref border_width) = self.border_width {
335             properties.push(("border-width", border_width));
336         }
337         if let Some(ref child) = self.child {
338             properties.push(("child", child));
339         }
340         if let Some(ref resize_mode) = self.resize_mode {
341             properties.push(("resize-mode", resize_mode));
342         }
343         if let Some(ref app_paintable) = self.app_paintable {
344             properties.push(("app-paintable", app_paintable));
345         }
346         if let Some(ref can_default) = self.can_default {
347             properties.push(("can-default", can_default));
348         }
349         if let Some(ref can_focus) = self.can_focus {
350             properties.push(("can-focus", can_focus));
351         }
352         if let Some(ref events) = self.events {
353             properties.push(("events", events));
354         }
355         if let Some(ref expand) = self.expand {
356             properties.push(("expand", expand));
357         }
358         #[cfg(any(feature = "v3_20", feature = "dox"))]
359         if let Some(ref focus_on_click) = self.focus_on_click {
360             properties.push(("focus-on-click", focus_on_click));
361         }
362         if let Some(ref halign) = self.halign {
363             properties.push(("halign", halign));
364         }
365         if let Some(ref has_default) = self.has_default {
366             properties.push(("has-default", has_default));
367         }
368         if let Some(ref has_focus) = self.has_focus {
369             properties.push(("has-focus", has_focus));
370         }
371         if let Some(ref has_tooltip) = self.has_tooltip {
372             properties.push(("has-tooltip", has_tooltip));
373         }
374         if let Some(ref height_request) = self.height_request {
375             properties.push(("height-request", height_request));
376         }
377         if let Some(ref hexpand) = self.hexpand {
378             properties.push(("hexpand", hexpand));
379         }
380         if let Some(ref hexpand_set) = self.hexpand_set {
381             properties.push(("hexpand-set", hexpand_set));
382         }
383         if let Some(ref is_focus) = self.is_focus {
384             properties.push(("is-focus", is_focus));
385         }
386         if let Some(ref margin) = self.margin {
387             properties.push(("margin", margin));
388         }
389         if let Some(ref margin_bottom) = self.margin_bottom {
390             properties.push(("margin-bottom", margin_bottom));
391         }
392         if let Some(ref margin_end) = self.margin_end {
393             properties.push(("margin-end", margin_end));
394         }
395         if let Some(ref margin_start) = self.margin_start {
396             properties.push(("margin-start", margin_start));
397         }
398         if let Some(ref margin_top) = self.margin_top {
399             properties.push(("margin-top", margin_top));
400         }
401         if let Some(ref name) = self.name {
402             properties.push(("name", name));
403         }
404         if let Some(ref no_show_all) = self.no_show_all {
405             properties.push(("no-show-all", no_show_all));
406         }
407         if let Some(ref opacity) = self.opacity {
408             properties.push(("opacity", opacity));
409         }
410         if let Some(ref parent) = self.parent {
411             properties.push(("parent", parent));
412         }
413         if let Some(ref receives_default) = self.receives_default {
414             properties.push(("receives-default", receives_default));
415         }
416         if let Some(ref sensitive) = self.sensitive {
417             properties.push(("sensitive", sensitive));
418         }
419         if let Some(ref tooltip_markup) = self.tooltip_markup {
420             properties.push(("tooltip-markup", tooltip_markup));
421         }
422         if let Some(ref tooltip_text) = self.tooltip_text {
423             properties.push(("tooltip-text", tooltip_text));
424         }
425         if let Some(ref valign) = self.valign {
426             properties.push(("valign", valign));
427         }
428         if let Some(ref vexpand) = self.vexpand {
429             properties.push(("vexpand", vexpand));
430         }
431         if let Some(ref vexpand_set) = self.vexpand_set {
432             properties.push(("vexpand-set", vexpand_set));
433         }
434         if let Some(ref visible) = self.visible {
435             properties.push(("visible", visible));
436         }
437         if let Some(ref width_request) = self.width_request {
438             properties.push(("width-request", width_request));
439         }
440         if let Some(ref orientation) = self.orientation {
441             properties.push(("orientation", orientation));
442         }
443         glib::Object::new::<ShortcutsGroup>(&properties)
444             .expect("Failed to create an instance of ShortcutsGroup")
445     }
446 
accel_size_group<P: IsA<SizeGroup>>(mut self, accel_size_group: &P) -> Self447     pub fn accel_size_group<P: IsA<SizeGroup>>(mut self, accel_size_group: &P) -> Self {
448         self.accel_size_group = Some(accel_size_group.clone().upcast());
449         self
450     }
451 
title(mut self, title: &str) -> Self452     pub fn title(mut self, title: &str) -> Self {
453         self.title = Some(title.to_string());
454         self
455     }
456 
title_size_group<P: IsA<SizeGroup>>(mut self, title_size_group: &P) -> Self457     pub fn title_size_group<P: IsA<SizeGroup>>(mut self, title_size_group: &P) -> Self {
458         self.title_size_group = Some(title_size_group.clone().upcast());
459         self
460     }
461 
view(mut self, view: &str) -> Self462     pub fn view(mut self, view: &str) -> Self {
463         self.view = Some(view.to_string());
464         self
465     }
466 
baseline_position(mut self, baseline_position: BaselinePosition) -> Self467     pub fn baseline_position(mut self, baseline_position: BaselinePosition) -> Self {
468         self.baseline_position = Some(baseline_position);
469         self
470     }
471 
homogeneous(mut self, homogeneous: bool) -> Self472     pub fn homogeneous(mut self, homogeneous: bool) -> Self {
473         self.homogeneous = Some(homogeneous);
474         self
475     }
476 
spacing(mut self, spacing: i32) -> Self477     pub fn spacing(mut self, spacing: i32) -> Self {
478         self.spacing = Some(spacing);
479         self
480     }
481 
border_width(mut self, border_width: u32) -> Self482     pub fn border_width(mut self, border_width: u32) -> Self {
483         self.border_width = Some(border_width);
484         self
485     }
486 
child<P: IsA<Widget>>(mut self, child: &P) -> Self487     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
488         self.child = Some(child.clone().upcast());
489         self
490     }
491 
resize_mode(mut self, resize_mode: ResizeMode) -> Self492     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
493         self.resize_mode = Some(resize_mode);
494         self
495     }
496 
app_paintable(mut self, app_paintable: bool) -> Self497     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
498         self.app_paintable = Some(app_paintable);
499         self
500     }
501 
can_default(mut self, can_default: bool) -> Self502     pub fn can_default(mut self, can_default: bool) -> Self {
503         self.can_default = Some(can_default);
504         self
505     }
506 
can_focus(mut self, can_focus: bool) -> Self507     pub fn can_focus(mut self, can_focus: bool) -> Self {
508         self.can_focus = Some(can_focus);
509         self
510     }
511 
events(mut self, events: gdk::EventMask) -> Self512     pub fn events(mut self, events: gdk::EventMask) -> Self {
513         self.events = Some(events);
514         self
515     }
516 
expand(mut self, expand: bool) -> Self517     pub fn expand(mut self, expand: bool) -> Self {
518         self.expand = Some(expand);
519         self
520     }
521 
522     #[cfg(any(feature = "v3_20", feature = "dox"))]
523     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
focus_on_click(mut self, focus_on_click: bool) -> Self524     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
525         self.focus_on_click = Some(focus_on_click);
526         self
527     }
528 
halign(mut self, halign: Align) -> Self529     pub fn halign(mut self, halign: Align) -> Self {
530         self.halign = Some(halign);
531         self
532     }
533 
has_default(mut self, has_default: bool) -> Self534     pub fn has_default(mut self, has_default: bool) -> Self {
535         self.has_default = Some(has_default);
536         self
537     }
538 
has_focus(mut self, has_focus: bool) -> Self539     pub fn has_focus(mut self, has_focus: bool) -> Self {
540         self.has_focus = Some(has_focus);
541         self
542     }
543 
has_tooltip(mut self, has_tooltip: bool) -> Self544     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
545         self.has_tooltip = Some(has_tooltip);
546         self
547     }
548 
height_request(mut self, height_request: i32) -> Self549     pub fn height_request(mut self, height_request: i32) -> Self {
550         self.height_request = Some(height_request);
551         self
552     }
553 
hexpand(mut self, hexpand: bool) -> Self554     pub fn hexpand(mut self, hexpand: bool) -> Self {
555         self.hexpand = Some(hexpand);
556         self
557     }
558 
hexpand_set(mut self, hexpand_set: bool) -> Self559     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
560         self.hexpand_set = Some(hexpand_set);
561         self
562     }
563 
is_focus(mut self, is_focus: bool) -> Self564     pub fn is_focus(mut self, is_focus: bool) -> Self {
565         self.is_focus = Some(is_focus);
566         self
567     }
568 
margin(mut self, margin: i32) -> Self569     pub fn margin(mut self, margin: i32) -> Self {
570         self.margin = Some(margin);
571         self
572     }
573 
margin_bottom(mut self, margin_bottom: i32) -> Self574     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
575         self.margin_bottom = Some(margin_bottom);
576         self
577     }
578 
margin_end(mut self, margin_end: i32) -> Self579     pub fn margin_end(mut self, margin_end: i32) -> Self {
580         self.margin_end = Some(margin_end);
581         self
582     }
583 
margin_start(mut self, margin_start: i32) -> Self584     pub fn margin_start(mut self, margin_start: i32) -> Self {
585         self.margin_start = Some(margin_start);
586         self
587     }
588 
margin_top(mut self, margin_top: i32) -> Self589     pub fn margin_top(mut self, margin_top: i32) -> Self {
590         self.margin_top = Some(margin_top);
591         self
592     }
593 
name(mut self, name: &str) -> Self594     pub fn name(mut self, name: &str) -> Self {
595         self.name = Some(name.to_string());
596         self
597     }
598 
no_show_all(mut self, no_show_all: bool) -> Self599     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
600         self.no_show_all = Some(no_show_all);
601         self
602     }
603 
opacity(mut self, opacity: f64) -> Self604     pub fn opacity(mut self, opacity: f64) -> Self {
605         self.opacity = Some(opacity);
606         self
607     }
608 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self609     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
610         self.parent = Some(parent.clone().upcast());
611         self
612     }
613 
receives_default(mut self, receives_default: bool) -> Self614     pub fn receives_default(mut self, receives_default: bool) -> Self {
615         self.receives_default = Some(receives_default);
616         self
617     }
618 
sensitive(mut self, sensitive: bool) -> Self619     pub fn sensitive(mut self, sensitive: bool) -> Self {
620         self.sensitive = Some(sensitive);
621         self
622     }
623 
tooltip_markup(mut self, tooltip_markup: &str) -> Self624     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
625         self.tooltip_markup = Some(tooltip_markup.to_string());
626         self
627     }
628 
tooltip_text(mut self, tooltip_text: &str) -> Self629     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
630         self.tooltip_text = Some(tooltip_text.to_string());
631         self
632     }
633 
valign(mut self, valign: Align) -> Self634     pub fn valign(mut self, valign: Align) -> Self {
635         self.valign = Some(valign);
636         self
637     }
638 
vexpand(mut self, vexpand: bool) -> Self639     pub fn vexpand(mut self, vexpand: bool) -> Self {
640         self.vexpand = Some(vexpand);
641         self
642     }
643 
vexpand_set(mut self, vexpand_set: bool) -> Self644     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
645         self.vexpand_set = Some(vexpand_set);
646         self
647     }
648 
visible(mut self, visible: bool) -> Self649     pub fn visible(mut self, visible: bool) -> Self {
650         self.visible = Some(visible);
651         self
652     }
653 
width_request(mut self, width_request: i32) -> Self654     pub fn width_request(mut self, width_request: i32) -> Self {
655         self.width_request = Some(width_request);
656         self
657     }
658 
orientation(mut self, orientation: Orientation) -> Self659     pub fn orientation(mut self, orientation: Orientation) -> Self {
660         self.orientation = Some(orientation);
661         self
662     }
663 }
664 
665 impl fmt::Display for ShortcutsGroup {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result666     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
667         f.write_str("ShortcutsGroup")
668     }
669 }
670