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