Graphics.UI.Gtk.Layout.Notebook

gtk3-0.14.5: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Layout.Notebook

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes
- Child Attributes
- Style Attributes
- Signals
- Deprecated

Description

A tabbed notebook container

Synopsis

- data Notebook
- class ContainerClass o => NotebookClass o
- castToNotebook :: GObjectClass obj => obj -> Notebook
- gTypeNotebook :: GType
- toNotebook :: NotebookClass o => o -> Notebook
- notebookNew :: IO Notebook
- notebookAppendPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO Int
- notebookAppendPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> IO Int
- notebookPrependPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO Int
- notebookPrependPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> IO Int
- notebookInsertPage :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> Int -> IO Int
- notebookInsertPageMenu :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) => self -> child -> tabLabel -> menuLabel -> Int -> IO Int
- notebookRemovePage :: NotebookClass self => self -> Int -> IO ()
- notebookPageNum :: (NotebookClass self, WidgetClass w) => self -> w -> IO (Maybe Int)
- notebookSetCurrentPage :: NotebookClass self => self -> Int -> IO ()
- notebookNextPage :: NotebookClass self => self -> IO ()
- notebookPrevPage :: NotebookClass self => self -> IO ()
- notebookReorderChild :: (NotebookClass self, WidgetClass child) => self -> child -> Int -> IO ()
- data PositionType
  - = PosLeft
  - | PosRight
  - | PosTop
  - | PosBottom
- notebookSetTabPos :: NotebookClass self => self -> PositionType -> IO ()
- notebookGetTabPos :: NotebookClass self => self -> IO PositionType
- notebookSetShowTabs :: NotebookClass self => self -> Bool -> IO ()
- notebookGetShowTabs :: NotebookClass self => self -> IO Bool
- notebookSetShowBorder :: NotebookClass self => self -> Bool -> IO ()
- notebookGetShowBorder :: NotebookClass self => self -> IO Bool
- notebookSetScrollable :: NotebookClass self => self -> Bool -> IO ()
- notebookGetScrollable :: NotebookClass self => self -> IO Bool
- notebookSetPopup :: NotebookClass self => self -> Bool -> IO ()
- notebookGetCurrentPage :: NotebookClass self => self -> IO Int
- notebookSetMenuLabel :: (NotebookClass self, WidgetClass child, WidgetClass menuLabel) => self -> child -> Maybe menuLabel -> IO ()
- notebookGetMenuLabel :: (NotebookClass self, WidgetClass child) => self -> child -> IO (Maybe Widget)
- notebookSetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO ()
- notebookGetMenuLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> IO (Maybe string)
- notebookGetNthPage :: NotebookClass self => self -> Int -> IO (Maybe Widget)
- notebookGetNPages :: NotebookClass self => self -> IO Int
- notebookGetTabLabel :: (NotebookClass self, WidgetClass child) => self -> child -> IO (Maybe Widget)
- notebookGetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> IO (Maybe string)
- data Packing
  - = PackRepel
  - | PackGrow
  - | PackNatural
- data PackType
  - = PackStart
  - | PackEnd
