#include <VisComponentStrategy.h>
Collaboration diagram for VisComponentStrategy:
Public Member Functions | |
VisComponentStrategy (void) | |
virtual | ~VisComponentStrategy (void) |
void | initPropertiesComponent () |
void | processComponent () |
void | drawComponent (const std::vector< unsigned long > &selectedIds) |
void | drawForPickingComponent () |
void | onEventComponent (LargeDisplayEvent *evt) |
void | resizeComponent (unsigned int width, unsigned int height) |
bool | dropComponent (bool parentChanged) |
void | readPassiveBuffersComponent (const std::vector< unsigned int > &types) |
void | readAllPassiveBuffersComponent () |
void | readAllPickingPassiveBuffersComponent () |
void | setComponent (VisComponent *comp) |
VisComponent * | getComponent () |
void | setNextStrategy (VisComponentStrategy *next) |
VisComponentStrategy * | getNextStrategy () |
Protected Member Functions | |
virtual void | initProperties () |
virtual void | process () |
virtual void | draw (const std::vector< unsigned long > &selectedIds) |
virtual void | drawForPicking () |
virtual void | onEvent (LargeDisplayEvent *evt) |
virtual void | resize (unsigned int width, unsigned int height) |
virtual bool | drop (bool parentChanged) |
virtual void | readPassiveBuffers (const std::vector< unsigned int > &types) |
virtual void | readAllPassiveBuffers () |
virtual void | readAllPickingPassiveBuffers () |
Protected Attributes | |
VisComponent * | component |
VisComponentStrategy * | nextStrategy |
VisComponentStrategy::VisComponentStrategy | ( | void | ) |
Constructs this startegy.
VisComponentStrategy::~VisComponentStrategy | ( | void | ) | [virtual] |
Destroys this strategy.
void VisComponentStrategy::initPropertiesComponent | ( | ) | [inline] |
Initializes the properties (i. e., i-buffers) of the associated component.
void VisComponentStrategy::processComponent | ( | ) | [inline] |
Performs an action before drawing the component.
void VisComponentStrategy::drawComponent | ( | const std::vector< unsigned long > & | selectedIds | ) | [inline] |
Defines the drawing strategy for the associated component.
selectedIds | the list of currently selected ids. |
void VisComponentStrategy::drawForPickingComponent | ( | ) | [inline] |
Defines the drawing strategy for the associated component to be used for picking.
void VisComponentStrategy::onEventComponent | ( | LargeDisplayEvent * | evt | ) | [inline] |
Handles the given event.
evt | the event to be handled. |
void VisComponentStrategy::resizeComponent | ( | unsigned int | width, | |
unsigned int | height | |||
) | [inline] |
Defines the strategy to be used when the associated component is resized.
width | the new width of the component. | |
height | the new height of the component. |
bool VisComponentStrategy::dropComponent | ( | bool | parentChanged | ) | [inline] |
Defines the strategy to be used when the associated component is dropped inside another component/container. 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. |
void VisComponentStrategy::readPassiveBuffersComponent | ( | const std::vector< unsigned int > & | types | ) | [inline] |
Reads the passive buffer(s) specified by the parameter 'type' and makes the proper updates in the state of the associated component. The value of type must be unique for each type of buffer throughout the application. Inconsistences can lead to unexpected behaviors during buffer reading.
types | the types of buffers that should be read from the container. |
void VisComponentStrategy::readAllPassiveBuffersComponent | ( | ) | [inline] |
Reads all the passive buffers for a component specified by its associated strategies. This method is called before drawing the component in order to update its state/properties.
void VisComponentStrategy::readAllPickingPassiveBuffersComponent | ( | ) | [inline] |
Reads only the passive buffers for the component strategies that are necessary for picking processing. This method is called before drawing the component for picking in order to update its state/properties.
void VisComponentStrategy::setComponent | ( | VisComponent * | comp | ) | [inline] |
Sets the component associated with this strategy.
comp | the VisComponent object associated with this strategy. |
VisComponent* VisComponentStrategy::getComponent | ( | ) | [inline] |
Returns a pointer to the component associated with this strategy.
void VisComponentStrategy::setNextStrategy | ( | VisComponentStrategy * | next | ) | [inline] |
Sets the next strategy to this one (Decorator Design Pattern).
next | the VisComponentStrategy object that is next to this strategy. |
VisComponentStrategy* VisComponentStrategy::getNextStrategy | ( | ) | [inline] |
Returns a pointer to the strategy that is necxt to this one (Decorator Design Pattern).
virtual void VisComponentStrategy::initProperties | ( | ) | [inline, protected, virtual] |
Initializes the properties (i. e., i-buffers) of the associated component.
virtual void VisComponentStrategy::process | ( | ) | [inline, protected, virtual] |
Performs a given action before rendering the component.
virtual void VisComponentStrategy::draw | ( | const std::vector< unsigned long > & | selectedIds | ) | [inline, protected, virtual] |
Defines the drawing strategy for the associated component.
selectedIds | the list of currently selected ids. |
virtual void VisComponentStrategy::drawForPicking | ( | ) | [inline, protected, virtual] |
Defines the drawing strategy for the associated component that should be used for picking.
virtual void VisComponentStrategy::onEvent | ( | LargeDisplayEvent * | evt | ) | [inline, protected, virtual] |
Handles the given event.
evt | the event to be handled. |
virtual void VisComponentStrategy::resize | ( | unsigned int | width, | |
unsigned int | height | |||
) | [inline, protected, virtual] |
Defines the strategy to be used when the associated component is resized.
width | the new width of the component. | |
height | the new height of the component. |
virtual bool VisComponentStrategy::drop | ( | bool | parentChanged | ) | [inline, protected, virtual] |
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. |
virtual void VisComponentStrategy::readPassiveBuffers | ( | const std::vector< unsigned int > & | types | ) | [inline, protected, virtual] |
Reads the passive buffer(s) specified by the parameter 'type' and makes the proper updates in the state of the associated component. The value of type must be unique for each type of buffer throughout the application. Inconsistences can lead to unexpected behaviors during buffer reading.
types | the types of buffers that should be read from the container. |
virtual void VisComponentStrategy::readAllPassiveBuffers | ( | ) | [inline, protected, virtual] |
Reads all the passive buffers for a component strategy. This method is called before drawing the component in order to update its state/properties.
virtual void VisComponentStrategy::readAllPickingPassiveBuffers | ( | ) | [inline, protected, virtual] |
Reads only the passive buffers for a component strategy that are necessary for picking processing. This method is called before drawing the component for picking in order to update its state/properties.
VisComponent* VisComponentStrategy::component [protected] |
The VisComponent object using this strategy.
VisComponentStrategy* VisComponentStrategy::nextStrategy [protected] |
The VisComponentStrategy object that is next to this one in the processing order or that is "decorated" by this one, if any.