TranslationStrategy Class Reference

#include <TranslationStrategy.h>

List of all members.

Public Member Functions

 TranslationStrategy (void)
 ~TranslationStrategy (void)

Protected Member Functions

void onEvent (LargeDisplayEvent *evt)
unsigned char getButtonValue (unsigned int x, unsigned int y)

Protected Attributes

bool pressed
int previousX
int previousY
unsigned int buttonBufferType
unsigned char noButtonValue
unsigned char movableAreaButtonValue
unsigned char translationAreaButtonValue
unsigned int pressType
unsigned int dragType
unsigned int releaseType


Detailed Description

This strategy defines simple translation of a component and its branch when it is pressed and dragged.

Author:
Fabricio Anastacio - fabriciocfa@yahoo.com
Since:
August 2, 2007


Constructor & Destructor Documentation

TranslationStrategy::TranslationStrategy ( void   ) 

Constructs a translation strategy.

TranslationStrategy::~TranslationStrategy ( void   ) 

Destroys a translation strategy.


Member Function Documentation

void TranslationStrategy::onEvent ( LargeDisplayEvent *  evt  )  [protected]

Handles the given event.

Parameters:
evt the event to be handled.

unsigned char TranslationStrategy::getButtonValue ( unsigned int  x,
unsigned int  y 
) [protected]

Returns the value of the current active button buffer of the associated component at the given global coordinates. If there is no button buffer currently active for the associated component or the coordinates are not inside the buffer, a constant value for NO_BUTTON is returned.

Parameters:
x the x global coordinate to be checked.
y the y global coordinate to be checked.
Returns:
the value retrieved from the button buffer or a constant value for NO_BUTTON in case of failure.


Member Data Documentation

bool TranslationStrategy::pressed [protected]

Determines when the component is being pressed.

int TranslationStrategy::previousX [protected]

The previous x-coordinate of the cursor position.

int TranslationStrategy::previousY [protected]

The previous y-coordinate of the cursor position.

unsigned int TranslationStrategy::buttonBufferType [protected]

Button buffer type identifier.

unsigned char TranslationStrategy::noButtonValue [protected]

No button value.

unsigned char TranslationStrategy::movableAreaButtonValue [protected]

Movable area button value.

unsigned char TranslationStrategy::translationAreaButtonValue [protected]

Translation area button value.

unsigned int TranslationStrategy::pressType [protected]

Press event type.

unsigned int TranslationStrategy::dragType [protected]

Drag event type.

unsigned int TranslationStrategy::releaseType [protected]

Release event type.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 17:46:10 2007 for LargeDisplayFrameworkToolkit by  doxygen 1.5.2