wxShapeFramework
1.13.0 beta
|
Base class for all shapes providing fundamental functionality and publishing set of virtual functions which must be defined by the user in derived shapes. This class shouldn't be used as it is. More...
#include <ShapeBase.h>
Public Types | |
enum | BBMODE { bbSELF = 1, bbCHILDREN = 2, bbCONNECTIONS = 4, bbSHADOW = 8, bbALL = 15 } |
Bit flags for wxSFShapeBase::GetCompleteBoundingBox function. More... | |
enum | CONNECTMODE { lineSTARTING, lineENDING, lineBOTH } |
Search mode flags for GetAssignedConnections function. More... | |
enum | VALIGN { valignNONE, valignTOP, valignMIDDLE, valignBOTTOM, valignEXPAND, valignLINE_START, valignLINE_END } |
Flags for SetVAlign function. More... | |
enum | HALIGN { halignNONE, halignLEFT, halignCENTER, halignRIGHT, halignEXPAND, halignLINE_START, halignLINE_END } |
Flags for SetHAlign function. More... | |
enum | STYLE { sfsPARENT_CHANGE = 1, sfsPOSITION_CHANGE = 2, sfsSIZE_CHANGE = 4, sfsHOVERING = 8, sfsHIGHLIGHTING = 16, sfsALWAYS_INSIDE = 32, sfsDELETE_USER_DATA = 64, sfsPROCESS_DEL = 128, sfsSHOW_HANDLES = 256, sfsSHOW_SHADOW = 512, sfsLOCK_CHILDREN = 1024, sfsEMIT_EVENTS = 2048, sfsPROPAGATE_DRAGGING = 4096, sfsPROPAGATE_SELECTION = 8192, sfsPROPAGATE_INTERACTIVE_CONNECTION = 16384, sfsNO_FIT_TO_CHILDREN = 32768, sfsDEFAULT_SHAPE_STYLE = sfsPARENT_CHANGE | sfsPOSITION_CHANGE | sfsSIZE_CHANGE | sfsHOVERING | sfsHIGHLIGHTING | sfsSHOW_HANDLES | sfsALWAYS_INSIDE | sfsDELETE_USER_DATA } |
Basic shape's styles used with SetStyle() function. More... | |
Public Member Functions | |
XS_DECLARE_CLONABLE_CLASS (wxSFShapeBase) | |
wxSFShapeBase (void) | |
Basic constructor. | |
wxSFShapeBase (const wxRealPoint &pos, wxSFDiagramManager *manager) | |
Enhanced constructor. | |
wxSFShapeBase (const wxSFShapeBase &obj) | |
Copy constructor. | |
virtual | ~wxSFShapeBase (void) |
Destructor. | |
void | Refresh (bool delayed=false) |
Refresh (redraw) the shape. | |
virtual void | Draw (wxDC &dc, bool children=sfWITHCHILDREN) |
Draw shape. Default implementation tests basic shape visual states (normal/ready, mouse is over the shape, dragged shape can be accepted) and call appropriate virtual functions (DrawNormal, DrawHover, DrawHighlighted) for its visualisation. The function can be overrided if neccessary. | |
virtual bool | Contains (const wxPoint &pos) |
Test whether the given point is inside the shape. The function can be overrided if neccessary. | |
virtual bool | IsInside (const wxRect &rct) |
Test whether the shape is completely inside given rectangle. The function can be overrided if neccessary. | |
virtual bool | Intersects (const wxRect &rct) |
Test whether the given rectangle intersects the shape. | |
virtual wxRealPoint | GetAbsolutePosition () |
Get the shape's absolute position in the canvas (calculated as a sumation of all relative positions in the shapes' hierarchy. The function can be overrided if neccessary. | |
virtual wxRealPoint | GetBorderPoint (const wxRealPoint &start, const wxRealPoint &end) |
Get intersection point of the shape border and a line leading from 'start' point to 'end' point. Default implementation does nothing. The function can be overrided if neccessary. | |
virtual wxRealPoint | GetCenter () |
Get shape's center. Default implementation does nothing. The function can be overrided if neccessary. | |
virtual void | CreateHandles () |
Function called by the framework responsible for creation of shape handles at the creation time. Default implementation does nothing. The function can be overrided if neccesary. | |
void | ShowHandles (bool show) |
Show/hide shape handles. Hidden handles are inactive. | |
void | SetStyle (long style) |
Set shape's style. | |
long | GetStyle () const |
Get current shape style. | |
void | AddStyle (STYLE style) |
void | RemoveStyle (STYLE style) |
bool | ContainsStyle (STYLE style) const |
void | GetChildShapes (wxClassInfo *type, ShapeList &children, bool recursive=false, xsSerializable::SEARCHMODE mode=xsSerializable::searchBFS) |
Get child shapes associated with this (parent) shape. | |
void | GetNeighbours (ShapeList &neighbours, wxClassInfo *shapeInfo, CONNECTMODE condir, bool direct=true) |
Get neighbour shapes connected to this shape. | |
void | GetAssignedConnections (wxClassInfo *shapeInfo, wxSFShapeBase::CONNECTMODE mode, ShapeList &lines) |
Get list of connections assigned to this shape. | |
virtual wxRect | GetBoundingBox () |
Get shapes's bounding box. The function can be overrided if neccessary. | |
void | GetCompleteBoundingBox (wxRect &rct, int mask=bbALL) |
Get shape's bounding box which includes also associated child shapes and connections. | |
virtual void | Scale (double x, double y, bool children=sfWITHCHILDREN) |
Scale the shape size by in both directions. The function can be overrided if necessary (new implementation should call default one ore scale shape's children manualy if neccesary). | |
void | Scale (const wxRealPoint &scale, bool children=sfWITHCHILDREN) |
Scale the shape size by in both directions. | |
void | ScaleChildren (double x, double y) |
Scale shape's children. | |
virtual void | MoveTo (double x, double y) |
Move the shape to the given absolute position. The function can be overrided if necessary. | |
void | MoveTo (const wxRealPoint &pos) |
Move the shape to the given absolute position. | |
virtual void | MoveBy (double x, double y) |
Move the shape by the given offset. The function can be overrided if neccessary. | |
void | MoveBy (const wxRealPoint &delta) |
Move the shape by the given offset. | |
void | DoAlignment () |
Update the shape's position in order to its alignment. | |
virtual void | Update () |
Upate shape (align all child shapes an resize it to fit them) | |
virtual void | FitToChildren () |
Resize the shape to bound all child shapes. The function can be overrided if neccessary. | |
bool | IsSelected () const |
Function returns TRUE if the shape is selected, otherwise returns FALSE. | |
void | Select (bool state) |
Set the shape as a selected/deselected one. | |
void | SetRelativePosition (const wxRealPoint &pos) |
Set shape's relative position. Absolute shape's position is then calculated as a sumation of the relative positions of this shape and all parent shapes in the shape's hierarchy. | |
void | SetRelativePosition (double x, double y) |
Set shape's relative position. Absolute shape's position is then calculated as a sumation of the relative positions of this shape and all parent shapes in the shape's hierarchy. | |
wxRealPoint | GetRelativePosition () const |
Get shape's relative position. | |
void | SetVAlign (VALIGN val) |
Set vertical alignment of this shape inside its parent. | |
VALIGN | GetVAlign () const |
Get vertical alignment of this shape inside its parent. | |
void | SetHAlign (HALIGN val) |
Set horizontal alignment of this shape inside its parent. | |
HALIGN | GetHAlign () const |
Get horizontal alignment of this shape inside its parent. | |
void | SetVBorder (double border) |
Set vertical border between this shape and its parent (is vertical alignment is set). | |
double | GetVBorder () const |
Get vertical border between this shape and its parent (is vertical alignment is set). | |
void | SetHBorder (double border) |
Set horizontal border between this shape and its parent (is horizontal alignment is set). | |
double | GetHBorder () const |
Get horizontal border between this shape and its parent (is horizontal alignment is set). | |
void | SetCustomDockPoint (int dp) |
Set custom dock point used if the shape is child shape of a line shape. | |
int | GetCustomDockPoint () |
Get custom dock point used if the shape is child shape of a line shape. | |
wxSFShapeBase * | GetParentShape () |
Get pointer to a parent shape. | |
wxSFShapeBase * | GetGrandParentShape () |
Get pointer to the topmost parent shape. | |
bool | IsAncestor (wxSFShapeBase *child) |
Determine whether this shape is ancestor of given child shape. | |
bool | IsDescendant (wxSFShapeBase *parent) |
Determine whether this shape is descendant of given parent shape. | |
void | SetUserData (xsSerializable *data) |
Associate user data with the shape. | |
xsSerializable * | GetUserData () |
Get associated user data. | |
wxSFDiagramManager * | GetShapeManager () |
Get shape's parent diagram manager. | |
wxSFShapeCanvas * | GetParentCanvas () |
Get shape's parent canvas. | |
bool | IsVisible () const |
Get the shape's visibility status. | |
void | Show (bool show) |
Show/hide shape. | |
void | SetHoverColour (const wxColour &col) |
Set shape's hover color. | |
wxColour | GetHoverColour () const |
Get shape's hover color. | |
bool | IsActive () const |
Function returns value of a shape's activation flag. | |
void | Activate (bool active) |
Shape's activation/deactivation. | |
bool | IsChildAccepted (const wxString &type) |
Tells whether the given shape type is accepted by this shape (it means whether this shape can be its parent). | |
bool | AcceptCurrentlyDraggedShapes () |
Function returns TRUE if all currently dragged shapes can be accepted as children of this shape. | |
void | AcceptChild (const wxString &type) |
Add given shape type to an acceptance list. The acceptance list contains class names of the shapes which can be accepted as children of this shape. Note: Keyword 'All' behaves like any class name. | |
wxArrayString & | GetAcceptedChildren () |
Get shape types acceptance list. | |
bool | IsConnectionAccepted (const wxString &type) |
Tells whether the given connection type is accepted by this shape (it means whether this shape can be connected to another one by a connection of given type). | |
void | AcceptConnection (const wxString &type) |
Add given connection type to an acceptance list. The acceptance list contains class names of the connection which can be accepted by this shape. Note: Keyword 'All' behaves like any class name. | |
wxArrayString & | GetAcceptedConnections () |
Get connection types acceptance list. | |
bool | IsSrcNeighbourAccepted (const wxString &type) |
Tells whether the given shape type is accepted by this shape as its source neighbour(it means whether this shape can be connected from another one of given type). | |
void | AcceptSrcNeighbour (const wxString &type) |
Add given shape type to an source neighbours' acceptance list. The acceptance list contains class names of the shape types which can be accepted by this shape as its source neighbour. Note: Keyword 'All' behaves like any class name. | |
wxArrayString & | GetAcceptedSrcNeighbours () |
Get source neighbour types acceptance list. | |
bool | IsTrgNeighbourAccepted (const wxString &type) |
Tells whether the given shape type is accepted by this shape as its target neighbour(it means whether this shape can be connected to another one of given type). | |
void | AcceptTrgNeighbour (const wxString &type) |
Add given shape type to an target neighbours' acceptance list. The acceptance list contains class names of the shape types which can be accepted by this shape as its target neighbour. Note: Keyword 'All' behaves like any class name. | |
wxArrayString & | GetAcceptedTrgNeighbours () |
Get target neighbour types acceptance list. | |
void | ClearAcceptedChilds () |
Clear shape object acceptance list. | |
void | ClearAcceptedConnections () |
Clear connection object acceptance list. | |
void | ClearAcceptedSrcNeighbours () |
Clear source neighbour objects acceptance list. | |
void | ClearAcceptedTrgNeighbours () |
Clear target neighbour objects acceptance list. | |
HandleList & | GetHandles () |
Get list of currently assigned shape handles. | |
wxSFShapeHandle * | GetHandle (wxSFShapeHandle::HANDLETYPE type, long id=-1) |
Get shape handle. | |
void | AddHandle (wxSFShapeHandle::HANDLETYPE type, long id=-1) |
Add new handle to the shape. | |
void | RemoveHandle (wxSFShapeHandle::HANDLETYPE type, long id=-1) |
Remove given shape handle (if exists). | |
ConnectionPointList & | GetConnectionPoints () |
Get reference to connection points list. | |
wxSFConnectionPoint * | GetConnectionPoint (wxSFConnectionPoint::CPTYPE type, long id=-1) |
Get connection point of given type assigned to the shape. | |
wxSFConnectionPoint * | GetNearestConnectionPoint (const wxRealPoint &pos) |
Get connection point closest to the diven position. | |
void | AddConnectionPoint (wxSFConnectionPoint::CPTYPE type, bool persistent=true) |
Assign connection point of given type to the shape. | |
void | AddConnectionPoint (wxSFConnectionPoint *cp, bool persistent=true) |
Assigned given connection point to the shape. | |
void | AddConnectionPoint (const wxRealPoint &relpos, long id=-1, bool persistent=true) |
Assign custom connection point to the shape. | |
void | RemoveConnectionPoint (wxSFConnectionPoint::CPTYPE type) |
Remove connection point of given type from the shape (if pressent). | |
virtual void | OnLeftClick (const wxPoint &pos) |
Event handler called when the shape is clicked by the left mouse button. The function can be overrided if necessary. | |
virtual void | OnRightClick (const wxPoint &pos) |
Event handler called when the shape is clicked by the right mouse button. The function can be overrided if necessary. | |
virtual void | OnLeftDoubleClick (const wxPoint &pos) |
Event handler called when the shape is double-clicked by the left mouse button. The function can be overrided if necessary. | |
virtual void | OnRightDoubleClick (const wxPoint &pos) |
Event handler called when the shape is double-clicked by the right mouse button. The function can be overrided if necessary. | |
virtual void | OnBeginDrag (const wxPoint &pos) |
Event handler called at the begining of the shape dragging process. The function can be overrided if necessary. | |
virtual void | OnDragging (const wxPoint &pos) |
Event handler called during the shape dragging process. The function can be overrided if necessary. | |
virtual void | OnEndDrag (const wxPoint &pos) |
Event handler called at the end of the shape dragging process. The function can be overrided if necessary. | |
virtual void | OnBeginHandle (wxSFShapeHandle &handle) |
Event handler called when the user started to drag the shape handle. The function can be overrided if necessary. | |
virtual void | OnHandle (wxSFShapeHandle &handle) |
Event handler called during dragging of the shape handle. The function can be overrided if necessary. | |
virtual void | OnEndHandle (wxSFShapeHandle &handle) |
Event handler called when the user finished dragging of the shape handle. The function can be overrided if necessary. | |
virtual void | OnMouseEnter (const wxPoint &pos) |
Event handler called when a mouse pointer enters the shape area. The function can be overrided if necessary. | |
virtual void | OnMouseOver (const wxPoint &pos) |
Event handler called when a mouse pointer moves above the shape area. The function can be overrided if necessary. | |
virtual void | OnMouseLeave (const wxPoint &pos) |
Event handler called when a mouse pointer leaves the shape area. The function can be overrided if necessary. | |
virtual bool | OnKey (int key) |
Event handler called when any key is pressed (in the shape canvas). The function can be overrided if necessary. | |
virtual void | OnChildDropped (const wxRealPoint &pos, wxSFShapeBase *child) |
Event handler called when any shape is dropped above this shape (and the dropped shape is accepted as a child of this shape). The function can be overrided if necessary. | |
Protected Member Functions | |
virtual void | DrawNormal (wxDC &dc) |
Draw the shape in the normal way. The function can be overrided if neccessary. | |
virtual void | DrawSelected (wxDC &dc) |
Draw the shape in the selected 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. | |
virtual wxXmlNode * | Serialize (wxXmlNode *node) |
Serialize shape's properties to the given XML node. The serialization routine is automatically called by the framework and should take care about serialization of all specific (non-standard) shape's properties. | |
virtual void | Deserialize (wxXmlNode *node) |
Deserialize shape's properties from the given XML node. The routine is automatically called by the framework and should take care about deserialization of all specific (non-standard) shape's properties. | |
void | Refresh (const wxRect &rct, bool delayed=false) |
Repaint the shape. | |
wxRealPoint | GetParentAbsolutePosition () |
Get absolute position of the shape parent. | |
Protected Attributes | |
bool | m_fSelected |
Selection flag. | |
bool | m_fVisible |
Visibility flag. | |
bool | m_fActive |
Activation flag. | |
long | m_nStyle |
Shape's style mask. | |
wxColour | m_nHoverColor |
wxRealPoint | m_nRelativePosition |
wxArrayString | m_arrAcceptedChildren |
String list with class names of accepted child shapes. | |
wxArrayString | m_arrAcceptedConnections |
String list with class names of accepted connections. | |
wxArrayString | m_arrAcceptedSrcNeighbours |
String list with class names of accepted source neighbour shapes. | |
wxArrayString | m_arrAcceptedTrgNeighbours |
String list with class names of accepted target neighbour shapes. | |
double | m_nVBorder |
Value of vertical border used by AlignV function. | |
double | m_nHBorder |
Value of horizontal border used by AlignH function. | |
VALIGN | m_nVAlign |
Vertical alignment of child shapes. | |
HALIGN | m_nHAlign |
Horizontal alignment of child shapes. | |
int | m_nCustomDockPoint |
Custom line dock point. | |
HandleList | m_lstHandles |
Handle list. | |
ConnectionPointList | m_lstConnectionPts |
xsSerializable * | m_pUserData |
Container for serializable user data associated with the shape. | |
Private Member Functions | |
void | MarkSerializableDataMembers () |
Initialize serializable properties. | |
void | _GetNeighbours (ShapeList &neighbours, wxClassInfo *shapeInfo, CONNECTMODE condir, bool direct) |
Auxiliary function called by GetNeighbours function. | |
void | _GetCompleteBoundingBox (wxRect &rct, int mask=bbALL) |
Auxiliary function called by GetCompleteBoundingBox function. | |
void | _OnMouseMove (const wxPoint &pos) |
Original protected event handler called when the mouse pointer is moving around the shape canvas. | |
void | _OnBeginDrag (const wxPoint &pos) |
Original protected event handler called at the begininig of dragging process. | |
void | _OnDragging (const wxPoint &pos) |
Original protected event handler called during a dragging process. | |
void | _OnEndDrag (const wxPoint &pos) |
Original protected event handler called at the end of dragging process. | |
void | _OnKey (int key) |
Original protected event handler called when any key is pressed (in the shape canvas). | |
void | _OnHandle (wxSFShapeHandle &handle) |
Original protected event handler called during dragging of the shape handle. | |
Private Attributes | |
bool | m_fMouseOver |
bool | m_fFirstMove |
bool | m_fHighlighParent |
wxRealPoint | m_nMouseOffset |
Friends | |
class | wxSFShapeCanvas |
class | wxSFDiagramManager |
class | wxSFShapeHandle |
Base class for all shapes providing fundamental functionality and publishing set of virtual functions which must be defined by the user in derived shapes. This class shouldn't be used as it is.
Shape objects derived from this class use hierarchical approach. It means that every shape must have defined parent shape (can be NULL for topmost shapes). An absolute shape position is then calculated as a sumation of all relative positions of all parent shapes. Also the size of the parent shape can be limited be a boundind box of all children shapes.
This class also declares set of virtual functions used as event handlers for various events (moving, sizing, drawing, mouse events, serialization and deserialization requests, ...) mostly triggered by a parent shape canvas.
Bit flags for wxSFShapeBase::GetCompleteBoundingBox function.
enum wxSFShapeBase::STYLE |
Basic shape's styles used with SetStyle() function.
wxSFShapeBase::wxSFShapeBase | ( | void | ) |
Basic constructor.
wxSFShapeBase::wxSFShapeBase | ( | const wxRealPoint & | pos, |
wxSFDiagramManager * | manager | ||
) |
Enhanced constructor.
pos | Initial relative position |
manager | Pointer to parent diagram manager |
wxSFShapeBase::wxSFShapeBase | ( | const wxSFShapeBase & | obj | ) |
Copy constructor.
obj | Reference to the source object |
virtual wxSFShapeBase::~wxSFShapeBase | ( | void | ) | [virtual] |
Destructor.
void wxSFShapeBase::_GetCompleteBoundingBox | ( | wxRect & | rct, |
int | mask = bbALL |
||
) | [private] |
Auxiliary function called by GetCompleteBoundingBox function.
rct | Returned bounding rectangle |
mask | Bit mask of object types which should be included into calculation |
void wxSFShapeBase::_GetNeighbours | ( | ShapeList & | neighbours, |
wxClassInfo * | shapeInfo, | ||
CONNECTMODE | condir, | ||
bool | direct | ||
) | [private] |
Auxiliary function called by GetNeighbours function.
neighbours | List of neighbour shapes |
shapeInfo | Line object type |
condir | Connection direction |
direct | Set this flag to TRUE if only closest shapes should be found, otherwise also shapes connected by forked lines will be found (also constants sfDIRECT and sfINDIRECT can be used) |
void wxSFShapeBase::_OnBeginDrag | ( | const wxPoint & | pos | ) | [private] |
Original protected event handler called at the begininig of dragging process.
The function is called by the framework (by the shape canvas). After processing the event an overridable event handler is called.
pos | Current mouse position |
void wxSFShapeBase::_OnDragging | ( | const wxPoint & | pos | ) | [private] |
Original protected event handler called during a dragging process.
The function is called by the framework (by the shape canvas). After processing the event an overridable event handler is called.
pos | Current mouse position |
void wxSFShapeBase::_OnEndDrag | ( | const wxPoint & | pos | ) | [private] |
Original protected event handler called at the end of dragging process.
The function is called by the framework (by the shape canvas). After processing the event an overridable event handler is called.
pos | Current mouse position |
void wxSFShapeBase::_OnHandle | ( | wxSFShapeHandle & | handle | ) | [private] |
Original protected event handler called during dragging of the shape handle.
The function is called by the framework (by the shape canvas). Default implementation manages the child shapes' alignment (if set).
handle | Reference to dragged handle |
void wxSFShapeBase::_OnKey | ( | int | key | ) | [private] |
Original protected event handler called when any key is pressed (in the shape canvas).
The function is called by the framework (by the shape canvas). Default implementation performs operations necessary for proper shape's moving and repainting.
key | The key code |
void wxSFShapeBase::_OnMouseMove | ( | const wxPoint & | pos | ) | [private] |
Original protected event handler called when the mouse pointer is moving around the shape canvas.
The function is called by the framework (by the shape canvas). After processing the event relevant overridable event handlers are called.
pos | Current mouse position |
void wxSFShapeBase::AcceptChild | ( | const wxString & | type | ) | [inline] |
Add given shape type to an acceptance list. The acceptance list contains class names of the shapes which can be accepted as children of this shape. Note: Keyword 'All' behaves like any class name.
type | Class name of accepted shape object |
void wxSFShapeBase::AcceptConnection | ( | const wxString & | type | ) | [inline] |
Add given connection type to an acceptance list. The acceptance list contains class names of the connection which can be accepted by this shape. Note: Keyword 'All' behaves like any class name.
type | Class name of accepted connection object |
Function returns TRUE if all currently dragged shapes can be accepted as children of this shape.
void wxSFShapeBase::AcceptSrcNeighbour | ( | const wxString & | type | ) | [inline] |
Add given shape type to an source neighbours' acceptance list. The acceptance list contains class names of the shape types which can be accepted by this shape as its source neighbour. Note: Keyword 'All' behaves like any class name.
type | Class name of accepted connection object |
void wxSFShapeBase::AcceptTrgNeighbour | ( | const wxString & | type | ) | [inline] |
Add given shape type to an target neighbours' acceptance list. The acceptance list contains class names of the shape types which can be accepted by this shape as its target neighbour. Note: Keyword 'All' behaves like any class name.
type | Class name of accepted connection object |
void wxSFShapeBase::Activate | ( | bool | active | ) | [inline] |
Shape's activation/deactivation.
Deactivated shapes are visible, but don't receive (process) any events.
active | TRUE for activation, FALSE for deactivation |
void wxSFShapeBase::AddConnectionPoint | ( | wxSFConnectionPoint::CPTYPE | type, |
bool | persistent = true |
||
) |
Assign connection point of given type to the shape.
type | Connection point type |
persistent | TRUE if the connection point should be serialized |
void wxSFShapeBase::AddConnectionPoint | ( | wxSFConnectionPoint * | cp, |
bool | persistent = true |
||
) |
Assigned given connection point to the shape.
cp | Pointer to connection point (shape will take the ownership) |
persistent | TRUE if the connection point should be serialized |
void wxSFShapeBase::AddConnectionPoint | ( | const wxRealPoint & | relpos, |
long | id = -1 , |
||
bool | persistent = true |
||
) |
Assign custom connection point to the shape.
relpos | Relative position in percentages |
id | Optional connection point ID |
persistent | TRUE if the connection point should be serialized |
void wxSFShapeBase::AddHandle | ( | wxSFShapeHandle::HANDLETYPE | type, |
long | id = -1 |
||
) |
Add new handle to the shape.
The function creates new instance of shape handle (if it doesn't exist yet) and inserts it into handle list.
type | Handle type |
id | Handle ID (usefull only for line control points) |
void wxSFShapeBase::AddStyle | ( | STYLE | style | ) | [inline] |
void wxSFShapeBase::ClearAcceptedChilds | ( | ) | [inline] |
Clear shape object acceptance list.
void wxSFShapeBase::ClearAcceptedConnections | ( | ) | [inline] |
Clear connection object acceptance list.
void wxSFShapeBase::ClearAcceptedSrcNeighbours | ( | ) | [inline] |
Clear source neighbour objects acceptance list.
void wxSFShapeBase::ClearAcceptedTrgNeighbours | ( | ) | [inline] |
Clear target neighbour objects acceptance list.
virtual bool wxSFShapeBase::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 in wxSFLineShape, wxSFRoundRectShape, wxSFEllipseShape, wxSFDiamondShape, and wxSFCircleShape.
bool wxSFShapeBase::ContainsStyle | ( | STYLE | style | ) | const [inline] |
virtual void wxSFShapeBase::CreateHandles | ( | ) | [virtual] |
Function called by the framework responsible for creation of shape handles at the creation time. Default implementation does nothing. The function can be overrided if neccesary.
Reimplemented in wxSFLineShape, and wxSFRectShape.
virtual void wxSFShapeBase::Deserialize | ( | wxXmlNode * | node | ) | [protected, virtual] |
Deserialize shape's properties from the given XML node. The routine is automatically called by the framework and should take care about deserialization of all specific (non-standard) shape's properties.
Note, that the shape serialization is used not only for saving canvas's content to a file but also during Undo/Redo and the clipboard operations so it is very important to implement this virtual function otherwise all mentioned operations wont be available for this shape.
node | Pointer to a source XML node containig the shape's property nodes |
Reimplemented from xsSerializable.
Reimplemented in wxSFPolygonShape, wxSFBitmapShape, and wxSFTextShape.
void wxSFShapeBase::DoAlignment | ( | ) |
Update the shape's position in order to its alignment.
virtual void wxSFShapeBase::Draw | ( | wxDC & | dc, |
bool | children = sfWITHCHILDREN |
||
) | [virtual] |
Draw shape. Default implementation tests basic shape visual states (normal/ready, mouse is over the shape, dragged shape can be accepted) and call appropriate virtual functions (DrawNormal, DrawHover, DrawHighlighted) for its visualisation. The function can be overrided if neccessary.
dc | Reference to a device context where the shape will be drawn to |
children | TRUE if the shape's children should be drawn as well |
virtual void wxSFShapeBase::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 in wxSFLineShape, wxSFRectShape, wxSFPolygonShape, wxSFBitmapShape, wxSFTextShape, wxSFRoundRectShape, wxSFEllipseShape, and wxSFCircleShape.
virtual void wxSFShapeBase::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 in wxSFLineShape, wxSFRectShape, wxSFPolygonShape, wxSFBitmapShape, wxSFTextShape, wxSFRoundRectShape, wxSFEllipseShape, and wxSFCircleShape.
virtual void wxSFShapeBase::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 in wxSFLineShape, wxSFRectShape, wxSFPolygonShape, wxSFBitmapShape, wxSFTextShape, wxSFRoundRectShape, wxSFEllipseShape, and wxSFCircleShape.
virtual void wxSFShapeBase::DrawSelected | ( | wxDC & | dc | ) | [protected, virtual] |
Draw the shape in the selected way. The function can be overrided if neccessary.
dc | Reference to device context where the shape will be drawn to |
virtual void wxSFShapeBase::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 in wxSFRectShape, wxSFPolygonShape, wxSFTextShape, wxSFRoundRectShape, wxSFEllipseShape, and wxSFCircleShape.
virtual void wxSFShapeBase::FitToChildren | ( | ) | [virtual] |
Resize the shape to bound all child shapes. The function can be overrided if neccessary.
Reimplemented in wxSFControlShape, wxSFGridShape, wxSFRectShape, and wxSFPolygonShape.
virtual wxRealPoint wxSFShapeBase::GetAbsolutePosition | ( | ) | [virtual] |
Get the shape's absolute position in the canvas (calculated as a sumation of all relative positions in the shapes' hierarchy. The function can be overrided if neccessary.
Reimplemented in wxSFLineShape.
wxArrayString& wxSFShapeBase::GetAcceptedChildren | ( | ) | [inline] |
Get shape types acceptance list.
wxArrayString& wxSFShapeBase::GetAcceptedConnections | ( | ) | [inline] |
Get connection types acceptance list.
wxArrayString& wxSFShapeBase::GetAcceptedSrcNeighbours | ( | ) | [inline] |
Get source neighbour types acceptance list.
wxArrayString& wxSFShapeBase::GetAcceptedTrgNeighbours | ( | ) | [inline] |
Get target neighbour types acceptance list.
void wxSFShapeBase::GetAssignedConnections | ( | wxClassInfo * | shapeInfo, |
wxSFShapeBase::CONNECTMODE | mode, | ||
ShapeList & | lines | ||
) |
Get list of connections assigned to this shape.
Note: For proper functionality the shape must be managed by a diagram manager.
shapeInfo | Line object type |
mode | Search mode |
lines | Reference to shape list where pointers to all found connections will be stored |
virtual wxRealPoint wxSFShapeBase::GetBorderPoint | ( | const wxRealPoint & | start, |
const wxRealPoint & | end | ||
) | [virtual] |
Get intersection point of the shape border and a line leading from 'start' point to 'end' point. Default implementation does nothing. The function can be overrided if neccessary.
start | Starting point of the virtual intersection line |
end | Ending point of the virtual intersection line |
Reimplemented in wxSFLineShape, wxSFPolygonShape, wxSFRectShape, wxSFEllipseShape, and wxSFCircleShape.
virtual wxRect wxSFShapeBase::GetBoundingBox | ( | ) | [virtual] |
Get shapes's bounding box. The function can be overrided if neccessary.
Reimplemented in wxSFLineShape, wxSFRectShape, and wxSFCurveShape.
virtual wxRealPoint wxSFShapeBase::GetCenter | ( | ) | [virtual] |
Get shape's center. Default implementation does nothing. The function can be overrided if neccessary.
void wxSFShapeBase::GetChildShapes | ( | wxClassInfo * | type, |
ShapeList & | children, | ||
bool | recursive = false , |
||
xsSerializable::SEARCHMODE | mode = xsSerializable::searchBFS |
||
) |
Get child shapes associated with this (parent) shape.
type | Type of searched child shapes (NULL for any type) |
children | List of child shapes |
recursive | Set this flag TRUE if also children of children of ... should be found (also sfRECURSIVE a sfNORECURSIVE constants can be used). |
mode | Search mode (has sense only for recursive search) |
void wxSFShapeBase::GetCompleteBoundingBox | ( | wxRect & | rct, |
int | mask = bbALL |
||
) |
Get shape's bounding box which includes also associated child shapes and connections.
rct | Returned bounding rectangle |
mask | Bit mask of object types which should be included into calculation |
wxSFConnectionPoint* wxSFShapeBase::GetConnectionPoint | ( | wxSFConnectionPoint::CPTYPE | type, |
long | id = -1 |
||
) |
Get connection point of given type assigned to the shape.
type | Connection point type |
id | Optional connection point ID |
ConnectionPointList& wxSFShapeBase::GetConnectionPoints | ( | ) | [inline] |
Get reference to connection points list.
int wxSFShapeBase::GetCustomDockPoint | ( | ) | [inline] |
Get custom dock point used if the shape is child shape of a line shape.
Get pointer to the topmost parent shape.
HALIGN wxSFShapeBase::GetHAlign | ( | ) | const [inline] |
wxSFShapeHandle* wxSFShapeBase::GetHandle | ( | wxSFShapeHandle::HANDLETYPE | type, |
long | id = -1 |
||
) |
Get shape handle.
type | Handle type |
id | Handle ID (usefull only for line control points) |
HandleList& wxSFShapeBase::GetHandles | ( | ) | [inline] |
Get list of currently assigned shape handles.
double wxSFShapeBase::GetHBorder | ( | ) | const [inline] |
Get horizontal border between this shape and its parent (is horizontal alignment is set).
wxColour wxSFShapeBase::GetHoverColour | ( | ) | const [inline] |
Get shape's hover color.
wxSFConnectionPoint* wxSFShapeBase::GetNearestConnectionPoint | ( | const wxRealPoint & | pos | ) |
Get connection point closest to the diven position.
pos | Position |
void wxSFShapeBase::GetNeighbours | ( | ShapeList & | neighbours, |
wxClassInfo * | shapeInfo, | ||
CONNECTMODE | condir, | ||
bool | direct = true |
||
) |
Get neighbour shapes connected to this shape.
neighbours | List of neighbour shapes |
shapeInfo | Line object type |
condir | Connection direction |
direct | Set this flag to TRUE if only closest shapes should be found, otherwise also shapes connected by forked lines will be found (also constants sfDIRECT and sfINDIRECT can be used) |
wxRealPoint wxSFShapeBase::GetParentAbsolutePosition | ( | ) | [protected] |
Get absolute position of the shape parent.
Get shape's parent canvas.
Get pointer to a parent shape.
wxRealPoint wxSFShapeBase::GetRelativePosition | ( | ) | const [inline] |
wxSFDiagramManager* wxSFShapeBase::GetShapeManager | ( | ) | [inline] |
long wxSFShapeBase::GetStyle | ( | ) | const [inline] |
Get current shape style.
xsSerializable* wxSFShapeBase::GetUserData | ( | ) | [inline] |
Get associated user data.
VALIGN wxSFShapeBase::GetVAlign | ( | ) | const [inline] |
double wxSFShapeBase::GetVBorder | ( | ) | const [inline] |
Get vertical border between this shape and its parent (is vertical alignment is set).
virtual bool wxSFShapeBase::Intersects | ( | const wxRect & | rct | ) | [virtual] |
Test whether the given rectangle intersects the shape.
rct | Examined rectangle |
bool wxSFShapeBase::IsActive | ( | ) | const [inline] |
Function returns value of a shape's activation flag.
Non-active shapes are visible, but don't receive (process) any events.
bool wxSFShapeBase::IsAncestor | ( | wxSFShapeBase * | child | ) |
Determine whether this shape is ancestor of given child shape.
child | Pointer to child shape. |
bool wxSFShapeBase::IsChildAccepted | ( | const wxString & | type | ) |
Tells whether the given shape type is accepted by this shape (it means whether this shape can be its parent).
The function is typically used by the framework for determination whether a dropped shape can be assigned to an underlying shape as its child.
type | Class name of examined shape object |
bool wxSFShapeBase::IsConnectionAccepted | ( | const wxString & | type | ) |
Tells whether the given connection type is accepted by this shape (it means whether this shape can be connected to another one by a connection of given type).
The function is typically used by the framework during interactive connection creation.
type | Class name of examined connection object |
bool wxSFShapeBase::IsDescendant | ( | wxSFShapeBase * | parent | ) |
Determine whether this shape is descendant of given parent shape.
parent | Pointer to parent shape |
virtual bool wxSFShapeBase::IsInside | ( | const wxRect & | rct | ) | [virtual] |
Test whether the shape is completely inside given rectangle. The function can be overrided if neccessary.
rct | Examined rectangle |
bool wxSFShapeBase::IsSelected | ( | ) | const [inline] |
Function returns TRUE if the shape is selected, otherwise returns FALSE.
bool wxSFShapeBase::IsSrcNeighbourAccepted | ( | const wxString & | type | ) |
Tells whether the given shape type is accepted by this shape as its source neighbour(it means whether this shape can be connected from another one of given type).
The function is typically used by the framework during interactive connection creation.
type | Class name of examined connection object |
bool wxSFShapeBase::IsTrgNeighbourAccepted | ( | const wxString & | type | ) |
Tells whether the given shape type is accepted by this shape as its target neighbour(it means whether this shape can be connected to another one of given type).
The function is typically used by the framework during interactive connection creation.
type | Class name of examined connection object |
bool wxSFShapeBase::IsVisible | ( | ) | const [inline] |
Get the shape's visibility status.
void wxSFShapeBase::MarkSerializableDataMembers | ( | ) | [private] |
Initialize serializable properties.
Reimplemented in wxSFLineShape, wxSFControlShape, wxSFRectShape, wxSFTextShape, wxSFPolygonShape, wxSFGridShape, wxSFBitmapShape, and wxSFRoundRectShape.
virtual void wxSFShapeBase::MoveBy | ( | double | x, |
double | y | ||
) | [virtual] |
Move the shape by the given offset. The function can be overrided if neccessary.
x | X offset |
y | Y offset |
Reimplemented in wxSFLineShape, and wxSFControlShape.
void wxSFShapeBase::MoveBy | ( | const wxRealPoint & | delta | ) |
Move the shape by the given offset.
delta | Offset |
virtual void wxSFShapeBase::MoveTo | ( | double | x, |
double | y | ||
) | [virtual] |
Move the shape to the given absolute position. The function can be overrided if necessary.
x | X coordinate |
y | Y coordinate |
Reimplemented in wxSFLineShape, and wxSFControlShape.
void wxSFShapeBase::MoveTo | ( | const wxRealPoint & | pos | ) |
Move the shape to the given absolute position.
pos | New absolute position |
virtual void wxSFShapeBase::OnBeginDrag | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called at the begining of the shape dragging process. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_DRAG_BEGIN event.
Reimplemented in wxSFLineShape, and wxSFControlShape.
virtual void wxSFShapeBase::OnBeginHandle | ( | wxSFShapeHandle & | handle | ) | [virtual] |
Event handler called when the user started to drag the shape handle. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_HANDLE_BEGIN event.
handle | Reference to dragged handle |
Reimplemented in wxSFControlShape, wxSFBitmapShape, wxSFRectShape, and wxSFMultiSelRect.
virtual void wxSFShapeBase::OnChildDropped | ( | const wxRealPoint & | pos, |
wxSFShapeBase * | child | ||
) | [virtual] |
Event handler called when any shape is dropped above this shape (and the dropped shape is accepted as a child of this shape). The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_CHILD_DROP event.
pos | Relative position of dropped shape |
child | Pointer to dropped shape |
Reimplemented in wxSFGridShape.
virtual void wxSFShapeBase::OnDragging | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called during the shape dragging process. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_DRAG event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnEndDrag | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called at the end of the shape dragging process. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_DRAG_END event.
pos | Current mouse position |
Reimplemented in wxSFControlShape.
virtual void wxSFShapeBase::OnEndHandle | ( | wxSFShapeHandle & | handle | ) | [virtual] |
Event handler called when the user finished dragging of the shape handle. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_HANDLE_END event.
handle | Reference to dragged handle |
Reimplemented in wxSFLineShape, wxSFControlShape, wxSFBitmapShape, and wxSFMultiSelRect.
virtual void wxSFShapeBase::OnHandle | ( | wxSFShapeHandle & | handle | ) | [virtual] |
Event handler called during dragging of the shape handle. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_HANDLE event.
handle | Reference to dragged handle |
Reimplemented in wxSFLineShape, wxSFControlShape, wxSFPolygonShape, wxSFBitmapShape, wxSFTextShape, wxSFRectShape, wxSFSquareShape, and wxSFMultiSelRect.
virtual bool wxSFShapeBase::OnKey | ( | int | key | ) | [virtual] |
Event handler called when any key is pressed (in the shape canvas). The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_KEYDOWN event.
key | The key code |
Reimplemented in wxSFEditTextShape.
virtual void wxSFShapeBase::OnLeftClick | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when the shape is clicked by the left mouse button. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_LEFT_DOWN event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnLeftDoubleClick | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when the shape is double-clicked by the left mouse button. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_LEFT_DCLICK event.
pos | Current mouse position |
Reimplemented in wxSFLineShape, and wxSFEditTextShape.
virtual void wxSFShapeBase::OnMouseEnter | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when a mouse pointer enters the shape area. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_MOUSE_ENTER event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnMouseLeave | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when a mouse pointer leaves the shape area. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_MOUSE_LEAVE event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnMouseOver | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when a mouse pointer moves above the shape area. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_MOUSE_OVER event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnRightClick | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when the shape is clicked by the right mouse button. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_RIGHT_DOWN event.
pos | Current mouse position |
virtual void wxSFShapeBase::OnRightDoubleClick | ( | const wxPoint & | pos | ) | [virtual] |
Event handler called when the shape is double-clicked by the right mouse button. The function can be overrided if necessary.
The function is called by the framework (by the shape canvas). Default implementation emmits wxEVT_SF_SHAPE_RIGHT_DCLICK event.
pos | Current mouse position |
void wxSFShapeBase::Refresh | ( | bool | delayed = false | ) |
Refresh (redraw) the shape.
delayed | If TRUE then the shape canvas will be rather invalidated than refreshed. |
void wxSFShapeBase::Refresh | ( | const wxRect & | rct, |
bool | delayed = false |
||
) | [protected] |
Repaint the shape.
rct | Canvas portion that should be updated |
delayed | If TRUE then the shape canvas will be rather invalidated than refreshed. |
Remove connection point of given type from the shape (if pressent).
type | Connection point type |
void wxSFShapeBase::RemoveHandle | ( | wxSFShapeHandle::HANDLETYPE | type, |
long | id = -1 |
||
) |
Remove given shape handle (if exists).
type | Handle type |
id | Handle ID (usefull only for line control points) |
void wxSFShapeBase::RemoveStyle | ( | STYLE | style | ) | [inline] |
virtual void wxSFShapeBase::Scale | ( | double | x, |
double | y, | ||
bool | children = sfWITHCHILDREN |
||
) | [virtual] |
Scale the shape size by in both directions. The function can be overrided if necessary (new implementation should call default one ore scale shape's children manualy if neccesary).
x | Horizontal scale factor |
y | Vertical scale factor |
children | TRUE if the shape's children shoould be scaled as well, otherwise the shape will be updated after scaling via Update() function. |
Reimplemented in wxSFLineShape, wxSFControlShape, wxSFRectShape, wxSFPolygonShape, wxSFTextShape, wxSFBitmapShape, and wxSFSquareShape.
void wxSFShapeBase::Scale | ( | const wxRealPoint & | scale, |
bool | children = sfWITHCHILDREN |
||
) |
Scale the shape size by in both directions.
scale | Scaling factor |
children | TRUE if the shape's children shoould be scaled as well, otherwise the shape will be updated after scaling via Update() function. |
void wxSFShapeBase::ScaleChildren | ( | double | x, |
double | y | ||
) |
void wxSFShapeBase::Select | ( | bool | state | ) | [inline] |
Set the shape as a selected/deselected one.
state | Selection state (TRUE is selected, FALSE is deselected) |
virtual wxXmlNode* wxSFShapeBase::Serialize | ( | wxXmlNode * | node | ) | [protected, virtual] |
Serialize shape's properties to the given XML node. The serialization routine is automatically called by the framework and should take care about serialization of all specific (non-standard) shape's properties.
Note, that the shape serialization is used not only for saving canvas's content to a file but also during Undo/Redo and the clipboard operations so it is very important to implement this virtual function otherwise all mentioned operations wont be available for this shape.
node | Pointer to XML node where the shape's property nodes will be appended to |
Reimplemented from xsSerializable.
Reimplemented in wxSFPolygonShape, wxSFBitmapShape, and wxSFTextShape.
void wxSFShapeBase::SetCustomDockPoint | ( | int | dp | ) | [inline] |
Set custom dock point used if the shape is child shape of a line shape.
dp | Custom dock point |
void wxSFShapeBase::SetHAlign | ( | HALIGN | val | ) | [inline] |
Set horizontal alignment of this shape inside its parent.
val | Horizontal type |
void wxSFShapeBase::SetHBorder | ( | double | border | ) | [inline] |
Set horizontal border between this shape and its parent (is horizontal alignment is set).
border | Horizontal border |
void wxSFShapeBase::SetHoverColour | ( | const wxColour & | col | ) | [inline] |
Set shape's hover color.
col | Hover color |
void wxSFShapeBase::SetRelativePosition | ( | const wxRealPoint & | pos | ) | [inline] |
Set shape's relative position. Absolute shape's position is then calculated as a sumation of the relative positions of this shape and all parent shapes in the shape's hierarchy.
pos | New relative position |
void wxSFShapeBase::SetRelativePosition | ( | double | x, |
double | y | ||
) | [inline] |
Set shape's relative position. Absolute shape's position is then calculated as a sumation of the relative positions of this shape and all parent shapes in the shape's hierarchy.
x | Horizontal coordinate of new relative position |
y | Vertical coordinate of new relative position |
void wxSFShapeBase::SetStyle | ( | long | style | ) | [inline] |
Set shape's style.
Default value is sfsPARENT_CHANGE | sfsPOSITION_CHANGE | sfsSIZE_CHANGE | sfsHOVERING | sfsHIGHLIGHTING | sfsSHOW_HANDLES | sfsALWAYS_INSIDE | sfsDELETE_USER_DATA
style | Combination of the shape's styles |
void wxSFShapeBase::SetUserData | ( | xsSerializable * | data | ) |
Associate user data with the shape.
If the data object is properly set then its marked properties will be serialized together with the parent shape.
data | Pointer to user data |
void wxSFShapeBase::SetVAlign | ( | VALIGN | val | ) | [inline] |
Set vertical alignment of this shape inside its parent.
val | Alignment type |
void wxSFShapeBase::SetVBorder | ( | double | border | ) | [inline] |
Set vertical border between this shape and its parent (is vertical alignment is set).
border | Vertical border |
void wxSFShapeBase::Show | ( | bool | show | ) | [inline] |
Show/hide shape.
show | Set the parameter to TRUE if the shape should be visible, otherwise use FALSE |
void wxSFShapeBase::ShowHandles | ( | bool | show | ) |
Show/hide shape handles. Hidden handles are inactive.
show | TRUE for showing, FALSE for hidding |
virtual void wxSFShapeBase::Update | ( | ) | [virtual] |
Upate shape (align all child shapes an resize it to fit them)
Reimplemented in wxSFControlShape, wxSFGridShape, and wxSFTextShape.
friend class wxSFDiagramManager [friend] |
Reimplemented in wxSFGridShape.
friend class wxSFShapeCanvas [friend] |
Reimplemented in wxSFLineShape.
friend class wxSFShapeHandle [friend] |
wxArrayString wxSFShapeBase::m_arrAcceptedChildren [protected] |
String list with class names of accepted child shapes.
wxArrayString wxSFShapeBase::m_arrAcceptedConnections [protected] |
String list with class names of accepted connections.
wxArrayString wxSFShapeBase::m_arrAcceptedSrcNeighbours [protected] |
String list with class names of accepted source neighbour shapes.
wxArrayString wxSFShapeBase::m_arrAcceptedTrgNeighbours [protected] |
String list with class names of accepted target neighbour shapes.
bool wxSFShapeBase::m_fActive [protected] |
Activation flag.
bool wxSFShapeBase::m_fFirstMove [private] |
bool wxSFShapeBase::m_fHighlighParent [private] |
bool wxSFShapeBase::m_fMouseOver [private] |
bool wxSFShapeBase::m_fSelected [protected] |
Selection flag.
bool wxSFShapeBase::m_fVisible [protected] |
Visibility flag.
ConnectionPointList wxSFShapeBase::m_lstConnectionPts [protected] |
HandleList wxSFShapeBase::m_lstHandles [protected] |
Handle list.
int wxSFShapeBase::m_nCustomDockPoint [protected] |
Custom line dock point.
HALIGN wxSFShapeBase::m_nHAlign [protected] |
Horizontal alignment of child shapes.
double wxSFShapeBase::m_nHBorder [protected] |
Value of horizontal border used by AlignH function.
wxColour wxSFShapeBase::m_nHoverColor [protected] |
wxRealPoint wxSFShapeBase::m_nMouseOffset [private] |
wxRealPoint wxSFShapeBase::m_nRelativePosition [protected] |
long wxSFShapeBase::m_nStyle [protected] |
Shape's style mask.
VALIGN wxSFShapeBase::m_nVAlign [protected] |
Vertical alignment of child shapes.
double wxSFShapeBase::m_nVBorder [protected] |
Value of vertical border used by AlignV function.
xsSerializable* wxSFShapeBase::m_pUserData [protected] |
Container for serializable user data associated with the shape.