1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GtkTreeViewColumn.html
27  * outPack = gtk
28  * outFile = TreeViewColumn
29  * strct   = GtkTreeViewColumn
30  * realStrct=
31  * ctorStrct=
32  * clss    = TreeViewColumn
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- CellLayoutIF
40  * prefixes:
41  * 	- gtk_tree_view_column_
42  * 	- gtk_
43  * omit structs:
44  * omit prefixes:
45  * omit code:
46  * 	- gtk_tree_view_column_pack_start
47  * 	- gtk_tree_view_column_pack_end
48  * 	- gtk_tree_view_column_clear
49  * 	- gtk_tree_view_column_add_attribute
50  * 	- gtk_tree_view_column_clear_attributes
51  * 	- gtk_tree_view_column_new_with_attributes
52  * omit signals:
53  * imports:
54  * 	- glib.Str
55  * 	- gtk.CellRenderer
56  * 	- glib.ListG
57  * 	- gtk.Widget
58  * 	- gtk.TreeModelIF
59  * 	- gtk.TreeIter
60  * 	- gdk.Rectangle
61  * 	- glib.Str
62  * 	- gtk.CellLayoutIF
63  * 	- gtk.CellLayoutT
64  * structWrap:
65  * 	- GList* -> ListG
66  * 	- GdkRectangle* -> Rectangle
67  * 	- GtkCellRenderer* -> CellRenderer
68  * 	- GtkTreeIter* -> TreeIter
69  * 	- GtkTreeModel* -> TreeModelIF
70  * 	- GtkWidget* -> Widget
71  * module aliases:
72  * local aliases:
73  * overrides:
74  */
75 
76 module gtk.TreeViewColumn;
77 
78 public  import gtkc.gtktypes;
79 
80 private import gtkc.gtk;
81 private import glib.ConstructionException;
82 private import gobject.ObjectG;
83 
84 private import gobject.Signals;
85 public  import gtkc.gdktypes;
86 
87 private import glib.Str;
88 private import gtk.CellRenderer;
89 private import glib.ListG;
90 private import gtk.Widget;
91 private import gtk.TreeModelIF;
92 private import gtk.TreeIter;
93 private import gdk.Rectangle;
94 private import glib.Str;
95 private import gtk.CellLayoutIF;
96 private import gtk.CellLayoutT;
97 
98 
99 
100 private import gtk.ObjectGtk;
101 
102 /**
103  * Description
104  * The GtkTreeViewColumn object represents a visible column in a GtkTreeView widget.
105  * It allows to set properties of the column header, and functions as a holding pen for
106  * the cell renderers which determine how the data in the column is displayed.
107  * Please refer to the tree widget conceptual overview
108  * for an overview of all the objects and data types related to the tree widget and how
109  * they work together.
110  */
111 public class TreeViewColumn : ObjectGtk, CellLayoutIF
112 {
113 	
114 	/** the main Gtk struct */
115 	protected GtkTreeViewColumn* gtkTreeViewColumn;
116 	
117 	
118 	public GtkTreeViewColumn* getTreeViewColumnStruct()
119 	{
120 		return gtkTreeViewColumn;
121 	}
122 	
123 	
124 	/** the main Gtk struct as a void* */
125 	protected override void* getStruct()
126 	{
127 		return cast(void*)gtkTreeViewColumn;
128 	}
129 	
130 	/**
131 	 * Sets our main struct and passes it to the parent class
132 	 */
133 	public this (GtkTreeViewColumn* gtkTreeViewColumn)
134 	{
135 		super(cast(GtkObject*)gtkTreeViewColumn);
136 		this.gtkTreeViewColumn = gtkTreeViewColumn;
137 	}
138 	
139 	protected override void setStruct(GObject* obj)
140 	{
141 		super.setStruct(obj);
142 		gtkTreeViewColumn = cast(GtkTreeViewColumn*)obj;
143 	}
144 	
145 	// add the CellLayout capabilities
146 	mixin CellLayoutT!(GtkTreeViewColumn);
147 	
148 	/**
149 	 * Creates a new Tree view column
150 	 * Params:
151 	 *  header = th column header text
152 	 *  renderer = the rederer for the column cells
153 	 *  type = the type of data to be displayed (shouldn't this be on the renderer?)
154 	 *  column = the column number
155 	 * Throws: ConstructionException GTK+ fails to create the object.
156 	 */
157 	this(string header, CellRenderer renderer, string type, int column)
158 	{
159 		auto p = gtk_tree_view_column_new_with_attributes(
160 		Str.toStringz(header),
161 		renderer.getCellRendererStruct(),
162 		Str.toStringz(type),
163 		column,
164 		null);
165 		
166 		if(p is null)
167 		{
168 			throw new ConstructionException("null returned by gtk_tree_view_column_new_with_attributes");
169 		}
170 		
171 		this(p);
172 	}
173 	
174 	/**
175 	 */
176 	int[string] connectedSignals;
177 	
178 	void delegate(TreeViewColumn)[] onClickedListeners;
179 	/**
180 	 * See Also
181 	 * GtkTreeView, GtkTreeSelection, GtkTreeDnd, GtkTreeMode, GtkTreeSortable, GtkTreeModelSort, GtkListStore, GtkTreeStore, GtkCellRenderer, GtkCellEditable, GtkCellRendererPixbuf, GtkCellRendererText, GtkCellRendererToggle
182 	 */
183 	void addOnClicked(void delegate(TreeViewColumn) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
184 	{
185 		if ( !("clicked" in connectedSignals) )
186 		{
187 			Signals.connectData(
188 			getStruct(),
189 			"clicked",
190 			cast(GCallback)&callBackClicked,
191 			cast(void*)this,
192 			null,
193 			connectFlags);
194 			connectedSignals["clicked"] = 1;
195 		}
196 		onClickedListeners ~= dlg;
197 	}
198 	extern(C) static void callBackClicked(GtkTreeViewColumn* treeviewcolumnStruct, TreeViewColumn _treeViewColumn)
199 	{
200 		foreach ( void delegate(TreeViewColumn) dlg ; _treeViewColumn.onClickedListeners )
201 		{
202 			dlg(_treeViewColumn);
203 		}
204 	}
205 	
206 	
207 	/**
208 	 * Creates a new GtkTreeViewColumn.
209 	 * Throws: ConstructionException GTK+ fails to create the object.
210 	 */
211 	public this ()
212 	{
213 		// GtkTreeViewColumn * gtk_tree_view_column_new (void);
214 		auto p = gtk_tree_view_column_new();
215 		if(p is null)
216 		{
217 			throw new ConstructionException("null returned by gtk_tree_view_column_new()");
218 		}
219 		this(cast(GtkTreeViewColumn*) p);
220 	}
221 	
222 	/**
223 	 * Warning
224 	 * gtk_tree_view_column_get_cell_renderers has been deprecated since version 2.18 and should not be used in newly-written code. use gtk_cell_layout_get_cells() instead.
225 	 * Returns a newly-allocated GList of all the cell renderers in the column,
226 	 * in no particular order. The list must be freed with g_list_free().
227 	 * Returns: A list of GtkCellRenderers
228 	 */
229 	public ListG getCellRenderers()
230 	{
231 		// GList * gtk_tree_view_column_get_cell_renderers  (GtkTreeViewColumn *tree_column);
232 		auto p = gtk_tree_view_column_get_cell_renderers(gtkTreeViewColumn);
233 		
234 		if(p is null)
235 		{
236 			return null;
237 		}
238 		
239 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
240 	}
241 	
242 	/**
243 	 * Sets the GtkTreeViewColumnFunc to use for the column. This
244 	 * function is used instead of the standard attributes mapping for
245 	 * setting the column value, and should set the value of tree_column's
246 	 * cell renderer as appropriate. func may be NULL to remove an
247 	 * older one.
248 	 * Params:
249 	 * cellRenderer = A GtkCellRenderer
250 	 * func = The GtkTreeViewColumnFunc to use.
251 	 * funcData = The user data for func.
252 	 * destroy = The destroy notification for func_data
253 	 */
254 	public void setCellDataFunc(CellRenderer cellRenderer, GtkTreeCellDataFunc func, void* funcData, GDestroyNotify destroy)
255 	{
256 		// void gtk_tree_view_column_set_cell_data_func  (GtkTreeViewColumn *tree_column,  GtkCellRenderer *cell_renderer,  GtkTreeCellDataFunc func,  gpointer func_data,  GDestroyNotify destroy);
257 		gtk_tree_view_column_set_cell_data_func(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct(), func, funcData, destroy);
258 	}
259 	
260 	/**
261 	 * Sets the spacing field of tree_column, which is the number of pixels to
262 	 * place between cell renderers packed into it.
263 	 * Params:
264 	 * spacing = distance between cell renderers in pixels.
265 	 */
266 	public void setSpacing(int spacing)
267 	{
268 		// void gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,  gint spacing);
269 		gtk_tree_view_column_set_spacing(gtkTreeViewColumn, spacing);
270 	}
271 	
272 	/**
273 	 * Returns the spacing of tree_column.
274 	 * Returns: the spacing of tree_column.
275 	 */
276 	public int getSpacing()
277 	{
278 		// gint gtk_tree_view_column_get_spacing (GtkTreeViewColumn *tree_column);
279 		return gtk_tree_view_column_get_spacing(gtkTreeViewColumn);
280 	}
281 	
282 	/**
283 	 * Sets the visibility of tree_column.
284 	 * Params:
285 	 * visible = TRUE if the tree_column is visible.
286 	 */
287 	public void setVisible(int visible)
288 	{
289 		// void gtk_tree_view_column_set_visible (GtkTreeViewColumn *tree_column,  gboolean visible);
290 		gtk_tree_view_column_set_visible(gtkTreeViewColumn, visible);
291 	}
292 	
293 	/**
294 	 * Returns TRUE if tree_column is visible.
295 	 * Returns: whether the column is visible or not. If it is visible, then the tree will show the column.
296 	 */
297 	public int getVisible()
298 	{
299 		// gboolean gtk_tree_view_column_get_visible (GtkTreeViewColumn *tree_column);
300 		return gtk_tree_view_column_get_visible(gtkTreeViewColumn);
301 	}
302 	
303 	/**
304 	 * If resizable is TRUE, then the user can explicitly resize the column by
305 	 * grabbing the outer edge of the column button. If resizable is TRUE and
306 	 * sizing mode of the column is GTK_TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
307 	 * mode is changed to GTK_TREE_VIEW_COLUMN_GROW_ONLY.
308 	 * Params:
309 	 * resizable = TRUE, if the column can be resized
310 	 */
311 	public void setResizable(int resizable)
312 	{
313 		// void gtk_tree_view_column_set_resizable (GtkTreeViewColumn *tree_column,  gboolean resizable);
314 		gtk_tree_view_column_set_resizable(gtkTreeViewColumn, resizable);
315 	}
316 	
317 	/**
318 	 * Returns TRUE if the tree_column can be resized by the end user.
319 	 * Returns: TRUE, if the tree_column can be resized.
320 	 */
321 	public int getResizable()
322 	{
323 		// gboolean gtk_tree_view_column_get_resizable (GtkTreeViewColumn *tree_column);
324 		return gtk_tree_view_column_get_resizable(gtkTreeViewColumn);
325 	}
326 	
327 	/**
328 	 * Sets the growth behavior of tree_column to type.
329 	 * Params:
330 	 * type = The GtkTreeViewColumnSizing.
331 	 */
332 	public void setSizing(GtkTreeViewColumnSizing type)
333 	{
334 		// void gtk_tree_view_column_set_sizing (GtkTreeViewColumn *tree_column,  GtkTreeViewColumnSizing type);
335 		gtk_tree_view_column_set_sizing(gtkTreeViewColumn, type);
336 	}
337 	
338 	/**
339 	 * Returns the current type of tree_column.
340 	 * Returns: The type of tree_column.
341 	 */
342 	public GtkTreeViewColumnSizing getSizing()
343 	{
344 		// GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing (GtkTreeViewColumn *tree_column);
345 		return gtk_tree_view_column_get_sizing(gtkTreeViewColumn);
346 	}
347 	
348 	/**
349 	 * Returns the current size of tree_column in pixels.
350 	 * Returns: The current width of tree_column.
351 	 */
352 	public int getWidth()
353 	{
354 		// gint gtk_tree_view_column_get_width (GtkTreeViewColumn *tree_column);
355 		return gtk_tree_view_column_get_width(gtkTreeViewColumn);
356 	}
357 	
358 	/**
359 	 * Gets the fixed width of the column. This value is only meaning may not be
360 	 * the actual width of the column on the screen, just what is requested.
361 	 * Returns: the fixed width of the column
362 	 */
363 	public int getFixedWidth()
364 	{
365 		// gint gtk_tree_view_column_get_fixed_width  (GtkTreeViewColumn *tree_column);
366 		return gtk_tree_view_column_get_fixed_width(gtkTreeViewColumn);
367 	}
368 	
369 	/**
370 	 * Sets the size of the column in pixels. This is meaningful only if the sizing
371 	 * type is GTK_TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
372 	 * the min/max width for the column. Please note that the min/max width of the
373 	 * column doesn't actually affect the "fixed_width" property of the widget, just
374 	 * the actual size when displayed.
375 	 * Params:
376 	 * fixedWidth = The size to set tree_column to. Must be greater than 0.
377 	 */
378 	public void setFixedWidth(int fixedWidth)
379 	{
380 		// void gtk_tree_view_column_set_fixed_width  (GtkTreeViewColumn *tree_column,  gint fixed_width);
381 		gtk_tree_view_column_set_fixed_width(gtkTreeViewColumn, fixedWidth);
382 	}
383 	
384 	/**
385 	 * Sets the minimum width of the tree_column. If min_width is -1, then the
386 	 * minimum width is unset.
387 	 * Params:
388 	 * minWidth = The minimum width of the column in pixels, or -1.
389 	 */
390 	public void setMinWidth(int minWidth)
391 	{
392 		// void gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column,  gint min_width);
393 		gtk_tree_view_column_set_min_width(gtkTreeViewColumn, minWidth);
394 	}
395 	
396 	/**
397 	 * Returns the minimum width in pixels of the tree_column, or -1 if no minimum
398 	 * width is set.
399 	 * Returns: The minimum width of the tree_column.
400 	 */
401 	public int getMinWidth()
402 	{
403 		// gint gtk_tree_view_column_get_min_width (GtkTreeViewColumn *tree_column);
404 		return gtk_tree_view_column_get_min_width(gtkTreeViewColumn);
405 	}
406 	
407 	/**
408 	 * Sets the maximum width of the tree_column. If max_width is -1, then the
409 	 * maximum width is unset. Note, the column can actually be wider than max
410 	 * width if it's the last column in a view. In this case, the column expands to
411 	 * fill any extra space.
412 	 * Params:
413 	 * maxWidth = The maximum width of the column in pixels, or -1.
414 	 */
415 	public void setMaxWidth(int maxWidth)
416 	{
417 		// void gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,  gint max_width);
418 		gtk_tree_view_column_set_max_width(gtkTreeViewColumn, maxWidth);
419 	}
420 	
421 	/**
422 	 * Returns the maximum width in pixels of the tree_column, or -1 if no maximum
423 	 * width is set.
424 	 * Returns: The maximum width of the tree_column.
425 	 */
426 	public int getMaxWidth()
427 	{
428 		// gint gtk_tree_view_column_get_max_width (GtkTreeViewColumn *tree_column);
429 		return gtk_tree_view_column_get_max_width(gtkTreeViewColumn);
430 	}
431 	
432 	/**
433 	 * Emits the "clicked" signal on the column. This function will only work if
434 	 * tree_column is clickable.
435 	 */
436 	public void clicked()
437 	{
438 		// void gtk_tree_view_column_clicked (GtkTreeViewColumn *tree_column);
439 		gtk_tree_view_column_clicked(gtkTreeViewColumn);
440 	}
441 	
442 	/**
443 	 * Sets the title of the tree_column. If a custom widget has been set, then
444 	 * this value is ignored.
445 	 * Params:
446 	 * title = The title of the tree_column.
447 	 */
448 	public void setTitle(string title)
449 	{
450 		// void gtk_tree_view_column_set_title (GtkTreeViewColumn *tree_column,  const gchar *title);
451 		gtk_tree_view_column_set_title(gtkTreeViewColumn, Str.toStringz(title));
452 	}
453 	
454 	/**
455 	 * Returns the title of the widget.
456 	 * Returns: the title of the column. This string should not be modified or freed.
457 	 */
458 	public string getTitle()
459 	{
460 		// const gchar * gtk_tree_view_column_get_title (GtkTreeViewColumn *tree_column);
461 		return Str.toString(gtk_tree_view_column_get_title(gtkTreeViewColumn));
462 	}
463 	
464 	/**
465 	 * Sets the column to take available extra space. This space is shared equally
466 	 * amongst all columns that have the expand set to TRUE. If no column has this
467 	 * option set, then the last column gets all extra space. By default, every
468 	 * column is created with this FALSE.
469 	 * Since 2.4
470 	 * Params:
471 	 * expand = TRUE if the column should take available extra space, FALSE if not
472 	 */
473 	public void setExpand(int expand)
474 	{
475 		// void gtk_tree_view_column_set_expand (GtkTreeViewColumn *tree_column,  gboolean expand);
476 		gtk_tree_view_column_set_expand(gtkTreeViewColumn, expand);
477 	}
478 	
479 	/**
480 	 * Return TRUE if the column expands to take any available space.
481 	 * Since 2.4
482 	 * Returns: TRUE, if the column expands
483 	 */
484 	public int getExpand()
485 	{
486 		// gboolean gtk_tree_view_column_get_expand (GtkTreeViewColumn *tree_column);
487 		return gtk_tree_view_column_get_expand(gtkTreeViewColumn);
488 	}
489 	
490 	/**
491 	 * Sets the header to be active if active is TRUE. When the header is active,
492 	 * then it can take keyboard focus, and can be clicked.
493 	 * Params:
494 	 * clickable = TRUE if the header is active.
495 	 */
496 	public void setClickable(int clickable)
497 	{
498 		// void gtk_tree_view_column_set_clickable (GtkTreeViewColumn *tree_column,  gboolean clickable);
499 		gtk_tree_view_column_set_clickable(gtkTreeViewColumn, clickable);
500 	}
501 	
502 	/**
503 	 * Returns TRUE if the user can click on the header for the column.
504 	 * Returns: TRUE if user can click the column header.
505 	 */
506 	public int getClickable()
507 	{
508 		// gboolean gtk_tree_view_column_get_clickable (GtkTreeViewColumn *tree_column);
509 		return gtk_tree_view_column_get_clickable(gtkTreeViewColumn);
510 	}
511 	
512 	/**
513 	 * Sets the widget in the header to be widget. If widget is NULL, then the
514 	 * header button is set with a GtkLabel set to the title of tree_column.
515 	 * Params:
516 	 * widget = A child GtkWidget, or NULL. [allow-none]
517 	 */
518 	public void setWidget(Widget widget)
519 	{
520 		// void gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column,  GtkWidget *widget);
521 		gtk_tree_view_column_set_widget(gtkTreeViewColumn, (widget is null) ? null : widget.getWidgetStruct());
522 	}
523 	
524 	/**
525 	 * Returns the GtkWidget in the button on the column header.
526 	 * If a custom widget has not been set then NULL is returned.
527 	 * Returns: The GtkWidget in the column header, or NULL. [transfer none]
528 	 */
529 	public Widget getWidget()
530 	{
531 		// GtkWidget * gtk_tree_view_column_get_widget (GtkTreeViewColumn *tree_column);
532 		auto p = gtk_tree_view_column_get_widget(gtkTreeViewColumn);
533 		
534 		if(p is null)
535 		{
536 			return null;
537 		}
538 		
539 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
540 	}
541 	
542 	/**
543 	 * Sets the alignment of the title or custom widget inside the column header.
544 	 * The alignment determines its location inside the button -- 0.0 for left, 0.5
545 	 * for center, 1.0 for right.
546 	 * Params:
547 	 * xalign = The alignment, which is between [0.0 and 1.0] inclusive.
548 	 */
549 	public void setAlignment(float xalign)
550 	{
551 		// void gtk_tree_view_column_set_alignment (GtkTreeViewColumn *tree_column,  gfloat xalign);
552 		gtk_tree_view_column_set_alignment(gtkTreeViewColumn, xalign);
553 	}
554 	
555 	/**
556 	 * Returns the current x alignment of tree_column. This value can range
557 	 * between 0.0 and 1.0.
558 	 * Returns: The current alignent of tree_column.
559 	 */
560 	public float getAlignment()
561 	{
562 		// gfloat gtk_tree_view_column_get_alignment (GtkTreeViewColumn *tree_column);
563 		return gtk_tree_view_column_get_alignment(gtkTreeViewColumn);
564 	}
565 	
566 	/**
567 	 * If reorderable is TRUE, then the column can be reordered by the end user
568 	 * dragging the header.
569 	 * Params:
570 	 * reorderable = TRUE, if the column can be reordered.
571 	 */
572 	public void setReorderable(int reorderable)
573 	{
574 		// void gtk_tree_view_column_set_reorderable  (GtkTreeViewColumn *tree_column,  gboolean reorderable);
575 		gtk_tree_view_column_set_reorderable(gtkTreeViewColumn, reorderable);
576 	}
577 	
578 	/**
579 	 * Returns TRUE if the tree_column can be reordered by the user.
580 	 * Returns: TRUE if the tree_column can be reordered by the user.
581 	 */
582 	public int getReorderable()
583 	{
584 		// gboolean gtk_tree_view_column_get_reorderable  (GtkTreeViewColumn *tree_column);
585 		return gtk_tree_view_column_get_reorderable(gtkTreeViewColumn);
586 	}
587 	
588 	/**
589 	 * Sets the logical sort_column_id that this column sorts on when this column
590 	 * is selected for sorting. Doing so makes the column header clickable.
591 	 * Params:
592 	 * sortColumnId = The sort_column_id of the model to sort on.
593 	 */
594 	public void setSortColumnId(int sortColumnId)
595 	{
596 		// void gtk_tree_view_column_set_sort_column_id  (GtkTreeViewColumn *tree_column,  gint sort_column_id);
597 		gtk_tree_view_column_set_sort_column_id(gtkTreeViewColumn, sortColumnId);
598 	}
599 	
600 	/**
601 	 * Gets the logical sort_column_id that the model sorts on when this
602 	 * column is selected for sorting.
603 	 * See gtk_tree_view_column_set_sort_column_id().
604 	 * Returns: the current sort_column_id for this column, or -1 if this column can't be used for sorting.
605 	 */
606 	public int getSortColumnId()
607 	{
608 		// gint gtk_tree_view_column_get_sort_column_id  (GtkTreeViewColumn *tree_column);
609 		return gtk_tree_view_column_get_sort_column_id(gtkTreeViewColumn);
610 	}
611 	
612 	/**
613 	 * Call this function with a setting of TRUE to display an arrow in
614 	 * the header button indicating the column is sorted. Call
615 	 * gtk_tree_view_column_set_sort_order() to change the direction of
616 	 * the arrow.
617 	 * Params:
618 	 * setting = TRUE to display an indicator that the column is sorted
619 	 */
620 	public void setSortIndicator(int setting)
621 	{
622 		// void gtk_tree_view_column_set_sort_indicator  (GtkTreeViewColumn *tree_column,  gboolean setting);
623 		gtk_tree_view_column_set_sort_indicator(gtkTreeViewColumn, setting);
624 	}
625 	
626 	/**
627 	 * Gets the value set by gtk_tree_view_column_set_sort_indicator().
628 	 * Returns: whether the sort indicator arrow is displayed
629 	 */
630 	public int getSortIndicator()
631 	{
632 		// gboolean gtk_tree_view_column_get_sort_indicator  (GtkTreeViewColumn *tree_column);
633 		return gtk_tree_view_column_get_sort_indicator(gtkTreeViewColumn);
634 	}
635 	
636 	/**
637 	 * Changes the appearance of the sort indicator.
638 	 * This does not actually sort the model. Use
639 	 * gtk_tree_view_column_set_sort_column_id() if you want automatic sorting
640 	 * support. This function is primarily for custom sorting behavior, and should
641 	 * be used in conjunction with gtk_tree_sortable_set_sort_column() to do
642 	 * that. For custom models, the mechanism will vary.
643 	 * The sort indicator changes direction to indicate normal sort or reverse sort.
644 	 * Note that you must have the sort indicator enabled to see anything when
645 	 * calling this function; see gtk_tree_view_column_set_sort_indicator().
646 	 * Params:
647 	 * order = sort order that the sort indicator should indicate
648 	 */
649 	public void setSortOrder(GtkSortType order)
650 	{
651 		// void gtk_tree_view_column_set_sort_order (GtkTreeViewColumn *tree_column,  GtkSortType order);
652 		gtk_tree_view_column_set_sort_order(gtkTreeViewColumn, order);
653 	}
654 	
655 	/**
656 	 * Gets the value set by gtk_tree_view_column_set_sort_order().
657 	 * Returns: the sort order the sort indicator is indicating
658 	 */
659 	public GtkSortType getSortOrder()
660 	{
661 		// GtkSortType gtk_tree_view_column_get_sort_order (GtkTreeViewColumn *tree_column);
662 		return gtk_tree_view_column_get_sort_order(gtkTreeViewColumn);
663 	}
664 	
665 	/**
666 	 * Sets the cell renderer based on the tree_model and iter. That is, for
667 	 * every attribute mapping in tree_column, it will get a value from the set
668 	 * column on the iter, and use that value to set the attribute on the cell
669 	 * renderer. This is used primarily by the GtkTreeView.
670 	 * Params:
671 	 * treeModel = The GtkTreeModel to to get the cell renderers attributes from.
672 	 * iter = The GtkTreeIter to to get the cell renderer's attributes from.
673 	 * isExpander = TRUE, if the row has children
674 	 * isExpanded = TRUE, if the row has visible children
675 	 */
676 	public void cellSetCellData(TreeModelIF treeModel, TreeIter iter, int isExpander, int isExpanded)
677 	{
678 		// void gtk_tree_view_column_cell_set_cell_data  (GtkTreeViewColumn *tree_column,  GtkTreeModel *tree_model,  GtkTreeIter *iter,  gboolean is_expander,  gboolean is_expanded);
679 		gtk_tree_view_column_cell_set_cell_data(gtkTreeViewColumn, (treeModel is null) ? null : treeModel.getTreeModelTStruct(), (iter is null) ? null : iter.getTreeIterStruct(), isExpander, isExpanded);
680 	}
681 	
682 	/**
683 	 * Obtains the width and height needed to render the column. This is used
684 	 * primarily by the GtkTreeView.
685 	 * Params:
686 	 * cellArea = The area a cell in the column will be allocated, or NULL. [allow-none]
687 	 * xOffset = location to return x offset of a cell relative to cell_area, or NULL. [out][allow-none]
688 	 * yOffset = location to return y offset of a cell relative to cell_area, or NULL. [out][allow-none]
689 	 * width = location to return width needed to render a cell, or NULL. [out][allow-none]
690 	 * height = location to return height needed to render a cell, or NULL. [out][allow-none]
691 	 */
692 	public void cellGetSize(Rectangle cellArea, out int xOffset, out int yOffset, out int width, out int height)
693 	{
694 		// void gtk_tree_view_column_cell_get_size (GtkTreeViewColumn *tree_column,  const GdkRectangle *cell_area,  gint *x_offset,  gint *y_offset,  gint *width,  gint *height);
695 		gtk_tree_view_column_cell_get_size(gtkTreeViewColumn, (cellArea is null) ? null : cellArea.getRectangleStruct(), &xOffset, &yOffset, &width, &height);
696 	}
697 	
698 	/**
699 	 * Obtains the horizontal position and size of a cell in a column. If the
700 	 * cell is not found in the column, start_pos and width are not changed and
701 	 * FALSE is returned.
702 	 * Params:
703 	 * cellRenderer = a GtkCellRenderer
704 	 * startPos = return location for the horizontal position of cell within
705 	 * tree_column, may be NULL
706 	 * width = return location for the width of cell, may be NULL
707 	 * Returns: TRUE if cell belongs to tree_column.
708 	 */
709 	public int cellGetPosition(CellRenderer cellRenderer, out int startPos, out int width)
710 	{
711 		// gboolean gtk_tree_view_column_cell_get_position  (GtkTreeViewColumn *tree_column,  GtkCellRenderer *cell_renderer,  gint *start_pos,  gint *width);
712 		return gtk_tree_view_column_cell_get_position(gtkTreeViewColumn, (cellRenderer is null) ? null : cellRenderer.getCellRendererStruct(), &startPos, &width);
713 	}
714 	
715 	/**
716 	 * Returns TRUE if any of the cells packed into the tree_column are visible.
717 	 * For this to be meaningful, you must first initialize the cells with
718 	 * gtk_tree_view_column_cell_set_cell_data()
719 	 * Returns: TRUE, if any of the cells packed into the tree_column are currently visible
720 	 */
721 	public int cellIsVisible()
722 	{
723 		// gboolean gtk_tree_view_column_cell_is_visible  (GtkTreeViewColumn *tree_column);
724 		return gtk_tree_view_column_cell_is_visible(gtkTreeViewColumn);
725 	}
726 	
727 	/**
728 	 * Sets the current keyboard focus to be at cell, if the column contains
729 	 * 2 or more editable and activatable cells.
730 	 * Since 2.2
731 	 * Params:
732 	 * cell = A GtkCellRenderer
733 	 */
734 	public void focusCell(CellRenderer cell)
735 	{
736 		// void gtk_tree_view_column_focus_cell (GtkTreeViewColumn *tree_column,  GtkCellRenderer *cell);
737 		gtk_tree_view_column_focus_cell(gtkTreeViewColumn, (cell is null) ? null : cell.getCellRendererStruct());
738 	}
739 	
740 	/**
741 	 * Flags the column, and the cell renderers added to this column, to have
742 	 * their sizes renegotiated.
743 	 * Since 2.8
744 	 */
745 	public void queueResize()
746 	{
747 		// void gtk_tree_view_column_queue_resize (GtkTreeViewColumn *tree_column);
748 		gtk_tree_view_column_queue_resize(gtkTreeViewColumn);
749 	}
750 	
751 	/**
752 	 * Returns the GtkTreeView wherein tree_column has been inserted.
753 	 * If column is currently not inserted in any tree view, NULL is
754 	 * returned.
755 	 * Since 2.12
756 	 * Returns: The tree view wherein column has been inserted if any, NULL otherwise. [transfer none]
757 	 */
758 	public Widget getTreeView()
759 	{
760 		// GtkWidget * gtk_tree_view_column_get_tree_view (GtkTreeViewColumn *tree_column);
761 		auto p = gtk_tree_view_column_get_tree_view(gtkTreeViewColumn);
762 		
763 		if(p is null)
764 		{
765 			return null;
766 		}
767 		
768 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
769 	}
770 }