1#![allow(deprecated)]
5
6use crate::{
7 ffi, Buildable, CellArea, CellLayout, CellRenderer, SortType, TreeIter, TreeModel,
8 TreeViewColumnSizing, Widget,
9};
10use glib::{
11 object::ObjectType as _,
12 prelude::*,
13 signal::{connect_raw, SignalHandlerId},
14 translate::*,
15};
16use std::boxed::Box as Box_;
17
18glib::wrapper! {
19 #[doc(alias = "GtkTreeViewColumn")]
130 pub struct TreeViewColumn(Object<ffi::GtkTreeViewColumn>) @implements Buildable, CellLayout;
131
132 match fn {
133 type_ => || ffi::gtk_tree_view_column_get_type(),
134 }
135}
136
137impl TreeViewColumn {
138 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
148 #[allow(deprecated)]
149 #[doc(alias = "gtk_tree_view_column_new")]
150 pub fn new() -> TreeViewColumn {
151 assert_initialized_main_thread!();
152 unsafe { from_glib_none(ffi::gtk_tree_view_column_new()) }
153 }
154
155 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
167 #[allow(deprecated)]
168 #[doc(alias = "gtk_tree_view_column_new_with_area")]
169 #[doc(alias = "new_with_area")]
170 pub fn with_area(area: &impl IsA<CellArea>) -> TreeViewColumn {
171 skip_assert_initialized!();
172 unsafe {
173 from_glib_none(ffi::gtk_tree_view_column_new_with_area(
174 area.as_ref().to_glib_none().0,
175 ))
176 }
177 }
178
179 pub fn builder() -> TreeViewColumnBuilder {
184 TreeViewColumnBuilder::new()
185 }
186
187 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
206 #[allow(deprecated)]
207 #[doc(alias = "gtk_tree_view_column_add_attribute")]
208 pub fn add_attribute(
209 &self,
210 cell_renderer: &impl IsA<CellRenderer>,
211 attribute: &str,
212 column: i32,
213 ) {
214 unsafe {
215 ffi::gtk_tree_view_column_add_attribute(
216 self.to_glib_none().0,
217 cell_renderer.as_ref().to_glib_none().0,
218 attribute.to_glib_none().0,
219 column,
220 );
221 }
222 }
223
224 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
246 #[allow(deprecated)]
247 #[doc(alias = "gtk_tree_view_column_cell_get_position")]
248 pub fn cell_get_position(&self, cell_renderer: &impl IsA<CellRenderer>) -> Option<(i32, i32)> {
249 unsafe {
250 let mut x_offset = std::mem::MaybeUninit::uninit();
251 let mut width = std::mem::MaybeUninit::uninit();
252 let ret = from_glib(ffi::gtk_tree_view_column_cell_get_position(
253 self.to_glib_none().0,
254 cell_renderer.as_ref().to_glib_none().0,
255 x_offset.as_mut_ptr(),
256 width.as_mut_ptr(),
257 ));
258 if ret {
259 Some((x_offset.assume_init(), width.assume_init()))
260 } else {
261 None
262 }
263 }
264 }
265
266 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
288 #[allow(deprecated)]
289 #[doc(alias = "gtk_tree_view_column_cell_get_size")]
290 pub fn cell_get_size(&self) -> (i32, i32, i32, i32) {
291 unsafe {
292 let mut x_offset = std::mem::MaybeUninit::uninit();
293 let mut y_offset = std::mem::MaybeUninit::uninit();
294 let mut width = std::mem::MaybeUninit::uninit();
295 let mut height = std::mem::MaybeUninit::uninit();
296 ffi::gtk_tree_view_column_cell_get_size(
297 self.to_glib_none().0,
298 x_offset.as_mut_ptr(),
299 y_offset.as_mut_ptr(),
300 width.as_mut_ptr(),
301 height.as_mut_ptr(),
302 );
303 (
304 x_offset.assume_init(),
305 y_offset.assume_init(),
306 width.assume_init(),
307 height.assume_init(),
308 )
309 }
310 }
311
312 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
324 #[allow(deprecated)]
325 #[doc(alias = "gtk_tree_view_column_cell_is_visible")]
326 pub fn cell_is_visible(&self) -> bool {
327 unsafe {
328 from_glib(ffi::gtk_tree_view_column_cell_is_visible(
329 self.to_glib_none().0,
330 ))
331 }
332 }
333
334 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
351 #[allow(deprecated)]
352 #[doc(alias = "gtk_tree_view_column_cell_set_cell_data")]
353 pub fn cell_set_cell_data(
354 &self,
355 tree_model: &impl IsA<TreeModel>,
356 iter: &TreeIter,
357 is_expander: bool,
358 is_expanded: bool,
359 ) {
360 unsafe {
361 ffi::gtk_tree_view_column_cell_set_cell_data(
362 self.to_glib_none().0,
363 tree_model.as_ref().to_glib_none().0,
364 mut_override(iter.to_glib_none().0),
365 is_expander.into_glib(),
366 is_expanded.into_glib(),
367 );
368 }
369 }
370
371 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
377 #[allow(deprecated)]
378 #[doc(alias = "gtk_tree_view_column_clear")]
379 pub fn clear(&self) {
380 unsafe {
381 ffi::gtk_tree_view_column_clear(self.to_glib_none().0);
382 }
383 }
384
385 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
394 #[allow(deprecated)]
395 #[doc(alias = "gtk_tree_view_column_clear_attributes")]
396 pub fn clear_attributes(&self, cell_renderer: &impl IsA<CellRenderer>) {
397 unsafe {
398 ffi::gtk_tree_view_column_clear_attributes(
399 self.to_glib_none().0,
400 cell_renderer.as_ref().to_glib_none().0,
401 );
402 }
403 }
404
405 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
412 #[allow(deprecated)]
413 #[doc(alias = "gtk_tree_view_column_clicked")]
414 pub fn clicked(&self) {
415 unsafe {
416 ffi::gtk_tree_view_column_clicked(self.to_glib_none().0);
417 }
418 }
419
420 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
429 #[allow(deprecated)]
430 #[doc(alias = "gtk_tree_view_column_focus_cell")]
431 pub fn focus_cell(&self, cell: &impl IsA<CellRenderer>) {
432 unsafe {
433 ffi::gtk_tree_view_column_focus_cell(
434 self.to_glib_none().0,
435 cell.as_ref().to_glib_none().0,
436 );
437 }
438 }
439
440 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
451 #[allow(deprecated)]
452 #[doc(alias = "gtk_tree_view_column_get_alignment")]
453 #[doc(alias = "get_alignment")]
454 pub fn alignment(&self) -> f32 {
455 unsafe { ffi::gtk_tree_view_column_get_alignment(self.to_glib_none().0) }
456 }
457
458 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
468 #[allow(deprecated)]
469 #[doc(alias = "gtk_tree_view_column_get_button")]
470 #[doc(alias = "get_button")]
471 pub fn button(&self) -> Widget {
472 unsafe { from_glib_none(ffi::gtk_tree_view_column_get_button(self.to_glib_none().0)) }
473 }
474
475 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
485 #[allow(deprecated)]
486 #[doc(alias = "gtk_tree_view_column_get_clickable")]
487 #[doc(alias = "get_clickable")]
488 #[doc(alias = "clickable")]
489 pub fn is_clickable(&self) -> bool {
490 unsafe {
491 from_glib(ffi::gtk_tree_view_column_get_clickable(
492 self.to_glib_none().0,
493 ))
494 }
495 }
496
497 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
507 #[allow(deprecated)]
508 #[doc(alias = "gtk_tree_view_column_get_expand")]
509 #[doc(alias = "get_expand")]
510 #[doc(alias = "expand")]
511 pub fn expands(&self) -> bool {
512 unsafe { from_glib(ffi::gtk_tree_view_column_get_expand(self.to_glib_none().0)) }
513 }
514
515 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
526 #[allow(deprecated)]
527 #[doc(alias = "gtk_tree_view_column_get_fixed_width")]
528 #[doc(alias = "get_fixed_width")]
529 #[doc(alias = "fixed-width")]
530 pub fn fixed_width(&self) -> i32 {
531 unsafe { ffi::gtk_tree_view_column_get_fixed_width(self.to_glib_none().0) }
532 }
533
534 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
545 #[allow(deprecated)]
546 #[doc(alias = "gtk_tree_view_column_get_max_width")]
547 #[doc(alias = "get_max_width")]
548 #[doc(alias = "max-width")]
549 pub fn max_width(&self) -> i32 {
550 unsafe { ffi::gtk_tree_view_column_get_max_width(self.to_glib_none().0) }
551 }
552
553 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
564 #[allow(deprecated)]
565 #[doc(alias = "gtk_tree_view_column_get_min_width")]
566 #[doc(alias = "get_min_width")]
567 #[doc(alias = "min-width")]
568 pub fn min_width(&self) -> i32 {
569 unsafe { ffi::gtk_tree_view_column_get_min_width(self.to_glib_none().0) }
570 }
571
572 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
582 #[allow(deprecated)]
583 #[doc(alias = "gtk_tree_view_column_get_reorderable")]
584 #[doc(alias = "get_reorderable")]
585 #[doc(alias = "reorderable")]
586 pub fn is_reorderable(&self) -> bool {
587 unsafe {
588 from_glib(ffi::gtk_tree_view_column_get_reorderable(
589 self.to_glib_none().0,
590 ))
591 }
592 }
593
594 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
604 #[allow(deprecated)]
605 #[doc(alias = "gtk_tree_view_column_get_resizable")]
606 #[doc(alias = "get_resizable")]
607 #[doc(alias = "resizable")]
608 pub fn is_resizable(&self) -> bool {
609 unsafe {
610 from_glib(ffi::gtk_tree_view_column_get_resizable(
611 self.to_glib_none().0,
612 ))
613 }
614 }
615
616 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
626 #[allow(deprecated)]
627 #[doc(alias = "gtk_tree_view_column_get_sizing")]
628 #[doc(alias = "get_sizing")]
629 pub fn sizing(&self) -> TreeViewColumnSizing {
630 unsafe { from_glib(ffi::gtk_tree_view_column_get_sizing(self.to_glib_none().0)) }
631 }
632
633 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
647 #[allow(deprecated)]
648 #[doc(alias = "gtk_tree_view_column_get_sort_column_id")]
649 #[doc(alias = "get_sort_column_id")]
650 #[doc(alias = "sort-column-id")]
651 pub fn sort_column_id(&self) -> i32 {
652 unsafe { ffi::gtk_tree_view_column_get_sort_column_id(self.to_glib_none().0) }
653 }
654
655 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
665 #[allow(deprecated)]
666 #[doc(alias = "gtk_tree_view_column_get_sort_indicator")]
667 #[doc(alias = "get_sort_indicator")]
668 #[doc(alias = "sort-indicator")]
669 pub fn is_sort_indicator(&self) -> bool {
670 unsafe {
671 from_glib(ffi::gtk_tree_view_column_get_sort_indicator(
672 self.to_glib_none().0,
673 ))
674 }
675 }
676
677 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
687 #[allow(deprecated)]
688 #[doc(alias = "gtk_tree_view_column_get_sort_order")]
689 #[doc(alias = "get_sort_order")]
690 #[doc(alias = "sort-order")]
691 pub fn sort_order(&self) -> SortType {
692 unsafe {
693 from_glib(ffi::gtk_tree_view_column_get_sort_order(
694 self.to_glib_none().0,
695 ))
696 }
697 }
698
699 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
709 #[allow(deprecated)]
710 #[doc(alias = "gtk_tree_view_column_get_spacing")]
711 #[doc(alias = "get_spacing")]
712 pub fn spacing(&self) -> i32 {
713 unsafe { ffi::gtk_tree_view_column_get_spacing(self.to_glib_none().0) }
714 }
715
716 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
727 #[allow(deprecated)]
728 #[doc(alias = "gtk_tree_view_column_get_title")]
729 #[doc(alias = "get_title")]
730 pub fn title(&self) -> glib::GString {
731 unsafe { from_glib_none(ffi::gtk_tree_view_column_get_title(self.to_glib_none().0)) }
732 }
733
734 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
747 #[allow(deprecated)]
748 #[doc(alias = "gtk_tree_view_column_get_tree_view")]
749 #[doc(alias = "get_tree_view")]
750 pub fn tree_view(&self) -> Option<Widget> {
751 unsafe {
752 from_glib_none(ffi::gtk_tree_view_column_get_tree_view(
753 self.to_glib_none().0,
754 ))
755 }
756 }
757
758 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
769 #[allow(deprecated)]
770 #[doc(alias = "gtk_tree_view_column_get_visible")]
771 #[doc(alias = "get_visible")]
772 #[doc(alias = "visible")]
773 pub fn is_visible(&self) -> bool {
774 unsafe { from_glib(ffi::gtk_tree_view_column_get_visible(self.to_glib_none().0)) }
775 }
776
777 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
789 #[allow(deprecated)]
790 #[doc(alias = "gtk_tree_view_column_get_widget")]
791 #[doc(alias = "get_widget")]
792 pub fn widget(&self) -> Option<Widget> {
793 unsafe { from_glib_none(ffi::gtk_tree_view_column_get_widget(self.to_glib_none().0)) }
794 }
795
796 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
806 #[allow(deprecated)]
807 #[doc(alias = "gtk_tree_view_column_get_width")]
808 #[doc(alias = "get_width")]
809 pub fn width(&self) -> i32 {
810 unsafe { ffi::gtk_tree_view_column_get_width(self.to_glib_none().0) }
811 }
812
813 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
823 #[allow(deprecated)]
824 #[doc(alias = "gtk_tree_view_column_get_x_offset")]
825 #[doc(alias = "get_x_offset")]
826 #[doc(alias = "x-offset")]
827 pub fn x_offset(&self) -> i32 {
828 unsafe { ffi::gtk_tree_view_column_get_x_offset(self.to_glib_none().0) }
829 }
830
831 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
843 #[allow(deprecated)]
844 #[doc(alias = "gtk_tree_view_column_pack_end")]
845 pub fn pack_end(&self, cell: &impl IsA<CellRenderer>, expand: bool) {
846 unsafe {
847 ffi::gtk_tree_view_column_pack_end(
848 self.to_glib_none().0,
849 cell.as_ref().to_glib_none().0,
850 expand.into_glib(),
851 );
852 }
853 }
854
855 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
867 #[allow(deprecated)]
868 #[doc(alias = "gtk_tree_view_column_pack_start")]
869 pub fn pack_start(&self, cell: &impl IsA<CellRenderer>, expand: bool) {
870 unsafe {
871 ffi::gtk_tree_view_column_pack_start(
872 self.to_glib_none().0,
873 cell.as_ref().to_glib_none().0,
874 expand.into_glib(),
875 );
876 }
877 }
878
879 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
886 #[allow(deprecated)]
887 #[doc(alias = "gtk_tree_view_column_queue_resize")]
888 pub fn queue_resize(&self) {
889 unsafe {
890 ffi::gtk_tree_view_column_queue_resize(self.to_glib_none().0);
891 }
892 }
893
894 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
904 #[allow(deprecated)]
905 #[doc(alias = "gtk_tree_view_column_set_alignment")]
906 #[doc(alias = "alignment")]
907 pub fn set_alignment(&self, xalign: f32) {
908 unsafe {
909 ffi::gtk_tree_view_column_set_alignment(self.to_glib_none().0, xalign);
910 }
911 }
912
913 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
931 #[allow(deprecated)]
932 #[doc(alias = "gtk_tree_view_column_set_cell_data_func")]
933 pub fn set_cell_data_func<
934 P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
935 >(
936 &self,
937 cell_renderer: &impl IsA<CellRenderer>,
938 func: P,
939 ) {
940 let func_data: Box_<P> = Box_::new(func);
941 unsafe extern "C" fn func_func<
942 P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
943 >(
944 tree_column: *mut ffi::GtkTreeViewColumn,
945 cell: *mut ffi::GtkCellRenderer,
946 tree_model: *mut ffi::GtkTreeModel,
947 iter: *mut ffi::GtkTreeIter,
948 data: glib::ffi::gpointer,
949 ) {
950 let tree_column = from_glib_borrow(tree_column);
951 let cell = from_glib_borrow(cell);
952 let tree_model = from_glib_borrow(tree_model);
953 let iter = from_glib_borrow(iter);
954 let callback = &*(data as *mut P);
955 (*callback)(&tree_column, &cell, &tree_model, &iter)
956 }
957 let func = Some(func_func::<P> as _);
958 unsafe extern "C" fn destroy_func<
959 P: Fn(&TreeViewColumn, &CellRenderer, &TreeModel, &TreeIter) + 'static,
960 >(
961 data: glib::ffi::gpointer,
962 ) {
963 let _callback = Box_::from_raw(data as *mut P);
964 }
965 let destroy_call4 = Some(destroy_func::<P> as _);
966 let super_callback0: Box_<P> = func_data;
967 unsafe {
968 ffi::gtk_tree_view_column_set_cell_data_func(
969 self.to_glib_none().0,
970 cell_renderer.as_ref().to_glib_none().0,
971 func,
972 Box_::into_raw(super_callback0) as *mut _,
973 destroy_call4,
974 );
975 }
976 }
977
978 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
987 #[allow(deprecated)]
988 #[doc(alias = "gtk_tree_view_column_set_clickable")]
989 #[doc(alias = "clickable")]
990 pub fn set_clickable(&self, clickable: bool) {
991 unsafe {
992 ffi::gtk_tree_view_column_set_clickable(self.to_glib_none().0, clickable.into_glib());
993 }
994 }
995
996 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1010 #[allow(deprecated)]
1011 #[doc(alias = "gtk_tree_view_column_set_expand")]
1012 #[doc(alias = "expand")]
1013 pub fn set_expand(&self, expand: bool) {
1014 unsafe {
1015 ffi::gtk_tree_view_column_set_expand(self.to_glib_none().0, expand.into_glib());
1016 }
1017 }
1018
1019 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1037 #[allow(deprecated)]
1038 #[doc(alias = "gtk_tree_view_column_set_fixed_width")]
1039 #[doc(alias = "fixed-width")]
1040 pub fn set_fixed_width(&self, fixed_width: i32) {
1041 unsafe {
1042 ffi::gtk_tree_view_column_set_fixed_width(self.to_glib_none().0, fixed_width);
1043 }
1044 }
1045
1046 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1057 #[allow(deprecated)]
1058 #[doc(alias = "gtk_tree_view_column_set_max_width")]
1059 #[doc(alias = "max-width")]
1060 pub fn set_max_width(&self, max_width: i32) {
1061 unsafe {
1062 ffi::gtk_tree_view_column_set_max_width(self.to_glib_none().0, max_width);
1063 }
1064 }
1065
1066 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1075 #[allow(deprecated)]
1076 #[doc(alias = "gtk_tree_view_column_set_min_width")]
1077 #[doc(alias = "min-width")]
1078 pub fn set_min_width(&self, min_width: i32) {
1079 unsafe {
1080 ffi::gtk_tree_view_column_set_min_width(self.to_glib_none().0, min_width);
1081 }
1082 }
1083
1084 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1093 #[allow(deprecated)]
1094 #[doc(alias = "gtk_tree_view_column_set_reorderable")]
1095 #[doc(alias = "reorderable")]
1096 pub fn set_reorderable(&self, reorderable: bool) {
1097 unsafe {
1098 ffi::gtk_tree_view_column_set_reorderable(
1099 self.to_glib_none().0,
1100 reorderable.into_glib(),
1101 );
1102 }
1103 }
1104
1105 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1118 #[allow(deprecated)]
1119 #[doc(alias = "gtk_tree_view_column_set_resizable")]
1120 #[doc(alias = "resizable")]
1121 pub fn set_resizable(&self, resizable: bool) {
1122 unsafe {
1123 ffi::gtk_tree_view_column_set_resizable(self.to_glib_none().0, resizable.into_glib());
1124 }
1125 }
1126
1127 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1135 #[allow(deprecated)]
1136 #[doc(alias = "gtk_tree_view_column_set_sizing")]
1137 #[doc(alias = "sizing")]
1138 pub fn set_sizing(&self, type_: TreeViewColumnSizing) {
1139 unsafe {
1140 ffi::gtk_tree_view_column_set_sizing(self.to_glib_none().0, type_.into_glib());
1141 }
1142 }
1143
1144 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1153 #[allow(deprecated)]
1154 #[doc(alias = "gtk_tree_view_column_set_sort_column_id")]
1155 #[doc(alias = "sort-column-id")]
1156 pub fn set_sort_column_id(&self, sort_column_id: i32) {
1157 unsafe {
1158 ffi::gtk_tree_view_column_set_sort_column_id(self.to_glib_none().0, sort_column_id);
1159 }
1160 }
1161
1162 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1173 #[allow(deprecated)]
1174 #[doc(alias = "gtk_tree_view_column_set_sort_indicator")]
1175 #[doc(alias = "sort-indicator")]
1176 pub fn set_sort_indicator(&self, setting: bool) {
1177 unsafe {
1178 ffi::gtk_tree_view_column_set_sort_indicator(
1179 self.to_glib_none().0,
1180 setting.into_glib(),
1181 );
1182 }
1183 }
1184
1185 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1203 #[allow(deprecated)]
1204 #[doc(alias = "gtk_tree_view_column_set_sort_order")]
1205 #[doc(alias = "sort-order")]
1206 pub fn set_sort_order(&self, order: SortType) {
1207 unsafe {
1208 ffi::gtk_tree_view_column_set_sort_order(self.to_glib_none().0, order.into_glib());
1209 }
1210 }
1211
1212 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1221 #[allow(deprecated)]
1222 #[doc(alias = "gtk_tree_view_column_set_spacing")]
1223 #[doc(alias = "spacing")]
1224 pub fn set_spacing(&self, spacing: i32) {
1225 unsafe {
1226 ffi::gtk_tree_view_column_set_spacing(self.to_glib_none().0, spacing);
1227 }
1228 }
1229
1230 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1239 #[allow(deprecated)]
1240 #[doc(alias = "gtk_tree_view_column_set_title")]
1241 #[doc(alias = "title")]
1242 pub fn set_title(&self, title: &str) {
1243 unsafe {
1244 ffi::gtk_tree_view_column_set_title(self.to_glib_none().0, title.to_glib_none().0);
1245 }
1246 }
1247
1248 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1256 #[allow(deprecated)]
1257 #[doc(alias = "gtk_tree_view_column_set_visible")]
1258 #[doc(alias = "visible")]
1259 pub fn set_visible(&self, visible: bool) {
1260 unsafe {
1261 ffi::gtk_tree_view_column_set_visible(self.to_glib_none().0, visible.into_glib());
1262 }
1263 }
1264
1265 #[cfg_attr(feature = "v4_10", deprecated = "Since 4.10")]
1274 #[allow(deprecated)]
1275 #[doc(alias = "gtk_tree_view_column_set_widget")]
1276 #[doc(alias = "widget")]
1277 pub fn set_widget(&self, widget: Option<&impl IsA<Widget>>) {
1278 unsafe {
1279 ffi::gtk_tree_view_column_set_widget(
1280 self.to_glib_none().0,
1281 widget.map(|p| p.as_ref()).to_glib_none().0,
1282 );
1283 }
1284 }
1285
1286 #[doc(alias = "cell-area")]
1291 pub fn cell_area(&self) -> Option<CellArea> {
1292 ObjectExt::property(self, "cell-area")
1293 }
1294
1295 #[doc(alias = "clicked")]
1297 pub fn connect_clicked<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1298 unsafe extern "C" fn clicked_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1299 this: *mut ffi::GtkTreeViewColumn,
1300 f: glib::ffi::gpointer,
1301 ) {
1302 let f: &F = &*(f as *const F);
1303 f(&from_glib_borrow(this))
1304 }
1305 unsafe {
1306 let f: Box_<F> = Box_::new(f);
1307 connect_raw(
1308 self.as_ptr() as *mut _,
1309 b"clicked\0".as_ptr() as *const _,
1310 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1311 clicked_trampoline::<F> as *const (),
1312 )),
1313 Box_::into_raw(f),
1314 )
1315 }
1316 }
1317
1318 #[doc(alias = "alignment")]
1319 pub fn connect_alignment_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1320 unsafe extern "C" fn notify_alignment_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1321 this: *mut ffi::GtkTreeViewColumn,
1322 _param_spec: glib::ffi::gpointer,
1323 f: glib::ffi::gpointer,
1324 ) {
1325 let f: &F = &*(f as *const F);
1326 f(&from_glib_borrow(this))
1327 }
1328 unsafe {
1329 let f: Box_<F> = Box_::new(f);
1330 connect_raw(
1331 self.as_ptr() as *mut _,
1332 b"notify::alignment\0".as_ptr() as *const _,
1333 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1334 notify_alignment_trampoline::<F> as *const (),
1335 )),
1336 Box_::into_raw(f),
1337 )
1338 }
1339 }
1340
1341 #[doc(alias = "clickable")]
1342 pub fn connect_clickable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1343 unsafe extern "C" fn notify_clickable_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1344 this: *mut ffi::GtkTreeViewColumn,
1345 _param_spec: glib::ffi::gpointer,
1346 f: glib::ffi::gpointer,
1347 ) {
1348 let f: &F = &*(f as *const F);
1349 f(&from_glib_borrow(this))
1350 }
1351 unsafe {
1352 let f: Box_<F> = Box_::new(f);
1353 connect_raw(
1354 self.as_ptr() as *mut _,
1355 b"notify::clickable\0".as_ptr() as *const _,
1356 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1357 notify_clickable_trampoline::<F> as *const (),
1358 )),
1359 Box_::into_raw(f),
1360 )
1361 }
1362 }
1363
1364 #[doc(alias = "expand")]
1365 pub fn connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1366 unsafe extern "C" fn notify_expand_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1367 this: *mut ffi::GtkTreeViewColumn,
1368 _param_spec: glib::ffi::gpointer,
1369 f: glib::ffi::gpointer,
1370 ) {
1371 let f: &F = &*(f as *const F);
1372 f(&from_glib_borrow(this))
1373 }
1374 unsafe {
1375 let f: Box_<F> = Box_::new(f);
1376 connect_raw(
1377 self.as_ptr() as *mut _,
1378 b"notify::expand\0".as_ptr() as *const _,
1379 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1380 notify_expand_trampoline::<F> as *const (),
1381 )),
1382 Box_::into_raw(f),
1383 )
1384 }
1385 }
1386
1387 #[doc(alias = "fixed-width")]
1388 pub fn connect_fixed_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1389 unsafe extern "C" fn notify_fixed_width_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1390 this: *mut ffi::GtkTreeViewColumn,
1391 _param_spec: glib::ffi::gpointer,
1392 f: glib::ffi::gpointer,
1393 ) {
1394 let f: &F = &*(f as *const F);
1395 f(&from_glib_borrow(this))
1396 }
1397 unsafe {
1398 let f: Box_<F> = Box_::new(f);
1399 connect_raw(
1400 self.as_ptr() as *mut _,
1401 b"notify::fixed-width\0".as_ptr() as *const _,
1402 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1403 notify_fixed_width_trampoline::<F> as *const (),
1404 )),
1405 Box_::into_raw(f),
1406 )
1407 }
1408 }
1409
1410 #[doc(alias = "max-width")]
1411 pub fn connect_max_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1412 unsafe extern "C" fn notify_max_width_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1413 this: *mut ffi::GtkTreeViewColumn,
1414 _param_spec: glib::ffi::gpointer,
1415 f: glib::ffi::gpointer,
1416 ) {
1417 let f: &F = &*(f as *const F);
1418 f(&from_glib_borrow(this))
1419 }
1420 unsafe {
1421 let f: Box_<F> = Box_::new(f);
1422 connect_raw(
1423 self.as_ptr() as *mut _,
1424 b"notify::max-width\0".as_ptr() as *const _,
1425 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1426 notify_max_width_trampoline::<F> as *const (),
1427 )),
1428 Box_::into_raw(f),
1429 )
1430 }
1431 }
1432
1433 #[doc(alias = "min-width")]
1434 pub fn connect_min_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1435 unsafe extern "C" fn notify_min_width_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1436 this: *mut ffi::GtkTreeViewColumn,
1437 _param_spec: glib::ffi::gpointer,
1438 f: glib::ffi::gpointer,
1439 ) {
1440 let f: &F = &*(f as *const F);
1441 f(&from_glib_borrow(this))
1442 }
1443 unsafe {
1444 let f: Box_<F> = Box_::new(f);
1445 connect_raw(
1446 self.as_ptr() as *mut _,
1447 b"notify::min-width\0".as_ptr() as *const _,
1448 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1449 notify_min_width_trampoline::<F> as *const (),
1450 )),
1451 Box_::into_raw(f),
1452 )
1453 }
1454 }
1455
1456 #[doc(alias = "reorderable")]
1457 pub fn connect_reorderable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1458 unsafe extern "C" fn notify_reorderable_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1459 this: *mut ffi::GtkTreeViewColumn,
1460 _param_spec: glib::ffi::gpointer,
1461 f: glib::ffi::gpointer,
1462 ) {
1463 let f: &F = &*(f as *const F);
1464 f(&from_glib_borrow(this))
1465 }
1466 unsafe {
1467 let f: Box_<F> = Box_::new(f);
1468 connect_raw(
1469 self.as_ptr() as *mut _,
1470 b"notify::reorderable\0".as_ptr() as *const _,
1471 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1472 notify_reorderable_trampoline::<F> as *const (),
1473 )),
1474 Box_::into_raw(f),
1475 )
1476 }
1477 }
1478
1479 #[doc(alias = "resizable")]
1480 pub fn connect_resizable_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1481 unsafe extern "C" fn notify_resizable_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1482 this: *mut ffi::GtkTreeViewColumn,
1483 _param_spec: glib::ffi::gpointer,
1484 f: glib::ffi::gpointer,
1485 ) {
1486 let f: &F = &*(f as *const F);
1487 f(&from_glib_borrow(this))
1488 }
1489 unsafe {
1490 let f: Box_<F> = Box_::new(f);
1491 connect_raw(
1492 self.as_ptr() as *mut _,
1493 b"notify::resizable\0".as_ptr() as *const _,
1494 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1495 notify_resizable_trampoline::<F> as *const (),
1496 )),
1497 Box_::into_raw(f),
1498 )
1499 }
1500 }
1501
1502 #[doc(alias = "sizing")]
1503 pub fn connect_sizing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1504 unsafe extern "C" fn notify_sizing_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1505 this: *mut ffi::GtkTreeViewColumn,
1506 _param_spec: glib::ffi::gpointer,
1507 f: glib::ffi::gpointer,
1508 ) {
1509 let f: &F = &*(f as *const F);
1510 f(&from_glib_borrow(this))
1511 }
1512 unsafe {
1513 let f: Box_<F> = Box_::new(f);
1514 connect_raw(
1515 self.as_ptr() as *mut _,
1516 b"notify::sizing\0".as_ptr() as *const _,
1517 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1518 notify_sizing_trampoline::<F> as *const (),
1519 )),
1520 Box_::into_raw(f),
1521 )
1522 }
1523 }
1524
1525 #[doc(alias = "sort-column-id")]
1526 pub fn connect_sort_column_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1527 unsafe extern "C" fn notify_sort_column_id_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1528 this: *mut ffi::GtkTreeViewColumn,
1529 _param_spec: glib::ffi::gpointer,
1530 f: glib::ffi::gpointer,
1531 ) {
1532 let f: &F = &*(f as *const F);
1533 f(&from_glib_borrow(this))
1534 }
1535 unsafe {
1536 let f: Box_<F> = Box_::new(f);
1537 connect_raw(
1538 self.as_ptr() as *mut _,
1539 b"notify::sort-column-id\0".as_ptr() as *const _,
1540 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1541 notify_sort_column_id_trampoline::<F> as *const (),
1542 )),
1543 Box_::into_raw(f),
1544 )
1545 }
1546 }
1547
1548 #[doc(alias = "sort-indicator")]
1549 pub fn connect_sort_indicator_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1550 unsafe extern "C" fn notify_sort_indicator_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1551 this: *mut ffi::GtkTreeViewColumn,
1552 _param_spec: glib::ffi::gpointer,
1553 f: glib::ffi::gpointer,
1554 ) {
1555 let f: &F = &*(f as *const F);
1556 f(&from_glib_borrow(this))
1557 }
1558 unsafe {
1559 let f: Box_<F> = Box_::new(f);
1560 connect_raw(
1561 self.as_ptr() as *mut _,
1562 b"notify::sort-indicator\0".as_ptr() as *const _,
1563 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1564 notify_sort_indicator_trampoline::<F> as *const (),
1565 )),
1566 Box_::into_raw(f),
1567 )
1568 }
1569 }
1570
1571 #[doc(alias = "sort-order")]
1572 pub fn connect_sort_order_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1573 unsafe extern "C" fn notify_sort_order_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1574 this: *mut ffi::GtkTreeViewColumn,
1575 _param_spec: glib::ffi::gpointer,
1576 f: glib::ffi::gpointer,
1577 ) {
1578 let f: &F = &*(f as *const F);
1579 f(&from_glib_borrow(this))
1580 }
1581 unsafe {
1582 let f: Box_<F> = Box_::new(f);
1583 connect_raw(
1584 self.as_ptr() as *mut _,
1585 b"notify::sort-order\0".as_ptr() as *const _,
1586 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1587 notify_sort_order_trampoline::<F> as *const (),
1588 )),
1589 Box_::into_raw(f),
1590 )
1591 }
1592 }
1593
1594 #[doc(alias = "spacing")]
1595 pub fn connect_spacing_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1596 unsafe extern "C" fn notify_spacing_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1597 this: *mut ffi::GtkTreeViewColumn,
1598 _param_spec: glib::ffi::gpointer,
1599 f: glib::ffi::gpointer,
1600 ) {
1601 let f: &F = &*(f as *const F);
1602 f(&from_glib_borrow(this))
1603 }
1604 unsafe {
1605 let f: Box_<F> = Box_::new(f);
1606 connect_raw(
1607 self.as_ptr() as *mut _,
1608 b"notify::spacing\0".as_ptr() as *const _,
1609 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1610 notify_spacing_trampoline::<F> as *const (),
1611 )),
1612 Box_::into_raw(f),
1613 )
1614 }
1615 }
1616
1617 #[doc(alias = "title")]
1618 pub fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1619 unsafe extern "C" fn notify_title_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1620 this: *mut ffi::GtkTreeViewColumn,
1621 _param_spec: glib::ffi::gpointer,
1622 f: glib::ffi::gpointer,
1623 ) {
1624 let f: &F = &*(f as *const F);
1625 f(&from_glib_borrow(this))
1626 }
1627 unsafe {
1628 let f: Box_<F> = Box_::new(f);
1629 connect_raw(
1630 self.as_ptr() as *mut _,
1631 b"notify::title\0".as_ptr() as *const _,
1632 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1633 notify_title_trampoline::<F> as *const (),
1634 )),
1635 Box_::into_raw(f),
1636 )
1637 }
1638 }
1639
1640 #[doc(alias = "visible")]
1641 pub fn connect_visible_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1642 unsafe extern "C" fn notify_visible_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1643 this: *mut ffi::GtkTreeViewColumn,
1644 _param_spec: glib::ffi::gpointer,
1645 f: glib::ffi::gpointer,
1646 ) {
1647 let f: &F = &*(f as *const F);
1648 f(&from_glib_borrow(this))
1649 }
1650 unsafe {
1651 let f: Box_<F> = Box_::new(f);
1652 connect_raw(
1653 self.as_ptr() as *mut _,
1654 b"notify::visible\0".as_ptr() as *const _,
1655 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1656 notify_visible_trampoline::<F> as *const (),
1657 )),
1658 Box_::into_raw(f),
1659 )
1660 }
1661 }
1662
1663 #[doc(alias = "widget")]
1664 pub fn connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1665 unsafe extern "C" fn notify_widget_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1666 this: *mut ffi::GtkTreeViewColumn,
1667 _param_spec: glib::ffi::gpointer,
1668 f: glib::ffi::gpointer,
1669 ) {
1670 let f: &F = &*(f as *const F);
1671 f(&from_glib_borrow(this))
1672 }
1673 unsafe {
1674 let f: Box_<F> = Box_::new(f);
1675 connect_raw(
1676 self.as_ptr() as *mut _,
1677 b"notify::widget\0".as_ptr() as *const _,
1678 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1679 notify_widget_trampoline::<F> as *const (),
1680 )),
1681 Box_::into_raw(f),
1682 )
1683 }
1684 }
1685
1686 #[doc(alias = "width")]
1687 pub fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1688 unsafe extern "C" fn notify_width_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1689 this: *mut ffi::GtkTreeViewColumn,
1690 _param_spec: glib::ffi::gpointer,
1691 f: glib::ffi::gpointer,
1692 ) {
1693 let f: &F = &*(f as *const F);
1694 f(&from_glib_borrow(this))
1695 }
1696 unsafe {
1697 let f: Box_<F> = Box_::new(f);
1698 connect_raw(
1699 self.as_ptr() as *mut _,
1700 b"notify::width\0".as_ptr() as *const _,
1701 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1702 notify_width_trampoline::<F> as *const (),
1703 )),
1704 Box_::into_raw(f),
1705 )
1706 }
1707 }
1708
1709 #[doc(alias = "x-offset")]
1710 pub fn connect_x_offset_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
1711 unsafe extern "C" fn notify_x_offset_trampoline<F: Fn(&TreeViewColumn) + 'static>(
1712 this: *mut ffi::GtkTreeViewColumn,
1713 _param_spec: glib::ffi::gpointer,
1714 f: glib::ffi::gpointer,
1715 ) {
1716 let f: &F = &*(f as *const F);
1717 f(&from_glib_borrow(this))
1718 }
1719 unsafe {
1720 let f: Box_<F> = Box_::new(f);
1721 connect_raw(
1722 self.as_ptr() as *mut _,
1723 b"notify::x-offset\0".as_ptr() as *const _,
1724 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
1725 notify_x_offset_trampoline::<F> as *const (),
1726 )),
1727 Box_::into_raw(f),
1728 )
1729 }
1730 }
1731}
1732
1733impl Default for TreeViewColumn {
1734 fn default() -> Self {
1735 Self::new()
1736 }
1737}
1738
1739#[must_use = "The builder must be built to be used"]
1744pub struct TreeViewColumnBuilder {
1745 builder: glib::object::ObjectBuilder<'static, TreeViewColumn>,
1746}
1747
1748impl TreeViewColumnBuilder {
1749 fn new() -> Self {
1750 Self {
1751 builder: glib::object::Object::builder(),
1752 }
1753 }
1754
1755 pub fn alignment(self, alignment: f32) -> Self {
1756 Self {
1757 builder: self.builder.property("alignment", alignment),
1758 }
1759 }
1760
1761 pub fn cell_area(self, cell_area: &impl IsA<CellArea>) -> Self {
1766 Self {
1767 builder: self
1768 .builder
1769 .property("cell-area", cell_area.clone().upcast()),
1770 }
1771 }
1772
1773 pub fn clickable(self, clickable: bool) -> Self {
1774 Self {
1775 builder: self.builder.property("clickable", clickable),
1776 }
1777 }
1778
1779 pub fn expand(self, expand: bool) -> Self {
1780 Self {
1781 builder: self.builder.property("expand", expand),
1782 }
1783 }
1784
1785 pub fn fixed_width(self, fixed_width: i32) -> Self {
1786 Self {
1787 builder: self.builder.property("fixed-width", fixed_width),
1788 }
1789 }
1790
1791 pub fn max_width(self, max_width: i32) -> Self {
1792 Self {
1793 builder: self.builder.property("max-width", max_width),
1794 }
1795 }
1796
1797 pub fn min_width(self, min_width: i32) -> Self {
1798 Self {
1799 builder: self.builder.property("min-width", min_width),
1800 }
1801 }
1802
1803 pub fn reorderable(self, reorderable: bool) -> Self {
1804 Self {
1805 builder: self.builder.property("reorderable", reorderable),
1806 }
1807 }
1808
1809 pub fn resizable(self, resizable: bool) -> Self {
1810 Self {
1811 builder: self.builder.property("resizable", resizable),
1812 }
1813 }
1814
1815 pub fn sizing(self, sizing: TreeViewColumnSizing) -> Self {
1816 Self {
1817 builder: self.builder.property("sizing", sizing),
1818 }
1819 }
1820
1821 pub fn sort_column_id(self, sort_column_id: i32) -> Self {
1824 Self {
1825 builder: self.builder.property("sort-column-id", sort_column_id),
1826 }
1827 }
1828
1829 pub fn sort_indicator(self, sort_indicator: bool) -> Self {
1830 Self {
1831 builder: self.builder.property("sort-indicator", sort_indicator),
1832 }
1833 }
1834
1835 pub fn sort_order(self, sort_order: SortType) -> Self {
1836 Self {
1837 builder: self.builder.property("sort-order", sort_order),
1838 }
1839 }
1840
1841 pub fn spacing(self, spacing: i32) -> Self {
1842 Self {
1843 builder: self.builder.property("spacing", spacing),
1844 }
1845 }
1846
1847 pub fn title(self, title: impl Into<glib::GString>) -> Self {
1848 Self {
1849 builder: self.builder.property("title", title.into()),
1850 }
1851 }
1852
1853 pub fn visible(self, visible: bool) -> Self {
1854 Self {
1855 builder: self.builder.property("visible", visible),
1856 }
1857 }
1858
1859 pub fn widget(self, widget: &impl IsA<Widget>) -> Self {
1860 Self {
1861 builder: self.builder.property("widget", widget.clone().upcast()),
1862 }
1863 }
1864
1865 #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
1868 pub fn build(self) -> TreeViewColumn {
1869 assert_initialized_main_thread!();
1870 self.builder.build()
1871 }
1872}