rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

Event player class. More...

#include <ilviews/util/evplayer.h>

Public Member Functions

 IlvEventPlayer ()
 Constructor. More...
 
virtual IlBoolean load (IlvDisplay *, const char *filename)
 Loads an event sequence. More...
 
virtual void play (IlvDisplay *display, IlUInt period=1000, IlBoolean movePointer=IlFalse)
 Plays the events. More...
 
void playOnce (IlvDisplay *display)
 Plays one event at a time. More...
 
virtual void playOneEvent (IlvAbstractView *view, IlvEvent &event)
 Plays a given event. More...
 
virtual void recordOneEvent (IlvView *view, IlvEvent &event)
 Records a given event. More...
 
virtual IlBoolean save (const char *filename) const
 Saves an event sequence. More...
 
virtual void start ()
 Resets the event player. More...
 
void stop ()
 Stops the recording of events. More...
 

Detailed Description

Event player class.

Library: xviews or winviews or mviews (mutually exclusive)

This class is designed to handle the recording of sequences of events that occur in the views that it controls. These event sequences can be saved or read from a data file, and played back at any speed.

See Also
IlvCurrentEventPlayer, IlvRecordingEvents.

Constructor & Destructor Documentation

IlvEventPlayer::IlvEventPlayer ( )

Constructor.

The constructor initializes a new empty event player ready to record user events or load an event data file.

Member Function Documentation

virtual IlBoolean IlvEventPlayer::load ( IlvDisplay ,
const char *  filename 
)
virtual

Loads an event sequence.

Loads an event sequence from the specified file. The previous list is emptied.

Returns
IlTrue on success and IlFalse if an error occured.
virtual void IlvEventPlayer::play ( IlvDisplay display,
IlUInt  period = 1000,
IlBoolean  movePointer = IlFalse 
)
virtual

Plays the events.

Triggers, at a specified speed, each event stored in this event player. The greater period is, the slower the events will be played back. (In fact, it defines a period of time.) The default value 1000 indicates that the events are played back at the same speed, and with the same intervals between events, as they occurred when they were recorded.

Parameters
displayA pointer to the IlvDisplay.
periodPeriod of time at which events are played back. The default value 1000 represent the normal speed, i.e. the speed at which the events were recorded. Passing 0 means "play as fast as possible".
movePointerIf IlTrue, the event player will move the mouse pointer to the event location when playing a pointer event.
void IlvEventPlayer::playOnce ( IlvDisplay display)

Plays one event at a time.

Triggers only one event at a time. An internal event pointer is updated to point to the next event of the event sequence.

Parameters
displayA pointer to the IlvDisplay.
virtual void IlvEventPlayer::playOneEvent ( IlvAbstractView view,
IlvEvent event 
)
virtual

Plays a given event.

Sends the event event to the view view. The event player calls this method for each event recorded in its event list.

Parameters
viewThe view where the event must be played.
eventThe event to be played.
virtual void IlvEventPlayer::recordOneEvent ( IlvView view,
IlvEvent event 
)
virtual

Records a given event.

Records the event event for the view view, in the IlvEventPlayer.

Parameters
viewThe view where the event must be recorded.
eventThe event to be recorded.
virtual IlBoolean IlvEventPlayer::save ( const char *  filename) const
virtual

Saves an event sequence.

Saves the event sequence in the specified file.

Parameters
filenameThe name of the file where to save the event sequence.
Returns
IlTrue on success and IlFalse if an error occured.
virtual void IlvEventPlayer::start ( )
virtual

Resets the event player.

Resets this event player to the initial state. The event sequence is emptied.

void IlvEventPlayer::stop ( )

Stops the recording of events.

Stops the recording of events for this event player, if it was the current event recorder.


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