Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Friends
IlvNotebook Class Reference

Gadget class. More...

#include <ilviews/gadgets/notebook.h>

Inheritance diagram for IlvNotebook:
IlvGadget IlvGadgetItemHolder IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface

Public Member Functions

 IlvNotebook (IlvDisplay *display, const IlvRect &rect, IlvPosition tabsPosition=IlvTop, IlBoolean verticalLabels=IlFalse, IlBoolean flipLabels=IlFalse, IlvDim xMargin=5, IlvDim yMargin=2, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
IlvNotebookPageaddPage (IlvNotebookPage *page, IlUShort index=((IlUShort)-1))
 Adds a page to the notebook. More...
 
IlvNotebookPageaddPage (const char *label, IlvBitmap *bitmap=0, IlBoolean transparent=IlTrue, const char *filename=0, IlUShort index=((IlUShort)-1))
 Adds a page to the notebook. More...
 
virtual IlBoolean allowDragDrop () const
 Indicates whether drag-and-drop operations are allowed for the notebook. More...
 
void allowDragDrop (IlBoolean allow)
 Specifies whether drag-and-drop operations should be allowed for the notebook. More...
 
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem, IlAny)
 Applies the specified function to all the items of the holder. More...
 
IlBoolean areLabelsVertical () const
 Returns IlTrue if the tab labels are drawn vertically. More...
 
virtual IlBoolean changeSelection (IlUShort index, IlBoolean redraw)
 Changes the selected page of the notebook. More...
 
virtual IlvGadgetItemcreateItem (const char *, IlvGraphic *=0, IlvBitmap *=0, IlvBitmap *=0, IlBoolean=IlTrue) const
 Returns a new gadget item. More...
 
virtual IlvViewcreateView (IlvNotebookPage *page, IlvAbstractView *parent, const IlvRect &size)
 Is called by the pages to create their views. More...
 
virtual void deleteView (IlvNotebookPage *page)
 Is called by the pages to delete their views. More...
 
void ensureVisible (IlUShort index, IlBoolean redraw)
 Ensures that a given tab is visible. More...
 
void flipLabels (IlBoolean value)
 Changes the display style of the notebook tabs labels. More...
 
IlUShort getFirstVisibleTab () const
 Return the index of the first visible tab. More...
 
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the orientation of tab labels. More...
 
virtual IlvPosition getLabelPosition () const
 Returns the default position of the notebook tabs labels. More...
 
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
IlvNotebookPagegetPage (const char *name) const
 Returns a notebook page using its name. More...
 
virtual void getPageArea (IlvRect &rect, const IlvTransformer *t=0) const
 Returns the bounding box of the page area. More...
 
IlvDim getPageBottomMargin () const
 Returns the bottom margin between the notebook border and the page area. More...
 
IlvDim getPageLeftMargin () const
 Returns the left margin between the notebook border and the page area. More...
 
IlvDim getPageRightMargin () const
 Returns the right margin between the notebook border and the page area. More...
 
IlvNotebookPage ** getPages () const
 Returns the internal array of notebook pages. More...
 
IlUShort getPagesCardinal () const
 Returns the number of pages of the notebook. More...
 
IlvDim getPageTopMargin () const
 Returns the top margin between the notebook border and the page area. More...
 
IlvViewgetParent () const
 Returns the view where the notebook is displayed. More...
 
IlvNotebookPagegetSelectedPage () const
 Returns a pointer to the IlvNotebookPage object corresponding to the selected page. More...
 
IlUShort getSelectedPageIndex () const
 Returns the index of the selected page. More...
 
IlvPosition getTabsPosition () const
 Returns the position of the tabs. More...
 
IlvDim getXMargin () const
 Returns the x margin of the notebook. More...
 
IlvDim getYMargin () const
 Returns the y margin of the notebook. More...
 
virtual IlBoolean isShowingLabel () const
 A Boolean indicating whether or not the notebook tabs labels are displayed. More...
 
