### ITabControl

  Use an ITabControl object to implement a settings or properties dialog. ITabControl creates a window that appears as a stack of tabbed pages with an optional button area. You can use an ITabControl object as the client of an IFrameWindow to create a tab control dialog.

  An ITabControl object manages a set of ITabPage objects and an optional set of IPushButton objects. You must create an ITabPage object or an object of a derived class for each page in the tab control. A tab page is a logical representation of a page in a tab control and has an associated page window and optional push buttons. A tab page object is not a wrapper for a platform window as are IWindow derived objects.

  Each tab page has a style and either text or a bitmap to be displayed on the corresponding tab in the tab control. You can specify the text and bitmap for the tab page during ITabPage construction or by using one of the ITabPage Tab Text & Bitmap member functions. In the Windows environment, tab pages can have both text and a bitmap displayed on the tab simultaneously. In the OS/2 environment, you can assign both text and a bitmap for a tab, but only the last item set is displayed.

  After you construct a tab page, you must add it to the ITabControl with one of the ITabControl page addition member functions such as addLastPage. You must also set the page window to be displayed for the page. You can set this page window at any time by calling the ITabPage::setPageWindow member function. Alternatively, you can implement delayed page window creation by overriding the ITabPage::createPageWindow member function in a class derived from ITabPage. The Open Class Library calls createPageWindow when the page is first displayed. Your override must construct and return a pointer to the IWindow object to be used for the page window. You can also create and set page buttons in your createPageWindow override. Refer to the ITabPage class for additional information about page specific buttons.

  You usually create a subclass of ITabPage for each page in your tab control. In addition to providing a createPageWindow override in your subclass, you can also implement page window validation and updates by overriding the member functions ITabPage::validatePageWindow and ITabPage::updatePageWindow, respectively. Refer to the ITabPage class for additional information about validating and updating page windows.

  The optional push buttons in the tab control appear in a button area below the tab pages, or, in the OS/2 environment, the button area can optionally appear above the tab pages. You can specify buttons on a per page basis as well as specifying a set of common buttons. ITabControl displays the set of common buttons whenever the top page has no page specific buttons. You must manage common buttons via ITabControl member functions and manage page specific buttons via ITabPage member functions. To process the command events generated by tab control buttons, create a handler of an ICommandHandler derived class and attach it to either the tab control or frame window.

  You can add one of the five predefined push buttons provided by the EButton enumeration as common or page specific buttons. You can use the same buttons in multiple page button sequences as well as the common button sequence. This allows maximum flexibility in tailoring the buttons that appear as the user selects each tab page. For example, one tab page may have Ok, Cancel, and Help buttons while all other pages have Ok, Default, Cancel, and Help buttons. You would add the Ok, Default, Cancel, and Help buttons as common push buttons and add the Ok, Cancel, and Help buttons as page push buttons for the unique page.

  You can also create your own IPushButton objects for use as tab control buttons. You must use the window returned by buttonParent as the parent of any IPushButton objects you construct for use as either common buttons or page buttons.

  To process the command events generated by tab control buttons, you must attach a handler derived from ICommandHandler to the tab control or frame window.

#### AIX Considerations

  This class is not supported in the AIX environment.

### ITabControl - Member Functions and Data by Group

### Constructors & Destructor

You can construct and destruct objects of this class.

~ITabControl

      public:
      virtual ~ITabControl()

  This destructor destroys the tab control window only if the Open Class Library created it.

  This destructor automatically destroys the ITabPage objects currently added to the tab control if automatic page deletion is enabled.

  The presentation system destroys the page windows in the tab control when the tab control window is destroyed.

  If you create and add custom IPushButton objects as common buttons, the presentation system destroys the push button windows when the button parent is destroyed. If you allocated these IPushButton objects with the operator new, you can use IWindow::setAutoDeleteObject to enable automatic deletion of these IPushButton objects.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

