rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvToolBar Class Reference

Gadget class. More...

#include <ilviews/gadgets/toolbar.h>

Inheritance diagram for IlvToolBar:
IlvAbstractBar IlvAbstractMenu IlvGadget IlvListGadgetItemHolder IlvSimpleGraphic IlvGadgetItemHolder IlvGraphic IlvToolBarPath

List of all members.

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.
IlvMenuItemgetFocusItem () 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

Detailed Description

Gadget class.

Library: ilvgadgt

The class IlvToolBar defines a typical toolbar. This class handles tooltips, toggle buttons, pop-up menus, and any other gadgets.

IlvToolBara.gif

- A Toolbar

See also:
IlvGadget, IlvMenuBar, IlvMenuItem

Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Member Function Documentation

static IlBoolean IlvToolBar::AreToolTipsEnabled (  )  [static]

Indicates whether pop-up menus should display tooltips.

Returns:
IlTrue if tooltips are allowed for pop-up menus, IlFalse otherwise.
See also:
hasToolTips, EnableToolTips
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.

Parameters:
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.
See also:
IlvGadgetItem::draw.

Reimplemented from IlvAbstractBar.

virtual void IlvToolBar::empty (  )  [virtual]

Empties the list.

See also:
setItems, removeItem

Reimplemented from IlvAbstractMenu.

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.

Parameters:
value A Boolean value specifying whether toolbars of the application should display tooltips (IlTrue) or not (IlFalse).
See also:
useToolTips, AreToolTipsEnabled
IlvMenuItem* IlvToolBar::getFocusItem (  )  const

Returns the menu item in the toolbar that has the keyboard focus.

Returns:
The menu item that has the keyboard focus, or 0 if no item has the focus.
See also:
setFocusItem
IlBoolean IlvToolBar::hasToolTips (  )  const [virtual]

Indicates whether the toolbar displays tooltips.

Returns:
IlTrue if the toolbar handles tooltips and IlFalse if it does not.
See also:
useToolTips

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.

Parameters:
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.

Parameters:
item The menu item.
Returns:
IlTrue if item can be selected and IlFalse otherwise.
See also:
IlvGadgetItem::isSelectable

Reimplemented from IlvAbstractMenu.

void IlvToolBar::setFocusItem ( IlvMenuItem item  ) 

Gives the keyboard focus to the specified toolbar item.

Parameters:
item The menu item that has the focus. The menu item must encapsulate an IlvGadget object. See IlvGadgetItem::getGraphic.
See also:
getFocusItem, IlvGadgetItem::getGraphic
void IlvToolBar::setItemSelected ( IlUShort  index,
IlBoolean  value = IlTrue 
)

Specifies whether the specified menu item should be selected.

The item is automatically redrawn.

Parameters:
index The index of the menu item.
value A Boolean value specifying whether item should be selected (IlTrue) or not (IlFalse).
See also:
IlvGadgetItem::isSelected
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.

Parameters:
value A Boolean value specifying whether the toolbar should display tooltips (IlTrue) or not (IlFalse).
See also:
hasToolTips, IlvMenuItem::setToolTip
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.