gi-gtk-3.0.36: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Notebook

Description

The Notebook widget is a Container whose children are pages that can be switched between using tab labels along one edge.

There are many configuration options for GtkNotebook. Among other things, you can choose on which edge the tabs appear (see notebookSetTabPos), whether, if there are too many tabs to fit the notebook should be made bigger or scrolling arrows added (see notebookSetScrollable), and whether there will be a popup menu allowing the users to switch pages. (see notebookPopupEnable, notebookPopupDisable)

GtkNotebook as GtkBuildable

The GtkNotebook implementation of the Buildable interface supports placing children into tabs by specifying “tab” as the “type” attribute of a <child> element. Note that the content of the tab must be created before the tab can be filled. A tab child can be specified without specifying a <child> type attribute.

To add a child widget in the notebooks action area, specify "action-start" or “action-end” as the “type” attribute of the <child> element.

An example of a UI definition fragment with GtkNotebook: > >class="GtkNotebook" > child > class="GtkLabel" id="notebook-content" > name="label"Content/property > /object > /child > type="tab" > class="GtkLabel" id="notebook-tab" > name="label"Tab/property > /object > /child >/object

CSS nodes

plain code

notebook
├── header.top
│   ├── [<action widget>]
│   ├── tabs
│   │   ├── [arrow]
│   │   ├── tab
│   │   │   ╰── <tab label>
┊   ┊   ┊
│   │   ├── tab[.reorderable-page]
│   │   │   ╰── <tab label>
│   │   ╰── [arrow]
│   ╰── [<action widget>]
│
╰── stack
    ├── <child>
    ┊
    ╰── <child>

GtkNotebook has a main CSS node with name notebook, a subnode with name header and below that a subnode with name tabs which contains one subnode per tab with name tab.

If action widgets are present, their CSS nodes are placed next to the tabs node. If the notebook is scrollable, CSS nodes with name arrow are placed as first and last child of the tabs node.

The main node gets the .frame style class when the notebook has a border (see notebookSetShowBorder).

The header node gets one of the style class .top, .bottom, .left or .right, depending on where the tabs are placed. For reorderable pages, the tab node gets the .reorderable-page class.

A tab node gets the .dnd style class while it is moved with drag-and-drop.

The nodes are always arranged from left-to-right, regarldess of text direction.

Synopsis

Exported types

newtype Notebook Source #

Memory-managed wrapper type.

Constructors

Notebook (ManagedPtr Notebook) 

Instances

Instances details
Eq Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

IsGValue Notebook Source #

Convert Notebook to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Notebook

ManagedPtrNewtype Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

TypedObject Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

Methods

glibType :: IO GType #

GObject Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

HasParentTypes Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

type ParentTypes Notebook Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

class (GObject o, IsDescendantOf Notebook o) => IsNotebook o Source #

Type class for types which can be safely cast to Notebook, for instance with toNotebook.

Instances

Instances details
(GObject o, IsDescendantOf Notebook o) => IsNotebook o Source # 
Instance details

Defined in GI.Gtk.Objects.Notebook

toNotebook :: (MonadIO m, IsNotebook o) => o -> m Notebook Source #

Cast to Notebook, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

appendPage

notebookAppendPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> m Int32

Returns: the index (starting from 0) of the appended page in the notebook, or -1 if function fails

Appends a page to notebook.

appendPageMenu

notebookAppendPageMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c, IsWidget d) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> Maybe d

menuLabel: the widget to use as a label for the page-switch menu, if that is enabled. If Nothing, and tabLabel is a Label or Nothing, then the menu label will be a newly created label with the same text as tabLabel; if tabLabel is not a Label, menuLabel must be specified if the page-switch menu is to be used.

-> m Int32

Returns: the index (starting from 0) of the appended page in the notebook, or -1 if function fails

Appends a page to notebook, specifying the widget to use as the label in the popup menu.

detachTab

notebookDetachTab Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a child

-> m () 

Removes the child from the notebook.

This function is very similar to containerRemove, but additionally informs the notebook that the removal is happening as part of a tab DND operation, which should not be cancelled.

Since: 3.16

getActionWidget

notebookGetActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> PackType

packType: pack type of the action widget to receive

