Vision Touch Surface Library
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
SingleClickHoldEventManager Class Reference

The SingleClickHoldEventManager class inherits from IOEventManager to implement a button click and hold using Xlib. More...

#include <singleclickholdeventmanager.h>

Inheritance diagram for SingleClickHoldEventManager:
Inheritance graph
[legend]
Collaboration diagram for SingleClickHoldEventManager:
Collaboration graph
[legend]

Public Member Functions

 SingleClickHoldEventManager ()
 
 ~SingleClickHoldEventManager ()
 
void setButton (int pbutton)
 
void initData ()
 initData This function initializes the atributes needed for using the event later on More...
 
void gestureInitialize (EventData &param)
 gestureInitialize This function is called when the event needs to be started More...
 
void gestureInProgressUpdate (EventData &param)
 gestureInProgressUpdate This function is called when the event is happening More...
 
void gestureFinalize (EventData &param)
 gestureFinalize This function is called when the event needs to be finalized More...
 
- Public Member Functions inherited from IOEventManager
 IOEventManager ()
 

Protected Attributes

Display * dpy
 
int button
 
- Protected Attributes inherited from IOEventManager
bool hasBeenInit
 

Detailed Description

The SingleClickHoldEventManager class inherits from IOEventManager to implement a button click and hold using Xlib.

The class will simulate a mouse click of the button set as parameter, the default button is the left button (button 1 in Xlib). The class will start clicking when calling gestureInitialize and stop the clicking when gestureFinalize. Call gestureInProgressUpdate will update the mouse position.

Constructor & Destructor Documentation

SingleClickHoldEventManager::SingleClickHoldEventManager ( )
SingleClickHoldEventManager::~SingleClickHoldEventManager ( )

Member Function Documentation

void SingleClickHoldEventManager::gestureFinalize ( EventData param)
virtual

gestureFinalize This function is called when the event needs to be finalized

Parameters
paramdata of the frame needed for the event

This function should not be called again until IOEventManager::gestureInitialize has been called.

In the example of doing a mouse click and drag this function would unclick the button. In the example of recording a video this function should close the file descriptor.

Implements IOEventManager.

void SingleClickHoldEventManager::gestureInitialize ( EventData param)
virtual

gestureInitialize This function is called when the event needs to be started

Parameters
paramdata of the frame needed for the event

In the example of doing a mouse click and drag this would be the function when the button is clicked. In the example of recording a video the file descriptor should be created in this function.

This function should not be called again until IOEventManager::gestureFinalize has been called.

Implements IOEventManager.

void SingleClickHoldEventManager::gestureInProgressUpdate ( EventData param)
virtual

gestureInProgressUpdate This function is called when the event is happening

Parameters
paramdata of the frame needed for the event

This function could be called several times. In the example of doing a mouse click and drag this would be the function that updates the mouse position. In the exmample of recording a video each call to this function would store a frame.

Implements IOEventManager.

void SingleClickHoldEventManager::initData ( )
virtual

initData This function initializes the atributes needed for using the event later on

Implements IOEventManager.

void SingleClickHoldEventManager::setButton ( int  pbutton)

Member Data Documentation

int SingleClickHoldEventManager::button
protected
Display* SingleClickHoldEventManager::dpy
protected

The documentation for this class was generated from the following files: