Class encapsulating fixed connection point assignable to shapes. The assigned fixed connection points are the only places where connected lines can start/end.
More...
#include <ShapeDockpoint.h>
List of all members.
Public Types |
enum | CPTYPE {
cpUNDEF,
cpTOPLEFT,
cpTOPMIDDLE,
cpTOPRIGHT,
cpCENTERLEFT,
cpCENTERMIDDLE,
cpCENTERRIGHT,
cpBOTTOMLEFT,
cpBOTTOMMIDDLE,
cpBOTTOMRIGHT,
cpCUSTOM
} |
| Connection point type. More...
|
Public Member Functions |
| XS_DECLARE_CLONABLE_CLASS (wxSFConnectionPoint) |
| wxSFConnectionPoint () |
| Basic constructor.
|
| wxSFConnectionPoint (wxSFShapeBase *parent, CPTYPE type) |
| Enhanced constructor.
|
| wxSFConnectionPoint (wxSFShapeBase *parent, const wxRealPoint &relpos, long id=-1) |
| Enhanced constructor.
|
| wxSFConnectionPoint (const wxSFConnectionPoint &obj) |
| Copy constructor.
|
virtual | ~wxSFConnectionPoint () |
| Destructor.
|
CPTYPE | GetType () const |
| Get connection point type.
|
void | SetParentShape (wxSFShapeBase *parent) |
| Set parent shape.
|
wxSFShapeBase * | GetParentShape () const |
| Get parent shape.
|
void | SetRelativePosition (const wxRealPoint &relpos) |
| Set relative position of custom connection point.
|
const wxRealPoint & | GetRelativePosition () const |
| Get relative position of custom connection point.
|
wxRealPoint | GetConnectionPoint () const |
| Get absolute position of the connection point.
|
virtual bool | Contains (const wxPoint &pos) const |
| Find out whether given point is inside the connection point.
|
void | Draw (wxDC &dc) |
| Draw connection point.
|
void | Refresh () |
| Refresh (repaint) the dock point.
|
Protected Member Functions |
virtual void | DrawNormal (wxDC &dc) |
| Draw the connection point in the normal way. The function can be overrided if neccessary.
|
virtual void | DrawHover (wxDC &dc) |
| Draw the connection point in the hower mode (the mouse cursor is above the shape). The function can be overrided if neccessary.
|
Private Member Functions |
void | _OnMouseMove (const wxPoint &pos) |
| Event handler called when the mouse pointer is moving above shape canvas.
|
void | MarkSerializableDataMembers () |
Private Attributes |
CPTYPE | m_nType |
wxSFShapeBase * | m_pParentShape |
bool | m_fMouseOver |
wxRealPoint | m_nRelPosition |
Friends |
class | wxSFShapeBase |
Detailed Description
Class encapsulating fixed connection point assignable to shapes. The assigned fixed connection points are the only places where connected lines can start/end.
- See also:
- wxSFShapeBase::AddConnectionPoint()
Member Enumeration Documentation
Connection point type.
- Enumerator:
cpUNDEF |
|
cpTOPLEFT |
|
cpTOPMIDDLE |
|
cpTOPRIGHT |
|
cpCENTERLEFT |
|
cpCENTERMIDDLE |
|
cpCENTERRIGHT |
|
cpBOTTOMLEFT |
|
cpBOTTOMMIDDLE |
|
cpBOTTOMRIGHT |
|
cpCUSTOM |
|
Constructor & Destructor Documentation
Enhanced constructor.
- Parameters:
-
parent | Pointer to parent shape |
type | Connection point type |
Enhanced constructor.
- Parameters:
-
parent | Pointer to parent shape |
relpos | Relative position in percentages |
id | Connection point ID |
Copy constructor.
- Parameters:
-
obj | Reference to source object |
Member Function Documentation
Event handler called when the mouse pointer is moving above shape canvas.
- Parameters:
-
pos | Current mouse position |
Find out whether given point is inside the connection point.
- Parameters:
-
- Returns:
- TRUE if the point is inside the handle, otherwise FALSE
Draw connection point.
- Parameters:
-
dc | Device context where the handle will be drawn |
Draw the connection point in the hower mode (the mouse cursor is above the shape). The function can be overrided if neccessary.
- Parameters:
-
dc | Reference to device context where the shape will be drawn to |
Draw the connection point in the normal way. The function can be overrided if neccessary.
- Parameters:
-
dc | Reference to device context where the shape will be drawn to |
Get absolute position of the connection point.
- Returns:
- Absolute position of the connection point
Get parent shape.
- Returns:
- Pointer to parent shape
Get relative position of custom connection point.
- Returns:
- Relative position in percentages
Get connection point type.
- Returns:
- Connection point type
Refresh (repaint) the dock point.
Set parent shape.
- Parameters:
-
parent | Pointer to parent shape |
Set relative position of custom connection point.
- Parameters:
-
relpos | Relative position in percetnages |
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following file: