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::Application;
7 use crate::Bin;
8 use crate::Buildable;
9 use crate::Container;
10 use crate::Dialog;
11 use crate::RecentChooser;
12 use crate::RecentFilter;
13 use crate::RecentManager;
14 use crate::RecentSortType;
15 use crate::ResizeMode;
16 use crate::Widget;
17 use crate::Window;
18 use crate::WindowPosition;
19 use crate::WindowType;
20 use glib::object::Cast;
21 use glib::object::IsA;
22 use glib::StaticType;
23 use glib::ToValue;
24 use std::fmt;
25 
26 glib::wrapper! {
27     #[doc(alias = "GtkRecentChooserDialog")]
28     pub struct RecentChooserDialog(Object<ffi::GtkRecentChooserDialog, ffi::GtkRecentChooserDialogClass>) @extends Dialog, Window, Bin, Container, Widget, @implements Buildable, RecentChooser;
29 
30     match fn {
31         type_ => || ffi::gtk_recent_chooser_dialog_get_type(),
32     }
33 }
34 
35 impl RecentChooserDialog {
36     //#[doc(alias = "gtk_recent_chooser_dialog_new")]
37     //pub fn new<P: IsA<Window>>(title: Option<&str>, parent: Option<&P>, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RecentChooserDialog {
38     //    unsafe { TODO: call ffi:gtk_recent_chooser_dialog_new() }
39     //}
40 
41     //#[doc(alias = "gtk_recent_chooser_dialog_new_for_manager")]
42     //#[doc(alias = "new_for_manager")]
43     //pub fn for_manager<P: IsA<Window>, Q: IsA<RecentManager>>(title: Option<&str>, parent: Option<&P>, manager: &Q, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RecentChooserDialog {
44     //    unsafe { TODO: call ffi:gtk_recent_chooser_dialog_new_for_manager() }
45     //}
46 
47     // rustdoc-stripper-ignore-next
48     /// Creates a new builder-pattern struct instance to construct [`RecentChooserDialog`] objects.
49     ///
50     /// This method returns an instance of [`RecentChooserDialogBuilder`] which can be used to create [`RecentChooserDialog`] objects.
builder() -> RecentChooserDialogBuilder51     pub fn builder() -> RecentChooserDialogBuilder {
52         RecentChooserDialogBuilder::default()
53     }
54 }
55 
56 #[derive(Clone, Default)]
57 // rustdoc-stripper-ignore-next
58 /// A [builder-pattern] type to construct [`RecentChooserDialog`] objects.
59 ///
60 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
61 pub struct RecentChooserDialogBuilder {
62     use_header_bar: Option<i32>,
63     accept_focus: Option<bool>,
64     application: Option<Application>,
65     attached_to: Option<Widget>,
66     decorated: Option<bool>,
67     default_height: Option<i32>,
68     default_width: Option<i32>,
69     deletable: Option<bool>,
70     destroy_with_parent: Option<bool>,
71     focus_on_map: Option<bool>,
72     focus_visible: Option<bool>,
73     gravity: Option<gdk::Gravity>,
74     hide_titlebar_when_maximized: Option<bool>,
75     icon: Option<gdk_pixbuf::Pixbuf>,
76     icon_name: Option<String>,
77     mnemonics_visible: Option<bool>,
78     modal: Option<bool>,
79     resizable: Option<bool>,
80     role: Option<String>,
81     screen: Option<gdk::Screen>,
82     skip_pager_hint: Option<bool>,
83     skip_taskbar_hint: Option<bool>,
84     startup_id: Option<String>,
85     title: Option<String>,
86     transient_for: Option<Window>,
87     type_: Option<WindowType>,
88     type_hint: Option<gdk::WindowTypeHint>,
89     urgency_hint: Option<bool>,
90     window_position: Option<WindowPosition>,
91     border_width: Option<u32>,
92     child: Option<Widget>,
93     resize_mode: Option<ResizeMode>,
94     app_paintable: Option<bool>,
95     can_default: Option<bool>,
96     can_focus: Option<bool>,
97     events: Option<gdk::EventMask>,
98     expand: Option<bool>,
99     #[cfg(any(feature = "v3_20", feature = "dox"))]
100     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
101     focus_on_click: Option<bool>,
102     halign: Option<Align>,
103     has_default: Option<bool>,
104     has_focus: Option<bool>,
105     has_tooltip: Option<bool>,
106     height_request: Option<i32>,
107     hexpand: Option<bool>,
108     hexpand_set: Option<bool>,
109     is_focus: Option<bool>,
110     margin: Option<i32>,
111     margin_bottom: Option<i32>,
112     margin_end: Option<i32>,
113     margin_start: Option<i32>,
114     margin_top: Option<i32>,
115     name: Option<String>,
116     no_show_all: Option<bool>,
117     opacity: Option<f64>,
118     parent: Option<Container>,
119     receives_default: Option<bool>,
120     sensitive: Option<bool>,
121     tooltip_markup: Option<String>,
122     tooltip_text: Option<String>,
123     valign: Option<Align>,
124     vexpand: Option<bool>,
125     vexpand_set: Option<bool>,
126     visible: Option<bool>,
127     width_request: Option<i32>,
128     filter: Option<RecentFilter>,
129     limit: Option<i32>,
130     local_only: Option<bool>,
131     recent_manager: Option<RecentManager>,
132     select_multiple: Option<bool>,
133     show_icons: Option<bool>,
134     show_not_found: Option<bool>,
135     show_private: Option<bool>,
136     show_tips: Option<bool>,
137     sort_type: Option<RecentSortType>,
138 }
139 
140 impl RecentChooserDialogBuilder {
141     // rustdoc-stripper-ignore-next
142     /// Create a new [`RecentChooserDialogBuilder`].
new() -> Self143     pub fn new() -> Self {
144         Self::default()
145     }
146 
147     // rustdoc-stripper-ignore-next
148     /// Build the [`RecentChooserDialog`].
build(self) -> RecentChooserDialog149     pub fn build(self) -> RecentChooserDialog {
150         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
151         if let Some(ref use_header_bar) = self.use_header_bar {
152             properties.push(("use-header-bar", use_header_bar));
153         }
154         if let Some(ref accept_focus) = self.accept_focus {
155             properties.push(("accept-focus", accept_focus));
156         }
157         if let Some(ref application) = self.application {
158             properties.push(("application", application));
159         }
160         if let Some(ref attached_to) = self.attached_to {
161             properties.push(("attached-to", attached_to));
162         }
163         if let Some(ref decorated) = self.decorated {
164             properties.push(("decorated", decorated));
165         }
166         if let Some(ref default_height) = self.default_height {
167             properties.push(("default-height", default_height));
168         }
169         if let Some(ref default_width) = self.default_width {
170             properties.push(("default-width", default_width));
171         }
172         if let Some(ref deletable) = self.deletable {
173             properties.push(("deletable", deletable));
174         }
175         if let Some(ref destroy_with_parent) = self.destroy_with_parent {
176             properties.push(("destroy-with-parent", destroy_with_parent));
177         }
178         if let Some(ref focus_on_map) = self.focus_on_map {
179             properties.push(("focus-on-map", focus_on_map));
180         }
181         if let Some(ref focus_visible) = self.focus_visible {
182             properties.push(("focus-visible", focus_visible));
183         }
184         if let Some(ref gravity) = self.gravity {
185             properties.push(("gravity", gravity));
186         }
187         if let Some(ref hide_titlebar_when_maximized) = self.hide_titlebar_when_maximized {
188             properties.push(("hide-titlebar-when-maximized", hide_titlebar_when_maximized));
189         }
190         if let Some(ref icon) = self.icon {
191             properties.push(("icon", icon));
192         }
193         if let Some(ref icon_name) = self.icon_name {
194             properties.push(("icon-name", icon_name));
195         }
196         if let Some(ref mnemonics_visible) = self.mnemonics_visible {
197             properties.push(("mnemonics-visible", mnemonics_visible));
198         }
199         if let Some(ref modal) = self.modal {
200             properties.push(("modal", modal));
201         }
202         if let Some(ref resizable) = self.resizable {
203             properties.push(("resizable", resizable));
204         }
205         if let Some(ref role) = self.role {
206             properties.push(("role", role));
207         }
208         if let Some(ref screen) = self.screen {
209             properties.push(("screen", screen));
210         }
211         if let Some(ref skip_pager_hint) = self.skip_pager_hint {
212             properties.push(("skip-pager-hint", skip_pager_hint));
213         }
214         if let Some(ref skip_taskbar_hint) = self.skip_taskbar_hint {
215             properties.push(("skip-taskbar-hint", skip_taskbar_hint));
216         }
217         if let Some(ref startup_id) = self.startup_id {
218             properties.push(("startup-id", startup_id));
219         }
220         if let Some(ref title) = self.title {
221             properties.push(("title", title));
222         }
223         if let Some(ref transient_for) = self.transient_for {
224             properties.push(("transient-for", transient_for));
225         }
226         if let Some(ref type_) = self.type_ {
227             properties.push(("type", type_));
228         }
229         if let Some(ref type_hint) = self.type_hint {
230             properties.push(("type-hint", type_hint));
231         }
232         if let Some(ref urgency_hint) = self.urgency_hint {
233             properties.push(("urgency-hint", urgency_hint));
234         }
235         if let Some(ref window_position) = self.window_position {
236             properties.push(("window-position", window_position));
237         }
238         if let Some(ref border_width) = self.border_width {
239             properties.push(("border-width", border_width));
240         }
241         if let Some(ref child) = self.child {
242             properties.push(("child", child));
243         }
244         if let Some(ref resize_mode) = self.resize_mode {
245             properties.push(("resize-mode", resize_mode));
246         }
247         if let Some(ref app_paintable) = self.app_paintable {
248             properties.push(("app-paintable", app_paintable));
249         }
250         if let Some(ref can_default) = self.can_default {
251             properties.push(("can-default", can_default));
252         }
253         if let Some(ref can_focus) = self.can_focus {
254             properties.push(("can-focus", can_focus));
255         }
256         if let Some(ref events) = self.events {
257             properties.push(("events", events));
258         }
259         if let Some(ref expand) = self.expand {
260             properties.push(("expand", expand));
261         }
262         #[cfg(any(feature = "v3_20", feature = "dox"))]
263         if let Some(ref focus_on_click) = self.focus_on_click {
264             properties.push(("focus-on-click", focus_on_click));
265         }
266         if let Some(ref halign) = self.halign {
267             properties.push(("halign", halign));
268         }
269         if let Some(ref has_default) = self.has_default {
270             properties.push(("has-default", has_default));
271         }
272         if let Some(ref has_focus) = self.has_focus {
273             properties.push(("has-focus", has_focus));
274         }
275         if let Some(ref has_tooltip) = self.has_tooltip {
276             properties.push(("has-tooltip", has_tooltip));
277         }
278         if let Some(ref height_request) = self.height_request {
279             properties.push(("height-request", height_request));
280         }
281         if let Some(ref hexpand) = self.hexpand {
282             properties.push(("hexpand", hexpand));
283         }
284         if let Some(ref hexpand_set) = self.hexpand_set {
285             properties.push(("hexpand-set", hexpand_set));
286         }
287         if let Some(ref is_focus) = self.is_focus {
288             properties.push(("is-focus", is_focus));
289         }
290         if let Some(ref margin) = self.margin {
291             properties.push(("margin", margin));
292         }
293         if let Some(ref margin_bottom) = self.margin_bottom {
294             properties.push(("margin-bottom", margin_bottom));
295         }
296         if let Some(ref margin_end) = self.margin_end {
297             properties.push(("margin-end", margin_end));
298         }
299         if let Some(ref margin_start) = self.margin_start {
300             properties.push(("margin-start", margin_start));
301         }
302         if let Some(ref margin_top) = self.margin_top {
303             properties.push(("margin-top", margin_top));
304         }
305         if let Some(ref name) = self.name {
306             properties.push(("name", name));
307         }
308         if let Some(ref no_show_all) = self.no_show_all {
309             properties.push(("no-show-all", no_show_all));
310         }
311         if let Some(ref opacity) = self.opacity {
312             properties.push(("opacity", opacity));
313         }
314         if let Some(ref parent) = self.parent {
315             properties.push(("parent", parent));
316         }
317         if let Some(ref receives_default) = self.receives_default {
318             properties.push(("receives-default", receives_default));
319         }
320         if let Some(ref sensitive) = self.sensitive {
321             properties.push(("sensitive", sensitive));
322         }
323         if let Some(ref tooltip_markup) = self.tooltip_markup {
324             properties.push(("tooltip-markup", tooltip_markup));
325         }
326         if let Some(ref tooltip_text) = self.tooltip_text {
327             properties.push(("tooltip-text", tooltip_text));
328         }
329         if let Some(ref valign) = self.valign {
330             properties.push(("valign", valign));
331         }
332         if let Some(ref vexpand) = self.vexpand {
333             properties.push(("vexpand", vexpand));
334         }
335         if let Some(ref vexpand_set) = self.vexpand_set {
336             properties.push(("vexpand-set", vexpand_set));
337         }
338         if let Some(ref visible) = self.visible {
339             properties.push(("visible", visible));
340         }
341         if let Some(ref width_request) = self.width_request {
342             properties.push(("width-request", width_request));
343         }
344         if let Some(ref filter) = self.filter {
345             properties.push(("filter", filter));
346         }
347         if let Some(ref limit) = self.limit {
348             properties.push(("limit", limit));
349         }
350         if let Some(ref local_only) = self.local_only {
351             properties.push(("local-only", local_only));
352         }
353         if let Some(ref recent_manager) = self.recent_manager {
354             properties.push(("recent-manager", recent_manager));
355         }
356         if let Some(ref select_multiple) = self.select_multiple {
357             properties.push(("select-multiple", select_multiple));
358         }
359         if let Some(ref show_icons) = self.show_icons {
360             properties.push(("show-icons", show_icons));
361         }
362         if let Some(ref show_not_found) = self.show_not_found {
363             properties.push(("show-not-found", show_not_found));
364         }
365         if let Some(ref show_private) = self.show_private {
366             properties.push(("show-private", show_private));
367         }
368         if let Some(ref show_tips) = self.show_tips {
369             properties.push(("show-tips", show_tips));
370         }
371         if let Some(ref sort_type) = self.sort_type {
372             properties.push(("sort-type", sort_type));
373         }
374         glib::Object::new::<RecentChooserDialog>(&properties)
375             .expect("Failed to create an instance of RecentChooserDialog")
376     }
377 
use_header_bar(mut self, use_header_bar: i32) -> Self378     pub fn use_header_bar(mut self, use_header_bar: i32) -> Self {
379         self.use_header_bar = Some(use_header_bar);
380         self
381     }
382 
accept_focus(mut self, accept_focus: bool) -> Self383     pub fn accept_focus(mut self, accept_focus: bool) -> Self {
384         self.accept_focus = Some(accept_focus);
385         self
386     }
387 
application<P: IsA<Application>>(mut self, application: &P) -> Self388     pub fn application<P: IsA<Application>>(mut self, application: &P) -> Self {
389         self.application = Some(application.clone().upcast());
390         self
391     }
392 
attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self393     pub fn attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self {
394         self.attached_to = Some(attached_to.clone().upcast());
395         self
396     }
397 
decorated(mut self, decorated: bool) -> Self398     pub fn decorated(mut self, decorated: bool) -> Self {
399         self.decorated = Some(decorated);
400         self
401     }
402 
default_height(mut self, default_height: i32) -> Self403     pub fn default_height(mut self, default_height: i32) -> Self {
404         self.default_height = Some(default_height);
405         self
406     }
407 
default_width(mut self, default_width: i32) -> Self408     pub fn default_width(mut self, default_width: i32) -> Self {
409         self.default_width = Some(default_width);
410         self
411     }
412 
deletable(mut self, deletable: bool) -> Self413     pub fn deletable(mut self, deletable: bool) -> Self {
414         self.deletable = Some(deletable);
415         self
416     }
417 
destroy_with_parent(mut self, destroy_with_parent: bool) -> Self418     pub fn destroy_with_parent(mut self, destroy_with_parent: bool) -> Self {
419         self.destroy_with_parent = Some(destroy_with_parent);
420         self
421     }
422 
focus_on_map(mut self, focus_on_map: bool) -> Self423     pub fn focus_on_map(mut self, focus_on_map: bool) -> Self {
424         self.focus_on_map = Some(focus_on_map);
425         self
426     }
427 
focus_visible(mut self, focus_visible: bool) -> Self428     pub fn focus_visible(mut self, focus_visible: bool) -> Self {
429         self.focus_visible = Some(focus_visible);
430         self
431     }
432 
gravity(mut self, gravity: gdk::Gravity) -> Self433     pub fn gravity(mut self, gravity: gdk::Gravity) -> Self {
434         self.gravity = Some(gravity);
435         self
436     }
437 
hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self438     pub fn hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self {
439         self.hide_titlebar_when_maximized = Some(hide_titlebar_when_maximized);
440         self
441     }
442 
icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self443     pub fn icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self {
444         self.icon = Some(icon.clone());
445         self
446     }
447 
icon_name(mut self, icon_name: &str) -> Self448     pub fn icon_name(mut self, icon_name: &str) -> Self {
449         self.icon_name = Some(icon_name.to_string());
450         self
451     }
452 
mnemonics_visible(mut self, mnemonics_visible: bool) -> Self453     pub fn mnemonics_visible(mut self, mnemonics_visible: bool) -> Self {
454         self.mnemonics_visible = Some(mnemonics_visible);
455         self
456     }
457 
modal(mut self, modal: bool) -> Self458     pub fn modal(mut self, modal: bool) -> Self {
459         self.modal = Some(modal);
460         self
461     }
462 
resizable(mut self, resizable: bool) -> Self463     pub fn resizable(mut self, resizable: bool) -> Self {
464         self.resizable = Some(resizable);
465         self
466     }
467 
role(mut self, role: &str) -> Self468     pub fn role(mut self, role: &str) -> Self {
469         self.role = Some(role.to_string());
470         self
471     }
472 
screen(mut self, screen: &gdk::Screen) -> Self473     pub fn screen(mut self, screen: &gdk::Screen) -> Self {
474         self.screen = Some(screen.clone());
475         self
476     }
477 
skip_pager_hint(mut self, skip_pager_hint: bool) -> Self478     pub fn skip_pager_hint(mut self, skip_pager_hint: bool) -> Self {
479         self.skip_pager_hint = Some(skip_pager_hint);
480         self
481     }
482 
skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self483     pub fn skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self {
484         self.skip_taskbar_hint = Some(skip_taskbar_hint);
485         self
486     }
487 
startup_id(mut self, startup_id: &str) -> Self488     pub fn startup_id(mut self, startup_id: &str) -> Self {
489         self.startup_id = Some(startup_id.to_string());
490         self
491     }
492 
title(mut self, title: &str) -> Self493     pub fn title(mut self, title: &str) -> Self {
494         self.title = Some(title.to_string());
495         self
496     }
497 
transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self498     pub fn transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self {
499         self.transient_for = Some(transient_for.clone().upcast());
500         self
501     }
502 
type_(mut self, type_: WindowType) -> Self503     pub fn type_(mut self, type_: WindowType) -> Self {
504         self.type_ = Some(type_);
505         self
506     }
507 
type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self508     pub fn type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self {
509         self.type_hint = Some(type_hint);
510         self
511     }
512 
urgency_hint(mut self, urgency_hint: bool) -> Self513     pub fn urgency_hint(mut self, urgency_hint: bool) -> Self {
514         self.urgency_hint = Some(urgency_hint);
515         self
516     }
517 
window_position(mut self, window_position: WindowPosition) -> Self518     pub fn window_position(mut self, window_position: WindowPosition) -> Self {
519         self.window_position = Some(window_position);
520         self
521     }
522 
border_width(mut self, border_width: u32) -> Self523     pub fn border_width(mut self, border_width: u32) -> Self {
524         self.border_width = Some(border_width);
525         self
526     }
527 
child<P: IsA<Widget>>(mut self, child: &P) -> Self528     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
529         self.child = Some(child.clone().upcast());
530         self
531     }
532 
resize_mode(mut self, resize_mode: ResizeMode) -> Self533     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
534         self.resize_mode = Some(resize_mode);
535         self
536     }
537 
app_paintable(mut self, app_paintable: bool) -> Self538     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
539         self.app_paintable = Some(app_paintable);
540         self
541     }
542 
can_default(mut self, can_default: bool) -> Self543     pub fn can_default(mut self, can_default: bool) -> Self {
544         self.can_default = Some(can_default);
545         self
546     }
547 
can_focus(mut self, can_focus: bool) -> Self548     pub fn can_focus(mut self, can_focus: bool) -> Self {
549         self.can_focus = Some(can_focus);
550         self
551     }
552 
events(mut self, events: gdk::EventMask) -> Self553     pub fn events(mut self, events: gdk::EventMask) -> Self {
554         self.events = Some(events);
555         self
556     }
557 
expand(mut self, expand: bool) -> Self558     pub fn expand(mut self, expand: bool) -> Self {
559         self.expand = Some(expand);
560         self
561     }
562 
563     #[cfg(any(feature = "v3_20", feature = "dox"))]
564     #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))]
focus_on_click(mut self, focus_on_click: bool) -> Self565     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
566         self.focus_on_click = Some(focus_on_click);
567         self
568     }
569 
halign(mut self, halign: Align) -> Self570     pub fn halign(mut self, halign: Align) -> Self {
571         self.halign = Some(halign);
572         self
573     }
574 
has_default(mut self, has_default: bool) -> Self575     pub fn has_default(mut self, has_default: bool) -> Self {
576         self.has_default = Some(has_default);
577         self
578     }
579 
has_focus(mut self, has_focus: bool) -> Self580     pub fn has_focus(mut self, has_focus: bool) -> Self {
581         self.has_focus = Some(has_focus);
582         self
583     }
584 
has_tooltip(mut self, has_tooltip: bool) -> Self585     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
586         self.has_tooltip = Some(has_tooltip);
587         self
588     }
589 
height_request(mut self, height_request: i32) -> Self590     pub fn height_request(mut self, height_request: i32) -> Self {
591         self.height_request = Some(height_request);
592         self
593     }
594 
hexpand(mut self, hexpand: bool) -> Self595     pub fn hexpand(mut self, hexpand: bool) -> Self {
596         self.hexpand = Some(hexpand);
597         self
598     }
599 
hexpand_set(mut self, hexpand_set: bool) -> Self600     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
601         self.hexpand_set = Some(hexpand_set);
602         self
603     }
604 
is_focus(mut self, is_focus: bool) -> Self605     pub fn is_focus(mut self, is_focus: bool) -> Self {
606         self.is_focus = Some(is_focus);
607         self
608     }
609 
margin(mut self, margin: i32) -> Self610     pub fn margin(mut self, margin: i32) -> Self {
611         self.margin = Some(margin);
612         self
613     }
614 
margin_bottom(mut self, margin_bottom: i32) -> Self615     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
616         self.margin_bottom = Some(margin_bottom);
617         self
618     }
619 
margin_end(mut self, margin_end: i32) -> Self620     pub fn margin_end(mut self, margin_end: i32) -> Self {
621         self.margin_end = Some(margin_end);
622         self
623     }
624 
margin_start(mut self, margin_start: i32) -> Self625     pub fn margin_start(mut self, margin_start: i32) -> Self {
626         self.margin_start = Some(margin_start);
627         self
628     }
629 
margin_top(mut self, margin_top: i32) -> Self630     pub fn margin_top(mut self, margin_top: i32) -> Self {
631         self.margin_top = Some(margin_top);
632         self
633     }
634 
name(mut self, name: &str) -> Self635     pub fn name(mut self, name: &str) -> Self {
636         self.name = Some(name.to_string());
637         self
638     }
639 
no_show_all(mut self, no_show_all: bool) -> Self640     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
641         self.no_show_all = Some(no_show_all);
642         self
643     }
644 
opacity(mut self, opacity: f64) -> Self645     pub fn opacity(mut self, opacity: f64) -> Self {
646         self.opacity = Some(opacity);
647         self
648     }
649 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self650     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
651         self.parent = Some(parent.clone().upcast());
652         self
653     }
654 
receives_default(mut self, receives_default: bool) -> Self655     pub fn receives_default(mut self, receives_default: bool) -> Self {
656         self.receives_default = Some(receives_default);
657         self
658     }
659 
sensitive(mut self, sensitive: bool) -> Self660     pub fn sensitive(mut self, sensitive: bool) -> Self {
661         self.sensitive = Some(sensitive);
662         self
663     }
664 
tooltip_markup(mut self, tooltip_markup: &str) -> Self665     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
666         self.tooltip_markup = Some(tooltip_markup.to_string());
667         self
668     }
669 
tooltip_text(mut self, tooltip_text: &str) -> Self670     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
671         self.tooltip_text = Some(tooltip_text.to_string());
672         self
673     }
674 
valign(mut self, valign: Align) -> Self675     pub fn valign(mut self, valign: Align) -> Self {
676         self.valign = Some(valign);
677         self
678     }
679 
vexpand(mut self, vexpand: bool) -> Self680     pub fn vexpand(mut self, vexpand: bool) -> Self {
681         self.vexpand = Some(vexpand);
682         self
683     }
684 
vexpand_set(mut self, vexpand_set: bool) -> Self685     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
686         self.vexpand_set = Some(vexpand_set);
687         self
688     }
689 
visible(mut self, visible: bool) -> Self690     pub fn visible(mut self, visible: bool) -> Self {
691         self.visible = Some(visible);
692         self
693     }
694 
width_request(mut self, width_request: i32) -> Self695     pub fn width_request(mut self, width_request: i32) -> Self {
696         self.width_request = Some(width_request);
697         self
698     }
699 
filter(mut self, filter: &RecentFilter) -> Self700     pub fn filter(mut self, filter: &RecentFilter) -> Self {
701         self.filter = Some(filter.clone());
702         self
703     }
704 
limit(mut self, limit: i32) -> Self705     pub fn limit(mut self, limit: i32) -> Self {
706         self.limit = Some(limit);
707         self
708     }
709 
local_only(mut self, local_only: bool) -> Self710     pub fn local_only(mut self, local_only: bool) -> Self {
711         self.local_only = Some(local_only);
712         self
713     }
714 
recent_manager<P: IsA<RecentManager>>(mut self, recent_manager: &P) -> Self715     pub fn recent_manager<P: IsA<RecentManager>>(mut self, recent_manager: &P) -> Self {
716         self.recent_manager = Some(recent_manager.clone().upcast());
717         self
718     }
719 
select_multiple(mut self, select_multiple: bool) -> Self720     pub fn select_multiple(mut self, select_multiple: bool) -> Self {
721         self.select_multiple = Some(select_multiple);
722         self
723     }
724 
show_icons(mut self, show_icons: bool) -> Self725     pub fn show_icons(mut self, show_icons: bool) -> Self {
726         self.show_icons = Some(show_icons);
727         self
728     }
729 
show_not_found(mut self, show_not_found: bool) -> Self730     pub fn show_not_found(mut self, show_not_found: bool) -> Self {
731         self.show_not_found = Some(show_not_found);
732         self
733     }
734 
show_private(mut self, show_private: bool) -> Self735     pub fn show_private(mut self, show_private: bool) -> Self {
736         self.show_private = Some(show_private);
737         self
738     }
739 
show_tips(mut self, show_tips: bool) -> Self740     pub fn show_tips(mut self, show_tips: bool) -> Self {
741         self.show_tips = Some(show_tips);
742         self
743     }
744 
sort_type(mut self, sort_type: RecentSortType) -> Self745     pub fn sort_type(mut self, sort_type: RecentSortType) -> Self {
746         self.sort_type = Some(sort_type);
747         self
748     }
749 }
750 
751 pub const NONE_RECENT_CHOOSER_DIALOG: Option<&RecentChooserDialog> = None;
752 
753 impl fmt::Display for RecentChooserDialog {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result754     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
755         f.write_str("RecentChooserDialog")
756     }
757 }
758