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

📄 gtk-gtktreeview-drag-and-drop.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 3 页
字号:
</div><hr><div class="refsect2" lang="en"><a name="id3770029"></a><h3><a name="GtkTreeDragSourceIface"></a>GtkTreeDragSourceIface</h3><a class="indexterm" name="id3770041"></a><pre class="programlisting">typedef struct {  GTypeInterface g_iface;  /* VTable - not signals */  gboolean     (* row_draggable)        (GtkTreeDragSource   *drag_source,                                         GtkTreePath         *path);  gboolean     (* drag_data_get)        (GtkTreeDragSource   *drag_source,                                         GtkTreePath         *path,                                         GtkSelectionData    *selection_data);  gboolean     (* drag_data_delete)     (GtkTreeDragSource *drag_source,                                         GtkTreePath       *path);} GtkTreeDragSourceIface;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3770066"></a><h3><a name="gtk-tree-drag-source-drag-data-delete"></a>gtk_tree_drag_source_drag_data_delete ()</h3><a class="indexterm" name="id3770081"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_tree_drag_source_drag_data_delete                                                        (<a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource">GtkTreeDragSource</a> *drag_source,                                                         <a class="link" href="GtkTreeModel.html#GtkTreePath">GtkTreePath</a> *path);</pre><p>Asks the <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a> to delete the row at <em class="parameter"><code>path</code></em>, becauseit was moved somewhere else via drag-and-drop. Returns <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>if the deletion fails because <em class="parameter"><code>path</code></em> no longer exists, or forsome model-specific reason. Should robustly handle a <em class="parameter"><code>path</code></em> nolonger found in the model!</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>drag_source</code></em>&#160;:</span></p></td><td> a <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></p></td><td> row that was being dragged</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 the row was successfully deleted</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3770223"></a><h3><a name="gtk-tree-drag-source-drag-data-get"></a>gtk_tree_drag_source_drag_data_get ()</h3><a class="indexterm" name="id3770237"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_tree_drag_source_drag_data_get  (<a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource">GtkTreeDragSource</a> *drag_source,                                                         <a class="link" href="GtkTreeModel.html#GtkTreePath">GtkTreePath</a> *path,                                                         <a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre><p>Asks the <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a> to fill in <em class="parameter"><code>selection_data</code></em> with arepresentation of the row at <em class="parameter"><code>path</code></em>. <em class="parameter"><code>selection_data-&gt;target</code></em> givesthe required type of the data.  Should robustly handle a <em class="parameter"><code>path</code></em> nolonger found in the model!</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>drag_source</code></em>&#160;:</span></p></td><td> a <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></p></td><td> row that was dragged</td></tr><tr><td><p><span class="term"><em class="parameter"><code>selection_data</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html#GtkSelectionData"><span class="type">GtkSelectionData</span></a> to fill with data from the dragged row</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 data of the required type was provided </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3770404"></a><h3><a name="gtk-tree-drag-source-row-draggable"></a>gtk_tree_drag_source_row_draggable ()</h3><a class="indexterm" name="id3770418"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_tree_drag_source_row_draggable  (<a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource">GtkTreeDragSource</a> *drag_source,                                                         <a class="link" href="GtkTreeModel.html#GtkTreePath">GtkTreePath</a> *path);</pre><p>Asks the <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a> whether a particular row can be used asthe source of a DND operation. If the source doesn't implementthis interface, the row is assumed draggable.</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>drag_source</code></em>&#160;:</span></p></td><td> a <a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragSource"><span class="type">GtkTreeDragSource</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em>&#160;:</span></p></td><td> row on which user is initiating a drag</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 the row can be dragged</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3770529"></a><h3><a name="GtkTreeDragDest-struct"></a>GtkTreeDragDest</h3><a class="indexterm" name="id3770542"></a><pre class="programlisting">typedef struct _GtkTreeDragDest GtkTreeDragDest;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3770558"></a><h3><a name="GtkTreeDragDestIface"></a>GtkTreeDragDestIface</h3><a class="indexterm" name="id3770570"></a><pre class="programlisting">typedef struct {  GTypeInterface g_iface;  /* VTable - not signals */  gboolean     (* drag_data_received) (GtkTreeDragDest   *drag_dest,                                       GtkTreePath       *dest,                                       GtkSelectionData  *selection_data);  gboolean     (* row_drop_possible)  (GtkTreeDragDest   *drag_dest,                                       GtkTreePath       *dest_path,				       GtkSelectionData  *selection_data);} GtkTreeDragDestIface;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3770594"></a><h3><a name="gtk-tree-drag-dest-drag-data-received"></a>gtk_tree_drag_dest_drag_data_received ()</h3><a class="indexterm" name="id3770608"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_tree_drag_dest_drag_data_received                                                        (<a class="link" href="gtk-GtkTreeView-drag-and-drop.html#GtkTreeDragDest">GtkTreeDragDest</a> *drag_dest,                                                         <a class="link" href="GtkTreeModel.html#GtkTreePath">GtkTreePath</a> *dest,                                                         <a class="link" href="GtkWidget.html#GtkSelectionData">GtkSelectionData</a> *selection_data);</pre><p>

⌨️ 快捷键说明

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