Hoogle Search
Within LTS Haskell 24.49 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gi-gtk4 GI.Gtk.Objects.Notebook Reorders the page containing child, so that it appears in position position. If position is greater than or equal to the number of children in the list or negative, child will be moved to the end of the list.
-
gi-gtk4 GI.Gtk.Objects.Notebook Sets widget as one of the action widgets. Depending on the pack type the widget will be placed before or after the tabs. You can use a GtkBox if you need to pack more than one widget on the same side.
notebookSetCurrentPage :: (HasCallStack, MonadIO m, IsNotebook a) => a -> Int32 -> m ()gi-gtk4 GI.Gtk.Objects.Notebook Switches to the page number pageNum. Note that due to historical reasons, GtkNotebook refuses to switch to a page unless the child widget is visible. Therefore, it is recommended to show child widgets before adding them to a notebook.
notebookSetGroupName :: (HasCallStack, MonadIO m, IsNotebook a) => a -> Maybe Text -> m ()gi-gtk4 GI.Gtk.Objects.Notebook Sets a group name for notebook. Notebooks with the same name will be able to exchange tabs via drag and drop. A notebook with a Nothing group name will not be able to exchange tabs with any other notebook.
-
gi-gtk4 GI.Gtk.Objects.Notebook Changes the menu label for the page containing child.
-
gi-gtk4 GI.Gtk.Objects.Notebook Creates a new label and sets it as the menu label of child.
notebookSetScrollable :: (HasCallStack, MonadIO m, IsNotebook a) => a -> Bool -> m ()gi-gtk4 GI.Gtk.Objects.Notebook Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area.
notebookSetShowBorder :: (HasCallStack, MonadIO m, IsNotebook a) => a -> Bool -> m ()gi-gtk4 GI.Gtk.Objects.Notebook Sets whether a bevel will be drawn around the notebook pages. This only has a visual effect when the tabs are not shown.
notebookSetShowTabs :: (HasCallStack, MonadIO m, IsNotebook a) => a -> Bool -> m ()gi-gtk4 GI.Gtk.Objects.Notebook Sets whether to show the tabs for the notebook or not.
-
gi-gtk4 GI.Gtk.Objects.Notebook Sets whether the tab can be detached from notebook to another notebook or widget. Note that two notebooks must share a common group identifier (see notebookSetGroupName) to allow automatic tabs interchange between them. If you want a widget to interact with a notebook through DnD (i.e.: accept dragged tabs from it) it must be set as a drop destination by adding to it a DropTarget controller that accepts the GType GTK_TYPE_NOTEBOOK_PAGE. The :value of said drop target will be preloaded with a NotebookPage object that corresponds to the dropped tab, so you can process the value via ::accept or ::drop signals. Note that you should use notebookDetachTab instead of notebookRemovePage if you want to remove the 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.
c code
static void on_drag_data_received (GtkWidget *widget, GdkDrop *drop, GtkSelectionData *data, guint time, gpointer user_data) { GtkDrag *drag; GtkWidget *notebook; GtkWidget **child; drag = gtk_drop_get_drag (drop); notebook = g_object_get_data (drag, "gtk-notebook-drag-origin"); child = (void*) gtk_selection_data_get_data (data); // process_widget (*child); gtk_notebook_detach_tab (GTK_NOTEBOOK (notebook), *child); }If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it.