2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_TREEVIEWCOLUMN_H
4 #define _GTKMM_TREEVIEWCOLUMN_H
6 #include <gtkmmconfig.h>
13 /* Copyright(C) 2002 The gtkmm Development Team
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or(at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 // This is for including the config header before any code (such as
31 // the #ifndef GTKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
34 #include <gtkmm/object.h>
35 #include <gtkmm/treeiter.h>
36 #include <gtkmm/widget.h>
37 #include <gdkmm/window.h>
38 #include <gtkmm/treemodel.h>
39 #include <glibmm/listhandle.h>
40 #include <gtkmm/cellrenderer_generation.h>
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 typedef struct _GtkTreeViewColumn GtkTreeViewColumn;
45 typedef struct _GtkTreeViewColumnClass GtkTreeViewColumnClass;
46 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
50 { class TreeViewColumn_Class; } // namespace Gtk
55 /** @addtogroup gtkmmEnums Enums and Flags */
60 enum TreeViewColumnSizing
62 TREE_VIEW_COLUMN_GROW_ONLY,
63 TREE_VIEW_COLUMN_AUTOSIZE,
64 TREE_VIEW_COLUMN_FIXED
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
75 class Value<Gtk::TreeViewColumnSizing> : public Glib::Value_Enum<Gtk::TreeViewColumnSizing>
78 static GType value_type() G_GNUC_CONST;
82 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 // We use GTKMM_API here because gcc needs the extra help on win32 , even
90 // when using --export-all and auto-import.
91 // See http://bugzilla.gnome.org/show_bug.cgi?id=309030.
93 //TODO: This should derive+implement from CellLayout when we can break ABI.
95 /** Typedefed as Gtk::TreeView::Column.
96 * This is a visible column in a Gtk::TreeView widget. It determines the geometry, type.
101 class GTKMM_API TreeViewColumn : public Gtk::Object
104 #ifndef DOXYGEN_SHOULD_SKIP_THIS
105 typedef TreeViewColumn CppObjectType;
106 typedef TreeViewColumn_Class CppClassType;
107 typedef GtkTreeViewColumn BaseObjectType;
108 typedef GtkTreeViewColumnClass BaseClassType;
109 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
111 virtual ~TreeViewColumn();
113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
116 friend class TreeViewColumn_Class;
117 static CppClassType treeviewcolumn_class_;
120 TreeViewColumn(const TreeViewColumn&);
121 TreeViewColumn& operator=(const TreeViewColumn&);
124 explicit TreeViewColumn(const Glib::ConstructParams& construct_params);
125 explicit TreeViewColumn(GtkTreeViewColumn* castitem);
127 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
130 #ifndef DOXYGEN_SHOULD_SKIP_THIS
131 static GType get_type() G_GNUC_CONST;
132 static GType get_base_type() G_GNUC_CONST;
135 ///Provides access to the underlying C GtkObject.
136 GtkTreeViewColumn* gobj() { return reinterpret_cast<GtkTreeViewColumn*>(gobject_); }
138 ///Provides access to the underlying C GtkObject.
139 const GtkTreeViewColumn* gobj() const { return reinterpret_cast<GtkTreeViewColumn*>(gobject_); }
143 //C++ methods used to invoke GTK+ virtual functions:
144 #ifdef GLIBMM_VFUNCS_ENABLED
145 #endif //GLIBMM_VFUNCS_ENABLED
148 //GTK+ Virtual Functions (override these to change behaviour):
149 #ifdef GLIBMM_VFUNCS_ENABLED
150 #endif //GLIBMM_VFUNCS_ENABLED
152 //Default Signal Handlers::
153 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
154 virtual void on_clicked();
155 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
162 typedef TreeViewColumn Column;
166 explicit TreeViewColumn(const Glib::ustring& title);
167 TreeViewColumn(const Glib::ustring& title, CellRenderer& cell);
169 /** Create a default view column for the given model column type.
171 template<class T_ModelColumnType>
172 TreeViewColumn(const Glib::ustring& title, const TreeModelColumn<T_ModelColumnType>& column);
175 /** Packs the @a cell into the beginning of the column. If @a expand is <tt>false</tt>, then
176 * the @a cell is allocated no more space than it needs. Any unused space is divided
177 * evenly between cells for which @a expand is <tt>true</tt>.
178 * @param cell The Gtk::CellRenderer.
179 * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a tree_column .
181 void pack_start(CellRenderer& cell, bool expand = true);
183 /** Adds the @a cell to end of the column. If @a expand is <tt>false</tt>, then the @a cell
184 * is allocated no more space than it needs. Any unused space is divided
185 * evenly between cells for which @a expand is <tt>true</tt>.
186 * @param cell The Gtk::CellRenderer.
187 * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a tree_column .
189 void pack_end(CellRenderer& cell, bool expand = true);
191 /** Creates an appropriate CellRenderer for the @a column, and packs that cell into the beginning of the column.
192 * If @a expand is <tt>false</tt>, then
193 * the cell is allocated no more space than it needs. Any unused space is divided
194 * evenly between cells for which @a expand is <tt>true</tt>.
196 * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
198 * @param column The model column that will be rendered by the view cell.
199 * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
201 template<class T_ModelColumnType>
202 void pack_start(const TreeModelColumn<T_ModelColumnType>& column, bool expand = true);
204 /** Creates an appropriate CellRenderer for the @a column, and packs that cell at the end of the column.
205 * If @a expand is <tt>false</tt>, then
206 * the cell is allocated no more space than it needs. Any unused space is divided
207 * evenly between cells for which @a expand is <tt>true</tt>.
209 * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
211 * @param column The model column that will be rendered by the view cell.
212 * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
214 template<class T_ModelColumnType>
215 void pack_end(const TreeModelColumn<T_ModelColumnType>& column, bool expand = true);
218 /** Unsets all the mappings on all renderers on the @a tree_column .
222 /** Gets the CellRenderer for the column.
223 * You should dynamic_cast<> to the expected derived CellRenderer type.
224 * This assumes that the TreeViewColumn contains only one CellRenderer.
226 CellRenderer* get_first_cell_renderer();
228 /** Gets the CellRenderer for the column.
229 * You should dynamic_cast<> to the expected derived CellRenderer type.
230 * This assumes that the TreeViewColumn contains only one CellRenderer.
232 const CellRenderer* get_first_cell_renderer() const;
235 /** Returns a list of all the cell renderers in the column,
236 * in no particular order.
237 * @return A list of Gtk::CellRenderers.
239 Glib::ListHandle<CellRenderer*> get_cell_renderers();
241 /** Returns a list of all the cell renderers in the column,
242 * in no particular order.
243 * @return A list of Gtk::CellRenderers.
245 Glib::ListHandle<const CellRenderer*> get_cell_renderers() const;
248 /** Adds an attribute mapping to the list in @a tree_column . The @a column is the
249 * column of the model to get a value from, and the @a attribute is the
250 * parameter on @a cell_renderer to be set from the value. So for example
251 * if column 2 of the model contains strings, you could have the
252 * "text" attribute of a Gtk::CellRendererText get its values from
254 * @param cell_renderer The Gtk::CellRenderer to set attributes on.
255 * @param attribute An attribute on the renderer.
256 * @param column The column position on the model to get the attribute from.
258 void add_attribute(CellRenderer& cell_renderer, const Glib::ustring& attribute, int column);
260 #ifdef GLIBMM_PROPERTIES_ENABLED
261 void add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column);
264 void add_attribute(Gtk::CellRenderer& cell, const Glib::ustring& property_name, const TreeModelColumnBase& column);
267 /** Associate a view CellRenderer with a model column, so that the CellRenderer renders the data in the model column.
269 * @param renderer The view cell renderer which will render the model column.
270 * @param column The model column to be renderered by this view.
272 void set_renderer(Gtk::CellRenderer& renderer, const TreeModelColumnBase& column);
274 // _WRAP_METHOD(void set_attributes(CellRenderer& cell_renderer, ...), )
277 * void on_cell_data(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
279 * This function is used instead of the standard attributes mapping for setting the column value, and should set the
280 * value of the column's cell renderer as appropriate.
282 typedef sigc::slot<void, CellRenderer*, const Gtk::TreeModel::iterator&> SlotCellData;
284 /** Sets the slot callback to use for the column.
285 * This callback function is used instead of the standard attributes mapping for setting the column value, and should set the
286 * value of the column's cell renderer as appropriate.
288 * See also unset_cell_data_func().
290 * @param cell_renderer A Gtk::CellRenderer
291 * @param slot The callback slot to use. Create this with sigc::mem_fun(), or sigc::ptr_fun().
293 void set_cell_data_func(CellRenderer& cell_renderer, const SlotCellData& slot);
295 /** Removes a previously set callback slot. See set_cell_data_func().
297 void unset_cell_data_func(CellRenderer& cell_renderer);
300 /** Clears all existing attributes previously set with
302 * @param cell_renderer A Gtk::CellRenderer to clear the attribute mapping on.
304 void clear_attributes(CellRenderer& cell_renderer);
306 /** Sets the spacing field of @a tree_column , which is the number of pixels to
307 * place between cell renderers packed into it.
308 * @param spacing Distance between cell renderers in pixels.
310 void set_spacing(int spacing);
312 /** Return value: the spacing of @a tree_column .
313 * @return The spacing of @a tree_column .
315 int get_spacing() const;
317 /** Sets the visibility of @a tree_column .
318 * @param visible <tt>true</tt> if the @a tree_column is visible.
320 void set_visible(bool visible = true);
322 /** Return value: whether the column is visible or not. If it is visible, then
323 * @return Whether the column is visible or not. If it is visible, then
324 * the tree will show the column.
326 bool get_visible() const;
328 /** If @a resizable is <tt>true</tt>, then the user can explicitly resize the column by
329 * grabbing the outer edge of the column button. If resizable is <tt>true</tt> and
330 * sizing mode of the column is Gtk::TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
331 * mode is changed to Gtk::TREE_VIEW_COLUMN_GROW_ONLY.
332 * @param resizable <tt>true</tt>, if the column can be resized.
334 void set_resizable(bool resizable = true);
336 /** Return value: <tt>true</tt>, if the @a tree_column can be resized.
337 * @return <tt>true</tt>, if the @a tree_column can be resized.
339 bool get_resizable() const;
341 /** Sets the growth behavior of @a tree_column to @a type .
342 * @param type The Gtk::TreeViewColumnSizing.
344 void set_sizing(TreeViewColumnSizing type);
346 /** Return value: The type of @a tree_column .
347 * @return The type of @a tree_column .
349 TreeViewColumnSizing get_sizing();
351 /** Return value: The current width of @a tree_column .
352 * @return The current width of @a tree_column .
354 int get_width() const;
356 /** Gets the fixed width of the column. This value is only meaning may not be
357 * the actual width of the column on the screen, just what is requested.
358 * @return The fixed width of the column.
360 int get_fixed_width() const;
362 /** Sets the size of the column in pixels. This is meaningful only if the sizing
363 * type is Gtk::TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
364 * the min/max width for the column. Please note that the min/max width of the
365 * column doesn't actually affect the "fixed_width" property of the widget, just
366 * the actual size when displayed.
367 * @param fixed_width The size to set @a tree_column to. Must be greater than 0.
369 void set_fixed_width(int fixed_width);
371 /** Sets the minimum width of the @a tree_column . If @a min_width is -1, then the
372 * minimum width is unset.
373 * @param min_width The minimum width of the column in pixels, or -1.
375 void set_min_width(int min_width);
377 /** Return value: The minimum width of the @a tree_column .
378 * @return The minimum width of the @a tree_column .
380 int get_min_width() const;
382 /** Sets the maximum width of the @a tree_column . If @a max_width is -1, then the
383 * maximum width is unset. Note, the column can actually be wider than max
384 * width if it's the last column in a view. In this case, the column expands to
385 * fill any extra space.
386 * @param max_width The maximum width of the column in pixels, or -1.
388 void set_max_width(int max_width);
390 /** Return value: The maximum width of the @a tree_column .
391 * @return The maximum width of the @a tree_column .
393 int get_max_width() const;
395 /** Emits the "clicked" signal on the column. This function will only work if
396 * @a tree_column is clickable.
401 /** Sets the title of the @a tree_column . If a custom widget has been set, then
402 * this value is ignored.
403 * @param title The title of the @a tree_column .
405 void set_title(const Glib::ustring& title);
407 /** Return value: the title of the column. This string should not be
408 * @return The title of the column. This string should not be
411 Glib::ustring get_title() const;
414 /** Sets the column to take available extra space. This space is shared equally
415 * amongst all columns that have the expand set to <tt>true</tt>. If no column has this
416 * option set, then the last column gets all extra space. By default, every
417 * column is created with this <tt>false</tt>.
420 * @param expand <tt>true</tt> if the column should take available extra space, <tt>false</tt> if not.
422 void set_expand(bool expand = true);
424 /** Return <tt>true</tt> if the column expands to take any available space.
425 * @return <tt>true</tt>, if the column expands
429 bool get_expand() const;
432 /** Sets the header to be active if @a active is <tt>true</tt>. When the header is active,
433 * then it can take keyboard focus, and can be clicked.
434 * @param clickable <tt>true</tt> if the header is active.
436 void set_clickable(bool clickable = true);
438 /** Return value: <tt>true</tt> if user can click the column header.
439 * @return <tt>true</tt> if user can click the column header.
441 bool get_clickable() const;
443 /** Sets the widget in the header to be @a widget . If widget is <tt>0</tt>, then the
444 * header button is set with a Gtk::Label set to the title of @a tree_column .
445 * @param widget A child Gtk::Widget, or <tt>0</tt>.
447 void set_widget(Gtk::Widget& widget);
449 /** Return value: The Gtk::Widget in the column header, or <tt>0</tt>
450 * @return The Gtk::Widget in the column header, or <tt>0</tt>.
452 Widget* get_widget();
454 /** Return value: The Gtk::Widget in the column header, or <tt>0</tt>
455 * @return The Gtk::Widget in the column header, or <tt>0</tt>.
457 const Widget* get_widget() const;
460 /** Sets the alignment of the title or custom widget inside the column header.
461 * The alignment determines its location inside the button -- 0.0 for left, 0.5
462 * for center, 1.0 for right.
463 * @param xalign The alignment, which is between [0.0 and 1.0] inclusive.
465 void set_alignment(float xalign);
467 /** Sets the alignment of the title or custom widget inside the column header.
468 * The alignment determines its location inside the button -- 0.0 for left, 0.5
469 * for center, 1.0 for right.
470 * @param xalign The alignment, which is between [0.0 and 1.0] inclusive.
472 void set_alignment(AlignmentEnum xalign);
475 /** Return value: The current alignent of @a tree_column .
476 * @return The current alignent of @a tree_column .
478 float get_alignment() const;
480 /** If @a reorderable is <tt>true</tt>, then the column can be reordered by the end user
481 * dragging the header.
482 * @param reorderable <tt>true</tt>, if the column can be reordered.
484 void set_reorderable(bool reorderable = true);
486 /** Return value: <tt>true</tt> if the @a tree_column can be reordered by the user.
487 * @return <tt>true</tt> if the @a tree_column can be reordered by the user.
489 bool get_reorderable() const;
492 /** Sets the logical @a sort_column_id that this column sorts on when this column
493 * is selected for sorting. Doing so makes the column header clickable.
494 * @param sort_column_id The @a sort_column_id of the model to sort on.
496 void set_sort_column(const TreeModelColumnBase& sort_column_id);
498 /** Sets the logical @a sort_column_id that this column sorts on when this column
499 * is selected for sorting. Doing so makes the column header clickable.
500 * @param sort_column_id The @a sort_column_id of the model to sort on.
502 void set_sort_column(int sort_column_id);
504 #ifndef GTKMM_DISABLE_DEPRECATED
506 /** @deprecated Use set_sort_column() instead.
508 void set_sort_column_id(const TreeModelColumnBase& sort_column_id);
510 /** @deprecated Use set_sort_column() instead.
512 void set_sort_column_id(int sort_column_id);
513 #endif // GTKMM_DISABLE_DEPRECATED
516 /** Gets the logical @a sort_column_id that the model sorts on when this
517 * column is selected for sorting.
518 * See set_sort_column_id().
519 * @return The current @a sort_column_id for this column, or -1 if
520 * this column can't be used for sorting.
522 int get_sort_column_id() const;
524 /** Call this function with a @a setting of <tt>true</tt> to display an arrow in
525 * the header button indicating the column is sorted. Call
526 * set_sort_order() to change the direction of
528 * @param setting <tt>true</tt> to display an indicator that the column is sorted.
530 void set_sort_indicator(bool setting);
532 /** Gets the value set by set_sort_indicator().
533 * @return Whether the sort indicator arrow is displayed.
535 bool get_sort_indicator() const;
537 /** Changes the appearance of the sort indicator.
539 * This <em>does not</em> actually sort the model. Use
540 * set_sort_column_id() if you want automatic sorting
541 * support. This function is primarily for custom sorting behavior, and should
542 * be used in conjunction with gtk_tree_sortable_set_sort_column() to do
543 * that. For custom models, the mechanism will vary.
545 * The sort indicator changes direction to indicate normal sort or reverse sort.
546 * Note that you must have the sort indicator enabled to see anything when
547 * calling this function; see set_sort_indicator().
548 * @param order Sort order that the sort indicator should indicate.
550 void set_sort_order(SortType order);
552 /** Gets the value set by set_sort_order().
553 * @return The sort order the sort indicator is indicating.
555 SortType get_sort_order() const;
558 /** Sets the cell renderer based on the @a tree_model and @a iter . That is, for
559 * every attribute mapping in @a tree_column , it will get a value from the set
560 * column on the @a iter , and use that value to set the attribute on the cell
561 * renderer. This is used primarily by the Gtk::TreeView.
562 * @param tree_model The Gtk::TreeModel to to get the cell renderers attributes from.
563 * @param iter The Gtk::TreeIter to to get the cell renderer's attributes from.
564 * @param is_expander <tt>true</tt>, if the row has children.
565 * @param is_expanded <tt>true</tt>, if the row has visible children.
567 void cell_set_cell_data(const Glib::RefPtr<TreeModel>& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded);
569 /** Obtains the width and height needed to render the column. This is used
570 * primarily by the Gtk::TreeView.
571 * @param cell_area The area a cell in the column will be allocated.
572 * @param x_offset Location to return x offset of a cell relative to @a cell_area .
573 * @param y_offset Location to return y offset of a cell relative to @a cell_area .
574 * @param width Location to return width needed to render a cell.
575 * @param height Location to return height needed to render a cell.
577 void cell_get_size(Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const;
579 /** Return value: <tt>true</tt>, if any of the cells packed into the @a tree_column are currently visible
580 * @return <tt>true</tt>, if any of the cells packed into the @a tree_column are currently visible.
582 bool cell_is_visible() const;
584 /** Sets the current keyboard focus to be at @a cell , if the column contains
585 * 2 or more editable and activatable cells.
588 * @param cell A Gtk::CellRenderer.
590 void focus_cell(CellRenderer& cell);
593 /** Obtains the horizontal position and size of a cell in a column. If the
594 * cell is not found in the column, @a start_pos and @a width are not changed and
595 * <tt>false</tt> is returned.
596 * @param cell_renderer A Gtk::CellRenderer.
597 * @param start_pos Return location for the horizontal position of @a cell within
599 * @param width Return location for the width of @a cell .
600 * @return <tt>true</tt> if @a cell belongs to @a tree_column .
602 bool get_cell_position(const CellRenderer& cell_renderer, int& start_pos, int& width) const;
604 /** Flags the column, and the cell renderers added to this column, to have
605 * their sizes renegotiated.
614 * <tt>void on_my_%clicked()</tt>
617 Glib::SignalProxy0< void > signal_clicked();
620 #ifdef GLIBMM_PROPERTIES_ENABLED
621 /** Whether to display the column.
623 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
624 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
625 * the value of the property changes.
627 Glib::PropertyProxy<bool> property_visible() ;
628 #endif //#GLIBMM_PROPERTIES_ENABLED
630 #ifdef GLIBMM_PROPERTIES_ENABLED
631 /** Whether to display the column.
633 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
634 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
635 * the value of the property changes.
637 Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
638 #endif //#GLIBMM_PROPERTIES_ENABLED
640 #ifdef GLIBMM_PROPERTIES_ENABLED
641 /** Current width of the column.
643 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
644 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
645 * the value of the property changes.
647 Glib::PropertyProxy_ReadOnly<int> property_width() const;
648 #endif //#GLIBMM_PROPERTIES_ENABLED
651 #ifdef GLIBMM_PROPERTIES_ENABLED
652 /** Resize mode of the column.
654 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
655 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
656 * the value of the property changes.
658 Glib::PropertyProxy<TreeViewColumnSizing> property_sizing() ;
659 #endif //#GLIBMM_PROPERTIES_ENABLED
661 #ifdef GLIBMM_PROPERTIES_ENABLED
662 /** Resize mode of the column.
664 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
665 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
666 * the value of the property changes.
668 Glib::PropertyProxy_ReadOnly<TreeViewColumnSizing> property_sizing() const;
669 #endif //#GLIBMM_PROPERTIES_ENABLED
671 #ifdef GLIBMM_PROPERTIES_ENABLED
672 /** Current fixed width of the column.
674 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
675 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
676 * the value of the property changes.
678 Glib::PropertyProxy<int> property_fixed_width() ;
679 #endif //#GLIBMM_PROPERTIES_ENABLED
681 #ifdef GLIBMM_PROPERTIES_ENABLED
682 /** Current fixed width of the column.
684 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
685 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
686 * the value of the property changes.
688 Glib::PropertyProxy_ReadOnly<int> property_fixed_width() const;
689 #endif //#GLIBMM_PROPERTIES_ENABLED
691 #ifdef GLIBMM_PROPERTIES_ENABLED
692 /** Minimum allowed width of the column.
694 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
695 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
696 * the value of the property changes.
698 Glib::PropertyProxy<int> property_min_width() ;
699 #endif //#GLIBMM_PROPERTIES_ENABLED
701 #ifdef GLIBMM_PROPERTIES_ENABLED
702 /** Minimum allowed width of the column.
704 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
705 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
706 * the value of the property changes.
708 Glib::PropertyProxy_ReadOnly<int> property_min_width() const;
709 #endif //#GLIBMM_PROPERTIES_ENABLED
711 #ifdef GLIBMM_PROPERTIES_ENABLED
712 /** Maximum allowed width of the column.
714 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
715 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
716 * the value of the property changes.
718 Glib::PropertyProxy<int> property_max_width() ;
719 #endif //#GLIBMM_PROPERTIES_ENABLED
721 #ifdef GLIBMM_PROPERTIES_ENABLED
722 /** Maximum allowed width of the column.
724 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
725 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
726 * the value of the property changes.
728 Glib::PropertyProxy_ReadOnly<int> property_max_width() const;
729 #endif //#GLIBMM_PROPERTIES_ENABLED
731 #ifdef GLIBMM_PROPERTIES_ENABLED
732 /** Title to appear in column header.
734 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
735 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
736 * the value of the property changes.
738 Glib::PropertyProxy<Glib::ustring> property_title() ;
739 #endif //#GLIBMM_PROPERTIES_ENABLED
741 #ifdef GLIBMM_PROPERTIES_ENABLED
742 /** Title to appear in column header.
744 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
745 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
746 * the value of the property changes.
748 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
749 #endif //#GLIBMM_PROPERTIES_ENABLED
751 #ifdef GLIBMM_PROPERTIES_ENABLED
752 /** Column gets share of extra width allocated to the widget.
754 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
755 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
756 * the value of the property changes.
758 Glib::PropertyProxy<bool> property_expand() ;
759 #endif //#GLIBMM_PROPERTIES_ENABLED
761 #ifdef GLIBMM_PROPERTIES_ENABLED
762 /** Column gets share of extra width allocated to the widget.
764 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
765 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
766 * the value of the property changes.
768 Glib::PropertyProxy_ReadOnly<bool> property_expand() const;
769 #endif //#GLIBMM_PROPERTIES_ENABLED
771 #ifdef GLIBMM_PROPERTIES_ENABLED
772 /** Whether the header can be clicked.
774 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
775 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
776 * the value of the property changes.
778 Glib::PropertyProxy<bool> property_clickable() ;
779 #endif //#GLIBMM_PROPERTIES_ENABLED
781 #ifdef GLIBMM_PROPERTIES_ENABLED
782 /** Whether the header can be clicked.
784 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
785 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
786 * the value of the property changes.
788 Glib::PropertyProxy_ReadOnly<bool> property_clickable() const;
789 #endif //#GLIBMM_PROPERTIES_ENABLED
791 #ifdef GLIBMM_PROPERTIES_ENABLED
792 /** Widget to put in column header button instead of column title.
794 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
795 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
796 * the value of the property changes.
798 Glib::PropertyProxy<Widget*> property_widget() ;
799 #endif //#GLIBMM_PROPERTIES_ENABLED
801 #ifdef GLIBMM_PROPERTIES_ENABLED
802 /** Widget to put in column header button instead of column title.
804 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
805 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
806 * the value of the property changes.
808 Glib::PropertyProxy_ReadOnly<Widget*> property_widget() const;
809 #endif //#GLIBMM_PROPERTIES_ENABLED
811 #ifdef GLIBMM_PROPERTIES_ENABLED
812 /** X Alignment of the column header text or widget.
814 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
815 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
816 * the value of the property changes.
818 Glib::PropertyProxy<float> property_alignment() ;
819 #endif //#GLIBMM_PROPERTIES_ENABLED
821 #ifdef GLIBMM_PROPERTIES_ENABLED
822 /** X Alignment of the column header text or widget.
824 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
825 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
826 * the value of the property changes.
828 Glib::PropertyProxy_ReadOnly<float> property_alignment() const;
829 #endif //#GLIBMM_PROPERTIES_ENABLED
831 #ifdef GLIBMM_PROPERTIES_ENABLED
832 /** Whether the column can be reordered around the headers.
834 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
835 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
836 * the value of the property changes.
838 Glib::PropertyProxy<bool> property_reorderable() ;
839 #endif //#GLIBMM_PROPERTIES_ENABLED
841 #ifdef GLIBMM_PROPERTIES_ENABLED
842 /** Whether the column can be reordered around the headers.
844 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
845 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
846 * the value of the property changes.
848 Glib::PropertyProxy_ReadOnly<bool> property_reorderable() const;
849 #endif //#GLIBMM_PROPERTIES_ENABLED
851 #ifdef GLIBMM_PROPERTIES_ENABLED
852 /** Whether to show a sort indicator.
854 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
855 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
856 * the value of the property changes.
858 Glib::PropertyProxy<bool> property_sort_indicator() ;
859 #endif //#GLIBMM_PROPERTIES_ENABLED
861 #ifdef GLIBMM_PROPERTIES_ENABLED
862 /** Whether to show a sort indicator.
864 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
865 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
866 * the value of the property changes.
868 Glib::PropertyProxy_ReadOnly<bool> property_sort_indicator() const;
869 #endif //#GLIBMM_PROPERTIES_ENABLED
871 #ifdef GLIBMM_PROPERTIES_ENABLED
872 /** Sort direction the sort indicator should indicate.
874 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
875 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
876 * the value of the property changes.
878 Glib::PropertyProxy<SortType> property_sort_order() ;
879 #endif //#GLIBMM_PROPERTIES_ENABLED
881 #ifdef GLIBMM_PROPERTIES_ENABLED
882 /** Sort direction the sort indicator should indicate.
884 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
885 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
886 * the value of the property changes.
888 Glib::PropertyProxy_ReadOnly<SortType> property_sort_order() const;
889 #endif //#GLIBMM_PROPERTIES_ENABLED
892 #ifndef DOXYGEN_SHOULD_SKIP_THIS
894 // Only necessary because of the templated ctor, see below.
895 static const Glib::Class& class_init_();
896 #endif //DOXYGEN_SHOULD_SKIP_THIS
901 #ifndef DOXYGEN_SHOULD_SKIP_THIS
903 template<class T_ModelColumnType> inline
904 void TreeViewColumn::pack_start(const TreeModelColumn<T_ModelColumnType>& column, bool expand)
906 //Generate appropriate Renderer for the column:
907 CellRenderer* pCellRenderer = manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
910 pack_start(*pCellRenderer, expand);
911 set_renderer(*pCellRenderer, column);
914 template<class T_ModelColumnType> inline
915 void TreeViewColumn::pack_end(const TreeModelColumn<T_ModelColumnType>& column, bool expand)
917 //Generate appropriate Renderer for the column:
918 CellRenderer* pCellRenderer= manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
921 pack_end(*pCellRenderer, expand);
922 set_renderer(*pCellRenderer, column);
926 template <class T_ModelColumnType> inline
927 TreeViewColumn::TreeViewColumn(const Glib::ustring& title,
928 const TreeModelColumn<T_ModelColumnType>& column)
930 Glib::ObjectBase(0), // not (yet) a custom class
931 Gtk::Object(Glib::ConstructParams(class_init_(), "title", title.c_str(), (char*) 0))
933 pack_start(column, true /* expand */);
937 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
944 /** A Glib::wrap() method for this object.
946 * @param object The C instance.
947 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
948 * @result A C++ instance that wraps this C instance.
950 * @relates Gtk::TreeViewColumn
952 Gtk::TreeViewColumn* wrap(GtkTreeViewColumn* object, bool take_copy = false);
956 #endif /* _GTKMM_TREEVIEWCOLUMN_H */