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  = GtkComboBox.html
27  * outPack = gtk
28  * outFile = ComboBox
29  * strct   = GtkComboBox
30  * realStrct=
31  * ctorStrct=
32  * clss    = ComboBox
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- CellLayoutIF
40  * 	- CellEditableIF
41  * prefixes:
42  * 	- gtk_combo_box_
43  * omit structs:
44  * omit prefixes:
45  * omit code:
46  * 	- gtk_combo_box_new
47  * 	- gtk_combo_box_new_with_entry
48  * 	- gtk_combo_box_new_with_model
49  * 	- gtk_combo_box_new_with_model_and_entry
50  * 	- gtk_combo_box_new_with_area
51  * 	- gtk_combo_box_new_with_area_and_entry
52  * omit signals:
53  * imports:
54  * 	- atk.ObjectAtk
55  * 	- glib.Str
56  * 	- gdk.Device
57  * 	- gtk.CellArea
58  * 	- gtk.TreeIter
59  * 	- gtk.TreeModel
60  * 	- gtk.TreeModelIF
61  * 	- gtk.CellLayoutIF
62  * 	- gtk.CellLayoutT
63  * 	- gtk.CellEditableT
64  * 	- gtk.CellEditableIF
65  * structWrap:
66  * 	- AtkObject* -> ObjectAtk
67  * 	- GdkDevice* -> Device
68  * 	- GtkCellArea* -> CellArea
69  * 	- GtkTreeIter* -> TreeIter
70  * 	- GtkTreeModel* -> TreeModelIF
71  * module aliases:
72  * local aliases:
73  * overrides:
74  */
75 
76 module gtk.ComboBox;
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 atk.ObjectAtk;
88 private import glib.Str;
89 private import gdk.Device;
90 private import gtk.CellArea;
91 private import gtk.TreeIter;
92 private import gtk.TreeModel;
93 private import gtk.TreeModelIF;
94 private import gtk.CellLayoutIF;
95 private import gtk.CellLayoutT;
96 private import gtk.CellEditableT;
97 private import gtk.CellEditableIF;
98 
99 
100 
101 private import gtk.Bin;
102 
103 /**
104  * A GtkComboBox is a widget that allows the user to choose from a list of
105  * valid choices. The GtkComboBox displays the selected choice. When
106  * activated, the GtkComboBox displays a popup which allows the user to
107  * make a new choice. The style in which the selected value is displayed,
108  * and the style of the popup is determined by the current theme. It may
109  * be similar to a Windows-style combo box.
110  *
111  * The GtkComboBox uses the model-view pattern; the list of valid choices
112  * is specified in the form of a tree model, and the display of the choices
113  * can be adapted to the data in the model by using cell renderers, as you
114  * would in a tree view. This is possible since GtkComboBox implements the
115  * GtkCellLayout interface. The tree model holding the valid choices is
116  * not restricted to a flat list, it can be a real tree, and the popup will
117  * reflect the tree structure.
118  *
119  * To allow the user to enter values not in the model, the 'has-entry'
120  * property allows the GtkComboBox to contain a GtkEntry. This entry
121  * can be accessed by calling gtk_bin_get_child() on the combo box.
122  *
123  * For a simple list of textual choices, the model-view API of GtkComboBox
124  * can be a bit overwhelming. In this case, GtkComboBoxText offers a
125  * simple alternative. Both GtkComboBox and GtkComboBoxText can contain
126  * an entry.
127  */
128 public class ComboBox : Bin, CellLayoutIF, CellEditableIF
129 {
130 	
131 	/** the main Gtk struct */
132 	protected GtkComboBox* gtkComboBox;
133 	
134 	
135 	public GtkComboBox* getComboBoxStruct()
136 	{
137 		return gtkComboBox;
138 	}
139 	
140 	
141 	/** the main Gtk struct as a void* */
142 	protected override void* getStruct()
143 	{
144 		return cast(void*)gtkComboBox;
145 	}
146 	
147 	/**
148 	 * Sets our main struct and passes it to the parent class
149 	 */
150 	public this (GtkComboBox* gtkComboBox)
151 	{
152 		super(cast(GtkBin*)gtkComboBox);
153 		this.gtkComboBox = gtkComboBox;
154 	}
155 	
156 	protected override void setStruct(GObject* obj)
157 	{
158 		super.setStruct(obj);
159 		gtkComboBox = cast(GtkComboBox*)obj;
160 	}
161 	
162 	// add the CellLayout capabilities
163 	mixin CellLayoutT!(GtkComboBox);
164 	
165 	// add the CellEditable capabilities
166 	mixin CellEditableT!(GtkComboBox);
167 	
168 	/**
169 	 * Creates a new empty GtkComboBox.
170 	 * Params:
171 	 *   entry = If true, create an empty ComboBox with an entry.
172 	 * Throws: ConstructionException GTK+ fails to create the object.
173 	 */
174 	public this (bool entry=true)
175 	{
176 		GtkComboBox* p;
177 		if ( entry )
178 		{
179 			// GtkWidget* gtk_combo_box_new_text (void);
180 			p = cast(GtkComboBox*)gtk_combo_box_new_with_entry();
181 		}
182 		else
183 		{
184 			// GtkWidget* gtk_combo_box_new (void);
185 			p = cast(GtkComboBox*)gtk_combo_box_new();
186 		}
187 		
188 		if(p is null)
189 		{
190 			throw new ConstructionException("null returned by gtk_combo_box_new");
191 		}
192 		
193 		this(p);
194 	}
195 	
196 	/**
197 	 * Creates a new GtkComboBox with the model initialized to model.
198 	 * Params:
199 	 *   model = A GtkTreeModel.
200 	 *   entry = If true, create an empty ComboBox with an entry.
201 	 * Throws: ConstructionException GTK+ fails to create the object.
202 	 */
203 	public this (TreeModelIF model, bool entry=true)
204 	{
205 		GtkComboBox* p;
206 		if ( entry )
207 		{
208 			// GtkWidget* gtk_combo_box_new_with_model_and_entry (GtkTreeModel *model);
209 			p = cast(GtkComboBox*)gtk_combo_box_new_with_model_and_entry((model is null) ? null : model.getTreeModelTStruct());
210 		}
211 		else
212 		{
213 			// GtkWidget* gtk_combo_box_new_with_model (GtkTreeModel *model);
214 			p = cast(GtkComboBox*)gtk_combo_box_new_with_model((model is null) ? null : model.getTreeModelTStruct());
215 		}
216 		
217 		if(p is null)
218 		{
219 			throw new ConstructionException("null returned by gtk_combo_box_new");
220 		}
221 		
222 		this(p);
223 	}
224 	
225 	/**
226 	 * Creates a new empty GtkComboBox using area to layout cells.
227 	 * Params:
228 	 *   area = the GtkCellArea to use to layout cell renderers.
229 	 *   entry = If true, create an empty ComboBox with an entry.
230 	 * Throws: ConstructionException GTK+ fails to create the object.
231 	 */
232 	public this (CellArea area, bool entry=true)
233 	{
234 		GtkComboBox* p;
235 		if ( entry )
236 		{
237 			// GtkWidget* gtk_combo_box_new_with_area_and_entry (GtkCellArea *area);
238 			p = cast(GtkComboBox*)gtk_combo_box_new_with_area_and_entry((area is null) ? null : area.getCellAreaStruct());
239 		}
240 		else
241 		{
242 			// GtkWidget* gtk_combo_box_new_with_area (GtkCellArea* area);
243 			p = cast(GtkComboBox*)gtk_combo_box_new_with_area((area is null) ? null : area.getCellAreaStruct());
244 		}
245 		
246 		if(p is null)
247 		{
248 			throw new ConstructionException("null returned by gtk_combo_box_new");
249 		}
250 		
251 		this(p);
252 	}
253 	
254 	/**
255 	 */
256 	int[string] connectedSignals;
257 	
258 	void delegate(ComboBox)[] onChangedListeners;
259 	/**
260 	 * The changed signal is emitted when the active
261 	 * item is changed. The can be due to the user selecting
262 	 * a different item from the list, or due to a
263 	 * call to gtk_combo_box_set_active_iter().
264 	 * It will also be emitted while typing into the entry of a combo box
265 	 * with an entry.
266 	 * Since 2.4
267 	 */
268 	void addOnChanged(void delegate(ComboBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
269 	{
270 		if ( !("changed" in connectedSignals) )
271 		{
272 			Signals.connectData(
273 			getStruct(),
274 			"changed",
275 			cast(GCallback)&callBackChanged,
276 			cast(void*)this,
277 			null,
278 			connectFlags);
279 			connectedSignals["changed"] = 1;
280 		}
281 		onChangedListeners ~= dlg;
282 	}
283 	extern(C) static void callBackChanged(GtkComboBox* widgetStruct, ComboBox _comboBox)
284 	{
285 		foreach ( void delegate(ComboBox) dlg ; _comboBox.onChangedListeners )
286 		{
287 			dlg(_comboBox);
288 		}
289 	}
290 	
291 	string delegate(string, ComboBox)[] onFormatEntryTextListeners;
292 	/**
293 	 * For combo boxes that are created with an entry (See GtkComboBox:has-entry).
294 	 * A signal which allows you to change how the text displayed in a combo box's
295 	 * entry is displayed.
296 	 * Connect a signal handler which returns an allocated string representing
297 	 * path. That string will then be used to set the text in the combo box's entry.
298 	 * The default signal handler uses the text from the GtkComboBox::entry-text-column
299 	 * model column.
300 	 * Here's an example signal handler which fetches data from the model and
301 	 * displays it in the entry.
302 	 * $(DDOC_COMMENT example)
303 	 * Since 3.4
304 	 */
305 	void addOnFormatEntryText(string delegate(string, ComboBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
306 	{
307 		if ( !("format-entry-text" in connectedSignals) )
308 		{
309 			Signals.connectData(
310 			getStruct(),
311 			"format-entry-text",
312 			cast(GCallback)&callBackFormatEntryText,
313 			cast(void*)this,
314 			null,
315 			connectFlags);
316 			connectedSignals["format-entry-text"] = 1;
317 		}
318 		onFormatEntryTextListeners ~= dlg;
319 	}
320 	extern(C) static void callBackFormatEntryText(GtkComboBox* comboStruct, gchar* path, ComboBox _comboBox)
321 	{
322 		foreach ( string delegate(string, ComboBox) dlg ; _comboBox.onFormatEntryTextListeners )
323 		{
324 			dlg(Str.toString(path), _comboBox);
325 		}
326 	}
327 	
328 	void delegate(GtkScrollType, ComboBox)[] onMoveActiveListeners;
329 	/**
330 	 * The ::move-active signal is a
331 	 * keybinding signal
332 	 * which gets emitted to move the active selection.
333 	 * Since 2.12
334 	 */
335 	void addOnMoveActive(void delegate(GtkScrollType, ComboBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
336 	{
337 		if ( !("move-active" in connectedSignals) )
338 		{
339 			Signals.connectData(
340 			getStruct(),
341 			"move-active",
342 			cast(GCallback)&callBackMoveActive,
343 			cast(void*)this,
344 			null,
345 			connectFlags);
346 			connectedSignals["move-active"] = 1;
347 		}
348 		onMoveActiveListeners ~= dlg;
349 	}
350 	extern(C) static void callBackMoveActive(GtkComboBox* widgetStruct, GtkScrollType scrollType, ComboBox _comboBox)
351 	{
352 		foreach ( void delegate(GtkScrollType, ComboBox) dlg ; _comboBox.onMoveActiveListeners )
353 		{
354 			dlg(scrollType, _comboBox);
355 		}
356 	}
357 	
358 	bool delegate(ComboBox)[] onPopdownListeners;
359 	/**
360 	 * The ::popdown signal is a
361 	 * keybinding signal
362 	 * which gets emitted to popdown the combo box list.
363 	 * The default bindings for this signal are Alt+Up and Escape.
364 	 * Since 2.12
365 	 */
366 	void addOnPopdown(bool delegate(ComboBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
367 	{
368 		if ( !("popdown" in connectedSignals) )
369 		{
370 			Signals.connectData(
371 			getStruct(),
372 			"popdown",
373 			cast(GCallback)&callBackPopdown,
374 			cast(void*)this,
375 			null,
376 			connectFlags);
377 			connectedSignals["popdown"] = 1;
378 		}
379 		onPopdownListeners ~= dlg;
380 	}
381 	extern(C) static gboolean callBackPopdown(GtkComboBox* buttonStruct, ComboBox _comboBox)
382 	{
383 		foreach ( bool delegate(ComboBox) dlg ; _comboBox.onPopdownListeners )
384 		{
385 			if ( dlg(_comboBox) )
386 			{
387 				return 1;
388 			}
389 		}
390 		
391 		return 0;
392 	}
393 	
394 	void delegate(ComboBox)[] onPopupListeners;
395 	/**
396 	 * The ::popup signal is a
397 	 * keybinding signal
398 	 * which gets emitted to popup the combo box list.
399 	 * The default binding for this signal is Alt+Down.
400 	 * Since 2.12
401 	 * See Also
402 	 * GtkComboBoxText, GtkTreeModel, GtkCellRenderer
403 	 */
404 	void addOnPopup(void delegate(ComboBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
405 	{
406 		if ( !("popup" in connectedSignals) )
407 		{
408 			Signals.connectData(
409 			getStruct(),
410 			"popup",
411 			cast(GCallback)&callBackPopup,
412 			cast(void*)this,
413 			null,
414 			connectFlags);
415 			connectedSignals["popup"] = 1;
416 		}
417 		onPopupListeners ~= dlg;
418 	}
419 	extern(C) static void callBackPopup(GtkComboBox* widgetStruct, ComboBox _comboBox)
420 	{
421 		foreach ( void delegate(ComboBox) dlg ; _comboBox.onPopupListeners )
422 		{
423 			dlg(_comboBox);
424 		}
425 	}
426 	
427 	
428 	/**
429 	 * Returns the wrap width which is used to determine the number of columns
430 	 * for the popup menu. If the wrap width is larger than 1, the combo box
431 	 * is in table mode.
432 	 * Since 2.6
433 	 * Returns: the wrap width.
434 	 */
435 	public int getWrapWidth()
436 	{
437 		// gint gtk_combo_box_get_wrap_width (GtkComboBox *combo_box);
438 		return gtk_combo_box_get_wrap_width(gtkComboBox);
439 	}
440 	
441 	/**
442 	 * Sets the wrap width of combo_box to be width. The wrap width is basically
443 	 * the preferred number of columns when you want the popup to be layed out
444 	 * in a table.
445 	 * Since 2.4
446 	 * Params:
447 	 * width = Preferred number of columns
448 	 */
449 	public void setWrapWidth(int width)
450 	{
451 		// void gtk_combo_box_set_wrap_width (GtkComboBox *combo_box,  gint width);
452 		gtk_combo_box_set_wrap_width(gtkComboBox, width);
453 	}
454 	
455 	/**
456 	 * Returns the column with row span information for combo_box.
457 	 * Since 2.6
458 	 * Returns: the row span column.
459 	 */
460 	public int getRowSpanColumn()
461 	{
462 		// gint gtk_combo_box_get_row_span_column (GtkComboBox *combo_box);
463 		return gtk_combo_box_get_row_span_column(gtkComboBox);
464 	}
465 	
466 	/**
467 	 * Sets the column with row span information for combo_box to be row_span.
468 	 * The row span column contains integers which indicate how many rows
469 	 * an item should span.
470 	 * Since 2.4
471 	 * Params:
472 	 * rowSpan = A column in the model passed during construction.
473 	 */
474 	public void setRowSpanColumn(int rowSpan)
475 	{
476 		// void gtk_combo_box_set_row_span_column (GtkComboBox *combo_box,  gint row_span);
477 		gtk_combo_box_set_row_span_column(gtkComboBox, rowSpan);
478 	}
479 	
480 	/**
481 	 * Returns the column with column span information for combo_box.
482 	 * Since 2.6
483 	 * Returns: the column span column.
484 	 */
485 	public int getColumnSpanColumn()
486 	{
487 		// gint gtk_combo_box_get_column_span_column  (GtkComboBox *combo_box);
488 		return gtk_combo_box_get_column_span_column(gtkComboBox);
489 	}
490 	
491 	/**
492 	 * Sets the column with column span information for combo_box to be
493 	 * column_span. The column span column contains integers which indicate
494 	 * how many columns an item should span.
495 	 * Since 2.4
496 	 * Params:
497 	 * columnSpan = A column in the model passed during construction
498 	 */
499 	public void setColumnSpanColumn(int columnSpan)
500 	{
501 		// void gtk_combo_box_set_column_span_column  (GtkComboBox *combo_box,  gint column_span);
502 		gtk_combo_box_set_column_span_column(gtkComboBox, columnSpan);
503 	}
504 	
505 	/**
506 	 * Returns the index of the currently active item, or -1 if there's no
507 	 * active item. If the model is a non-flat treemodel, and the active item
508 	 * is not an immediate child of the root of the tree, this function returns
509 	 * gtk_tree_path_get_indices (path)[0], where
510 	 * path is the GtkTreePath of the active item.
511 	 * Since 2.4
512 	 * Returns: An integer which is the index of the currently active item, or -1 if there's no active item.
513 	 */
514 	public int getActive()
515 	{
516 		// gint gtk_combo_box_get_active (GtkComboBox *combo_box);
517 		return gtk_combo_box_get_active(gtkComboBox);
518 	}
519 	
520 	/**
521 	 * Sets the active item of combo_box to be the item at index.
522 	 * Since 2.4
523 	 * Params:
524 	 * index = An index in the model passed during construction, or -1 to have
525 	 * no active item
526 	 */
527 	public void setActive(int index)
528 	{
529 		// void gtk_combo_box_set_active (GtkComboBox *combo_box,  gint index_);
530 		gtk_combo_box_set_active(gtkComboBox, index);
531 	}
532 	
533 	/**
534 	 * Sets iter to point to the current active item, if it exists.
535 	 * Since 2.4
536 	 * Params:
537 	 * iter = The uninitialized GtkTreeIter. [out]
538 	 * Returns: TRUE, if iter was set
539 	 */
540 	public int getActiveIter(TreeIter iter)
541 	{
542 		// gboolean gtk_combo_box_get_active_iter (GtkComboBox *combo_box,  GtkTreeIter *iter);
543 		return gtk_combo_box_get_active_iter(gtkComboBox, (iter is null) ? null : iter.getTreeIterStruct());
544 	}
545 	
546 	/**
547 	 * Sets the current active item to be the one referenced by iter, or
548 	 * unsets the active item if iter is NULL.
549 	 * Since 2.4
550 	 * Params:
551 	 * iter = The GtkTreeIter, or NULL. [allow-none]
552 	 */
553 	public void setActiveIter(TreeIter iter)
554 	{
555 		// void gtk_combo_box_set_active_iter (GtkComboBox *combo_box,  GtkTreeIter *iter);
556 		gtk_combo_box_set_active_iter(gtkComboBox, (iter is null) ? null : iter.getTreeIterStruct());
557 	}
558 	
559 	/**
560 	 * Returns the column which combo_box is using to get string IDs
561 	 * for values from.
562 	 * Returns: A column in the data source model of combo_box. Since 3.0
563 	 */
564 	public int getIdColumn()
565 	{
566 		// gint gtk_combo_box_get_id_column (GtkComboBox *combo_box);
567 		return gtk_combo_box_get_id_column(gtkComboBox);
568 	}
569 	
570 	/**
571 	 * Sets the model column which combo_box should use to get string IDs
572 	 * for values from. The column id_column in the model of combo_box
573 	 * must be of type G_TYPE_STRING.
574 	 * Params:
575 	 * idColumn = A column in model to get string IDs for values from
576 	 * Since 3.0
577 	 */
578 	public void setIdColumn(int idColumn)
579 	{
580 		// void gtk_combo_box_set_id_column (GtkComboBox *combo_box,  gint id_column);
581 		gtk_combo_box_set_id_column(gtkComboBox, idColumn);
582 	}
583 	
584 	/**
585 	 * Returns the ID of the active row of combo_box. This value is taken
586 	 * from the active row and the column specified by the "id-column"
587 	 * property of combo_box (see gtk_combo_box_set_id_column()).
588 	 * The returned value is an interned string which means that you can
589 	 * compare the pointer by value to other interned strings and that you
590 	 * must not free it.
591 	 * If the "id-column" property of combo_box is not set, or if
592 	 * no row is active, or if the active row has a NULL ID value, then NULL
593 	 * is returned.
594 	 * Returns: the ID of the active row, or NULL Since 3.0
595 	 */
596 	public string getActiveId()
597 	{
598 		// const gchar * gtk_combo_box_get_active_id (GtkComboBox *combo_box);
599 		return Str.toString(gtk_combo_box_get_active_id(gtkComboBox));
600 	}
601 	
602 	/**
603 	 * Changes the active row of combo_box to the one that has an ID equal to
604 	 * active_id, or unsets the active row if active_id is NULL. Rows having
605 	 * a NULL ID string cannot be made active by this function.
606 	 * If the "id-column" property of combo_box is unset or if no
607 	 * row has the given ID then the function does nothing and returns FALSE.
608 	 * Params:
609 	 * activeId = the ID of the row to select, or NULL. [allow-none]
610 	 * Returns: TRUE if a row with a matching ID was found. If a NULL active_id was given to unset the active row, the function always returns TRUE. Since 3.0
611 	 */
612 	public int setActiveId(string activeId)
613 	{
614 		// gboolean gtk_combo_box_set_active_id (GtkComboBox *combo_box,  const gchar *active_id);
615 		return gtk_combo_box_set_active_id(gtkComboBox, Str.toStringz(activeId));
616 	}
617 	
618 	/**
619 	 * Returns the GtkTreeModel which is acting as data source for combo_box.
620 	 * Since 2.4
621 	 * Returns: A GtkTreeModel which was passed during construction. [transfer none]
622 	 */
623 	public TreeModelIF getModel()
624 	{
625 		// GtkTreeModel * gtk_combo_box_get_model (GtkComboBox *combo_box);
626 		auto p = gtk_combo_box_get_model(gtkComboBox);
627 		
628 		if(p is null)
629 		{
630 			return null;
631 		}
632 		
633 		return ObjectG.getDObject!(TreeModel, TreeModelIF)(cast(GtkTreeModel*) p);
634 	}
635 	
636 	/**
637 	 * Sets the model used by combo_box to be model. Will unset a previously set
638 	 * model (if applicable). If model is NULL, then it will unset the model.
639 	 * Note that this function does not clear the cell renderers, you have to
640 	 * call gtk_cell_layout_clear() yourself if you need to set up different
641 	 * cell renderers for the new model.
642 	 * Since 2.4
643 	 * Params:
644 	 * model = A GtkTreeModel. [allow-none]
645 	 */
646 	public void setModel(TreeModelIF model)
647 	{
648 		// void gtk_combo_box_set_model (GtkComboBox *combo_box,  GtkTreeModel *model);
649 		gtk_combo_box_set_model(gtkComboBox, (model is null) ? null : model.getTreeModelTStruct());
650 	}
651 	
652 	/**
653 	 * Pops up the menu or dropdown list of combo_box, the popup window
654 	 * will be grabbed so only device and its associated pointer/keyboard
655 	 * are the only GdkDevices able to send events to it.
656 	 * Params:
657 	 * device = a GdkDevice
658 	 * Since 3.0
659 	 */
660 	public void popupForDevice(Device device)
661 	{
662 		// void gtk_combo_box_popup_for_device (GtkComboBox *combo_box,  GdkDevice *device);
663 		gtk_combo_box_popup_for_device(gtkComboBox, (device is null) ? null : device.getDeviceStruct());
664 	}
665 	
666 	/**
667 	 * Pops up the menu or dropdown list of combo_box.
668 	 * This function is mostly intended for use by accessibility technologies;
669 	 * applications should have little use for it.
670 	 * Since 2.4
671 	 */
672 	public void popup()
673 	{
674 		// void gtk_combo_box_popup (GtkComboBox *combo_box);
675 		gtk_combo_box_popup(gtkComboBox);
676 	}
677 	
678 	/**
679 	 * Hides the menu or dropdown list of combo_box.
680 	 * This function is mostly intended for use by accessibility technologies;
681 	 * applications should have little use for it.
682 	 * Since 2.4
683 	 */
684 	public void popdown()
685 	{
686 		// void gtk_combo_box_popdown (GtkComboBox *combo_box);
687 		gtk_combo_box_popdown(gtkComboBox);
688 	}
689 	
690 	/**
691 	 * Gets the accessible object corresponding to the combo box's popup.
692 	 * This function is mostly intended for use by accessibility technologies;
693 	 * applications should have little use for it.
694 	 * Since 2.6
695 	 * Returns: the accessible object corresponding to the combo box's popup. [transfer none]
696 	 */
697 	public ObjectAtk getPopupAccessible()
698 	{
699 		// AtkObject * gtk_combo_box_get_popup_accessible (GtkComboBox *combo_box);
700 		auto p = gtk_combo_box_get_popup_accessible(gtkComboBox);
701 		
702 		if(p is null)
703 		{
704 			return null;
705 		}
706 		
707 		return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p);
708 	}
709 	
710 	/**
711 	 * Returns the current row separator function.
712 	 * Since 2.6
713 	 * Returns: the current row separator function.
714 	 */
715 	public GtkTreeViewRowSeparatorFunc getRowSeparatorFunc()
716 	{
717 		// GtkTreeViewRowSeparatorFunc gtk_combo_box_get_row_separator_func  (GtkComboBox *combo_box);
718 		return gtk_combo_box_get_row_separator_func(gtkComboBox);
719 	}
720 	
721 	/**
722 	 * Sets the row separator function, which is used to determine
723 	 * whether a row should be drawn as a separator. If the row separator
724 	 * function is NULL, no separators are drawn. This is the default value.
725 	 * Since 2.6
726 	 * Params:
727 	 * func = a GtkTreeViewRowSeparatorFunc
728 	 * data = user data to pass to func, or NULL. [allow-none]
729 	 * destroy = destroy notifier for data, or NULL. [allow-none]
730 	 */
731 	public void setRowSeparatorFunc(GtkTreeViewRowSeparatorFunc func, void* data, GDestroyNotify destroy)
732 	{
733 		// void gtk_combo_box_set_row_separator_func  (GtkComboBox *combo_box,  GtkTreeViewRowSeparatorFunc func,  gpointer data,  GDestroyNotify destroy);
734 		gtk_combo_box_set_row_separator_func(gtkComboBox, func, data, destroy);
735 	}
736 	
737 	/**
738 	 * Warning
739 	 * gtk_combo_box_set_add_tearoffs is deprecated and should not be used in newly-written code. 3.10
740 	 * Sets whether the popup menu should have a tearoff
741 	 * menu item.
742 	 * Since 2.6
743 	 * Params:
744 	 * addTearoffs = TRUE to add tearoff menu items
745 	 */
746 	public void setAddTearoffs(int addTearoffs)
747 	{
748 		// void gtk_combo_box_set_add_tearoffs (GtkComboBox *combo_box,  gboolean add_tearoffs);
749 		gtk_combo_box_set_add_tearoffs(gtkComboBox, addTearoffs);
750 	}
751 	
752 	/**
753 	 * Warning
754 	 * gtk_combo_box_get_add_tearoffs is deprecated and should not be used in newly-written code. 3.10
755 	 * Gets the current value of the :add-tearoffs property.
756 	 * Returns: the current value of the :add-tearoffs property.
757 	 */
758 	public int getAddTearoffs()
759 	{
760 		// gboolean gtk_combo_box_get_add_tearoffs (GtkComboBox *combo_box);
761 		return gtk_combo_box_get_add_tearoffs(gtkComboBox);
762 	}
763 	
764 	/**
765 	 * Warning
766 	 * gtk_combo_box_set_title is deprecated and should not be used in newly-written code. 3.10
767 	 * Sets the menu's title in tearoff mode.
768 	 * Since 2.10
769 	 * Params:
770 	 * title = a title for the menu in tearoff mode
771 	 */
772 	public void setTitle(string title)
773 	{
774 		// void gtk_combo_box_set_title (GtkComboBox *combo_box,  const gchar *title);
775 		gtk_combo_box_set_title(gtkComboBox, Str.toStringz(title));
776 	}
777 	
778 	/**
779 	 * Warning
780 	 * gtk_combo_box_get_title is deprecated and should not be used in newly-written code. 3.10
781 	 * Gets the current title of the menu in tearoff mode. See
782 	 * gtk_combo_box_set_add_tearoffs().
783 	 * Since 2.10
784 	 * Returns: the menu's title in tearoff mode. This is an internal copy of the string which must not be freed.
785 	 */
786 	public string getTitle()
787 	{
788 		// const gchar * gtk_combo_box_get_title (GtkComboBox *combo_box);
789 		return Str.toString(gtk_combo_box_get_title(gtkComboBox));
790 	}
791 	
792 	/**
793 	 * Sets whether the combo box will grab focus when it is clicked with
794 	 * the mouse. Making mouse clicks not grab focus is useful in places
795 	 * like toolbars where you don't want the keyboard focus removed from
796 	 * the main area of the application.
797 	 * Since 2.6
798 	 * Params:
799 	 * focusOnClick = whether the combo box grabs focus when clicked
800 	 * with the mouse
801 	 */
802 	public void setFocusOnClick(int focusOnClick)
803 	{
804 		// void gtk_combo_box_set_focus_on_click (GtkComboBox *combo,  gboolean focus_on_click);
805 		gtk_combo_box_set_focus_on_click(gtkComboBox, focusOnClick);
806 	}
807 	
808 	/**
809 	 * Returns whether the combo box grabs focus when it is clicked
810 	 * with the mouse. See gtk_combo_box_set_focus_on_click().
811 	 * Since 2.6
812 	 * Returns: TRUE if the combo box grabs focus when it is clicked with the mouse.
813 	 */
814 	public int getFocusOnClick()
815 	{
816 		// gboolean gtk_combo_box_get_focus_on_click (GtkComboBox *combo);
817 		return gtk_combo_box_get_focus_on_click(gtkComboBox);
818 	}
819 	
820 	/**
821 	 * Sets whether the dropdown button of the combo box should be
822 	 * always sensitive (GTK_SENSITIVITY_ON), never sensitive (GTK_SENSITIVITY_OFF)
823 	 * or only if there is at least one item to display (GTK_SENSITIVITY_AUTO).
824 	 * Since 2.14
825 	 * Params:
826 	 * sensitivity = specify the sensitivity of the dropdown button
827 	 */
828 	public void setButtonSensitivity(GtkSensitivityType sensitivity)
829 	{
830 		// void gtk_combo_box_set_button_sensitivity  (GtkComboBox *combo_box,  GtkSensitivityType sensitivity);
831 		gtk_combo_box_set_button_sensitivity(gtkComboBox, sensitivity);
832 	}
833 	
834 	/**
835 	 * Returns whether the combo box sets the dropdown button
836 	 * sensitive or not when there are no items in the model.
837 	 * Since 2.14
838 	 * Returns: GTK_SENSITIVITY_ON if the dropdown button is sensitive when the model is empty, GTK_SENSITIVITY_OFF if the button is always insensitive or GTK_SENSITIVITY_AUTO if it is only sensitive as long as the model has one item to be selected.
839 	 */
840 	public GtkSensitivityType getButtonSensitivity()
841 	{
842 		// GtkSensitivityType gtk_combo_box_get_button_sensitivity  (GtkComboBox *combo_box);
843 		return gtk_combo_box_get_button_sensitivity(gtkComboBox);
844 	}
845 	
846 	/**
847 	 * Returns whether the combo box has an entry.
848 	 * Since 2.24
849 	 * Returns: whether there is an entry in combo_box.
850 	 */
851 	public int getHasEntry()
852 	{
853 		// gboolean gtk_combo_box_get_has_entry (GtkComboBox *combo_box);
854 		return gtk_combo_box_get_has_entry(gtkComboBox);
855 	}
856 	
857 	/**
858 	 * Sets the model column which combo_box should use to get strings from
859 	 * to be text_column. The column text_column in the model of combo_box
860 	 * must be of type G_TYPE_STRING.
861 	 * This is only relevant if combo_box has been created with
862 	 * "has-entry" as TRUE.
863 	 * Since 2.24
864 	 * Params:
865 	 * textColumn = A column in model to get the strings from for
866 	 * the internal entry
867 	 */
868 	public void setEntryTextColumn(int textColumn)
869 	{
870 		// void gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,  gint text_column);
871 		gtk_combo_box_set_entry_text_column(gtkComboBox, textColumn);
872 	}
873 	
874 	/**
875 	 * Returns the column which combo_box is using to get the strings
876 	 * from to display in the internal entry.
877 	 * Since 2.24
878 	 * Returns: A column in the data source model of combo_box.
879 	 */
880 	public int getEntryTextColumn()
881 	{
882 		// gint gtk_combo_box_get_entry_text_column (GtkComboBox *combo_box);
883 		return gtk_combo_box_get_entry_text_column(gtkComboBox);
884 	}
885 	
886 	/**
887 	 * Specifies whether the popup's width should be a fixed width
888 	 * matching the allocated width of the combo box.
889 	 * Params:
890 	 * fixed = whether to use a fixed popup width
891 	 * Since 3.0
892 	 */
893 	public void setPopupFixedWidth(int fixed)
894 	{
895 		// void gtk_combo_box_set_popup_fixed_width (GtkComboBox *combo_box,  gboolean fixed);
896 		gtk_combo_box_set_popup_fixed_width(gtkComboBox, fixed);
897 	}
898 	
899 	/**
900 	 * Gets whether the popup uses a fixed width matching
901 	 * the allocated width of the combo box.
902 	 * Returns: TRUE if the popup uses a fixed width Since 3.0
903 	 */
904 	public int getPopupFixedWidth()
905 	{
906 		// gboolean gtk_combo_box_get_popup_fixed_width (GtkComboBox *combo_box);
907 		return gtk_combo_box_get_popup_fixed_width(gtkComboBox);
908 	}
909 }