gtk4/auto/
print_unix_dialog.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
5#[cfg(feature = "v4_20")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
7use crate::WindowGravity;
8use crate::{
9    ffi, Accessible, AccessibleRole, Align, Application, Buildable, ConstraintTarget, Dialog,
10    LayoutManager, Native, Overflow, PageSetup, PrintCapabilities, PrintSettings, Printer, Root,
11    ShortcutManager, Widget, Window,
12};
13use glib::{
14    prelude::*,
15    signal::{connect_raw, SignalHandlerId},
16    translate::*,
17};
18use std::boxed::Box as Box_;
19
20glib::wrapper! {
21    #[doc(alias = "GtkPrintUnixDialog")]
22    pub struct PrintUnixDialog(Object<ffi::GtkPrintUnixDialog>) @extends Dialog, Window, Widget, @implements Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager;
23
24    match fn {
25        type_ => || ffi::gtk_print_unix_dialog_get_type(),
26    }
27}
28
29impl PrintUnixDialog {
30    #[doc(alias = "gtk_print_unix_dialog_new")]
31    pub fn new(title: Option<&str>, parent: Option<&impl IsA<Window>>) -> PrintUnixDialog {
32        assert_initialized_main_thread!();
33        unsafe {
34            Widget::from_glib_none(ffi::gtk_print_unix_dialog_new(
35                title.to_glib_none().0,
36                parent.map(|p| p.as_ref()).to_glib_none().0,
37            ))
38            .unsafe_cast()
39        }
40    }
41
42    // rustdoc-stripper-ignore-next
43    /// Creates a new builder-pattern struct instance to construct [`PrintUnixDialog`] objects.
44    ///
45    /// This method returns an instance of [`PrintUnixDialogBuilder`](crate::builders::PrintUnixDialogBuilder) which can be used to create [`PrintUnixDialog`] objects.
46    pub fn builder() -> PrintUnixDialogBuilder {
47        PrintUnixDialogBuilder::new()
48    }
49
50    #[doc(alias = "gtk_print_unix_dialog_add_custom_tab")]
51    pub fn add_custom_tab(&self, child: &impl IsA<Widget>, tab_label: &impl IsA<Widget>) {
52        unsafe {
53            ffi::gtk_print_unix_dialog_add_custom_tab(
54                self.to_glib_none().0,
55                child.as_ref().to_glib_none().0,
56                tab_label.as_ref().to_glib_none().0,
57            );
58        }
59    }
60
61    #[doc(alias = "gtk_print_unix_dialog_get_current_page")]
62    #[doc(alias = "get_current_page")]
63    #[doc(alias = "current-page")]
64    pub fn current_page(&self) -> i32 {
65        unsafe { ffi::gtk_print_unix_dialog_get_current_page(self.to_glib_none().0) }
66    }
67
68    #[doc(alias = "gtk_print_unix_dialog_get_embed_page_setup")]
69    #[doc(alias = "get_embed_page_setup")]
70    #[doc(alias = "embed-page-setup")]
71    pub fn embeds_page_setup(&self) -> bool {
72        unsafe {
73            from_glib(ffi::gtk_print_unix_dialog_get_embed_page_setup(
74                self.to_glib_none().0,
75            ))
76        }
77    }
78
79    #[doc(alias = "gtk_print_unix_dialog_get_has_selection")]
80    #[doc(alias = "get_has_selection")]
81    #[doc(alias = "has-selection")]
82    pub fn has_selection(&self) -> bool {
83        unsafe {
84            from_glib(ffi::gtk_print_unix_dialog_get_has_selection(
85                self.to_glib_none().0,
86            ))
87        }
88    }
89
90    #[doc(alias = "gtk_print_unix_dialog_get_manual_capabilities")]
91    #[doc(alias = "get_manual_capabilities")]
92    #[doc(alias = "manual-capabilities")]
93    pub fn manual_capabilities(&self) -> PrintCapabilities {
94        unsafe {
95            from_glib(ffi::gtk_print_unix_dialog_get_manual_capabilities(
96                self.to_glib_none().0,
97            ))
98        }
99    }
100
101    #[doc(alias = "gtk_print_unix_dialog_get_page_setup")]
102    #[doc(alias = "get_page_setup")]
103    #[doc(alias = "page-setup")]
104    pub fn page_setup(&self) -> PageSetup {
105        unsafe {
106            from_glib_none(ffi::gtk_print_unix_dialog_get_page_setup(
107                self.to_glib_none().0,
108            ))
109        }
110    }
111
112    #[doc(alias = "gtk_print_unix_dialog_get_page_setup_set")]
113    #[doc(alias = "get_page_setup_set")]
114    pub fn is_page_setup_set(&self) -> bool {
115        unsafe {
116            from_glib(ffi::gtk_print_unix_dialog_get_page_setup_set(
117                self.to_glib_none().0,
118            ))
119        }
120    }
121
122    #[doc(alias = "gtk_print_unix_dialog_get_selected_printer")]
123    #[doc(alias = "get_selected_printer")]
124    #[doc(alias = "selected-printer")]
125    pub fn selected_printer(&self) -> Option<Printer> {
126        unsafe {
127            from_glib_none(ffi::gtk_print_unix_dialog_get_selected_printer(
128                self.to_glib_none().0,
129            ))
130        }
131    }
132
133    #[doc(alias = "gtk_print_unix_dialog_get_settings")]
134    #[doc(alias = "get_settings")]
135    #[doc(alias = "print-settings")]
136    pub fn settings(&self) -> PrintSettings {
137        unsafe {
138            from_glib_full(ffi::gtk_print_unix_dialog_get_settings(
139                self.to_glib_none().0,
140            ))
141        }
142    }
143
144    #[doc(alias = "gtk_print_unix_dialog_get_support_selection")]
145    #[doc(alias = "get_support_selection")]
146    #[doc(alias = "support-selection")]
147    pub fn supports_selection(&self) -> bool {
148        unsafe {
149            from_glib(ffi::gtk_print_unix_dialog_get_support_selection(
150                self.to_glib_none().0,
151            ))
152        }
153    }
154
155    #[doc(alias = "gtk_print_unix_dialog_set_current_page")]
156    #[doc(alias = "current-page")]
157    pub fn set_current_page(&self, current_page: i32) {
158        unsafe {
159            ffi::gtk_print_unix_dialog_set_current_page(self.to_glib_none().0, current_page);
160        }
161    }
162
163    #[doc(alias = "gtk_print_unix_dialog_set_embed_page_setup")]
164    #[doc(alias = "embed-page-setup")]
165    pub fn set_embed_page_setup(&self, embed: bool) {
166        unsafe {
167            ffi::gtk_print_unix_dialog_set_embed_page_setup(
168                self.to_glib_none().0,
169                embed.into_glib(),
170            );
171        }
172    }
173
174    #[doc(alias = "gtk_print_unix_dialog_set_has_selection")]
175    #[doc(alias = "has-selection")]
176    pub fn set_has_selection(&self, has_selection: bool) {
177        unsafe {
178            ffi::gtk_print_unix_dialog_set_has_selection(
179                self.to_glib_none().0,
180                has_selection.into_glib(),
181            );
182        }
183    }
184
185    #[doc(alias = "gtk_print_unix_dialog_set_manual_capabilities")]
186    #[doc(alias = "manual-capabilities")]
187    pub fn set_manual_capabilities(&self, capabilities: PrintCapabilities) {
188        unsafe {
189            ffi::gtk_print_unix_dialog_set_manual_capabilities(
190                self.to_glib_none().0,
191                capabilities.into_glib(),
192            );
193        }
194    }
195
196    #[doc(alias = "gtk_print_unix_dialog_set_page_setup")]
197    #[doc(alias = "page-setup")]
198    pub fn set_page_setup(&self, page_setup: &PageSetup) {
199        unsafe {
200            ffi::gtk_print_unix_dialog_set_page_setup(
201                self.to_glib_none().0,
202                page_setup.to_glib_none().0,
203            );
204        }
205    }
206
207    #[doc(alias = "gtk_print_unix_dialog_set_settings")]
208    #[doc(alias = "print-settings")]
209    pub fn set_settings(&self, settings: Option<&PrintSettings>) {
210        unsafe {
211            ffi::gtk_print_unix_dialog_set_settings(
212                self.to_glib_none().0,
213                settings.to_glib_none().0,
214            );
215        }
216    }
217
218    #[doc(alias = "gtk_print_unix_dialog_set_support_selection")]
219    #[doc(alias = "support-selection")]
220    pub fn set_support_selection(&self, support_selection: bool) {
221        unsafe {
222            ffi::gtk_print_unix_dialog_set_support_selection(
223                self.to_glib_none().0,
224                support_selection.into_glib(),
225            );
226        }
227    }
228
229    #[doc(alias = "current-page")]
230    pub fn connect_current_page_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
231        unsafe extern "C" fn notify_current_page_trampoline<F: Fn(&PrintUnixDialog) + 'static>(
232            this: *mut ffi::GtkPrintUnixDialog,
233            _param_spec: glib::ffi::gpointer,
234            f: glib::ffi::gpointer,
235        ) {
236            let f: &F = &*(f as *const F);
237            f(&from_glib_borrow(this))
238        }
239        unsafe {
240            let f: Box_<F> = Box_::new(f);
241            connect_raw(
242                self.as_ptr() as *mut _,
243                c"notify::current-page".as_ptr() as *const _,
244                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
245                    notify_current_page_trampoline::<F> as *const (),
246                )),
247                Box_::into_raw(f),
248            )
249        }
250    }
251
252    #[doc(alias = "embed-page-setup")]
253    pub fn connect_embed_page_setup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
254        unsafe extern "C" fn notify_embed_page_setup_trampoline<
255            F: Fn(&PrintUnixDialog) + 'static,
256        >(
257            this: *mut ffi::GtkPrintUnixDialog,
258            _param_spec: glib::ffi::gpointer,
259            f: glib::ffi::gpointer,
260        ) {
261            let f: &F = &*(f as *const F);
262            f(&from_glib_borrow(this))
263        }
264        unsafe {
265            let f: Box_<F> = Box_::new(f);
266            connect_raw(
267                self.as_ptr() as *mut _,
268                c"notify::embed-page-setup".as_ptr() as *const _,
269                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
270                    notify_embed_page_setup_trampoline::<F> as *const (),
271                )),
272                Box_::into_raw(f),
273            )
274        }
275    }
276
277    #[doc(alias = "has-selection")]
278    pub fn connect_has_selection_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
279        unsafe extern "C" fn notify_has_selection_trampoline<F: Fn(&PrintUnixDialog) + 'static>(
280            this: *mut ffi::GtkPrintUnixDialog,
281            _param_spec: glib::ffi::gpointer,
282            f: glib::ffi::gpointer,
283        ) {
284            let f: &F = &*(f as *const F);
285            f(&from_glib_borrow(this))
286        }
287        unsafe {
288            let f: Box_<F> = Box_::new(f);
289            connect_raw(
290                self.as_ptr() as *mut _,
291                c"notify::has-selection".as_ptr() as *const _,
292                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
293                    notify_has_selection_trampoline::<F> as *const (),
294                )),
295                Box_::into_raw(f),
296            )
297        }
298    }
299
300    #[doc(alias = "manual-capabilities")]
301    pub fn connect_manual_capabilities_notify<F: Fn(&Self) + 'static>(
302        &self,
303        f: F,
304    ) -> SignalHandlerId {
305        unsafe extern "C" fn notify_manual_capabilities_trampoline<
306            F: Fn(&PrintUnixDialog) + 'static,
307        >(
308            this: *mut ffi::GtkPrintUnixDialog,
309            _param_spec: glib::ffi::gpointer,
310            f: glib::ffi::gpointer,
311        ) {
312            let f: &F = &*(f as *const F);
313            f(&from_glib_borrow(this))
314        }
315        unsafe {
316            let f: Box_<F> = Box_::new(f);
317            connect_raw(
318                self.as_ptr() as *mut _,
319                c"notify::manual-capabilities".as_ptr() as *const _,
320                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
321                    notify_manual_capabilities_trampoline::<F> as *const (),
322                )),
323                Box_::into_raw(f),
324            )
325        }
326    }
327
328    #[doc(alias = "page-setup")]
329    pub fn connect_page_setup_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
330        unsafe extern "C" fn notify_page_setup_trampoline<F: Fn(&PrintUnixDialog) + 'static>(
331            this: *mut ffi::GtkPrintUnixDialog,
332            _param_spec: glib::ffi::gpointer,
333            f: glib::ffi::gpointer,
334        ) {
335            let f: &F = &*(f as *const F);
336            f(&from_glib_borrow(this))
337        }
338        unsafe {
339            let f: Box_<F> = Box_::new(f);
340            connect_raw(
341                self.as_ptr() as *mut _,
342                c"notify::page-setup".as_ptr() as *const _,
343                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
344                    notify_page_setup_trampoline::<F> as *const (),
345                )),
346                Box_::into_raw(f),
347            )
348        }
349    }
350
351    #[doc(alias = "print-settings")]
352    pub fn connect_print_settings_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
353        unsafe extern "C" fn notify_print_settings_trampoline<F: Fn(&PrintUnixDialog) + 'static>(
354            this: *mut ffi::GtkPrintUnixDialog,
355            _param_spec: glib::ffi::gpointer,
356            f: glib::ffi::gpointer,
357        ) {
358            let f: &F = &*(f as *const F);
359            f(&from_glib_borrow(this))
360        }
361        unsafe {
362            let f: Box_<F> = Box_::new(f);
363            connect_raw(
364                self.as_ptr() as *mut _,
365                c"notify::print-settings".as_ptr() as *const _,
366                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
367                    notify_print_settings_trampoline::<F> as *const (),
368                )),
369                Box_::into_raw(f),
370            )
371        }
372    }
373
374    #[doc(alias = "selected-printer")]
375    pub fn connect_selected_printer_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
376        unsafe extern "C" fn notify_selected_printer_trampoline<
377            F: Fn(&PrintUnixDialog) + 'static,
378        >(
379            this: *mut ffi::GtkPrintUnixDialog,
380            _param_spec: glib::ffi::gpointer,
381            f: glib::ffi::gpointer,
382        ) {
383            let f: &F = &*(f as *const F);
384            f(&from_glib_borrow(this))
385        }
386        unsafe {
387            let f: Box_<F> = Box_::new(f);
388            connect_raw(
389                self.as_ptr() as *mut _,
390                c"notify::selected-printer".as_ptr() as *const _,
391                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
392                    notify_selected_printer_trampoline::<F> as *const (),
393                )),
394                Box_::into_raw(f),
395            )
396        }
397    }
398
399    #[doc(alias = "support-selection")]
400    pub fn connect_support_selection_notify<F: Fn(&Self) + 'static>(
401        &self,
402        f: F,
403    ) -> SignalHandlerId {
404        unsafe extern "C" fn notify_support_selection_trampoline<
405            F: Fn(&PrintUnixDialog) + 'static,
406        >(
407            this: *mut ffi::GtkPrintUnixDialog,
408            _param_spec: glib::ffi::gpointer,
409            f: glib::ffi::gpointer,
410        ) {
411            let f: &F = &*(f as *const F);
412            f(&from_glib_borrow(this))
413        }
414        unsafe {
415            let f: Box_<F> = Box_::new(f);
416            connect_raw(
417                self.as_ptr() as *mut _,
418                c"notify::support-selection".as_ptr() as *const _,
419                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
420                    notify_support_selection_trampoline::<F> as *const (),
421                )),
422                Box_::into_raw(f),
423            )
424        }
425    }
426}
427
428impl Default for PrintUnixDialog {
429    fn default() -> Self {
430        glib::object::Object::new::<Self>()
431    }
432}
433
434// rustdoc-stripper-ignore-next
435/// A [builder-pattern] type to construct [`PrintUnixDialog`] objects.
436///
437/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
438#[must_use = "The builder must be built to be used"]
439pub struct PrintUnixDialogBuilder {
440    builder: glib::object::ObjectBuilder<'static, PrintUnixDialog>,
441}
442
443impl PrintUnixDialogBuilder {
444    fn new() -> Self {
445        Self {
446            builder: glib::object::Object::builder(),
447        }
448    }
449
450    pub fn current_page(self, current_page: i32) -> Self {
451        Self {
452            builder: self.builder.property("current-page", current_page),
453        }
454    }
455
456    pub fn embed_page_setup(self, embed_page_setup: bool) -> Self {
457        Self {
458            builder: self.builder.property("embed-page-setup", embed_page_setup),
459        }
460    }
461
462    pub fn has_selection(self, has_selection: bool) -> Self {
463        Self {
464            builder: self.builder.property("has-selection", has_selection),
465        }
466    }
467
468    pub fn manual_capabilities(self, manual_capabilities: PrintCapabilities) -> Self {
469        Self {
470            builder: self
471                .builder
472                .property("manual-capabilities", manual_capabilities),
473        }
474    }
475
476    pub fn page_setup(self, page_setup: &PageSetup) -> Self {
477        Self {
478            builder: self.builder.property("page-setup", page_setup.clone()),
479        }
480    }
481
482    pub fn print_settings(self, print_settings: &PrintSettings) -> Self {
483        Self {
484            builder: self
485                .builder
486                .property("print-settings", print_settings.clone()),
487        }
488    }
489
490    pub fn support_selection(self, support_selection: bool) -> Self {
491        Self {
492            builder: self
493                .builder
494                .property("support-selection", support_selection),
495        }
496    }
497
498    #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
499    pub fn use_header_bar(self, use_header_bar: i32) -> Self {
500        Self {
501            builder: self.builder.property("use-header-bar", use_header_bar),
502        }
503    }
504
505    pub fn application(self, application: &impl IsA<Application>) -> Self {
506        Self {
507            builder: self
508                .builder
509                .property("application", application.clone().upcast()),
510        }
511    }
512
513    pub fn child(self, child: &impl IsA<Widget>) -> Self {
514        Self {
515            builder: self.builder.property("child", child.clone().upcast()),
516        }
517    }
518
519    pub fn decorated(self, decorated: bool) -> Self {
520        Self {
521            builder: self.builder.property("decorated", decorated),
522        }
523    }
524
525    pub fn default_height(self, default_height: i32) -> Self {
526        Self {
527            builder: self.builder.property("default-height", default_height),
528        }
529    }
530
531    pub fn default_widget(self, default_widget: &impl IsA<Widget>) -> Self {
532        Self {
533            builder: self
534                .builder
535                .property("default-widget", default_widget.clone().upcast()),
536        }
537    }
538
539    pub fn default_width(self, default_width: i32) -> Self {
540        Self {
541            builder: self.builder.property("default-width", default_width),
542        }
543    }
544
545    pub fn deletable(self, deletable: bool) -> Self {
546        Self {
547            builder: self.builder.property("deletable", deletable),
548        }
549    }
550
551    pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
552        Self {
553            builder: self
554                .builder
555                .property("destroy-with-parent", destroy_with_parent),
556        }
557    }
558
559    pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
560        Self {
561            builder: self.builder.property("display", display.clone().upcast()),
562        }
563    }
564
565    pub fn focus_visible(self, focus_visible: bool) -> Self {
566        Self {
567            builder: self.builder.property("focus-visible", focus_visible),
568        }
569    }
570
571    pub fn focus_widget(self, focus_widget: &impl IsA<Widget>) -> Self {
572        Self {
573            builder: self
574                .builder
575                .property("focus-widget", focus_widget.clone().upcast()),
576        }
577    }
578
579    pub fn fullscreened(self, fullscreened: bool) -> Self {
580        Self {
581            builder: self.builder.property("fullscreened", fullscreened),
582        }
583    }
584
585    #[cfg(feature = "v4_20")]
586    #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
587    pub fn gravity(self, gravity: WindowGravity) -> Self {
588        Self {
589            builder: self.builder.property("gravity", gravity),
590        }
591    }
592
593    #[cfg(feature = "v4_2")]
594    #[cfg_attr(docsrs, doc(cfg(feature = "v4_2")))]
595    pub fn handle_menubar_accel(self, handle_menubar_accel: bool) -> Self {
596        Self {
597            builder: self
598                .builder
599                .property("handle-menubar-accel", handle_menubar_accel),
600        }
601    }
602
603    pub fn hide_on_close(self, hide_on_close: bool) -> Self {
604        Self {
605            builder: self.builder.property("hide-on-close", hide_on_close),
606        }
607    }
608
609    pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
610        Self {
611            builder: self.builder.property("icon-name", icon_name.into()),
612        }
613    }
614
615    pub fn maximized(self, maximized: bool) -> Self {
616        Self {
617            builder: self.builder.property("maximized", maximized),
618        }
619    }
620
621    pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
622        Self {
623            builder: self
624                .builder
625                .property("mnemonics-visible", mnemonics_visible),
626        }
627    }
628
629    pub fn modal(self, modal: bool) -> Self {
630        Self {
631            builder: self.builder.property("modal", modal),
632        }
633    }
634
635    pub fn resizable(self, resizable: bool) -> Self {
636        Self {
637            builder: self.builder.property("resizable", resizable),
638        }
639    }
640
641    pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
642        Self {
643            builder: self.builder.property("startup-id", startup_id.into()),
644        }
645    }
646
647    pub fn title(self, title: impl Into<glib::GString>) -> Self {
648        Self {
649            builder: self.builder.property("title", title.into()),
650        }
651    }
652
653    #[cfg(feature = "v4_6")]
654    #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
655    pub fn titlebar(self, titlebar: &impl IsA<Widget>) -> Self {
656        Self {
657            builder: self.builder.property("titlebar", titlebar.clone().upcast()),
658        }
659    }
660
661    pub fn transient_for(self, transient_for: &impl IsA<Window>) -> Self {
662        Self {
663            builder: self
664                .builder
665                .property("transient-for", transient_for.clone().upcast()),
666        }
667    }
668
669    pub fn can_focus(self, can_focus: bool) -> Self {
670        Self {
671            builder: self.builder.property("can-focus", can_focus),
672        }
673    }
674
675    pub fn can_target(self, can_target: bool) -> Self {
676        Self {
677            builder: self.builder.property("can-target", can_target),
678        }
679    }
680
681    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
682        Self {
683            builder: self.builder.property("css-classes", css_classes.into()),
684        }
685    }
686
687    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
688        Self {
689            builder: self.builder.property("css-name", css_name.into()),
690        }
691    }
692
693    pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
694        Self {
695            builder: self.builder.property("cursor", cursor.clone()),
696        }
697    }
698
699    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
700        Self {
701            builder: self.builder.property("focus-on-click", focus_on_click),
702        }
703    }
704
705    pub fn focusable(self, focusable: bool) -> Self {
706        Self {
707            builder: self.builder.property("focusable", focusable),
708        }
709    }
710
711    pub fn halign(self, halign: Align) -> Self {
712        Self {
713            builder: self.builder.property("halign", halign),
714        }
715    }
716
717    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
718        Self {
719            builder: self.builder.property("has-tooltip", has_tooltip),
720        }
721    }
722
723    pub fn height_request(self, height_request: i32) -> Self {
724        Self {
725            builder: self.builder.property("height-request", height_request),
726        }
727    }
728
729    pub fn hexpand(self, hexpand: bool) -> Self {
730        Self {
731            builder: self.builder.property("hexpand", hexpand),
732        }
733    }
734
735    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
736        Self {
737            builder: self.builder.property("hexpand-set", hexpand_set),
738        }
739    }
740
741    pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
742        Self {
743            builder: self
744                .builder
745                .property("layout-manager", layout_manager.clone().upcast()),
746        }
747    }
748
749    #[cfg(feature = "v4_18")]
750    #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
751    pub fn limit_events(self, limit_events: bool) -> Self {
752        Self {
753            builder: self.builder.property("limit-events", limit_events),
754        }
755    }
756
757    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
758        Self {
759            builder: self.builder.property("margin-bottom", margin_bottom),
760        }
761    }
762
763    pub fn margin_end(self, margin_end: i32) -> Self {
764        Self {
765            builder: self.builder.property("margin-end", margin_end),
766        }
767    }
768
769    pub fn margin_start(self, margin_start: i32) -> Self {
770        Self {
771            builder: self.builder.property("margin-start", margin_start),
772        }
773    }
774
775    pub fn margin_top(self, margin_top: i32) -> Self {
776        Self {
777            builder: self.builder.property("margin-top", margin_top),
778        }
779    }
780
781    pub fn name(self, name: impl Into<glib::GString>) -> Self {
782        Self {
783            builder: self.builder.property("name", name.into()),
784        }
785    }
786
787    pub fn opacity(self, opacity: f64) -> Self {
788        Self {
789            builder: self.builder.property("opacity", opacity),
790        }
791    }
792
793    pub fn overflow(self, overflow: Overflow) -> Self {
794        Self {
795            builder: self.builder.property("overflow", overflow),
796        }
797    }
798
799    pub fn receives_default(self, receives_default: bool) -> Self {
800        Self {
801            builder: self.builder.property("receives-default", receives_default),
802        }
803    }
804
805    pub fn sensitive(self, sensitive: bool) -> Self {
806        Self {
807            builder: self.builder.property("sensitive", sensitive),
808        }
809    }
810
811    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
812        Self {
813            builder: self
814                .builder
815                .property("tooltip-markup", tooltip_markup.into()),
816        }
817    }
818
819    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
820        Self {
821            builder: self.builder.property("tooltip-text", tooltip_text.into()),
822        }
823    }
824
825    pub fn valign(self, valign: Align) -> Self {
826        Self {
827            builder: self.builder.property("valign", valign),
828        }
829    }
830
831    pub fn vexpand(self, vexpand: bool) -> Self {
832        Self {
833            builder: self.builder.property("vexpand", vexpand),
834        }
835    }
836
837    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
838        Self {
839            builder: self.builder.property("vexpand-set", vexpand_set),
840        }
841    }
842
843    pub fn visible(self, visible: bool) -> Self {
844        Self {
845            builder: self.builder.property("visible", visible),
846        }
847    }
848
849    pub fn width_request(self, width_request: i32) -> Self {
850        Self {
851            builder: self.builder.property("width-request", width_request),
852        }
853    }
854
855    pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
856        Self {
857            builder: self.builder.property("accessible-role", accessible_role),
858        }
859    }
860
861    // rustdoc-stripper-ignore-next
862    /// Build the [`PrintUnixDialog`].
863    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
864    pub fn build(self) -> PrintUnixDialog {
865        assert_initialized_main_thread!();
866        self.builder.build()
867    }
868}