wxShapeFramework
1.13.0 beta
|
Class ecapsulating rounded rectangle. It extends the basic rectangular shape. More...
#include <RoundRectShape.h>
Public Member Functions | |
XS_DECLARE_CLONABLE_CLASS (wxSFRoundRectShape) | |
wxSFRoundRectShape (void) | |
Default constructor. | |
wxSFRoundRectShape (const wxRealPoint &pos, const wxRealPoint &size, double radius, wxSFDiagramManager *manager) | |
User constructor. | |
wxSFRoundRectShape (const wxSFRoundRectShape &obj) | |
Copy constructor. | |
virtual | ~wxSFRoundRectShape (void) |
Destructor. | |
virtual bool | Contains (const wxPoint &pos) |
Test whether the given point is inside the shape. The function can be overrided if neccessary. | |
void | SetRadius (double radius) |
Set corner radius. | |
double | GetRadius () |
Get current corner radius. | |
Protected Member Functions | |
virtual void | DrawNormal (wxDC &dc) |
Draw the shape in the normal way. The function can be overrided if neccessary. | |
virtual void | DrawHover (wxDC &dc) |
Draw the shape in the hower mode (the mouse cursor is above the shape). The function can be overrided if neccessary. | |
virtual void | DrawHighlighted (wxDC &dc) |
Draw the shape in the highlighted mode (another shape is dragged over this shape and this shape will accept the dragged one if it will be dropped on it). The function can be overrided if neccessary. | |
virtual void | DrawShadow (wxDC &dc) |
Draw shadow under the shape. The function can be overrided if neccessary. | |
bool | IsInCircle (const wxPoint &pos, const wxPoint ¢er) |
Auxiliary function. Checks whether the point is inside a circle with given center. The circle's radius is the roundrect corner radius. | |
Protected Attributes | |
double | m_nRadius |
Corner radius. | |
Private Member Functions | |
void | MarkSerializableDataMembers () |
Initialize serializable properties. |
Class ecapsulating rounded rectangle. It extends the basic rectangular shape.
Default constructor.
wxSFRoundRectShape::wxSFRoundRectShape | ( | const wxRealPoint & | pos, |
const wxRealPoint & | size, | ||
double | radius, | ||
wxSFDiagramManager * | manager | ||
) |
User constructor.
pos | Initial position |
size | Initial size |
radius | Corner radius |
manager | Pointer of parent diagram manager |
wxSFRoundRectShape::wxSFRoundRectShape | ( | const wxSFRoundRectShape & | obj | ) |
Copy constructor.
obj | Refernce to the source object. |
virtual wxSFRoundRectShape::~wxSFRoundRectShape | ( | void | ) | [virtual] |
Destructor.
virtual bool wxSFRoundRectShape::Contains | ( | const wxPoint & | pos | ) | [virtual] |
Test whether the given point is inside the shape. The function can be overrided if neccessary.
pos | Examined point |
Reimplemented from wxSFShapeBase.
virtual void wxSFRoundRectShape::DrawHighlighted | ( | wxDC & | dc | ) | [protected, virtual] |
Draw the shape in the highlighted mode (another shape is dragged over this shape and this shape will accept the dragged one if it will be dropped on it). The function can be overrided if neccessary.
dc | Reference to device context where the shape will be drawn to |
Reimplemented from wxSFRectShape.
virtual void wxSFRoundRectShape::DrawHover | ( | wxDC & | dc | ) | [protected, virtual] |
Draw the shape in the hower mode (the mouse cursor is above the shape). The function can be overrided if neccessary.
dc | Reference to device context where the shape will be drawn to |
Reimplemented from wxSFRectShape.
virtual void wxSFRoundRectShape::DrawNormal | ( | wxDC & | dc | ) | [protected, virtual] |
Draw the shape in the normal way. The function can be overrided if neccessary.
dc | Reference to device context where the shape will be drawn to |
Reimplemented from wxSFRectShape.
virtual void wxSFRoundRectShape::DrawShadow | ( | wxDC & | dc | ) | [protected, virtual] |
Draw shadow under the shape. The function can be overrided if neccessary.
dc | Reference to device context where the shadow will be drawn to |
Reimplemented from wxSFRectShape.
double wxSFRoundRectShape::GetRadius | ( | ) | [inline] |
Get current corner radius.
bool wxSFRoundRectShape::IsInCircle | ( | const wxPoint & | pos, |
const wxPoint & | center | ||
) | [protected] |
Auxiliary function. Checks whether the point is inside a circle with given center. The circle's radius is the roundrect corner radius.
pos | Examined point |
center | Circle center |
void wxSFRoundRectShape::MarkSerializableDataMembers | ( | ) | [private] |
Initialize serializable properties.
Reimplemented from wxSFRectShape.
void wxSFRoundRectShape::SetRadius | ( | double | radius | ) | [inline] |
Set corner radius.
radius | New corner radius |
double wxSFRoundRectShape::m_nRadius [protected] |
Corner radius.