- notebookSetTabLabel :: (NotebookClass self, WidgetClass child, WidgetClass tabLabel) => self -> child -> tabLabel -> IO ()
- notebookSetTabLabelText :: (NotebookClass self, WidgetClass child, GlibString string) => self -> child -> string -> IO ()
- notebookSetTabReorderable :: (NotebookClass self, WidgetClass child) => self -> child -> Bool -> IO ()
- notebookGetTabReorderable :: (NotebookClass self, WidgetClass child) => self -> child -> IO Bool
- notebookSetTabDetachable :: (NotebookClass self, WidgetClass child) => self -> child -> Bool -> IO ()
- notebookGetTabDetachable :: (NotebookClass self, WidgetClass child) => self -> child -> IO Bool
- notebookSetActionWidget :: (NotebookClass self, WidgetClass widget) => self -> widget -> PackType -> IO ()
- notebookGetActionWidget :: NotebookClass self => self -> PackType -> IO (Maybe Widget)
- notebookPage :: NotebookClass self => Attr self Int
- notebookTabPos :: NotebookClass self => Attr self PositionType
- notebookTabBorder :: NotebookClass self => WriteAttr self Int
- notebookTabHborder :: NotebookClass self => Attr self Int
- notebookTabVborder :: NotebookClass self => Attr self Int
- notebookShowTabs :: NotebookClass self => Attr self Bool
- notebookShowBorder :: NotebookClass self => Attr self Bool
- notebookScrollable :: NotebookClass self => Attr self Bool
- notebookEnablePopup :: NotebookClass self => Attr self Bool
- notebookHomogeneous :: NotebookClass self => Attr self Bool
- notebookCurrentPage :: NotebookClass self => Attr self Int
- notebookChildTabLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string
- notebookChildMenuLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string
- notebookChildPosition :: (NotebookClass self, WidgetClass child) => child -> Attr self Int
- notebookChildTabPacking :: (NotebookClass self, WidgetClass child) => child -> Attr self Packing
- notebookChildTabPackType :: (NotebookClass self, WidgetClass child) => child -> Attr self PackType
- notebookChildDetachable :: NotebookClass self => Attr self Bool
- notebookChildReorderable :: NotebookClass self => Attr self Bool
- notebookChildTabExpand :: NotebookClass self => Attr self Bool
- notebookChildTabFill :: NotebookClass self => Attr self Bool
- notebookStyleArrowSpacing :: NotebookClass self => ReadAttr self Bool
- notebookStyleHasBackwardStepper :: NotebookClass self => ReadAttr self Bool
- notebookStyleHasForwardStepper :: NotebookClass self => ReadAttr self Bool
- notebookStyleHasSecondaryBackwardStepper :: NotebookClass self => ReadAttr self Bool
- notebookStyleHasSecondaryForwardStepper :: NotebookClass self => ReadAttr self Bool
- notebookStyleTabCurvature :: NotebookClass self => ReadAttr self Int
- notebookStyleTabOverlap :: NotebookClass self => ReadAttr self Int
- switchPage :: NotebookClass self => Signal self (Int -> IO ())
- pageAdded :: NotebookClass self => Signal self (Widget -> Int -> IO ())
- pageRemoved :: NotebookClass self => Signal self (Widget -> Int -> IO ())
- pageReordered :: NotebookClass self => Signal self (Widget -> Int -> IO ())

# Detail

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 `Notebook`. Among other things, you can choose on which edge the tabs appear (see `notebookSetTabPos`), whether, if there are too many tabs to fit the noteobook 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 `notebookEnablePopup`)

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Notebook

# Types

data Notebook #

Instances

Eq Notebook # |
Methods (==) :: Notebook -> Notebook -> Bool # (/=) :: Notebook -> Notebook -> Bool #
Ord Notebook # |
Methods compare :: Notebook -> Notebook -> Ordering # (<) :: Notebook -> Notebook -> Bool # (<=) :: Notebook -> Notebook -> Bool # (>) :: Notebook -> Notebook -> Bool # (>=) :: Notebook -> Notebook -> Bool # max :: Notebook -> Notebook -> Notebook # min :: Notebook -> Notebook -> Notebook #
GObjectClass Notebook # |
Methods toGObject :: Notebook -> GObject # unsafeCastGObject :: GObject -> Notebook #
NotebookClass Notebook # |
ContainerClass Notebook # |
WidgetClass Notebook # |

class ContainerClass o => NotebookClass o #

Instances

NotebookClass Notebook # |

castToNotebook :: GObjectClass obj => obj -> Notebook #

gTypeNotebook :: GType #

toNotebook :: NotebookClass o => o -> Notebook #

# Constructors

notebookNew :: IO Notebook #

Creates a new `Notebook` widget with no pages.

# Methods

notebookAppendPage #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> string | `tabLabel` - the label for the page
-> IO Int | returns the index (starting from 0) of the appended page in the notebook, or -1 if function fails

Appends a page to `notebook`.

The given label will be used for the label widget of the new tab. In case the context menu is enabled, this name will also appear in the popup menu. If you want to specify something else to go in the tab, use `notebookAppendPageMenu`.

- This function returned `()` in Gtk+ version 2.2.X and earlier

notebookAppendPageMenu #

Arguments

:: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> tabLabel | `tabLabel` - the `Widget` to be used as the label for the page (usually a `Label` widget).
-> menuLabel | `menuLabel` - the widget to use as a label for the page-switch menu, if that is enabled (usually a `Label` widget).
-> IO Int | 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.

Like `notebookAppendPage` but allows any widget to be used for the label of the new tab and the entry in the page-switch popup menu.

- This function returned `()` in Gtk version 2.2.X and earlier

notebookPrependPage #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> string | `tabLabel` - the label for the page
-> IO Int | returns the index (starting from 0) of the prepended page in the notebook, or -1 if function fails

Prepends a page to `notebook`.

- The given label will be used for the label widget of the new tab. In case the context menu is enabled, this name will also appear in the popup menu. If you want to specify something else to go in the tab, use `notebookPrependPageMenu`.
- This function returned `()` in Gtk version 2.2.X and earlier

notebookPrependPageMenu #

Arguments

:: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> tabLabel | `tabLabel` - the `Widget` to be used as the label for the page (usually a `Label` widget).
-> menuLabel | `menuLabel` - the widget to use as a label for the page-switch menu, if that is enabled (usually a `Label` widget).
-> IO Int | 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.

Like `notebookPrependPage` but allows any widget to be used for the label of the new tab and then entry in the page-switch popup menu.

- This function returned `()` in Gtk version 2.2.X and earlier

notebookInsertPage #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> string | `tabLabel` - the label for the page
-> Int | `position` - the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
-> IO Int | 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.

- The given label will be used for the label widget of the new tab. In case the context menu is enabled, this name will also appear in the popup menu. If you want to specify something else to go in the tab, use `notebookInsertPageMenu`.
- This function returned `()` in Gtk version 2.2.X and earlier

notebookInsertPageMenu #

Arguments

:: (NotebookClass self, WidgetClass child, WidgetClass tabLabel, WidgetClass menuLabel) |
=> self |
-> child | `child` - the `Widget` to use as the contents of the page.
-> tabLabel | `tabLabel` - the `Widget` to be used as the label for the page (usually a `Label` widget).
-> menuLabel | `menuLabel` - the widget to use as a label for the page-switch menu, if that is enabled (usually a `Label` widget).
-> Int | `position` - the index (starting at 0) at which to insert the page, or -1 to append the page after all other pages.
-> IO Int | 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, specifying the widget to use as the label in the popup menu.

Like `notebookInsertPage` but allows any widget to be used for the label of the new tab and then entry in the page-switch popup menu.

- This function returned `()` in Gtk version 2.2.X and earlier

notebookRemovePage #

Arguments

:: NotebookClass self |
=> self |
-> Int | `pageNum` - the index of a notebook page, starting from 0. If -1, the last page will be removed.
-> IO () |

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

notebookPageNum :: (NotebookClass self, WidgetClass w) => self -> w -> IO (Maybe Int) #

Query the page the child widget is contained in.

- The function returns the page number if the child was found, Nothing otherwise.

notebookSetCurrentPage #

Arguments

:: NotebookClass self |
=> self |
-> Int | `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.
-> IO () |

Switches to the page number `pageNum`. Page numbers start from `0`. Use `-1` to request the last page.

- 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.

notebookNextPage :: NotebookClass self => self -> IO () #

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

notebookPrevPage :: NotebookClass self => self -> IO () #

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

notebookReorderChild #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - the child to move
-> Int | `position` - the new position, or -1 to move to the end
-> IO () |

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.

data PositionType #

Position a scale's value is drawn relative to the trough

Constructors

PosLeft |
PosRight |
PosTop |
PosBottom |

Instances

Enum PositionType # |
Methods succ :: PositionType -> PositionType # pred :: PositionType -> PositionType # toEnum :: Int -> PositionType # fromEnum :: PositionType -> Int # enumFrom :: PositionType -> [PositionType] # enumFromThen :: PositionType -> PositionType -> [PositionType] # enumFromTo :: PositionType -> PositionType -> [PositionType] # enumFromThenTo :: PositionType -> PositionType -> PositionType -> [PositionType] #
Eq PositionType # |
Methods (==) :: PositionType -> PositionType -> Bool # (/=) :: PositionType -> PositionType -> Bool #
Show PositionType # |
Methods showsPrec :: Int -> PositionType -> ShowS # show :: PositionType -> String # showList :: [PositionType] -> ShowS #

notebookSetTabPos #

Arguments

:: NotebookClass self |
=> self |
-> PositionType | `pos` - the edge to draw the tabs at.
-> IO () |

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

notebookGetTabPos #

Arguments

:: NotebookClass self |
=> self |
-> IO 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.

notebookSetShowTabs #

Arguments

:: NotebookClass self |
=> self |
-> Bool | `showTabs` - `True` if the tabs should be shown.
-> IO () |

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

notebookGetShowTabs #

Arguments

:: NotebookClass self |
=> self |
-> IO Bool | returns `True` if the tabs are shown

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

notebookSetShowBorder #

Arguments

:: NotebookClass self |
=> self |
-> Bool | `showBorder` - `True` if a bevel should be drawn around the notebook.
-> IO () |

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`.

