rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvContainerAccelerator Class Reference

Container accelerator class. More...

#include <ilviews/contain/contain.h>

Inheritance diagram for IlvContainerAccelerator:
IlvAccelerator

Public Member Functions

 IlvContainerAccelerator (IlvContainerAction action=0, IlvEventType type=(IlvEventType) 0, IlUShort data=0, IlUShort modifiers=0, IlAny userArg=0, IlUShort optModifiers=0)
 Constructor. More...
 
IlvContainerAction action () const
 Returns the accelerator action. More...
 
virtual void activate (IlvContainer *cont, IlvEvent &event) const
 Calls the accelerator action. More...
 
void setAction (IlvContainerAction action, IlAny userArg)
 Sets the accelerator action. More...
 
- Public Member Functions inherited from IlvAccelerator
IlUShort data () const
 Gets the event data. More...
 
IlBoolean match (IlvEventType type, IlUShort data, IlUShort modifiers) const
 Tests if two accelerator descriptions are equivalent. More...
 
IlUShort modifiers () const
 Gets the modifiers. More...
 
IlUShort modMask () const
 Gets the modifiers to ignore. More...
 
void setModMask (IlUShort modifiersToIgnore)
 Sets the modifiers to ignore. More...
 
IlBoolean trigger (IlvEventType type, IlUShort data, IlUShort modifiers) const
 Tests if an event triggers an accelerator. More...
 
IlvEventType type () const
 Gets the event type. More...
 
IlAny userArg () const
 Gets the user argument. More...
 

Detailed Description

Container accelerator class.

Library: views

This subclass of IlvAccelerator is defined for use accelerators in an IlvContainer. It defines a function type for the accelerator action and provides storage for this action. Generally, applications do not need to use this class. Instead, they use the versions of IlvContainer::addAccelerator, IlvContainer::getAccelerator and IlvContainer::removeAccelerator where they provide the accelerator description (event, modifier, action).

See Also
IlvContainer.

Constructor & Destructor Documentation

IlvContainerAccelerator::IlvContainerAccelerator ( IlvContainerAction  action = 0,
IlvEventType  type = (IlvEventType)0,
IlUShort  data = 0,
IlUShort  modifiers = 0,
IlAny  userArg = 0,
IlUShort  optModifiers = 0 
)

Constructor.

Calls the constructor of the superclass with the event description and sets the accelerator action with its user argument.

Parameters
actionThe accelerator action.
typeSpecifies the type of event that triggers the action.
dataSpecifies the event data.
modifiersThe mandatory event modifiers.
userArgThe user argument for the accelerator action.
optModifiersThe optional event modifiers.

Member Function Documentation

IlvContainerAction IlvContainerAccelerator::action ( ) const

Returns the accelerator action.

Returns
The action associated with the accelerator.
virtual void IlvContainerAccelerator::activate ( IlvContainer cont,
IlvEvent event 
) const
virtual

Calls the accelerator action.

Virtual member function called when the container has received an event fulfilling the conditions required to trigger the accelerator. (See method IlvAccelerator::trigger.) The default implementation is to call the action (if any) associated with the accelerator:

action()(cont, event, userArg());
Parameters
contThe container.
eventThe event.
void IlvContainerAccelerator::setAction ( IlvContainerAction  action,
IlAny  userArg 
)

Sets the accelerator action.

Sets both the accelerator action and the user argument.

Parameters
actionThe accelerator action.
userArgThe user argument for the accelerator action.

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