The INotebook class is a wrapper for the notebook control. The notebook is a control that is useful in organizing related information on individual pages so that a user can quickly find and display the information. Use an object of this class to create and manage a notebook control.
A notebook control consists of the following items, and this class provides member functions that support each of these items:
The INotebook class supports both the CUA '91 notebook control and the Windows tab control on the Windows platform. The CUA '91 notebook control is a ported version of the OS/2 Presentation Manager notebook control. It has the same look-and-feel as the OS/2 Presentation Manager notebook control. The Windows tab control is a control that is native to the Windows environment.
Use the style, INotebook::pmCompatible, to select the CUA '91 notebook control in the Windows environment. The Windows tab control is the default selection.
Both the OS/2 and AIX environments support only a CUA '91 notebook. Use of the INotebook::pmCompatible style has no effect in these environments.
Since the Windows tab control does not provide several of the features available with the pmCompatible notebook, portable applications requiring these features should use the pmCompatible notebook in the Windows environment.
Color
There are restrictions for specifying the color of controls based on the platform and which style of control you use.
The INotebook class supports a notebook control compatible with the CUA '91 notebook control available on OS/2 and with the pmCompatible notebook on Windows.
The INotebook class will use the Windows tab control unless the INotebook::pmCompatible style is specified in the INotebook constructor.
The INotebook's implementation of the Windows tab control only supports major tab pages. However, it will convert all minor and non-tab pages in your existing application to major tab pages. The placement of the major tabs is at the top of the control and their shape is rounded. Tab orientation and shape settings are ignored. The Windows tab control only supports rounded major tabs with their orientation limited to the top of the control. Tab text alignment for the Windows tab control is center. Tab text alignment settings are ignored.
The Windows tab control automatically sizes the tabs, unless you specify a size via INotebook::setMajorTabSize.
The Windows tab control allows both a bitmap and text on the same tab. The capability to set both a bitmap and text on the same tab is supported by the INotebook class.
The Windows tab control supports multiple rows of tabs that keep all of the tabs visible to the user. Specify the notebook style, INotebook::allTabsVisible, during INotebook construction to make all of the tabs visible.
The Windows tab control supports owner drawing of the tabs. However, you must specify the notebook style, INotebook::handleDrawTabs, during INotebook construction to enable the owner draw support. The owner-drawn tabs must all be the same width.
The Windows tab control contains no binding or back pages area. The INotebook's implementation of this control ignores the binding and back pages settings.
The Windows tab control contains no status text line. The INotebook's implementation of this control ignores the status text and text alignment settings.
The Windows tab control contains no page buttons. The INotebook's implementation of this control ignores the page button settings.
The Windows tab control does not provide color support APIs. All tab control colors are based upon the default system colors. The INotebook's implementation of this control ignores the color settings.
Constructors & Destructor
You can construct and destruct objects of this class. This class supports the same
three standard constructors that all of the control classes in the Open Class Library support.
Note:
![]() |
public:
virtual ~INotebook()
This destructor destroys the notebook control window only if the Open Class Library created it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
INotebook(unsigned long windowId, IWindow* parentAndOwner)
Use this version of the constructor if you want to wrapper a notebook control
that is loaded from a dialog resource.
Note:
| IInvalidParameter | The notebook object was not created. The creation failed because the pointer to the parent and owner window object cannot be 0. |
| Windows | OS/2 | AIX |
| Yes | Yes | No |
public:
INotebook(const IWindowHandle& handle)
Use this version of the constructor to wrapper an existing notebook control window.
| Windows | OS/2 | AIX |
| Yes | Yes | No |
public:
INotebook( unsigned long windowId, IWindow* parent, IWindow* owner, const IRectangle& initial = IRectangle ( ), const Style& style = defaultStyle ( ) )
Use this version of the constructor to create a new notebook control window and a corresponding INotebook object.
| IInvalidParameter | The notebook object was not created. The creation failed because the pointer to the parent window object cannot be 0. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Application DataUse these members to set the application data associated with a notebook page.
![]() |
public:
virtual INotebook& setUserData( const IPageHandle& referencePage, unsigned long userData )
Sets the application data into the specified page's reserved storage. Each page has a 4-byte reserved storage area. This area is available for information required by your application.
| IAccessError | The user data was not set for the specified page. The page identifier (ID) of the notebook page may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Binding SupportUse these members to query and set the notebook's binding.
![]() |
public:
virtual Binding binding() const
Returns the type of binding used for the notebook. The return value is a Binding enumerator.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setBinding(Binding binding)
Sets the type of binding for the notebook.
| IInvalidParameter | The binding style was not set. The binding parameter is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
ColorsUse these members to set and query the color of different areas of the notebook.
![]() |
public:
virtual IColor backgroundColor() const
Returns the background color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Returns the default background color of the notebook.
![]() |
public:
virtual IColor hiliteBackgroundColor() const
Returns the notebook's highlight background color or the default color value if no highlight background color for the notebook has been set.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Returns the notebook's default highlight background color.
![]() |
public:
virtual IColor majorTabBackgroundColor() const
Returns the major tab background color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IColor majorTabForegroundColor() const
Returns the major tab foreground color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IColor minorTabBackgroundColor() const
Returns the minor tab background color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IColor minorTabForegroundColor() const
Returns the minor tab foreground color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IColor pageBackgroundColor() const
Returns the page background color of the notebook or the default if you have not set it.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& resetMajorTabBackgroundColor()
Resets the major tab background color by changing to the major tab background color that was previously set.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& resetMajorTabForegroundColor()
Resets the major tab foreground color by changing to the major tab foreground color that was previously set.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& resetMinorTabBackgroundColor()
Resets the minor tab background color by changing to the minor tab background color that was previously set.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& resetMinorTabForegroundColor()
Resets the minor tab foreground color by changing to the minor tab foreground color that was previously set.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& resetPageBackgroundColor()
Resets the page background color by changing to the page background color that was previously set.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& setBackgroundColor(const IColor& color)
Sets the notebook's background color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setForegroundColor(const IColor& color)
Sets the notebook's foreground color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setMajorTabBackgroundColor( const IColor& color )
Sets the major tab background color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setMajorTabForegroundColor( const IColor& color )
Sets the major tab foreground color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setMinorTabBackgroundColor( const IColor& color )
Sets the minor tab background color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setMinorTabForegroundColor( const IColor& color )
Sets the minor tab foreground color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setPageBackgroundColor( const IColor& color )
Sets the page background color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Font SupportUse these members to query and set the font of the notebook.
![]() |
public:
virtual IFont font() const
Returns the font used by the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setFont(const IFont& font)
Sets the font of the notebook to the indicated font. Notebook pages that do not have their own assigned font will inherit this font.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
ImplementationThese members provide utilities used to implement this class.
![]() |
protected:
virtual INotebook& setColor( unsigned long colorArea, const IColor& color )
Sets the colorArea to the indicated color.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Layout SupportUse these members to support the layout of a notebook within a canvas.
![]() |
public:
virtual INotebook& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
Provides notification to the notebook that its layout needs to be updated. The notebook objects responds to font change notifications. The notebook will propogate the new font to its page windows.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual ISize calcMinimumSize() const
Returns the minimum recommended size for this notebook. This size is large enough to contain the largest application page window that is currently in the notebook. This function calls notebookSize.
| IAccessError | The minimum size was not calculated. The coordinates of the notebook or application page window may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Native Control SupportUse these members for native control support.
![]() |
public:
bool isPMCompatible() const
Returns true if the INotebook object represents a CUA '91 notebook control. False is returned if the INotebook object represents a Windows tab control.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
Always returns true.
Always returns true.
Notification MembersUse these INotificationId strings for all notifications that INotebook provides to its observers.
![]() |
public:
virtual IWindow& enableNotification(bool enable = true)
Enables the notebook to send notifications to any observer objects.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const majorTabBackgroundColorId
Notification identifier provided to observers when the major tab background color of the notebook control changes.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const majorTabForegroundColorId
Notification identifier provided to observers when the major tab foreground color of the notebook control changes.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const minorTabBackgroundColorId
Notification identifier provided to observers when the minor tab background color of the notebook control changes.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const minorTabForegroundColorId
Notification identifier provided to observers when the minor tab foreground color of the notebook control changes.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const orientationId
Notification identifier provided to observers when the orientation style of the notebook control changes. INotebook provides the new orientation value in the INotificationEvent::eventData field of the INotificationEvent. This value is one of the predefined Orientation enumeration values defined in this class.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static INotificationId const pageBackgroundColorId
Notification identifier provided to observers when the page background color of the notebook control changes.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
OrientationUse these members to query and set the orientation of the corner of the back pages of a notebook in relation to the location of the major tabs. The back pages are the recessed edges that give the notebook a three-dimensional effect.
![]() |
public:
virtual Orientation orientation() const
Returns the current orientation of the notebook, which is the location of the major tabs in relation to the back pages' corner. The return value is an Orientation enumerator.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setOrientation(Orientation orientation)
Sets the orientation of the back pages' corner in relation to the location of the major tabs.
| IInvalidParameter | The orientation style was not set. The orientation parameter is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Page AdditionUse these members to add a page to a notebook.
![]() |
public:
virtual IPageHandle addFirstPage( const PageSettings& pageInfo, IWindow* pageWindow = 0 )
Adds a page as the first page in the notebook using the
specified page settings. If pageWindow is 0, a page with the
indicated settings, but no application page window, is added to the notebook.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IPageHandle addLastPage( const PageSettings& pageInfo, IWindow* pageWindow = 0 )
Adds a page as the last page in the notebook using the
specified page settings. If pageWindow is 0, a page with the
indicated settings, but no application page window, is added to the notebook.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Adds a page to the notebook following the specified page using the
specified page settings. If pageWindow is 0, a page with the
indicated settings, but no application page window, is added to the notebook.
Note:
public:
virtual IPageHandle addPageAfter( const PageSettings& pageInfo, const Cursor& cursor, IWindow* pageWindow = 0 )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual IPageHandle addPageAfter( const PageSettings& pageInfo, const IPageHandle& referencePage, IWindow* pageWindow = 0 )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Adds a page to the notebook before the specified page using the
specified page settings. If pageWindow is 0, a page with the
indicated settings, but no application page window, is added to the notebook.
Note:
public:
virtual IPageHandle addPageBefore( const PageSettings& pageInfo, const Cursor& cursor, IWindow* pageWindow = 0 )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual IPageHandle addPageBefore( const PageSettings& pageInfo, const IPageHandle& referencePage, IWindow* pageWindow = 0 )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Page ButtonUse these members to set the page button's size.
![]() |
public:
virtual INotebook& setPageButtonSize( const ISize& sizePageButton )
Sets the size in pixels of the page (arrow) buttons that are used to turn the notebook's pages.
| IAccessError | The page button size was not set. The page button dimensions may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
This function is ignored in INotebook's implementation of the Windows tab control.
Page InformationUse these members to obtain information on a notebook page.
![]() |
Returns information about the specified page.
public:
PageSettings pageSettings(const IPageHandle& page) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
PageSettings pageSettings(const Cursor& cursor) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Page ManipulationUse these members to manipulate pages within a notebook.
![]() |
public:
virtual IPageHandle firstPage() const
Returns an IPageHandle object that references the first page in the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IPageHandle lastPage() const
Returns an IPageHandle object that references the last page in the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IPageHandle nextPage( const IPageHandle& referencePage ) const
Returns an IPageHandle object that references the page following the specified page.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IPageHandle previousPage( const IPageHandle& referencePage ) const
Returns an IPageHandle object that references the page before the specified page.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IPageHandle topPage() const
Returns an IPageHandle object that references the current top page of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Moves a specified page to the top of the notebook.
public:
virtual INotebook& turnToPage(const Cursor& cursor)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& turnToPage(const IPageHandle& page)
| IAccessError | The specified page window was not moved to the top of the notebook. The page identifier (ID) of the specified page may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Page RemovalUse these members to remove a page or pages from a notebook.
![]() |
public:
virtual INotebook& removeAllPages()
Removes all the pages in the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Removes the specified page from the notebook.
public:
virtual INotebook& removePage(const Cursor& cursor)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& removePage(const IPageHandle& page)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
If the specified page is a major tab page, it removes the specified page and all subsequent pages up to the next major tab page. If the specified page is a minor tab page, it removes the specified page and all subsequent pages up to the next page that has a tab.
public:
virtual INotebook& removeTabSection( const IPageHandle& page )
| IInvalidRequest | The notebook tab section was not removed. The removal failed because the specified notebook page is not associated with a major or a minor tab. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
This function is ignored in INotebook's implementation of the Windows tab control.
public:
virtual INotebook& removeTabSection(const Cursor& cursor)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
This function is ignored in INotebook's implementation of the Windows tab control.
Page SupportUse these members to support page counting and to determine size information for the notebook.
![]() |
public:
virtual bool isEmpty() const
Queries whether the notebook has any pages and returns true if it is empty.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual ISize notebookSize(const IPageHandle& page) const
Returns the size that the notebook must be in order to contain the specified page. The notebook size is calculated based on the size of the page window. If the page window is not a frame dialog and the page has the autoPageSize attribute, the page window's minimum size is used instead.
| IAccessError | The notebook size was not returned. The coordinates of the application page window may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual ISize pageSize() const
Returns the size of the notebook's pages. All notebook pages have the same size as determined by the notebook size. Application windows associated with notebook pages can use this information to determine their size.
| IAccessError | The page's size was not returned. The coordinates of the notebook window may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Returns the number of pages in the notebook from a specified notebook page to the end of the notebook. This value includes the specified page.
public:
virtual unsigned long pagesToEnd( const IPageHandle& page ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual unsigned long pagesToEnd( const Cursor& cursor ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Returns the number of pages in the notebook between a specified notebook page and the next page that has a major tab. This value does not include the specified page.
public:
virtual unsigned long pagesToMajorTab( const Cursor& cursor ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Always returns 1 for INotebook's implementation of the Windows tab control because every page is a major tab page.
public:
virtual unsigned long pagesToMajorTab( const IPageHandle& page ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Always returns 1 for INotebook's implementation of the Windows tab control because every page is a major tab page.
![]() |
Returns the number of pages in the notebook between a specified notebook page and the next page that has a minor tab. This value does not include the specified page.
public:
virtual unsigned long pagesToMinorTab( const IPageHandle& page ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Always returns 0 for INotebook's implementation of the Windows tab control because minor tabs are not supported.
public:
virtual unsigned long pagesToMinorTab( const Cursor& cursor ) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Always returns 0 for INotebook's implementation of the Windows tab control because minor tabs are not supported.
![]() |
public:
virtual unsigned long totalPages() const
Returns the total number of pages in the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Page Window AssociationUse these members to query and set the application page window that is associated with the specified notebook page.
![]() |
Associates the specified notebook page with the application page window.
Note:
public:
virtual INotebook& setWindow( const IPageHandle& referencePage, IWindow* pageWindow = 0 )
| IAccessError | The specified page was not associated with the window. The page identifier (ID) of the notebook page may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& setWindow( const Cursor& cursor, IWindow* pageWindow = 0 )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Returns the application page window associated with the specified notebook page.
public:
virtual IWindow* window(const IPageHandle& page) const
| IAccessError | The window associated with the specified notebook page was not returned. The page identifier (ID) of the specified notebook page may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual IWindow* window(const Cursor& cursor) const
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Status TextUse these members to query and set the status text alignment and to set the status text.
![]() |
Sets the status text for the specified page of the notebook.
public:
virtual INotebook& setStatusText( const IPageHandle& referencePage, const char* statusText )
| IAccessError | The status text was not set for the specified page. The page identifier (ID) of the notebook page may be invalid. |
| IInvalidRequest | The page does not have a status line to display the text. You must specify the INotebook::PageSettings::statusTextOn attribute when adding the page to the notebook. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& setStatusText( const IPageHandle& referencePage, const IResourceId& resourceId )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setStatusTextAlignment( TextAlignment alignment )
Sets the alignment of the text in the notebook's status line.
| IInvalidParameter | The alignment style of the status text line was not set. The alignment parameter is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual TextAlignment statusTextAlignment() const
Returns the alignment of the text in the notebook's status line. The return value is a TextAlignment enumerator.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
StylesUse these members to set and query the various styles that are associated with a notebook. You can use these styles with the styles defined by IWindow.
The combination of styles you specify for the back pages (the recessed edges that give the notebook a three-dimensional effect) and the major tabs determines how the pages in the notebook look and behave when the user iterates through the notebook's pages.
An object of this nested class is provided when you create a notebook. A customizable default is used if you do not specify any styles. Once the notebook object is created, you can use INotebook and IWindow member functions to set or query the object's style.
The declaration of the INotebook::Style nested class is generated by the INESTEDBITFLAGCLASSDEF2 macro.
![]() |
public:
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const
Converts style bits into the style value that can be processed by the graphical user interface (GUI). The default action is to return the base GUI style for the platform. Extended styles, those that either the Open Class Library has defined or you have defined, can be returned by setting the extendedOnly parameter to true.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static Style defaultStyle()
Returns the default style. The default style is classDefaultStyle unless you have changed the style using setDefaultStyle.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static void setDefaultStyle(const Style& style)
Sets the default style for all subsequent notebooks.
This member function is not thread safe. In a multithreaded application, it should only be called when a conflict is not possible. A conflict can arise if you set the default style on one thread at the same time that it is being queried on another. In this situation, the query would take place while the style is in an unknown state.
When you create a window class and do not specifically specify window styles in the constructor, the Open Class Library queries the default style. Therefore, the only safe place to call this member function is when no other application threads that create windows are active.
Another way to avoid a conflict in a multithreaded application is to specifically specify window styles on window construction, rather than calling this member function.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style allTabsVisible
Draws the tabs of the notebook in multiple rows, so all are visible. This style is ignored if the style INotebook::pmCompatible is specified.
| Windows | OS/2 | AIX |
| Yes | Ignored | Ignored |
![]() |
public:
static const Style backPagesBottomLeft
Draws the back pages of the notebook behind the bottom left corner of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style backPagesBottomRight
Draws the back pages of the notebook behind the bottom right corner of the notebook. This is the default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style backPagesTopLeft
Draws the back pages of the notebook behind the top left corner of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style backPagesTopRight
Draws the back pages of the notebook behind the top right corner of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style classDefaultStyle
Specifies the original default style for this class, which is the combination of the following styles:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style handleDrawTabs
Selects the owner draw tab style, which enables IPageHandler to dispatch the INotebookDrawItemEvent. Override IPageHandler::drawTab to process this event.
This style is ignored if the style INotebook::pmCompatible is specified.
| Windows | OS/2 | AIX |
| Yes | Ignored | Ignored |
![]() |
public:
static const Style majorTabsBottom
Draws the major tabs of the notebook on the bottom of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style majorTabsLeft
Draws the major tabs of the notebook on the left side of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style majorTabsRight
Draws the major tabs of the notebook on the right side of the notebook. This is the default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style majorTabsTop
Draws the major tabs of the notebook on the top of the notebook.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style pmCompatible
Selects the CUA '91 notebook control. If this style is not set, the Windows tab control is selected.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
This style has no effect in the AIX environment. Notebook in the AIX environment are always pmCompatible.
This style has no effect in the OS/2 environment. OS/2 notebook are always pmCompatible.
![]() |
public:
static const Style polygonTabs
Draws tabs with polygon corners.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style roundedTabs
Draws tabs with rounded corners.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style solidBinding
Draws a solid binding. This is the default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style spiralBinding
Draws a spiral binding.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style squareTabs
Draws tabs with square corners. This is the default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style statusTextCenter
Centers the text in the status line.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style statusTextLeft
Left-justifies the text in the tabs.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style statusTextRight
Right-justifies the text in the status line.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style tabTextCenter
Centers the text in the tabs. This is the default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style tabTextLeft
Left-justifies the text in the tabs.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style tabTextRight
Right-justifies the text in the tabs.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tab SupportUse these members to provide the following tab support:
![]() |
public:
bool areAllTabsVisible() const
Returns true if INotebook::allTabsVisible is specified. False is always returned if the style INotebook::pmCompatible is specified.
| Windows | OS/2 | AIX |
| Yes | Ignored | Ignored |
![]() |
public:
bool isDrawTabsEnabled() const
Returns true if the owner draw tabs style, INotebook::handleDrawTabs, is specified. False is always returned if the style INotebook::pmCompatible is specified.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& refreshTabs()
Causes all of the notebook's visible tabs to be repainted.
| IAccessError | The tabs were not repainted. An error occurred within the notebook control. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setMajorTabSize( const ISize& sizeMajorTab )
Sets the size of the notebook's major tabs in pixels.
| IAccessError | The major tab size was not set. The tab dimensions may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual INotebook& setMinorTabSize( const ISize& sizeMinorTab )
Sets the size of the notebook's minor tabs in pixels.
| IAccessError | The minor tab size was not set. The tab dimensions may be invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
This function is ignored in INotebook's implementation of the Windows tab control.
![]() |
Sets the tab bitmap for the specified page of the notebook.
public:
virtual INotebook& setTabBitmap( const IPageHandle& referencePage, const IResourceId& resourceId )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& setTabBitmap( const IPageHandle& referencePage, const IBitmapHandle& bitmap )
| IAccessError | The tab bitmap was not set for the specified page. The page identifier (ID) of the notebook page may be invalid or the page may be missing the major or minor tab attribute. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setTabShape(TabShape tabShape)
Sets the shape of the notebook's tabs.
| IInvalidParameter | The tab shape style was not set. The tabShape parameter is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
This function has no affect when using the native Windows version of INotebook as it does not support tab shapes.
![]() |
Sets the tab text for the specified page of the notebook.
Note:
public:
virtual INotebook& setTabText( const IPageHandle& referencePage, const char* tabText )
| IAccessError | The tab text was not set for the specified page. The page identifier (ID) of the notebook page may be invalid or the page may be missing the major or minor tab attribute. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual INotebook& setTabText( const IPageHandle& referencePage, const IResourceId& resourceId )
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual INotebook& setTabTextAlignment( TextAlignment alignment )
Sets the alignment of the text in the notebook's tabs.
| IInvalidParameter | The tab text alignment style was not set. The alignment parameter is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
This function has no affect on Windows because the native Windows version of INotebook does not support tab text alignment.
![]() |
public:
virtual TabShape tabShape() const
Returns the shape of the notebook's tabs. The return value is a TabShape enumerator.
| Windows | OS/2 | AIX |
| Yes | Yes | Ignored |
![]() |
public:
virtual TextAlignment tabTextAlignment() const
Returns the alignment of the text in the notebook's tabs. The returned value is a TextAlignment enumerator.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum Binding { spiral,
solid }Use these enumerators to specify the binding for the notebook:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum Orientation { backpagesBottomTabsRight,
backpagesTopTabsRight,
backpagesBottomTabsLeft,
backpagesTopTabsLeft,
backpagesRightTabsTop,
backpagesLeftTabsTop,
backpagesRightTabsBottom,
backpagesLeftTabsBottom }Use these enumerators to specify the orientation of the back pages' corner in relation to the location of the major tabs:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum TabShape { square,
rounded,
polygon }Use these enumerators to specify the shape of the notebook's tabs:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum TextAlignment { left,
right,
center }Use these enumerators to specify the alignment for the text in the status line and in the tabs:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
virtual ~IControl()
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~IWindow()
IAccelTblHandle acceleratorHandle() const
IAcceleratorTable acceleratorTable() const
virtual IColor activeColor() const
IWindow& addOrReplaceAttribute( const IAttributeName& name, const IAttribute& attribute )
IWindow& adoptWindowData( const DataHandle& typeToken, IWindowData* windowData )
virtual IString asDebugInfo() const
virtual IString asString() const
IAttributeName attributeNameAt( const AttributeCursor& cursor ) const
const IAttribute* attributeWithName( const IAttributeName& name, ESearchType search = kWindowOnly ) const
virtual IWindow& capturePointer(bool capture = true)
ISize characterSize() const
IWindowHandle childAt(const ChildCursor& cursor) const
IWindow* childWindowAt(const ChildCursor& cursor) const
virtual IArgList convertToArgList( const IBitFlag& style ) const
static DataHandle dataHandleWithKey( const char* dataKeyName )
virtual IWindowHandle defaultEmphasisButton() const
static SiblingOrder defaultOrdering()
virtual IWindowHandle defaultPushButton() const
static IWindow* desktopWindow()
virtual IWindow& disable()
virtual IColor disabledBackgroundColor() const
virtual IColor disabledForegroundColor() const
virtual IWindow& disableGroup()
IWindow& disableMinimumSizeCaching()
virtual IWindow& disableNotification()
virtual IWindow& disableTabStop()
virtual IWindow& disableUpdate()
bool dispatchRemainingHandlers( IEvent& event, bool callDefProc = true )
virtual IWindow& enable(bool enableWindow = true)
virtual IWindow& enableGroup(bool enable = true)
IWindow& enableMinimumSizeCaching( bool enableCaching = true )
virtual IWindow& enableTabStop(bool enable = true)
virtual IWindow& enableUpdate(bool enableWindow = true)
static IWindow::ExceptionFn* exceptionFunction()
virtual IColor foregroundColor() const
virtual IWindowHandle handle() const
virtual bool handleException( IException& dispatcherException, IEvent& exceptionEvent )
virtual IWindowHandle handleForChildCreation() const
static IWindowHandle handleWithParent( unsigned long identifier, const IWindowHandle& parent )
static IWindowHandle handleWithPointerCaptured()
virtual bool hasFocus() const
virtual bool hasPointerCaptured() const
unsigned long helpId() const
virtual IWindow& hide()
virtual IWindow& hideSourceEmphasis()
virtual IColor hiliteForegroundColor() const
virtual unsigned long id() const
virtual IColor inactiveColor() const
virtual IRectangle invalidatedRect() const
virtual IRegionHandle invalidatedRegion() const
bool isAutoDeleteObject() const
bool isAutoDestroyWindow() const
bool isEnabled() const
virtual bool isEnabledForNotification() const
virtual bool isFrameWindow() const
virtual bool isGroup() const
bool isHandling(const EventMask& events) const
virtual bool isLayoutDistorted( unsigned long layoutAttribute ) const
bool isMinimumSizeCachingEnabled() const
bool isShowing() const
virtual bool isTabStop() const
bool isUpdateEnabled() const
virtual bool isValid() const
bool isVisible() const
static bool isWindowValid(const IWindow* window)
IDMItemProvider* itemProvider() const
IWindow(unsigned long identifier, IWindow* parent)
IWindow(const IWindowHandle& handle)
virtual IRectangle layoutAdjustment() const
static IPoint mapPoint( const IPoint& point, const IWindowHandle& from, const IWindowHandle& to )
virtual IWindowHandle matchForMnemonic( unsigned short character ) const
IMessageQueueHandle messageQueue() const
ISize minimumSize(bool windowCalculatedSize = false) const
virtual IPointerHandle mousePointer() const
static void movePointerTo(const IPoint& position)
virtual IWindow& moveSizeTo( const IRectangle& newSizeAndPosition )
virtual IWindow& moveTo(const IPoint& newPosition)
virtual IRectangle nativeRect() const
virtual INotifierAddress notifierAddress() const
virtual IWindow& notifyObservers( const INotificationEvent& event )
virtual IWindow& notifyObserversAsync( const INotificationEvent& event )
static IWindow* objectWindow()
virtual IWindow* owner() const
IWindow* parent() const
static ISize parentSize(const IWindowHandle& windowHandle)
virtual ISize parentSize() const
static IPoint pointerPosition()
virtual IPoint position() const
virtual IWindow& positionBehindSibling( const IWindowHandle& siblingWindow )
virtual IWindow& positionBehindSiblings()
virtual IWindow& positionOnSiblings()
virtual const IWindow&
postEvent( unsigned long eventId,
const IEventParameter1& parm1 = 0,
const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent(const IEvent& event) const
virtual IPresSpaceHandle presSpace() const
virtual IRectangle rect() const
virtual IWindow& refresh( const IRectangle& invalidRectangle, bool immediate = false )
virtual IWindow& refresh(RefreshType type = paintAll)
virtual IWindow& releasePointer()
virtual void releasePresSpace( const IPresSpaceHandle& presentationSpaceHandle ) const
IWindow& removeAllAttributes()
IWindow& removeAttribute(const IAttributeName& name)
virtual IWindow& resetActiveColor()
virtual IWindow& resetBackgroundColor()
virtual IWindow& resetDisabledBackgroundColor()
virtual IWindow& resetDisabledForegroundColor()
virtual IWindow& resetFont()
virtual IWindow& resetForegroundColor()
virtual IWindow& resetHiliteBackgroundColor()
virtual IWindow& resetHiliteForegroundColor()
virtual IWindow& resetInactiveColor()
IWindow& resetMinimumSize()
virtual IWindow& resetShadowColor()
virtual IEventResult sendEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IEventResult sendEvent(const IEvent& event) const
virtual IEventResult sendEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
IWindow& setAcceleratorHandle( const IAccelTblHandle& handle )
IWindow& setAcceleratorTable( const IAcceleratorTable* acceleratorTable )
virtual IWindow& setActiveColor(const IColor& color)
IWindow& setAutoDeleteObject(bool autoDelete = true)
IWindow& setAutoDestroyWindow(bool autoDestroy = false)
virtual IWindow& setBackgroundColor(const IColor& color)
static void setDefaultOrdering(SiblingOrder order)
virtual IWindow& setDisabledBackgroundColor( const IColor& color )
virtual IWindow& setDisabledForegroundColor( const IColor& color )
static IWindow::ExceptionFn* setExceptionFunction( IWindow::ExceptionFn* exceptionFunction )
virtual IWindow& setFocus()
virtual IWindow& setFont(const IFont& font)
virtual IWindow& setForegroundColor(const IColor& color)
IWindow& setHelpId(unsigned long helpTopicId)
virtual IWindow& setHiliteBackgroundColor( const IColor& color )
virtual IWindow& setHiliteForegroundColor( const IColor& color )
virtual IWindow& setId(unsigned long newIdentifier)
virtual IWindow& setInactiveColor(const IColor& color)
IWindow& setItemProvider(IDMItemProvider* dragProvider)
virtual IWindow&
setLayoutDistorted( unsigned long layoutAttributesOn,
unsigned long layoutAttributesOff )
IWindow& setMinimumSize(const ISize& size)
virtual IWindow& setMousePointer( const IPointerHandle& mousePointer )
virtual IWindow& setOwner(const IWindow* newOwner)
virtual IWindow& setParent(const IWindow* newParent)
virtual IWindow& setShadowColor(const IColor& color)
virtual IColor shadowColor() const
virtual IWindow& show(bool showWindow = true)
virtual IWindow& showSourceEmphasis(bool show = true)
virtual ISize size() const
virtual IWindow& sizeTo(const ISize& newSize)
IWindow& startHandling(const EventMask& events)
IWindow& stopHandling(const EventMask& events)
virtual IWindow& validateRect( const IRectangle& validatedRectangle )
virtual IWindow& validateRegion( const IRegionHandle& validatedRegion )
virtual IRectangle visibleRectangle() const
IWindowData* windowData(const DataHandle& typeToken) const
static IWindow* windowWithHandle( const IWindowHandle& windowHandle, bool allThreads = true )
static IWindow*
windowWithOwner( unsigned long identifier,
const IWindow* owner,
bool allThreads = true )
static IWindow*
windowWithParent( unsigned long identifier,
const IWindow* parent,
bool allThreads = true )
static INotificationId const activeColorId
static const EventMask allMouseMoves
static INotificationId const attributeAddReplaceId
static INotificationId const attributeRemoveId
static INotificationId const backgroundColorId
static INotificationId const borderColorId
static const Style clipChildren
static const Style clipSiblings
static const Style clipToParent
static INotificationId const commandId
static const Style disabled
static INotificationId const disabledBackgroundColorId
static INotificationId const disabledForegroundColorId
static INotificationId const enableId
static INotificationId const focusId
static INotificationId const fontId
static INotificationId const foregroundColorId
static const Style group
static INotificationId const hiliteBackgroundColorId
static INotificationId const hiliteForegroundColorId
static INotificationId const inactiveColorId
static const Style leftToRight
static const EventMask mouseEntersLeaves
static const Style noStyle
static INotificationId const positionId
static const Style rightToLeft
static const Style saveBits
static INotificationId const shadowColorId
static INotificationId const sizeId
static const EventMask someMouseMoves
static const Style synchPaint
static INotificationId const systemCommandId
static const Style tabStop
static const Style visible
static INotificationId const visibleId
static INotificationId const allChangesId
static INotificationId const deleteId
IWindow& addHandler(IHandler* newHandler)
virtual IWindow& addObserver( IObserver& observer, const IInterest& interest )
static void
addToWindowSet( IWindow* window,
const IWindowHandle& windowHandle )
IWindow& bindMessageQueue(bool bindToMessageQueue = true)
IColor color(unsigned long colorArea) const
IColor color( unsigned long colorArea, const IColor& defaultColor ) const
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, const char* windowClass, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, const char* windowClass, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, IXmCreateFunction createFunction, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, IXmCreateFunction createFunction, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* callerArgList, unsigned int callerNumberArguments, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
IWindow& defaultProcedure(IEvent& event)
bool deleteIsInProcess() const
bool dispatch(IEvent& event)
virtual unsigned long extendedStyle() const
bool isBoundToMessageQueue() const
virtual bool isDragStarting(IEvent& event)
bool isPrimaryWindow() const
bool isUserWindowWordReserved() const
IWindow()
IWindowNotifyHandler* notificationHandler() const
virtual IWindow& notifyObservers( const INotificationId& notification )
IObserverList& observerList( const IInterest* interest = 0 ) const
virtual bool passEventToOwner(IEvent& event)
virtual IWindow& prepareForUse( const IWindowHandle& windowHandle )
virtual IWindow& removeAllObservers()
static void removeFromWindowSet(IWindow* window)
IWindow& removeHandler(IHandler* oldHandler)
virtual IWindow& removeObserver(IObserver& observer)
virtual IWindow& removeObserver( IObserver& observer, const IInterest& interest )
IWindow& reserveUserWindowWord(bool reserve = true)
virtual IWindow& resetColor(unsigned long colorArea)
ISize savedMinimumSize() const
IWindow& saveMinimumSize(const ISize& size)
virtual IWindow& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
virtual IWindow&
setColor( unsigned long colorArea,
const IColor& color )
virtual IWindow& setDefaultEmphasisButton( const IWindowHandle& defaultEmphasisButton, bool enable )
virtual IWindow& setDefaultPushButton( const IWindowHandle& defaultPushButton )
virtual IWindow& setExtendedStyle( unsigned long extendedStyle )
IWindow& setNotificationHandler( IWindowNotifyHandler* notifyHandler )
virtual IWindow& setStyle(unsigned long style)
IWindow& setWindowData(long index, unsigned long dataValue)
IWindow&
setWindowData( long index,
unsigned short dataValue )
IWindow& startHandlingEventsFor( const IWindowHandle& windowHandle )
IWindow&
startHandlingEventsFor( unsigned long identifier,
IWindow* parent )
virtual unsigned long style() const
IWindow& unbindMessageQueue()
unsigned long windowULong(long index) const
unsigned short windowUShort(long index) const
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& removeObserver(IObserver& observer) = 0
IControl()