Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/menubar.h>
Public Member Functions | |
IlvMenuBar (IlvDisplay *display, const IlvRect &rect, IlvMenuItem *items, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvMenuBar (IlvDisplay *display, const IlvPoint &point, IlvMenuItem *items, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvMenuBar (IlvDisplay *display, const IlvRect &rect, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0) | |
Constructor. | |
IlvMenuBar (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. | |
void | internalBBox (IlvRect &, const IlvTransformer *t=0) const |
Returns the internal bounding box of the bar. | |
Friends | |
class | IlvDefaultMenuBarLFHandler |
Gadget class.
Library: ilvgadgt
The IlvMenuBar
class defines a typical menu bar.
- IlvMenuBar -
A menu bar is composed of a number of items that provide access to menus from which the user can select a command.
IlvMenuBar::IlvMenuBar | ( | 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 IlvMenuBar
class. The size of the object is computed by calling the IlvGadget::fitToContents
method. If you want the menu bar to have a specific 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 menu bar. | |
labels | An array of predefined labels. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the menu bar. | |
palette | The palette used to draw the menu bar. |
IlvMenuBar::IlvMenuBar | ( | 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 IlvMenuBar
class. The labels are copied.
display | The connection to the display. | |
rect | The size and position of the menu bar. | |
labels | An array of predefined labels. | |
count | The number of elements in the labels array. | |
thickness | The thickness of the menu bar. | |
palette | The palette used to draw the menu bar. |
IlvMenuBar::IlvMenuBar | ( | IlvDisplay * | display, | |
const IlvPoint & | point, | |||
IlvMenuItem * | items, | |||
IlUShort | count, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the IlvMenuBar
class. The size of the object is computed by calling the IlvGadget::fitToContents
method. If you want to give the menu bar a specific 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 menu bar. | |
items | An array of predefined items. | |
count | The number of elements in the items array. | |
thickness | The thickness of the menu bar. | |
palette | The palette used to draw the menu bar. |
IlvMenuBar::IlvMenuBar | ( | IlvDisplay * | display, | |
const IlvRect & | rect, | |||
IlvMenuItem * | items, | |||
IlUShort | count, | |||
IlUShort | thickness = IlvDefaultGadgetThickness , |
|||
IlvPalette * | palette = 0 | |||
) |
Constructor.
Initializes a new instance of the IlvMenuBar
class. The items are copied.
display | The display connection. | |
rect | The size and position of the menu bar. | |
items | An array of predefined items. | |
count | The number of elements in the items array. | |
thickness | The thickness of the menu bar. | |
palette | The palette used by the menu bar. |
virtual void IlvMenuBar::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.
void IlvMenuBar::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.
© 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.