BorderStrategy Class Reference

#include <BorderStrategy.h>

Inherited by GradientBorderStrategy, GradientRoundBorderStrategy, and RoundBorderStrategy.

Inheritance diagram for BorderStrategy:

Inheritance graph
[legend]
List of all members.

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

Detailed Description

This strategy defines a rectangular border around a component using its values for width and height. The color and line width of the border can be specified by the user, as well as if any of them should or shouldn't be drawn.

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


Constructor & Destructor Documentation

BorderStrategy::BorderStrategy ( void   ) 

Constructs a border strategy.

BorderStrategy::~BorderStrategy ( void   ) 

Destroys a border strategy.


Member Function Documentation

float* BorderStrategy::getColor (  )  [inline]

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

Returns:
the color used to draw the border.

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

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

Parameters:
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).

Returns:
the color used to draw the selected border.

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

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

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

float BorderStrategy::getBorderWidth (  )  [inline]

Returns the value of the border line width.

Returns:
the value of the border line width.

void BorderStrategy::setBorderWidth ( float  w  )  [inline]

Sets the value of the border line width.

Parameters:
f the value to be used as the border line width.

float BorderStrategy::getSelectedBorderWidth (  )  [inline]

Returns the value of the selected border line width.

Returns:
the value of the selected border line width.

void BorderStrategy::setSelectedBorderWidth ( float  w  )  [inline]

Sets the value of the selected border line width.

Parameters:
f the value to be used as the selected border line width.

bool BorderStrategy::getDrawBorder (  )  [inline]

Returns true if the border should be drawn.

Returns:
true if the border should be drawn, false otherwise.

void BorderStrategy::setDrawBorder ( bool  value  )  [inline]

Sets if the border should be drawn.

Parameters:
value true if the border should be drawn, false otherwise.

bool BorderStrategy::getDrawSelectedBorder (  )  [inline]

Returns true if the selected border should be drawn.

Returns:
true if the selected border should be drawn, false otherwise.

void BorderStrategy::setDrawSelectedBorder ( bool  value  )  [inline]

Sets if the selected border should be drawn.

Parameters:
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.

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

Reimplemented in GradientBorderStrategy, GradientRoundBorderStrategy, and RoundBorderStrategy.


Member Data Documentation

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.


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