ITabControl

  Overload 1

      public:
      ITabControl(unsigned long windowId, IWindow* parent)

  You can construct an object of this class by specifying a parent window and the ID of a tab control. This constructor is used to create an object wrapper for a tab control window that has already been created. Its primary purpose is to wrapper a tab control window that has been loaded from a dialog resource.

Exception

  IInvalidParameter | parent must be a nonzero pointer.
  IInvalidRequest | An attempt was made to construct an ITabControl for a window of an incompatible window class. The platform window must be a WC_TABCONTROL window in the Windows environment or a WC_NOTEBOOK window in the OS/2 environment.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

OS/2 Considerations

  In the OS/2 environment, you can only wrapper a WC_NOTEBOOK window. Additionally, the WC_NOTEBOOK must have the BKS_TABBEDDIALOG style. It may optionally have the BKS_BUTTONAREA style. Since the ITabControl class augments the OS/2 button area management, you must add the common and page specific buttons to the tab control via the ITabControl class.

Windows Considerations

  In the Windows environment, the window to be wrappered must be a WC_TABCONTROL window. Since the Windows tab control does not support a button area, it is not possible to add common or page specific buttons to a wrappered Windows tab control.

  Overload 2

      public:
      ITabControl(const IWindowHandle& handle)

  You can construct an object of this class by specifying the handle of a compatible GUI window. Use this constructor to create an object wrapper for a tab control window that has already been created.

Exception

  IInvalidRequest | An attempt was made to construct an ITabControl for a window of an incompatible window class. The platform window must be a WC_TABCONTROL window in the Windows environment or a WC_NOTEBOOK window in the OS/2 environment.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

OS/2 Considerations

  In the OS/2 environment, you can only wrapper a WC_NOTEBOOK window. Additionally, the WC_NOTEBOOK must have the BKS_TABBEDDIALOG style. It may optionally have the BKS_BUTTONAREA style. Since the ITabControl class augments the OS/2 button area management, you must add the common and page specific buttons to the tab control via the ITabControl class.

Windows Considerations

  In the Windows environment, the window to be wrappered must be a WC_TABCONTROL window. Since the Windows tab control does not support a button area, it is not possible to add common or page specific buttons to a wrappered Windows tab control.

  Overload 3

      public:
      ITabControl( unsigned long windowId,
                   IWindow* parent,
                   IWindow* owner,
                   const IRectangle& initial = IRectangle ( ),
                   const Style& style = defaultStyle ( ) )

  Constructs an ITabControl object and the corresponding window.

  windowId
    A unique ID for the tab control.
  parent
    The parent window.
  owner
    The owner window.
  initial
    A rectangle for the tab control. It specifies the initial position and size of the tab control you are constructing. The default is the rectangle constructed by the default IRectangle constructor.
  style
    The style of the control. Refer to the ITabControl Styles for the available styles. This parameter is optional.

Exception

  IInvalidParameter | parent must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Automatic Page Deletion

Use these members to query and set auto page deletion for the tab control. If automatic page deletion is enabled, the ITabPage objects currently added to the tab control are deleted during ITabControl destruction. The default behavior is not to auto delete the ITabPage objects. You should generally use automatic deletion only when you create your ITabPage objects with the operator new. Note that the presentation system destroys the page windows in the tab control when the tab control window is destroyed.

isAutoDeletePages

      public:
      bool isAutoDeletePages() const

  Returns true if destruction of the tab control object results in the automatic deletion of the ITabPage objects that have been added to the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

setAutoDeletePages

      public:
      ITabControl& setAutoDeletePages(bool autoDelete = true)

  Sets the auto page deletion behavior of the tab control.

  autoDelete
    Set to true to enable or false to disable auto page deletion. Auto page deletion is disabled by default. This parameter is optional.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Button Support

The tab control can manage an area for push buttons by specifying the buttons style during construction. These push buttons can be specific to one page in the tab control or they can be common to all of the pages in the tab control which do not have any page specific buttons. Use the following member functions to manage the tab control common buttons. Refer to the ITabPage class for additional information related to page specific buttons.

