Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvMenuItemSelector Class Reference

Named property class. More...

#include <ilviews/gadgets/amenu.h>

Inheritance diagram for IlvMenuItemSelector:
IlvMenuItemGroup IlvNamedProperty IlvValueInterface

Public Member Functions

 IlvMenuItemSelector (IlSymbol *symbol)
 Constructor. More...
 
virtual void doIt (IlvMenuItem *item)
 Is called each time an item of the group is selected. More...
 
IlvGraphicCallback getCallback () const
 Returns a pointer to the group callback. More...
 
IlAny getCallbackData () const
 Returns a pointer to the group callback data. More...
 
IlSymbolgetCallbackName () const
 Returns the symbol that represents the name of the group callback. More...
 
void selectItem (IlvMenuItem *item)
 Select the specified item, and deselect the other items of the group. More...
 
void setCallback (IlvGraphicCallback callback)
 Sets the group callback. More...
 
void setCallbackData (IlAny callbackData)
 Sets the group callback data. More...
 
void setCallbackName (IlSymbol *callbackName)
 Sets the name of the group callback. More...
 
const IlSymbolwhichSelected () const
 Returns the last selected item of the group. More...
 
- Public Member Functions inherited from IlvMenuItemGroup
 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvMenuItemGroup
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 IlvMenuItemSelector is a named property that can be set on an IlvAbstractMenu object to implement exclusive selection between the menu items of the group.

See also
IlvAbstractMenu, IlvMenuItem.

Constructor & Destructor Documentation

§ IlvMenuItemSelector()

IlvMenuItemSelector::IlvMenuItemSelector ( IlSymbol symbol)

Constructor.

Initializes a new instance of the IlvMenuItemSelector class.

Parameters
symbolThe selector name.

Member Function Documentation

§ doIt()

virtual void IlvMenuItemSelector::doIt ( IlvMenuItem item)
virtual

Is called each time an item of the group is selected.

The default implementation calls the selectItem() method.

Parameters
itemThe item that has been selected.
See also
selectItem().

§ getCallback()

IlvGraphicCallback IlvMenuItemSelector::getCallback ( ) const

Returns a pointer to the group callback.

Returns
The callback functioon associated with the group or 0 if there is none.

§ getCallbackData()

IlAny IlvMenuItemSelector::getCallbackData ( ) const

Returns a pointer to the group callback data.

Returns
The callback data associated with the group or 0 if there is none.

§ getCallbackName()

IlSymbol* IlvMenuItemSelector::getCallbackName ( ) const

Returns the symbol that represents the name of the group callback.

Returns
The symbol that represents the name of the group callback or 0 if there is none.
See also
setCallbackName(), getCallback().

§ selectItem()

void IlvMenuItemSelector::selectItem ( IlvMenuItem item)

Select the specified item, and deselect the other items of the group.

Parameters
itemThe item that has been selected.
See also
doIt().

§ setCallback()

void IlvMenuItemSelector::setCallback ( IlvGraphicCallback  callback)

Sets the group callback.

Sets the callback associated with the group to callback.

Parameters
callbackThe new group callback.
See also
getCallback(), setCallbackName().

§ setCallbackData()

void IlvMenuItemSelector::setCallbackData ( IlAny  callbackData)

Sets the group callback data.

Sets the callback data associated with the group.

Parameters
callbackDataThe callback data.
See also
getCallback(), setCallbackName().

§ setCallbackName()

void IlvMenuItemSelector::setCallbackName ( IlSymbol callbackName)

Sets the name of the group callback.

Sets the name of the group callback to callbackName. The item callback is triggered when an item of the group is activated.

Parameters
callbackNameThe name of the callback.
See also
getCallbackName(), setCallback().

§ whichSelected()

const IlSymbol* IlvMenuItemSelector::whichSelected ( ) const

Returns the last selected item of the group.

See also
selectItem().

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