Rogue Wave Views Gadgets Package API Reference Guide |
Rogue Wave Views Documentation Home |
Named property class. More...
#include <ilviews/gadgets/amenu.h>
Public Member Functions | |
IlvMenuItemGroup (IlSymbol *symbol) | |
Constructor. More... | |
void | addItem (IlvMenuItem *item) |
Adds an item to the group. More... | |
void | addItem (const IlSymbol *name) |
Adds an item to the group. More... | |
void | addTo (IlvAbstractMenu *menu) |
Adds the menu items group to the specified abstract menu. More... | |
IlBoolean | contains (const IlSymbol *name) const |
Indicates whether the specified name is managed by this group. More... | |
IlvAbstractMenu * | getAbstractMenu () const |
Returns the IlvAbstractMenu object to which the group is connected. More... | |
IlvMenuItem * | getItem (const IlSymbol *name) const |
Returns the item of the group corresponding to the specified name. More... | |
const IlSymbol *const * | getItemNames (IlUShort &count) const |
Returns an array of all the items names of this group. More... | |
IlvMenuItem *const * | getItems (IlUShort &count) const |
Returns an array of all the items names of this group. More... | |
void | removeFrom (IlvAbstractMenu *menu) |
Removes the menu items group from the specified abstract menu. More... | |
void | removeItem (const IlSymbol *name) |
Removes an item from the group. More... | |
Static Public Member Functions | |
static IlvMenuItemGroup * | Get (const IlvAbstractMenu *menu, const IlSymbol *name) |
Returns the IlvMenuItemGroup object with the specified name and connected to the specified menu. More... | |
static IlvMenuItemGroup * | RemoveFrom (IlvAbstractMenu *menu, const IlSymbol *name) |
Removes the menu items group specified from the specified abstract menu. More... | |
Named property class.
Library: ilvgadgt
The class IlvMenuItemGroup
is a named property that can be set on an IlvAbstractMenu
object to implement menu items groups. A group of menu item is a list of menu item. The menu items are referenced by their name inside the group, and thus, changing the name of an item located in a group is not allowed. Furthermore, you must be aware that you cannot add a group to a menu if this menu already has a named property with the same name as the group.
IlvAbstractMenu
, IlvMenuItem
, addTo()
. IlvMenuItemGroup::IlvMenuItemGroup | ( | IlSymbol * | symbol | ) |
Constructor.
Initializes a new instance of the IlvMenuItemGroup
class.
symbol | The group name. |
void IlvMenuItemGroup::addItem | ( | IlvMenuItem * | item | ) |
Adds an item to the group.
This member function call the addItem()
member function that takes an IlSymbol
as parameter with the name of item.
If item has no name, it is given a unique name inside this group.
item | The item. |
removeItem()
. void IlvMenuItemGroup::addItem | ( | const IlSymbol * | name | ) |
void IlvMenuItemGroup::addTo | ( | IlvAbstractMenu * | menu | ) |
Adds the menu items group to the specified abstract menu.
Does nothing if the menu already has a named property with the same symbol as this.
menu | The abstract menu. |
Get()
, removeFrom()
. Indicates whether the specified name is managed by this group.
name | The item name. |
IlTrue
if the specified name is managed by this group and IlFalse
if it is not. getItem()
.
|
static |
Returns the IlvMenuItemGroup
object with the specified name and connected to the specified menu.
menu | The abstract menu. |
name | The group name. |
IlvMenuItemGroup
object with the specified name connected to the specified menu. addTo()
, removeFrom()
. IlvAbstractMenu* IlvMenuItemGroup::getAbstractMenu | ( | ) | const |
Returns the IlvAbstractMenu
object to which the group is connected.
IlvAbstractMenu
object to which the group is connected. Returns 0
if the group has not been added to an IlvAbstractMenu
object. addTo()
. IlvMenuItem* IlvMenuItemGroup::getItem | ( | const IlSymbol * | name | ) | const |
Returns the item of the group corresponding to the specified name.
name | The item name. |
contains()
. Returns an array of all the items names of this group.
count | The number of elements of the returned array. |
getItems()
, getItem()
. IlvMenuItem* const* IlvMenuItemGroup::getItems | ( | IlUShort & | count | ) | const |
Returns an array of all the items names of this group.
count | The number of elements of the returned array. |
IlvAbstractMenu
object, the method returns 0
. getItemNames()
, getItem()
. void IlvMenuItemGroup::removeFrom | ( | IlvAbstractMenu * | menu | ) |
Removes the menu items group from the specified abstract menu.
menu | The abstract menu. |
Get()
, addTo()
, RemoveFrom()
.
|
static |
© Copyright 2016, 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.