rwlogo

Rogue Wave Views
Annotated Text Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator
List of all members | Public Member Functions
IlvATAccelerator Class Reference

Annotated text class. More...

#include <ilviews/annotext/accels.h>

Inheritance diagram for IlvATAccelerator:
IlvAccelerator

Public Member Functions

 IlvATAccelerator (IlvATAction atAction=0, IlvEventType type=(IlvEventType) 0, IlUShort data=0, IlUShort modifiers=0, IlAny userArg=0, IlUShort modifiersToIgnore=0)
 Constructor. More...
 
IlvATAction action () const
 Returns the accelerator action. More...
 
virtual void activate (IlvAnnoText *atext, IlvEvent &event) const
 Calls the accelerator action. More...
 
void setAction (IlvATAction atAction, IlAny userArg)
 Sets the accelerator action and the user argument. More...
 

Detailed Description

Annotated text class.

Library: ilvatext

This subclass of IlvAccelerator is specialized for using accelerators in an IlvAnnoText. It defines a function prototype for the accelerator action and provides storage for this action. Generally, applications do not need to use this class. Instead, they use the IlvAnnoText::addAccelerator() and IlvAnnoText::removeAccelerator() member functions.

See Also
IlvAnnoText.

Constructor & Destructor Documentation

IlvATAccelerator::IlvATAccelerator ( IlvATAction  atAction = 0,
IlvEventType  type = (IlvEventType)0,
IlUShort  data = 0,
IlUShort  modifiers = 0,
IlAny  userArg = 0,
IlUShort  modifiersToIgnore = 0 
)

Constructor.

Calls the constructor of the superclass with the event description and sets the accelerator action to atAction.

Parameters
atActionThe 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.
modifiersToIgnoreThe optional event modifiers.

Member Function Documentation

IlvATAction IlvATAccelerator::action ( ) const

Returns the accelerator action.

Returns
The action associated with the accelerator.
virtual void IlvATAccelerator::activate ( IlvAnnoText atext,
IlvEvent event 
) const
virtual

Calls the accelerator action.

Virtual function called when the annotated text atext has received an event fulfilling the conditions to trigger the accelerator. The default implementation is to call the action (if any) associated with the accelerator:

action()(atext, event, userArg());
See Also
IlvAccelerator::trigger().
Parameters
atextThe annotated text object.
eventThe event.
void IlvATAccelerator::setAction ( IlvATAction  atAction,
IlAny  userArg 
)

Sets the accelerator action and the user argument.

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

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