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 crate::Align; 6 use crate::Bin; 7 use crate::Buildable; 8 use crate::CellArea; 9 use crate::CellEditable; 10 use crate::CellLayout; 11 use crate::ComboBox; 12 use crate::Container; 13 use crate::ResizeMode; 14 use crate::SensitivityType; 15 use crate::TreeModel; 16 use crate::Widget; 17 use glib::object::Cast; 18 use glib::object::IsA; 19 use glib::translate::*; 20 use glib::StaticType; 21 use glib::ToValue; 22 use std::fmt; 23 24 glib::wrapper! { 25 #[doc(alias = "GtkComboBoxText")] 26 pub struct ComboBoxText(Object<ffi::GtkComboBoxText, ffi::GtkComboBoxTextClass>) @extends ComboBox, Bin, Container, Widget, @implements Buildable, CellEditable, CellLayout; 27 28 match fn { 29 type_ => || ffi::gtk_combo_box_text_get_type(), 30 } 31 } 32 33 impl ComboBoxText { 34 #[doc(alias = "gtk_combo_box_text_new")] new() -> ComboBoxText35 pub fn new() -> ComboBoxText { 36 assert_initialized_main_thread!(); 37 unsafe { Widget::from_glib_none(ffi::gtk_combo_box_text_new()).unsafe_cast() } 38 } 39 40 #[doc(alias = "gtk_combo_box_text_new_with_entry")] 41 #[doc(alias = "new_with_entry")] with_entry() -> ComboBoxText42 pub fn with_entry() -> ComboBoxText { 43 assert_initialized_main_thread!(); 44 unsafe { Widget::from_glib_none(ffi::gtk_combo_box_text_new_with_entry()).unsafe_cast() } 45 } 46 47 // rustdoc-stripper-ignore-next 48 /// Creates a new builder-pattern struct instance to construct [`ComboBoxText`] objects. 49 /// 50 /// This method returns an instance of [`ComboBoxTextBuilder`] which can be used to create [`ComboBoxText`] objects. builder() -> ComboBoxTextBuilder51 pub fn builder() -> ComboBoxTextBuilder { 52 ComboBoxTextBuilder::default() 53 } 54 } 55 56 impl Default for ComboBoxText { default() -> Self57 fn default() -> Self { 58 Self::new() 59 } 60 } 61 62 #[derive(Clone, Default)] 63 // rustdoc-stripper-ignore-next 64 /// A [builder-pattern] type to construct [`ComboBoxText`] objects. 65 /// 66 /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html 67 pub struct ComboBoxTextBuilder { 68 active: Option<i32>, 69 active_id: Option<String>, 70 button_sensitivity: Option<SensitivityType>, 71 cell_area: Option<CellArea>, 72 column_span_column: Option<i32>, 73 entry_text_column: Option<i32>, 74 has_entry: Option<bool>, 75 has_frame: Option<bool>, 76 id_column: Option<i32>, 77 model: Option<TreeModel>, 78 popup_fixed_width: Option<bool>, 79 row_span_column: Option<i32>, 80 wrap_width: Option<i32>, 81 border_width: Option<u32>, 82 child: Option<Widget>, 83 resize_mode: Option<ResizeMode>, 84 app_paintable: Option<bool>, 85 can_default: Option<bool>, 86 can_focus: Option<bool>, 87 events: Option<gdk::EventMask>, 88 expand: Option<bool>, 89 #[cfg(any(feature = "v3_20", feature = "dox"))] 90 #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] 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 editing_canceled: Option<bool>, 119 } 120 121 impl ComboBoxTextBuilder { 122 // rustdoc-stripper-ignore-next 123 /// Create a new [`ComboBoxTextBuilder`]. new() -> Self124 pub fn new() -> Self { 125 Self::default() 126 } 127 128 // rustdoc-stripper-ignore-next 129 /// Build the [`ComboBoxText`]. build(self) -> ComboBoxText130 pub fn build(self) -> ComboBoxText { 131 let mut properties: Vec<(&str, &dyn ToValue)> = vec![]; 132 if let Some(ref active) = self.active { 133 properties.push(("active", active)); 134 } 135 if let Some(ref active_id) = self.active_id { 136 properties.push(("active-id", active_id)); 137 } 138 if let Some(ref button_sensitivity) = self.button_sensitivity { 139 properties.push(("button-sensitivity", button_sensitivity)); 140 } 141 if let Some(ref cell_area) = self.cell_area { 142 properties.push(("cell-area", cell_area)); 143 } 144 if let Some(ref column_span_column) = self.column_span_column { 145 properties.push(("column-span-column", column_span_column)); 146 } 147 if let Some(ref entry_text_column) = self.entry_text_column { 148 properties.push(("entry-text-column", entry_text_column)); 149 } 150 if let Some(ref has_entry) = self.has_entry { 151 properties.push(("has-entry", has_entry)); 152 } 153 if let Some(ref has_frame) = self.has_frame { 154 properties.push(("has-frame", has_frame)); 155 } 156 if let Some(ref id_column) = self.id_column { 157 properties.push(("id-column", id_column)); 158 } 159 if let Some(ref model) = self.model { 160 properties.push(("model", model)); 161 } 162 if let Some(ref popup_fixed_width) = self.popup_fixed_width { 163 properties.push(("popup-fixed-width", popup_fixed_width)); 164 } 165 if let Some(ref row_span_column) = self.row_span_column { 166 properties.push(("row-span-column", row_span_column)); 167 } 168 if let Some(ref wrap_width) = self.wrap_width { 169 properties.push(("wrap-width", wrap_width)); 170 } 171 if let Some(ref border_width) = self.border_width { 172 properties.push(("border-width", border_width)); 173 } 174 if let Some(ref child) = self.child { 175 properties.push(("child", child)); 176 } 177 if let Some(ref resize_mode) = self.resize_mode { 178 properties.push(("resize-mode", resize_mode)); 179 } 180 if let Some(ref app_paintable) = self.app_paintable { 181 properties.push(("app-paintable", app_paintable)); 182 } 183 if let Some(ref can_default) = self.can_default { 184 properties.push(("can-default", can_default)); 185 } 186 if let Some(ref can_focus) = self.can_focus { 187 properties.push(("can-focus", can_focus)); 188 } 189 if let Some(ref events) = self.events { 190 properties.push(("events", events)); 191 } 192 if let Some(ref expand) = self.expand { 193 properties.push(("expand", expand)); 194 } 195 #[cfg(any(feature = "v3_20", feature = "dox"))] 196 if let Some(ref focus_on_click) = self.focus_on_click { 197 properties.push(("focus-on-click", focus_on_click)); 198 } 199 if let Some(ref halign) = self.halign { 200 properties.push(("halign", halign)); 201 } 202 if let Some(ref has_default) = self.has_default { 203 properties.push(("has-default", has_default)); 204 } 205 if let Some(ref has_focus) = self.has_focus { 206 properties.push(("has-focus", has_focus)); 207 } 208 if let Some(ref has_tooltip) = self.has_tooltip { 209 properties.push(("has-tooltip", has_tooltip)); 210 } 211 if let Some(ref height_request) = self.height_request { 212 properties.push(("height-request", height_request)); 213 } 214 if let Some(ref hexpand) = self.hexpand { 215 properties.push(("hexpand", hexpand)); 216 } 217 if let Some(ref hexpand_set) = self.hexpand_set { 218 properties.push(("hexpand-set", hexpand_set)); 219 } 220 if let Some(ref is_focus) = self.is_focus { 221 properties.push(("is-focus", is_focus)); 222 } 223 if let Some(ref margin) = self.margin { 224 properties.push(("margin", margin)); 225 } 226 if let Some(ref margin_bottom) = self.margin_bottom { 227 properties.push(("margin-bottom", margin_bottom)); 228 } 229 if let Some(ref margin_end) = self.margin_end { 230 properties.push(("margin-end", margin_end)); 231 } 232 if let Some(ref margin_start) = self.margin_start { 233 properties.push(("margin-start", margin_start)); 234 } 235 if let Some(ref margin_top) = self.margin_top { 236 properties.push(("margin-top", margin_top)); 237 } 238 if let Some(ref name) = self.name { 239 properties.push(("name", name)); 240 } 241 if let Some(ref no_show_all) = self.no_show_all { 242 properties.push(("no-show-all", no_show_all)); 243 } 244 if let Some(ref opacity) = self.opacity { 245 properties.push(("opacity", opacity)); 246 } 247 if let Some(ref parent) = self.parent { 248 properties.push(("parent", parent)); 249 } 250 if let Some(ref receives_default) = self.receives_default { 251 properties.push(("receives-default", receives_default)); 252 } 253 if let Some(ref sensitive) = self.sensitive { 254 properties.push(("sensitive", sensitive)); 255 } 256 if let Some(ref tooltip_markup) = self.tooltip_markup { 257 properties.push(("tooltip-markup", tooltip_markup)); 258 } 259 if let Some(ref tooltip_text) = self.tooltip_text { 260 properties.push(("tooltip-text", tooltip_text)); 261 } 262 if let Some(ref valign) = self.valign { 263 properties.push(("valign", valign)); 264 } 265 if let Some(ref vexpand) = self.vexpand { 266 properties.push(("vexpand", vexpand)); 267 } 268 if let Some(ref vexpand_set) = self.vexpand_set { 269 properties.push(("vexpand-set", vexpand_set)); 270 } 271 if let Some(ref visible) = self.visible { 272 properties.push(("visible", visible)); 273 } 274 if let Some(ref width_request) = self.width_request { 275 properties.push(("width-request", width_request)); 276 } 277 if let Some(ref editing_canceled) = self.editing_canceled { 278 properties.push(("editing-canceled", editing_canceled)); 279 } 280 glib::Object::new::<ComboBoxText>(&properties) 281 .expect("Failed to create an instance of ComboBoxText") 282 } 283 active(mut self, active: i32) -> Self284 pub fn active(mut self, active: i32) -> Self { 285 self.active = Some(active); 286 self 287 } 288 active_id(mut self, active_id: &str) -> Self289 pub fn active_id(mut self, active_id: &str) -> Self { 290 self.active_id = Some(active_id.to_string()); 291 self 292 } 293 button_sensitivity(mut self, button_sensitivity: SensitivityType) -> Self294 pub fn button_sensitivity(mut self, button_sensitivity: SensitivityType) -> Self { 295 self.button_sensitivity = Some(button_sensitivity); 296 self 297 } 298 cell_area<P: IsA<CellArea>>(mut self, cell_area: &P) -> Self299 pub fn cell_area<P: IsA<CellArea>>(mut self, cell_area: &P) -> Self { 300 self.cell_area = Some(cell_area.clone().upcast()); 301 self 302 } 303 column_span_column(mut self, column_span_column: i32) -> Self304 pub fn column_span_column(mut self, column_span_column: i32) -> Self { 305 self.column_span_column = Some(column_span_column); 306 self 307 } 308 entry_text_column(mut self, entry_text_column: i32) -> Self309 pub fn entry_text_column(mut self, entry_text_column: i32) -> Self { 310 self.entry_text_column = Some(entry_text_column); 311 self 312 } 313 has_entry(mut self, has_entry: bool) -> Self314 pub fn has_entry(mut self, has_entry: bool) -> Self { 315 self.has_entry = Some(has_entry); 316 self 317 } 318 has_frame(mut self, has_frame: bool) -> Self319 pub fn has_frame(mut self, has_frame: bool) -> Self { 320 self.has_frame = Some(has_frame); 321 self 322 } 323 id_column(mut self, id_column: i32) -> Self324 pub fn id_column(mut self, id_column: i32) -> Self { 325 self.id_column = Some(id_column); 326 self 327 } 328 model<P: IsA<TreeModel>>(mut self, model: &P) -> Self329 pub fn model<P: IsA<TreeModel>>(mut self, model: &P) -> Self { 330 self.model = Some(model.clone().upcast()); 331 self 332 } 333 popup_fixed_width(mut self, popup_fixed_width: bool) -> Self334 pub fn popup_fixed_width(mut self, popup_fixed_width: bool) -> Self { 335 self.popup_fixed_width = Some(popup_fixed_width); 336 self 337 } 338 row_span_column(mut self, row_span_column: i32) -> Self339 pub fn row_span_column(mut self, row_span_column: i32) -> Self { 340 self.row_span_column = Some(row_span_column); 341 self 342 } 343 wrap_width(mut self, wrap_width: i32) -> Self344 pub fn wrap_width(mut self, wrap_width: i32) -> Self { 345 self.wrap_width = Some(wrap_width); 346 self 347 } 348 border_width(mut self, border_width: u32) -> Self349 pub fn border_width(mut self, border_width: u32) -> Self { 350 self.border_width = Some(border_width); 351 self 352 } 353 child<P: IsA<Widget>>(mut self, child: &P) -> Self354 pub fn child<P: IsA<Widget>>(mut self, child: &P) -> Self { 355 self.child = Some(child.clone().upcast()); 356 self 357 } 358 resize_mode(mut self, resize_mode: ResizeMode) -> Self359 pub fn resize_mode(mut self, resize_mode: ResizeMode) -> Self { 360 self.resize_mode = Some(resize_mode); 361 self 362 } 363 app_paintable(mut self, app_paintable: bool) -> Self364 pub fn app_paintable(mut self, app_paintable: bool) -> Self { 365 self.app_paintable = Some(app_paintable); 366 self 367 } 368 can_default(mut self, can_default: bool) -> Self369 pub fn can_default(mut self, can_default: bool) -> Self { 370 self.can_default = Some(can_default); 371 self 372 } 373 can_focus(mut self, can_focus: bool) -> Self374 pub fn can_focus(mut self, can_focus: bool) -> Self { 375 self.can_focus = Some(can_focus); 376 self 377 } 378 events(mut self, events: gdk::EventMask) -> Self379 pub fn events(mut self, events: gdk::EventMask) -> Self { 380 self.events = Some(events); 381 self 382 } 383 expand(mut self, expand: bool) -> Self384 pub fn expand(mut self, expand: bool) -> Self { 385 self.expand = Some(expand); 386 self 387 } 388 389 #[cfg(any(feature = "v3_20", feature = "dox"))] 390 #[cfg_attr(feature = "dox", doc(cfg(feature = "v3_20")))] focus_on_click(mut self, focus_on_click: bool) -> Self391 pub fn focus_on_click(mut self, focus_on_click: bool) -> Self { 392 self.focus_on_click = Some(focus_on_click); 393 self 394 } 395 halign(mut self, halign: Align) -> Self396 pub fn halign(mut self, halign: Align) -> Self { 397 self.halign = Some(halign); 398 self 399 } 400 has_default(mut self, has_default: bool) -> Self401 pub fn has_default(mut self, has_default: bool) -> Self { 402 self.has_default = Some(has_default); 403 self 404 } 405 has_focus(mut self, has_focus: bool) -> Self406 pub fn has_focus(mut self, has_focus: bool) -> Self { 407 self.has_focus = Some(has_focus); 408 self 409 } 410 has_tooltip(mut self, has_tooltip: bool) -> Self411 pub fn has_tooltip(mut self, has_tooltip: bool) -> Self { 412 self.has_tooltip = Some(has_tooltip); 413 self 414 } 415 height_request(mut self, height_request: i32) -> Self416 pub fn height_request(mut self, height_request: i32) -> Self { 417 self.height_request = Some(height_request); 418 self 419 } 420 hexpand(mut self, hexpand: bool) -> Self421 pub fn hexpand(mut self, hexpand: bool) -> Self { 422 self.hexpand = Some(hexpand); 423 self 424 } 425 hexpand_set(mut self, hexpand_set: bool) -> Self426 pub fn hexpand_set(mut self, hexpand_set: bool) -> Self { 427 self.hexpand_set = Some(hexpand_set); 428 self 429 } 430 is_focus(mut self, is_focus: bool) -> Self431 pub fn is_focus(mut self, is_focus: bool) -> Self { 432 self.is_focus = Some(is_focus); 433 self 434 } 435 margin(mut self, margin: i32) -> Self436 pub fn margin(mut self, margin: i32) -> Self { 437 self.margin = Some(margin); 438 self 439 } 440 margin_bottom(mut self, margin_bottom: i32) -> Self441 pub fn margin_bottom(mut self, margin_bottom: i32) -> Self { 442 self.margin_bottom = Some(margin_bottom); 443 self 444 } 445 margin_end(mut self, margin_end: i32) -> Self446 pub fn margin_end(mut self, margin_end: i32) -> Self { 447 self.margin_end = Some(margin_end); 448 self 449 } 450 margin_start(mut self, margin_start: i32) -> Self451 pub fn margin_start(mut self, margin_start: i32) -> Self { 452 self.margin_start = Some(margin_start); 453 self 454 } 455 margin_top(mut self, margin_top: i32) -> Self456 pub fn margin_top(mut self, margin_top: i32) -> Self { 457 self.margin_top = Some(margin_top); 458 self 459 } 460 name(mut self, name: &str) -> Self461 pub fn name(mut self, name: &str) -> Self { 462 self.name = Some(name.to_string()); 463 self 464 } 465 no_show_all(mut self, no_show_all: bool) -> Self466 pub fn no_show_all(mut self, no_show_all: bool) -> Self { 467 self.no_show_all = Some(no_show_all); 468 self 469 } 470 opacity(mut self, opacity: f64) -> Self471 pub fn opacity(mut self, opacity: f64) -> Self { 472 self.opacity = Some(opacity); 473 self 474 } 475 parent<P: IsA<Container>>(mut self, parent: &P) -> Self476 pub fn parent<P: IsA<Container>>(mut self, parent: &P) -> Self { 477 self.parent = Some(parent.clone().upcast()); 478 self 479 } 480 receives_default(mut self, receives_default: bool) -> Self481 pub fn receives_default(mut self, receives_default: bool) -> Self { 482 self.receives_default = Some(receives_default); 483 self 484 } 485 sensitive(mut self, sensitive: bool) -> Self486 pub fn sensitive(mut self, sensitive: bool) -> Self { 487 self.sensitive = Some(sensitive); 488 self 489 } 490 tooltip_markup(mut self, tooltip_markup: &str) -> Self491 pub fn tooltip_markup(mut self, tooltip_markup: &str) -> Self { 492 self.tooltip_markup = Some(tooltip_markup.to_string()); 493 self 494 } 495 tooltip_text(mut self, tooltip_text: &str) -> Self496 pub fn tooltip_text(mut self, tooltip_text: &str) -> Self { 497 self.tooltip_text = Some(tooltip_text.to_string()); 498 self 499 } 500 valign(mut self, valign: Align) -> Self501 pub fn valign(mut self, valign: Align) -> Self { 502 self.valign = Some(valign); 503 self 504 } 505 vexpand(mut self, vexpand: bool) -> Self506 pub fn vexpand(mut self, vexpand: bool) -> Self { 507 self.vexpand = Some(vexpand); 508 self 509 } 510 vexpand_set(mut self, vexpand_set: bool) -> Self511 pub fn vexpand_set(mut self, vexpand_set: bool) -> Self { 512 self.vexpand_set = Some(vexpand_set); 513 self 514 } 515 visible(mut self, visible: bool) -> Self516 pub fn visible(mut self, visible: bool) -> Self { 517 self.visible = Some(visible); 518 self 519 } 520 width_request(mut self, width_request: i32) -> Self521 pub fn width_request(mut self, width_request: i32) -> Self { 522 self.width_request = Some(width_request); 523 self 524 } 525 editing_canceled(mut self, editing_canceled: bool) -> Self526 pub fn editing_canceled(mut self, editing_canceled: bool) -> Self { 527 self.editing_canceled = Some(editing_canceled); 528 self 529 } 530 } 531 532 pub const NONE_COMBO_BOX_TEXT: Option<&ComboBoxText> = None; 533 534 pub trait ComboBoxTextExt: 'static { 535 #[doc(alias = "gtk_combo_box_text_append")] append(&self, id: Option<&str>, text: &str)536 fn append(&self, id: Option<&str>, text: &str); 537 538 #[doc(alias = "gtk_combo_box_text_append_text")] append_text(&self, text: &str)539 fn append_text(&self, text: &str); 540 541 #[doc(alias = "gtk_combo_box_text_get_active_text")] 542 #[doc(alias = "get_active_text")] active_text(&self) -> Option<glib::GString>543 fn active_text(&self) -> Option<glib::GString>; 544 545 #[doc(alias = "gtk_combo_box_text_insert")] insert(&self, position: i32, id: Option<&str>, text: &str)546 fn insert(&self, position: i32, id: Option<&str>, text: &str); 547 548 #[doc(alias = "gtk_combo_box_text_insert_text")] insert_text(&self, position: i32, text: &str)549 fn insert_text(&self, position: i32, text: &str); 550 551 #[doc(alias = "gtk_combo_box_text_prepend")] prepend(&self, id: Option<&str>, text: &str)552 fn prepend(&self, id: Option<&str>, text: &str); 553 554 #[doc(alias = "gtk_combo_box_text_prepend_text")] prepend_text(&self, text: &str)555 fn prepend_text(&self, text: &str); 556 557 #[doc(alias = "gtk_combo_box_text_remove")] remove(&self, position: i32)558 fn remove(&self, position: i32); 559 560 #[doc(alias = "gtk_combo_box_text_remove_all")] remove_all(&self)561 fn remove_all(&self); 562 } 563 564 impl<O: IsA<ComboBoxText>> ComboBoxTextExt for O { append(&self, id: Option<&str>, text: &str)565 fn append(&self, id: Option<&str>, text: &str) { 566 unsafe { 567 ffi::gtk_combo_box_text_append( 568 self.as_ref().to_glib_none().0, 569 id.to_glib_none().0, 570 text.to_glib_none().0, 571 ); 572 } 573 } 574 append_text(&self, text: &str)575 fn append_text(&self, text: &str) { 576 unsafe { 577 ffi::gtk_combo_box_text_append_text( 578 self.as_ref().to_glib_none().0, 579 text.to_glib_none().0, 580 ); 581 } 582 } 583 active_text(&self) -> Option<glib::GString>584 fn active_text(&self) -> Option<glib::GString> { 585 unsafe { 586 from_glib_full(ffi::gtk_combo_box_text_get_active_text( 587 self.as_ref().to_glib_none().0, 588 )) 589 } 590 } 591 insert(&self, position: i32, id: Option<&str>, text: &str)592 fn insert(&self, position: i32, id: Option<&str>, text: &str) { 593 unsafe { 594 ffi::gtk_combo_box_text_insert( 595 self.as_ref().to_glib_none().0, 596 position, 597 id.to_glib_none().0, 598 text.to_glib_none().0, 599 ); 600 } 601 } 602 insert_text(&self, position: i32, text: &str)603 fn insert_text(&self, position: i32, text: &str) { 604 unsafe { 605 ffi::gtk_combo_box_text_insert_text( 606 self.as_ref().to_glib_none().0, 607 position, 608 text.to_glib_none().0, 609 ); 610 } 611 } 612 prepend(&self, id: Option<&str>, text: &str)613 fn prepend(&self, id: Option<&str>, text: &str) { 614 unsafe { 615 ffi::gtk_combo_box_text_prepend( 616 self.as_ref().to_glib_none().0, 617 id.to_glib_none().0, 618 text.to_glib_none().0, 619 ); 620 } 621 } 622 prepend_text(&self, text: &str)623 fn prepend_text(&self, text: &str) { 624 unsafe { 625 ffi::gtk_combo_box_text_prepend_text( 626 self.as_ref().to_glib_none().0, 627 text.to_glib_none().0, 628 ); 629 } 630 } 631 remove(&self, position: i32)632 fn remove(&self, position: i32) { 633 unsafe { 634 ffi::gtk_combo_box_text_remove(self.as_ref().to_glib_none().0, position); 635 } 636 } 637 remove_all(&self)638 fn remove_all(&self) { 639 unsafe { 640 ffi::gtk_combo_box_text_remove_all(self.as_ref().to_glib_none().0); 641 } 642 } 643 } 644 645 impl fmt::Display for ComboBoxText { fmt(&self, f: &mut fmt::Formatter) -> fmt::Result646 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 647 f.write_str("ComboBoxText") 648 } 649 } 650