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 = GtkComboBoxEntry.html
27 * outFile = ComboBoxEntry
28 * strct = GtkComboBoxEntry
31 * clss = ComboBoxEntry
40 * - gtk_combo_box_entry_
44 * - gtk_combo_box_entry_new
45 * - gtk_combo_box_entry_new_text
53 * - GtkTreeModel* -> TreeModel
57 module gtk
.ComboBoxEntry
;
59 private import gtk
.gtktypes
;
61 private import lib
.gtk
;
63 private import gtk
.TreeModel
;
64 private import glib
.Str
;
65 private import gtk
.CellRenderer
;
66 private import gtk
.CellLayoutIF
;
67 private import gtk
.CellLayoutT
;
71 * A GtkComboBoxEntry is a widget that allows the user to choose from a
72 * list of valid choices or enter a different value. It is very similar
73 * to a GtkComboBox, but it displays the selected value in an entry to
75 * In contrast to a GtkComboBox, the underlying model of a GtkComboBoxEntry
76 * must always have a text column (see gtk_combo_box_entry_set_text_column()),
77 * and the entry will show the content of the text column in the selected row. To
78 * get the text from the entry, use gtk_combo_box_get_active_text().
79 * The changed signal will be emitted while typing into a GtkComboBoxEntry,
80 * as well as when selecting an item from the GtkComboBoxEntry's list. Use
81 * gtk_combo_box_get_active() or gtk_combo_box_get_active_iter() to discover
82 * whether an item was actually selected from the list.
83 * Connect to the activate signal of the GtkEntry (use gtk_bin_get_child()) to
84 * detect when the user actually finishes entering text.
85 * The convenience API to construct simple text-only GtkComboBoxes can
86 * also be used with GtkComboBoxEntrys which have been constructed
87 * with gtk_combo_box_entry_new_text().
89 private import gtk
.ComboBox
;
90 public class ComboBoxEntry
: ComboBox
, CellLayoutIF
93 /** the main Gtk struct */
94 protected GtkComboBoxEntry
* gtkComboBoxEntry
;
97 public GtkComboBoxEntry
* getComboBoxEntryStruct()
99 return gtkComboBoxEntry
;
103 /** the main Gtk struct as a void* */
104 protected void* getStruct()
106 return cast(void*)gtkComboBoxEntry
;
110 * Sets our main struct and passes it to the parent class
112 public this (GtkComboBoxEntry
* gtkComboBoxEntry
)
114 super(cast(GtkComboBox
*)gtkComboBoxEntry
);
115 this.gtkComboBoxEntry
= gtkComboBoxEntry
;
118 mixin CellLayoutT
!(GtkComboBoxEntry
);
120 * Creates a new GtkComboBoxEntry which has a GtkEntry as child. After
121 * construction, you should set a model using gtk_combo_box_set_model() and a
122 * text_column * using gtk_combo_box_entry_set_text_column().
124 * A new GtkComboBoxEntry.
127 public this (bit text
=true)
131 // GtkWidget* gtk_combo_box_entry_new_text (void);
132 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new_text() );
136 // GtkWidget* gtk_combo_box_entry_new (void);
137 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new() );
148 * Creates a new GtkComboBoxEntry which has a GtkEntry as child and a list
149 * of strings as popup. You can get the GtkEntry from a GtkComboBoxEntry
150 * using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and remove
151 * strings from the list, just modify model using its data manipulation
156 * A column in model to get the strings from.
158 * A new GtkComboBoxEntry.
161 public this (TreeModel model
, int textColumn
)
163 // GtkWidget* gtk_combo_box_entry_new_with_model (GtkTreeModel *model, gint text_column);
164 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new_with_model((model
is null) ?
null : model
.getTreeModelStruct(), textColumn
) );
169 * Sets the model column which entry_box should use to get strings from
172 * A GtkComboBoxEntry.
174 * A column in model to get the strings from.
177 public void setTextColumn(int textColumn
)
179 // void gtk_combo_box_entry_set_text_column (GtkComboBoxEntry *entry_box, gint text_column);
180 gtk_combo_box_entry_set_text_column(gtkComboBoxEntry
, textColumn
);
184 * Returns the column which entry_box is using to get the strings from.
186 * A GtkComboBoxEntry.
188 * A column in the data source model of entry_box.
191 * The "text-column" property
192 * "text-column" gint : Read / Write
193 * A column in the data source model to get the strings from.
194 * Allowed values: >= -1
199 public int getTextColumn()
201 // gint gtk_combo_box_entry_get_text_column (GtkComboBoxEntry *entry_box);
202 return gtk_combo_box_entry_get_text_column(gtkComboBoxEntry
);