Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvRepeatButtonInteractor Class Reference

Button interactor with auto-repeat behavior. More...

#include <ilviews/graphics/inter.h>

Inheritance diagram for IlvRepeatButtonInteractor:
IlvButtonInteractor IlvInteractor

Public Member Functions

 IlvRepeatButtonInteractor (IlUShort button=IlvLeftButton, IlvApplyObject action=0, IlAny arg=0)
 Constructor. More...
 
IlUInt getPeriod () const
 Returns the interactor period. More...
 
void setPeriod (IlUInt p)
 Sets the repeat period of the interactor. More...
 
- Public Member Functions inherited from IlvButtonInteractor
 IlvButtonInteractor (IlUShort button=IlvLeftButton, IlvApplyObject action=0, IlAny arg=0)
 Constructor. More...
 
virtual void doIt (IlvGraphic *obj)
 Calls the user function. More...
 
IlvApplyObject getAction () const
 Returns the user function. More...
 
virtual IlBoolean handleEvent (IlvGraphic *obj, IlvEvent &event, const IlvTransformer *t)
 Handles events received by the interactor. More...
 
void setAction (IlvApplyObject action, IlAny arg=0)
 Sets the user function and the user argument. More...
 
- Public Member Functions inherited from IlvInteractor
virtual void abort (IlvGraphic *obj)
 Aborts the interactor. More...
 
virtual IlBoolean accept (const IlvGraphic *obj) const
 Indicates whether the current interactor can be associated with a given object. More...
 
virtual void endOperation ()
 Performs the actions needed when the interaction ends. More...
 
virtual void getCallbackTypes (IlUInt &count, const char *const **names, const IlSymbol *const **types) const
 Gets the number of register callback types for the interactor. More...
 
const char * getRegisteredName () const
 Returns the name of the predefined shared instance. More...
 
IlBoolean isAborted () const
 Indicates whether the current interactor is in an aborted state. More...
 
IlBoolean isInOperation () const
 Indicates whether the current interactor is in an interaction state. More...
 
void lock ()
 Locks the current instance. Increments the counter that is used to know how many objects reference the current instance. More...
 
virtual void startOperation ()
 Performs the actions needed when the interaction starts. More...
 
void unLock ()
 Unlocks the current instance. Decrements the reference counter. When the counter drops down to zero, the current instance is deleted. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvInteractor
static IlvInteractorGet (const char *name, IlBoolean=IlTrue)
 Returns a predefined shared interactor instance. More...
 

Detailed Description

Button interactor with auto-repeat behavior.

Library: views

Use this class to make an object act like a repeating button. Such a button automatically repeats the action of the button, as if the user was pressing and releasing the mouse button repeatedly.

The registered name of this interactor is "RButton".

See also
IlvButton.

Constructor & Destructor Documentation

◆ IlvRepeatButtonInteractor()

IlvRepeatButtonInteractor::IlvRepeatButtonInteractor ( IlUShort  button = IlvLeftButton,
IlvApplyObject  action = 0,
IlAny  arg = 0 
)

Constructor.

Initializes a new instance of the IlvRepeatButtonInteractor class, setting a function to be called when the object is clicked.

Parameters
buttonThe mouse button that is used for the interaction.
actionThe user function called on a click.
argThe user argument.

Member Function Documentation

◆ getPeriod()

IlUInt IlvRepeatButtonInteractor::getPeriod ( ) const

Returns the interactor period.

Returns
The repeat period of the interactor in milliseconds.

◆ setPeriod()

void IlvRepeatButtonInteractor::setPeriod ( IlUInt  p)

Sets the repeat period of the interactor.

Parameters
pThe new period in milliseconds.