Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/toolbar.h>
Public Member Functions | |
IlvToolBar (IlvDisplay *display, const IlvRect &rect, IlvMenuItem *items, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvToolBar (IlvDisplay *display, const IlvPoint &point, IlvMenuItem *items, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvToolBar (IlvDisplay *display, const IlvRect &rect, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvToolBar (IlvDisplay *display, const IlvPoint &point, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
virtual void | drawGadgetItem (const IlvGadgetItem *, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws a specific gadget item. | |
virtual void | empty () |
Empties the list. | |
IlvMenuItem * | getFocusItem () const |
Returns the menu item in the toolbar that has the keyboard focus. | |
IlBoolean | hasToolTips () const |
Indicates whether the toolbar displays tooltips. | |
virtual void | internalBBox (IlvRect &, const IlvTransformer *t=0) const |
Returns the internal bounding box of the bar. | |
virtual IlBoolean | isSelectable (const IlvMenuItem *) const |
Indicates whether the specified item can be selected. | |
void | setFocusItem (IlvMenuItem *item) |
Gives the keyboard focus to the specified toolbar item. | |
void | setItemSelected (IlUShort index, IlBoolean value=IlTrue) |
Specifies whether the specified menu item should be selected. | |
void | useToolTips (IlBoolean value) |
Specifies whether the toolbar should display tooltips. | |
Static Public Member Functions | |
static IlBoolean | AreToolTipsEnabled () |
Indicates whether pop-up menus should display tooltips. | |
static void | EnableToolTips (IlBoolean value=IlTrue) |
Specifies whether toolbars should display tooltips. | |
Friends | |
class | IlvDefaultToolBarLFHandler |
Gadget class.
Library: ilvgadgt
The class IlvToolBar
defines a typical toolbar. This class handles tooltips, toggle buttons, pop-up menus, and any other gadgets.
- A Toolbar
IlvToolBar::IlvToolBar | ( | IlvDisplay * | display, | |
const IlvPoint & | point, | |||
const char *const * | labels = 0 , |
|||
IlUShort | count = 0 , |
|||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvToolBar
. The size of the object is computed by calling the IlvGadget::fitToContents
method. If you want to specify its size, use a constructor that takes an IlvRect
reference instead of an IlvPoint
object as parameter. The labels are copied.
display | The connection to the display. | |
point | The position of the toolbar. | |
labels | An array containing the predefined labels of the toolbar. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the toolbar. | |
palette | The palette used by the toolbar. |
IlvToolBar::IlvToolBar | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
const char *const * | labels = 0 , |
|||
IlUShort | count = 0 , |
|||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvToolBar
. The labels are copied.
display | The connection to the display. | |
rect | The size and position of the toolbar. | |
labels | An array containing the predefined labels of the toolbar. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the toolbar. | |
palette | The palette used by the toolbar. |
IlvToolBar::IlvToolBar | ( | IlvDisplay * | display, | |
const IlvPoint & | point, | |||
IlvMenuItem * | items, | |||
IlUShort | count, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvToolBar
. The size of the object is computed by calling the IlvGadget::fitToContents
method. If you want to specify its size, use a constructor that takes an IlvRect
reference instead of an IlvPoint
object as parameter. The items are copied.
display | The connection to the display. | |
point | The position of the toolbar. | |
items | An array containing the predefined items of the toolbar. | |
count | The number of elements in the items array. | |
thickness | The thickness of the toolbar. | |
palette | The palette used by the toolbar. |
IlvToolBar::IlvToolBar | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
IlvMenuItem * | items, | |||
IlUShort | count, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the class IlvToolBar
. The items are copied.
display | The connection to the display. | |
rect | The size and position of the toolbar. | |
items | An array containing the predefined items of the toolbar. | |
count | The number of elements in the items array. | |
thickness | The thickness of the toolbar. | |
palette | The palette used by the toolbar. |
static IlBoolean IlvToolBar::AreToolTipsEnabled | ( | ) | [static] |
Indicates whether pop-up menus should display tooltips.
IlTrue
if tooltips are allowed for pop-up menus, IlFalse
otherwise. virtual void IlvToolBar::drawGadgetItem | ( | const IlvGadgetItem * | item, | |
IlvPort * | port, | |||
const IlvRect & | rect, | |||
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws a specific gadget item.
Redraws item in port at the location specified by rect using the clipping area clip. This method simply calls IlvGadgetItem::draw
using the item
instance.
item | The item to be redrawn. | |
port | The destination drawing port. | |
rect | The bounding box of the item. | |
t | The transformer used to draw the item. Not used. | |
clip | The clipping area. |
IlvGadgetItem::draw
. Reimplemented from IlvAbstractBar.
virtual void IlvToolBar::empty | ( | ) | [virtual] |
static void IlvToolBar::EnableToolTips | ( | IlBoolean | value = IlTrue |
) | [static] |
Specifies whether toolbars should display tooltips.
Use this setting to enable or disable tooltips at the class level.
value | A Boolean value specifying whether toolbars of the application should display tooltips (IlTrue ) or not (IlFalse ). |
IlvMenuItem* IlvToolBar::getFocusItem | ( | ) | const |
Returns the menu item in the toolbar that has the keyboard focus.
0
if no item has the focus. IlBoolean IlvToolBar::hasToolTips | ( | ) | const [virtual] |
Indicates whether the toolbar displays tooltips.
IlTrue
if the toolbar handles tooltips and IlFalse
if it does not. Reimplemented from IlvGadgetItemHolder.
virtual void IlvToolBar::internalBBox | ( | IlvRect & | rect, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Returns the internal bounding box of the bar.
Uses rect to return the internal bounding box of the bar when the object is computed with the transformer t. The internal bounding box delimits the area within which the bar items are drawn. You can override this member function in a subclass to change the internal bounding box.
rect | The internal bounding box of the bar. | |
t | The transformer used to compute the internal bounding box. |
Reimplemented from IlvAbstractBar.
virtual IlBoolean IlvToolBar::isSelectable | ( | const IlvMenuItem * | item | ) | const [virtual] |
Indicates whether the specified item can be selected.
item | The menu item. |
IlTrue
if item can be selected and IlFalse
otherwise. Reimplemented from IlvAbstractMenu.
void IlvToolBar::setFocusItem | ( | IlvMenuItem * | item | ) |
Gives the keyboard focus to the specified toolbar item.
item | The menu item that has the focus. The menu item must encapsulate an IlvGadget object. See IlvGadgetItem::getGraphic . |
Specifies whether the specified menu item should be selected.
The item is automatically redrawn.
index | The index of the menu item. | |
value | A Boolean value specifying whether item should be selected (IlTrue ) or not (IlFalse ). |
void IlvToolBar::useToolTips | ( | IlBoolean | value | ) |
Specifies whether the toolbar should display tooltips.
The tooltips associated with menu items are displayed when the mouse remains over the items for a short period of time. For details on how to set tooltips to menu items, see IlvMenuItem::setToolTip
.
value | A Boolean value specifying whether the toolbar should display tooltips (IlTrue ) or not (IlFalse ). |
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.