#include <BorderStrategy.h>
Inherited by GradientBorderStrategy, GradientRoundBorderStrategy, and RoundBorderStrategy.
Inheritance diagram for BorderStrategy:
Public Member Functions | |
BorderStrategy (void) | |
~BorderStrategy (void) | |
float * | getColor () |
void | setColor (float *c) |
float * | getSelectedColor () |
void | setSelectedColor (float *c) |
float | getBorderWidth () |
void | setBorderWidth (float w) |
float | getSelectedBorderWidth () |
void | setSelectedBorderWidth (float w) |
bool | getDrawBorder () |
void | setDrawBorder (bool value) |
bool | getDrawSelectedBorder () |
void | setDrawSelectedBorder (bool value) |
Protected Member Functions | |
virtual void | createDisplayList () |
virtual void | draw (const std::vector< unsigned long > &selectedIds) |
Protected Attributes | |
float | color [4] |
float | colorSelected [4] |
float | borderWidth |
float | selectedBorderWidth |
bool | drawBorder |
bool | drawSelectedBorder |
unsigned int | dlBorder |
unsigned int | dlWidth |
unsigned int | dlHeight |
BorderStrategy::BorderStrategy | ( | void | ) |
Constructs a border strategy.
BorderStrategy::~BorderStrategy | ( | void | ) |
Destroys a border strategy.
float* BorderStrategy::getColor | ( | ) | [inline] |
Returns the color used to draw the border (using an array of 4 floats).
void BorderStrategy::setColor | ( | float * | c | ) | [inline] |
Sets the color to be used for drawing the border (using an array of 4 floats).
c | the color to be used for drawing the border. |
float* BorderStrategy::getSelectedColor | ( | ) | [inline] |
Returns the color used to draw the selected border (using an array of 4 floats).
void BorderStrategy::setSelectedColor | ( | float * | c | ) | [inline] |
Sets the color to be used for drawing the selected border (using an array of 4 floats).
c | the color to be used for drawing the selected border. |
float BorderStrategy::getBorderWidth | ( | ) | [inline] |
Returns the value of the border line width.
void BorderStrategy::setBorderWidth | ( | float | w | ) | [inline] |
Sets the value of the border line width.
f | the value to be used as the border line width. |
float BorderStrategy::getSelectedBorderWidth | ( | ) | [inline] |
Returns the value of the selected border line width.
void BorderStrategy::setSelectedBorderWidth | ( | float | w | ) | [inline] |
Sets the value of the selected border line width.
f | the value to be used as the selected border line width. |
bool BorderStrategy::getDrawBorder | ( | ) | [inline] |
Returns true if the border should be drawn.
void BorderStrategy::setDrawBorder | ( | bool | value | ) | [inline] |
Sets if the border should be drawn.
value | true if the border should be drawn, false otherwise. |
bool BorderStrategy::getDrawSelectedBorder | ( | ) | [inline] |
Returns true if the selected border should be drawn.
void BorderStrategy::setDrawSelectedBorder | ( | bool | value | ) | [inline] |
Sets if the selected border should be drawn.
value | true if the selected border should be drawn, false otherwise. |
void BorderStrategy::createDisplayList | ( | ) | [protected, virtual] |
Creates the display list to draw this border.
Reimplemented in GradientBorderStrategy, GradientRoundBorderStrategy, and RoundBorderStrategy.
void BorderStrategy::draw | ( | const std::vector< unsigned long > & | selectedIds | ) | [protected, virtual] |
Defines the drawing strategy for the associated component.
enablePicking | if true, draw for selection mode (adding the component id). |
Reimplemented in GradientBorderStrategy, GradientRoundBorderStrategy, and RoundBorderStrategy.
float BorderStrategy::color[4] [protected] |
The color of the border.
float BorderStrategy::colorSelected[4] [protected] |
The color of the border of the selected component.
float BorderStrategy::borderWidth [protected] |
The line width of the border.
float BorderStrategy::selectedBorderWidth [protected] |
The line width of the boder of a selected component.
bool BorderStrategy::drawBorder [protected] |
If true the border is drawn.
bool BorderStrategy::drawSelectedBorder [protected] |
If true the selected border is drawn.
unsigned int BorderStrategy::dlBorder [protected] |
The display list identifier.
unsigned int BorderStrategy::dlWidth [protected] |
The width value currently used by the display list.
unsigned int BorderStrategy::dlHeight [protected] |
The height value currently used by the display list.