virtual IlBoolean isShowingPicture () const
 A Boolean indicating whether or not the notebook tabs pictures are displayed. More...
 
IlBoolean mustFlipLabels () const
 Returns IlTrue if the labels of the notebook tabs are flipped. More...
 
virtual void pageDeselected (IlvNotebookPage *page)
 Is called when a page is deselected. More...
 
virtual void pageResized (IlvNotebookPage *page)
 Is called when a page is resized. More...
 
virtual void pageSelected (IlvNotebookPage *page)
 Is called when a page is selected. More...
 
virtual IlShort pointToTabIndex (const IlvPoint &point, const IlvTransformer *t) const
 Returns the index of the tab located at the specified position. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
void removePage (IlUShort index, IlBoolean destroy=IlTrue)
 Removes a page of the notebook. More...
 
void setFirstVisibleTab (IlUShort index)
 Changes the first visible tab. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Set the orientation of tab labels. More...
 
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the matrix items labels. More...
 
void setLabelsVertical (IlBoolean value)
 Changes the orientation of the labels. More...
 
void setPageBottomMargin (IlvDim margin)
 Changes the bottom margin between the notebook border and the page area. More...
 
void setPageLeftMargin (IlvDim margin)
 Changes the left margin between the notebook border and the page area. More...
 
void setPageRightMargin (IlvDim margin)
 Changes the right margin between the notebook border and the page area. More...
 
void setPageTopMargin (IlvDim margin)
 Changes the top margin between the notebook border and the page area. More...
 
void setSelectedPageIndex (IlUShort index)
 Changes the selected page index. More...
 
void setTabsPosition (IlvPosition position)
 Changes the position of the tabs. More...
 
void setXMargin (IlvDim x)
 Changes the x margin of the notebook. More...
 
void setYMargin (IlvDim y)
 Changes the y margin of the notebook. More...
 
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the notebook tabs labels. More...
 
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Shows or hides the pictures associated with the notebook tabs. More...
 
