gtk4/auto/page_setup_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_10")]
6#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
7use crate::Accessible;
8#[cfg(feature = "v4_20")]
9#[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
10use crate::WindowGravity;
11use crate::{
12 AccessibleRole, Align, Application, Buildable, ConstraintTarget, Dialog, LayoutManager, Native,
13 Overflow, PageSetup, PrintSettings, Root, ShortcutManager, Widget, Window, ffi,
14};
15use glib::{prelude::*, translate::*};
16
17#[cfg(feature = "v4_10")]
18#[cfg_attr(docsrs, doc(cfg(feature = "v4_10")))]
19glib::wrapper! {
20 ///
21 ///
22 /// It can be used very much like any other GTK dialog, at the
23 /// cost of the portability offered by the high-level printing
24 /// API in [`PrintOperation`][crate::PrintOperation].
25 ///
26 /// ## CSS nodes
27 ///
28 /// [`PageSetupUnixDialog`][crate::PageSetupUnixDialog] has a single CSS node with the name `window` and
29 /// style class `.pagesetup`.
30 ///
31 /// # Implements
32 ///
33 /// [`DialogExt`][trait@crate::prelude::DialogExt], [`GtkWindowExt`][trait@crate::prelude::GtkWindowExt], [`WidgetExt`][trait@crate::prelude::WidgetExt], [`trait@glib::ObjectExt`], [`AccessibleExt`][trait@crate::prelude::AccessibleExt], [`BuildableExt`][trait@crate::prelude::BuildableExt], [`ConstraintTargetExt`][trait@crate::prelude::ConstraintTargetExt], [`NativeExt`][trait@crate::prelude::NativeExt], [`RootExt`][trait@crate::prelude::RootExt], [`ShortcutManagerExt`][trait@crate::prelude::ShortcutManagerExt], [`DialogExtManual`][trait@crate::prelude::DialogExtManual], [`WidgetExtManual`][trait@crate::prelude::WidgetExtManual], [`AccessibleExtManual`][trait@crate::prelude::AccessibleExtManual]
34 #[doc(alias = "GtkPageSetupUnixDialog")]
35 pub struct PageSetupUnixDialog(Object<ffi::GtkPageSetupUnixDialog>) @extends Dialog, Window, Widget, @implements Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager;
36
37 match fn {
38 type_ => || ffi::gtk_page_setup_unix_dialog_get_type(),
39 }
40}
41
42#[cfg(not(feature = "v4_10"))]
43glib::wrapper! {
44 #[doc(alias = "GtkPageSetupUnixDialog")]
45 pub struct PageSetupUnixDialog(Object<ffi::GtkPageSetupUnixDialog>) @extends Dialog, Window, Widget, @implements Buildable, ConstraintTarget, Native, Root, ShortcutManager;
46
47 match fn {
48 type_ => || ffi::gtk_page_setup_unix_dialog_get_type(),
49 }
50}
51
52impl PageSetupUnixDialog {
53 /// Creates a new page setup dialog.
54 /// ## `title`
55 /// the title of the dialog
56 /// ## `parent`
57 /// transient parent of the dialog
58 ///
59 /// # Returns
60 ///
61 /// the new [`PageSetupUnixDialog`][crate::PageSetupUnixDialog]
62 #[doc(alias = "gtk_page_setup_unix_dialog_new")]
63 pub fn new(title: Option<&str>, parent: Option<&impl IsA<Window>>) -> PageSetupUnixDialog {
64 assert_initialized_main_thread!();
65 unsafe {
66 Widget::from_glib_none(ffi::gtk_page_setup_unix_dialog_new(
67 title.to_glib_none().0,
68 parent.map(|p| p.as_ref()).to_glib_none().0,
69 ))
70 .unsafe_cast()
71 }
72 }
73
74 // rustdoc-stripper-ignore-next
75 /// Creates a new builder-pattern struct instance to construct [`PageSetupUnixDialog`] objects.
76 ///
77 /// This method returns an instance of [`PageSetupUnixDialogBuilder`](crate::builders::PageSetupUnixDialogBuilder) which can be used to create [`PageSetupUnixDialog`] objects.
78 pub fn builder() -> PageSetupUnixDialogBuilder {
79 PageSetupUnixDialogBuilder::new()
80 }
81
82 /// Gets the currently selected page setup from the dialog.
83 ///
84 /// # Returns
85 ///
86 /// the current page setup
87 #[doc(alias = "gtk_page_setup_unix_dialog_get_page_setup")]
88 #[doc(alias = "get_page_setup")]
89 pub fn page_setup(&self) -> PageSetup {
90 unsafe {
91 from_glib_none(ffi::gtk_page_setup_unix_dialog_get_page_setup(
92 self.to_glib_none().0,
93 ))
94 }
95 }
96
97 /// Gets the current print settings from the dialog.
98 ///
99 /// # Returns
100 ///
101 /// the current print settings
102 #[doc(alias = "gtk_page_setup_unix_dialog_get_print_settings")]
103 #[doc(alias = "get_print_settings")]
104 pub fn print_settings(&self) -> Option<PrintSettings> {
105 unsafe {
106 from_glib_none(ffi::gtk_page_setup_unix_dialog_get_print_settings(
107 self.to_glib_none().0,
108 ))
109 }
110 }
111
112 /// Sets the [`PageSetup`][crate::PageSetup] from which the page setup
113 /// dialog takes its values.
114 /// ## `page_setup`
115 /// a [`PageSetup`][crate::PageSetup]
116 #[doc(alias = "gtk_page_setup_unix_dialog_set_page_setup")]
117 pub fn set_page_setup(&self, page_setup: &PageSetup) {
118 unsafe {
119 ffi::gtk_page_setup_unix_dialog_set_page_setup(
120 self.to_glib_none().0,
121 page_setup.to_glib_none().0,
122 );
123 }
124 }
125
126 /// Sets the [`PrintSettings`][crate::PrintSettings] from which the page setup dialog
127 /// takes its values.
128 /// ## `print_settings`
129 /// a [`PrintSettings`][crate::PrintSettings]
130 #[doc(alias = "gtk_page_setup_unix_dialog_set_print_settings")]
131 pub fn set_print_settings(&self, print_settings: Option<&PrintSettings>) {
132 unsafe {
133 ffi::gtk_page_setup_unix_dialog_set_print_settings(
134 self.to_glib_none().0,
135 print_settings.to_glib_none().0,
136 );
137 }
138 }
139}
140
141impl Default for PageSetupUnixDialog {
142 fn default() -> Self {
143 glib::object::Object::new::<Self>()
144 }
145}
146
147// rustdoc-stripper-ignore-next
148/// A [builder-pattern] type to construct [`PageSetupUnixDialog`] objects.
149///
150/// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
151#[must_use = "The builder must be built to be used"]
152pub struct PageSetupUnixDialogBuilder {
153 builder: glib::object::ObjectBuilder<'static, PageSetupUnixDialog>,
154}
155
156impl PageSetupUnixDialogBuilder {
157 fn new() -> Self {
158 Self {
159 builder: glib::object::Object::builder(),
160 }
161 }
162
163 /// header, NULL);
164 /// dialog = g_object_new (GTK_TYPE_DIALOG, header, TRUE, NULL);
165 /// ```text
166 ///
167 /// Use [`Window`][crate::Window] instead
168 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
169 pub fn use_header_bar(self, use_header_bar: i32) -> Self {
170 Self {
171 builder: self.builder.property("use-header-bar", use_header_bar),
172 }
173 }
174
175 /// The [`Application`][crate::Application] associated with the window.
176 ///
177 /// The application will be kept alive for at least as long as it
178 /// has any windows associated with it (see g_application_hold()
179 /// for a way to keep it alive without windows).
180 ///
181 /// Normally, the connection between the application and the window
182 /// will remain until the window is destroyed, but you can explicitly
183 /// remove it by setting the this property to `NULL`.
184 pub fn application(self, application: &impl IsA<Application>) -> Self {
185 Self {
186 builder: self
187 .builder
188 .property("application", application.clone().upcast()),
189 }
190 }
191
192 /// The child widget.
193 pub fn child(self, child: &impl IsA<Widget>) -> Self {
194 Self {
195 builder: self.builder.property("child", child.clone().upcast()),
196 }
197 }
198
199 /// Whether the window should have a frame (also known as *decorations*).
200 pub fn decorated(self, decorated: bool) -> Self {
201 Self {
202 builder: self.builder.property("decorated", decorated),
203 }
204 }
205
206 /// The default height of the window.
207 pub fn default_height(self, default_height: i32) -> Self {
208 Self {
209 builder: self.builder.property("default-height", default_height),
210 }
211 }
212
213 /// The default widget.
214 pub fn default_widget(self, default_widget: &impl IsA<Widget>) -> Self {
215 Self {
216 builder: self
217 .builder
218 .property("default-widget", default_widget.clone().upcast()),
219 }
220 }
221
222 /// The default width of the window.
223 pub fn default_width(self, default_width: i32) -> Self {
224 Self {
225 builder: self.builder.property("default-width", default_width),
226 }
227 }
228
229 /// Whether the window frame should have a close button.
230 pub fn deletable(self, deletable: bool) -> Self {
231 Self {
232 builder: self.builder.property("deletable", deletable),
233 }
234 }
235
236 /// If this window should be destroyed when the parent is destroyed.
237 pub fn destroy_with_parent(self, destroy_with_parent: bool) -> Self {
238 Self {
239 builder: self
240 .builder
241 .property("destroy-with-parent", destroy_with_parent),
242 }
243 }
244
245 /// The display that will display this window.
246 pub fn display(self, display: &impl IsA<gdk::Display>) -> Self {
247 Self {
248 builder: self.builder.property("display", display.clone().upcast()),
249 }
250 }
251
252 /// Whether 'focus rectangles' are currently visible in this window.
253 ///
254 /// This property is maintained by GTK based on user input
255 /// and should not be set by applications.
256 pub fn focus_visible(self, focus_visible: bool) -> Self {
257 Self {
258 builder: self.builder.property("focus-visible", focus_visible),
259 }
260 }
261
262 /// The focus widget.
263 pub fn focus_widget(self, focus_widget: &impl IsA<Widget>) -> Self {
264 Self {
265 builder: self
266 .builder
267 .property("focus-widget", focus_widget.clone().upcast()),
268 }
269 }
270
271 /// Whether the window is fullscreen.
272 ///
273 /// Setting this property is the equivalent of calling
274 /// [`GtkWindowExt::fullscreen()`][crate::prelude::GtkWindowExt::fullscreen()] or [`GtkWindowExt::unfullscreen()`][crate::prelude::GtkWindowExt::unfullscreen()];
275 /// either operation is asynchronous, which means you will need to
276 /// connect to the ::notify signal in order to know whether the
277 /// operation was successful.
278 pub fn fullscreened(self, fullscreened: bool) -> Self {
279 Self {
280 builder: self.builder.property("fullscreened", fullscreened),
281 }
282 }
283
284 /// The gravity to use when resizing the window programmatically.
285 ///
286 /// Gravity describes which point of the window we want to keep
287 /// fixed (meaning that the window will grow in the opposite direction).
288 /// For example, a gravity of `GTK_WINDOW_GRAVITY_TOP_RIGHT` means that we
289 /// want the to fix top right corner of the window.
290 #[cfg(feature = "v4_20")]
291 #[cfg_attr(docsrs, doc(cfg(feature = "v4_20")))]
292 pub fn gravity(self, gravity: WindowGravity) -> Self {
293 Self {
294 builder: self.builder.property("gravity", gravity),
295 }
296 }
297
298 /// for activating
299 /// menubars.
300 #[cfg(feature = "v4_2")]
301 #[cfg_attr(docsrs, doc(cfg(feature = "v4_2")))]
302 pub fn handle_menubar_accel(self, handle_menubar_accel: bool) -> Self {
303 Self {
304 builder: self
305 .builder
306 .property("handle-menubar-accel", handle_menubar_accel),
307 }
308 }
309
310 /// If this window should be hidden instead of destroyed when the user clicks
311 /// the close button.
312 pub fn hide_on_close(self, hide_on_close: bool) -> Self {
313 Self {
314 builder: self.builder.property("hide-on-close", hide_on_close),
315 }
316 }
317
318 /// Specifies the name of the themed icon to use as the window icon.
319 ///
320 /// See [`IconTheme`][crate::IconTheme] for more details.
321 pub fn icon_name(self, icon_name: impl Into<glib::GString>) -> Self {
322 Self {
323 builder: self.builder.property("icon-name", icon_name.into()),
324 }
325 }
326
327 /// Whether the window is maximized.
328 ///
329 /// Setting this property is the equivalent of calling
330 /// [`GtkWindowExt::maximize()`][crate::prelude::GtkWindowExt::maximize()] or [`GtkWindowExt::unmaximize()`][crate::prelude::GtkWindowExt::unmaximize()];
331 /// either operation is asynchronous, which means you will need to
332 /// connect to the ::notify signal in order to know whether the
333 /// operation was successful.
334 pub fn maximized(self, maximized: bool) -> Self {
335 Self {
336 builder: self.builder.property("maximized", maximized),
337 }
338 }
339
340 /// Whether mnemonics are currently visible in this window.
341 ///
342 /// This property is maintained by GTK based on user input,
343 /// and should not be set by applications.
344 pub fn mnemonics_visible(self, mnemonics_visible: bool) -> Self {
345 Self {
346 builder: self
347 .builder
348 .property("mnemonics-visible", mnemonics_visible),
349 }
350 }
351
352 /// If true, the window is modal.
353 pub fn modal(self, modal: bool) -> Self {
354 Self {
355 builder: self.builder.property("modal", modal),
356 }
357 }
358
359 /// If true, users can resize the window.
360 pub fn resizable(self, resizable: bool) -> Self {
361 Self {
362 builder: self.builder.property("resizable", resizable),
363 }
364 }
365
366 /// A write-only property for setting window's startup notification identifier.
367 pub fn startup_id(self, startup_id: impl Into<glib::GString>) -> Self {
368 Self {
369 builder: self.builder.property("startup-id", startup_id.into()),
370 }
371 }
372
373 /// The title of the window.
374 pub fn title(self, title: impl Into<glib::GString>) -> Self {
375 Self {
376 builder: self.builder.property("title", title.into()),
377 }
378 }
379
380 /// The titlebar widget.
381 #[cfg(feature = "v4_6")]
382 #[cfg_attr(docsrs, doc(cfg(feature = "v4_6")))]
383 pub fn titlebar(self, titlebar: &impl IsA<Widget>) -> Self {
384 Self {
385 builder: self.builder.property("titlebar", titlebar.clone().upcast()),
386 }
387 }
388
389 /// The transient parent of the window.
390 pub fn transient_for(self, transient_for: &impl IsA<Window>) -> Self {
391 Self {
392 builder: self
393 .builder
394 .property("transient-for", transient_for.clone().upcast()),
395 }
396 }
397
398 /// Whether the widget or any of its descendents can accept
399 /// the input focus.
400 ///
401 /// This property is meant to be set by widget implementations,
402 /// typically in their instance init function.
403 pub fn can_focus(self, can_focus: bool) -> Self {
404 Self {
405 builder: self.builder.property("can-focus", can_focus),
406 }
407 }
408
409 /// Whether the widget can receive pointer events.
410 pub fn can_target(self, can_target: bool) -> Self {
411 Self {
412 builder: self.builder.property("can-target", can_target),
413 }
414 }
415
416 /// A list of css classes applied to this widget.
417 pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
418 Self {
419 builder: self.builder.property("css-classes", css_classes.into()),
420 }
421 }
422
423 /// The name of this widget in the CSS tree.
424 ///
425 /// This property is meant to be set by widget implementations,
426 /// typically in their instance init function.
427 pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
428 Self {
429 builder: self.builder.property("css-name", css_name.into()),
430 }
431 }
432
433 /// The cursor used by @widget.
434 pub fn cursor(self, cursor: &gdk::Cursor) -> Self {
435 Self {
436 builder: self.builder.property("cursor", cursor.clone()),
437 }
438 }
439
440 /// Whether the widget should grab focus when it is clicked with the mouse.
441 ///
442 /// This property is only relevant for widgets that can take focus.
443 pub fn focus_on_click(self, focus_on_click: bool) -> Self {
444 Self {
445 builder: self.builder.property("focus-on-click", focus_on_click),
446 }
447 }
448
449 /// Whether this widget itself will accept the input focus.
450 pub fn focusable(self, focusable: bool) -> Self {
451 Self {
452 builder: self.builder.property("focusable", focusable),
453 }
454 }
455
456 /// How to distribute horizontal space if widget gets extra space.
457 pub fn halign(self, halign: Align) -> Self {
458 Self {
459 builder: self.builder.property("halign", halign),
460 }
461 }
462
463 /// Enables or disables the emission of the [`query-tooltip`][struct@crate::Widget#query-tooltip]
464 /// signal on @widget.
465 ///
466 /// A true value indicates that @widget can have a tooltip, in this case
467 /// the widget will be queried using [`query-tooltip`][struct@crate::Widget#query-tooltip] to
468 /// determine whether it will provide a tooltip or not.
469 pub fn has_tooltip(self, has_tooltip: bool) -> Self {
470 Self {
471 builder: self.builder.property("has-tooltip", has_tooltip),
472 }
473 }
474
475 /// Overrides for height request of the widget.
476 ///
477 /// If this is -1, the natural request will be used.
478 pub fn height_request(self, height_request: i32) -> Self {
479 Self {
480 builder: self.builder.property("height-request", height_request),
481 }
482 }
483
484 /// Whether to expand horizontally.
485 pub fn hexpand(self, hexpand: bool) -> Self {
486 Self {
487 builder: self.builder.property("hexpand", hexpand),
488 }
489 }
490
491 /// Whether to use the `hexpand` property.
492 pub fn hexpand_set(self, hexpand_set: bool) -> Self {
493 Self {
494 builder: self.builder.property("hexpand-set", hexpand_set),
495 }
496 }
497
498 /// The [`LayoutManager`][crate::LayoutManager] instance to use to compute
499 /// the preferred size of the widget, and allocate its children.
500 ///
501 /// This property is meant to be set by widget implementations,
502 /// typically in their instance init function.
503 pub fn layout_manager(self, layout_manager: &impl IsA<LayoutManager>) -> Self {
504 Self {
505 builder: self
506 .builder
507 .property("layout-manager", layout_manager.clone().upcast()),
508 }
509 }
510
511 /// Makes this widget act like a modal dialog, with respect to
512 /// event delivery.
513 ///
514 /// Global event controllers will not handle events with targets
515 /// inside the widget, unless they are set up to ignore propagation
516 /// limits. See [`EventControllerExt::set_propagation_limit()`][crate::prelude::EventControllerExt::set_propagation_limit()].
517 #[cfg(feature = "v4_18")]
518 #[cfg_attr(docsrs, doc(cfg(feature = "v4_18")))]
519 pub fn limit_events(self, limit_events: bool) -> Self {
520 Self {
521 builder: self.builder.property("limit-events", limit_events),
522 }
523 }
524
525 /// Margin on bottom side of widget.
526 ///
527 /// This property adds margin outside of the widget's normal size
528 /// request, the margin will be added in addition to the size from
529 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
530 pub fn margin_bottom(self, margin_bottom: i32) -> Self {
531 Self {
532 builder: self.builder.property("margin-bottom", margin_bottom),
533 }
534 }
535
536 /// Margin on end of widget, horizontally.
537 ///
538 /// This property supports left-to-right and right-to-left text
539 /// directions.
540 ///
541 /// This property adds margin outside of the widget's normal size
542 /// request, the margin will be added in addition to the size from
543 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
544 pub fn margin_end(self, margin_end: i32) -> Self {
545 Self {
546 builder: self.builder.property("margin-end", margin_end),
547 }
548 }
549
550 /// Margin on start of widget, horizontally.
551 ///
552 /// This property supports left-to-right and right-to-left text
553 /// directions.
554 ///
555 /// This property adds margin outside of the widget's normal size
556 /// request, the margin will be added in addition to the size from
557 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
558 pub fn margin_start(self, margin_start: i32) -> Self {
559 Self {
560 builder: self.builder.property("margin-start", margin_start),
561 }
562 }
563
564 /// Margin on top side of widget.
565 ///
566 /// This property adds margin outside of the widget's normal size
567 /// request, the margin will be added in addition to the size from
568 /// [`WidgetExt::set_size_request()`][crate::prelude::WidgetExt::set_size_request()] for example.
569 pub fn margin_top(self, margin_top: i32) -> Self {
570 Self {
571 builder: self.builder.property("margin-top", margin_top),
572 }
573 }
574
575 /// The name of the widget.
576 pub fn name(self, name: impl Into<glib::GString>) -> Self {
577 Self {
578 builder: self.builder.property("name", name.into()),
579 }
580 }
581
582 /// The requested opacity of the widget.
583 pub fn opacity(self, opacity: f64) -> Self {
584 Self {
585 builder: self.builder.property("opacity", opacity),
586 }
587 }
588
589 /// How content outside the widget's content area is treated.
590 ///
591 /// This property is meant to be set by widget implementations,
592 /// typically in their instance init function.
593 pub fn overflow(self, overflow: Overflow) -> Self {
594 Self {
595 builder: self.builder.property("overflow", overflow),
596 }
597 }
598
599 /// Whether the widget will receive the default action when it is focused.
600 pub fn receives_default(self, receives_default: bool) -> Self {
601 Self {
602 builder: self.builder.property("receives-default", receives_default),
603 }
604 }
605
606 /// Whether the widget responds to input.
607 pub fn sensitive(self, sensitive: bool) -> Self {
608 Self {
609 builder: self.builder.property("sensitive", sensitive),
610 }
611 }
612
613 /// Sets the text of tooltip to be the given string, which is marked up
614 /// with Pango markup.
615 ///
616 /// Also see [`Tooltip::set_markup()`][crate::Tooltip::set_markup()].
617 ///
618 /// This is a convenience property which will take care of getting the
619 /// tooltip shown if the given string is not `NULL`:
620 /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
621 /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
622 /// the default signal handler.
623 ///
624 /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
625 /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
626 pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
627 Self {
628 builder: self
629 .builder
630 .property("tooltip-markup", tooltip_markup.into()),
631 }
632 }
633
634 /// Sets the text of tooltip to be the given string.
635 ///
636 /// Also see [`Tooltip::set_text()`][crate::Tooltip::set_text()].
637 ///
638 /// This is a convenience property which will take care of getting the
639 /// tooltip shown if the given string is not `NULL`:
640 /// [`has-tooltip`][struct@crate::Widget#has-tooltip] will automatically be set to true
641 /// and there will be taken care of [`query-tooltip`][struct@crate::Widget#query-tooltip] in
642 /// the default signal handler.
643 ///
644 /// Note that if both [`tooltip-text`][struct@crate::Widget#tooltip-text] and
645 /// [`tooltip-markup`][struct@crate::Widget#tooltip-markup] are set, the last one wins.
646 pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
647 Self {
648 builder: self.builder.property("tooltip-text", tooltip_text.into()),
649 }
650 }
651
652 /// How to distribute vertical space if widget gets extra space.
653 pub fn valign(self, valign: Align) -> Self {
654 Self {
655 builder: self.builder.property("valign", valign),
656 }
657 }
658
659 /// Whether to expand vertically.
660 pub fn vexpand(self, vexpand: bool) -> Self {
661 Self {
662 builder: self.builder.property("vexpand", vexpand),
663 }
664 }
665
666 /// Whether to use the `vexpand` property.
667 pub fn vexpand_set(self, vexpand_set: bool) -> Self {
668 Self {
669 builder: self.builder.property("vexpand-set", vexpand_set),
670 }
671 }
672
673 /// Whether the widget is visible.
674 pub fn visible(self, visible: bool) -> Self {
675 Self {
676 builder: self.builder.property("visible", visible),
677 }
678 }
679
680 /// Overrides for width request of the widget.
681 ///
682 /// If this is -1, the natural request will be used.
683 pub fn width_request(self, width_request: i32) -> Self {
684 Self {
685 builder: self.builder.property("width-request", width_request),
686 }
687 }
688
689 /// The accessible role of the given [`Accessible`][crate::Accessible] implementation.
690 ///
691 /// The accessible role cannot be changed once set.
692 pub fn accessible_role(self, accessible_role: AccessibleRole) -> Self {
693 Self {
694 builder: self.builder.property("accessible-role", accessible_role),
695 }
696 }
697
698 // rustdoc-stripper-ignore-next
699 /// Build the [`PageSetupUnixDialog`].
700 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
701 pub fn build(self) -> PageSetupUnixDialog {
702 assert_initialized_main_thread!();
703 self.builder.build()
704 }
705}