1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>GimpIntComboBox</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="GIMP Widgets Library Reference Manual"><link rel="up" href="libgimpwidgets-widgets.html" title="PartI.GIMP Widgets"><link rel="prev" href="GimpFrame.html" title="GimpFrame"><link rel="next" href="GimpIntStore.html" title="GimpIntStore"><meta name="generator" content="GTK-Doc V1.3 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="part" href="libgimpwidgets-widgets.html" title="PartI.GIMP Widgets"><link rel="chapter" href="libgimpwidgets-hierarchy.html" title="Object Hierarchy"><link rel="chapter" href="libgimpwidgets-cell-renderers.html" title="Cell Renderers for GtkTreeView"><link rel="part" href="libgimpwidgets-colordisplay.html" title="PartII.GIMP Display Filters"><link rel="part" href="libgimpwidgets-colorselector.html" title="PartIII.GIMP Color Selectors"><link rel="part" href="libgimpwidgets-controller.html" title="PartIV.GIMP Controllers"><link rel="part" href="libgimpwidgets-utils.html" title="PartV.GIMP Widgets Utilities"><link rel="part" href="libgimpwidgets-deprecated.html" title="PartVI.Deprecated API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="GimpFrame.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgimpwidgets-widgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GIMP Widgets Library Reference Manual</th><td><a accesskey="n" href="GimpIntStore.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="GimpIntComboBox"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">GimpIntComboBox</span></h2><p>GimpIntComboBox — A widget providing a popup menu of integer values (e.g. enums).</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
<a href="GimpIntComboBox.html#GimpIntComboBox-struct">GimpIntComboBox</a>;
<a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* <a href="GimpIntComboBox.html#gimp-int-combo-box-new">gimp_int_combo_box_new</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> first_value,
...);
<a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* <a href="GimpIntComboBox.html#gimp-int-combo-box-new-valist">gimp_int_combo_box_new_valist</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> first_value,
va_list values);
<a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* <a href="GimpIntComboBox.html#gimp-int-combo-box-new-array">gimp_int_combo_box_new_array</a> (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_values,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *labels[]);
void <a href="GimpIntComboBox.html#gimp-int-combo-box-prepend">gimp_int_combo_box_prepend</a> (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
...);
void <a href="GimpIntComboBox.html#gimp-int-combo-box-append">gimp_int_combo_box_append</a> (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
...);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GimpIntComboBox.html#gimp-int-combo-box-set-active">gimp_int_combo_box_set_active</a> (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> value);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="GimpIntComboBox.html#gimp-int-combo-box-get-active">gimp_int_combo_box_get_active</a> (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *value);
<a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> <a href="GimpIntComboBox.html#gimp-int-combo-box-connect">gimp_int_combo_box_connect</a> (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> value,
<a
href="../gobject/gobject-Closures.html#GCallback"
>GCallback</a> callback,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);
</pre></div><div class="refsect1" lang="en"><a name="id2563934"></a><h2>Object Hierarchy</h2><pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----<a
href="../gtk/GtkObject.html"
>GtkObject</a>
+----<a
href="../gtk/GtkWidget.html"
>GtkWidget</a>
+----<a
href="../gtk/GtkContainer.html"
>GtkContainer</a>
+----<a
href="../gtk/GtkBin.html"
>GtkBin</a>
+----<a
href="../gtk/GtkComboBox.html"
>GtkComboBox</a>
+----GimpIntComboBox
</pre></div><div class="refsect1" lang="en"><a name="id2563976"></a><h2>Implemented Interfaces</h2><p>
GimpIntComboBox implements
AtkImplementorIface, <a
href="../gtk/GtkCellEditable.html"
>GtkCellEditable</a> and <a
href="../gtk/GtkCellLayout.html"
>GtkCellLayout</a>.</p></div><div class="refsect1" lang="en"><a name="id2564001"></a><h2>Description</h2><p>
A widget providing a popup menu of integer values (e.g. enums).
</p></div><div class="refsect1" lang="en"><a name="id2564012"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2564017"></a><h3><a name="GimpIntComboBox-struct"></a>GimpIntComboBox</h3><a class="indexterm" name="id2564026"></a><pre class="programlisting">typedef struct _GimpIntComboBox GimpIntComboBox;</pre><p>
</p></div><hr><div class="refsect2" lang="en"><a name="id2564036"></a><h3><a name="gimp-int-combo-box-new"></a>gimp_int_combo_box_new ()</h3><a class="indexterm" name="id2535595"></a><pre class="programlisting"><a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* gimp_int_combo_box_new (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> first_value,
...);</pre><p>
Creates a GtkComboBox that has integer values associated with each
item. The items to fill the combo box with are specified as a <tt class="literal">NULL</tt>
terminated list of label/value pairs.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>first_label</tt></i>:</span></td><td> the label of the first item
</td></tr><tr><td><span class="term"><i class="parameter"><tt>first_value</tt></i>:</span></td><td> the value of the first item
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> a <tt class="literal">NULL</tt> terminated list of more label, value pairs
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a new <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>.
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2535691"></a><h3><a name="gimp-int-combo-box-new-valist"></a>gimp_int_combo_box_new_valist ()</h3><a class="indexterm" name="id2535699"></a><pre class="programlisting"><a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* gimp_int_combo_box_new_valist (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *first_label,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> first_value,
va_list values);</pre><p>
A variant of <a href="GimpIntComboBox.html#gimp-int-combo-box-new"><tt class="function">gimp_int_combo_box_new()</tt></a> that takes a va_list of
label/value pairs. Probably only useful for language bindings.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>first_label</tt></i>:</span></td><td> the label of the first item
</td></tr><tr><td><span class="term"><i class="parameter"><tt>first_value</tt></i>:</span></td><td> the value of the first item
</td></tr><tr><td><span class="term"><i class="parameter"><tt>values</tt></i>:</span></td><td> a va_list with more values
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a new <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>.
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2535801"></a><h3><a name="gimp-int-combo-box-new-array"></a>gimp_int_combo_box_new_array ()</h3><a class="indexterm" name="id2535812"></a><pre class="programlisting"><a
href="../gtk/GtkWidget.html"
>GtkWidget</a>* gimp_int_combo_box_new_array (<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> n_values,
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *labels[]);</pre><p>
A variant of <a href="GimpIntComboBox.html#gimp-int-combo-box-new"><tt class="function">gimp_int_combo_box_new()</tt></a> that takes an array of labels.
The array indices are used as values.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>n_values</tt></i>:</span></td><td> the number of values
</td></tr><tr><td><span class="term"><i class="parameter"><tt>labels</tt></i>:</span></td><td> an array of labels (array length must be <i class="parameter"><tt>n_values</tt></i>)
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> a new <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>.
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2584600"></a><h3><a name="gimp-int-combo-box-prepend"></a>gimp_int_combo_box_prepend ()</h3><a class="indexterm" name="id2584609"></a><pre class="programlisting">void gimp_int_combo_box_prepend (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
...);</pre><p>
This function provides a convenient way to prepend items to a
<a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>. It prepends a row to the <i class="parameter"><tt>combo_box</tt></i>'s list store
and calls <a
href="../gtk/GtkListStore.html#gtk-list-store-set"
><tt class="function">gtk_list_store_set()</tt></a> for you.
</p><p>
The column number must be taken from the enum <a href="GimpIntStore.html#GimpIntStoreColumns"><span class="type">GimpIntStoreColumns</span></a>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>combo_box</tt></i>:</span></td><td> a <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> pairs of column number and value, terminated with -1
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2584697"></a><h3><a name="gimp-int-combo-box-append"></a>gimp_int_combo_box_append ()</h3><a class="indexterm" name="id2584706"></a><pre class="programlisting">void gimp_int_combo_box_append (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
...);</pre><p>
This function provides a convenient way to append items to a
<a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>. It appends a row to the <i class="parameter"><tt>combo_box</tt></i>'s list store
and calls <a
href="../gtk/GtkListStore.html#gtk-list-store-set"
><tt class="function">gtk_list_store_set()</tt></a> for you.
</p><p>
The column number must be taken from the enum <a href="GimpIntStore.html#GimpIntStoreColumns"><span class="type">GimpIntStoreColumns</span></a>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>combo_box</tt></i>:</span></td><td> a <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td> pairs of column number and value, terminated with -1
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2584794"></a><h3><a name="gimp-int-combo-box-set-active"></a>gimp_int_combo_box_set_active ()</h3><a class="indexterm" name="id2584805"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gimp_int_combo_box_set_active (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> value);</pre><p>
Looks up the item that belongs to the given <i class="parameter"><tt>value</tt></i> and makes it the
selected item in the <i class="parameter"><tt>combo_box</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>combo_box</tt></i>:</span></td><td> a <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>:</span></td><td> an integer value
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> on success or <tt class="literal">FALSE</tt> if there was no item for
this value.
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2589590"></a><h3><a name="gimp-int-combo-box-get-active"></a>gimp_int_combo_box_get_active ()</h3><a class="indexterm" name="id2589601"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> gimp_int_combo_box_get_active (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *value);</pre><p>
Retrieves the value of the selected (active) item in the <i class="parameter"><tt>combo_box</tt></i>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>combo_box</tt></i>:</span></td><td> a <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>:</span></td><td> return location for the integer value
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> <tt class="literal">TRUE</tt> if <i class="parameter"><tt>value</tt></i> has been set or <tt class="literal">FALSE</tt> if no item was
active.
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div><hr><div class="refsect2" lang="en"><a name="id2589692"></a><h3><a name="gimp-int-combo-box-connect"></a>gimp_int_combo_box_connect ()</h3><a class="indexterm" name="id2589701"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gulong"
>gulong</a> gimp_int_combo_box_connect (<a href="GimpIntComboBox.html" title="GimpIntComboBox">GimpIntComboBox</a> *combo_box,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> value,
<a
href="../gobject/gobject-Closures.html#GCallback"
>GCallback</a> callback,
<a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a> data);</pre><p>
A convenience function that sets the inital <i class="parameter"><tt>value</tt></i> of a
<a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a> and connects <i class="parameter"><tt>callback</tt></i> to the "changed"
signal.
</p><p>
This function also calls the <i class="parameter"><tt>callback</tt></i> once after setting the
initial <i class="parameter"><tt>value</tt></i>. This is often convenient when working with combo
boxes that select a default active item (like for example
gimp_drawable_combo_box_new). If you pass an invalid initial
<i class="parameter"><tt>value</tt></i>, the <i class="parameter"><tt>callback</tt></i> will be called with the default item active.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>combo_box</tt></i>:</span></td><td> a <a href="GimpIntComboBox.html" title="GimpIntComboBox"><span class="type">GimpIntComboBox</span></a>
</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>:</span></td><td> the value to set
</td></tr><tr><td><span class="term"><i class="parameter"><tt>callback</tt></i>:</span></td><td> a callback to connect to the <i class="parameter"><tt>combo_box</tt></i>'s "changed" signal
</td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i>:</span></td><td> a pointer passed as data to <a
href="../gobject/gobject-Signals.html#g-signal-connect"
><tt class="function">g_signal_connect()</tt></a>
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td> the signal handler ID as returned by <a
href="../gobject/gobject-Signals.html#g-signal-connect"
><tt class="function">g_signal_connect()</tt></a>
</td></tr></tbody></table></div><p>Since GIMP 2.2
</p></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="GimpFrame.html"><b><<GimpFrame</b></a></td><td align="right"><a accesskey="n" href="GimpIntStore.html"><b>GimpIntStore>></b></a></td></tr></table></body></html>
|