-> m (Maybe Widget)

Returns: The action widget with the given packType or Nothing when this action widget has not been set

Gets one of the action widgets. See notebookSetActionWidget.

Since: 2.20

getCurrentPage

notebookGetCurrentPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Int32

Returns: the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned.

Returns the page number of the current page.

getGroupName

notebookGetGroupName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m (Maybe Text)

Returns: the group name, or Nothing if none is set

Gets the current group name for notebook.

Since: 2.24

getMenuLabel

notebookGetMenuLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a widget contained in a page of notebook

-> m (Maybe Widget)

Returns: the menu label, or Nothing if the notebook page does not have a menu label other than the default (the tab label).

Retrieves the menu label widget of the page containing child.

getMenuLabelText

notebookGetMenuLabelText Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: the child widget of a page of the notebook.

-> m (Maybe Text)

Returns: the text of the tab label, or Nothing if the widget does not have a menu label other than the default menu label, or the menu label widget is not a Label. The string is owned by the widget and must not be freed.

Retrieves the text of the menu label for the page containing child.

getNPages

notebookGetNPages Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Int32

Returns: the number of pages in the notebook

Gets the number of pages in a notebook.

Since: 2.2

getNthPage

notebookGetNthPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Int32

pageNum: the index of a page in the notebook, or -1 to get the last page

-> m (Maybe Widget)

Returns: the child widget, or Nothing if pageNum is out of bounds

Returns the child widget contained in page number pageNum.

getScrollable

notebookGetScrollable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Bool

Returns: True if arrows for scrolling are present

Returns whether the tab label area has arrows for scrolling. See notebookSetScrollable.

getShowBorder

notebookGetShowBorder Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Bool

Returns: True if the bevel is drawn

Returns whether a bevel will be drawn around the notebook pages. See notebookSetShowBorder.

getShowTabs

notebookGetShowTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Bool

Returns: True if the tabs are shown

Returns whether the tabs of the notebook are shown. See notebookSetShowTabs.

getTabDetachable

notebookGetTabDetachable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a child Widget

-> m Bool

Returns: True if the tab is detachable.

Returns whether the tab contents can be detached from notebook.

Since: 2.10

getTabHborder

notebookGetTabHborder Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Word16

Returns: horizontal width of a tab border

Deprecated: (Since version 3.4)this function returns zero

Returns the horizontal width of a tab border.

Since: 2.22

getTabLabel

notebookGetTabLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: the page

-> m (Maybe Widget)

Returns: the tab label

Returns the tab label widget for the page child. Nothing is returned if child is not in notebook or if no tab label has specifically been set for child.

getTabLabelText

notebookGetTabLabelText Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a widget contained in a page of notebook

-> m (Maybe Text)

Returns: the text of the tab label, or Nothing if the tab label widget is not a Label. The string is owned by the widget and must not be freed.

Retrieves the text of the tab label for the page containing child.

getTabPos

notebookGetTabPos Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m PositionType

Returns: the edge at which the tabs are drawn

Gets the edge at which the tabs for switching pages in the notebook are drawn.

getTabReorderable

notebookGetTabReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a child Widget

-> m Bool

Returns: True if the tab is reorderable.

Gets whether the tab can be reordered via drag and drop or not.

Since: 2.10

getTabVborder

notebookGetTabVborder Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m Word16

Returns: vertical width of a tab border

Deprecated: (Since version 3.4)this function returns zero

Returns the vertical width of a tab border.

Since: 2.22

insertPage

notebookInsertPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> Int32

position: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages

-> m Int32

Returns: the index (starting from 0) of the inserted page in the notebook, or -1 if function fails

Insert a page into notebook at the given position.

insertPageMenu

notebookInsertPageMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c, IsWidget d) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> Maybe d

menuLabel: the widget to use as a label for the page-switch menu, if that is enabled. If Nothing, and tabLabel is a Label or Nothing, then the menu label will be a newly created label with the same text as tabLabel; if tabLabel is not a Label, menuLabel must be specified if the page-switch menu is to be used.

-> Int32

position: the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.

-> m Int32

Returns: the index (starting from 0) of the inserted page in the notebook

