Using IlvAbstractBar
IlvAbstractBar is an abstract class for managing the size and position of menu bar or toolbar items. See
Using IlvAbstractMenu and
Using IlvMenuItem.
This section covers these topics:
Setting the Bar Orientation
You can specify the orientation of the bar with the member function
setOrientation and retrieve it with
getOrientation.
The bar can be vertical, in which case menu items are arranged from top to bottom, or it can be horizontal, in which case items are arranged from left to right.
Vertical and Horizontal Toolbars
Constraining the Bar Geometry
You can constrain the bar geometry so that all its items are visible whatever its size with the member function
setConstraintMode. When this member function is set to
IlTrue, the bar is automatically resized to accommodate all its items. Items can be extended to several lines if necessary. To know whether the constraint mode is on, call
useConstraintMode.
Constrained (Top) and Nonconstrained Toolbars (Bottom)
Notifying the Bar About Geometry Changes
When the constraint mode is on, the virtual member function
geometryChanged is called if:
Modifying the height of a vertical bar causes its width to change.
Modifying the width of a horizontal bar causes its height to change.
Setting the Default Item Size
You can set a default size for all the items in a bar with the member function
setDefaultItemSize and retrieve it with
getDefaultItemSize. You can specify the spacing between two items in a bar with
setSpacing and retrieve it with
getSpacing.
Aligning Items Flush-right
You can align the last item in a bar with its right border with the member function
setFlushingRight. Help menus, for example, are flush-right most of the time.
Help Menu Aligned Flush-right
Using Docking Features
You can dock and undock abstract bar objects. See
Using Docking Bars.
Version 6.2.1
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.