#include <ResizerHandleStrategy.h>
Inherits DraggingResizerStrategy.
Inheritance diagram for ResizerHandleStrategy:
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 |
ResizerHandleStrategy::ResizerHandleStrategy | ( | void | ) |
Constructs a strategy with a resizer handle.
ResizerHandleStrategy::~ResizerHandleStrategy | ( | void | ) |
Destroys this strategy.
float* ResizerHandleStrategy::getColor | ( | ) | [inline] |
Returns the color used to draw the handle (using an array of 4 floats).
void ResizerHandleStrategy::setColor | ( | float * | c | ) | [inline] |
Sets the color to be used for drawing the handle (using an array of 4 floats).
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).
void ResizerHandleStrategy::setSelectedColor | ( | float * | c | ) | [inline] |
Sets the color to be used for drawing the selected handle (using an array of 4 floats).
c | the color to be used for drawing the selected handle. |
float ResizerHandleStrategy::getDisplacement | ( | ) | [inline] |
Returns the value of the handle displacement.
void ResizerHandleStrategy::setDisplacement | ( | float | d | ) | [inline] |
Sets the value of the handle displacement.
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.
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.
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.
parentChanged | true if the component's parent changed with the dropping. |
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.