Views
Foundation Package API Reference Guide
Product Documentation:
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)
 Initializes a new IlvContainerAccelerator. 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::IlvContainerAccelerator ( IlvContainerAction  action = 0,
IlvEventType  type = (IlvEventType)0,
IlUShort  data = 0,
IlUShort  modifiers = 0,
IlAny  userArg = 0,
IlUShort  optModifiers = 0 
)

Initializes a new IlvContainerAccelerator.

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 event modifiers.
userArgThe user argument for the accelerator action.
optModifiersThe optional event modifiers.

Member Function Documentation

◆ action()

IlvContainerAction IlvContainerAccelerator::action ( ) const

Returns the accelerator action.

Returns
The action associated with the accelerator.

◆ activate()

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.

◆ setAction()

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.
IlvContainerAccelerator::action
IlvContainerAction action() const
Returns the accelerator action.
Definition: contain.h:129
IlvAccelerator::userArg
IlAny userArg() const
Gets the user argument.
Definition: accel.h:118