2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
58 module gtk
.ComboBoxEntry
;
64 import tango
.io
.Stdout
; // use the tango loging?
68 private import gtkc
.gtktypes
;
70 private import gtkc
.gtk
;
73 private import gtk
.TreeModel
;
74 private import glib
.Str
;
75 private import gtk
.CellRenderer
;
76 private import gtk
.CellLayoutIF
;
77 private import gtk
.CellLayoutT
;
84 * A GtkComboBoxEntry is a widget that allows the user to choose from a
85 * list of valid choices or enter a different value. It is very similar
86 * to a GtkComboBox, but it displays the selected value in an entry to
88 * In contrast to a GtkComboBox, the underlying model of a GtkComboBoxEntry
89 * must always have a text column (see gtk_combo_box_entry_set_text_column()),
90 * and the entry will show the content of the text column in the selected row. To
91 * get the text from the entry, use gtk_combo_box_get_active_text().
92 * The changed signal will be emitted while typing into a GtkComboBoxEntry,
93 * as well as when selecting an item from the GtkComboBoxEntry's list. Use
94 * gtk_combo_box_get_active() or gtk_combo_box_get_active_iter() to discover
95 * whether an item was actually selected from the list.
96 * Connect to the activate signal of the GtkEntry (use gtk_bin_get_child()) to
97 * detect when the user actually finishes entering text.
98 * The convenience API to construct simple text-only GtkComboBoxes can
99 * also be used with GtkComboBoxEntrys which have been constructed
100 * with gtk_combo_box_entry_new_text().
102 private import gtk
.ComboBox
;
103 public class ComboBoxEntry
: ComboBox
, CellLayoutIF
106 /** the main Gtk struct */
107 protected GtkComboBoxEntry
* gtkComboBoxEntry
;
110 public GtkComboBoxEntry
* getComboBoxEntryStruct()
112 return gtkComboBoxEntry
;
116 /** the main Gtk struct as a void* */
117 protected void* getStruct()
119 return cast(void*)gtkComboBoxEntry
;
123 * Sets our main struct and passes it to the parent class
125 public this (GtkComboBoxEntry
* gtkComboBoxEntry
)
129 if ( gtkComboBoxEntry
is null )
134 Stdout("struct gtkComboBoxEntry is null on constructor").newline
;
138 printf("struct gtkComboBoxEntry is null on constructor");
145 assert(gtkComboBoxEntry
!is null, "struct gtkComboBoxEntry is null on constructor");
147 super(cast(GtkComboBox
*)gtkComboBoxEntry
);
148 this.gtkComboBoxEntry
= gtkComboBoxEntry
;
151 mixin CellLayoutT
!(GtkComboBoxEntry
);
153 * Creates a new GtkComboBoxEntry which has a GtkEntry as child. After
154 * construction, you should set a model using gtk_combo_box_set_model() and a
155 * text_column * using gtk_combo_box_entry_set_text_column().
157 * A new GtkComboBoxEntry.
160 public this (bool text
=true)
164 // GtkWidget* gtk_combo_box_entry_new_text (void);
165 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new_text() );
169 // GtkWidget* gtk_combo_box_entry_new (void);
170 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new() );
181 * Creates a new GtkComboBoxEntry which has a GtkEntry as child and a list
182 * of strings as popup. You can get the GtkEntry from a GtkComboBoxEntry
183 * using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and remove
184 * strings from the list, just modify model using its data manipulation
189 * A column in model to get the strings from.
191 * A new GtkComboBoxEntry.
194 public this (TreeModel model
, int textColumn
)
196 // GtkWidget* gtk_combo_box_entry_new_with_model (GtkTreeModel *model, gint text_column);
197 this(cast(GtkComboBoxEntry
*)gtk_combo_box_entry_new_with_model((model
is null) ?
null : model
.getTreeModelStruct(), textColumn
) );
202 * Sets the model column which entry_box should use to get strings from
205 * A GtkComboBoxEntry.
207 * A column in model to get the strings from.
210 public void setTextColumn(int textColumn
)
212 // void gtk_combo_box_entry_set_text_column (GtkComboBoxEntry *entry_box, gint text_column);
213 gtk_combo_box_entry_set_text_column(gtkComboBoxEntry
, textColumn
);
217 * Returns the column which entry_box is using to get the strings from.
219 * A GtkComboBoxEntry.
221 * A column in the data source model of entry_box.
224 * The "text-column" property
225 * "text-column" gint : Read / Write
226 * A column in the data source model to get the strings from.
227 * Allowed values: >= -1
232 public int getTextColumn()
234 // gint gtk_combo_box_entry_get_text_column (GtkComboBoxEntry *entry_box);
235 return gtk_combo_box_entry_get_text_column(gtkComboBoxEntry
);