- Public Member Functions inherited from IlvGadgetItemHolder
virtual void drawGadgetItem (const IlvGadgetItem *item, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a specific gadget item. More...
 
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. More...
 
virtual void reDrawItems ()
 Ends a redraw session. More...
 
void setDragDropTarget (IlvGadgetItem *item)
 Sets the target item of a drag-and-drop operation. More...
 
void setDraggedImage (IlvGraphic *graphic)
 Sets the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
void setDraggedItem (IlvGadgetItem *item)
 Sets the dragged item. More...
 

Static Public Member Functions

static IlSymbolPageDeselectedCallbackType ()
 Returns the callback type for the Page Deselected callback. More...
 
static IlSymbolPageResizedCallbackType ()
 Returns the callback type for the Page Resized callback. More...
 
static IlSymbolPageSelectedCallbackType ()
 Returns the callback type for the Page Selected callback. More...
 
- Static Public Member Functions inherited from IlvGadgetItemHolder
static IlSymbolAbortDragItemCallbackType ()
 Returns the callback type of the Abort Drag callback. More...
 
static IlSymbolAbortEditItemCallbackType ()
 Returns the callback type of the Abort Edit callback. More...
 
static IlSymbolActivateCallbackType ()
 Returns the callback type of the Activate callback. More...
 
static IlSymbolDragItemCallbackType ()
 Returns the callback type of the Drag Item callback. More...
 
static IlSymbolEndDragItemCallbackType ()
 Returns the callback type of the End Drag callback. More...
 
static IlSymbolEndEditItemCallbackType ()
 Returns the callback type of the End Edit callback. More...
 
static IlSymbolStartDragItemCallbackType ()
 Returns the callback type of the Start Drag callback. More...
 
static IlSymbolStartEditItemCallbackType ()
 Returns the callback type of the Start Edit callback. More...
 

Friends

class IlvDefaultNotebookLFHandler
 
class IlvNotebookMLFHandler
 
class IlvNotebookPage
 
class IlvNotebookVXLFHandler
 
class IlvNotebookWLFHandler
 

Additional Inherited Members

- Protected Member Functions inherited from IlvGadgetItemHolder
virtual void abortDragItem ()
 Is called when a drag-and-drop operation is aborted. More...
 
virtual void abortEdit (IlvGadgetItem *item)
 Is called when the editing of the specified item is aborted. More...
 
virtual void drawDraggedImage (const IlvPoint &point, const IlvTransformer *t)
 Is called to draw the ghost image during a drag-and-drop operation. More...
 
virtual void endDragItem (const IlvPoint &point)
 Is called when a drag-and-drop operation is finished. More...
 
virtual void endEdit (IlvGadgetItem *item)
 Is called after an item has been edited. More...
 
virtual void itemActivated (IlvGadgetItem *item)
 Is called when an item is activated. More...
 
virtual void itemDeSelected (IlvGadgetItem *item)
 Is called when an item is deselected. More...
 
virtual void itemDragged (const IlvPoint &point)
 Is called each time the user moves the mouse during a drag-and-drop operation. More...
 
virtual void itemHighlighted (IlvGadgetItem *item)
 Is called when an item is highlighted or unhighlighted. More...
 
virtual void itemSelected (IlvGadgetItem *item)
 Is called when an item is selected. More...
 
virtual void startDragItem (IlvGadgetItem *item)
 Is called when a drag-and-drop operation begins. More...
 
virtual void startEdit (IlvGadgetItem *item)
 Is called when an item is edited. More...
 

Detailed Description

Gadget class.

Library: ilvadvgdt

IlvNotebook is a predefined gadget class that simulates a real notebook. It allows the user to select the pages of the notebook by using the pointing device.


- IlvNotebook and IlvNotebookPage -


You can customize the notebook to meet your specific application requirements:

Each page of the notebook is implemented by the class IlvNotebookPage. The default implementation of this class is to create an IlvGadgetContainer that displays the contents of the page.

See also
IlvNotebookPage.

Accessors

Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue(), IlvValueInterface::queryValues(), IlvValueInterface::changeValue(), IlvValueInterface::changeValues(). This class inherits the accessors of its superclass IlvGadget and adds the following ones:

Data accessors

Name Type Equivalent methods
count UInt getPagesCardinal()
selectedPage UInt getSelectedPageIndex(), changeSelection()
tabsPosition Direction getTabsPosition(), setTabsPosition()
verticalLabels Boolean areLabelsVertical(), setLabelsVertical()
flipLabels Boolean mustFlipLabels(), flipLabels()
flipLabel Boolean getLabelOrientation(), flipLabels()
showLabel Boolean isShowingLabel(), showLabel()
showPicture Boolean isShowingPicture(), showPicture()
labelPosition Direction getLabelPosition(), setLabelPosition()
labelOrientation Direction getLabelOrientation(), setLabelOrientation()
dragdrop Boolean allowDragDrop() const, allowDragDrop(IlBoolean)
tabXMargin UInt getXMargin(), setXMargin()
tabYMargin UInt getYMargin(), setYMargin()
topPageMargin UInt getPageTopMargin(), setPageTopMargin()
bottomPageMargin UInt getPageBottomMargin(), setPageBottomMargin()
leftPageMargin UInt getPageLeftMargin(), setPageLeftMargin()
rightPageMargin UInt getPageRightMargin(), setPageRightMargin()
firstVisible UInt getFirstVisibleTab(), setFirstVisibleTab()
pageArea Object getPageArea()
parent Object getParent()

Method accessors

Name Return type Equivalent methods
ensureVisible(UInt index) Void ensureVisible()
getPage(UInt index) Object getPages()[index]
getPageByName(String name) Object getPage(const char* name) const

Styling

This class supports the following CSS properties:

Graphic property CSS property Type
Background color background-colorColor
Text color color Color

Constructor & Destructor Documentation

IlvNotebook::IlvNotebook ( IlvDisplay display,
const IlvRect rect,
IlvPosition  tabsPosition = IlvTop,
IlBoolean  verticalLabels = IlFalse,
IlBoolean  flipLabels = IlFalse,
IlvDim  xMargin = 5,
IlvDim  yMargin = 2,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvNotebook class.

Parameters
displayThe display connection.
rectThe size and position of the notebook.
tabsPositionSee the getTabsPosition() method for the definition of this parameter.
verticalLabelsA Boolean specifying whether to draw the labels of the tabs vertically or not.
flipLabelsA Boolean specifying whether to draw the labels of the tabs from the top to the bottom, or from the bottom to the top. This parameter is only used in case of vertical labels, that is, if verticalLabels is IlTrue.
xMarginThe margin between the tab and its label. See getXMargin() for more informations.
yMarginThe margin between the tab and its label. See getYMargin() for more informations.
thicknessThe gadget thickness.
paletteThe palette used by the notebook.

Member Function Documentation

IlvNotebookPage* IlvNotebook::addPage ( IlvNotebookPage page,
IlUShort  index = ((IlUShort)-1) 
)

Adds a page to the notebook.

Parameters
pageThe page that will be added.
indexThe index where page will be added.
Returns
The parameter page.
See also
removePage(), addPage(const char*, IlvBitmap*, IlBoolean, const char*, IlUShort).
IlvNotebookPage* IlvNotebook::addPage ( const char *  label,
IlvBitmap bitmap = 0,
IlBoolean  transparent = IlTrue,
const char *  filename = 0,
IlUShort  index = ((IlUShort)-1) 
)

Adds a page to the notebook.

Creates a new IlvNotebookPage and adds it to the notebook at the position index.

Parameters
labelThe tab label.
bitmapThe tab bitmap
transparentObsolete.
filenameThe name of the .ilv file to load onto the page.
indexThe position where to add the page.
See also
addPage(IlvNotebookPage*, IlUShort).
virtual IlBoolean IlvNotebook::allowDragDrop ( ) const
virtual

Indicates whether drag-and-drop operations are allowed for the notebook.

Returns
IlTrue if drag-and-drop operations are allowed and IlFalse otherwise.
See also
IlvGadgetItemHolder::startDragItem(), IlvGadgetItemHolder::allowDragDrop(IlBoolean).

Reimplemented from IlvGadgetItemHolder.

void IlvNotebook::allowDragDrop ( IlBoolean  allow)

Specifies whether drag-and-drop operations should be allowed for the notebook.

Parameters
allowA Boolean value specifying whether drag-and-drop operations should be allowed (IlTrue).
See also
IlvGadgetItemHolder::startDragItem(), IlvGadgetItemHolder::allowDragDrop().
virtual IlvGadgetItem* IlvNotebook::applyToItems ( IlvApplyGadgetItem  func,
IlAny  arg 
)
virtual

Applies the specified function to all the items of the holder.

Parameters
funcThe function to be applied.
argThe argument that will be passed to the function func.
Returns
The item that stopped the operation.
See also
IlvApplyGadgetItem, recomputeAllItems(), getItemByName().

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvNotebook::areLabelsVertical ( ) const

Returns IlTrue if the tab labels are drawn vertically.

Each tab of the notebook can contain a label, which can be drawn horizontally or vertically.

Returns
IlTrue if the tab labels are drawn vertically.
See also
setLabelsVertical(), getLabelPosition(), getTabsPosition().
virtual IlBoolean IlvNotebook::changeSelection ( IlUShort  index,
IlBoolean  redraw 
)
virtual

Changes the selected page of the notebook.

The page must be sensitive (see the IlvNotebookPage::isSensitive() method). The method pageDeselected() is called on the previous selected page, and the method pageSelected() on the new selected page.

Returns
IlTrue if the page has been successfully selected.
Parameters
indexThe index of the page (or tab).
redrawSpecifies whether the gadget should be redrawn.
See also
setFirstVisibleTab().
virtual IlvGadgetItem* IlvNotebook::createItem ( const char *  label,
IlvGraphic graphic = 0,
IlvBitmap bitmap = 0,
IlvBitmap selbitmap = 0,
IlBoolean  copy = IlTrue 
) const
virtual

Returns a new gadget item.

You can override this member function in a subclass to create your own items.

Parameters
labelThe item label.
graphicThe IlvGraphic object representing the picture associated with the item.
bitmapThe IlvBitmap object representing the picture associated with the item.
selbitmapThe IlvBitmap object representing the picture of the item when it is selected.
copySpecifies whether a label should be copied. If the value is IlFalse, then you must allocate some memory for the label because in any case the label characters are deleted from the memory by the IlvGadgetItem.
Note
If both the second and third parameters are not 0, only the second parameter is used.
Returns
The created gadget item.

Reimplemented from IlvGadgetItemHolder.

virtual IlvView* IlvNotebook::createView ( IlvNotebookPage page,
IlvAbstractView parent,
const IlvRect size 
)
virtual

Is called by the pages to create their views.

The default implementation is to call the IlvNotebookPage::createView() method. You can overload this method to create another kind of view. Overloading this method means creating a view. The parent of this new view must be parent and the size of the view must be size. The view must be created invisible. If you overload this method, the IlvNotebookPage::createView() method is no longer called.

Parameters
pageThe page that requested the view creation.
parentThe parent of the view to be created.
sizeThe size of the view to be created.
Returns
The created view of the notebook page.
See also
deleteView(), IlvNotebookPage::createView().
virtual void IlvNotebook::deleteView ( IlvNotebookPage page)
virtual

Is called by the pages to delete their views.

The default implementation is to call the IlvNotebookPage::deleteView() method. If you overload this method, the IlvNotebookPage::deleteView() method is no longer called.

Parameters
pageThe page that requested the view deletion.
See also
createView(), IlvNotebookPage::deleteView().
void IlvNotebook::ensureVisible ( IlUShort  index,
IlBoolean  redraw 
)

Ensures that a given tab is visible.

Ensures that the tab with the index index becomes visible. This does not change the selected tab.

Parameters
indexThe tab index.
redrawSpecifies whether the gadget should be redrawn.
See also
changeSelection(), getFirstVisibleTab().
void IlvNotebook::flipLabels ( IlBoolean  value)

Changes the display style of the notebook tabs labels.

See the method mustFlipLabels().

Parameters
valueSpecifies whether or not that labels of the notebook tabs should be flipped.
See also
mustFlipLabels(), setLabelsVertical().
IlUShort IlvNotebook::getFirstVisibleTab ( ) const

Return the index of the first visible tab.

Returns
The index (starting at 0) of the first visible tab. If this value is not 0, some tabs are not visible and the scrolling arrows are visible.
See also
setFirstVisibleTab(), changeSelection(), ensureVisible().
virtual void IlvNotebook::getLabelOrientation ( IlvOrientation orientation,
IlBoolean flip 
) const
virtual

Returns the orientation of tab labels.

The orientation may be IlvHorizontal or IlvVertical.

Parameters
orientationReturn value for the label orientation.
flipReturn value indicating if labels are drawn top to bottom or bottom to top. This value is only meaningful if the orientation is IlvVertical.
See also
areLabelsVertical(), mustFlipLabels()

Reimplemented from IlvGadgetItemHolder.

virtual IlvPosition IlvNotebook::getLabelPosition ( ) const
virtual

Returns the default position of the notebook tabs labels.

Returns
The default position of the labels associated with the notebook tabs relative to their picture.
See also
setLabelPosition().

Reimplemented from IlvGadgetItemHolder.

virtual IlvPalette* IlvNotebook::getNormalTextPalette ( ) const
virtual

Returns the default palette used to draw an item.

Returns
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

virtual IlvPalette* IlvNotebook::getOpaquePalette ( ) const
virtual

Returns the opaque palette used to draw opaque items.

Returns
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

IlvNotebookPage* IlvNotebook::getPage ( const char *  name) const

Returns a notebook page using its name.

Parameters
nameThe name of the page.
Returns
The specified notebook page or 0 if the specified page is not in the notebook.
See also
IlvNotebookPage::getName().
virtual void IlvNotebook::getPageArea ( IlvRect rect,
const IlvTransformer t = 0 
) const
virtual

Returns the bounding box of the page area.

Puts in rect the rectangle of the page area with the page margin having already been taken into account.

Parameters
rectThe returned bounding box of the page area.
tThe transformer applied to the notebook.
See also
getPageRightMargin(), getPageTopMargin(), getPageLeftMargin(), getPageBottomMargin().
IlvDim IlvNotebook::getPageBottomMargin ( ) const

Returns the bottom margin between the notebook border and the page area.

Returns
The bottom margin between the notebook border and the page area.
See also
setPageBottomMargin(), getPageTopMargin(), getPageLeftMargin(), getPageRightMargin(), getPageArea().
IlvDim IlvNotebook::getPageLeftMargin ( ) const

Returns the left margin between the notebook border and the page area.

Returns
The left margin between the notebook border and the page area.
See also
setPageLeftMargin(), getPageBottomMargin(), getPageTopMargin(), getPageRightMargin(), getPageArea().
IlvDim IlvNotebook::getPageRightMargin ( ) const

Returns the right margin between the notebook border and the page area.

Returns
The right margin between the notebook border and the page area.
See also
setPageRightMargin(), getPageBottomMargin(), getPageLeftMargin(), getPageTopMargin(), getPageArea().
IlvNotebookPage** IlvNotebook::getPages ( ) const

Returns the internal array of notebook pages.

To get the first page of the notebook, you can use notebook->getPages()[0].

Returns
The internal array of notebook pages.
See also
getPage().
IlUShort IlvNotebook::getPagesCardinal ( ) const

Returns the number of pages of the notebook.

Returns
the number of pages of the notebook.
See also
addPage().
IlvDim IlvNotebook::getPageTopMargin ( ) const

Returns the top margin between the notebook border and the page area.

Returns
The top margin between the notebook border and the page area.
See also
setPageTopMargin(), getPageBottomMargin(), getPageLeftMargin(), getPageRightMargin(), getPageArea().
IlvView* IlvNotebook::getParent ( ) const

Returns the view where the notebook is displayed.

Returns
The view where the notebook is displayed, or 0 if the notebook has not been added to any holder.
IlvNotebookPage* IlvNotebook::getSelectedPage ( ) const

Returns a pointer to the IlvNotebookPage object corresponding to the selected page.

Returns
A pointer to the IlvNotebookPage object corresponding to the selected page.
See also
getSelectedPageIndex().
IlUShort IlvNotebook::getSelectedPageIndex ( ) const

Returns the index of the selected page.

Returns
The index of the selected page.
See also
getSelectedPage().
IlvPosition IlvNotebook::getTabsPosition ( ) const

Returns the position of the tabs.

Tabs can be displayed on any side of the notebook (IlvTop, IlvRight, IlvLeft, IlvBottom).

Returns
The position of the tabs.
See also
setTabsPosition(), getLabelPosition(), areLabelsVertical().
IlvDim IlvNotebook::getXMargin ( ) const

Returns the x margin of the notebook.

This margin is the horizontal space between the border of the tab and the tab label. This margin becomes a vertical space when labels are drawn vertically.

Returns
The x margin of the notebook.
See also
setXMargin(), getYMargin().
IlvDim IlvNotebook::getYMargin ( ) const

Returns the y margin of the notebook.

This margin is the vertical space between the border of the tab and the tab label. This margin becomes a horizontal space when labels are drawn horizontally.

Returns
The y margin of the notebook.
See also
setYMargin(), getXMargin().
virtual IlBoolean IlvNotebook::isShowingLabel ( ) const
virtual

A Boolean indicating whether or not the notebook tabs labels are displayed.

Returns
IlTrue if the labels associated with the tabs of the notebook are displayed.
See also
showLabel().

Reimplemented from IlvGadgetItemHolder.

virtual IlBoolean IlvNotebook::isShowingPicture ( ) const
virtual

A Boolean indicating whether or not the notebook tabs pictures are displayed.

Returns
IlTrue if the pictures associated with the notebook tabs are displayed.
See also
showPicture().

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvNotebook::mustFlipLabels ( ) const

Returns IlTrue if the labels of the notebook tabs are flipped.

Returns
IlTrue if the labels of the notebook tabs are flipped, IlFalse otherwise. When the labels of the tabs are displayed vertically; see the method setLabelsVertical(), the label can be written from top to bottom, or from bottom to top. When the label is displayed from bottom to top, the label is said to be flipped.
See also
flipLabels(), setLabelsVertical().
virtual void IlvNotebook::pageDeselected ( IlvNotebookPage page)
virtual

Is called when a page is deselected.

Is called by the changeSelection() method. The default implementation is to call the IlvNotebookPage::deSelect() method and the Page Deselected callback.

Parameters
pageThe notebook page.
See also
pageSelected(), PageDeselectedCallbackType.
static IlSymbol* IlvNotebook::PageDeselectedCallbackType ( )
static

Returns the callback type for the Page Deselected callback.

The Page Deselected callback is called when a page has bee deselected, that is, a new page has been selected.

Returns
The callback type for the Page Deselected callback.
See also
pageDeselected(), changeSelection().
virtual void IlvNotebook::pageResized ( IlvNotebookPage page)
virtual

Is called when a page is resized.

The default implementation is to call the IlvNotebookPage::resized() method and the Page Resized callback.

Parameters
pageThe notebook page.
See also
PageResizedCallbackType.
static IlSymbol* IlvNotebook::PageResizedCallbackType ( )
static

Returns the callback type for the Page Resized callback.

The Page Resized callback is called when the page area of the notebook is resized. This occurs when the notebook itself is resized, or when the the tabs position changes for example.

Returns
The callback type for the Page Resized callback.
See also
pageResized().
virtual void IlvNotebook::pageSelected ( IlvNotebookPage page)
virtual

Is called when a page is selected.

Is called by the() changeSelection method. The default implementation is to call the IlvNotebookPage::select() method and the Page Selected callback.

Parameters
pageThe notebook page.
See also
pageDeselected(), PageSelectedCallbackType.
static IlSymbol* IlvNotebook::PageSelectedCallbackType ( )
static

Returns the callback type for the Page Selected callback.

The Page Selected callback is called when a new page has been selected.

Returns
The callback type for the Page Selected callback.
See also
pageSelected(), changeSelection().
virtual IlShort IlvNotebook::pointToTabIndex ( const IlvPoint point,
const IlvTransformer t 
) const
virtual

Returns the index of the tab located at the specified position.

The method calls getTabRect() for all the visible pages, and returns the one that contains point.

Parameters
pointThe position in view coordinates.
tThe transformer applied to the notebook list.
Returns
The index of the tab located at the position specified by point when this notebook is displayed with the transformer t. If no tab contains point, the method returns -1.
See also
getTabRect().
virtual void IlvNotebook::recomputeAllItems ( )
virtual

Recomputes the size of all the items managed by the holder.

Calls the IlvGadgetItem::recomputeSize() member function for all the items managed by this holder.

See also
IlvGadgetItem::recomputeSize(), applyToItems().

Reimplemented from IlvGadgetItemHolder.

void IlvNotebook::removePage ( IlUShort  index,
IlBoolean  destroy = IlTrue 
)

Removes a page of the notebook.

A notebook must have at least one page to work properly. You can remove all the pages to change them, but you must then add at least one page.

Parameters
indexThe index of the page to remove.
destroyA Boolean specifying whether to destroy the page that will be removed.
See also
addPage().
void IlvNotebook::setFirstVisibleTab ( IlUShort  index)

Changes the first visible tab.

This only scrolls the tabs and does not change the selected page.

Parameters
indexThe new first visible tab index.
See also
getFirstVisibleTab(), changeSelection(), ensureVisible().
void IlvNotebook::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse,
IlBoolean  redraw = IlTrue 
)

Set the orientation of tab labels.

Parameters
orientationIndicates the new orientation of labels. May be IlvHorizontal or IlvVertical.
flipSpecifies whether tab labels should be flipped.
redrawIf set to IlTrue, the notebook is redrawn.
See also
setLabelsVertical(), flipLabels().
void IlvNotebook::setLabelPosition ( IlvPosition  position,
IlBoolean  redraw = IlTrue 
)

Sets the default position of the matrix items labels.

This setting is used to compute the geometry of each notebook tab For more information, see the member function IlvGadgetItem::setLabelPosition().

Parameters
positionThe new position of the labels relative to pictures of notebook tabs.
redrawSpecifies whether the gadget should be redrawn.
See also
getLabelPosition(), IlvGadgetItem::setLabelPosition().
void IlvNotebook::setLabelsVertical ( IlBoolean  value)

Changes the orientation of the labels.

Each tab of the notebook can contain a label, which can be drawn horizontally or vertically.

Parameters
valueSpecifies whether or not the labels of the notebook tabs should be drawn vertically.
See also
areLabelsVertical(), setLabelPosition(), setTabsPosition().
void IlvNotebook::setPageBottomMargin ( IlvDim  margin)

Changes the bottom margin between the notebook border and the page area.

Parameters
marginThe new margin.
See also
getPageBottomMargin(), setPageTopMargin(), setPageLeftMargin(), setPageRightMargin().
void IlvNotebook::setPageLeftMargin ( IlvDim  margin)

Changes the left margin between the notebook border and the page area.

Parameters
marginThe new margin.
See also
getPageLeftMargin(), setPageBottomMargin(), setPageTopMargin(), setPageRightMargin().
void IlvNotebook::setPageRightMargin ( IlvDim  margin)

Changes the right margin between the notebook border and the page area.

Parameters
marginThe new margin.
See also
getPageRightMargin(), setPageBottomMargin(), setPageLeftMargin(), setPageTopMargin().
void IlvNotebook::setPageTopMargin ( IlvDim  margin)

Changes the top margin between the notebook border and the page area.

Parameters
marginThe new margin.
See also
getPageTopMargin(), setPageBottomMargin(), setPageLeftMargin(), setPageRightMargin().
void IlvNotebook::setSelectedPageIndex ( IlUShort  index)

Changes the selected page index.

Unlike the method changeSelection(), this method does not call any other methods.

Parameters
indexThe new selected page index.
See also
changeSelection().
void IlvNotebook::setTabsPosition ( IlvPosition  position)

Changes the position of the tabs.

Tabs can be displayed on any side of the notebook (IlvTop, IlvRight, IlvLeft, IlvBottom).

Parameters
positionThe new tabs position.
See also
getTabsPosition(), setLabelPosition(), setLabelsVertical().
void IlvNotebook::setXMargin ( IlvDim  x)

Changes the x margin of the notebook.

See the method getXMargin().

Parameters
xThe new x margin of the notebook.
See also
getXMargin(), setYMargin().
void IlvNotebook::setYMargin ( IlvDim  y)

Changes the y margin of the notebook.

See the method getYMargin().

Parameters
yThe new y margin of the notebook.
See also
getYMargin(), setXMargin().
void IlvNotebook::showLabel ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the notebook tabs labels.

Parameters
valueA Boolean specifying whether the notebook should show the the labels associated with its tabs.
redrawA Boolean specifying whether the gadget should be redrawn.
See also
isShowingLabel().
void IlvNotebook::showPicture ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Shows or hides the pictures associated with the notebook tabs.

Parameters
valueA Boolean specifying whether the notebook should show the the pictures associated with its tabs.
redrawA Boolean specifying whether the gadget should be redrawn.
See also
isShowingPicture().

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.