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