wxShapeFramework
1.13.0 beta
|
Base class for a line arrows. More...
#include <ArrowBase.h>
Public Member Functions | |
XS_DECLARE_CLONABLE_CLASS (wxSFArrowBase) | |
wxSFArrowBase (void) | |
Default constructor. | |
wxSFArrowBase (wxSFShapeBase *parent) | |
Constructor. | |
wxSFArrowBase (const wxSFArrowBase &obj) | |
Copy constructor. | |
~wxSFArrowBase (void) | |
Destructor. | |
void | SetParentShape (wxSFShapeBase *parent) |
Set a parent of the arrow shape. | |
wxSFShapeBase * | GetParentShape () |
Get pointer to a parent shape. | |
virtual void | Draw (const wxRealPoint &from, const wxRealPoint &to, wxDC &dc) |
Draw arrow shape at the end of a virtual line. | |
Protected Member Functions | |
void | TranslateArrow (wxPoint *trg, const wxRealPoint *src, int n, const wxRealPoint &from, const wxRealPoint &to) |
Rotate and move arrow's vertices in accordance of virtual line at which end the arrow will be placed. | |
Protected Attributes | |
wxSFShapeBase * | m_pParentShape |
Pointer to a parent shape. | |
Friends | |
class | wxSFLineShape |
Base class for a line arrows.
wxSFArrowBase::wxSFArrowBase | ( | void | ) |
Default constructor.
wxSFArrowBase::wxSFArrowBase | ( | wxSFShapeBase * | parent | ) |
Constructor.
parent | Pointer to a parent shape |
wxSFArrowBase::wxSFArrowBase | ( | const wxSFArrowBase & | obj | ) |
Copy constructor.
obj | Source base arrow shape |
wxSFArrowBase::~wxSFArrowBase | ( | void | ) |
Destructor.
virtual void wxSFArrowBase::Draw | ( | const wxRealPoint & | from, |
const wxRealPoint & | to, | ||
wxDC & | dc | ||
) | [virtual] |
Draw arrow shape at the end of a virtual line.
from | Start of the virtual line |
to | End of the virtual line |
dc | Device context for drawing |
Reimplemented in wxSFSolidArrow, wxSFCircleArrow, wxSFOpenArrow, and wxSFDiamondArrow.
wxSFShapeBase* wxSFArrowBase::GetParentShape | ( | ) | [inline] |
Get pointer to a parent shape.
void wxSFArrowBase::SetParentShape | ( | wxSFShapeBase * | parent | ) | [inline] |
Set a parent of the arrow shape.
parent | Pointer to the parent shape |
void wxSFArrowBase::TranslateArrow | ( | wxPoint * | trg, |
const wxRealPoint * | src, | ||
int | n, | ||
const wxRealPoint & | from, | ||
const wxRealPoint & | to | ||
) | [protected] |
Rotate and move arrow's vertices in accordance of virtual line at which end the arrow will be placed.
trg | Pointer to array where translated vertices will be stored |
src | Pointer to array of source vertices |
n | Number of vertices |
from | Start of the virtual line |
to | End of the virtual line |
friend class wxSFLineShape [friend] |
wxSFShapeBase* wxSFArrowBase::m_pParentShape [protected] |
Pointer to a parent shape.