wxShapeFramework  1.13.0 beta
wxSFDiagramManager Class Reference

Class encapsulating framework's data layer. Its functions are responsible for managing shape objects and their serialialization/deserialization. Presentation layer is provided by wxSFShapeCanvas class which tightly cooperates with the shape manager. More...

#include <DiagramManager.h>

Inheritance diagram for wxSFDiagramManager:
Collaboration diagram for wxSFDiagramManager:

Public Types

enum  SEARCHMODE { searchSELECTED , searchUNSELECTED , searchBOTH }
 Search mode flags for GetShapeAtPosition function. More...
 

Public Member Functions

 XS_DECLARE_CLONABLE_CLASS (wxSFDiagramManager)
 
 wxSFDiagramManager ()
 Constructor. More...
 
 wxSFDiagramManager (const wxSFDiagramManager &obj)
 Copy constructor. More...
 
virtual ~wxSFDiagramManager ()
 Destructor. More...
 
const wxString & GetVersion () const
 Get wxShapeFramework version number. More...
 
wxSFShapeBaseCreateConnection (long srcId, long trgId, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Create new direct connection between two shapes. More...
 
wxSFShapeBaseCreateConnection (long srcId, long trgId, wxClassInfo *lineInfo, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Create new direct connection of given type between two shapes. More...
 
wxSFShapeBaseCreateConnection (long srcId, long trgId, wxSFLineShape *line, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Create new direct connection of given type between two shapes. More...
 
wxSFShapeBaseAddShape (wxClassInfo *shapeInfo, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Create new shape and add it to the shape canvas. More...
 
wxSFShapeBaseAddShape (wxClassInfo *shapeInfo, const wxPoint &pos, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Create new shape and add it to the shape canvas. More...
 
wxSFShapeBaseAddShape (wxSFShapeBase *shape, xsSerializable *parent, const wxPoint &pos, bool initialize, bool saveState=true, wxSF::ERRCODE *err=NULL)
 Add an existing shape to the canvas. More...
 
void RemoveShape (wxSFShapeBase *shape, bool refresh=true)
 Remove given shape from the shape canvas. The shape object will be deleted as well. More...
 
void RemoveShapes (const ShapeList &selection)
 Remove shapes from the shape canvas. More...
 
void Clear ()
 Remove all shapes from canvas. More...
 
void MoveShapesFromNegatives ()
 Move all shapes so none of it will be located in negative position. More...
 
void UpdateAll ()
 Update all shapes in the diagram manager. More...
 
virtual bool SerializeToXml (const wxString &file, bool withroot=false)
 Serialize complete shape canvas to given file. More...
 
virtual bool DeserializeFromXml (const wxString &file)
 Deserialize complete shape canvas from given file. More...
 
virtual bool SerializeToXml (wxOutputStream &outstream, bool withroot=false)
 Serialize complete shape canvas to given output stream. More...
 
virtual bool DeserializeFromXml (wxInputStream &instream)
 Deserialize complete shape canvas from given input stream. More...
 
virtual void DeserializeObjects (xsSerializable *parent, wxXmlNode *node)
 
void AcceptShape (const wxString &type)
 Add given shape type to an acceptance list. The acceptance list contains class names of the shapes which can be inserted into this instance of shapes canvas. Note: Keyword 'All' behaves like any class name. More...
 
bool IsShapeAccepted (const wxString &type)
 Tells whether the given shape type is accepted by this canvas instance (it means whether this shape can be inserted into it). More...
 
void ClearAcceptedShapes ()
 Clear shape object acceptance list. More...
 
wxArrayString & GetAcceptedShapes ()
 Get reference to shape acceptance list. More...
 
void AcceptTopShape (const wxString &type)
 Add given shape type to list of accepted top shapes. The acceptance list contains class names of the shapes which can be inserted into this instance of shapes canvas as a shape without any parent (i.e. shape placed directly onto the canvas). Note: Keyword 'All' behaves like any class name. More...
 
bool IsTopShapeAccepted (const wxString &type)
 Tells whether the given shape type is accepted by this canvas instance as a top shape (it means whether this shape can be inserted directly into it without any parent). More...
 
void ClearAcceptedTopShapes ()
 Clear top shapes acceptance list. More...
 
wxArrayString & GetAcceptedTopShapes ()
 Get reference to top shapes acceptance list. More...
 
wxSFShapeBaseFindShape (long id)
 Find shape with given ID. More...
 
void GetAssignedConnections (wxSFShapeBase *parent, wxClassInfo *shapeInfo, wxSFShapeBase::CONNECTMODE mode, ShapeList &lines)
 Get list of connections assigned to given parent shape. More...
 
void GetShapes (wxClassInfo *shapeInfo, ShapeList &shapes, xsSerializable::SEARCHMODE mode=xsSerializable::searchBFS)
 Get list of shapes of given type. More...
 
wxSFShapeBaseGetShapeAtPosition (const wxPoint &pos, int zorder=1, SEARCHMODE mode=searchBOTH)
 Get shape at given logical position. More...
 
void GetShapesAtPosition (const wxPoint &pos, ShapeList &shapes)
 Get list of all shapes located at given position. More...
 
void GetShapesInside (const wxRect &rct, ShapeList &shapes)
 Get list of shapes located inside given rectangle. More...
 
bool IsEmpty () const
 Determines whether the diagram manager contains some shapes. More...
 
bool HasChildren (wxSFShapeBase *parent)
 Function finds out whether given shape has some children. More...
 
void GetNeighbours (wxSFShapeBase *parent, ShapeList &neighbours, wxClassInfo *shapeInfo, wxSFShapeBase::CONNECTMODE condir, bool direct=true)
 Get neighbour shapes connected to given parent shape. More...
 
bool IsModified ()
 Get information about managed diagram's modification. More...
 
void SetModified (bool state)
 Set diagram's modification flag manually. More...
 
void SetShapeCanvas (wxSFShapeCanvas *canvas)
 Set associated shape canvas. More...
 
wxSFShapeCanvasGetShapeCanvas ()
 Get associated shape canvas. More...
 
- Public Member Functions inherited from wxXmlSerializer
 XS_DECLARE_CLONABLE_CLASS (wxXmlSerializer)
 
 wxXmlSerializer ()
 Constructor. More...
 
 wxXmlSerializer (const wxString &owner, const wxString &root, const wxString &version)
 User constructor. More...
 
 wxXmlSerializer (const wxXmlSerializer &obj)
 Copy constructor. More...
 
virtual ~wxXmlSerializer ()
 Destructor. More...
 
void SetSerializerOwner (const wxString &name)
 Set owner name. More...
 
void SetSerializerRootName (const wxString &name)
 Set root name. More...
 
void SetSerializerVersion (const wxString &name)
 Set file version. More...
 
const wxString & GetSerializerOwner () const
 Get owner name. More...
 
const wxString & GetSerializerRootName () const
 Get name of root node. More...
 
const wxString & GetSerializerVersion () const
 Get file version. More...
 
const wxString & GetLibraryVersion () const
 Get the library version. More...
 
const wxString & GetErrMessage () const
 Get last occured error state/message. More...
 
xsSerializableGetRootItem () const
 Get pointer to root serializable object. More...
 
xsSerializableGetItem (long id)
 Get serializable object with given ID. More...
 
void GetItems (wxClassInfo *type, SerializableList &list, xsSerializable::SEARCHMODE mode=xsSerializable::searchBFS)
 Get items of given class type. More...
 
bool Contains (xsSerializable *object) const
 Check whether given object is included in the serializer. More...
 
bool Contains (wxClassInfo *type)
 Check whether any object of given type is included in the serializer. More...
 
void SetRootItem (xsSerializable *root)
 Set root item. More...
 
void CopyItems (const wxXmlSerializer &src)
 Replace current stored data with a content stored in given source manager. More...
 
xsSerializableAddItem (long parentId, xsSerializable *item)
 Add serializable object to the serializer. More...
 
xsSerializableAddItem (xsSerializable *parent, xsSerializable *item)
 Add serializable object to the serializer. More...
 
void RemoveItem (long id)
 Remove serializable object from the serializer (object will be destroyed). More...
 
void RemoveItem (xsSerializable *item)
 Remove serializable object from the serializer (object will be destroyed). More...
 
void RemoveAll ()
 Remove and destroy all stored serializable objects. More...
 
void EnableCloning (bool enab)
 Enable/disable object cloning. More...
 
bool IsCloned () const
 Returns information whether the object can be cloned or not. More...
 
virtual void SerializeObjects (xsSerializable *parent, wxXmlNode *node, bool withparent)
 Serialize child objects of given parent object (parent object can be optionaly serialized as well) to given XML node. The function can be overriden if necessary. More...
 
long GetNewId ()
 Get the lowest free object ID. More...
 
bool IsIdUsed (long id)
 Find out whether given object ID is already used. More...
 
int GetIDCount (long id)
 Get number of occurences of given ID. More...
 
IDMap & GetUsedIDs ()
 Get map of used IDs. More...
 
void InitializeAllIOHandlers ()
 Initialize all standard property IO handlers. More...
 
void ClearIOHandlers ()
 Clear all initialized property IO handlers. More...
 
wxXmlSerializeroperator<< (xsSerializable *obj)
 Add serializable object to the serializer's root node. More...
 
wxXmlSerializeroperator<< (SerializableList &src)
 Add serializable objects stored in source serializable list to the serializer's root node. More...
 
void operator>> (SerializableList &dest)
 Get all items managed by the serializer (note that the items will be stored in given target list in a row regardless their original hierarchy). More...
 

Protected Attributes

wxArrayString m_arrAcceptedShapes
 List of accepted shape types. More...
 
wxArrayString m_arrAcceptedTopShapes
 List of accepted top shape types. More...
 
wxSFShapeCanvasm_pShapeCanvas
 
- Protected Attributes inherited from wxXmlSerializer
wxString m_sOwner
 Owner name. More...
 
wxString m_sRootName
 Root node name. More...
 
wxString m_sVersion
 File version. More...
 
wxString m_sErr
 Error message. More...
 
xsSerializablem_pRoot
 Pointer to root object. More...
 
bool m_fClone
 Object cloning flag. More...
 
IDMap m_mapUsedIDs
 Map storing information which ID is already used. More...
 

Private Member Functions

void UpdateConnections ()
 Update connection shapes after importing/dropping of new shapes. More...
 
void UpdateGrids ()
 Update grid shapes after importing/dropping of new shapes. More...
 
void _DeserializeObjects (xsSerializable *parent, wxXmlNode *node)
 Deserialize shapes from XML and assign them to given parent. More...
 

Private Attributes

IDList m_lstIDPairs
 Auxiliary list. More...
 
ShapeList m_lstLinesForUpdate
 Auxiliary list. More...
 
ShapeList m_lstGridsForUpdate
 Auxiliary list. More...
 
wxString m_sSFVersion
 wxSF version number More...
 
bool m_fIsModified
 

Additional Inherited Members

- Static Public Member Functions inherited from wxXmlSerializer
static xsPropertyIOGetPropertyIOHandler (const wxString &datatype)
 Get property I/O handler for given datatype. More...
 
- Static Public Attributes inherited from wxXmlSerializer
static PropertyIOMap m_mapPropertyIOHandlers
 Map of property IO handlers. More...
 

Detailed Description

Class encapsulating framework's data layer. Its functions are responsible for managing shape objects and their serialialization/deserialization. Presentation layer is provided by wxSFShapeCanvas class which tightly cooperates with the shape manager.

An application using wxSF must have at least one shape manager object (one for each diagram) and every shape manager can be assigned as a source to one shape canvas (and vice versa).

Member Enumeration Documentation

◆ SEARCHMODE

Search mode flags for GetShapeAtPosition function.

Enumerator
searchSELECTED 

Search for selected shapes only.

searchUNSELECTED 

Search for unselected shapes only.

searchBOTH 

Search for both selected and unselected shapes.

Constructor & Destructor Documentation

◆ wxSFDiagramManager() [1/2]

wxSFDiagramManager::wxSFDiagramManager ( )

Constructor.

◆ wxSFDiagramManager() [2/2]

wxSFDiagramManager::wxSFDiagramManager ( const wxSFDiagramManager obj)

Copy constructor.

◆ ~wxSFDiagramManager()

virtual wxSFDiagramManager::~wxSFDiagramManager ( )
virtual

Destructor.

Member Function Documentation

◆ _DeserializeObjects()

void wxSFDiagramManager::_DeserializeObjects ( xsSerializable parent,
wxXmlNode *  node 
)
private

Deserialize shapes from XML and assign them to given parent.

Parameters
parentParent shapes
nodeSource XML node

◆ AcceptShape()

void wxSFDiagramManager::AcceptShape ( const wxString &  type)

Add given shape type to an acceptance list. The acceptance list contains class names of the shapes which can be inserted into this instance of shapes canvas. Note: Keyword 'All' behaves like any class name.

Parameters
typeClass name of accepted shape object
See also
IsShapeAccepted

◆ AcceptTopShape()

void wxSFDiagramManager::AcceptTopShape ( const wxString &  type)

Add given shape type to list of accepted top shapes. The acceptance list contains class names of the shapes which can be inserted into this instance of shapes canvas as a shape without any parent (i.e. shape placed directly onto the canvas). Note: Keyword 'All' behaves like any class name.

Parameters
typeClass name of accepted shape object
See also
IstopShapeAccepted

◆ AddShape() [1/3]

wxSFShapeBase* wxSFDiagramManager::AddShape ( wxClassInfo *  shapeInfo,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Create new shape and add it to the shape canvas.

Parameters
shapeInfoShape type
saveStateSet the parameter TRUE if you wish to save canvas state after the operation
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Pointer to new shape object. The object is added to the shape canvas automaticaly.

◆ AddShape() [2/3]

wxSFShapeBase* wxSFDiagramManager::AddShape ( wxClassInfo *  shapeInfo,
const wxPoint &  pos,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Create new shape and add it to the shape canvas.

Parameters
shapeInfoShape type
posShape position
saveStateSet the parameter TRUE if you wish to save canvas state after the operation
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Description
See also
Seealso

◆ AddShape() [3/3]

wxSFShapeBase* wxSFDiagramManager::AddShape ( wxSFShapeBase shape,
xsSerializable parent,
const wxPoint &  pos,
bool  initialize,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Add an existing shape to the canvas.

Parameters
shapePointer to the shape
parentPointer to the parent shape
posPosition
initializeTRUE if the shape should be reinitilialized, otherwise FALSE
saveStateTRUE if the canvas state should be saved
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Pointer to the shape

◆ Clear()

void wxSFDiagramManager::Clear ( )

Remove all shapes from canvas.

◆ ClearAcceptedShapes()

void wxSFDiagramManager::ClearAcceptedShapes ( )
inline

Clear shape object acceptance list.

See also
AcceptShape

◆ ClearAcceptedTopShapes()

void wxSFDiagramManager::ClearAcceptedTopShapes ( )
inline

Clear top shapes acceptance list.

See also
AcceptShape

◆ CreateConnection() [1/3]

wxSFShapeBase* wxSFDiagramManager::CreateConnection ( long  srcId,
long  trgId,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Create new direct connection between two shapes.

This function creates new simple connection line (without arrows) between gived shapes.

Parameters
srcIdID of a source shape
trgIdID of target shape
saveStateSet the parameter TRUE if you wish to save canvas state after the operation
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Pointer to new connection object. The object is added to the shape canvas automaticaly.
See also
StartInteractiveConnection

◆ CreateConnection() [2/3]

wxSFShapeBase* wxSFDiagramManager::CreateConnection ( long  srcId,
long  trgId,
wxClassInfo *  lineInfo,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Create new direct connection of given type between two shapes.

This function creates new simple connection line (without arrows) between gived shapes.

Parameters
srcIdID of a source shape
trgIdID of target shape
lineInfoConnection type (any class inherited from wxSFLineShape)
saveStateSet the parameter TRUE if you wish to save canvas state after the operation
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Pointer to new connection object. The object is added to the shape canvas automaticaly.
See also
StartInteractiveConnection

◆ CreateConnection() [3/3]

wxSFShapeBase* wxSFDiagramManager::CreateConnection ( long  srcId,
long  trgId,
wxSFLineShape line,
bool  saveState = true,
wxSF::ERRCODE err = NULL 
)

Create new direct connection of given type between two shapes.

This function creates new simple connection line (without arrows) between gived shapes.

Parameters
srcIdID of a source shape
trgIdID of target shape
linePointer to line shape
saveStateSet the parameter TRUE if you wish to save canvas state after the operation
errPointer to variable where operation result will be stored. Can be NULL.
Returns
Pointer to new connection object. The object is added to the shape canvas automaticaly.
See also
StartInteractiveConnection

◆ DeserializeFromXml() [1/2]

virtual bool wxSFDiagramManager::DeserializeFromXml ( const wxString &  file)
virtual

Deserialize complete shape canvas from given file.

Parameters
fileInput file
Returns
TRUE on success, otherwise FALSE

Reimplemented from wxXmlSerializer.

◆ DeserializeFromXml() [2/2]

virtual bool wxSFDiagramManager::DeserializeFromXml ( wxInputStream &  instream)
virtual

Deserialize complete shape canvas from given input stream.

Parameters
instreamInput stream
Returns
TRUE on success, otherwise FALSE

Reimplemented from wxXmlSerializer.

◆ DeserializeObjects()

virtual void wxSFDiagramManager::DeserializeObjects ( xsSerializable parent,
wxXmlNode *  node 
)
virtual
\brief Deserialize shapes from XML and assign them to given parent.

The parent can be NULL (in that case topmost shapes will have no parent assigned).

Parameters
parentParent shapes
nodeSource XML node

Reimplemented from wxXmlSerializer.

◆ FindShape()

wxSFShapeBase* wxSFDiagramManager::FindShape ( long  id)

Find shape with given ID.

Parameters
idShape's ID
Returns
Pointer to shape if exists, otherwise NULL

◆ GetAcceptedShapes()

wxArrayString& wxSFDiagramManager::GetAcceptedShapes ( )
inline

Get reference to shape acceptance list.

◆ GetAcceptedTopShapes()

wxArrayString& wxSFDiagramManager::GetAcceptedTopShapes ( )
inline

Get reference to top shapes acceptance list.

◆ GetAssignedConnections()

void wxSFDiagramManager::GetAssignedConnections ( wxSFShapeBase parent,
wxClassInfo *  shapeInfo,
wxSFShapeBase::CONNECTMODE  mode,
ShapeList &  lines 
)

Get list of connections assigned to given parent shape.

Parameters
parentPointer to parent shape
shapeInfoLine object type
modeSearch mode
linesReference to shape list where pointers to all found connections will be stored
See also
wxSFShapeBase::CONNECTMODE

◆ GetNeighbours()

void wxSFDiagramManager::GetNeighbours ( wxSFShapeBase parent,
ShapeList &  neighbours,
wxClassInfo *  shapeInfo,
wxSFShapeBase::CONNECTMODE  condir,
bool  direct = true 
)

Get neighbour shapes connected to given parent shape.

Parameters
parentPointer to parent shape (can be NULL for all topmost shapes)
neighboursList of neighbour shapes
shapeInfoLine object type
condirConnection direction
directSet 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)
See also
wxSFShapeBase::CONNECTMODE

◆ GetShapeAtPosition()

wxSFShapeBase* wxSFDiagramManager::GetShapeAtPosition ( const wxPoint &  pos,
int  zorder = 1,
SEARCHMODE  mode = searchBOTH 
)

Get shape at given logical position.

Parameters
posLogical position
zorderZ-order of searched shape (usefull if several shapes are located at the given position)
modeSearch mode
Returns
Pointer to shape if found, otherwise NULL
See also
SEARCHMODE, wxSFShapeCanvas::DP2LP,, wxSFShapeCanvas::GetShapeUnderCursor

◆ GetShapeCanvas()

wxSFShapeCanvas* wxSFDiagramManager::GetShapeCanvas ( )
inline

Get associated shape canvas.

Returns
Pointer to shape canvas

◆ GetShapes()

void wxSFDiagramManager::GetShapes ( wxClassInfo *  shapeInfo,
ShapeList &  shapes,
xsSerializable::SEARCHMODE  mode = xsSerializable::searchBFS 
)

Get list of shapes of given type.

Parameters
shapeInfoShape object type
shapesReference to shape list where pointers to all found shapes will be stored
modeSearch algorithm
See also
xsSerializable::SEARCHMODE

◆ GetShapesAtPosition()

void wxSFDiagramManager::GetShapesAtPosition ( const wxPoint &  pos,
ShapeList &  shapes 
)

Get list of all shapes located at given position.

Parameters
posLogical position
shapesReference to shape list where pointers to all found shapes will be stored
See also
wxSFShapeCanvas::DP2LP

◆ GetShapesInside()

void wxSFDiagramManager::GetShapesInside ( const wxRect &  rct,
ShapeList &  shapes 
)

Get list of shapes located inside given rectangle.

Parameters
rctExamined rectangle
shapesReference to shape list where pointers to all found shapes will be stored

◆ GetVersion()

const wxString& wxSFDiagramManager::GetVersion ( ) const
inline

Get wxShapeFramework version number.

◆ HasChildren()

bool wxSFDiagramManager::HasChildren ( wxSFShapeBase parent)

Function finds out whether given shape has some children.

Parameters
parentPointer to potential parent shape
Returns
TRUE if the parent shape has children, otherwise FALSE

◆ IsEmpty()

bool wxSFDiagramManager::IsEmpty ( ) const
inline

Determines whether the diagram manager contains some shapes.

Returns
TRUE if there are no shapes in the manager, otherwise FALSE

◆ IsModified()

bool wxSFDiagramManager::IsModified ( )
inline

Get information about managed diagram's modification.

The function returns TRUE if the diagram has been modified and its content should be saved. The modification flag is cleared when the content is saved.

Returns
TRUE if managed diagram is modified, othwerwise FALSE.

◆ IsShapeAccepted()

bool wxSFDiagramManager::IsShapeAccepted ( const wxString &  type)

Tells whether the given shape type is accepted by this canvas instance (it means whether this shape can be inserted into it).

The function is typically used by the framework for determination whether class type supplied by AddShape() function can be inserted into shape canvas.

Parameters
typeClass name of examined shape object
Returns
TRUE if the shape type is accepted, otherwise FALSE.

◆ IsTopShapeAccepted()

bool wxSFDiagramManager::IsTopShapeAccepted ( const wxString &  type)

Tells whether the given shape type is accepted by this canvas instance as a top shape (it means whether this shape can be inserted directly into it without any parent).

The function is typically used by the framework for determination whether class type supplied by AddShape() function can be inserted direclty onto shape canvas.

Parameters
typeClass name of examined shape object
Returns
TRUE if the shape type is accepted, otherwise FALSE.

◆ MoveShapesFromNegatives()

void wxSFDiagramManager::MoveShapesFromNegatives ( )

Move all shapes so none of it will be located in negative position.

◆ RemoveShape()

void wxSFDiagramManager::RemoveShape ( wxSFShapeBase shape,
bool  refresh = true 
)

Remove given shape from the shape canvas. The shape object will be deleted as well.

Parameters
shapePointer to shape object should be deleted
refreshSet the paramater to TRUE if you wish to repaint the canvas

◆ RemoveShapes()

void wxSFDiagramManager::RemoveShapes ( const ShapeList &  selection)

Remove shapes from the shape canvas.

Parameters
selectionList of shapes which should be removed from the canvas

◆ SerializeToXml() [1/2]

virtual bool wxSFDiagramManager::SerializeToXml ( const wxString &  file,
bool  withroot = false 
)
virtual

Serialize complete shape canvas to given file.

Parameters
fileOutput file
withrootIf TRUE then the root item's properties are serialized as well
Returns
TRUE on success, otherwise FALSE

Reimplemented from wxXmlSerializer.

◆ SerializeToXml() [2/2]

virtual bool wxSFDiagramManager::SerializeToXml ( wxOutputStream &  outstream,
bool  withroot = false 
)
virtual

Serialize complete shape canvas to given output stream.

Parameters
outstreamOutput stream
withrootIf TRUE then the root item's properties are serialized as well
Returns
TRUE on success, otherwise FALSE

Reimplemented from wxXmlSerializer.

◆ SetModified()

void wxSFDiagramManager::SetModified ( bool  state)
inline

Set diagram's modification flag manually.

Parameters
stateState of diagram's modification flag.

◆ SetShapeCanvas()

void wxSFDiagramManager::SetShapeCanvas ( wxSFShapeCanvas canvas)
inline

Set associated shape canvas.

Parameters
canvasPointer to shape canvas

◆ UpdateAll()

void wxSFDiagramManager::UpdateAll ( )

Update all shapes in the diagram manager.

◆ UpdateConnections()

void wxSFDiagramManager::UpdateConnections ( )
private

Update connection shapes after importing/dropping of new shapes.

◆ UpdateGrids()

void wxSFDiagramManager::UpdateGrids ( )
private

Update grid shapes after importing/dropping of new shapes.

◆ XS_DECLARE_CLONABLE_CLASS()

wxSFDiagramManager::XS_DECLARE_CLONABLE_CLASS ( wxSFDiagramManager  )

Member Data Documentation

◆ m_arrAcceptedShapes

wxArrayString wxSFDiagramManager::m_arrAcceptedShapes
protected

List of accepted shape types.

◆ m_arrAcceptedTopShapes

wxArrayString wxSFDiagramManager::m_arrAcceptedTopShapes
protected

List of accepted top shape types.

◆ m_fIsModified

bool wxSFDiagramManager::m_fIsModified
private

◆ m_lstGridsForUpdate

ShapeList wxSFDiagramManager::m_lstGridsForUpdate
private

Auxiliary list.

◆ m_lstIDPairs

IDList wxSFDiagramManager::m_lstIDPairs
private

Auxiliary list.

◆ m_lstLinesForUpdate

ShapeList wxSFDiagramManager::m_lstLinesForUpdate
private

Auxiliary list.

◆ m_pShapeCanvas

wxSFShapeCanvas* wxSFDiagramManager::m_pShapeCanvas
protected

◆ m_sSFVersion

wxString wxSFDiagramManager::m_sSFVersion
private

wxSF version number


The documentation for this class was generated from the following file: