Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Handling events behavior (usually mouse or keyboard events). More...
#include <ilviews/protos/eventacc.h>
Public Member Functions | |
IlvEventAccessor (const char *name, const IlvValueTypeClass *type, const char *nodeName, IlvEventType eventType, IlUShort detail, IlUShort modifiers, IlvEventAccessorData whichData) | |
Creates an event accessor. | |
virtual IlBoolean | handleEvent (IlvAccessorHolder *object, IlvGraphic *g, IlvEvent &, IlvView *, IlvTransformer *t) |
Filters the events and performs the value change of the attribute (if appropriate). |
Handling events behavior (usually mouse or keyboard events).
Library: ilvproto
IlvEventAccessor
is a subtype of the IlvAbstractEventAccessor
class that handles events of a specified type. When an event is received, the attribute value is set to one of the data members of the event.
IlvEventAccessor::IlvEventAccessor | ( | const char * | name, | |
const IlvValueTypeClass * | type, | |||
const char * | nodeName, | |||
IlvEventType | eventType, | |||
IlUShort | detail, | |||
IlUShort | modifiers, | |||
IlvEventAccessorData | whichData | |||
) |
Creates an event accessor.
name | Name of the attribute that handles events. | |
type | Type of the attribute that handles events. | |
nodeName | Name of the node for which events are handled. If nodeName is "[All_nodes]" , the accessor handles user events received by any node of the group to which it is attached. If nodeName is the name of a subgroup, the accessor handles events received by any node of the subgroup. | |
eventType | Type of the events that must be handled (for example, IlvButtonDown ). | |
detail | Code of the events. For example IlvLeftButton , the ASCII code of the character `a', or the key code IlvReturn . | |
modifiers | A mask specifying a combination of modifier keys that must be pressed, for example IlvCtrlModifier |IlvShiftModifier . Only the events with the specified modifiers will be handled. Use IlvAnyModifier to ignore the modifiers of the event. | |
whichData | Specifies which data member of the event the accessor value will be set to. |
virtual IlBoolean IlvEventAccessor::handleEvent | ( | IlvAccessorHolder * | object, | |
IlvGraphic * | g, | |||
IlvEvent & | , | |||
IlvView * | , | |||
IlvTransformer * | t | |||
) | [virtual] |
Filters the events and performs the value change of the attribute (if appropriate).
Filters the events according to the eventType, detail, and modifiers parameters of the constructor. Then, it calls IlvAccessible::changeValue
to set the accessor value to the event data member specified by the whichData parameter.
Reimplemented from IlvAbstractEventAccessor.
© 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.