addCommonButton

  Adds a common button to the tab control. The push buttons appear in the button area in the order they were added as common buttons.

  Overload 1

      public:
      virtual ITabControl&
        addCommonButton( EButton buttonType,
                         bool isDefaultButton = false )

  Adds one of the push buttons provided by the EButton enumeration as a common tab control button. Use the member functions in the ITabPage Button Support group to add page specific buttons.

  buttonType
    Use one of the enumerators defined by the EButton enumeration to specify which push button to add.
  isDefaultButton
    Indicates whether this push button should be the default button when the common buttons are displayed. Subsequent specification of a default button replaces this button as the default. This parameter is optional.

Exception

  IInvalidRequest | The tab control was not constructed with the buttons style.
  IInvalidRequest | A button of the specified buttonType was already been added to the common buttons.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl& addCommonButton(IPushButton* button)

  Adds an IPushButton object constructed by your application as a common tab control button. You must use the window returned by buttonParent as the parent of your IPushButton object. Note that the push button styles, including IPushButton::defaultButton are effective if set on the IPushButton. The last default push button added is the actual default when the common buttons are displayed.

Exception

  IInvalidParameter | button must be a nonzero pointer.
  IInvalidRequest | The tab control was not constructed with the buttons style or the button parent is not the window returned by buttonParent.
  IInvalidRequest | The specified button has already been added to the common buttons.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

button

      public:
      virtual IPushButton* button(EButton buttonType) const

  Returns the IPushButton object corresponding to the specified EButton enumerator. Access to the IPushButton enables you to manipulate some of the push button characteristics such as color or text.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

buttonParent

      public:
      virtual IWindow* buttonParent() const

  Returns the parent object that must be used as the parent of any common or page specific buttons constructed by the application. If the tab control was not constructed with the buttons style, 0 is returned.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

removeCommonButton

  Removes a common button from the tab control.

  Overload 1

      public:
      virtual ITabControl&
        removeCommonButton( IPushButton* button )

  Removes an IPushButton object constructed by your application and previously added as a common button.

Exception

  IAccessError | The specified button was not present in the common button sequence.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl& removeCommonButton(EButton buttonType)

  Removes one of the predefined push buttons from the set of common buttons.

  buttonType
    Use one of the enumerators defined by the EButton enumeration to specify which push button to remove.

Exception

  IAccessError | A standard button for the specified buttonType was not present in the common button sequence.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Colors

Use these members to query, set, and reset the tab control page background color. The page background is the area of the page not filled by the page window. If a page has the autoPageSize style, the page window is sized to fit the entire page area and, thus, none of the page background is visible.

pageBackgroundColor

      public:
      virtual IColor pageBackgroundColor() const

  Returns the page background color.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

resetPageBackgroundColor

      public:
      virtual ITabControl& resetPageBackgroundColor()

  Resets the page background color by changing to the page background color that was previously set.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

setPageBackgroundColor

      public:
      virtual ITabControl&
        setPageBackgroundColor( const IColor& color )

  Sets the page background color.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Layout Support

Layout support members supply information used by the canvas classes to provide dialog-like behavior.

setLayoutDistorted

      public:
      virtual ITabControl&
        setLayoutDistorted( unsigned long layoutAttributesOn,
                            unsigned long layoutAttributesOff )

  For tab controls with the buttons style, causes the button layout to change when a button is destroyed.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

calcMinimumSize

      protected:
      virtual ISize calcMinimumSize() const

  Returns the minimum recommended size for this tab control. This size is large enough to encompass the largest width and height returned by ITabPage::minimumPageWindowSize for all of the tab pages that are currently added to the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Notification Members

Use these members to identify notifications sent to observer objects.

enableNotification

      public:
      virtual IWindow& enableNotification(bool enable = true)

  Enables the tab control to send notifications to any observer objects.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

buttonAddId

      public:
      static INotificationId const buttonAddId

  This notification identifier is provided to observers when a push button is added to either the tab control as a common button or to a tab page as a page specific button. ITabControl provides a pointer to the IPushButton object in the INotificationEvent::eventData field of the INotificationEvent.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

buttonRemoveId

      public:
      static INotificationId const buttonRemoveId

  This notification identifier is provided to observers when either a common push button is removed from the tab control or a page specific push button is removed from a tab page. ITabControl provides a pointer to the IPushButton object in the INotificationEvent::eventData field of the INotificationEvent.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

pageAddId

      public:
      static INotificationId const pageAddId

  This notification identifier is provided to observers when a page is added to the tab control. ITabControl provides a pointer to the ITabPage object in the INotificationEvent::eventData field of the INotificationEvent.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

pageBackgroundColorId

      public:
      static INotificationId const
        pageBackgroundColorId

  This notification identifier is provided to observers when the page background color of the tab control changes.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

pageRemoveId

      public:
      static INotificationId const pageRemoveId

  This notification identifier is provided to observers when a page is removed from the tab control. ITabControl provides a pointer to the ITabPage object in the INotificationEvent::eventData field of the INotificationEvent.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

pageSelectId

      public:
      static INotificationId const pageSelectId

  This notification identifier is provided to observers when the user has selected a tab causing the top page in the tab control to change.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

tabBackgroundColorId

      public:
      static INotificationId const
        tabBackgroundColorId

  This notification identifier is provided to observers when the background color of a tab changes. ITabControl provides a pointer to the ITabPage object for which the tab background color was changed in the INotificationEvent::eventData field of the INotificationEvent.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Page Addition

Use these members to add tab pages to the tab control.

When you add an ITabPage object to the tab control, a page is allocated in the presentation system window. Note that this page has no corresponding window handle; thus, the ITabPage object does not have a window handle.

Each page in the tab control has both a selectable tab and a page window to be displayed when the page becomes the top page. Refer to the ITabPage Tab Text & Bitmap members for information about setting the tab text and bitmap. Refer to the ITabPage Page Window Association member for information about setting the page window.

addFirstPage

      public:
      virtual ITabControl& addFirstPage(const ITabPage* newPage)

  Adds an ITabPage as the first page in the tab control.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

addLastPage

      public:
      virtual ITabControl& addLastPage(const ITabPage* newPage)

  Adds an ITabPage as the last page in the tab control.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

addPageAfter

  Adds an ITabPage to the tab control following the indicated page.

  Overload 1

      public:
      virtual ITabControl&
        addPageAfter( const ITabPage* newPage,
                      Cursor& cursor )

  newPage
    The page to be added to the tab control.
  cursor
    The Cursor object whose current position refers to the tab page after which the new page is added.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl&
        addPageAfter( const ITabPage* newPage,
                      const ITabPage* referencePage )

  newPage
    The page to be added to the tab control.
  referencePage
    The page after which the new page is added.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

addPageBefore

  Adds an ITabPage to the tab control immediately preceding the indicated page.

  Overload 1

      public:
      virtual ITabControl&
        addPageBefore( const ITabPage* newPage,
                       Cursor& cursor )

  newPage
    The page to be added to the tab control.
  cursor
    The Cursor object whose current position refers to the tab page before which the new page is added.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl&
        addPageBefore( const ITabPage* newPage,
                       const ITabPage* referencePage )

  newPage
    The page to be added to the tab control.
  referencePage
    The page before which the new page is added.

Exception

  IInvalidParameter | newPage must be a nonzero pointer.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Page Count Support

Use these members to retrieve information about the number of pages currently in the tab control.

isEmpty

      public:
      virtual bool isEmpty() const

  Returns true if there are no pages currently in the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

totalPages

      public:
      virtual unsigned long totalPages() const

  Returns the number of pages that are currently in the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Page Manipulation

Use these members to set which tab page is shown on top of the stack of pages in the tab control.

setTopPage

  Set the topmost page.

  Overload 1

      public:
      virtual ITabControl& setTopPage(const ITabPage* page)

  page
    The ITabPage that becomes the topmost page.

Exception

  IInvalidParameter | The page is not an ITabPage currently added to this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl& setTopPage(const Cursor& cursor)

  cursor
    The Cursor object whose current position refers to the tab page that becomes the topmost page.

Exception

  IInvalidParameter | The cursor is invalid. It must be positioned to an ITabPage currently added to this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Page Removal

Use these members to remove tab pages from the tab control.

removeAllPages

      public:
      virtual ITabControl& removeAllPages()

  Removes all pages from the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

removePage

  Removes the indicated page from the tab control.

  Overload 1

      public:
      virtual ITabControl& removePage(ITabPage* page)

  page
    The page to be removed from the tab control.

Exception

  IAccessError | The page is not a pointer to an ITabPage currently added to this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

  Overload 2

      public:
      virtual ITabControl& removePage(Cursor& cursor)

  cursor
    The ITabPage::Cursor object whose current position is the tab page to be removed.

Exception

  IInvalidParameter | The cursor is invalid. It should reference a valid ITabPage for this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Page Retrieval

Use these members to retrieve information about specific tab pages in the tab control.

firstPage

      public:
      virtual ITabPage* firstPage() const

  Returns a pointer to the first page in the tab control or 0 if the tab control contains no pages.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

lastPage

      public:
      virtual ITabPage* lastPage() const

  Returns a pointer to the last page in the tab control or 0 if the tab control contains no pages..

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

nextPage

      public:
      virtual ITabPage*
        nextPage( const ITabPage* referencePage ) const

  Returns a pointer to the page following the indicated page or 0 if referencePage is the last page in the tab control.

Exception

  IInvalidParameter | referencePage must be a valid ITabPage previously added to this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

previousPage

      public:
      virtual ITabPage*
        previousPage( const ITabPage* referencePage ) const

  Returns a pointer to the page preceding the indicated page or 0 if referencePage is the first page in the tab control.

Exception

  IInvalidParameter | referencePage must be a valid ITabPage previously added to this tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

topPage

      public:
      virtual ITabPage* topPage() const

  Returns a pointer to the topmost page in the tab control or 0 if the tab control contains no pages.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Size Support

Use this member to determine the size of the page window area in the tab control.

pageSize

      public:
      virtual ISize pageSize() const

  Returns the current size of the area available for display of page windows within the tab control window.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### Styles

These style members provide a set of valid styles for this class. Use these members to query and set the tab control styles. You can use these styles in conjunction with the styles in the IWindow::Style class.

convertToGUIStyle

      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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

defaultStyle

      public:
      static Style defaultStyle()

  Returns the current default style. The default style is classDefaultStyle unless you have changed the style by using setDefaultStyle.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

setDefaultStyle

      public:
      static void setDefaultStyle(const Style& style)

  Sets the default style for all subsequently constructed tab controls.

  style
    Use the styles provided by ITabControl::Styles to specify the default style.

  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 specify window styles in the constructor, the Open Class Library queries the default style. Therefore, the only safe time 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 specify window styles on window construction, rather than calling this member function.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

border3D

      public:
      static const Style border3D

  Adds an etched 3D border to the control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Ignored | No

buttons

      public:
      static const Style buttons

  Adds a button area at the bottom of the tab control.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

classDefaultStyle

      public:
      static const Style classDefaultStyle

  Provides the original default style for this class, which is IWindow::visible | ITabControl::tabsTop.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

tabsBottom

      public:
      static const Style tabsBottom

  Places tabs along the bottom edge of the tab control's pages.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | No

Windows Considerations

  In the Windows environment, the tabs are always placed along the top edge of the pages. This style has no effect in that environment.

tabsTop

      public:
      static const Style tabsTop

  Places tabs along the top edge of the tab control's pages.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | No