Insert a page into notebook at the given position, specifying the widget to use as the label in the popup menu.

new

notebookNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Notebook

Returns: the newly created Notebook

Creates a new Notebook widget with no pages.

nextPage

notebookNextPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m () 

Switches to the next page. Nothing happens if the current page is the last page.

pageNum

notebookPageNum Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a Widget

-> m Int32

Returns: the index of the page containing child, or -1 if child is not in the notebook

Finds the index of the page which contains the given child widget.

popupDisable

notebookPopupDisable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m () 

Disables the popup menu.

popupEnable

notebookPopupEnable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m () 

Enables the popup menu: if the user clicks with the right mouse button on the tab labels, a menu with all the pages will be popped up.

prependPage

notebookPrependPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> m Int32

Returns: the index (starting from 0) of the prepended page in the notebook, or -1 if function fails

Prepends a page to notebook.

prependPageMenu

notebookPrependPageMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c, IsWidget d) 
=> a

notebook: a Notebook

-> b

child: the Widget to use as the contents of the page

-> Maybe c

tabLabel: the Widget to be used as the label for the page, or Nothing to use the default label, “page N”

-> Maybe d

menuLabel: the widget to use as a label for the page-switch menu, if that is enabled. If Nothing, and tabLabel is a Label or Nothing, then the menu label will be a newly created label with the same text as tabLabel; if tabLabel is not a Label, menuLabel must be specified if the page-switch menu is to be used.

-> m Int32

Returns: the index (starting from 0) of the prepended page in the notebook, or -1 if function fails

Prepends a page to notebook, specifying the widget to use as the label in the popup menu.

prevPage

notebookPrevPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> m () 

Switches to the previous page. Nothing happens if the current page is the first page.

removePage

notebookRemovePage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Int32

pageNum: the index of a notebook page, starting from 0. If -1, the last page will be removed.

-> m () 

Removes a page from the notebook given its index in the notebook.

reorderChild

notebookReorderChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: the child to move

-> Int32

position: the new position, or -1 to move to the end

-> m () 

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.

setActionWidget

notebookSetActionWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

widget: a Widget

-> PackType

packType: pack type of the action widget

-> m () 

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 Box if you need to pack more than one widget on the same side.

Note that action widgets are “internal” children of the notebook and thus not included in the list returned from containerForeach.

Since: 2.20

setCurrentPage

notebookSetCurrentPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Int32

pageNum: index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done.

-> m () 

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.

setGroupName

notebookSetGroupName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Maybe Text

groupName: the name of the notebook group, or Nothing to unset it

-> m () 

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.

Since: 2.24

setMenuLabel

notebookSetMenuLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c) 
=> a

notebook: a Notebook

-> b

child: the child widget

-> Maybe c

menuLabel: the menu label, or Nothing for default

-> m () 

Changes the menu label for the page containing child.

setMenuLabelText

notebookSetMenuLabelText Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: the child widget

-> Text

menuText: the label text

-> m () 

Creates a new label and sets it as the menu label of child.

setScrollable

notebookSetScrollable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Bool

scrollable: True if scroll arrows should be added

-> m () 

Sets whether the tab label area will have arrows for scrolling if there are too many tabs to fit in the area.

setShowBorder

notebookSetShowBorder Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Bool

showBorder: True if a bevel should be drawn around the notebook

-> m () 

Sets whether a bevel will be drawn around the notebook pages. This only has a visual effect when the tabs are not shown. See notebookSetShowTabs.

setShowTabs

notebookSetShowTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook

-> Bool

showTabs: True if the tabs should be shown

-> m () 

Sets whether to show the tabs for the notebook or not.

setTabDetachable

notebookSetTabDetachable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a child Widget

-> Bool

detachable: whether the tab is detachable or not

-> m () 

Sets whether the tab can be detached from notebook to another notebook or widget.

Note that 2 notebooks must share a common group identificator (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 and accept the target “GTK_NOTEBOOK_TAB”. The notebook will fill the selection with a GtkWidget** pointing to the child widget that corresponds to the dropped tab.

Note that you should use notebookDetachTab instead of containerRemove 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,
                       GdkDragContext   *context,
                       gint              x,
                       gint              y,
                       GtkSelectionData *data,
                       guint             info,
                       guint             time,
                       gpointer          user_data)
{
  GtkWidget *notebook;
  GtkWidget **child;

  notebook = gtk_drag_get_source_widget (context);
  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.

Since: 2.10

setTabLabel

notebookSetTabLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b, IsWidget c) 
=> a

