IToolBarContainer

The IToolBarContainer class creates and manages a toolbar container for a frame window. Objects of this class are created by IToolBar objects when needed. IToolBar calls the IToolBar::createToolBarContainer function to create instances of this class.

The IToolBarContainer class, which derives from ISetCanvas, is used to hold non-floating toolbars. When you create a toolbar in the above, below, left, or right location, IToolBar creates a toolbar container, adds the toolbar to the toolbar container, then adds the toolbar container as the frame extension.

The toolbar container exists to support more than one toolbar in the same location. The container lays out and manages the toolbar or toolbars within it.

When adding a toolbar to your application, you will generally not interact with the IToolBarContainer, which is created and destructed by the toolbar as needed.


IToolBarContainer - Member Functions and Data by Group

Constructors & Destructor

You can construct and destruct objects of the this class. You cannot copy or assign IToolBarContainer objects because both the copy constructor and assignment operator are private functions.


[view class]
~IToolBarContainer
public:
virtual ~IToolBarContainer()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IToolBarContainer
public:
IToolBarContainer( unsigned long identifier, IFrameWindow* parentAndOwner, IFrameWindow::Location location, const Style& style = defaultStyle ( ) )

Creates an IToolBarContainer object by providing a window ID, frame window, location, and style.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Canvas Layout

These members support canvas layout.


[view class]
setLayoutDistorted
public:
virtual IToolBarContainer& setLayoutDistorted( unsigned long layoutAttributeOn, unsigned long layoutAttributeOff )

Treats a minimum size change for a child window like a layout change so that the container re-sizes as new windows are added or removed from toolbars.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Frame Location

Use these members to set and query the tool bar container's location.


[view class]
frameToolBarContainer
public:
static IToolBarContainer* frameToolBarContainer( IFrameWindow* frame, IFrameWindow::Location frameLocation )

Returns the toolbar container for the specified frame and location.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
location
public:
IFrameWindow::Location location() const

Returns the current frame window location of the toolbar container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setLocation
public:
virtual IToolBarContainer& setLocation( IFrameWindow::Location location )

Sets a new frame window location for the toolbar container. Calling this function changes the locations of the toolbar or toolbars contained within the toolbar container.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Styles

Use these members to set and query IToolBarContainer styles.

You cannot combine objects of the nested style class IToolBarContainer::Style with objects of any other style class.


[view class]
convertToGUIStyle
public:
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const

Use this function to convert style bits into the style value that can be processed by the GUI. The default action is to return the base GUI style for the platform. Extended styles, those defined by the Open Class Library, can be returned by setting the extendedOnly parameter to true.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
defaultStyle
public:
static Style defaultStyle()

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setDefaultStyle
public:
static void setDefaultStyle(const Style& style)

Sets the default style for all subsequent toolbar containers.

style
Use the styles provided by IToolBarContainer::Style 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 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.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
classDefaultStyle
public:
static const Style classDefaultStyle

Specifies the original default style for this class, which is IWindow::visible.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IToolBarContainer - Inherited Member Functions and Data

Inherited Public Functions

ICanvas
IControl
INotifier
ISetCanvas
IWindow

Inherited Public Data

IWindow
INotifier
ICanvas
ISetCanvas

Inherited Protected Functions

IWindow
INotifier
ICanvas
ISetCanvas
IControl

Inherited Protected Data