📄 gtklist.html
字号:
<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> position);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_scroll_vertical</code> is deprecated and should not be used in newly-written code.</p></div><p>Scrolls <em class="parameter"><code>list</code></em> vertically. This supposes that the list is packed into ascrolled window or something similar, and adjustments are wellset. Step and page increment are those from the vertical adjustmentof <em class="parameter"><code>list</code></em>. Backward means up, and forward down. Out of bounds values aretruncated.<em class="parameter"><code>scroll_type</code></em> may be any valid <a class="link" href="gtk-Standard-Enumerations.html#GtkScrollType"><span class="type">GtkScrollType</span></a>. If <em class="parameter"><code>scroll_type</code></em> is<span class="type">GTK_SCROLL_NONE</span>, nothing is done. If it's <span class="type">GTK_SCROLL_JUMP</span>, the listscrolls to the ratio <em class="parameter"><code>position</code></em>: 0 is top, 1 is bottom.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>scroll_type</code></em> :</span></p></td><td>the scrolling type.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td>the position if <em class="parameter"><code>scroll_type</code></em> is <span class="type">GTK_SCROLL_JUMP</span></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4551912"></a><h3><a name="gtk-list-toggle-add-mode"></a>gtk_list_toggle_add_mode ()</h3><a class="indexterm" name="id4551927"></a><pre class="programlisting">void gtk_list_toggle_add_mode (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_toggle_add_mode</code> is deprecated and should not be used in newly-written code.</p></div><p>Toggles between adding to the selection and beginning a new selection. Onlyin <a class="link" href="gtk-Standard-Enumerations.html#GTK-SELECTION-EXTENDED:CAPS"><span class="type">GTK_SELECTION_EXTENDED</span></a>. Useful with <a class="link" href="GtkList.html#gtk-list-extend-selection"><code class="function">gtk_list_extend_selection()</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552008"></a><h3><a name="gtk-list-toggle-focus-row"></a>gtk_list_toggle_focus_row ()</h3><a class="indexterm" name="id4552024"></a><pre class="programlisting">void gtk_list_toggle_focus_row (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_toggle_focus_row</code> is deprecated and should not be used in newly-written code.</p></div><p>Toggles the focus row. If the focus row is selected, it'sunselected. If the focus row is unselected, it's selected. If theselection mode of <em class="parameter"><code>list</code></em> is <a class="link" href="gtk-Standard-Enumerations.html#GTK-SELECTION-BROWSE:CAPS"><span class="type">GTK_SELECTION_BROWSE</span></a>, this has no effect,as the selection is always at the focus row.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552101"></a><h3><a name="gtk-list-toggle-row"></a>gtk_list_toggle_row ()</h3><a class="indexterm" name="id4552117"></a><pre class="programlisting">void gtk_list_toggle_row (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *item);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_toggle_row</code> is deprecated and should not be used in newly-written code.</p></div><p>Toggles the child <em class="parameter"><code>item</code></em> of list. If the selection mode of <em class="parameter"><code>list</code></em> is<a class="link" href="gtk-Standard-Enumerations.html#GTK-SELECTION-BROWSE:CAPS"><span class="type">GTK_SELECTION_BROWSE</span></a>, the item is selected, and the others areunselected.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td><td>the child to toggle.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552220"></a><h3><a name="gtk-list-undo-selection"></a>gtk_list_undo_selection ()</h3><a class="indexterm" name="id4552235"></a><pre class="programlisting">void gtk_list_undo_selection (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_undo_selection</code> is deprecated and should not be used in newly-written code.</p></div><p>Restores the selection in the last state, only if selection mode is<a class="link" href="gtk-Standard-Enumerations.html#GTK-SELECTION-EXTENDED:CAPS"><span class="type">GTK_SELECTION_EXTENDED</span></a>. If this function is called twice, the selection iscleared. This function sometimes gives stranges "last states".</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552306"></a><h3><a name="gtk-list-end-drag-selection"></a>gtk_list_end_drag_selection ()</h3><a class="indexterm" name="id4552323"></a><pre class="programlisting">void gtk_list_end_drag_selection (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_list_end_drag_selection</code> is deprecated and should not be used in newly-written code.</p></div><p>Stops the drag selection mode and ungrabs the pointer. This has noeffect if a drag selection is not active.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the list widget.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4552385"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4552395"></a><h3><a name="GtkList--selection-mode"></a>The <code class="literal">"selection-mode"</code> property</h3><a class="indexterm" name="id4552412"></a><pre class="programlisting"> "selection-mode" <a class="link" href="gtk-Standard-Enumerations.html#GtkSelectionMode">GtkSelectionMode</a> : Read / Write</pre><p></p><p>Default value: GTK_SELECTION_NONE</p></div></div><div class="refsect1" lang="en"><a name="id4552438"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id4552449"></a><h3><a name="GtkList-select-child"></a>The <code class="literal">"select-child"</code> signal</h3><a class="indexterm" name="id4552465"></a><pre class="programlisting">void user_function (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p>The child <em class="parameter"><code>widget</code></em> has just been selected.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the newly selected child.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552562"></a><h3><a name="GtkList-selection-changed"></a>The <code class="literal">"selection-changed"</code> signal</h3><a class="indexterm" name="id4552578"></a><pre class="programlisting">void user_function (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p>The selection of the widget has just changed.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4552648"></a><h3><a name="GtkList-unselect-child"></a>The <code class="literal">"unselect-child"</code> signal</h3><a class="indexterm" name="id4552664"></a><pre class="programlisting">void user_function (<a class="link" href="GtkList.html" title="GtkList">GtkList</a> *list, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *widget, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p>The child <em class="parameter"><code>widget</code></em> has just been unselected.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td><td>the object which received the signal.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the newly unselected child.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4552763"></a><h2>See Also</h2><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a></span></p></td><td><p>For functions that apply to every <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>(like <a class="link" href="GtkList.html" title="GtkList"><span class="type">GtkList</span></a>).</p></td></tr><tr><td><p><span class="term"><span class="type">GtkListitem</span></span></p></td><td><p>Children of a <a class="link" href="GtkList.html" title="GtkList"><span class="type">GtkList</span></a> widget must be of thistype.</p></td></tr></tbody></table></div><p></p></div><div class="refsect1" lang="en"><a name="id4552836"></a><div class="refsect2" lang="en"><a name="id4552837"></a></div><hr><div class="refsect2" lang="en"><a name="id4552838"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -