The IToolBar class creates and manages a toolbar for a frame window.
A toolbar is a window that can contain toolbar buttons as well as other windows. The toolbar can be located along the top, bottom, or sides of a frame window or can "float" and be positioned anywhere on your desktop. You can then move a floating toolbar independently or you can "pin" the toolbar to the frame window. You can also have multiple toolbars with a variety of different toolbar buttons using text, bitmaps, or both. You can add both fly-over help and drag-and-drop support to a toolbar.
The classes that comprise the toolbar include the following :
Other features of toolbars include the following :
Constructors & DestructorYou can construct and destruct objects of this class. You cannot copy or assign IToolBar objects because both the copy constructor and assignment operator are private functions.
![]() |
public:
virtual ~IToolBar()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IToolBar( unsigned long identifier, IToolBar* precedingToolBar, bool groupWithPreceding = false, const Style& style = defaultStyle ( ) )
Creates a toolbar after the precedingToolBar. If groupWithPreceding is true the toolbar is created to the right of horizontal toolbar and below vertical toolbars.
If an IToolBarContainer is needed for the location indicated, the Open Class Library creates one automatically when you use this constructor.
Style should only contain toolbar styles. ISetCanvas, ICanvas, and IWindow styles are not allowed by this constructor.
IToolBar will initialize the toolbar by calling IToolBar::initialize.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IToolBar( unsigned long identifier, IFrameWindow* owner, Location location = aboveClient, bool groupWithPreceding = false, const Style& style = defaultStyle ( ) )
Creates a toolbar as the last or only toolbar in the toolbar area defined by the frame location.
If groupWithPreceding is true, the toolbar is placed adjacent to the last toolbar in the specified frame location. If groupWithPreceding is false, and another toolbar is in the frame location, the toolbar is placed on a new row (if the toolbar is horizontal) or a new column (if the toolbar is vertical).
If an IToolBarContainer is needed for the location indicated, the Open Class Library creates one automatically when you use this constructor.
Style should only contain toolbar styles. ISetCanvas, ICanvas, and IWindow styles are not allowed by this constructor.
IToolBar will initialize the toolbar by calling IToolBar::initialize.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
protected:
IToolBar()
Use this constructor if you derive from IToolBar and wish to override the createToolBarContainer or the createFloatingFrame member functions. If you use this constructor, you must initialize the toolbar by calling IToolBar::initialize. You can call IToolBar::initialize from the body of your derived class's constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Canvas LayoutUse these members to provide support for canvas layout.
![]() |
public:
virtual IToolBar& setLayoutDistorted( unsigned long layoutAttributeOn, unsigned long layoutAttributeOff )
This function provides notification to a toolbar that its layout of child windows needs to be updated.
IToolBar overrides this function to maintain internal information as well as optimize layout requests, then it calls ISetCanvas::setLayoutDistorted to notify the ISetCanvas that its layout needs to be updated.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Cursor MembersUse these members to query the IToolBar at the current FrameCursor position or the IWindow at the current WindowCursor position.
![]() |
public:
static IToolBar* toolBarAt(const FrameCursor& cursor)
Returns a pointer to the IToolBar at the cursor position.
| IInvalidParameter | The cursor specified is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IWindow* windowAt(const WindowCursor& cursor) const
Returns a pointer to the IWindow at the cursor position.
| IInvalidParameter | The cursor specified is invalid. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Drag and Drop SupportUse these members to set and query whether the tool bar supports drag and drop.
![]() |
public:
bool allowsDragDrop() const
Returns true if the toolbar supports drag and drop.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
When drag and drop is enabled, the following restrictions apply: The dragging of an entire toolbar to a new location, or to the floating state, is not supported. Dragging of toolbar buttons is limited to dragging and dropping buttons within the same toolbar. This drag and drop support allows a user to rearrange buttons within a toolbar.
![]() |
public:
virtual IToolBar& disableDragDrop()
Prevents dragging of the toolbar, as well as the objects that reside on the toolbar, such as a toolbar button. Prevents drops from occurring on the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& enableDragDrop(bool enable = true)
Enables dragging of the toolbar, as well as the objects that reside on the toolbar, such as a toolbar button. Enables drops on the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
When drag and drop is enabled, the following restrictions apply: The dragging of an entire toolbar to a new location, or to the floating state, is not supported. Dragging of toolbar buttons is limited to dragging and dropping buttons within the same toolbar. This drag and drop support allows a user to rearrange buttons within a toolbar.
Expanding and Collapsing the Tool BarUse these members to expand or collapse the height of the tool bar when it is floating. If the tool bar is collapsed, only the title bar of the floating frame is displayed.
![]() |
public:
virtual IToolBar& collapse()
This function is to be used for floating toolbars. Use this function to collapse an expanded toolbar. When a toolbar is collapsed, only the floating frame title bar is visible. When a toolbar is expanded, the floating frame title bar as well as the toolbar are visible. Floating toolbars are initially expanded.
IToolBar::collapse and IToolBar::expand are not to be used for hiding and showing toolbars. Use IToolBar::hide and IToolBar::show to hide and show a toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& expand(bool expand = true)
This function is to be used for floating toolbars. Use this function to expand a collapsed toolbar. When a toolbar is expanded, the floating frame title bar as well as the toolbar are visible. When a toolbar is collapsed, only the floating frame title bar is visible. Floating toolbars are initially expanded.
IToolBar::expand and IToolBar::collapse are not to be used for showing and hiding toolbars. Use IToolBar::show and IToolBar::hide to show and hide a toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
bool isExpanded() const
Returns true if the entire toolbar is displayed when it is floating.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Filter MisfitsUse these members to query or change the filterMisfits style for IToolBar objects.
The filterMisfits style automatically filters out any windows in the toolbar that exceed the misfit width when the toolbar is oriented vertically. This is to save screen space when a toolbar is oriented vertically. If a wide control is displayed, there would be wasted space to the right of toolbar buttons and other smaller windows.
If a toolbar is oriented vertically and then later reoriented horizontally, controls that were filtered out due to the filterMisfits style are automatically filtered back into the toolbar.
![]() |
public:
IToolBar& disableMisfitFiltering()
Removes the filterMisfits style from the toolbar. If the toolbar is visible, this function calls setLayoutDistorted to force the toolbar to run layout.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IToolBar& enableMisfitFiltering(bool enable = true)
Sets the filterMisfits style for the toolbar. If the toolbar is visible, this function calls setLayoutDistorted to force the toolbar to run layout.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
bool isMisfitFilteringEnabled() const
Returns true if the filterMisfits style is set for the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Floating Tool BarUse these members to set or query information about a floating tool bar.
![]() |
public:
virtual IToolBarFrameWindow* floatingFrame()
Returns the IToolBarFrameWindow object that contains this toolbar. A 0 is returned if this toolbar is not currently in a floating frame window.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IPoint floatingPosition() const
Returns the current position of the frame window that encloses the floating toolbar (relative to the owning frame window used to construct the toolbar).
If the toolbar is not floating, the position the toolbar would occupy if it were floating is returned instead. The default location is 0,0.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IString floatingTitle() const
Returns the title text of the floating frame window.
If the toolbar is not floating, the title that would be used if the toolbar were floating is returned instead.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& setFloatingPosition( const IPoint& frameRelativePosition )
Sets the position of the frame window that encloses the floating toolbar. The position is relative to the owning frame window used to construct the toolbar.
If the toolbar is not currently floating, the position is saved and used if the toolbar location is changed to floating.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
Sets the title text of the floating frame window.
If the toolbar is not floating, the title is saved and used when the toolbar location is changed to floating.
public:
virtual IToolBar& setFloatingTitle(const IResourceId& text)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
virtual IToolBar& setFloatingTitle(const char* text)
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
InitializationThese members initialize a tool bar.
![]() |
protected:
virtual IToolBarFrameWindow* createFloatingFrame( IFrameWindow* owner )
Creates a new IToolBarFrameWindow to be used for the floating toolbar.
If a derived class needs to override this function, it needs to use the protected toolbar constructor, then call IToolBar::initialize.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual IToolBarContainer* createToolBarContainer( IFrameWindow* frame )
Creates a new IToolBarContainer to be used for the toolbar.
If a derived class needs to override this function, it needs to use the protected toolbar constructor, then call IToolBar::initialize. The derived class can call initialize() from the body of its constructor. The toolbar container (ISetCanvas), must be created with the style ISetCanvas::explicitAddsNeeded. If this style is not specified, IToolBar::setLocation will throw an exception.
| IInvalidRequest | If you create the toolbar container, you must use the ISetCanvas::explicitAddsNeeded style. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual IToolBar& filter()
Checks if misfits need to be filtered in or filtered out based on the orientation of the toolbar and the current toolbar style.
This function is called during toolbar layout.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
IToolBar& initialize( unsigned long windowIdentifier, IFrameWindow* ownerFrame, Location frameLocation, bool groupWithPreceding, unsigned long style, unsigned long extendedStyle )
Initializes the toolbar window. This function is called automatically from the public toolbar constructors. If you use the protected toolbar constructor, you should call this function to initialize the toolbar.
If a derived class needs to override the createToolBarContainer or the createFloatingFrame member functions, it needs to use the protected toolbar constructor then call initialize.
ownerFrame must contain a pointer to the owning frame window.
style is not currently used. Values specified by this parameter will be ignored.
extendedStyle is to contain only toolbar styles. Only toolbar styles are honored by the toolbar. ISetCanvas, ICanvas, and IWindow styles are not allowed.
| IInvalidParameter | You specified mutually exclusive styles. Only one toolbar view can be specified. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
LayoutLayout is information used by the canvas classes to provide dialog-like behavior.
![]() |
protected:
virtual ISize calcMinimumSize() const
Returns the recommended minimum size for this toolbar. If isExpanded is false, the toolbar has a height of 0. Otherwise, this returns the size required to display the contents of the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
protected:
virtual IToolBar& layout()
The toolbar layout function first makes a call to IToolBar::filter to filter misfits and then calls ISetCanvas::layout to position and size toolbar child windows.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
StylesUse these members to set and query tool bar styles.
You cannot combine objects of the nested style class IToolBar::Style with objects of any other style class.
![]() |
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.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static Style defaultStyle()
Returns the default style. The default style is IToolBar::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 toolbars.
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.
This setting affects subsequent toolbars. It does not affect toolbars that have already been created.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style buttonBitmapAndTextVisible
Displays both the button text and bitmap for IToolBarButton objects that are added into the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style buttonBitmapVisible
Displays only the bitmap for IToolBarButton objects that are added into the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style buttonTextVisible
Displays only the button text for IToolBarButton objects that are added into the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style classDefaultStyle
Specifies the original default style for this class, which is IToolBar::filterMisfits, IToolBar::buttonBitmapVisible, and IWindow::visible.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static const Style dragDrop
Specify this style to enable dragging and dropping for a toolbar.
Enables the dragging of a toolbar and toolbar buttons that reside within a toolbar, as well as the ability to drop onto a toolbar or toolbar buttons.
Note that dragging and dropping is not enabled for a toolbar by default.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
The dragging of an entire toolbar to a new location, or to the floating state, is not supported. Dragging of toolbar buttons is limited to dragging and dropping buttons within the same toolbar. This drag and drop support allows a user to rearrange buttons within a toolbar.
![]() |
public:
static const Style filterMisfits
Automatically filters out any windows in the toolbar that exceed the misfit width when the toolbar is oriented vertically.
The purpose of this style is to save screen space when a toolbar is oriented vertically. If a wide control is displayed, there would be wasted space to the right of toolbar buttons and other smaller controls.
If a toolbar is oriented vertically and then later reoriented horizontally, controls that were filtered out due to the filterMisfits style are automatically filtered back into the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tool Bar Button AppearanceUse these members to affect the appearance of any IToolBarButton objects in the tool bar.
![]() |
public:
IToolBarButton::View buttonView() const
Returns the current view of IToolBarButton objects in the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& setButtonView( IToolBarButton::View buttonView )
Changes the IToolBarButton members of the toolbar to the value of IToolBarButton::view. Valid values are IToolBarButton::bitmapView, IToolBarButton::textView, and IToolBarButton::bitmapAndText.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tool Bar ContainerUse these members to access IToolBarContainer objects.
![]() |
public:
virtual IToolBarContainer* toolBarContainer() const
Returns a pointer to the IToolBarContainer object that contains this toolbar. A 0 is returned if this toolbar is not currently in a toolbar container.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tool Bar ContentsUse these members to add and remove items in the tool bar.
![]() |
public:
virtual IToolBar& addAsFirst( IWindow* window, bool startNewGroup = false )
Adds the window as the first item in the toolbar.
The first window in a toolbar is always in a group. If startNewGroup is true, the window is placed by itself into a group. The second window in the toolbar begins a second group. If startNewGroup is false, the window becomes part of the first group in the toolbar.
| IInvalidRequest | On Motif, the window cannot be added to the toolbar unless its parent is the toolbar. Verify that when creating the window, you specified the toolbar as the window's parent. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
A window cannot be added to the toolbar unless its parent is the toolbar. If this condition is not met an exception is generated.
![]() |
public:
virtual IToolBar& addAsLast( IWindow* window, bool startNewGroup = false )
Adds the window as the last item in the toolbar.
If startNewGroup is true, the window is placed by itself into a new group. Otherwise, the window becomes part of the last group in the toolbar.
| IInvalidRequest | On Motif, the window cannot be added to the toolbar unless its parent is the toolbar. Verify that when creating the window, you specified the toolbar as the window's parent. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
A window cannot be added to the toolbar unless its parent is the toolbar. If this condition is not met an exception is generated.
![]() |
public:
virtual IToolBar& addAsNext( IWindow* window, IWindow* referenceWindow, bool startNewGroup = false )
Adds the window as the next item in the toolbar immediately after the reference window.
If startNewGroup is true, the window starts a new group. Otherwise, the window becomes part of the same group as the reference window.
| IInvalidRequest | On Motif, the window cannot be added to the toolbar unless its parent is the toolbar. Verify that when creating the window, you specified the toolbar as the window's parent. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
A window cannot be added to the toolbar unless its parent is the toolbar. If this condition is not met an exception is generated.
![]() |
public:
virtual IToolBar& addAsPrevious( IWindow* window, IWindow* referenceWindow, bool startNewGroup = false )
Adds the window as the previous item in the toolbar immediately before the reference window.
If startNewGroup is true, the window starts a new group. Otherwise, the window becomes part of the same group as the reference window.
| IInvalidRequest | On Motif, the window cannot be added to the toolbar unless its parent is the toolbar. Verify that when creating the window, you specified the toolbar as the window's parent. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
A window cannot be added to the toolbar unless its parent is the toolbar. If this condition is not met an exception is generated.
![]() |
public:
virtual IToolBar& moveAfter( IWindow* window, IWindow* referenceWindow, bool startNewGroup = false )
Moves the window so that it immediately follows the reference window.
If startNewGroup is true, the window
starts a new group. Otherwise, the window becomes
part of the same group as the reference window.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& moveBefore( IWindow* window, IWindow* referenceWindow, bool startNewGroup = false )
Moves the window so that it immediately precedes the reference window.
If startNewGroup is true, the window
starts a new group. Otherwise, the window becomes
part of the same group as the reference window.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& moveToFirst( IWindow* window, bool startNewGroup = false )
Moves the window so that it is the first window in the toolbar.
The first window in a toolbar is always in a group. If
startNewGroup is true, the window is placed
by itself into a group. The second window in the toolbar
begins a second group. If startNewGroup is
false, the window becomes part of the first group in the toolbar.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& moveToLast( IWindow* window, bool startNewGroup = false )
Moves the window so that it is the last window in the toolbar.
If startNewGroup is true, the window
starts a new group. Otherwise, the window becomes
part of the last group in the toolbar.
Note:
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& remove(IWindow* window)
Removes the window from the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tool Bar DefaultsUse these static members to affect the appearance of all IToolBar objects in the application.
![]() |
public:
static unsigned long defaultGroupPad()
Returns the current number of pixels of padding added between groups in toolbars.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static ISize defaultMargin()
Returns the number of pixels of margin added around windows in toolbars. The value returned is the value set by IToolBar::setDefaultMargin.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static unsigned long defaultMisfitWidth()
Returns the current width used to filter oversized windows from toolbars.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static long defaultPad()
Returns the current default number of pixels used to separate windows in toolbars.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static void setDefaultGroupPad( unsigned long pixelsOfGroupPad = 8 )
Sets the number of pixels of padding between groups of windows in the toolbar. This pad value is added to any window that returns true from IWindow::isGroup. The padding is only added between groups of windows. The padding is not added before the first window or after the last window in the toolbar.
This setting affects subsequent toolbars. It does not affect toolbars that have already been created.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static void setDefaultMargin( const ISize& sizeOfMargin = ISize ( 7 , 4 ) )
Sets the number of pixels of margin around windows in the toolbar. The sizeOfMargin value is applied directly to a vertical toolbar and rotated for a horizontal toolbar. In a horizontal toolbar, sizeOfMargin.width is added above and below the windows in the toolbar, and sizeOfMargin.height is added to the left and right of the windows in the toolbar. This enhances the appearance of the toolbar. If you change the location of the toolbar to a location that has a different orientation, the margin values will be rotated. The initial sizeOfMargin value (width and height respectively) is ISize(7,4).
If you later set the margin of a toolbar through ISetCanvas::setMargin, the margin settings are applied directly to the toolbar, regardless of its orientation. However, if you change the location of the toolbar to a location that has a different orientation, the margin values will be rotated.
This setting affects subsequent toolbars. It does not affect toolbars that have already been created.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static void setDefaultMisfitWidth( unsigned long maximumWidth = 65 )
Sets the width value to be used for filtering windows when a toolbar contains the style IToolBar::filterMisfits.
The initial setDefaultMisfitWidth is 65 pixels.
This setting affects subsequent toolbars. It does not affect toolbars that have already been created.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
static void setDefaultPad(long pixelsOfPad = - 1)
Sets the number of pixels of padding between windows added to the toolbar. The initial default is to overlap the members of a group by one pel.
This setting affects subsequent toolbars. It does not affect toolbars that have already been created.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Tool Bar LocationUse these members to set and query the tool bar location.
![]() |
public:
bool isMoveValid(Location newLocation) const
Returns true if the toolbar's position can be changed to the location specified. Use this function to check if a move is valid before calling IToolBar::setLocation.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
On Windows and OS/2, all movements are permitted.
On Motif, movement of the toolbar is restricted as follows: A floating toolbar cannot change to a non-floating state, a non-floating toolbar cannot change to floating state, and a non-floating toolbar cannot change to a location that already contains a toolbar. Additionally, moving a non-floating toolbar from the current location to a new location (assuming the new location does not already contain a toolbar) will move all toolbars from that location to the new location.
![]() |
public:
Location location() const
Returns the current location of the toolbar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& setLocation(Location location)
Sets a new location for the toolbar. Certain restrictions apply to movement of toolbars. See IToolBar::isMoveValid for details.
A toolbar's location can be changed while the toolbar is in hidden state. However, the toolbar will not appear in the new location until the toolbar is made visible.
| IInvalidRequest | On Motif, the toolbar cannot be changed from its current location to the new location. This is due to operating system restrictions. Before calling this function, call IToolBar::isMoveValid to ensure that the location change is valid. |
| IInvalidRequest | If you create the toolbar container, you must use the ISetCanvas::explicitAddsNeeded style. |
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
Window PaintingUse these members to display a window and determine the visibility of a window.
![]() |
public:
virtual IToolBar& hide()
Hides the toolbar.
A toolbar positioned in above, below, left or right location is contained in a toolbar container. When this function is called to hide the toolbar, the toolbar is removed from the toolbar container. The toolbar container will then repaint without displaying the toolbar. However, the toolbar is still a child of the toolbar container.
The toolbar's z-order (position relative to sibling windows) is not changed when the toolbar is hidden. If other toolbars exist at the same location as the toolbar being hidden, its position relative to the other toolbars will remain unchanged when the toolbar is subsequently re-shown.
A floating toolbar is contained within a floating frame window. Hiding a floating toolbar hides the floating frame. When a user closes a floating toolbar from the floating frame, internally, hide() is issued on the floating toolbar, which causes the floating frame to be hidden. To re-show the toolbar, you must call show(), even if you have change the toolbar's location while it is hidden.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
virtual IToolBar& show(bool showWindow = true)
Makes the toolbar visible.
A toolbar positioned in above, below, left or right location is contained in a toolbar container. When this function is called to show the toolbar, the toolbar is added to the toolbar container. The toolbar container will then repaint, displaying the toolbar.
The toolbar's z-order (position relative to sibling windows) was not changed when the toolbar was hidden. If other toolbars exist at the same location as the toolbar, its position relative to the other toolbars will remain unchanged when the toolbar is shown.
A floating toolbar is contained within a floating frame window. Showing a floating toolbar shows the floating frame, which was hidden when the toolbar was hidden. When a user closes a floating toolbar from the floating frame, internally, hide() is issued on the floating toolbar, which causes the floating frame to be hidden. To re-show the toolbar, you must call show(), even if you have change the toolbar's location while it is hidden.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
enum Location { aboveClient,
belowClient,
leftOfClient,
rightOfClient,
floating,
hidden }Use these enumerators to specify the location of the tool bar.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
virtual ~ICanvas()
virtual ICanvas& addBorder()
virtual IColor backgroundColor() const
virtual IColor borderColor() const
IText borderText() const
IPoint bottomRightLayoutOffset() const
virtual IFont font() const
virtual bool hasBorder() const
ICanvas( unsigned long windowIdentifier,
IWindow* parent,
IWindow* owner,
const IRectangle& initial = IRectangle ( ),
const Style& style = defaultStyle ( ) )
virtual bool isTabStop() const
virtual IWindowHandle matchForMnemonic( unsigned short character ) const
virtual ICanvas& removeBorder()
virtual ICanvas& resetBorderColor()
virtual ICanvas& resetFont()
virtual ICanvas& setBorderColor(const IColor& borderColor)
virtual ICanvas& setBorderText( const IText& borderText, bool showBorder = true )
virtual ICanvas& setBorderText( const IResourceId& borderText, bool showBorder = true )
virtual ICanvas& setFont(const IFont& font)
virtual ICanvas&
setLayoutDistorted( unsigned long layoutAttributesOn,
unsigned long layoutAttributesOff )
IPoint topLeftLayoutOffset() const
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 ~ISetCanvas()
virtual ISetCanvas& add(IWindow* child)
ISetCanvas& alignDecksByGroup( bool alignDecksByGroup = true )
Alignment alignment() const
bool areExplicitAddsNeeded() const
unsigned long deckCount() const
DeckOrientation deckOrientation() const
unsigned long groupPad() const
virtual bool hasChildrenToLayout() const
bool hasDecksAlignedByGroup() const
ISetCanvas( unsigned long windowIdentifier,
IWindow* parent,
IWindow* owner,
const IRectangle& initial = IRectangle ( ),
const Style& style = defaultStyle ( ) )
virtual bool isInLayout(IWindow* child) const
ISize margin() const
PackType packType() const
ISize pad() const
virtual ISetCanvas& remove(IWindow* child)
virtual ISetCanvas& replaceChildWith( IWindow* existingChild, IWindow* newChild )
virtual ISetCanvas& setAlignment(Alignment value)
virtual ISetCanvas& setDeckCount(unsigned long decks)
virtual ISetCanvas& setDeckOrientation( DeckOrientation value )
virtual ISetCanvas& setGroupPad(unsigned long groupPad)
virtual ISetCanvas&
setLayoutDistorted( unsigned long layoutAttributesOn,
unsigned long layoutAttributesOff )
virtual ISetCanvas& setMargin(const ISize& margin)
virtual ISetCanvas& setPackType(PackType value)
virtual ISetCanvas& setPad(const ISize& pad)
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()
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& enableNotification(bool enable = 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 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
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 )
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(const IEvent& event) const
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 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
static const Style border
static INotificationId const textId
static const Style bottomAlign
static const Style centerAlign
static const Style centerVerticalAlign
static INotificationId const deckOrientationId
static const Style decksByGroup
static const Style explicitAddsNeeded
static const Style horizontalDecks
static const Style leftAlign
static const Style packEven
static const Style packExpanded
static const Style packTight
static const Style rightAlign
static const Style topAlign
static const Style verticalDecks
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, 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, 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, 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 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( 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
bool areChildrenReversed() const
virtual IWindowPosBuffer fixupChildren()
ICanvas()
ICanvas&
initialize( unsigned long windowIdentifier,
IWindow* parent,
IWindow* owner,
const IRectangle& initialRect,
unsigned long style,
unsigned long extendedStyle )
virtual ICanvas& layout()
ISize layoutSize() const
virtual bool passEventToOwner(IEvent& event)
IRectangle rectangleInsideBorder( const ISize& sizeWithBorder ) const
virtual ICanvas& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
ICanvas& setLayoutSize(const ISize& size)
ISize sizeWithBorder(const ISize& sizeWithoutBorder) const
virtual ISetCanvas& expandForText()
ISetCanvas&
initialize( unsigned long windowIdentifier,
IWindow* parent,
IWindow* owner,
const IRectangle& initialRect,
unsigned long style,
unsigned long extendedStyle )
ISetCanvas()
virtual ISetCanvas& layout()
IControl()