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 gdk;
6 use gdk_pixbuf;
7 use glib::object::Cast;
8 use glib::object::IsA;
9 use glib::translate::*;
10 use glib::StaticType;
11 use glib::ToValue;
12 use gtk_sys;
13 use std::fmt;
14 use Align;
15 use Application;
16 use Bin;
17 use Buildable;
18 use Container;
19 use Dialog;
20 use RecentChooser;
21 use RecentFilter;
22 use RecentManager;
23 use RecentSortType;
24 use ResizeMode;
25 use Widget;
26 use Window;
27 use WindowPosition;
28 use WindowType;
29 
30 glib_wrapper! {
31     pub struct RecentChooserDialog(Object<gtk_sys::GtkRecentChooserDialog, gtk_sys::GtkRecentChooserDialogClass, RecentChooserDialogClass>) @extends Dialog, Window, Bin, Container, Widget, @implements Buildable, RecentChooser;
32 
33     match fn {
34         get_type => || gtk_sys::gtk_recent_chooser_dialog_get_type(),
35     }
36 }
37 
38 impl RecentChooserDialog {
39     //pub fn new<P: IsA<Window>>(title: Option<&str>, parent: Option<&P>, first_button_text: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) -> RecentChooserDialog {
40     //    unsafe { TODO: call gtk_sys:gtk_recent_chooser_dialog_new() }
41     //}
42 
43     //pub fn new_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 gtk_sys:gtk_recent_chooser_dialog_new_for_manager() }
45     //}
46 }
47 
48 #[derive(Clone, Default)]
49 pub struct RecentChooserDialogBuilder {
50     use_header_bar: Option<i32>,
51     accept_focus: Option<bool>,
52     application: Option<Application>,
53     attached_to: Option<Widget>,
54     decorated: Option<bool>,
55     default_height: Option<i32>,
56     default_width: Option<i32>,
57     deletable: Option<bool>,
58     destroy_with_parent: Option<bool>,
59     focus_on_map: Option<bool>,
60     focus_visible: Option<bool>,
61     gravity: Option<gdk::Gravity>,
62     hide_titlebar_when_maximized: Option<bool>,
63     icon: Option<gdk_pixbuf::Pixbuf>,
64     icon_name: Option<String>,
65     mnemonics_visible: Option<bool>,
66     modal: Option<bool>,
67     resizable: Option<bool>,
68     role: Option<String>,
69     screen: Option<gdk::Screen>,
70     skip_pager_hint: Option<bool>,
71     skip_taskbar_hint: Option<bool>,
72     startup_id: Option<String>,
73     title: Option<String>,
74     transient_for: Option<Window>,
75     type_: Option<WindowType>,
76     type_hint: Option<gdk::WindowTypeHint>,
77     urgency_hint: Option<bool>,
78     window_position: Option<WindowPosition>,
79     border_width: Option<u32>,
80     child: Option<Widget>,
81     resize_mode: Option<ResizeMode>,
82     app_paintable: Option<bool>,
83     can_default: Option<bool>,
84     can_focus: Option<bool>,
85     events: Option<gdk::EventMask>,
86     expand: Option<bool>,
87     #[cfg(any(feature = "v3_20", feature = "dox"))]
88     focus_on_click: Option<bool>,
89     halign: Option<Align>,
90     has_default: Option<bool>,
91     has_focus: Option<bool>,
92     has_tooltip: Option<bool>,
93     height_request: Option<i32>,
94     hexpand: Option<bool>,
95     hexpand_set: Option<bool>,
96     is_focus: Option<bool>,
97     margin: Option<i32>,
98     margin_bottom: Option<i32>,
99     margin_end: Option<i32>,
100     margin_start: Option<i32>,
101     margin_top: Option<i32>,
102     name: Option<String>,
103     no_show_all: Option<bool>,
104     opacity: Option<f64>,
105     parent: Option<Container>,
106     receives_default: Option<bool>,
107     sensitive: Option<bool>,
108     tooltip_markup: Option<String>,
109     tooltip_text: Option<String>,
110     valign: Option<Align>,
111     vexpand: Option<bool>,
112     vexpand_set: Option<bool>,
113     visible: Option<bool>,
114     width_request: Option<i32>,
115     filter: Option<RecentFilter>,
116     limit: Option<i32>,
117     local_only: Option<bool>,
118     recent_manager: Option<RecentManager>,
119     select_multiple: Option<bool>,
120     show_icons: Option<bool>,
121     show_not_found: Option<bool>,
122     show_private: Option<bool>,
123     show_tips: Option<bool>,
124     sort_type: Option<RecentSortType>,
125 }
126 
127 impl RecentChooserDialogBuilder {
new() -> Self128     pub fn new() -> Self {
129         Self::default()
130     }
131 
build(self) -> RecentChooserDialog132     pub fn build(self) -> RecentChooserDialog {
133         let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
134         if let Some(ref use_header_bar) = self.use_header_bar {
135             properties.push(("use-header-bar", use_header_bar));
136         }
137         if let Some(ref accept_focus) = self.accept_focus {
138             properties.push(("accept-focus", accept_focus));
139         }
140         if let Some(ref application) = self.application {
141             properties.push(("application", application));
142         }
143         if let Some(ref attached_to) = self.attached_to {
144             properties.push(("attached-to", attached_to));
145         }
146         if let Some(ref decorated) = self.decorated {
147             properties.push(("decorated", decorated));
148         }
149         if let Some(ref default_height) = self.default_height {
150             properties.push(("default-height", default_height));
151         }
152         if let Some(ref default_width) = self.default_width {
153             properties.push(("default-width", default_width));
154         }
155         if let Some(ref deletable) = self.deletable {
156             properties.push(("deletable", deletable));
157         }
158         if let Some(ref destroy_with_parent) = self.destroy_with_parent {
159             properties.push(("destroy-with-parent", destroy_with_parent));
160         }
161         if let Some(ref focus_on_map) = self.focus_on_map {
162             properties.push(("focus-on-map", focus_on_map));
163         }
164         if let Some(ref focus_visible) = self.focus_visible {
165             properties.push(("focus-visible", focus_visible));
166         }
167         if let Some(ref gravity) = self.gravity {
168             properties.push(("gravity", gravity));
169         }
170         if let Some(ref hide_titlebar_when_maximized) = self.hide_titlebar_when_maximized {
171             properties.push(("hide-titlebar-when-maximized", hide_titlebar_when_maximized));
172         }
173         if let Some(ref icon) = self.icon {
174             properties.push(("icon", icon));
175         }
176         if let Some(ref icon_name) = self.icon_name {
177             properties.push(("icon-name", icon_name));
178         }
179         if let Some(ref mnemonics_visible) = self.mnemonics_visible {
180             properties.push(("mnemonics-visible", mnemonics_visible));
181         }
182         if let Some(ref modal) = self.modal {
183             properties.push(("modal", modal));
184         }
185         if let Some(ref resizable) = self.resizable {
186             properties.push(("resizable", resizable));
187         }
188         if let Some(ref role) = self.role {
189             properties.push(("role", role));
190         }
191         if let Some(ref screen) = self.screen {
192             properties.push(("screen", screen));
193         }
194         if let Some(ref skip_pager_hint) = self.skip_pager_hint {
195             properties.push(("skip-pager-hint", skip_pager_hint));
196         }
197         if let Some(ref skip_taskbar_hint) = self.skip_taskbar_hint {
198             properties.push(("skip-taskbar-hint", skip_taskbar_hint));
199         }
200         if let Some(ref startup_id) = self.startup_id {
201             properties.push(("startup-id", startup_id));
202         }
203         if let Some(ref title) = self.title {
204             properties.push(("title", title));
205         }
206         if let Some(ref transient_for) = self.transient_for {
207             properties.push(("transient-for", transient_for));
208         }
209         if let Some(ref type_) = self.type_ {
210             properties.push(("type", type_));
211         }
212         if let Some(ref type_hint) = self.type_hint {
213             properties.push(("type-hint", type_hint));
214         }
215         if let Some(ref urgency_hint) = self.urgency_hint {
216             properties.push(("urgency-hint", urgency_hint));
217         }
218         if let Some(ref window_position) = self.window_position {
219             properties.push(("window-position", window_position));
220         }
221         if let Some(ref border_width) = self.border_width {
222             properties.push(("border-width", border_width));
223         }
224         if let Some(ref child) = self.child {
225             properties.push(("child", child));
226         }
227         if let Some(ref resize_mode) = self.resize_mode {
228             properties.push(("resize-mode", resize_mode));
229         }
230         if let Some(ref app_paintable) = self.app_paintable {
231             properties.push(("app-paintable", app_paintable));
232         }
233         if let Some(ref can_default) = self.can_default {
234             properties.push(("can-default", can_default));
235         }
236         if let Some(ref can_focus) = self.can_focus {
237             properties.push(("can-focus", can_focus));
238         }
239         if let Some(ref events) = self.events {
240             properties.push(("events", events));
241         }
242         if let Some(ref expand) = self.expand {
243             properties.push(("expand", expand));
244         }
245         #[cfg(any(feature = "v3_20", feature = "dox"))]
246         {
247             if let Some(ref focus_on_click) = self.focus_on_click {
248                 properties.push(("focus-on-click", focus_on_click));
249             }
250         }
251         if let Some(ref halign) = self.halign {
252             properties.push(("halign", halign));
253         }
254         if let Some(ref has_default) = self.has_default {
255             properties.push(("has-default", has_default));
256         }
257         if let Some(ref has_focus) = self.has_focus {
258             properties.push(("has-focus", has_focus));
259         }
260         if let Some(ref has_tooltip) = self.has_tooltip {
261             properties.push(("has-tooltip", has_tooltip));
262         }
263         if let Some(ref height_request) = self.height_request {
264             properties.push(("height-request", height_request));
265         }
266         if let Some(ref hexpand) = self.hexpand {
267             properties.push(("hexpand", hexpand));
268         }
269         if let Some(ref hexpand_set) = self.hexpand_set {
270             properties.push(("hexpand-set", hexpand_set));
271         }
272         if let Some(ref is_focus) = self.is_focus {
273             properties.push(("is-focus", is_focus));
274         }
275         if let Some(ref margin) = self.margin {
276             properties.push(("margin", margin));
277         }
278         if let Some(ref margin_bottom) = self.margin_bottom {
279             properties.push(("margin-bottom", margin_bottom));
280         }
281         if let Some(ref margin_end) = self.margin_end {
282             properties.push(("margin-end", margin_end));
283         }
284         if let Some(ref margin_start) = self.margin_start {
285             properties.push(("margin-start", margin_start));
286         }
287         if let Some(ref margin_top) = self.margin_top {
288             properties.push(("margin-top", margin_top));
289         }
290         if let Some(ref name) = self.name {
291             properties.push(("name", name));
292         }
293         if let Some(ref no_show_all) = self.no_show_all {
294             properties.push(("no-show-all", no_show_all));
295         }
296         if let Some(ref opacity) = self.opacity {
297             properties.push(("opacity", opacity));
298         }
299         if let Some(ref parent) = self.parent {
300             properties.push(("parent", parent));
301         }
302         if let Some(ref receives_default) = self.receives_default {
303             properties.push(("receives-default", receives_default));
304         }
305         if let Some(ref sensitive) = self.sensitive {
306             properties.push(("sensitive", sensitive));
307         }
308         if let Some(ref tooltip_markup) = self.tooltip_markup {
309             properties.push(("tooltip-markup", tooltip_markup));
310         }
311         if let Some(ref tooltip_text) = self.tooltip_text {
312             properties.push(("tooltip-text", tooltip_text));
313         }
314         if let Some(ref valign) = self.valign {
315             properties.push(("valign", valign));
316         }
317         if let Some(ref vexpand) = self.vexpand {
318             properties.push(("vexpand", vexpand));
319         }
320         if let Some(ref vexpand_set) = self.vexpand_set {
321             properties.push(("vexpand-set", vexpand_set));
322         }
323         if let Some(ref visible) = self.visible {
324             properties.push(("visible", visible));
325         }
326         if let Some(ref width_request) = self.width_request {
327             properties.push(("width-request", width_request));
328         }
329         if let Some(ref filter) = self.filter {
330             properties.push(("filter", filter));
331         }
332         if let Some(ref limit) = self.limit {
333             properties.push(("limit", limit));
334         }
335         if let Some(ref local_only) = self.local_only {
336             properties.push(("local-only", local_only));
337         }
338         if let Some(ref recent_manager) = self.recent_manager {
339             properties.push(("recent-manager", recent_manager));
340         }
341         if let Some(ref select_multiple) = self.select_multiple {
342             properties.push(("select-multiple", select_multiple));
343         }
344         if let Some(ref show_icons) = self.show_icons {
345             properties.push(("show-icons", show_icons));
346         }
347         if let Some(ref show_not_found) = self.show_not_found {
348             properties.push(("show-not-found", show_not_found));
349         }
350         if let Some(ref show_private) = self.show_private {
351             properties.push(("show-private", show_private));
352         }
353         if let Some(ref show_tips) = self.show_tips {
354             properties.push(("show-tips", show_tips));
355         }
356         if let Some(ref sort_type) = self.sort_type {
357             properties.push(("sort-type", sort_type));
358         }
359         glib::Object::new(RecentChooserDialog::static_type(), &properties)
360             .expect("object new")
361             .downcast()
362             .expect("downcast")
363     }
364 
use_header_bar(mut self, use_header_bar: i32) -> Self365     pub fn use_header_bar(mut self, use_header_bar: i32) -> Self {
366         self.use_header_bar = Some(use_header_bar);
367         self
368     }
369 
accept_focus(mut self, accept_focus: bool) -> Self370     pub fn accept_focus(mut self, accept_focus: bool) -> Self {
371         self.accept_focus = Some(accept_focus);
372         self
373     }
374 
application<P: IsA<Application>>(mut self, application: &P) -> Self375     pub fn application<P: IsA<Application>>(mut self, application: &P) -> Self {
376         self.application = Some(application.clone().upcast());
377         self
378     }
379 
attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self380     pub fn attached_to<P: IsA<Widget>>(mut self, attached_to: &P) -> Self {
381         self.attached_to = Some(attached_to.clone().upcast());
382         self
383     }
384 
decorated(mut self, decorated: bool) -> Self385     pub fn decorated(mut self, decorated: bool) -> Self {
386         self.decorated = Some(decorated);
387         self
388     }
389 
default_height(mut self, default_height: i32) -> Self390     pub fn default_height(mut self, default_height: i32) -> Self {
391         self.default_height = Some(default_height);
392         self
393     }
394 
default_width(mut self, default_width: i32) -> Self395     pub fn default_width(mut self, default_width: i32) -> Self {
396         self.default_width = Some(default_width);
397         self
398     }
399 
deletable(mut self, deletable: bool) -> Self400     pub fn deletable(mut self, deletable: bool) -> Self {
401         self.deletable = Some(deletable);
402         self
403     }
404 
destroy_with_parent(mut self, destroy_with_parent: bool) -> Self405     pub fn destroy_with_parent(mut self, destroy_with_parent: bool) -> Self {
406         self.destroy_with_parent = Some(destroy_with_parent);
407         self
408     }
409 
focus_on_map(mut self, focus_on_map: bool) -> Self410     pub fn focus_on_map(mut self, focus_on_map: bool) -> Self {
411         self.focus_on_map = Some(focus_on_map);
412         self
413     }
414 
focus_visible(mut self, focus_visible: bool) -> Self415     pub fn focus_visible(mut self, focus_visible: bool) -> Self {
416         self.focus_visible = Some(focus_visible);
417         self
418     }
419 
gravity(mut self, gravity: gdk::Gravity) -> Self420     pub fn gravity(mut self, gravity: gdk::Gravity) -> Self {
421         self.gravity = Some(gravity);
422         self
423     }
424 
hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self425     pub fn hide_titlebar_when_maximized(mut self, hide_titlebar_when_maximized: bool) -> Self {
426         self.hide_titlebar_when_maximized = Some(hide_titlebar_when_maximized);
427         self
428     }
429 
icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self430     pub fn icon(mut self, icon: &gdk_pixbuf::Pixbuf) -> Self {
431         self.icon = Some(icon.clone());
432         self
433     }
434 
icon_name(mut self, icon_name: &str) -> Self435     pub fn icon_name(mut self, icon_name: &str) -> Self {
436         self.icon_name = Some(icon_name.to_string());
437         self
438     }
439 
mnemonics_visible(mut self, mnemonics_visible: bool) -> Self440     pub fn mnemonics_visible(mut self, mnemonics_visible: bool) -> Self {
441         self.mnemonics_visible = Some(mnemonics_visible);
442         self
443     }
444 
modal(mut self, modal: bool) -> Self445     pub fn modal(mut self, modal: bool) -> Self {
446         self.modal = Some(modal);
447         self
448     }
449 
resizable(mut self, resizable: bool) -> Self450     pub fn resizable(mut self, resizable: bool) -> Self {
451         self.resizable = Some(resizable);
452         self
453     }
454 
role(mut self, role: &str) -> Self455     pub fn role(mut self, role: &str) -> Self {
456         self.role = Some(role.to_string());
457         self
458     }
459 
screen(mut self, screen: &gdk::Screen) -> Self460     pub fn screen(mut self, screen: &gdk::Screen) -> Self {
461         self.screen = Some(screen.clone());
462         self
463     }
464 
skip_pager_hint(mut self, skip_pager_hint: bool) -> Self465     pub fn skip_pager_hint(mut self, skip_pager_hint: bool) -> Self {
466         self.skip_pager_hint = Some(skip_pager_hint);
467         self
468     }
469 
skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self470     pub fn skip_taskbar_hint(mut self, skip_taskbar_hint: bool) -> Self {
471         self.skip_taskbar_hint = Some(skip_taskbar_hint);
472         self
473     }
474 
startup_id(mut self, startup_id: &str) -> Self475     pub fn startup_id(mut self, startup_id: &str) -> Self {
476         self.startup_id = Some(startup_id.to_string());
477         self
478     }
479 
title(mut self, title: &str) -> Self480     pub fn title(mut self, title: &str) -> Self {
481         self.title = Some(title.to_string());
482         self
483     }
484 
transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self485     pub fn transient_for<P: IsA<Window>>(mut self, transient_for: &P) -> Self {
486         self.transient_for = Some(transient_for.clone().upcast());
487         self
488     }
489 
type_(mut self, type_: WindowType) -> Self490     pub fn type_(mut self, type_: WindowType) -> Self {
491         self.type_ = Some(type_);
492         self
493     }
494 
type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self495     pub fn type_hint(mut self, type_hint: gdk::WindowTypeHint) -> Self {
496         self.type_hint = Some(type_hint);
497         self
498     }
499 
urgency_hint(mut self, urgency_hint: bool) -> Self500     pub fn urgency_hint(mut self, urgency_hint: bool) -> Self {
501         self.urgency_hint = Some(urgency_hint);
502         self
503     }
504 
window_position(mut self, window_position: WindowPosition) -> Self505     pub fn window_position(mut self, window_position: WindowPosition) -> Self {
506         self.window_position = Some(window_position);
507         self
508     }
509 
border_width(mut self, border_width: u32) -> Self510     pub fn border_width(mut self, border_width: u32) -> Self {
511         self.border_width = Some(border_width);
512         self
513     }
514 
child<P: IsA<Widget>>(mut self, child: &P) -> Self515     pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self {
516         self.child = Some(child.clone().upcast());
517         self
518     }
519 
resize_mode(mut self, resize_mode: ResizeMode) -> Self520     pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self {
521         self.resize_mode = Some(resize_mode);
522         self
523     }
524 
app_paintable(mut self, app_paintable: bool) -> Self525     pub fn app_paintable(mut self, app_paintable: bool) -> Self {
526         self.app_paintable = Some(app_paintable);
527         self
528     }
529 
can_default(mut self, can_default: bool) -> Self530     pub fn can_default(mut self, can_default: bool) -> Self {
531         self.can_default = Some(can_default);
532         self
533     }
534 
can_focus(mut self, can_focus: bool) -> Self535     pub fn can_focus(mut self, can_focus: bool) -> Self {
536         self.can_focus = Some(can_focus);
537         self
538     }
539 
events(mut self, events: gdk::EventMask) -> Self540     pub fn events(mut self, events: gdk::EventMask) -> Self {
541         self.events = Some(events);
542         self
543     }
544 
expand(mut self, expand: bool) -> Self545     pub fn expand(mut self, expand: bool) -> Self {
546         self.expand = Some(expand);
547         self
548     }
549 
550     #[cfg(any(feature = "v3_20", feature = "dox"))]
focus_on_click(mut self, focus_on_click: bool) -> Self551     pub fn focus_on_click(mut self, focus_on_click: bool) -> Self {
552         self.focus_on_click = Some(focus_on_click);
553         self
554     }
555 
halign(mut self, halign: Align) -> Self556     pub fn halign(mut self, halign: Align) -> Self {
557         self.halign = Some(halign);
558         self
559     }
560 
has_default(mut self, has_default: bool) -> Self561     pub fn has_default(mut self, has_default: bool) -> Self {
562         self.has_default = Some(has_default);
563         self
564     }
565 
has_focus(mut self, has_focus: bool) -> Self566     pub fn has_focus(mut self, has_focus: bool) -> Self {
567         self.has_focus = Some(has_focus);
568         self
569     }
570 
has_tooltip(mut self, has_tooltip: bool) -> Self571     pub fn has_tooltip(mut self, has_tooltip: bool) -> Self {
572         self.has_tooltip = Some(has_tooltip);
573         self
574     }
575 
height_request(mut self, height_request: i32) -> Self576     pub fn height_request(mut self, height_request: i32) -> Self {
577         self.height_request = Some(height_request);
578         self
579     }
580 
hexpand(mut self, hexpand: bool) -> Self581     pub fn hexpand(mut self, hexpand: bool) -> Self {
582         self.hexpand = Some(hexpand);
583         self
584     }
585 
hexpand_set(mut self, hexpand_set: bool) -> Self586     pub fn hexpand_set(mut self, hexpand_set: bool) -> Self {
587         self.hexpand_set = Some(hexpand_set);
588         self
589     }
590 
is_focus(mut self, is_focus: bool) -> Self591     pub fn is_focus(mut self, is_focus: bool) -> Self {
592         self.is_focus = Some(is_focus);
593         self
594     }
595 
margin(mut self, margin: i32) -> Self596     pub fn margin(mut self, margin: i32) -> Self {
597         self.margin = Some(margin);
598         self
599     }
600 
margin_bottom(mut self, margin_bottom: i32) -> Self601     pub fn margin_bottom(mut self, margin_bottom: i32) -> Self {
602         self.margin_bottom = Some(margin_bottom);
603         self
604     }
605 
margin_end(mut self, margin_end: i32) -> Self606     pub fn margin_end(mut self, margin_end: i32) -> Self {
607         self.margin_end = Some(margin_end);
608         self
609     }
610 
margin_start(mut self, margin_start: i32) -> Self611     pub fn margin_start(mut self, margin_start: i32) -> Self {
612         self.margin_start = Some(margin_start);
613         self
614     }
615 
margin_top(mut self, margin_top: i32) -> Self616     pub fn margin_top(mut self, margin_top: i32) -> Self {
617         self.margin_top = Some(margin_top);
618         self
619     }
620 
name(mut self, name: &str) -> Self621     pub fn name(mut self, name: &str) -> Self {
622         self.name = Some(name.to_string());
623         self
624     }
625 
no_show_all(mut self, no_show_all: bool) -> Self626     pub fn no_show_all(mut self, no_show_all: bool) -> Self {
627         self.no_show_all = Some(no_show_all);
628         self
629     }
630 
opacity(mut self, opacity: f64) -> Self631     pub fn opacity(mut self, opacity: f64) -> Self {
632         self.opacity = Some(opacity);
633         self
634     }
635 
parent<P: IsA<Container>>(mut self, parent: &P) -> Self636     pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self {
637         self.parent = Some(parent.clone().upcast());
638         self
639     }
640 
receives_default(mut self, receives_default: bool) -> Self641     pub fn receives_default(mut self, receives_default: bool) -> Self {
642         self.receives_default = Some(receives_default);
643         self
644     }
645 
sensitive(mut self, sensitive: bool) -> Self646     pub fn sensitive(mut self, sensitive: bool) -> Self {
647         self.sensitive = Some(sensitive);
648         self
649     }
650 
tooltip_markup(mut self, tooltip_markup: &str) -> Self651     pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self {
652         self.tooltip_markup = Some(tooltip_markup.to_string());
653         self
654     }
655 
tooltip_text(mut self, tooltip_text: &str) -> Self656     pub fn tooltip_text(mut self, tooltip_text: &str) -> Self {
657         self.tooltip_text = Some(tooltip_text.to_string());
658         self
659     }
660 
valign(mut self, valign: Align) -> Self661     pub fn valign(mut self, valign: Align) -> Self {
662         self.valign = Some(valign);
663         self
664     }
665 
vexpand(mut self, vexpand: bool) -> Self666     pub fn vexpand(mut self, vexpand: bool) -> Self {
667         self.vexpand = Some(vexpand);
668         self
669     }
670 
vexpand_set(mut self, vexpand_set: bool) -> Self671     pub fn vexpand_set(mut self, vexpand_set: bool) -> Self {
672         self.vexpand_set = Some(vexpand_set);
673         self
674     }
675 
visible(mut self, visible: bool) -> Self676     pub fn visible(mut self, visible: bool) -> Self {
677         self.visible = Some(visible);
678         self
679     }
680 
width_request(mut self, width_request: i32) -> Self681     pub fn width_request(mut self, width_request: i32) -> Self {
682         self.width_request = Some(width_request);
683         self
684     }
685 
filter(mut self, filter: &RecentFilter) -> Self686     pub fn filter(mut self, filter: &RecentFilter) -> Self {
687         self.filter = Some(filter.clone());
688         self
689     }
690 
limit(mut self, limit: i32) -> Self691     pub fn limit(mut self, limit: i32) -> Self {
692         self.limit = Some(limit);
693         self
694     }
695 
local_only(mut self, local_only: bool) -> Self696     pub fn local_only(mut self, local_only: bool) -> Self {
697         self.local_only = Some(local_only);
698         self
699     }
700 
recent_manager<P: IsA<RecentManager>>(mut self, recent_manager: &P) -> Self701     pub fn recent_manager<P: IsA<RecentManager>>(mut self, recent_manager: &P) -> Self {
702         self.recent_manager = Some(recent_manager.clone().upcast());
703         self
704     }
705 
select_multiple(mut self, select_multiple: bool) -> Self706     pub fn select_multiple(mut self, select_multiple: bool) -> Self {
707         self.select_multiple = Some(select_multiple);
708         self
709     }
710 
show_icons(mut self, show_icons: bool) -> Self711     pub fn show_icons(mut self, show_icons: bool) -> Self {
712         self.show_icons = Some(show_icons);
713         self
714     }
715 
show_not_found(mut self, show_not_found: bool) -> Self716     pub fn show_not_found(mut self, show_not_found: bool) -> Self {
717         self.show_not_found = Some(show_not_found);
718         self
719     }
720 
show_private(mut self, show_private: bool) -> Self721     pub fn show_private(mut self, show_private: bool) -> Self {
722         self.show_private = Some(show_private);
723         self
724     }
725 
show_tips(mut self, show_tips: bool) -> Self726     pub fn show_tips(mut self, show_tips: bool) -> Self {
727         self.show_tips = Some(show_tips);
728         self
729     }
730 
sort_type(mut self, sort_type: RecentSortType) -> Self731     pub fn sort_type(mut self, sort_type: RecentSortType) -> Self {
732         self.sort_type = Some(sort_type);
733         self
734     }
735 }
736 
737 pub const NONE_RECENT_CHOOSER_DIALOG: Option<&RecentChooserDialog> = None;
738 
739 impl fmt::Display for RecentChooserDialog {
fmt(&self, f: &mut fmt::Formatter) -> fmt::Result740     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
741         write!(f, "RecentChooserDialog")
742     }
743 }
744