Notebook —
This widget can display several pages of widgets. Each page can be selected by a tab at the top of the widget. It is useful in dialogs where a lot of information has to be displayed.
notebookNew:: IO Notebook |
notebookAppendPage:: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> IO Int |
notebookAppendPageMenu:: (NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> IO Int |
notebookGetCurrentPage:: NotebookClass nb => nb -> IO Int |
notebookGetMenuLabel:: (NotebookClass nb, WidgetClass w) => nb -> w -> IO (Maybe Label) |
notebookGetNPages:: NotebookClass nb => nb -> IO Int |
notebookGetNthPage:: NotebookClass nb => nb -> Int -> IO (Maybe Widget) |
notebookGetTabLabel:: (NotebookClass nb, WidgetClass w) => nb -> w -> IO (Maybe Label) |
notebookInsertPage:: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> Int -> IO Int |
notebookInsertPageMenu:: (NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> Int -> IO Int |
notebookNextPage:: NotebookClass nb => nb -> IO () |
notebookPageNum:: (NotebookClass nb, WidgetClass w) => nb -> w -> IO (Maybe Int) |
notebookPrependPage:: (NotebookClass nb, WidgetClass child) => nb -> child -> String -> IO Int |
notebookPrependPageMenu:: (NotebookClass nb, WidgetClass child, WidgetClass tab) => nb -> child -> tab -> String -> IO Int |
notebookPrevPage:: NotebookClass nb => nb -> IO () |
notebookQueryTabLabelPacking:: (NotebookClass nb, WidgetClass w) => nb -> w -> IO (Packing,PackType) |
notebookRemovePage:: NotebookClass nb => nb -> Int -> IO () |
notebookReorderChild:: (NotebookClass nb, WidgetClass w) => nb -> w -> Int -> IO () |
notebookSetCurrentPage:: NotebookClass nb => nb -> Int -> IO () |
notebookSetHomogeneousTabs:: NotebookClass nb => nb -> Bool -> IO () |
notebookSetPopup:: NotebookClass nb => nb -> Bool -> IO () |
notebookSetScrollable:: NotebookClass nb => nb -> Bool -> IO () |
notebookSetShowBorder:: NotebookClass nb => nb -> Bool -> IO () |
notebookSetShowTabs:: NotebookClass nb => nb -> Bool -> IO () |
notebookSetTabBorder:: NotebookClass nb => nb -> Int -> IO () |
notebookSetTabHBorder:: NotebookClass nb => nb -> Int -> IO () |
notebookSetTabLabel:: (NotebookClass nb, WidgetClass ch, WidgetClass tab) => nb -> ch -> tab -> IO () |
notebookSetTabLabelPacking:: (NotebookClass nb, WidgetClass w) => nb -> w -> Packing -> PackType -> IO () |
notebookSetTabPos:: NotebookClass nb => nb -> PositionType -> IO () |
notebookSetTabVBorder:: NotebookClass nb => nb -> Int -> IO () |
onSwitchPage:: NotebookClass nb => nb -> (Int -> IO ()) -> IO (ConnectId nb) |
check if it is sensible and possible to have something else than a Label widget in the context menu. If so, change the notebook*PageMenu function and add notebookSetMenuLabel and notebookSetMenuText.
notebookSetTabLabelText is not bound.
The signals focus-tab and select-page are not bound because it is unclear what they mean. As far as I can see they are not emitted anywhere.
Insert a new tab to the right of the existing tabs.
| notebookAppendPage | :: nb | :: child | :: String | :: IO Int |
| nb | child | tabLabel |
The tabName will be inserted as a Label widget. In case the context menu is enabled, this name will appear in the menu. If you want to specify something else to go in the tab, use notebookAppendPageMenu and specify some suitable widget for menuLabel. Returns index (starting from 0) of the appended page in the notebook, or -1 if function fails.
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Insert a new tab to the right of the existing tabs. menuLabel is the label for the context menu (useful if tabLabel is not a Label widget). Return index (starting from 0) of the appended page in the notebook, or -1 if function fails
| notebookAppendPageMenu | :: nb | :: child | :: tab | :: String | :: IO Int |
| nb | child | tabWidget | menuLabel |
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Query the currently selected page.
| notebookGetCurrentPage | :: nb | :: IO Int |
| nb |
Returns -1 if notebook has no pages.
Extract the menu label from the given child.
| notebookGetMenuLabel | :: nb | :: w | :: IO (Maybe Label) |
| nb | child |
Returns Nothing if child was not found.
Get the number of pages in a notebook.
| notebookGetNPages | :: nb | :: IO Int |
| nb |
Only available in Gtk 2.2 and higher.
Retrieve the child widget at positon pos (stating from 0).
| notebookGetNthPage | :: nb | :: Int | :: IO (Maybe Widget) |
| nb | pos |
Returns Nothing if the index is out of bounds.
Extract the tab label from the given child.
| notebookGetTabLabel | :: nb | :: w | :: IO (Maybe Label) |
| nb | child |
Insert a new tab at the specified position.
| notebookInsertPage | :: nb | :: child | :: String | :: Int | :: IO Int |
| nb | child | tabLabel | pos |
The tabName will be inserted as a Label widget. In case the context menu is enabled, this name will appear in the menu. If you want to specify something else to go in the tab, use notebookInsertPageMenu and specify some suitable widget for menuLabel. Return index (starting from 0) of the inserted page in the notebook, or -1 if function fails
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Insert a new tab between the tab no. pos and pos+1. menuLabel is the label for the context menu (useful if tabLabel is not a Label widget). Return index (starting from 0) of the inserted page in the notebook, or -1 if function fails
| notebookInsertPageMenu | :: nb | :: child | :: tab | :: String | :: Int | :: IO Int |
| nb | child | tabWidget | menuLabel | pos |
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Move to the right neighbour of the current page.
| notebookNextPage | :: nb | :: IO () |
| nb |
Nothing happens if there is no such page.
Query the page the child widget is contained in.
| notebookPageNum | :: nb | :: w | :: IO (Maybe Int) |
| nb | child |
The function returns the page number if the child was found, Nothing otherwise.
Insert a new tab to the left of the existing tabs.
| notebookPrependPage | :: nb | :: child | :: String | :: IO Int |
| nb | child | tabLabel |
The tabName will be inserted as a Label widget. In case the context menu is enabled, this name will appear in the menu. If you want to specify something else to go in the tab, use notebookPrependPageMenu and specify some suitable widget for menuLabel. Return index (starting from 0) of the prepended page in the notebook, or -1 if function fails
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Insert a new tab to the left of the existing tabs. menuLabel is the label for the context menu (useful if tabLabel is not a Label widget). Return index (starting from 0) of the prepended page in the notebook, or -1 if function fails
| notebookPrependPageMenu | :: nb | :: child | :: tab | :: String | :: IO Int |
| nb | child | tabWidget | menuLabel |
<warning><para>This function returned () in Gtk version 2.2.X and earlier</warning><para>
Move to the left neighbour of the current page.
| notebookPrevPage | :: nb | :: IO () |
| nb |
Nothing happens if there is no such page.
Query the packing attributes of the given child.
| notebookQueryTabLabelPacking | :: nb | :: w | :: IO (Packing,PackType) |
| nb | child |
Remove a specific page from the notebook, counting from 0.
| notebookRemovePage | :: nb | :: Int | :: IO () |
| nb | pos |
Move a page withing the notebook.
| notebookReorderChild | :: nb | :: w | :: Int | :: IO () |
| nb | child | pos |
Move to the specified page of the notebook.
| notebookSetCurrentPage | :: nb | :: Int | :: IO () |
| nb | pos |
If pos is out of range (e.g. negative) select the last page.
Sets whether the tabs must have all the same size or not.
| notebookSetHomogeneousTabs | :: nb | :: Bool | :: IO () |
| nb | hom |
Enable or disable context menus with all tabs in it.
| notebookSetPopup | :: nb | :: Bool | :: IO () |
| nb | enable |
Set whether scroll bars will be added in case the notebook has too many tabs to fit the widget size.
| notebookSetScrollable | :: nb | :: Bool | :: IO () |
| nb | scrollable |
In case the tabs are not shown, specify whether to draw a border around the notebook.
| notebookSetShowBorder | :: nb | :: Bool | :: IO () |
| nb | showBorder |
Show or hide the tabs of a notebook.
| notebookSetShowTabs | :: nb | :: Bool | :: IO () |
| nb | showTabs |
Set the width of the borders of the tab labels.
| notebookSetTabBorder | :: nb | :: Int | :: IO () |
| nb | width |
Sets both vertical and horizontal widths.
Set the width of the borders of the tab labels.
| notebookSetTabHBorder | :: nb | :: Int | :: IO () |
| nb | width |
Sets horizontal widths.
Set a new tab label for a given child.
| notebookSetTabLabel | :: nb | :: ch | :: tab | :: IO () |
| nb | child | tab |
Set the packing attributes of the given child.
| notebookSetTabLabelPacking | :: nb | :: w | :: Packing | :: PackType | :: IO () |
| nb | child | pack | pt |