gtkcomboboxentry.html
来自「最新gtk中文资料集」· HTML 代码 · 共 387 行 · 第 1/2 页
HTML
387 行
<a name="id3880721"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3880731"></a><h3><a name="GtkComboBoxEntry-struct"></a>GtkComboBoxEntry</h3><a class="indexterm" name="id3880744"></a><pre class="programlisting">typedef struct _GtkComboBoxEntry GtkComboBoxEntry;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3880760"></a><h3><a name="gtk-combo-box-entry-new"></a>gtk_combo_box_entry_new ()</h3><a class="indexterm" name="id3880774"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_combo_box_entry_new (void);</pre><p>Creates a new <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a> which has a <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> as child. Afterconstruction, you should set a model using <a class="link" href="GtkComboBox.html#gtk-combo-box-set-model"><code class="function">gtk_combo_box_set_model()</code></a> and atext_column * using <a class="link" href="GtkComboBoxEntry.html#gtk-combo-box-entry-set-text-column"><code class="function">gtk_combo_box_entry_set_text_column()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> A new <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3880870"></a><h3><a name="gtk-combo-box-entry-new-with-model"></a>gtk_combo_box_entry_new_with_model ()</h3><a class="indexterm" name="id3880886"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_combo_box_entry_new_with_model (<a class="link" href="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *model, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> text_column);</pre><p>Creates a new <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a> which has a <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> as child and a listof strings as popup. You can get the <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> from a <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>using GTK_ENTRY (GTK_BIN (combo_box_entry)->child). To add and removestrings from the list, just modify <em class="parameter"><code>model</code></em> using its data manipulationAPI.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>model</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text_column</code></em> :</span></p></td><td> A column in <em class="parameter"><code>model</code></em> to get the strings from.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> A new <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3881039"></a><h3><a name="gtk-combo-box-entry-new-text"></a>gtk_combo_box_entry_new_text ()</h3><a class="indexterm" name="id3881055"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_combo_box_entry_new_text (void);</pre><p>Convenience function which constructs a new editable text combo box, which is a <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a> just displaying strings. If you use this function tocreate a text combo box, you should only manipulate its data source withthe following convenience functions: <a class="link" href="GtkComboBox.html#gtk-combo-box-append-text"><code class="function">gtk_combo_box_append_text()</code></a>,<a class="link" href="GtkComboBox.html#gtk-combo-box-insert-text"><code class="function">gtk_combo_box_insert_text()</code></a>, <a class="link" href="GtkComboBox.html#gtk-combo-box-prepend-text"><code class="function">gtk_combo_box_prepend_text()</code></a> and<a class="link" href="GtkComboBox.html#gtk-combo-box-remove-text"><code class="function">gtk_combo_box_remove_text()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> A new text <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3881166"></a><h3><a name="gtk-combo-box-entry-set-text-column"></a>gtk_combo_box_entry_set_text_column ()</h3><a class="indexterm" name="id3881182"></a><pre class="programlisting">void gtk_combo_box_entry_set_text_column (<a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry">GtkComboBoxEntry</a> *entry_box, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> text_column);</pre><p>Sets the model column which <em class="parameter"><code>entry_box</code></em> should use to get strings fromto be <em class="parameter"><code>text_column</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>entry_box</code></em> :</span></p></td><td> A <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text_column</code></em> :</span></p></td><td> A column in <em class="parameter"><code>model</code></em> to get the strings from.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3881288"></a><h3><a name="gtk-combo-box-entry-get-text-column"></a>gtk_combo_box_entry_get_text_column ()</h3><a class="indexterm" name="id3881304"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> gtk_combo_box_entry_get_text_column (<a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry">GtkComboBoxEntry</a> *entry_box);</pre><p>Returns the column which <em class="parameter"><code>entry_box</code></em> is using to get the strings from.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>entry_box</code></em> :</span></p></td><td> A <a class="link" href="GtkComboBoxEntry.html" title="GtkComboBoxEntry"><span class="type">GtkComboBoxEntry</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> A column in the data source model of <em class="parameter"><code>entry_box</code></em>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id3881394"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3881404"></a><h3><a name="GtkComboBoxEntry--text-column"></a>The <code class="literal">"text-column"</code> property</h3><a class="indexterm" name="id3881421"></a><pre class="programlisting"> "text-column" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> : Read / Write</pre><p>A column in the data source model to get the strings from.</p><p>Allowed values: >= -1</p><p>Default value: -1</p></div></div><div class="refsect1" lang="en"><a name="id3881453"></a><h2>See Also</h2><p><a class="link" href="GtkComboBox.html" title="GtkComboBox"><span class="type">GtkComboBox</span></a></p></div><div class="refsect1" lang="en"><a name="id3881471"></a><div class="refsect2" lang="en"><a name="id3881472"></a></div><hr><div class="refsect2" lang="en"><a name="id3881473"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?