rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMenuItemGroup Class Reference

Named property class. More...

#include <ilviews/gadgets/amenu.h>

Inheritance diagram for IlvMenuItemGroup:
IlvNamedProperty IlvMenuItemHighlighter IlvMenuItemSelector

List of all members.

Public Member Functions

 IlvMenuItemGroup (IlSymbol *symbol)
 Constructor.
void addItem (const IlSymbol *name)
 Adds an item to the group.
void addItem (IlvMenuItem *item)
 Adds an item to the group.
void addTo (IlvAbstractMenu *menu)
 Adds the menu items group to the specified abstract menu.
IlBoolean contains (const IlSymbol *name) const
 Returns a Boolean value indicating whether the specified name is managed by this group.
IlvAbstractMenugetAbstractMenu () const
 Returns the IlvAbstractMenu object to which the group is connected.
IlvMenuItemgetItem (const IlSymbol *name) const
 Returns the item of the group corresponding to the specified name.
const IlSymbol *const * getItemNames (IlUShort &count) const
 Returns an array of all the items names of this group.
IlvMenuItem *const * getItems (IlUShort &count) const
 Returns an array of all the items names of this group.
void removeFrom (IlvAbstractMenu *menu)
 Removes the menu items group from the specified abstract menu.
void removeItem (const IlSymbol *name)
 Removes an item from the group.

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.
static IlvMenuItemGroupRemoveFrom (IlvAbstractMenu *menu, const IlSymbol *name)
 Removes the menu items group specified from the specified abstract menu.

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:
symbol The group name.

Member Function Documentation

void IlvMenuItemGroup::addItem ( const IlSymbol name  ) 

Adds an item to the group.

Parameters:
name The item name.
See also:
removeItem
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:
item The item.
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:
menu The abstract menu.
See also:
Get, removeFrom
IlBoolean IlvMenuItemGroup::contains ( const IlSymbol name  )  const

Returns a Boolean value indicating whether the specified name is managed by this group.

Parameters:
name The item name.
Returns:
A Boolean value indicating whether the specified name is managed by this group.
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:
menu The abstract menu.
name The 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:
name The 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:
count The 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:
count The 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
static IlvMenuItemGroup* IlvMenuItemGroup::RemoveFrom ( IlvAbstractMenu menu,
const IlSymbol name 
) [static]

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

Parameters:
menu The abstract menu.
name The group name.
See also:
Get, addTo
void IlvMenuItemGroup::removeFrom ( IlvAbstractMenu menu  ) 

Removes the menu items group from the specified abstract menu.

Parameters:
menu The abstract menu.
See also:
Get, addTo, RemoveFrom
void IlvMenuItemGroup::removeItem ( const IlSymbol name  ) 

Removes an item from the group.

Parameters:
name The item name.
See also:
addItem

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