notebook: a Notebook

-> b

child: the page

-> Maybe c

tabLabel: the tab label widget to use, or Nothing for default tab label

-> m () 

Changes the tab label for child. If Nothing is specified for tabLabel, then the page will have the label “page N”.

setTabLabelText

notebookSetTabLabelText Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: the page

-> Text

tabText: the label text

-> m () 

Creates a new label and sets it as the tab label for the page containing child.

setTabPos

notebookSetTabPos Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a) 
=> a

notebook: a Notebook.

-> PositionType

pos: the edge to draw the tabs at

-> m () 

Sets the edge at which the tabs for switching pages in the notebook are drawn.

setTabReorderable

notebookSetTabReorderable Source #

Arguments

:: (HasCallStack, MonadIO m, IsNotebook a, IsWidget b) 
=> a

notebook: a Notebook

-> b

child: a child Widget

-> Bool

reorderable: whether the tab is reorderable or not

-> m () 

Sets whether the notebook tab can be reordered via drag and drop or not.

Since: 2.10

Properties

enablePopup

No description available in the introspection data.

constructNotebookEnablePopup :: (IsNotebook o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “enable-popup” property. This is rarely needed directly, but it is used by new.

getNotebookEnablePopup :: (MonadIO m, IsNotebook o) => o -> m Bool Source #

Get the value of the “enable-popup” property. When overloading is enabled, this is equivalent to

get notebook #enablePopup

setNotebookEnablePopup :: (MonadIO m, IsNotebook o) => o -> Bool -> m () Source #

Set the value of the “enable-popup” property. When overloading is enabled, this is equivalent to

set notebook [ #enablePopup := value ]

groupName

Group name for tab drag and drop.

Since: 2.24

clearNotebookGroupName :: (MonadIO m, IsNotebook o) => o -> m () Source #

Set the value of the “group-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #groupName

constructNotebookGroupName :: (IsNotebook o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “group-name” property. This is rarely needed directly, but it is used by new.

getNotebookGroupName :: (MonadIO m, IsNotebook o) => o -> m (Maybe Text) Source #

Get the value of the “group-name” property. When overloading is enabled, this is equivalent to

get notebook #groupName

setNotebookGroupName :: (MonadIO m, IsNotebook o) => o -> Text -> m () Source #

Set the value of the “group-name” property. When overloading is enabled, this is equivalent to

set notebook [ #groupName := value ]

page

No description available in the introspection data.

constructNotebookPage :: (IsNotebook o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “page” property. This is rarely needed directly, but it is used by new.

getNotebookPage :: (MonadIO m, IsNotebook o) => o -> m Int32 Source #

Get the value of the “page” property. When overloading is enabled, this is equivalent to

get notebook #page

setNotebookPage :: (MonadIO m, IsNotebook o) => o -> Int32 -> m () Source #

Set the value of the “page” property. When overloading is enabled, this is equivalent to

set notebook [ #page := value ]

scrollable

No description available in the introspection data.

constructNotebookScrollable :: (IsNotebook o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “scrollable” property. This is rarely needed directly, but it is used by new.

getNotebookScrollable :: (MonadIO m, IsNotebook o) => o -> m Bool Source #

Get the value of the “scrollable” property. When overloading is enabled, this is equivalent to

get notebook #scrollable

setNotebookScrollable :: (MonadIO m, IsNotebook o) => o -> Bool -> m () Source #

Set the value of the “scrollable” property. When overloading is enabled, this is equivalent to

set notebook [ #scrollable := value ]

showBorder

No description available in the introspection data.

constructNotebookShowBorder :: (IsNotebook o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-border” property. This is rarely needed directly, but it is used by new.

getNotebookShowBorder :: (MonadIO m, IsNotebook o) => o -> m Bool Source #

Get the value of the “show-border” property. When overloading is enabled, this is equivalent to

get notebook #showBorder

setNotebookShowBorder :: (MonadIO m, IsNotebook o) => o -> Bool -> m () Source #

Set the value of the “show-border” property. When overloading is enabled, this is equivalent to

set notebook [ #showBorder := value ]

showTabs

No description available in the introspection data.

constructNotebookShowTabs :: (IsNotebook o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “show-tabs” property. This is rarely needed directly, but it is used by new.

getNotebookShowTabs :: (MonadIO m, IsNotebook o) => o -> m Bool Source #

Get the value of the “show-tabs” property. When overloading is enabled, this is equivalent to

get notebook #showTabs

setNotebookShowTabs :: (MonadIO m, IsNotebook o) => o -> Bool -> m () Source #

Set the value of the “show-tabs” property. When overloading is enabled, this is equivalent to

set notebook [ #showTabs := value ]

tabPos

No description available in the introspection data.

constructNotebookTabPos :: (IsNotebook o, MonadIO m) => PositionType -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tab-pos” property. This is rarely needed directly, but it is used by new.

getNotebookTabPos :: (MonadIO m, IsNotebook o) => o -> m PositionType Source #

Get the value of the “tab-pos” property. When overloading is enabled, this is equivalent to

get notebook #tabPos

setNotebookTabPos :: (MonadIO m, IsNotebook o) => o -> PositionType -> m () Source #

Set the value of the “tab-pos” property. When overloading is enabled, this is equivalent to

set notebook [ #tabPos := value ]

Signals

changeCurrentPage

type C_NotebookChangeCurrentPageCallback = Ptr () -> Int32 -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type NotebookChangeCurrentPageCallback = Int32 -> IO Bool Source #

No description available in the introspection data.

afterNotebookChangeCurrentPage :: (IsNotebook a, MonadIO m) => a -> NotebookChangeCurrentPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the changeCurrentPage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #changeCurrentPage callback

onNotebookChangeCurrentPage :: (IsNotebook a, MonadIO m) => a -> NotebookChangeCurrentPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the changeCurrentPage signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #changeCurrentPage callback

createWindow

type C_NotebookCreateWindowCallback = Ptr () -> Ptr Widget -> Int32 -> Int32 -> Ptr () -> IO (Ptr Notebook) Source #

Type for the callback on the (unwrapped) C side.

type NotebookCreateWindowCallback Source #

Arguments

 = Widget

page: the tab of notebook that is being detached

-> Int32

x: the X coordinate where the drop happens

-> Int32

y: the Y coordinate where the drop happens

-> IO Notebook

Returns: a Notebook that page should be added to, or Nothing.

The createWindow signal is emitted when a detachable tab is dropped on the root window.

A handler for this signal can create a window containing a notebook where the tab will be attached. It is also responsible for moving/resizing the window and adding the necessary properties to the notebook (e.g. the Notebook:group-name ).

Since: 2.12

afterNotebookCreateWindow :: (IsNotebook a, MonadIO m) => a -> NotebookCreateWindowCallback -> m SignalHandlerId Source #

Connect a signal handler for the createWindow signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #createWindow callback

onNotebookCreateWindow :: (IsNotebook a, MonadIO m) => a -> NotebookCreateWindowCallback -> m SignalHandlerId Source #

Connect a signal handler for the createWindow signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #createWindow callback

focusTab

type C_NotebookFocusTabCallback = Ptr () -> CUInt -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type NotebookFocusTabCallback = NotebookTab -> IO Bool Source #

No description available in the introspection data.

afterNotebookFocusTab :: (IsNotebook a, MonadIO m) => a -> NotebookFocusTabCallback -> m SignalHandlerId Source #

Connect a signal handler for the focusTab signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #focusTab callback

onNotebookFocusTab :: (IsNotebook a, MonadIO m) => a -> NotebookFocusTabCallback -> m SignalHandlerId Source #

Connect a signal handler for the focusTab signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #focusTab callback

moveFocusOut

type C_NotebookMoveFocusOutCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type NotebookMoveFocusOutCallback = DirectionType -> IO () Source #

No description available in the introspection data.

afterNotebookMoveFocusOut :: (IsNotebook a, MonadIO m) => a -> NotebookMoveFocusOutCallback -> m SignalHandlerId Source #

Connect a signal handler for the moveFocusOut signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #moveFocusOut callback

onNotebookMoveFocusOut :: (IsNotebook a, MonadIO m) => a -> NotebookMoveFocusOutCallback -> m SignalHandlerId Source #

Connect a signal handler for the moveFocusOut signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #moveFocusOut callback

pageAdded

type C_NotebookPageAddedCallback = Ptr () -> Ptr Widget -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type NotebookPageAddedCallback Source #

Arguments

 = Widget

child: the child Widget affected

-> Word32

pageNum: the new page number for child

-> IO () 

the pageAdded signal is emitted in the notebook right after a page is added to the notebook.

Since: 2.10

afterNotebookPageAdded :: (IsNotebook a, MonadIO m) => a -> NotebookPageAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #pageAdded callback

onNotebookPageAdded :: (IsNotebook a, MonadIO m) => a -> NotebookPageAddedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #pageAdded callback

pageRemoved

type C_NotebookPageRemovedCallback = Ptr () -> Ptr Widget -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type NotebookPageRemovedCallback Source #

Arguments

 = Widget

child: the child Widget affected

-> Word32

pageNum: the child page number

-> IO () 

the pageRemoved signal is emitted in the notebook right after a page is removed from the notebook.

Since: 2.10

afterNotebookPageRemoved :: (IsNotebook a, MonadIO m) => a -> NotebookPageRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #pageRemoved callback

onNotebookPageRemoved :: (IsNotebook a, MonadIO m) => a -> NotebookPageRemovedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #pageRemoved callback

pageReordered

type C_NotebookPageReorderedCallback = Ptr () -> Ptr Widget -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type NotebookPageReorderedCallback Source #

Arguments

 = Widget

child: the child Widget affected

-> Word32

pageNum: the new page number for child

-> IO () 

the pageReordered signal is emitted in the notebook right after a page has been reordered.

Since: 2.10

afterNotebookPageReordered :: (IsNotebook a, MonadIO m) => a -> NotebookPageReorderedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageReordered signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #pageReordered callback

onNotebookPageReordered :: (IsNotebook a, MonadIO m) => a -> NotebookPageReorderedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageReordered signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #pageReordered callback

reorderTab

type C_NotebookReorderTabCallback = Ptr () -> CUInt -> CInt -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type NotebookReorderTabCallback = DirectionType -> Bool -> IO Bool Source #

No description available in the introspection data.

afterNotebookReorderTab :: (IsNotebook a, MonadIO m) => a -> NotebookReorderTabCallback -> m SignalHandlerId Source #

Connect a signal handler for the reorderTab signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #reorderTab callback

onNotebookReorderTab :: (IsNotebook a, MonadIO m) => a -> NotebookReorderTabCallback -> m SignalHandlerId Source #

Connect a signal handler for the reorderTab signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #reorderTab callback

selectPage

type C_NotebookSelectPageCallback = Ptr () -> CInt -> Ptr () -> IO CInt Source #

Type for the callback on the (unwrapped) C side.

type NotebookSelectPageCallback = Bool -> IO Bool Source #

No description available in the introspection data.

afterNotebookSelectPage :: (IsNotebook a, MonadIO m) => a -> NotebookSelectPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the selectPage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #selectPage callback

onNotebookSelectPage :: (IsNotebook a, MonadIO m) => a -> NotebookSelectPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the selectPage signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #selectPage callback

switchPage

type C_NotebookSwitchPageCallback = Ptr () -> Ptr Widget -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type NotebookSwitchPageCallback Source #

Arguments

 = Widget

page: the new current page

-> Word32

pageNum: the index of the page

-> IO () 

Emitted when the user or a function changes the current page.

afterNotebookSwitchPage :: (IsNotebook a, MonadIO m) => a -> NotebookSwitchPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the switchPage signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after notebook #switchPage callback

onNotebookSwitchPage :: (IsNotebook a, MonadIO m) => a -> NotebookSwitchPageCallback -> m SignalHandlerId Source #

Connect a signal handler for the switchPage signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on notebook #switchPage callback