⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkliststore.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</tr><tr><td><p><span class="term"><em class="parameter"><code>n_columns</code></em>&#160;:</span></p></td><td> Number of columns for the list store</td></tr><tr><td><p><span class="term"><em class="parameter"><code>types</code></em>&#160;:</span></p></td><td> An array length n of <span class="type">GTypes</span></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3849280"></a><h3><a name="gtk-list-store-set"></a>gtk_list_store_set ()</h3><a class="indexterm" name="id3849294"></a><pre class="programlisting">void                gtk_list_store_set                  (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,                                                         ...);</pre><p>Sets the value of one or more cells in the row referenced by <em class="parameter"><code>iter</code></em>.The variable argument list should contain integer column numbers,each column number followed by the value to be set.The list is terminated by a -1. For example, to set column 0 with type<ahref="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-STRING:CAPS"><code class="literal">G_TYPE_STRING</code></a> to "Foo", you would write <code class="literal">gtk_list_store_set (store, iter,0, "Foo", -1)</code>.</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>list_store</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td><td> row iterator</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td><td> pairs of column number and value, terminated with -1</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3849416"></a><h3><a name="gtk-list-store-set-valist"></a>gtk_list_store_set_valist ()</h3><a class="indexterm" name="id3849430"></a><pre class="programlisting">void                gtk_list_store_set_valist           (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,                                                         va_list var_args);</pre><p>See <a class="link" href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a>; this version takes a va_list for use by languagebindings.</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>list_store</code></em>&#160;:</span></p></td><td> A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td><td> A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td></tr><tr><td><p><span class="term"><em class="parameter"><code>var_args</code></em>&#160;:</span></p></td><td> va_list of column/value pairs</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3849551"></a><h3><a name="gtk-list-store-set-value"></a>gtk_list_store_set_value ()</h3><a class="indexterm" name="id3849564"></a><pre class="programlisting">void                gtk_list_store_set_value            (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> column,                                                         <ahref="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue">GValue</a> *value);</pre><p>Sets the data in the cell specified by <em class="parameter"><code>iter</code></em> and <em class="parameter"><code>column</code></em>.The type of <em class="parameter"><code>value</code></em> must be convertible to the type of thecolumn.</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>list_store</code></em>&#160;:</span></p></td><td> A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td><td> A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td></tr><tr><td><p><span class="term"><em class="parameter"><code>column</code></em>&#160;:</span></p></td><td> column number to modify</td></tr><tr><td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td><td> new value for the cell</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3849716"></a><h3><a name="gtk-list-store-set-valuesv"></a>gtk_list_store_set_valuesv ()</h3><a class="indexterm" name="id3849732"></a><pre class="programlisting">void                gtk_list_store_set_valuesv          (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> *columns,                                                         <ahref="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue">GValue</a> *values,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_values);</pre><p>A variant of <a class="link" href="GtkListStore.html#gtk-list-store-set-valist"><code class="function">gtk_list_store_set_valist()</code></a> whichtakes the columns and values as two arrays, instead ofvarargs. This function is mainly intended for language-bindings and in case the number of columns tochange is not known until run-time.</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>list_store</code></em>&#160;:</span></p></td><td> A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td><td> A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> for the row being modified</td></tr><tr><td><p><span class="term"><em class="parameter"><code>columns</code></em>&#160;:</span></p></td><td> an array of column numbers</td></tr><tr><td><p><span class="term"><em class="parameter"><code>values</code></em>&#160;:</span></p></td><td> an array of GValues </td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_values</code></em>&#160;:</span></p></td><td> the length of the <em class="parameter"><code>columns</code></em> and <em class="parameter"><code>values</code></em> arrays</td></tr></tbody></table></div><p class="since">Since  2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3849919"></a><h3><a name="gtk-list-store-remove"></a>gtk_list_store_remove ()</h3><a class="indexterm" name="id3849932"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_list_store_remove               (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter);</pre><p>Removes the given row from the list store.  After being removed, <em class="parameter"><code>iter</code></em> is set to be the next valid row, or invalidated if it pointed to the last row in <em class="parameter"><code>list_store</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>list_store</code></em>&#160;:</span></p></td><td> A <a class="link" href="GtkListStore.html" title="GtkListStore"><span class="type">GtkListStore</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em>&#160;:</span></p></td><td> A valid <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>iter</code></em> is valid, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3850070"></a><h3><a name="gtk-list-store-insert"></a>gtk_list_store_insert ()</h3><a class="indexterm" name="id3850084"></a><pre class="programlisting">void                gtk_list_store_insert               (<a class="link" href="GtkListStore.html" title="GtkListStore">GtkListStore</a> *list_store,                                                         <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);</pre><p>Creates a new row at <em class="parameter"><code>position</code></em>.  <em class="parameter"><code>iter</code></em> will be changed to point to this newrow.  If <em class="parameter"><code>position</code></em> is larger than the number of rows on the list, then thenew row will be appended to the list. The row will be empty after thisfunction is called.  To fill in values, you need to call <a class="link" href="GtkListStore.html#gtk-list-store-set"><code class="function">gtk_list_store_set()</code></a> or <a class="link" href="GtkListStore.html#gtk-list-store-set-value"><code class="function">gtk_list_store_set_value()</code></a>.</p><p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -