ResizerHandleStrategy Class Reference

#include <ResizerHandleStrategy.h>

Inherits DraggingResizerStrategy.

Inheritance diagram for ResizerHandleStrategy:

Inheritance graph
[legend]
Collaboration diagram for ResizerHandleStrategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ResizerHandleStrategy (void)
 ~ResizerHandleStrategy (void)
float * getColor ()
void setColor (float *c)
float * getSelectedColor ()
void setSelectedColor (float *c)
float getDisplacement ()
void setDisplacement (float d)

Protected Member Functions

void createDisplayList ()
void draw (const std::vector< unsigned long > &selectedIds)
void drawForPicking ()
void onEvent (LargeDisplayEvent *evt)
bool drop (bool parentChanged)

Protected Attributes

float color [4]
float colorSelected [4]
float displacement
float handleWidth
unsigned int dlHandle
unsigned int dlHandlePicking
unsigned int dlWidth
unsigned int dlHeight
float dlScaleX
float dlScaleY

Detailed Description

This strategy extends the DraggingResizerStrategy by providing a visual handle to allow resizing a component. The handle is located in the lower right corner of the component bounds. When it is dragged, the component is resized having the upper left corner as a fixed point.

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


Constructor & Destructor Documentation

ResizerHandleStrategy::ResizerHandleStrategy ( void   ) 

Constructs a strategy with a resizer handle.

ResizerHandleStrategy::~ResizerHandleStrategy ( void   ) 

Destroys this strategy.


Member Function Documentation

float* ResizerHandleStrategy::getColor (  )  [inline]

Returns the color used to draw the handle (using an array of 4 floats).

Returns:
the color used to draw the handle.

void ResizerHandleStrategy::setColor ( float *  c  )  [inline]

Sets the color to be used for drawing the handle (using an array of 4 floats).

Parameters:
c the color to be used for drawing the handle.

float* ResizerHandleStrategy::getSelectedColor (  )  [inline]

Returns the color used to draw the selected handle (using an array of 4 floats).

Returns:
the color used to draw the selected handle.

void ResizerHandleStrategy::setSelectedColor ( float *  c  )  [inline]

Sets the color to be used for drawing the selected handle (using an array of 4 floats).

Parameters:
c the color to be used for drawing the selected handle.

float ResizerHandleStrategy::getDisplacement (  )  [inline]

Returns the value of the handle displacement.

Returns:
the value of the handle displacement.

void ResizerHandleStrategy::setDisplacement ( float  d  )  [inline]

Sets the value of the handle displacement.

Parameters:
f the value to be used as the handle displacement.

void ResizerHandleStrategy::createDisplayList (  )  [protected]

Creates the display list to draw this handle.

void ResizerHandleStrategy::draw ( const std::vector< unsigned long > &  selectedIds  )  [protected]

Defines the drawing strategy for the associated component.

Parameters:
enablePicking if true, draw for selection mode (adding the component id).

void ResizerHandleStrategy::drawForPicking (  )  [protected]

Defines the drawing strategy for the associated component that should be used for picking.

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

Handles the given event.

Parameters:
evt the event to be handled.

Reimplemented from DraggingResizerStrategy.

bool ResizerHandleStrategy::drop ( bool  parentChanged  )  [protected]

Defines the strategy to be used when the associated component is "dropped" inside another component (likely, a container). It is called when the component is processed from the manager's update list. It usually defines some "decorative" behavior such as triggering animations, since the composition structure is already managed by the LargeDisplayManager class. Returns true if this call resulted in adding the component to a container with animation.

Parameters:
parentChanged true if the component's parent changed with the dropping.
Returns:
true if this call resulted in adding or keeping the component to a container with animation, false otherwise.


Member Data Documentation

float ResizerHandleStrategy::color[4] [protected]

The color of the resizing handle.

float ResizerHandleStrategy::colorSelected[4] [protected]

The color of the handle of the selected component.

float ResizerHandleStrategy::displacement [protected]

The displacement to be used for rendering the handle.

float ResizerHandleStrategy::handleWidth [protected]

The line width used to draw the handle.

unsigned int ResizerHandleStrategy::dlHandle [protected]

The display list identifier.

unsigned int ResizerHandleStrategy::dlHandlePicking [protected]

The picking display list identifier.

unsigned int ResizerHandleStrategy::dlWidth [protected]

The width value currently used by the display list.

unsigned int ResizerHandleStrategy::dlHeight [protected]

The height value currently used by the display list.

float ResizerHandleStrategy::dlScaleX [protected]

The scaleX value currently used by the display list.

float ResizerHandleStrategy::dlScaleY [protected]

The scaleY value currently used by the display list.


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