Package: gtk
Function gtk:notebook-tab-detachable
Lambda Listgtk:notebook-tab-detachable (notebook child) SyntaxArgumentsDetails The gtk:notebook-tab-detachable function returns whether the notbook
tab content can be detached from the notebook to another notebook or widget. The (setf gtk:notebook-tab-detachable) function sets whether the notebook tab
can be detached. Note that two notebooks must share a common group identifier, see the gtk:notebook-group-name function, to allow automatic notebook tabs interchange between them. If you want a widget to interact with a notebook through DnD, that is, accept dragged notebook tabs from it, it must be set as a drop destination by adding to it a gtk:drop-target controller that accepts the GType "GtkNotebookPage". The :value value of said drop target will be preloaded with a gtk:notebook-page object that corresponds to the dropped notebook tab, so you can process the value via "accept" or "drop" signals. Note that you should use the gtk:notebook-detach-tab function instead of the gtk:notebook-remove-page function if you want to remove the notebook tab from the source notebook as part of accepting a drop. Otherwise, the source notebook will think that the dragged tab was removed from underneath the ongoing drag operation, and will initiate a drag cancel animation. If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it. Examplesstatic void on_drag_data_received (GtkWidget *widget, GdkDrop *drop, GtkSelectionData *data, guint time, gpointer user_data) { GtkDrag *drag; GtkWidget *notebook; GtkWidget **child; | See also |
2024-10-4