Windows Considerations

  In the Windows environment, the tabs are always placed along the top edge of the pages. This style has no effect in that environment.

### Tab Position

Use these members to query and set the position of tabs in the tab control.

setTabPosition

      public:
      virtual ITabControl& setTabPosition(ETabPosition position)

  Sets the position for the tabs.

  position
    A tab position defined by the ETabPosition enumeration.

Supported Platforms

  Windows | OS/2 | AIX
  Ignored | Yes | No

Windows Considerations

  In the Windows environment, the tabs are always displayed at the top of the tab control. Thus, this member function has no effect in that environment.

tabPosition

      public:
      virtual ETabPosition tabPosition() const

  Returns the ETabPosition enumerator for the current tab position.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

### ITabControl - Enumerations

EButton

      enum EButton { kApply=IC_ID_APPLY,
                     kOk=IC_ID_OK,
                     kCancel=IC_ID_CANCEL,
                     kDefault=IC_ID_RESET,
                     kHelp=IC_ID_HELP }

  You can use these enumerators to specify the type of button to be added or removed from the tab control common buttons or tab page buttons. You should also use these enumerators when interpreting the identifier of a command event from one of these standard push buttons.

  kApply
    Apply button.
  kOk
    Ok button.
  kCancel
    Cancel button.
  kDefault
    Default button.
  kHelp
    Help button. This button is given the style noPointerFocus when constructed.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

ETabPosition

      enum ETabPosition { kTop,
                          kBottom }

  Use these enumerators to specify the positioning of tabs in the tab control.

  kTop
    The tabs are positioned above the tab pages.
  kBottom
    The tabs are positioned below the tab pages.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | No

Windows Considerations

  The tabs are always positioned above the tab pages in a tab control in the Windows environment.

### ITabControl - Inherited Member Functions and Data

#### Inherited Public Functions

  IControl

  -     virtual ~IControl()

  INotifier

  -     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

  IWindow

  -     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 IColor backgroundColor() 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 IFont font() const

  -     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 hiliteBackgroundColor() const

  -     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

  -     virtual ISize parentSize() const

  -     static ISize parentSize(const IWindowHandle& windowHandle)

  -     static IPoint pointerPosition()

  -     virtual IPoint position() const

  -     virtual IWindow&
          positionBehindSibling( const IWindowHandle& siblingWindow )

  -     virtual IWindow& positionBehindSiblings()

  -     virtual IWindow& positionOnSiblings()

  -     virtual const IWindow& postEvent(const IEvent& event) const

  -     virtual const IWindow&
          postEvent( EventType eventType,
                     const IEventParameter1& parm1 = 0,
                     const IEventParameter2& parm2 = 0 ) const

  -     virtual const IWindow&
          postEvent( unsigned long eventId,
                     const IEventParameter1& parm1 = 0,
                     const IEventParameter2& parm2 = 0 ) 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(const IEvent& event) const

  -     virtual IEventResult
          sendEvent( unsigned long eventId,
                     const IEventParameter1& parm1 = 0,
                     const IEventParameter2& parm2 = 0 ) 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 )

#### Inherited Public Data

  IWindow

  -     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

  INotifier

  -     static INotificationId const allChangesId

  -     static INotificationId const deleteId

#### Inherited Protected Functions

  IWindow

  -     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& defaultColor ) const

  -     IColor color(unsigned long colorArea) const

  -     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,
                  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 )

  -     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,
                  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 )

  -     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,
                          const IInterest& interest )

  -     virtual IWindow& removeObserver(IObserver& observer)

  -     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( unsigned long identifier,
                                  IWindow* parent )

  -     IWindow&
          startHandlingEventsFor( const IWindowHandle& windowHandle )

  -     virtual unsigned long style() const

  -     IWindow& unbindMessageQueue()

  -     unsigned long windowULong(long index) const

  -     unsigned short windowUShort(long index) const

  INotifier

  -     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

  -     IControl()

#### Inherited Protected Data

  - None