1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gtkmm/treeview.h>
7 #include <gtkmm/private/treeview_p.h>
8 
9 #include <gtk/gtk.h>
10 
11 /* Copyright 2002 The gtkmm Development Team
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26  */
27 
28 #include <glibmm/vectorutils.h>
29 
30 #include <gtkmm/treeviewcolumn.h>
31 #include <gtkmm/treeview_private.h>
32 #include <gtkmm/treemodel.h>
33 #include <gtkmm/treemodelfilter.h>
34 #include <gtkmm/treemodelsort.h>
35 #include <gtkmm/entry.h>
36 #include <gtk/gtk.h>
37 
38 namespace
39 {
40 
41 //This target name is used in the GTK+ implementation:
42 static const char treeview_target_row[]   = "GTK_TREE_MODEL_ROW";
43 
44 } // anonymous namespace
45 
46 
SignalProxy_Mapping_gtk_callback(GtkTreeView * tree_view,GtkTreePath * path,void * data)47 static void SignalProxy_Mapping_gtk_callback(GtkTreeView* tree_view, GtkTreePath* path, void* data)
48 {
49   auto the_slot = static_cast<Gtk::TreeView::SlotMapping*>(data);
50 
51   try
52   {
53     (*the_slot)(Glib::wrap(tree_view), Gtk::TreePath(path, true));
54   }
55   catch(...)
56   {
57     Glib::exception_handlers_invoke();
58   }
59 }
60 
SignalProxy_SearchEqual_gtk_callback(GtkTreeModel * model,int column,const char * key,GtkTreeIter * iter,void * data)61 static gboolean SignalProxy_SearchEqual_gtk_callback(GtkTreeModel* model, int column, const char* key,
62                                                GtkTreeIter* iter, void* data)
63 {
64   auto the_slot = static_cast<Gtk::TreeView::SlotSearchEqual*>(data);
65 
66   try
67   {
68     return (*the_slot)(Glib::wrap(model, true), column, key, Gtk::TreeIter(model, iter));
69   }
70   catch(...)
71   {
72     Glib::exception_handlers_invoke();
73   }
74 
75   return 0; // arbitrary value
76 }
77 
SignalProxy_SearchEqual_gtk_callback_destroy(void * data)78 static void SignalProxy_SearchEqual_gtk_callback_destroy(void* data)
79 {
80   delete static_cast<Gtk::TreeView::SlotSearchEqual*>(data);
81 }
82 
SignalProxy_ColumnDrop_gtk_callback(GtkTreeView * tree_view,GtkTreeViewColumn * column,GtkTreeViewColumn * prev_column,GtkTreeViewColumn * next_column,void * data)83 static gboolean SignalProxy_ColumnDrop_gtk_callback(GtkTreeView* tree_view, GtkTreeViewColumn* column,
84                                               GtkTreeViewColumn* prev_column,
85                                               GtkTreeViewColumn* next_column, void* data)
86 {
87   auto the_slot = static_cast<Gtk::TreeView::SlotColumnDrop*>(data);
88 
89   try
90   {
91     return (*the_slot)(Glib::wrap(tree_view), Glib::wrap(column),
92                          Glib::wrap(prev_column), Glib::wrap(next_column));
93   }
94   catch(...)
95   {
96     Glib::exception_handlers_invoke();
97   }
98 
99   return 0; // arbitrary value
100 }
101 
SignalProxy_ColumnDrop_gtk_callback_destroy(void * data)102 static void SignalProxy_ColumnDrop_gtk_callback_destroy(void* data)
103 {
104   delete static_cast<Gtk::TreeView::SlotColumnDrop*>(data);
105 }
106 
107 
SignalProxy_SearchPosition_gtk_callback(GtkTreeView *,GtkWidget * search_dialog,gpointer user_data)108 static void SignalProxy_SearchPosition_gtk_callback(GtkTreeView* /* tree_view */, GtkWidget* search_dialog, gpointer user_data)
109 {
110   auto the_slot = static_cast<Gtk::TreeView::SlotSearchPosition*>(user_data);
111 
112   try
113   {
114     (*the_slot)(Glib::wrap(search_dialog));
115   }
116   catch(...)
117   {
118     Glib::exception_handlers_invoke();
119   }
120 }
121 
SignalProxy_SearchPosition_gtk_callback_destroy(void * data)122 static void SignalProxy_SearchPosition_gtk_callback_destroy(void* data)
123 {
124   delete static_cast<Gtk::TreeView::SlotSearchPosition*>(data);
125 }
126 
127 namespace Gtk
128 {
129 
insert_column_with_data_func(int position,const Glib::ustring & title,CellRenderer & cell,const SlotTreeCellData & slot)130 int TreeView::insert_column_with_data_func(int position, const Glib::ustring& title, CellRenderer& cell, const SlotTreeCellData& slot)
131 {
132   //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
133   //It will be deleted when TreeView_Private::SignalProxy_CellData_gtk_callback_destroy() is called.
134   auto slot_copy = new SlotTreeCellData(slot);
135 
136   return gtk_tree_view_insert_column_with_data_func(
137       gobj(), position, title.c_str(), cell.gobj(),
138       &TreeView_Private::SignalProxy_CellData_gtk_callback, slot_copy,
139       &TreeView_Private::SignalProxy_CellData_gtk_callback_destroy);
140 }
141 
set_cursor(const TreeModel::Path & path)142 void TreeView::set_cursor(const TreeModel::Path& path)
143 {
144   gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, false);
145 }
146 
get_cursor(TreeModel::Path & path,TreeViewColumn * & focus_column)147 void TreeView::get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column)
148 {
149   GtkTreePath* pTreePath = nullptr;
150   GtkTreeViewColumn* pTreeViewColumn = nullptr;
151   gtk_tree_view_get_cursor(gobj(), &pTreePath, &pTreeViewColumn);
152 
153   path = TreeModel::Path(pTreePath, false); /* Use the existing underlying GtkTreePath instance without copying and freeing, because gtk_tree_view_get_cursor() gives us ownernship. */
154   focus_column = Glib::wrap(pTreeViewColumn);
155 }
156 
157 
enable_model_drag_source(const std::vector<TargetEntry> & targets,Gdk::ModifierType start_button_mask,Gdk::DragAction actions)158 void TreeView::enable_model_drag_source(const std::vector<TargetEntry>& targets,
159                               Gdk::ModifierType start_button_mask,
160                               Gdk::DragAction actions)
161 {
162   gtk_tree_view_enable_model_drag_source(
163       gobj(), (GdkModifierType) start_button_mask,
164       Glib::ArrayHandler<TargetEntry, TargetEntryTraits>::vector_to_array(targets).data(),
165       targets.size(), (GdkDragAction) actions);
166 }
167 
enable_model_drag_source(Gdk::ModifierType start_button_mask,Gdk::DragAction actions)168 void TreeView::enable_model_drag_source(Gdk::ModifierType start_button_mask, Gdk::DragAction actions)
169 {
170   std::vector<TargetEntry> targets (1, TargetEntry (treeview_target_row));
171 
172   enable_model_drag_source(targets, start_button_mask, actions);
173 }
174 
enable_model_drag_dest(const std::vector<TargetEntry> & targets,Gdk::DragAction actions)175 void TreeView::enable_model_drag_dest(const std::vector<TargetEntry>& targets, Gdk::DragAction actions)
176 {
177   gtk_tree_view_enable_model_drag_dest(
178       gobj(), Glib::ArrayHandler<TargetEntry, TargetEntryTraits>::vector_to_array(targets).data(),
179       targets.size(), (GdkDragAction) actions);
180 }
181 
enable_model_drag_dest(Gdk::DragAction actions)182 void TreeView::enable_model_drag_dest(Gdk::DragAction actions)
183 {
184   std::vector<TargetEntry> targets (1, TargetEntry (treeview_target_row));
185 
186   enable_model_drag_dest(targets, actions);
187 }
188 
get_path_at_pos(int x,int y,TreeModel::Path & path,TreeViewColumn * & column,int & cell_x,int & cell_y) const189 bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, int& cell_y) const
190 {
191   GtkTreePath* pTreePath = nullptr;
192   GtkTreeViewColumn* pTreeViewColumn = nullptr;
193   const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath, &pTreeViewColumn, &cell_x, &cell_y);
194 
195   path = TreeModel::Path(pTreePath, false /* don't take a copy, because the gtk_tree_view_get_path_at_pos() docs say that we must free the path */ );
196   column = Glib::wrap(pTreeViewColumn);
197   return result;
198 }
199 
get_path_at_pos(int x,int y,TreeModel::Path & path) const200 bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path) const
201 {
202   GtkTreePath* pTreePath = nullptr;
203   const bool result = gtk_tree_view_get_path_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &pTreePath, nullptr, nullptr, nullptr);
204 
205   path = TreeModel::Path(pTreePath, false /* don't take a copy, because the gtk_tree_view_get_path_at_pos() docs say that we must free the path */ );
206   return result;
207 }
208 
insert_column(const Glib::ustring & title,CellRenderer & cell,int position)209 int TreeView::insert_column(const Glib::ustring& title, CellRenderer& cell, int position)
210 {
211   return gtk_tree_view_insert_column_with_attributes(
212       gobj(), position, const_cast<char*>(title.c_str()), cell.gobj(), nullptr);
213 }
214 
append_column(const Glib::ustring & title,CellRenderer & cell)215 int TreeView::append_column(const Glib::ustring& title, CellRenderer& cell)
216 {
217   return insert_column(title, cell, -1 /* at the end */);
218 }
219 
get_drag_dest_row(TreeModel::Path & path,TreeViewDropPosition & pos) const220 void TreeView::get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const
221 {
222   GtkTreePath* pTreePath = nullptr;
223   gtk_tree_view_get_drag_dest_row(const_cast<GtkTreeView*>(gobj()), &pTreePath, (GtkTreeViewDropPosition*) &pos);
224   path = TreeModel::Path(pTreePath, true); //true = take_copy.
225 }
226 
get_dest_row_at_pos(int drag_x,int drag_y,TreeModel::Path & path,TreeViewDropPosition & pos) const227 bool TreeView::get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) const
228 {
229   GtkTreePath* pTreePath = nullptr;
230   const bool bResult = gtk_tree_view_get_dest_row_at_pos(
231       const_cast<GtkTreeView*>(gobj()), drag_x, drag_y, &pTreePath, (GtkTreeViewDropPosition*) &pos);
232 
233   path = TreeModel::Path(pTreePath, true); //true = take_copy.
234   return bResult;
235 }
236 
map_expanded_rows(const SlotMapping & slot)237 void TreeView::map_expanded_rows(const SlotMapping& slot)
238 {
239   gtk_tree_view_map_expanded_rows(gobj(), &SignalProxy_Mapping_gtk_callback, const_cast<SlotMapping*>(&slot));
240 }
241 
set_search_equal_func(const SlotSearchEqual & slot)242 void TreeView::set_search_equal_func(const SlotSearchEqual& slot)
243 {
244   //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
245   //It will be deleted when SignalProxy_SearchEqual_gtk_callback_destroy() is called.
246   auto slot_copy = new SlotSearchEqual(slot);
247 
248   gtk_tree_view_set_search_equal_func(gobj(),
249       &SignalProxy_SearchEqual_gtk_callback, slot_copy,
250       &SignalProxy_SearchEqual_gtk_callback_destroy);
251 }
252 
set_column_drag_function(const SlotColumnDrop & slot)253 void TreeView::set_column_drag_function(const SlotColumnDrop& slot)
254 {
255   //Create a copt of the slot. A pointer to this will be passed through the callback's data parameter.
256   //It will be deleted when SignalProxy_ColumnDrop_gtk_callback_destroy() is called.
257   auto slot_copy = new SlotColumnDrop(slot);
258 
259   gtk_tree_view_set_column_drag_function(gobj(),
260       &SignalProxy_ColumnDrop_gtk_callback, slot_copy,
261       &SignalProxy_ColumnDrop_gtk_callback_destroy);
262 
263 }
264 
unset_column_drag_function()265 void TreeView::unset_column_drag_function()
266 {
267   gtk_tree_view_set_column_drag_function(gobj(),
268       nullptr, nullptr, nullptr); /* See GTK+ docs about the nullptrs. */
269 }
270 
scroll_to_cell(const TreeModel::Path & path,TreeViewColumn & column,float row_align,float col_align)271 void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column, float row_align, float col_align)
272 {
273   gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), column.gobj(), TRUE, row_align, col_align);
274 }
275 
scroll_to_cell(const TreeModel::Path & path,TreeViewColumn & column)276 void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column)
277 {
278   gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), column.gobj(), FALSE, 0.0, 0.0);
279 }
280 
scroll_to_row(const TreeModel::Path & path,float row_align)281 void TreeView::scroll_to_row(const TreeModel::Path& path, float row_align)
282 {
283   gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, TRUE, row_align, 0.0);
284 }
285 
scroll_to_row(const TreeModel::Path & path)286 void TreeView::scroll_to_row(const TreeModel::Path& path)
287 {
288   gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), nullptr, FALSE, 0.0, 0.0);
289 }
290 
scroll_to_column(TreeViewColumn & column,float col_align)291 void TreeView::scroll_to_column(TreeViewColumn& column, float col_align)
292 {
293   gtk_tree_view_scroll_to_cell(gobj(), nullptr, column.gobj(), TRUE, 0.0, col_align);
294 }
295 
scroll_to_column(TreeViewColumn & column)296 void TreeView::scroll_to_column(TreeViewColumn& column)
297 {
298   gtk_tree_view_scroll_to_cell(gobj(), nullptr, column.gobj(), FALSE, 0.0, 0.0);
299 }
300 
remove_all_columns()301 void TreeView::remove_all_columns()
302 {
303   //This method is not in GTK+, but it seems useful.
304 
305   //Remove all View columns:
306   std::vector<Gtk::TreeView::Column*> vecViewColumns (get_columns());
307 
308   for (std::vector<Gtk::TreeView::Column*>::iterator iter (vecViewColumns.begin ()), columns_end (vecViewColumns.end ());
309     iter != columns_end;
310     ++iter)
311   {
312     Gtk::TreeView::Column* pViewColumn (*iter);
313 
314     if(pViewColumn)
315     {
316       remove_column(*pViewColumn);
317     }
318   }
319 }
320 
321 
get_column_cell_renderer(int n)322 CellRenderer* TreeView::get_column_cell_renderer(int n)
323 {
324   auto pColumn = get_column(n);
325   if(pColumn)
326     return pColumn->get_first_cell();
327   else
328     return nullptr;
329 }
330 
331 
get_column_cell_renderer(int n) const332 const CellRenderer* TreeView::get_column_cell_renderer(int n) const
333 {
334    //Do some const_cast-ing to avoid repetition of code:
335   auto pRenderer = const_cast<TreeView*>(this)->get_column_cell_renderer(n);
336   return pRenderer;
337 }
338 
reset_expander_column()339 void TreeView::reset_expander_column()
340 {
341   gtk_tree_view_set_expander_column(gobj(), nullptr /* see C docs */);
342 }
343 
_auto_store_on_cellrenderer_toggle_edited(const Glib::ustring & path_string,int model_column)344 void TreeView::_auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string,
345                                                          int model_column)
346 {
347   _auto_store_on_cellrenderer_toggle_edited_with_model(path_string, model_column, get_model());
348 }
349 
_auto_store_on_cellrenderer_toggle_edited_with_model(const Glib::ustring & path_string,int model_column,const Glib::RefPtr<Gtk::TreeModel> & model)350 void TreeView::_auto_store_on_cellrenderer_toggle_edited_with_model(const Glib::ustring& path_string,
351                                                          int model_column, const Glib::RefPtr<Gtk::TreeModel>& model)
352 {
353   Gtk::TreePath path (path_string);
354 
355   //Get the row from the path:
356   if(model)
357   {
358     auto iter = model->get_iter(path);
359     if(iter)
360     {
361       auto row = *iter;
362 
363       //Get the new value:
364       //This seems to get the old value, not the new one,
365       //so we will just NOT the model value ourselves.
366       //bool bActive = cell_renderer->get_active();
367       bool bActive = false;
368       row.get_value(model_column, bActive);
369       bActive = !bActive;
370 
371       //Store the user's new text in the model:
372       row.set_value(model_column, bActive);
373     }
374   }
375 }
376 
move_column_to_start(TreeViewColumn & column)377 void TreeView::move_column_to_start(TreeViewColumn& column)
378 {
379   gtk_tree_view_move_column_after(gobj(), (column).gobj(), nullptr /* See C docs */);
380 }
381 
set_row_separator_func(const SlotRowSeparator & slot)382 void TreeView::set_row_separator_func(const SlotRowSeparator& slot)
383 {
384   //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
385   //It will be deleted when SignalProxy_RowSeparator_gtk_callback_destroy() is called.
386   auto slot_copy = new SlotRowSeparator(slot);
387 
388   gtk_tree_view_set_row_separator_func(gobj(),
389       &TreeView_Private::SignalProxy_RowSeparator_gtk_callback, slot_copy,
390       &TreeView_Private::SignalProxy_RowSeparator_gtk_callback_destroy);
391 }
392 
set_search_position_func(const SlotSearchPosition & slot)393 void TreeView::set_search_position_func(const SlotSearchPosition& slot)
394 {
395   //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
396   //It will be deleted when SignalProxy_SearchPosition_gtk_callback_destroy() is called.
397   auto slot_copy = new SlotSearchPosition(slot);
398 
399   gtk_tree_view_set_search_position_func(gobj(),
400       &SignalProxy_SearchPosition_gtk_callback, slot_copy,
401       &SignalProxy_SearchPosition_gtk_callback_destroy);
402 }
403 
get_visible_range(TreeModel::Path & start_path,TreeModel::Path & end_path) const404 bool TreeView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const
405 {
406   GtkTreePath* pTreePathStart = nullptr;
407   GtkTreePath* pTreePathEnd = nullptr;
408   bool result = gtk_tree_view_get_visible_range(const_cast<GtkTreeView*>(gobj()), &pTreePathStart, &pTreePathEnd);
409 
410   start_path = TreeModel::Path(pTreePathStart, false /* don't take a copy, because the gtk_tree_view_get_visible_range() docs say that we must free the path */ );
411   end_path = TreeModel::Path(pTreePathEnd, false /* don't take a copy, because the gtk_tree_view_get_visible_range() docs say that we must free the path */ );
412   return result;
413 }
414 
unset_model()415 void TreeView::unset_model()
416 {
417   gtk_tree_view_set_model(gobj(), nullptr);
418 }
419 
420 bool
get_tooltip_context_path(int & x,int & y,bool keyboard_tip,TreeModel::Path & path)421 TreeView::get_tooltip_context_path(int& x, int& y,
422                                    bool keyboard_tip,
423                                    TreeModel::Path& path)
424 {
425   GtkTreePath* cpath = nullptr;
426 
427   gboolean result =
428     gtk_tree_view_get_tooltip_context(gobj(),
429                                       &x, &y,
430                                       keyboard_tip,
431                                       nullptr,
432                                       &cpath,
433                                       nullptr);
434 
435   //If result is false, cpath is not modified, it's still nullptr.
436   //wrap() can handle that situation.
437   path = Glib::wrap(cpath, false /* take_copy=false */);
438 
439   return result;
440 }
441 
442 bool
get_tooltip_context_iter(int & x,int & y,bool keyboard_tip,Gtk::TreeModel::iterator & iter)443 TreeView::get_tooltip_context_iter(int& x, int& y,
444                                    bool keyboard_tip,
445                                    Gtk::TreeModel::iterator& iter)
446 {
447   GtkTreeIter src_iter;
448 
449   gboolean result =
450     gtk_tree_view_get_tooltip_context(gobj(),
451                                       &x, &y,
452                                       keyboard_tip,
453                                       nullptr,
454                                       nullptr,
455                                       &src_iter);
456 
457   iter = TreeIter(gtk_tree_view_get_model(this->gobj()), &src_iter);
458 
459   return result;
460 }
461 
is_blank_at_pos(int x,int y,TreePath & path,TreeViewColumn * & column,int & cell_x,int & cell_y) const462 bool TreeView::is_blank_at_pos(int x, int y, TreePath& path, TreeViewColumn*& column, int& cell_x, int& cell_y) const
463 {
464   GtkTreePath* cpath = nullptr;
465   GtkTreeViewColumn* pcolumn = nullptr;
466   const bool result = gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, &cpath, &pcolumn, &(cell_x), &(cell_y));
467 
468   path = TreePath(cpath, false /* take ownership instead of taking a copy */);
469   column = Glib::wrap(pcolumn);
470   return result;
471 }
472 
is_blank_at_pos(int x,int y) const473 bool TreeView::is_blank_at_pos(int x, int y) const
474 {
475   return gtk_tree_view_is_blank_at_pos(const_cast<GtkTreeView*>(gobj()), x, y, nullptr, nullptr, nullptr, nullptr);
476 }
477 
unset_drag_dest_row()478 void TreeView::unset_drag_dest_row()
479 {
480   // The C docs specify that a 0 path means unset.
481   gtk_tree_view_set_drag_dest_row(gobj(), nullptr, GTK_TREE_VIEW_DROP_BEFORE /* Arbitrary. Ignored anyway. */);
482 }
483 
unset_row_separator_func()484 void TreeView::unset_row_separator_func()
485 {
486   gtk_tree_view_set_row_separator_func(gobj(), nullptr, nullptr, nullptr);
487 }
488 
489 } // namespace Gtk
490 
491 namespace
492 {
493 
494 
TreeView_signal_row_activated_callback(GtkTreeView * self,GtkTreePath * p0,GtkTreeViewColumn * p1,void * data)495 static void TreeView_signal_row_activated_callback(GtkTreeView* self, GtkTreePath* p0,GtkTreeViewColumn* p1,void* data)
496 {
497   using namespace Gtk;
498   using SlotType = sigc::slot< void,const TreeModel::Path&,TreeViewColumn* >;
499 
500   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
501   // Do not try to call a signal on a disassociated wrapper.
502   if(obj)
503   {
504     try
505     {
506       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
507         (*static_cast<SlotType*>(slot))(Gtk::TreePath(p0, true)
508 , Glib::wrap(p1)
509 );
510     }
511     catch(...)
512     {
513        Glib::exception_handlers_invoke();
514     }
515   }
516 }
517 
518 static const Glib::SignalProxyInfo TreeView_signal_row_activated_info =
519 {
520   "row-activated",
521   (GCallback) &TreeView_signal_row_activated_callback,
522   (GCallback) &TreeView_signal_row_activated_callback
523 };
524 
525 
TreeView_signal_test_expand_row_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)526 static gboolean TreeView_signal_test_expand_row_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
527 {
528   using namespace Gtk;
529   using SlotType = sigc::slot< bool,const TreeModel::iterator&,const TreeModel::Path& >;
530 
531   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
532   // Do not try to call a signal on a disassociated wrapper.
533   if(obj)
534   {
535     try
536     {
537       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
538         return static_cast<int>((*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
539 , Gtk::TreePath(p1, true)
540 ));
541     }
542     catch(...)
543     {
544        Glib::exception_handlers_invoke();
545     }
546   }
547 
548   using RType = gboolean;
549   return RType();
550 }
551 
TreeView_signal_test_expand_row_notify_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)552 static gboolean TreeView_signal_test_expand_row_notify_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1, void* data)
553 {
554   using namespace Gtk;
555   using SlotType = sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& >;
556 
557   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
558   // Do not try to call a signal on a disassociated wrapper.
559   if(obj)
560   {
561     try
562     {
563       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
564         (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
565 , Gtk::TreePath(p1, true)
566 );
567     }
568     catch(...)
569     {
570       Glib::exception_handlers_invoke();
571     }
572   }
573 
574   using RType = gboolean;
575   return RType();
576 }
577 
578 static const Glib::SignalProxyInfo TreeView_signal_test_expand_row_info =
579 {
580   "test-expand-row",
581   (GCallback) &TreeView_signal_test_expand_row_callback,
582   (GCallback) &TreeView_signal_test_expand_row_notify_callback
583 };
584 
585 
TreeView_signal_test_collapse_row_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)586 static gboolean TreeView_signal_test_collapse_row_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
587 {
588   using namespace Gtk;
589   using SlotType = sigc::slot< bool,const TreeModel::iterator&,const TreeModel::Path& >;
590 
591   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
592   // Do not try to call a signal on a disassociated wrapper.
593   if(obj)
594   {
595     try
596     {
597       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
598         return static_cast<int>((*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
599 , Gtk::TreePath(p1, true)
600 ));
601     }
602     catch(...)
603     {
604        Glib::exception_handlers_invoke();
605     }
606   }
607 
608   using RType = gboolean;
609   return RType();
610 }
611 
TreeView_signal_test_collapse_row_notify_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)612 static gboolean TreeView_signal_test_collapse_row_notify_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1, void* data)
613 {
614   using namespace Gtk;
615   using SlotType = sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& >;
616 
617   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
618   // Do not try to call a signal on a disassociated wrapper.
619   if(obj)
620   {
621     try
622     {
623       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
624         (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
625 , Gtk::TreePath(p1, true)
626 );
627     }
628     catch(...)
629     {
630       Glib::exception_handlers_invoke();
631     }
632   }
633 
634   using RType = gboolean;
635   return RType();
636 }
637 
638 static const Glib::SignalProxyInfo TreeView_signal_test_collapse_row_info =
639 {
640   "test-collapse-row",
641   (GCallback) &TreeView_signal_test_collapse_row_callback,
642   (GCallback) &TreeView_signal_test_collapse_row_notify_callback
643 };
644 
645 
TreeView_signal_row_expanded_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)646 static void TreeView_signal_row_expanded_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
647 {
648   using namespace Gtk;
649   using SlotType = sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& >;
650 
651   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
652   // Do not try to call a signal on a disassociated wrapper.
653   if(obj)
654   {
655     try
656     {
657       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
658         (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
659 , Gtk::TreePath(p1, true)
660 );
661     }
662     catch(...)
663     {
664        Glib::exception_handlers_invoke();
665     }
666   }
667 }
668 
669 static const Glib::SignalProxyInfo TreeView_signal_row_expanded_info =
670 {
671   "row-expanded",
672   (GCallback) &TreeView_signal_row_expanded_callback,
673   (GCallback) &TreeView_signal_row_expanded_callback
674 };
675 
676 
TreeView_signal_row_collapsed_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1,void * data)677 static void TreeView_signal_row_collapsed_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
678 {
679   using namespace Gtk;
680   using SlotType = sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& >;
681 
682   auto obj = dynamic_cast<TreeView*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
683   // Do not try to call a signal on a disassociated wrapper.
684   if(obj)
685   {
686     try
687     {
688       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
689         (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
690 , Gtk::TreePath(p1, true)
691 );
692     }
693     catch(...)
694     {
695        Glib::exception_handlers_invoke();
696     }
697   }
698 }
699 
700 static const Glib::SignalProxyInfo TreeView_signal_row_collapsed_info =
701 {
702   "row-collapsed",
703   (GCallback) &TreeView_signal_row_collapsed_callback,
704   (GCallback) &TreeView_signal_row_collapsed_callback
705 };
706 
707 
708 static const Glib::SignalProxyInfo TreeView_signal_cursor_changed_info =
709 {
710   "cursor-changed",
711   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
712   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
713 };
714 
715 
716 static const Glib::SignalProxyInfo TreeView_signal_columns_changed_info =
717 {
718   "columns-changed",
719   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
720   (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
721 };
722 
723 
724 } // anonymous namespace
725 
726 // static
value_type()727 GType Glib::Value<Gtk::TreeViewDropPosition>::value_type()
728 {
729   return gtk_tree_view_drop_position_get_type();
730 }
731 
732 // static
value_type()733 GType Glib::Value<Gtk::TreeViewGridLines>::value_type()
734 {
735   return gtk_tree_view_grid_lines_get_type();
736 }
737 
738 
739 namespace Glib
740 {
741 
wrap(GtkTreeView * object,bool take_copy)742 Gtk::TreeView* wrap(GtkTreeView* object, bool take_copy)
743 {
744   return dynamic_cast<Gtk::TreeView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
745 }
746 
747 } /* namespace Glib */
748 
749 namespace Gtk
750 {
751 
752 
753 /* The *_Class implementation: */
754 
init()755 const Glib::Class& TreeView_Class::init()
756 {
757   if(!gtype_) // create the GType if necessary
758   {
759     // Glib::Class has to know the class init function to clone custom types.
760     class_init_func_ = &TreeView_Class::class_init_function;
761 
762     // This is actually just optimized away, apparently with no harm.
763     // Make sure that the parent type has been created.
764     //CppClassParent::CppObjectType::get_type();
765 
766     // Create the wrapper type, with the same class/instance size as the base type.
767     register_derived_type(gtk_tree_view_get_type());
768 
769     // Add derived versions of interfaces, if the C type implements any interfaces:
770   Scrollable::add_interface(get_type());
771 
772   }
773 
774   return *this;
775 }
776 
777 
class_init_function(void * g_class,void * class_data)778 void TreeView_Class::class_init_function(void* g_class, void* class_data)
779 {
780   const auto klass = static_cast<BaseClassType*>(g_class);
781   CppClassParent::class_init_function(klass, class_data);
782 
783 
784   klass->row_activated = &row_activated_callback;
785   klass->test_expand_row = &test_expand_row_callback;
786   klass->test_collapse_row = &test_collapse_row_callback;
787   klass->row_expanded = &row_expanded_callback;
788   klass->row_collapsed = &row_collapsed_callback;
789   klass->cursor_changed = &cursor_changed_callback;
790   klass->columns_changed = &columns_changed_callback;
791 }
792 
793 
row_activated_callback(GtkTreeView * self,GtkTreePath * p0,GtkTreeViewColumn * p1)794 void TreeView_Class::row_activated_callback(GtkTreeView* self, GtkTreePath* p0, GtkTreeViewColumn* p1)
795 {
796   const auto obj_base = static_cast<Glib::ObjectBase*>(
797       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
798 
799   // Non-gtkmmproc-generated custom classes implicitly call the default
800   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
801   // generated classes can use this optimisation, which avoids the unnecessary
802   // parameter conversions if there is no possibility of the virtual function
803   // being overridden:
804   if(obj_base && obj_base->is_derived_())
805   {
806     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
807     if(obj) // This can be NULL during destruction.
808     {
809       try // Trap C++ exceptions which would normally be lost because this is a C callback.
810       {
811         // Call the virtual member method, which derived classes might override.
812         obj->on_row_activated(Gtk::TreePath(p0, true)
813 , Glib::wrap(p1)
814 );
815         return;
816       }
817       catch(...)
818       {
819         Glib::exception_handlers_invoke();
820       }
821     }
822   }
823 
824   const auto base = static_cast<BaseClassType*>(
825         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
826     );
827 
828   // Call the original underlying C function:
829   if(base && base->row_activated)
830     (*base->row_activated)(self, p0, p1);
831 }
test_expand_row_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1)832 gboolean TreeView_Class::test_expand_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
833 {
834   const auto obj_base = static_cast<Glib::ObjectBase*>(
835       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
836 
837   // Non-gtkmmproc-generated custom classes implicitly call the default
838   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
839   // generated classes can use this optimisation, which avoids the unnecessary
840   // parameter conversions if there is no possibility of the virtual function
841   // being overridden:
842   if(obj_base && obj_base->is_derived_())
843   {
844     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
845     if(obj) // This can be NULL during destruction.
846     {
847       try // Trap C++ exceptions which would normally be lost because this is a C callback.
848       {
849         // Call the virtual member method, which derived classes might override.
850         return static_cast<int>(obj->on_test_expand_row(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
851 , Gtk::TreePath(p1, true)
852 ));
853       }
854       catch(...)
855       {
856         Glib::exception_handlers_invoke();
857       }
858     }
859   }
860 
861   const auto base = static_cast<BaseClassType*>(
862         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
863     );
864 
865   // Call the original underlying C function:
866   if(base && base->test_expand_row)
867     return (*base->test_expand_row)(self, p0, p1);
868 
869   using RType = gboolean;
870   return RType();
871 }
test_collapse_row_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1)872 gboolean TreeView_Class::test_collapse_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
873 {
874   const auto obj_base = static_cast<Glib::ObjectBase*>(
875       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
876 
877   // Non-gtkmmproc-generated custom classes implicitly call the default
878   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
879   // generated classes can use this optimisation, which avoids the unnecessary
880   // parameter conversions if there is no possibility of the virtual function
881   // being overridden:
882   if(obj_base && obj_base->is_derived_())
883   {
884     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
885     if(obj) // This can be NULL during destruction.
886     {
887       try // Trap C++ exceptions which would normally be lost because this is a C callback.
888       {
889         // Call the virtual member method, which derived classes might override.
890         return static_cast<int>(obj->on_test_collapse_row(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
891 , Gtk::TreePath(p1, true)
892 ));
893       }
894       catch(...)
895       {
896         Glib::exception_handlers_invoke();
897       }
898     }
899   }
900 
901   const auto base = static_cast<BaseClassType*>(
902         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
903     );
904 
905   // Call the original underlying C function:
906   if(base && base->test_collapse_row)
907     return (*base->test_collapse_row)(self, p0, p1);
908 
909   using RType = gboolean;
910   return RType();
911 }
row_expanded_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1)912 void TreeView_Class::row_expanded_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
913 {
914   const auto obj_base = static_cast<Glib::ObjectBase*>(
915       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
916 
917   // Non-gtkmmproc-generated custom classes implicitly call the default
918   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
919   // generated classes can use this optimisation, which avoids the unnecessary
920   // parameter conversions if there is no possibility of the virtual function
921   // being overridden:
922   if(obj_base && obj_base->is_derived_())
923   {
924     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
925     if(obj) // This can be NULL during destruction.
926     {
927       try // Trap C++ exceptions which would normally be lost because this is a C callback.
928       {
929         // Call the virtual member method, which derived classes might override.
930         obj->on_row_expanded(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
931 , Gtk::TreePath(p1, true)
932 );
933         return;
934       }
935       catch(...)
936       {
937         Glib::exception_handlers_invoke();
938       }
939     }
940   }
941 
942   const auto base = static_cast<BaseClassType*>(
943         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
944     );
945 
946   // Call the original underlying C function:
947   if(base && base->row_expanded)
948     (*base->row_expanded)(self, p0, p1);
949 }
row_collapsed_callback(GtkTreeView * self,GtkTreeIter * p0,GtkTreePath * p1)950 void TreeView_Class::row_collapsed_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
951 {
952   const auto obj_base = static_cast<Glib::ObjectBase*>(
953       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
954 
955   // Non-gtkmmproc-generated custom classes implicitly call the default
956   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
957   // generated classes can use this optimisation, which avoids the unnecessary
958   // parameter conversions if there is no possibility of the virtual function
959   // being overridden:
960   if(obj_base && obj_base->is_derived_())
961   {
962     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
963     if(obj) // This can be NULL during destruction.
964     {
965       try // Trap C++ exceptions which would normally be lost because this is a C callback.
966       {
967         // Call the virtual member method, which derived classes might override.
968         obj->on_row_collapsed(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
969 , Gtk::TreePath(p1, true)
970 );
971         return;
972       }
973       catch(...)
974       {
975         Glib::exception_handlers_invoke();
976       }
977     }
978   }
979 
980   const auto base = static_cast<BaseClassType*>(
981         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
982     );
983 
984   // Call the original underlying C function:
985   if(base && base->row_collapsed)
986     (*base->row_collapsed)(self, p0, p1);
987 }
cursor_changed_callback(GtkTreeView * self)988 void TreeView_Class::cursor_changed_callback(GtkTreeView* self)
989 {
990   const auto obj_base = static_cast<Glib::ObjectBase*>(
991       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
992 
993   // Non-gtkmmproc-generated custom classes implicitly call the default
994   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
995   // generated classes can use this optimisation, which avoids the unnecessary
996   // parameter conversions if there is no possibility of the virtual function
997   // being overridden:
998   if(obj_base && obj_base->is_derived_())
999   {
1000     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
1001     if(obj) // This can be NULL during destruction.
1002     {
1003       try // Trap C++ exceptions which would normally be lost because this is a C callback.
1004       {
1005         // Call the virtual member method, which derived classes might override.
1006         obj->on_cursor_changed();
1007         return;
1008       }
1009       catch(...)
1010       {
1011         Glib::exception_handlers_invoke();
1012       }
1013     }
1014   }
1015 
1016   const auto base = static_cast<BaseClassType*>(
1017         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1018     );
1019 
1020   // Call the original underlying C function:
1021   if(base && base->cursor_changed)
1022     (*base->cursor_changed)(self);
1023 }
columns_changed_callback(GtkTreeView * self)1024 void TreeView_Class::columns_changed_callback(GtkTreeView* self)
1025 {
1026   const auto obj_base = static_cast<Glib::ObjectBase*>(
1027       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
1028 
1029   // Non-gtkmmproc-generated custom classes implicitly call the default
1030   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
1031   // generated classes can use this optimisation, which avoids the unnecessary
1032   // parameter conversions if there is no possibility of the virtual function
1033   // being overridden:
1034   if(obj_base && obj_base->is_derived_())
1035   {
1036     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
1037     if(obj) // This can be NULL during destruction.
1038     {
1039       try // Trap C++ exceptions which would normally be lost because this is a C callback.
1040       {
1041         // Call the virtual member method, which derived classes might override.
1042         obj->on_columns_changed();
1043         return;
1044       }
1045       catch(...)
1046       {
1047         Glib::exception_handlers_invoke();
1048       }
1049     }
1050   }
1051 
1052   const auto base = static_cast<BaseClassType*>(
1053         g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
1054     );
1055 
1056   // Call the original underlying C function:
1057   if(base && base->columns_changed)
1058     (*base->columns_changed)(self);
1059 }
1060 
1061 
wrap_new(GObject * o)1062 Glib::ObjectBase* TreeView_Class::wrap_new(GObject* o)
1063 {
1064   return manage(new TreeView((GtkTreeView*)(o)));
1065 
1066 }
1067 
1068 
1069 /* The implementation: */
1070 
TreeView(const Glib::ConstructParams & construct_params)1071 TreeView::TreeView(const Glib::ConstructParams& construct_params)
1072 :
1073   Gtk::Container(construct_params)
1074 {
1075   }
1076 
TreeView(GtkTreeView * castitem)1077 TreeView::TreeView(GtkTreeView* castitem)
1078 :
1079   Gtk::Container((GtkContainer*)(castitem))
1080 {
1081   }
1082 
1083 
TreeView(TreeView && src)1084 TreeView::TreeView(TreeView&& src) noexcept
1085 : Gtk::Container(std::move(src))
1086   , Scrollable(std::move(src))
1087 {}
1088 
operator =(TreeView && src)1089 TreeView& TreeView::operator=(TreeView&& src) noexcept
1090 {
1091   Gtk::Container::operator=(std::move(src));
1092   Scrollable::operator=(std::move(src));
1093   return *this;
1094 }
1095 
~TreeView()1096 TreeView::~TreeView() noexcept
1097 {
1098   destroy_();
1099 }
1100 
1101 TreeView::CppClassType TreeView::treeview_class_; // initialize static member
1102 
get_type()1103 GType TreeView::get_type()
1104 {
1105   return treeview_class_.init().get_type();
1106 }
1107 
1108 
get_base_type()1109 GType TreeView::get_base_type()
1110 {
1111   return gtk_tree_view_get_type();
1112 }
1113 
1114 
TreeView()1115 TreeView::TreeView()
1116 :
1117   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
1118   Glib::ObjectBase(nullptr),
1119   Gtk::Container(Glib::ConstructParams(treeview_class_.init()))
1120 {
1121 
1122 
1123 }
1124 
TreeView(const Glib::RefPtr<TreeModel> & model)1125 TreeView::TreeView(const Glib::RefPtr<TreeModel>& model)
1126 :
1127   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
1128   Glib::ObjectBase(nullptr),
1129   Gtk::Container(Glib::ConstructParams(treeview_class_.init(), "model", Glib::unwrap(model), nullptr))
1130 {
1131 
1132 
1133 }
1134 
get_model()1135 Glib::RefPtr<TreeModel> TreeView::get_model()
1136 {
1137   Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_tree_view_get_model(gobj()));
1138   if(retvalue)
1139     retvalue->reference(); //The function does not do a ref for us.
1140   return retvalue;
1141 }
1142 
get_model() const1143 Glib::RefPtr<const TreeModel> TreeView::get_model() const
1144 {
1145   Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_tree_view_get_model(const_cast<GtkTreeView*>(gobj())));
1146   if(retvalue)
1147     retvalue->reference(); //The function does not do a ref for us.
1148   return retvalue;
1149 }
1150 
set_model(const Glib::RefPtr<TreeModel> & model)1151 void TreeView::set_model(const Glib::RefPtr<TreeModel>& model)
1152 {
1153   gtk_tree_view_set_model(gobj(), Glib::unwrap(model));
1154 }
1155 
get_selection()1156 Glib::RefPtr<TreeSelection> TreeView::get_selection()
1157 {
1158   Glib::RefPtr<TreeSelection> retvalue = Glib::wrap(gtk_tree_view_get_selection(gobj()));
1159   if(retvalue)
1160     retvalue->reference(); //The function does not do a ref for us.
1161   return retvalue;
1162 }
1163 
get_selection() const1164 Glib::RefPtr<const TreeSelection> TreeView::get_selection() const
1165 {
1166   return const_cast<TreeView*>(this)->get_selection();
1167 }
1168 
get_headers_visible() const1169 bool TreeView::get_headers_visible() const
1170 {
1171   return gtk_tree_view_get_headers_visible(const_cast<GtkTreeView*>(gobj()));
1172 }
1173 
set_headers_visible(bool headers_visible)1174 void TreeView::set_headers_visible(bool headers_visible)
1175 {
1176   gtk_tree_view_set_headers_visible(gobj(), static_cast<int>(headers_visible));
1177 }
1178 
columns_autosize()1179 void TreeView::columns_autosize()
1180 {
1181   gtk_tree_view_columns_autosize(gobj());
1182 }
1183 
get_headers_clickable() const1184 bool TreeView::get_headers_clickable() const
1185 {
1186   return gtk_tree_view_get_headers_clickable(const_cast<GtkTreeView*>(gobj()));
1187 }
1188 
set_headers_clickable(bool setting)1189 void TreeView::set_headers_clickable(bool setting)
1190 {
1191   gtk_tree_view_set_headers_clickable(gobj(), static_cast<int>(setting));
1192 }
1193 
1194 #ifndef GTKMM_DISABLE_DEPRECATED
1195 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
set_rules_hint(bool setting)1196 void TreeView::set_rules_hint(bool setting)
1197 {
1198   gtk_tree_view_set_rules_hint(gobj(), static_cast<int>(setting));
1199 }
1200 G_GNUC_END_IGNORE_DEPRECATIONS
1201 #endif // GTKMM_DISABLE_DEPRECATED
1202 
1203 #ifndef GTKMM_DISABLE_DEPRECATED
1204 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
get_rules_hint() const1205 bool TreeView::get_rules_hint() const
1206 {
1207   return gtk_tree_view_get_rules_hint(const_cast<GtkTreeView*>(gobj()));
1208 }
1209 G_GNUC_END_IGNORE_DEPRECATIONS
1210 #endif // GTKMM_DISABLE_DEPRECATED
1211 
set_activate_on_single_click(bool single)1212 void TreeView::set_activate_on_single_click(bool single)
1213 {
1214   gtk_tree_view_set_activate_on_single_click(gobj(), static_cast<int>(single));
1215 }
1216 
get_activate_on_single_click() const1217 bool TreeView::get_activate_on_single_click() const
1218 {
1219   return gtk_tree_view_get_activate_on_single_click(const_cast<GtkTreeView*>(gobj()));
1220 }
1221 
append_column(TreeViewColumn & column)1222 int TreeView::append_column(TreeViewColumn& column)
1223 {
1224   return gtk_tree_view_append_column(gobj(), (column).gobj());
1225 }
1226 
remove_column(TreeViewColumn & column)1227 int TreeView::remove_column(TreeViewColumn& column)
1228 {
1229   return gtk_tree_view_remove_column(gobj(), (column).gobj());
1230 }
1231 
insert_column(TreeViewColumn & column,int position)1232 int TreeView::insert_column(TreeViewColumn& column, int position)
1233 {
1234   return gtk_tree_view_insert_column(gobj(), (column).gobj(), position);
1235 }
1236 
get_n_columns() const1237 guint TreeView::get_n_columns() const
1238 {
1239   return gtk_tree_view_get_n_columns(const_cast<GtkTreeView*>(gobj()));
1240 }
1241 
get_column(int n)1242 TreeViewColumn* TreeView::get_column(int n)
1243 {
1244   return Glib::wrap(gtk_tree_view_get_column(gobj(), n));
1245 }
1246 
get_column(int n) const1247 const TreeViewColumn* TreeView::get_column(int n) const
1248 {
1249   return const_cast<TreeView*>(this)->get_column(n);
1250 }
1251 
get_columns()1252 std::vector<TreeViewColumn*> TreeView::get_columns()
1253 {
1254   return Glib::ListHandler<TreeViewColumn*>::list_to_vector(gtk_tree_view_get_columns(gobj()), Glib::OWNERSHIP_SHALLOW);
1255 }
1256 
get_columns() const1257 std::vector<const TreeViewColumn*> TreeView::get_columns() const
1258 {
1259   return Glib::ListHandler<const TreeViewColumn*>::list_to_vector(gtk_tree_view_get_columns(const_cast<GtkTreeView*>(gobj())), Glib::OWNERSHIP_SHALLOW);
1260 }
1261 
move_column_after(TreeViewColumn & column,TreeViewColumn & base_column)1262 void TreeView::move_column_after(TreeViewColumn& column, TreeViewColumn& base_column)
1263 {
1264   gtk_tree_view_move_column_after(gobj(), (column).gobj(), (base_column).gobj());
1265 }
1266 
set_expander_column(TreeViewColumn & column)1267 void TreeView::set_expander_column(TreeViewColumn& column)
1268 {
1269   gtk_tree_view_set_expander_column(gobj(), (column).gobj());
1270 }
1271 
get_expander_column()1272 TreeViewColumn* TreeView::get_expander_column()
1273 {
1274   return Glib::wrap(gtk_tree_view_get_expander_column(gobj()));
1275 }
1276 
get_expander_column() const1277 const TreeViewColumn* TreeView::get_expander_column() const
1278 {
1279   return const_cast<TreeView*>(this)->get_expander_column();
1280 }
1281 
scroll_to_point(int tree_x,int tree_y)1282 void TreeView::scroll_to_point(int tree_x, int tree_y)
1283 {
1284   gtk_tree_view_scroll_to_point(gobj(), tree_x, tree_y);
1285 }
1286 
row_activated(const TreeModel::Path & path,TreeViewColumn & column)1287 void TreeView::row_activated(const TreeModel::Path& path, TreeViewColumn& column)
1288 {
1289   gtk_tree_view_row_activated(gobj(), const_cast<GtkTreePath*>((path).gobj()), (column).gobj());
1290 }
1291 
expand_all()1292 void TreeView::expand_all()
1293 {
1294   gtk_tree_view_expand_all(gobj());
1295 }
1296 
collapse_all()1297 void TreeView::collapse_all()
1298 {
1299   gtk_tree_view_collapse_all(gobj());
1300 }
1301 
expand_to_path(const TreeModel::Path & path)1302 void TreeView::expand_to_path(const TreeModel::Path& path)
1303 {
1304   gtk_tree_view_expand_to_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
1305 }
1306 
expand_row(const TreeModel::Path & path,bool open_all)1307 bool TreeView::expand_row(const TreeModel::Path& path, bool open_all)
1308 {
1309   return gtk_tree_view_expand_row(gobj(), const_cast<GtkTreePath*>((path).gobj()), static_cast<int>(open_all));
1310 }
1311 
collapse_row(const TreeModel::Path & path)1312 bool TreeView::collapse_row(const TreeModel::Path& path)
1313 {
1314   return gtk_tree_view_collapse_row(gobj(), const_cast<GtkTreePath*>((path).gobj()));
1315 }
1316 
row_expanded(const TreeModel::Path & path)1317 bool TreeView::row_expanded(const TreeModel::Path& path)
1318 {
1319   return gtk_tree_view_row_expanded(gobj(), const_cast<GtkTreePath*>((path).gobj()));
1320 }
1321 
set_reorderable(bool reorderable)1322 void TreeView::set_reorderable(bool reorderable)
1323 {
1324   gtk_tree_view_set_reorderable(gobj(), static_cast<int>(reorderable));
1325 }
1326 
get_reorderable() const1327 bool TreeView::get_reorderable() const
1328 {
1329   return gtk_tree_view_get_reorderable(const_cast<GtkTreeView*>(gobj()));
1330 }
1331 
set_cursor(const TreeModel::Path & path,TreeViewColumn & focus_column,bool start_editing)1332 void TreeView::set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, bool start_editing)
1333 {
1334   gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>((path).gobj()), (focus_column).gobj(), static_cast<int>(start_editing));
1335 }
1336 
set_cursor(const TreeModel::Path & path,TreeViewColumn & focus_column,CellRenderer & focus_cell,bool start_editing)1337 void TreeView::set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, CellRenderer& focus_cell, bool start_editing)
1338 {
1339   gtk_tree_view_set_cursor_on_cell(gobj(), const_cast<GtkTreePath*>((path).gobj()), (focus_column).gobj(), (focus_cell).gobj(), static_cast<int>(start_editing));
1340 }
1341 
get_bin_window()1342 Glib::RefPtr<Gdk::Window> TreeView::get_bin_window()
1343 {
1344   Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap(gtk_tree_view_get_bin_window(gobj()));
1345   if(retvalue)
1346     retvalue->reference(); //The function does not do a ref for us.
1347   return retvalue;
1348 }
1349 
get_bin_window() const1350 Glib::RefPtr<const Gdk::Window> TreeView::get_bin_window() const
1351 {
1352   return const_cast<TreeView*>(this)->get_bin_window();
1353 }
1354 
get_cell_area(const TreeModel::Path & path,TreeViewColumn & column,Gdk::Rectangle & rect) const1355 void TreeView::get_cell_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect) const
1356 {
1357   gtk_tree_view_get_cell_area(const_cast<GtkTreeView*>(gobj()), const_cast<GtkTreePath*>((path).gobj()), (column).gobj(), (rect).gobj());
1358 }
1359 
get_background_area(const TreeModel::Path & path,TreeViewColumn & column,Gdk::Rectangle & rect) const1360 void TreeView::get_background_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect) const
1361 {
1362   gtk_tree_view_get_background_area(const_cast<GtkTreeView*>(gobj()), const_cast<GtkTreePath*>((path).gobj()), (column).gobj(), (rect).gobj());
1363 }
1364 
get_visible_rect(Gdk::Rectangle & visible_rect) const1365 void TreeView::get_visible_rect(Gdk::Rectangle& visible_rect) const
1366 {
1367   gtk_tree_view_get_visible_rect(const_cast<GtkTreeView*>(gobj()), (visible_rect).gobj());
1368 }
1369 
unset_rows_drag_source()1370 void TreeView::unset_rows_drag_source()
1371 {
1372   gtk_tree_view_unset_rows_drag_source(gobj());
1373 }
1374 
unset_rows_drag_dest()1375 void TreeView::unset_rows_drag_dest()
1376 {
1377   gtk_tree_view_unset_rows_drag_dest(gobj());
1378 }
1379 
set_drag_dest_row(const TreeModel::Path & path,TreeViewDropPosition pos)1380 void TreeView::set_drag_dest_row(const TreeModel::Path& path, TreeViewDropPosition pos)
1381 {
1382   gtk_tree_view_set_drag_dest_row(gobj(), const_cast<GtkTreePath*>((path).gobj()), ((GtkTreeViewDropPosition)(pos)));
1383 }
1384 
create_row_drag_icon(const TreeModel::Path & path) const1385 Cairo::RefPtr<Cairo::Surface> TreeView::create_row_drag_icon(const TreeModel::Path& path) const
1386 {
1387   return Cairo::RefPtr<Cairo::Surface>(new Cairo::Surface(gtk_tree_view_create_row_drag_icon(const_cast<GtkTreeView*>(gobj()), const_cast<GtkTreePath*>((path).gobj())), true /* take reference */));
1388 }
1389 
set_enable_search(bool enable_search)1390 void TreeView::set_enable_search(bool enable_search)
1391 {
1392   gtk_tree_view_set_enable_search(gobj(), static_cast<int>(enable_search));
1393 }
1394 
get_enable_search() const1395 bool TreeView::get_enable_search() const
1396 {
1397   return gtk_tree_view_get_enable_search(const_cast<GtkTreeView*>(gobj()));
1398 }
1399 
get_search_column() const1400 int TreeView::get_search_column() const
1401 {
1402   return gtk_tree_view_get_search_column(const_cast<GtkTreeView*>(gobj()));
1403 }
1404 
set_search_column(const TreeModelColumnBase & column)1405 void TreeView::set_search_column(const TreeModelColumnBase& column)
1406 {
1407   gtk_tree_view_set_search_column(gobj(), (column).index());
1408 }
1409 
set_search_column(int column)1410 void TreeView::set_search_column(int column)
1411 {
1412   gtk_tree_view_set_search_column(gobj(), column);
1413 }
1414 
get_search_entry()1415 Entry* TreeView::get_search_entry()
1416 {
1417   return Glib::wrap(gtk_tree_view_get_search_entry(gobj()));
1418 }
1419 
get_search_entry() const1420 const Entry* TreeView::get_search_entry() const
1421 {
1422   return const_cast<TreeView*>(this)->get_search_entry();
1423 }
1424 
set_search_entry(Entry & entry)1425 void TreeView::set_search_entry(Entry& entry)
1426 {
1427   gtk_tree_view_set_search_entry(gobj(), (entry).gobj());
1428 }
1429 
convert_widget_to_tree_coords(int wx,int wy,int & tx,int & ty) const1430 void TreeView::convert_widget_to_tree_coords(int wx, int wy, int& tx, int& ty) const
1431 {
1432   gtk_tree_view_convert_widget_to_tree_coords(const_cast<GtkTreeView*>(gobj()), wx, wy, &(tx), &(ty));
1433 }
1434 
convert_tree_to_widget_coords(int tx,int ty,int & wx,int & wy) const1435 void TreeView::convert_tree_to_widget_coords(int tx, int ty, int& wx, int& wy) const
1436 {
1437   gtk_tree_view_convert_tree_to_widget_coords(const_cast<GtkTreeView*>(gobj()), tx, ty, &(wx), &(wy));
1438 }
1439 
convert_widget_to_bin_window_coords(int wx,int wy,int & bx,int & by) const1440 void TreeView::convert_widget_to_bin_window_coords(int wx, int wy, int& bx, int& by) const
1441 {
1442   gtk_tree_view_convert_widget_to_bin_window_coords(const_cast<GtkTreeView*>(gobj()), wx, wy, &(bx), &(by));
1443 }
1444 
convert_bin_window_to_widget_coords(int bx,int by,int & wx,int & wy) const1445 void TreeView::convert_bin_window_to_widget_coords(int bx, int by, int& wx, int& wy) const
1446 {
1447   gtk_tree_view_convert_bin_window_to_widget_coords(const_cast<GtkTreeView*>(gobj()), bx, by, &(wx), &(wy));
1448 }
1449 
convert_tree_to_bin_window_coords(int tx,int ty,int & bx,int & by) const1450 void TreeView::convert_tree_to_bin_window_coords(int tx, int ty, int& bx, int& by) const
1451 {
1452   gtk_tree_view_convert_tree_to_bin_window_coords(const_cast<GtkTreeView*>(gobj()), tx, ty, &(bx), &(by));
1453 }
1454 
convert_bin_window_to_tree_coords(int bx,int by,int & tx,int & ty) const1455 void TreeView::convert_bin_window_to_tree_coords(int bx, int by, int& tx, int& ty) const
1456 {
1457   gtk_tree_view_convert_bin_window_to_tree_coords(const_cast<GtkTreeView*>(gobj()), bx, by, &(tx), &(ty));
1458 }
1459 
set_fixed_height_mode(bool enable)1460 void TreeView::set_fixed_height_mode(bool enable)
1461 {
1462   gtk_tree_view_set_fixed_height_mode(gobj(), static_cast<int>(enable));
1463 }
1464 
get_fixed_height_mode() const1465 bool TreeView::get_fixed_height_mode() const
1466 {
1467   return gtk_tree_view_get_fixed_height_mode(const_cast<GtkTreeView*>(gobj()));
1468 }
1469 
set_hover_selection(bool hover)1470 void TreeView::set_hover_selection(bool hover)
1471 {
1472   gtk_tree_view_set_hover_selection(gobj(), static_cast<int>(hover));
1473 }
1474 
get_hover_selection() const1475 bool TreeView::get_hover_selection() const
1476 {
1477   return gtk_tree_view_get_hover_selection(const_cast<GtkTreeView*>(gobj()));
1478 }
1479 
set_hover_expand(bool expand)1480 void TreeView::set_hover_expand(bool expand)
1481 {
1482   gtk_tree_view_set_hover_expand(gobj(), static_cast<int>(expand));
1483 }
1484 
get_hover_expand() const1485 bool TreeView::get_hover_expand() const
1486 {
1487   return gtk_tree_view_get_hover_expand(const_cast<GtkTreeView*>(gobj()));
1488 }
1489 
set_rubber_banding(bool enable)1490 void TreeView::set_rubber_banding(bool enable)
1491 {
1492   gtk_tree_view_set_rubber_banding(gobj(), static_cast<int>(enable));
1493 }
1494 
get_rubber_banding() const1495 bool TreeView::get_rubber_banding() const
1496 {
1497   return gtk_tree_view_get_rubber_banding(const_cast<GtkTreeView*>(gobj()));
1498 }
1499 
is_rubber_banding_active() const1500 bool TreeView::is_rubber_banding_active() const
1501 {
1502   return gtk_tree_view_is_rubber_banding_active(const_cast<GtkTreeView*>(gobj()));
1503 }
1504 
set_grid_lines(TreeViewGridLines grid_lines)1505 void TreeView::set_grid_lines(TreeViewGridLines grid_lines)
1506 {
1507   gtk_tree_view_set_grid_lines(gobj(), ((GtkTreeViewGridLines)(grid_lines)));
1508 }
1509 
get_grid_lines() const1510 TreeViewGridLines TreeView::get_grid_lines() const
1511 {
1512   return ((TreeViewGridLines)(gtk_tree_view_get_grid_lines(const_cast<GtkTreeView*>(gobj()))));
1513 }
1514 
set_enable_tree_lines(bool enable)1515 void TreeView::set_enable_tree_lines(bool enable)
1516 {
1517   gtk_tree_view_set_enable_tree_lines(gobj(), static_cast<int>(enable));
1518 }
1519 
get_enable_tree_lines() const1520 bool TreeView::get_enable_tree_lines() const
1521 {
1522   return gtk_tree_view_get_enable_tree_lines(const_cast<GtkTreeView*>(gobj()));
1523 }
1524 
set_show_expanders(bool enabled)1525 void TreeView::set_show_expanders(bool enabled)
1526 {
1527   gtk_tree_view_set_show_expanders(gobj(), static_cast<int>(enabled));
1528 }
1529 
get_show_expanders() const1530 bool TreeView::get_show_expanders() const
1531 {
1532   return gtk_tree_view_get_show_expanders(const_cast<GtkTreeView*>(gobj()));
1533 }
1534 
set_level_indentation(int indentation)1535 void TreeView::set_level_indentation(int indentation)
1536 {
1537   gtk_tree_view_set_level_indentation(gobj(), indentation);
1538 }
1539 
get_level_indentation() const1540 int TreeView::get_level_indentation() const
1541 {
1542   return gtk_tree_view_get_level_indentation(const_cast<GtkTreeView*>(gobj()));
1543 }
1544 
set_tooltip_row(const Glib::RefPtr<Tooltip> & tooltip,const TreePath & path)1545 void TreeView::set_tooltip_row(const Glib::RefPtr<Tooltip>& tooltip, const TreePath& path)
1546 {
1547   gtk_tree_view_set_tooltip_row(gobj(), Glib::unwrap(tooltip), const_cast<GtkTreePath*>((path).gobj()));
1548 }
1549 
set_tooltip_cell(const Glib::RefPtr<Tooltip> & tooltip,const TreeModel::Path * path,TreeViewColumn * column,CellRenderer * cell)1550 void TreeView::set_tooltip_cell(const Glib::RefPtr<Tooltip>& tooltip, const TreeModel::Path* path, TreeViewColumn* column, CellRenderer* cell)
1551 {
1552   gtk_tree_view_set_tooltip_cell(gobj(), Glib::unwrap(tooltip), ((path) ? const_cast<GtkTreePath*>((path)->gobj()) : nullptr), (GtkTreeViewColumn*)Glib::unwrap(column), (GtkCellRenderer*)Glib::unwrap(cell));
1553 }
1554 
set_tooltip_column(int column)1555 void TreeView::set_tooltip_column(int column)
1556 {
1557   gtk_tree_view_set_tooltip_column(gobj(), column);
1558 }
1559 
get_tooltip_column() const1560 int TreeView::get_tooltip_column() const
1561 {
1562   return gtk_tree_view_get_tooltip_column(const_cast<GtkTreeView*>(gobj()));
1563 }
1564 
1565 
signal_row_activated()1566 Glib::SignalProxy< void,const TreeModel::Path&,TreeViewColumn* > TreeView::signal_row_activated()
1567 {
1568   return Glib::SignalProxy< void,const TreeModel::Path&,TreeViewColumn* >(this, &TreeView_signal_row_activated_info);
1569 }
1570 
1571 
signal_test_expand_row()1572 Glib::SignalProxy< bool,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_test_expand_row()
1573 {
1574   return Glib::SignalProxy< bool,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_test_expand_row_info);
1575 }
1576 
1577 
signal_test_collapse_row()1578 Glib::SignalProxy< bool,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_test_collapse_row()
1579 {
1580   return Glib::SignalProxy< bool,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_test_collapse_row_info);
1581 }
1582 
1583 
signal_row_expanded()1584 Glib::SignalProxy< void,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_row_expanded()
1585 {
1586   return Glib::SignalProxy< void,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_row_expanded_info);
1587 }
1588 
1589 
signal_row_collapsed()1590 Glib::SignalProxy< void,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_row_collapsed()
1591 {
1592   return Glib::SignalProxy< void,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_row_collapsed_info);
1593 }
1594 
1595 
signal_cursor_changed()1596 Glib::SignalProxy< void > TreeView::signal_cursor_changed()
1597 {
1598   return Glib::SignalProxy< void >(this, &TreeView_signal_cursor_changed_info);
1599 }
1600 
1601 
signal_columns_changed()1602 Glib::SignalProxy< void > TreeView::signal_columns_changed()
1603 {
1604   return Glib::SignalProxy< void >(this, &TreeView_signal_columns_changed_info);
1605 }
1606 
1607 
property_model()1608 Glib::PropertyProxy< Glib::RefPtr<TreeModel> > TreeView::property_model()
1609 {
1610   return Glib::PropertyProxy< Glib::RefPtr<TreeModel> >(this, "model");
1611 }
1612 
property_model() const1613 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > TreeView::property_model() const
1614 {
1615   return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> >(this, "model");
1616 }
1617 
property_headers_visible()1618 Glib::PropertyProxy< bool > TreeView::property_headers_visible()
1619 {
1620   return Glib::PropertyProxy< bool >(this, "headers-visible");
1621 }
1622 
property_headers_visible() const1623 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_headers_visible() const
1624 {
1625   return Glib::PropertyProxy_ReadOnly< bool >(this, "headers-visible");
1626 }
1627 
property_headers_clickable()1628 Glib::PropertyProxy< bool > TreeView::property_headers_clickable()
1629 {
1630   return Glib::PropertyProxy< bool >(this, "headers-clickable");
1631 }
1632 
property_headers_clickable() const1633 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_headers_clickable() const
1634 {
1635   return Glib::PropertyProxy_ReadOnly< bool >(this, "headers-clickable");
1636 }
1637 
property_expander_column()1638 Glib::PropertyProxy< TreeViewColumn* > TreeView::property_expander_column()
1639 {
1640   return Glib::PropertyProxy< TreeViewColumn* >(this, "expander-column");
1641 }
1642 
property_expander_column() const1643 Glib::PropertyProxy_ReadOnly< TreeViewColumn* > TreeView::property_expander_column() const
1644 {
1645   return Glib::PropertyProxy_ReadOnly< TreeViewColumn* >(this, "expander-column");
1646 }
1647 
property_reorderable()1648 Glib::PropertyProxy< bool > TreeView::property_reorderable()
1649 {
1650   return Glib::PropertyProxy< bool >(this, "reorderable");
1651 }
1652 
property_reorderable() const1653 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_reorderable() const
1654 {
1655   return Glib::PropertyProxy_ReadOnly< bool >(this, "reorderable");
1656 }
1657 
1658 #ifndef GTKMM_DISABLE_DEPRECATED
1659 
property_rules_hint()1660 Glib::PropertyProxy< bool > TreeView::property_rules_hint()
1661 {
1662   return Glib::PropertyProxy< bool >(this, "rules-hint");
1663 }
1664 #endif // GTKMM_DISABLE_DEPRECATED
1665 
1666 
1667 #ifndef GTKMM_DISABLE_DEPRECATED
1668 
property_rules_hint() const1669 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_rules_hint() const
1670 {
1671   return Glib::PropertyProxy_ReadOnly< bool >(this, "rules-hint");
1672 }
1673 #endif // GTKMM_DISABLE_DEPRECATED
1674 
1675 
property_enable_search()1676 Glib::PropertyProxy< bool > TreeView::property_enable_search()
1677 {
1678   return Glib::PropertyProxy< bool >(this, "enable-search");
1679 }
1680 
property_enable_search() const1681 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_enable_search() const
1682 {
1683   return Glib::PropertyProxy_ReadOnly< bool >(this, "enable-search");
1684 }
1685 
property_search_column()1686 Glib::PropertyProxy< int > TreeView::property_search_column()
1687 {
1688   return Glib::PropertyProxy< int >(this, "search-column");
1689 }
1690 
property_search_column() const1691 Glib::PropertyProxy_ReadOnly< int > TreeView::property_search_column() const
1692 {
1693   return Glib::PropertyProxy_ReadOnly< int >(this, "search-column");
1694 }
1695 
property_fixed_height_mode()1696 Glib::PropertyProxy< bool > TreeView::property_fixed_height_mode()
1697 {
1698   return Glib::PropertyProxy< bool >(this, "fixed-height-mode");
1699 }
1700 
property_fixed_height_mode() const1701 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_fixed_height_mode() const
1702 {
1703   return Glib::PropertyProxy_ReadOnly< bool >(this, "fixed-height-mode");
1704 }
1705 
property_hover_selection()1706 Glib::PropertyProxy< bool > TreeView::property_hover_selection()
1707 {
1708   return Glib::PropertyProxy< bool >(this, "hover-selection");
1709 }
1710 
property_hover_selection() const1711 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_hover_selection() const
1712 {
1713   return Glib::PropertyProxy_ReadOnly< bool >(this, "hover-selection");
1714 }
1715 
property_hover_expand()1716 Glib::PropertyProxy< bool > TreeView::property_hover_expand()
1717 {
1718   return Glib::PropertyProxy< bool >(this, "hover-expand");
1719 }
1720 
property_hover_expand() const1721 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_hover_expand() const
1722 {
1723   return Glib::PropertyProxy_ReadOnly< bool >(this, "hover-expand");
1724 }
1725 
property_show_expanders()1726 Glib::PropertyProxy< bool > TreeView::property_show_expanders()
1727 {
1728   return Glib::PropertyProxy< bool >(this, "show-expanders");
1729 }
1730 
property_show_expanders() const1731 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_show_expanders() const
1732 {
1733   return Glib::PropertyProxy_ReadOnly< bool >(this, "show-expanders");
1734 }
1735 
property_level_indentation()1736 Glib::PropertyProxy< bool > TreeView::property_level_indentation()
1737 {
1738   return Glib::PropertyProxy< bool >(this, "level-indentation");
1739 }
1740 
property_level_indentation() const1741 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_level_indentation() const
1742 {
1743   return Glib::PropertyProxy_ReadOnly< bool >(this, "level-indentation");
1744 }
1745 
property_rubber_banding()1746 Glib::PropertyProxy< bool > TreeView::property_rubber_banding()
1747 {
1748   return Glib::PropertyProxy< bool >(this, "rubber-banding");
1749 }
1750 
property_rubber_banding() const1751 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_rubber_banding() const
1752 {
1753   return Glib::PropertyProxy_ReadOnly< bool >(this, "rubber-banding");
1754 }
1755 
property_enable_grid_lines()1756 Glib::PropertyProxy< bool > TreeView::property_enable_grid_lines()
1757 {
1758   return Glib::PropertyProxy< bool >(this, "enable-grid-lines");
1759 }
1760 
property_enable_grid_lines() const1761 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_enable_grid_lines() const
1762 {
1763   return Glib::PropertyProxy_ReadOnly< bool >(this, "enable-grid-lines");
1764 }
1765 
property_enable_tree_lines()1766 Glib::PropertyProxy< bool > TreeView::property_enable_tree_lines()
1767 {
1768   return Glib::PropertyProxy< bool >(this, "enable-tree-lines");
1769 }
1770 
property_enable_tree_lines() const1771 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_enable_tree_lines() const
1772 {
1773   return Glib::PropertyProxy_ReadOnly< bool >(this, "enable-tree-lines");
1774 }
1775 
property_tooltip_column()1776 Glib::PropertyProxy< int > TreeView::property_tooltip_column()
1777 {
1778   return Glib::PropertyProxy< int >(this, "tooltip-column");
1779 }
1780 
property_tooltip_column() const1781 Glib::PropertyProxy_ReadOnly< int > TreeView::property_tooltip_column() const
1782 {
1783   return Glib::PropertyProxy_ReadOnly< int >(this, "tooltip-column");
1784 }
1785 
property_activate_on_single_click()1786 Glib::PropertyProxy< bool > TreeView::property_activate_on_single_click()
1787 {
1788   return Glib::PropertyProxy< bool >(this, "activate-on-single-click");
1789 }
1790 
property_activate_on_single_click() const1791 Glib::PropertyProxy_ReadOnly< bool > TreeView::property_activate_on_single_click() const
1792 {
1793   return Glib::PropertyProxy_ReadOnly< bool >(this, "activate-on-single-click");
1794 }
1795 
1796 
on_row_activated(const TreeModel::Path & path,TreeViewColumn * column)1797 void Gtk::TreeView::on_row_activated(const TreeModel::Path& path, TreeViewColumn* column)
1798 {
1799   const auto base = static_cast<BaseClassType*>(
1800       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1801   );
1802 
1803   if(base && base->row_activated)
1804     (*base->row_activated)(gobj(),const_cast<GtkTreePath*>((path).gobj()),(GtkTreeViewColumn*)Glib::unwrap(column));
1805 }
on_test_expand_row(const TreeModel::iterator & iter,const TreeModel::Path & path)1806 bool Gtk::TreeView::on_test_expand_row(const TreeModel::iterator& iter, const TreeModel::Path& path)
1807 {
1808   const auto base = static_cast<BaseClassType*>(
1809       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1810   );
1811 
1812   if(base && base->test_expand_row)
1813     return (*base->test_expand_row)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
1814 
1815   using RType = bool;
1816   return RType();
1817 }
on_test_collapse_row(const TreeModel::iterator & iter,const TreeModel::Path & path)1818 bool Gtk::TreeView::on_test_collapse_row(const TreeModel::iterator& iter, const TreeModel::Path& path)
1819 {
1820   const auto base = static_cast<BaseClassType*>(
1821       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1822   );
1823 
1824   if(base && base->test_collapse_row)
1825     return (*base->test_collapse_row)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
1826 
1827   using RType = bool;
1828   return RType();
1829 }
on_row_expanded(const TreeModel::iterator & iter,const TreeModel::Path & path)1830 void Gtk::TreeView::on_row_expanded(const TreeModel::iterator& iter, const TreeModel::Path& path)
1831 {
1832   const auto base = static_cast<BaseClassType*>(
1833       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1834   );
1835 
1836   if(base && base->row_expanded)
1837     (*base->row_expanded)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
1838 }
on_row_collapsed(const TreeModel::iterator & iter,const TreeModel::Path & path)1839 void Gtk::TreeView::on_row_collapsed(const TreeModel::iterator& iter, const TreeModel::Path& path)
1840 {
1841   const auto base = static_cast<BaseClassType*>(
1842       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1843   );
1844 
1845   if(base && base->row_collapsed)
1846     (*base->row_collapsed)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
1847 }
on_cursor_changed()1848 void Gtk::TreeView::on_cursor_changed()
1849 {
1850   const auto base = static_cast<BaseClassType*>(
1851       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1852   );
1853 
1854   if(base && base->cursor_changed)
1855     (*base->cursor_changed)(gobj());
1856 }
on_columns_changed()1857 void Gtk::TreeView::on_columns_changed()
1858 {
1859   const auto base = static_cast<BaseClassType*>(
1860       g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
1861   );
1862 
1863   if(base && base->columns_changed)
1864     (*base->columns_changed)(gobj());
1865 }
1866 
1867 
1868 } // namespace Gtk
1869 
1870 
1871