notebookGetShowBorder #

Arguments

:: NotebookClass self |
=> self |
-> IO Bool | returns `True` if the bevel is drawn

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

notebookSetScrollable #

Arguments

:: NotebookClass self |
=> self |
-> Bool | `scrollable` - `True` if scroll arrows should be added
-> IO () |

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

notebookGetScrollable #

Arguments

:: NotebookClass self |
=> self |
-> IO Bool | returns `True` if arrows for scrolling are present

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

notebookSetPopup :: NotebookClass self => self -> Bool -> IO () #

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

notebookGetCurrentPage #

Arguments

:: NotebookClass self |
=> self |
-> IO Int | 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.

notebookSetMenuLabel #

Arguments

:: (NotebookClass self, WidgetClass child, WidgetClass menuLabel) |
=> self |
-> child | `child` - the child widget
-> Maybe menuLabel | `menuLabel` - the menu label, or `Nothing` for default
-> IO () |

Changes the menu label for the page containing `child`.

notebookGetMenuLabel #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - a widget contained in a page of `notebook`
-> IO (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`.

notebookSetMenuLabelText #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the child widget
-> string | `menuText` - the label text
-> IO () |

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

notebookGetMenuLabelText #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the child widget of a page of the notebook.
-> IO (Maybe string) | returns value: 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`.

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

notebookGetNthPage #

Arguments

:: NotebookClass self |
=> self |
-> Int | `pageNum` - the index of a page in the noteobok, or -1 to get the last page.
-> IO (Maybe Widget) | returns the child widget, or `Nothing` if `pageNum` is out of bounds.

Returns the child widget contained in page number `pageNum`.

notebookGetNPages :: NotebookClass self => self -> IO Int #

Gets the number of pages in a notebook.

- Available since Gtk version 2.2

notebookGetTabLabel #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - the page
-> IO (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`.

notebookGetTabLabelText #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - a widget contained in a page of `notebook`
-> IO (Maybe string) | returns value: the text of the tab label, or `Nothing` if the tab label widget is not a `Label`.

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

data Packing #

Packing parameters of a widget

- The `Packing` parameter determines how the child behaves in the horizontal or vertical way in an `HBox` or `VBox`, respectively. `PackNatural` means the child is as big as it requests. It will stay at the start or end of a `Box` if there is more space available. All children packed with `PackRepel` will be padded on both sides with additional space. `PackGrow` will increase the size of a widget so that it covers the available space. A menu bar, for instance, should always stay at the top of a window and should only occupy as little space as possible. Hence it should be packed at the start of a `VBox` with the packing option `PackNatural`. The working area of a window (e.g. the text area in an editor) should expand when the window is resized. Here the packing option `PackGrow` is the right choice and it is irrelevant whether the main area is inserted at the start or the end of a box. Finally `PackRepel` is most useful in a window where no widget can make use of excess space. Examples include a dialog box without list boxes or text fields.

Constructors

PackRepel |
PackGrow |
PackNatural |

Instances

Enum Packing # |
Methods succ :: Packing -> Packing # pred :: Packing -> Packing # toEnum :: Int -> Packing # fromEnum :: Packing -> Int # enumFrom :: Packing -> [Packing] # enumFromThen :: Packing -> Packing -> [Packing] # enumFromTo :: Packing -> Packing -> [Packing] # enumFromThenTo :: Packing -> Packing -> Packing -> [Packing] #
Eq Packing # |
Methods (==) :: Packing -> Packing -> Bool # (/=) :: Packing -> Packing -> Bool #
Show Packing # |
Methods showsPrec :: Int -> Packing -> ShowS # show :: Packing -> String # showList :: [Packing] -> ShowS #

data PackType #

Packing of widgets at start or end in a box

Constructors

PackStart |
PackEnd |

Instances

Enum PackType # |
Methods succ :: PackType -> PackType # pred :: PackType -> PackType # toEnum :: Int -> PackType # fromEnum :: PackType -> Int # enumFrom :: PackType -> [PackType] # enumFromThen :: PackType -> PackType -> [PackType] # enumFromTo :: PackType -> PackType -> [PackType] # enumFromThenTo :: PackType -> PackType -> PackType -> [PackType] #
Eq PackType # |
Methods (==) :: PackType -> PackType -> Bool # (/=) :: PackType -> PackType -> Bool #
Show PackType # |
Methods showsPrec :: Int -> PackType -> ShowS # show :: PackType -> String # showList :: [PackType] -> ShowS #

notebookSetTabLabel #

Arguments

:: (NotebookClass self, WidgetClass child, WidgetClass tabLabel) |
=> self |
-> child | `child` - the page
-> tabLabel | `tabLabel` - the tab label widget to use
-> IO () |

Changes the tab label for `child`.

notebookSetTabLabelText #

Arguments

:: (NotebookClass self, WidgetClass child, GlibString string) |
=> self |
-> child | `child` - the page
-> string | `tabText` - the label text
-> IO () |

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

notebookSetTabReorderable #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - a child page
-> Bool | `reorderable` - whether the tab is reorderable or not.
-> IO () |

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

- Available since Gtk version 2.10

notebookGetTabReorderable #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - the child page
-> IO Bool | return `True` if the tab is reorderable.

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

- Available since Gtk version 2.10

notebookSetTabDetachable #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - the child page
-> Bool | `detachable` - whether the tab is detachable or not
-> IO () |

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 gtk_notebook_set_group_id()) 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.

If you want a notebook to accept drags from other widgets, you will have to set your own DnD code to do it.

- Available since Gtk version 2.10

notebookGetTabDetachable #

Arguments

:: (NotebookClass self, WidgetClass child) |
=> self |
-> child | `child` - the child page
-> IO Bool | return `True` if the tab is detachable.

Returns whether the tab contents can be detached from notebook.

- Available since Gtk version 2.10

notebookSetActionWidget #

Arguments

:: (NotebookClass self, WidgetClass widget) |
=> self |
-> widget |
-> PackType | `packType` pack type of the action widget
-> IO () |

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`.

- Available since Gtk version 2.20

notebookGetActionWidget #

Arguments

:: NotebookClass self |
=> self |
-> PackType | `packType` pack type of the action widget to receive
-> IO (Maybe Widget) |

Gets one of the action widgets. See `notebookSetActionWidget`.

- Available since Gtk version 2.20

# Attributes

notebookPage :: NotebookClass self => Attr self Int #

The index of the current page.

Allowed values: >= 0

Default value: 0

notebookTabPos :: NotebookClass self => Attr self PositionType #

Which side of the notebook holds the tabs.

Default value: `PosTop`

notebookTabBorder :: NotebookClass self => WriteAttr self Int #

Width of the border around the tab labels.

Default value: 2

notebookTabHborder :: NotebookClass self => Attr self Int #

Width of the horizontal border of tab labels.

Default value: 2

notebookTabVborder :: NotebookClass self => Attr self Int #

Width of the vertical border of tab labels.

Default value: 2

notebookShowTabs :: NotebookClass self => Attr self Bool #

Whether tabs should be shown or not.

Default value: `True`

notebookShowBorder :: NotebookClass self => Attr self Bool #

Whether the border should be shown or not.

Default value: `True`

notebookScrollable :: NotebookClass self => Attr self Bool #

If `True`, scroll arrows are added if there are too many tabs to fit.

Default value: `False`

notebookEnablePopup :: NotebookClass self => Attr self Bool #

If `True`, pressing the right mouse button on the notebook pops up a menu that you can use to go to a page.

Default value: `False`

notebookHomogeneous :: NotebookClass self => Attr self Bool #

Whether tabs should have homogeneous sizes.

Default value: `False`

notebookCurrentPage :: NotebookClass self => Attr self Int #

Switches to the page number `pageNum`.

Note that due to historical reasons, `Notebook` 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.

Returns the page number of the current page.

# Child Attributes

notebookChildTabLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string #

The string displayed on the child's tab label.

Default value: `Nothing`

notebookChildMenuLabel :: (NotebookClass self, WidgetClass child, GlibString string) => child -> Attr self string #

The string displayed in the child's menu entry.

Default value: `Nothing`

notebookChildPosition :: (NotebookClass self, WidgetClass child) => child -> Attr self Int #

The index of the child in the parent.

Allowed values: >= -1

Default value: 0

notebookChildTabPacking :: (NotebookClass self, WidgetClass child) => child -> Attr self Packing #

The packing style of the child's tab.

Default value: `PackGrow`

notebookChildTabPackType :: (NotebookClass self, WidgetClass child) => child -> Attr self PackType #

A `PackType` indicating whether the child is packed with reference to the start or end of the parent.

Default value: `PackStart`

notebookChildDetachable :: NotebookClass self => Attr self Bool #

Whether the tab is detachable.

Default value: `False`

notebookChildReorderable :: NotebookClass self => Attr self Bool #

Whether the tab is reorderable by user action or not.

Default value: `False`

notebookChildTabExpand :: NotebookClass self => Attr self Bool #

Whether to expand the child's tab or not.

Default value : `False`

notebookChildTabFill :: NotebookClass self => Attr self Bool #

Whether the child's tab should fill the allocated area or not.

Default value : `False`

# Style Attributes

notebookStyleArrowSpacing :: NotebookClass self => ReadAttr self Bool #

The `notebookStyleArrowSpacing` property defines the spacing between the scroll arrows and the tabs.

Allowed values: >= 0

Default value: 0

- Available since Gtk version 2.10

notebookStyleHasBackwardStepper :: NotebookClass self => ReadAttr self Bool #

The `notebookStyleHasBackwardStepper` property determines whether the standard backward arrow button is displayed.

Default value: `True`

- Available since Gtk version 2.4

notebookStyleHasForwardStepper :: NotebookClass self => ReadAttr self Bool #

The `notebookStyleHasForwardStepper` property determines whether the standard forward arrow button is displayed.

Default value : `True`

- Available since Gtk version 2.4

notebookStyleHasSecondaryBackwardStepper :: NotebookClass self => ReadAttr self Bool #

The `notebookStyleHasSecondaryBackwardStepper` property determines whether a second backward arrow button is displayed on the opposite end of the tab area.

Default value: `False`

- Available since Gtk version 2.4

notebookStyleHasSecondaryForwardStepper :: NotebookClass self => ReadAttr self Bool #

The `notebookStyleHasSecondaryForwardStepper` property determines whether a second forward arrow button is displayed on the opposite end of the tab area.

Default value: `False`

- Available since Gtk version 2.4

notebookStyleTabCurvature :: NotebookClass self => ReadAttr self Int #

The `notebookStyleTabCurvature` property defines size of tab curvature.

Allowed values: >= 0

Default value: 1

- Available since Gtk version 2.10

notebookStyleTabOverlap :: NotebookClass self => ReadAttr self Int #

The `notebookStyleTabOverlap` property defines size of tab overlap area.

Default value: 2

- Available since Gtk version 2.10

# Signals

switchPage :: NotebookClass self => Signal self (Int -> IO ()) #

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

pageAdded :: NotebookClass self => Signal self (Widget -> Int -> IO ()) #

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

- Available since Gtk+ version 2.10

pageRemoved :: NotebookClass self => Signal self (Widget -> Int -> IO ()) #

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

- Available since Gtk+ version 2.10

pageReordered :: NotebookClass self => Signal self (Widget -> Int -> IO ()) #

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

- Available since Gtk+ version 2.10

# Deprecated