rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvContainerAccelerator Class Reference

Container accelerator class. More...

#include <ilviews/contain/contain.h>

Inheritance diagram for IlvContainerAccelerator:
IlvAccelerator

List of all members.

Public Member Functions

 IlvContainerAccelerator (IlvContainerAction action=0, IlvEventType type=(IlvEventType) 0, IlUShort data=0, IlUShort modifiers=0, IlAny userArg=0, IlUShort optModifiers=0)
 Constructor.
IlvContainerAction action () const
 Returns the accelerator action.
virtual void activate (IlvContainer *cont, IlvEvent &event) const
 Calls the accelerator action.
void setAction (IlvContainerAction action, IlAny userArg)
 Sets the accelerator action.

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:
action The accelerator action.
type Specifies the type of event that triggers the action.
data Specifies the event data.
modifiers The mandatory event modifiers.
userArg The user argument for the accelerator action.
optModifiers The 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:
cont The container.
event The event.
void IlvContainerAccelerator::setAction ( IlvContainerAction  action,
IlAny  userArg 
)

Sets the accelerator action.

Sets both the accelerator action and the user argument.

Parameters:
action The accelerator action.
userArg The user argument for the accelerator action.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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