rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions | Static Public Member Functions
IlvMenuItemGroup Class Reference

Named property class. More...

#include <ilviews/gadgets/amenu.h>

Inheritance diagram for IlvMenuItemGroup:
IlvNamedProperty IlvMenuItemHighlighter IlvMenuItemSelector

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...
 
IlvAbstractMenugetAbstractMenu () const
 Returns the IlvAbstractMenu object to which the group is connected. More...
 
IlvMenuItemgetItem (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 IlvMenuItemGroupGet (const IlvAbstractMenu *menu, const IlSymbol *name)
 Returns the IlvMenuItemGroup object with the specified name and connected to the specified menu. More...
 
static IlvMenuItemGroupRemoveFrom (IlvAbstractMenu *menu, const IlSymbol *name)
 Removes the menu items group specified from the specified abstract menu. More...
 

Detailed Description

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.

See Also
IlvAbstractMenu, IlvMenuItem, addTo().

Constructor & Destructor Documentation

IlvMenuItemGroup::IlvMenuItemGroup ( IlSymbol symbol)

Constructor.

Initializes a new instance of the IlvMenuItemGroup class.

Parameters
symbolThe group name.

Member Function Documentation

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.

Parameters
itemThe item.
See Also
removeItem().
void IlvMenuItemGroup::addItem ( const IlSymbol name)

Adds an item to the group.

Parameters
nameThe item name.
See Also
removeItem().
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.

Parameters
menuThe abstract menu.
See Also
Get(), removeFrom().
IlBoolean IlvMenuItemGroup::contains ( const IlSymbol name) const

Indicates whether the specified name is managed by this group.

Parameters
nameThe item name.
Returns
IlTrue if the specified name is managed by this group and IlFalse if it is not.
See Also
getItem().
static IlvMenuItemGroup* IlvMenuItemGroup::Get ( const IlvAbstractMenu menu,
const IlSymbol name 
)
static

Returns the IlvMenuItemGroup object with the specified name and connected to the specified menu.

Parameters
menuThe abstract menu.
nameThe group name.
Returns
The IlvMenuItemGroup object with the specified name connected to the specified menu.
See Also
addTo(), removeFrom().
IlvAbstractMenu* IlvMenuItemGroup::getAbstractMenu ( ) const

Returns the IlvAbstractMenu object to which the group is connected.

Returns
The IlvAbstractMenu object to which the group is connected. Returns 0 if the group has not been added to an IlvAbstractMenu object.
See Also
addTo().
IlvMenuItem* IlvMenuItemGroup::getItem ( const IlSymbol name) const

Returns the item of the group corresponding to the specified name.

Parameters
nameThe item name.
Returns
The item corresponding to the specified name.
See Also
contains().
const IlSymbol* const* IlvMenuItemGroup::getItemNames ( IlUShort count) const

Returns an array of all the items names of this group.

Parameters
countThe number of elements of the returned array.
Returns
An array of count symbols that includes all the items names stored in the group.
See Also
getItems(), getItem().
IlvMenuItem* const* IlvMenuItemGroup::getItems ( IlUShort count) const

Returns an array of all the items names of this group.

Parameters
countThe number of elements of the returned array.
Returns
An array of count items that includes all the items stored in the group. If the group has not been connected to an IlvAbstractMenu object, the method returns 0.
See Also
getItemNames(), getItem().
void IlvMenuItemGroup::removeFrom ( IlvAbstractMenu menu)

Removes the menu items group from the specified abstract menu.

Parameters
menuThe abstract menu.
See Also
Get(), addTo(), RemoveFrom().
static IlvMenuItemGroup* IlvMenuItemGroup::RemoveFrom ( IlvAbstractMenu menu,
const IlSymbol name 
)
static

Removes the menu items group specified from the specified abstract menu.

Parameters
menuThe abstract menu.
nameThe group name.
See Also
Get(), addTo().
void IlvMenuItemGroup::removeItem ( const IlSymbol name)

Removes an item from the group.

Parameters
nameThe item name.
See Also
addItem().

© Copyright 2015, 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.