wxShapeFramework  1.13.0 beta
wxSFRoundRectShape Class Reference

Class ecapsulating rounded rectangle. It extends the basic rectangular shape. More...

#include <RoundRectShape.h>

Inheritance diagram for wxSFRoundRectShape:
Collaboration diagram for wxSFRoundRectShape:

List of all members.

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 &center)
 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.

Detailed Description

Class ecapsulating rounded rectangle. It extends the basic rectangular shape.


Constructor & Destructor Documentation

Default constructor.

wxSFRoundRectShape::wxSFRoundRectShape ( const wxRealPoint &  pos,
const wxRealPoint &  size,
double  radius,
wxSFDiagramManager manager 
)

User constructor.

Parameters:
posInitial position
sizeInitial size
radiusCorner radius
managerPointer of parent diagram manager

Copy constructor.

Parameters:
objRefernce to the source object.
virtual wxSFRoundRectShape::~wxSFRoundRectShape ( void  ) [virtual]

Destructor.


Member Function Documentation

virtual bool wxSFRoundRectShape::Contains ( const wxPoint &  pos) [virtual]

Test whether the given point is inside the shape. The function can be overrided if neccessary.

Parameters:
posExamined point
Returns:
TRUE if the point is inside the shape area, otherwise FALSE

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.

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

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

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

Parameters:
dcReference to device context where the shadow will be drawn to

Reimplemented from wxSFRectShape.

double wxSFRoundRectShape::GetRadius ( ) [inline]

Get current corner radius.

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

Parameters:
posExamined point
centerCircle center

Initialize serializable properties.

Reimplemented from wxSFRectShape.

void wxSFRoundRectShape::SetRadius ( double  radius) [inline]

Set corner radius.

Parameters:
radiusNew corner radius

Member Data Documentation

double wxSFRoundRectShape::m_nRadius [protected]

Corner radius.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines