rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Annotated Text Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvATAccelerator Class Reference

Annotated text class. More...

#include <ilviews/annotext/accels.h>

Inheritance diagram for IlvATAccelerator:
IlvAccelerator

List of all members.

Public Member Functions

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

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  action = 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:
atAction 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.
modifiersToIgnore The 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:
atext The annotated text object.
event The event.
void IlvATAccelerator::setAction ( IlvATAction  f,
IlAny  a 
)

Sets the accelerator action and the user argument.

Parameters:
atAction The accelerator action.
userArg The 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.