I've no idea here...
[gtkD.git] / src / gtk / TreeViewColumn.d
blobe6864450fde79a46933226f615fab810fec4da61
1 /*
2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = GtkTreeViewColumn.html
26 * outPack = gtk
27 * outFile = TreeViewColumn
28 * strct = GtkTreeViewColumn
29 * realStrct=
30 * ctorStrct=
31 * clss = TreeViewColumn
32 * interf =
33 * class Code: Yes
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gtk_tree_view_column_
40 * - gtk_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * - gtk_tree_view_column_new_with_attributes
45 * imports:
46 * - glib.Str
47 * - gtk.CellRenderer
48 * - glib.ListG
49 * - gtk.Widget
50 * - gtk.TreeModel
51 * - gtk.TreeIter
52 * - gdk.Rectangle
53 * - glib.Str
54 * structWrap:
55 * - GList* -> ListG
56 * - GdkRectangle* -> Rectangle
57 * - GtkCellRenderer* -> CellRenderer
58 * - GtkTreeIter* -> TreeIter
59 * - GtkTreeModel* -> TreeModel
60 * - GtkWidget* -> Widget
61 * local aliases:
64 module gtk.TreeViewColumn;
66 private import gtk.gtktypes;
68 private import lib.gtk;
70 private import glib.Str;
71 private import gtk.CellRenderer;
72 private import glib.ListG;
73 private import gtk.Widget;
74 private import gtk.TreeModel;
75 private import gtk.TreeIter;
76 private import gdk.Rectangle;
77 private import glib.Str;
79 /**
80 * Description
81 * The GtkTreeViewColumn object represents a visible column in a GtkTreeView widget.
82 * It allows to set properties of the column header, and functions as a holding pen for
83 * the cell renderers which determine how the data in the column is displayed.
84 * Please refer to the tree widget conceptual overview
85 * for an overview of all the objects and data types related to the tree widget and how
86 * they work together.
88 private import gtk.ObjectGtk;
89 public class TreeViewColumn : ObjectGtk
92 /** the main Gtk struct */
93 protected GtkTreeViewColumn* gtkTreeViewColumn;
96 public GtkTreeViewColumn* getTreeViewColumnStruct()
98 return gtkTreeViewColumn;
102 /** the main Gtk struct as a void* */
103 protected void* getStruct()
105 return cast(void*)gtkTreeViewColumn;
109 * Sets our main struct and passes it to the parent class
111 public this (GtkTreeViewColumn* gtkTreeViewColumn)
113 super(cast(GtkObject*)gtkTreeViewColumn);
114 this.gtkTreeViewColumn = gtkTreeViewColumn;
118 * Creates a new Tree view column
119 * @param header th column header text
120 * @param renderer the rederer for the column cells
121 * @param type the type of data to be displayed (shouldn't this be on the renderer?)
122 * @param column the column number
124 this(char [] header, CellRenderer renderer, char [] type, int column)
126 this(gtk_tree_view_column_new_with_attributes(
127 Str.toStringz(header),
128 renderer.getCellRendererStruct(),
129 Str.toStringz(type),
130 column,
131 null)
139 // imports for the signal processing
140 private import gobject.Signals;
141 private import gdk.gdktypes;
142 int[char[]] connectedSignals;
144 void delegate(TreeViewColumn)[] onClickedListeners;
145 void addOnClicked(void delegate(TreeViewColumn) dlg)
147 if ( !("clicked" in connectedSignals) )
149 Signals.connectData(
150 getStruct(),
151 "clicked",
152 cast(GCallback)&callBackClicked,
153 this,
154 null,
155 cast(ConnectFlags)0);
156 connectedSignals["clicked"] = 1;
158 onClickedListeners ~= dlg;
160 extern(C) static void callBackClicked(GtkTreeViewColumn* treeviewcolumnStruct, TreeViewColumn treeViewColumn)
162 bit consumed = false;
164 foreach ( void delegate(TreeViewColumn) dlg ; treeViewColumn.onClickedListeners )
166 dlg(treeViewColumn);
169 return consumed;
177 * Creates a new GtkTreeViewColumn.
178 * Returns:
179 * A newly created GtkTreeViewColumn.
181 public this ()
183 // GtkTreeViewColumn* gtk_tree_view_column_new (void);
184 this(cast(GtkTreeViewColumn*)gtk_tree_view_column_new() );
189 * Packs the cell into the beginning of the column. If expand is FALSE, then
190 * the cell is allocated no more space than it needs. Any unused space is divided
191 * evenly between cells for which expand is TRUE.
192 * tree_column:
193 * A GtkTreeViewColumn.
194 * cell:
195 * The GtkCellRenderer.
196 * expand:
197 * TRUE if cell is to be given extra space allocated to tree_column.
199 public void packStart(CellRenderer cell, int expand)
201 // void gtk_tree_view_column_pack_start (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, gboolean expand);
202 gtk_tree_view_column_pack_start(gtkTreeViewColumn, (cell is null) ? null : cell.getCellRendererStruct(), expand);
206 * Adds the cell to end of the column. If expand is FALSE, then the cell
207 * is allocated no more space than it needs. Any unused space is divided
208 * evenly between cells for which expand is TRUE.
209 * tree_column:
210 * A GtkTreeViewColumn.
211 * cell:
212 * The GtkCellRenderer.
213 * expand:
214 * TRUE if cell is to be given extra space allocated to tree_column.
216 public void packEnd(CellRenderer cell, int expand)
218 // void gtk_tree_view_column_pack_end (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, gboolean expand);
219 gtk_tree_view_column_pack_end(gtkTreeViewColumn, (cell is null) ? null : cell.getCellRendererStruct(), expand);
223 * Unsets all the mappings on all renderers on the tree_column.
224 * tree_column:
225 * A GtkTreeViewColumn
227 public void clear()
229 // void gtk_tree_view_column_clear (GtkTreeViewColumn *tree_column);
230 gtk_tree_view_column_clear(gtkTreeViewColumn);
234 * Returns a newly-allocated GList of all the cell renderers in the column,
235 * in no particular order. The list must be freed with g_list_free().
236 * tree_column:
237 * A GtkTreeViewColumn
238 * Returns:
239 * A list of GtkCellRenderers
241 public ListG getCellRenderers()
243 // GList* gtk_tree_view_column_get_cell_renderers (GtkTreeViewColumn *tree_column);
244 return new ListG( gtk_tree_view_column_get_cell_renderers(gtkTreeViewColumn) );
248 * Adds an attribute mapping to the list in tree_column. The column is the
249 * column of the model to get a value from, and the attribute is the
250 * parameter on 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 GtkCellRendererText get its values from
253 * column 2.
254 * tree_column:
255 * A GtkTreeViewColumn.
256 * cell_renderer:
257 * the GtkCellRenderer to set attributes on
258 * attribute:
259 * An attribute on the renderer
260 * column:
261 * The column position on the model to get the attribute from.
263 public void addAttribute(CellRenderer cellRenderer, char[] attribute, int column)
265 // void gtk_tree_view_column_add_attribute (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, const gchar *attribute, gint column);
266 gtk_tree_view_column_add_attribute(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct(), Str.toStringz(attribute), column);
270 * Sets the attributes in the list as the attributes of tree_column.
271 * The attributes should be in attribute/column order, as in
272 * gtk_tree_view_column_add_attribute(). All existing attributes
273 * are removed, and replaced with the new attributes.
274 * tree_column:
275 * A GtkTreeViewColumn.
276 * cell_renderer:
277 * the GtkCellRenderer we're setting the attributes of
278 * ...:
279 * A NULL-terminated list of attributes.
281 public void setAttributes(CellRenderer cellRenderer, ... )
283 // void gtk_tree_view_column_set_attributes (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, ...);
284 gtk_tree_view_column_set_attributes(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct());
288 * Sets the GtkTreeViewColumnFunc to use for the column. This
289 * function is used instead of the standard attributes mapping for
290 * setting the column value, and should set the value of tree_column's
291 * cell renderer as appropriate. func may be NULL to remove an
292 * older one.
293 * tree_column:
294 * A GtkTreeViewColumn
295 * cell_renderer:
296 * A GtkCellRenderer
297 * func:
298 * The GtkTreeViewColumnFunc to use.
299 * func_data:
300 * The user data for func.
301 * destroy:
302 * The destroy notification for func_data
304 public void setCellDataFunc(CellRenderer cellRenderer, GtkTreeCellDataFunc func, void* funcData, GtkDestroyNotify destroy)
306 // void gtk_tree_view_column_set_cell_data_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, GtkTreeCellDataFunc func, gpointer func_data, GtkDestroyNotify destroy);
307 gtk_tree_view_column_set_cell_data_func(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct(), func, funcData, destroy);
311 * Clears all existing attributes previously set with
312 * gtk_tree_view_column_set_attributes().
313 * tree_column:
314 * a GtkTreeViewColumn
315 * cell_renderer:
316 * a GtkCellRenderer to clear the attribute mapping on.
318 public void clearAttributes(CellRenderer cellRenderer)
320 // void gtk_tree_view_column_clear_attributes (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer);
321 gtk_tree_view_column_clear_attributes(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct());
325 * Sets the spacing field of tree_column, which is the number of pixels to
326 * place between cell renderers packed into it.
327 * tree_column:
328 * A GtkTreeViewColumn.
329 * spacing:
330 * distance between cell renderers in pixels.
332 public void setSpacing(int spacing)
334 // void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column, gint spacing);
335 gtk_tree_view_column_set_spacing(gtkTreeViewColumn, spacing);
339 * Returns the spacing of tree_column.
340 * tree_column:
341 * A GtkTreeViewColumn.
342 * Returns:
343 * the spacing of tree_column.
345 public int getSpacing()
347 // gint gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column);
348 return gtk_tree_view_column_get_spacing(gtkTreeViewColumn);
352 * Sets the visibility of tree_column.
353 * tree_column:
354 * A GtkTreeViewColumn.
355 * visible:
356 * TRUE if the tree_column is visible.
358 public void setVisible(int visible)
360 // void gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column, gboolean visible);
361 gtk_tree_view_column_set_visible(gtkTreeViewColumn, visible);
365 * Returns TRUE if tree_column is visible.
366 * tree_column:
367 * A GtkTreeViewColumn.
368 * Returns:
369 * whether the column is visible or not. If it is visible, then
370 * the tree will show the column.
372 public int getVisible()
374 // gboolean gtk_tree_view_column_get_visible (GtkTreeViewColumn *tree_column);
375 return gtk_tree_view_column_get_visible(gtkTreeViewColumn);
379 * If resizable is TRUE, then the user can explicitly resize the column by
380 * grabbing the outer edge of the column button. If resizable is TRUE and
381 * sizing mode of the column is GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
382 * mode is changed to GTK_TREE_VIEW_COLUMN_GROW_ONLY.
383 * tree_column:
384 * A GtkTreeViewColumn
385 * resizable:
386 * TRUE, if the column can be resized
388 public void setResizable(int resizable)
390 // void gtk_tree_view_column_set_resizable (GtkTreeViewColumn *tree_column, gboolean resizable);
391 gtk_tree_view_column_set_resizable(gtkTreeViewColumn, resizable);
395 * Returns TRUE if the tree_column can be resized by the end user.
396 * tree_column:
397 * A GtkTreeViewColumn
398 * Returns:
399 * TRUE, if the tree_column can be resized.
401 public int getResizable()
403 // gboolean gtk_tree_view_column_get_resizable (GtkTreeViewColumn *tree_column);
404 return gtk_tree_view_column_get_resizable(gtkTreeViewColumn);
408 * Sets the growth behavior of tree_column to type.
409 * tree_column:
410 * A GtkTreeViewColumn.
411 * type:
412 * The GtkTreeViewColumnSizing.
414 public void setSizing(GtkTreeViewColumnSizing type)
416 // void gtk_tree_view_column_set_sizing (GtkTreeViewColumn *tree_column, GtkTreeViewColumnSizing type);
417 gtk_tree_view_column_set_sizing(gtkTreeViewColumn, type);
421 * Returns the current type of tree_column.
422 * tree_column:
423 * A GtkTreeViewColumn.
424 * Returns:
425 * The type of tree_column.
427 public GtkTreeViewColumnSizing getSizing()
429 // GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column);
430 return gtk_tree_view_column_get_sizing(gtkTreeViewColumn);
434 * Returns the current size of tree_column in pixels.
435 * tree_column:
436 * A GtkTreeViewColumn.
437 * Returns:
438 * The current width of tree_column.
440 public int getWidth()
442 // gint gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column);
443 return gtk_tree_view_column_get_width(gtkTreeViewColumn);
447 * Gets the fixed width of the column. This value is only meaning may not be
448 * the actual width of the column on the screen, just what is requested.
449 * tree_column:
450 * a GtkTreeViewColumn
451 * Returns:
452 * the fixed width of the column
454 public int getFixedWidth()
456 // gint gtk_tree_view_column_get_fixed_width (GtkTreeViewColumn *tree_column);
457 return gtk_tree_view_column_get_fixed_width(gtkTreeViewColumn);
461 * Sets the size of the column in pixels. This is meaningful only if the sizing
462 * type is GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
463 * the min/max width for the column. Please note that the min/max width of the
464 * column doesn't actually affect the "fixed_width" property of the widget, just
465 * the actual size when displayed.
466 * tree_column:
467 * A GtkTreeViewColumn.
468 * fixed_width:
469 * The size to set tree_column to. Must be greater than 0.
471 public void setFixedWidth(int fixedWidth)
473 // void gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column, gint fixed_width);
474 gtk_tree_view_column_set_fixed_width(gtkTreeViewColumn, fixedWidth);
478 * Sets the minimum width of the tree_column. If min_width is -1, then the
479 * minimum width is unset.
480 * tree_column:
481 * A GtkTreeViewColumn.
482 * min_width:
483 * The minimum width of the column in pixels, or -1.
485 public void setMinWidth(int minWidth)
487 // void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column, gint min_width);
488 gtk_tree_view_column_set_min_width(gtkTreeViewColumn, minWidth);
492 * Returns the minimum width in pixels of the tree_column, or -1 if no minimum
493 * width is set.
494 * tree_column:
495 * A GtkTreeViewColumn.
496 * Returns:
497 * The minimum width of the tree_column.
499 public int getMinWidth()
501 // gint gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column);
502 return gtk_tree_view_column_get_min_width(gtkTreeViewColumn);
506 * Sets the maximum width of the tree_column. If max_width is -1, then the
507 * maximum width is unset. Note, the column can actually be wider than max
508 * width if it's the last column in a view. In this case, the column expands to
509 * fill any extra space.
510 * tree_column:
511 * A GtkTreeViewColumn.
512 * max_width:
513 * The maximum width of the column in pixels, or -1.
515 public void setMaxWidth(int maxWidth)
517 // void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column, gint max_width);
518 gtk_tree_view_column_set_max_width(gtkTreeViewColumn, maxWidth);
522 * Returns the maximum width in pixels of the tree_column, or -1 if no maximum
523 * width is set.
524 * tree_column:
525 * A GtkTreeViewColumn.
526 * Returns:
527 * The maximum width of the tree_column.
529 public int getMaxWidth()
531 // gint gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column);
532 return gtk_tree_view_column_get_max_width(gtkTreeViewColumn);
536 * Emits the "clicked" signal on the column. This function will only work if
537 * tree_column is clickable.
538 * tree_column:
539 * a GtkTreeViewColumn
541 public void clicked()
543 // void gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column);
544 gtk_tree_view_column_clicked(gtkTreeViewColumn);
548 * Sets the title of the tree_column. If a custom widget has been set, then
549 * this value is ignored.
550 * tree_column:
551 * A GtkTreeViewColumn.
552 * title:
553 * The title of the tree_column.
555 public void setTitle(char[] title)
557 // void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column, const gchar *title);
558 gtk_tree_view_column_set_title(gtkTreeViewColumn, Str.toStringz(title));
562 * Returns the title of the widget.
563 * tree_column:
564 * A GtkTreeViewColumn.
565 * Returns:
566 * the title of the column. This string should not be
567 * modified or freed.
569 public char[] getTitle()
571 // const gchar* gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column);
572 return Str.toString(gtk_tree_view_column_get_title(gtkTreeViewColumn) );
576 * Sets the column to take available extra space. This space is shared equally
577 * amongst all columns that have the expand set to TRUE. If no column has this
578 * option set, then the last column gets all extra space. By default, every
579 * column is created with this FALSE.
580 * tree_column:
581 * A GtkTreeViewColumn
582 * expand:
583 * TRUE if the column should take available extra space, FALSE if not
584 * Since 2.4
586 public void setExpand(int expand)
588 // void gtk_tree_view_column_set_expand (GtkTreeViewColumn *tree_column, gboolean expand);
589 gtk_tree_view_column_set_expand(gtkTreeViewColumn, expand);
593 * Return TRUE if the column expands to take any available space.
594 * tree_column:
595 * a GtkTreeViewColumn
596 * Returns:
597 * TRUE, if the column expands
598 * Since 2.4
600 public int getExpand()
602 // gboolean gtk_tree_view_column_get_expand (GtkTreeViewColumn *tree_column);
603 return gtk_tree_view_column_get_expand(gtkTreeViewColumn);
607 * Sets the header to be active if active is TRUE. When the header is active,
608 * then it can take keyboard focus, and can be clicked.
609 * tree_column:
610 * A GtkTreeViewColumn.
611 * clickable:
612 * TRUE if the header is active.
614 public void setClickable(int clickable)
616 // void gtk_tree_view_column_set_clickable (GtkTreeViewColumn *tree_column, gboolean clickable);
617 gtk_tree_view_column_set_clickable(gtkTreeViewColumn, clickable);
621 * Returns TRUE if the user can click on the header for the column.
622 * tree_column:
623 * a GtkTreeViewColumn
624 * Returns:
625 * TRUE if user can click the column header.
627 public int getClickable()
629 // gboolean gtk_tree_view_column_get_clickable (GtkTreeViewColumn *tree_column);
630 return gtk_tree_view_column_get_clickable(gtkTreeViewColumn);
634 * Sets the widget in the header to be widget. If widget is NULL, then the
635 * header button is set with a GtkLabel set to the title of tree_column.
636 * tree_column:
637 * A GtkTreeViewColumn.
638 * widget:
639 * A child GtkWidget, or NULL.
641 public void setWidget(Widget widget)
643 // void gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column, GtkWidget *widget);
644 gtk_tree_view_column_set_widget(gtkTreeViewColumn, (widget is null) ? null : widget.getWidgetStruct());
648 * Returns the GtkWidget in the button on the column header. If a custom
649 * widget has not been set then NULL is returned.
650 * tree_column:
651 * A GtkTreeViewColumn.
652 * Returns:
653 * The GtkWidget in the column header, or NULL
655 public Widget getWidget()
657 // GtkWidget* gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column);
658 return new Widget( gtk_tree_view_column_get_widget(gtkTreeViewColumn) );
662 * Sets the alignment of the title or custom widget inside the column header.
663 * The alignment determines its location inside the button -- 0.0 for left, 0.5
664 * for center, 1.0 for right.
665 * tree_column:
666 * A GtkTreeViewColumn.
667 * xalign:
668 * The alignment, which is between [0.0 and 1.0] inclusive.
670 public void setAlignment(float xalign)
672 // void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column, gfloat xalign);
673 gtk_tree_view_column_set_alignment(gtkTreeViewColumn, xalign);
677 * Returns the current x alignment of tree_column. This value can range
678 * between 0.0 and 1.0.
679 * tree_column:
680 * A GtkTreeViewColumn.
681 * Returns:
682 * The current alignent of tree_column.
684 public float getAlignment()
686 // gfloat gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column);
687 return gtk_tree_view_column_get_alignment(gtkTreeViewColumn);
691 * If reorderable is TRUE, then the column can be reordered by the end user
692 * dragging the header.
693 * tree_column:
694 * A GtkTreeViewColumn
695 * reorderable:
696 * TRUE, if the column can be reordered.
698 public void setReorderable(int reorderable)
700 // void gtk_tree_view_column_set_reorderable (GtkTreeViewColumn *tree_column, gboolean reorderable);
701 gtk_tree_view_column_set_reorderable(gtkTreeViewColumn, reorderable);
705 * Returns TRUE if the tree_column can be reordered by the user.
706 * tree_column:
707 * A GtkTreeViewColumn
708 * Returns:
709 * TRUE if the tree_column can be reordered by the user.
711 public int getReorderable()
713 // gboolean gtk_tree_view_column_get_reorderable (GtkTreeViewColumn *tree_column);
714 return gtk_tree_view_column_get_reorderable(gtkTreeViewColumn);
718 * Sets the logical sort_column_id that this column sorts on when this column
719 * is selected for sorting. Doing so makes the column header clickable.
720 * tree_column:
721 * a GtkTreeViewColumn
722 * sort_column_id:
723 * The sort_column_id of the model to sort on.
725 public void setSortColumnId(int sortColumnId)
727 // void gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column, gint sort_column_id);
728 gtk_tree_view_column_set_sort_column_id(gtkTreeViewColumn, sortColumnId);
732 * Gets the logical sort_column_id that the model sorts on when this
733 * column is selected for sorting.
734 * See gtk_tree_view_column_set_sort_column_id().
735 * tree_column:
736 * a GtkTreeViewColumn
737 * Returns:
738 * the current sort_column_id for this column, or -1 if
739 * this column can't be used for sorting.
741 public int getSortColumnId()
743 // gint gtk_tree_view_column_get_sort_column_id (GtkTreeViewColumn *tree_column);
744 return gtk_tree_view_column_get_sort_column_id(gtkTreeViewColumn);
748 * Call this function with a setting of TRUE to display an arrow in
749 * the header button indicating the column is sorted. Call
750 * gtk_tree_view_column_set_sort_order() to change the direction of
751 * the arrow.
752 * tree_column:
753 * a GtkTreeViewColumn
754 * setting:
755 * TRUE to display an indicator that the column is sorted
757 public void setSortIndicator(int setting)
759 // void gtk_tree_view_column_set_sort_indicator (GtkTreeViewColumn *tree_column, gboolean setting);
760 gtk_tree_view_column_set_sort_indicator(gtkTreeViewColumn, setting);
764 * Gets the value set by gtk_tree_view_column_set_sort_indicator().
765 * tree_column:
766 * a GtkTreeViewColumn
767 * Returns:
768 * whether the sort indicator arrow is displayed
770 public int getSortIndicator()
772 // gboolean gtk_tree_view_column_get_sort_indicator (GtkTreeViewColumn *tree_column);
773 return gtk_tree_view_column_get_sort_indicator(gtkTreeViewColumn);
777 * Changes the appearance of the sort indicator.
778 * This does not actually sort the model. Use
779 * gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
780 * support. This function is primarily for custom sorting behavior, and should
781 * be used in conjunction with gtk_tree_sortable_set_sort_column() to do
782 * that. For custom models, the mechanism will vary.
783 * The sort indicator changes direction to indicate normal sort or reverse sort.
784 * Note that you must have the sort indicator enabled to see anything when
785 * calling this function; see gtk_tree_view_column_set_sort_indicator().
786 * tree_column:
787 * a GtkTreeViewColumn
788 * order:
789 * sort order that the sort indicator should indicate
791 public void setSortOrder(GtkSortType order)
793 // void gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column, GtkSortType order);
794 gtk_tree_view_column_set_sort_order(gtkTreeViewColumn, order);
798 * Gets the value set by gtk_tree_view_column_set_sort_order().
799 * tree_column:
800 * a GtkTreeViewColumn
801 * Returns:
802 * the sort order the sort indicator is indicating
804 public GtkSortType getSortOrder()
806 // GtkSortType gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
807 return gtk_tree_view_column_get_sort_order(gtkTreeViewColumn);
811 * Sets the cell renderer based on the tree_model and iter. That is, for
812 * every attribute mapping in tree_column, it will get a value from the set
813 * column on the iter, and use that value to set the attribute on the cell
814 * renderer. This is used primarily by the GtkTreeView.
815 * tree_column:
816 * A GtkTreeViewColumn.
817 * tree_model:
818 * The GtkTreeModel to to get the cell renderers attributes from.
819 * iter:
820 * The GtkTreeIter to to get the cell renderer's attributes from.
821 * is_expander:
822 * TRUE, if the row has children
823 * is_expanded:
824 * TRUE, if the row has visible children
826 public void cellSetCellData(TreeModel treeModel, TreeIter iter, int isExpander, int isExpanded)
828 // void gtk_tree_view_column_cell_set_cell_data (GtkTreeViewColumn *tree_column, GtkTreeModel *tree_model, GtkTreeIter *iter, gboolean is_expander, gboolean is_expanded);
829 gtk_tree_view_column_cell_set_cell_data(gtkTreeViewColumn, (treeModel is null) ? null : treeModel.getTreeModelStruct(), (iter is null) ? null : iter.getTreeIterStruct(), isExpander, isExpanded);
833 * Obtains the width and height needed to render the column. This is used
834 * primarily by the GtkTreeView.
835 * tree_column:
836 * A GtkTreeViewColumn.
837 * cell_area:
838 * The area a cell in the column will be allocated, or NULL
839 * x_offset:
840 * location to return x offset of a cell relative to cell_area, or NULL
841 * y_offset:
842 * location to return y offset of a cell relative to cell_area, or NULL
843 * width:
844 * location to return width needed to render a cell, or NULL
845 * height:
846 * location to return height needed to render a cell, or NULL
848 public void cellGetSize(Rectangle cellArea, int* xOffset, int* yOffset, int* width, int* height)
850 // void gtk_tree_view_column_cell_get_size (GtkTreeViewColumn *tree_column, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height);
851 gtk_tree_view_column_cell_get_size(gtkTreeViewColumn, (cellArea is null) ? null : cellArea.getRectangleStruct(), xOffset, yOffset, width, height);
855 * Obtains the horizontal position and size of a cell in a column. If the
856 * cell is not found in the column, start_pos and width are not changed and
857 * FALSE is returned.
858 * tree_column:
859 * a GtkTreeViewColumn
860 * cell_renderer:
861 * a GtkCellRenderer
862 * start_pos:
863 * return location for the horizontal position of cell within
864 * tree_column, may be NULL
865 * width:
866 * return location for the width of cell, may be NULL
867 * Returns:
868 * TRUE if cell belongs to tree_column.
870 public int cellGetPosition(CellRenderer cellRenderer, int* startPos, int* width)
872 // gboolean gtk_tree_view_column_cell_get_position (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell_renderer, gint *start_pos, gint *width);
873 return gtk_tree_view_column_cell_get_position(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct(), startPos, width);
877 * Returns TRUE if any of the cells packed into the tree_column are visible.
878 * For this to be meaningful, you must first initialize the cells with
879 * gtk_tree_view_column_cell_set_cell_data()
880 * tree_column:
881 * A GtkTreeViewColumn
882 * Returns:
883 * TRUE, if any of the cells packed into the tree_column are currently visible
885 public int cellIsVisible()
887 // gboolean gtk_tree_view_column_cell_is_visible (GtkTreeViewColumn *tree_column);
888 return gtk_tree_view_column_cell_is_visible(gtkTreeViewColumn);
892 * Sets the current keyboard focus to be at cell, if the column contains
893 * 2 or more editable and activatable cells.
894 * tree_column:
895 * A GtkTreeViewColumn
896 * cell:
897 * A GtkCellRenderer
898 * Since 2.2
900 public void focusCell(CellRenderer cell)
902 // void gtk_tree_view_column_focus_cell (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell);
903 gtk_tree_view_column_focus_cell(gtkTreeViewColumn, (cell is null) ? null : cell.getCellRendererStruct());
907 * Flags the column, and the cell renderers added to this column, to have
908 * their sizes renegotiated.
909 * tree_column:
910 * A GtkTreeViewColumn
911 * Since 2.8
912 * Property Details
913 * The "alignment" property
914 * "alignment" gfloat : Read / Write
915 * X Alignment of the column header text or widget.
916 * Allowed values: [0,1]
917 * Default value: 0
919 public void queueResize()
921 // void gtk_tree_view_column_queue_resize (GtkTreeViewColumn *tree_column);
922 gtk_tree_view_column_queue_resize(gtkTreeViewColumn);