wxShapeFramework
1.13.0 beta
|
Class implements automatic diagram layout. The class allows to automatically layout shapes included in diagram manager/shape canvas/list of shapes by using several pre-defined layouting algorithms. The class should be used as it is. More...
#include <AutoLayout.h>
Public Member Functions | |
wxSFAutoLayout () | |
Constructor. More... | |
~wxSFAutoLayout () | |
Destructor. More... | |
void | Layout (ShapeList &shapes, const wxString &algname) |
Layout shapes included in given list. More... | |
void | Layout (wxSFDiagramManager &manager, const wxString &algname) |
Layout shapes included in given diagram manager. More... | |
void | Layout (wxSFShapeCanvas *canvas, const wxString &algname) |
Layout shapes included in given shape canvas. More... | |
wxArrayString | GetRegisteredAlgorithms () |
Get string list containing names of registered layouting algorithms. More... | |
wxSFLayoutAlgorithm * | GetAlgorithm (const wxString &algname) |
Get pointer to registered layouting algorithm. More... | |
Static Public Member Functions | |
static bool | RegisterLayoutAlgorithm (const wxString &algname, wxSFLayoutAlgorithm *alg) |
Register custom layouting algorithm (class derived from wxSFLayoutAlgorithm). More... | |
static void | CleanUp () |
Clean up registered layouting algorithms. Must be called at application deinitialization if wxSFAutoLayout were used in the program. More... | |
Protected Member Functions | |
void | InitializeAllAlgorithms () |
Register all pre-defined layouting algorithms. The function is called from wxSFAutoLayout class constructor. More... | |
void | UpdateCanvas (wxSFShapeCanvas *canvas) |
Update given shape canvas. More... | |
Static Protected Attributes | |
static LayoutAlgoritmMap | m_mapAlgorithms |
Class implements automatic diagram layout. The class allows to automatically layout shapes included in diagram manager/shape canvas/list of shapes by using several pre-defined layouting algorithms. The class should be used as it is.
wxSFAutoLayout::wxSFAutoLayout | ( | ) |
Constructor.
wxSFAutoLayout::~wxSFAutoLayout | ( | ) |
Destructor.
|
static |
Clean up registered layouting algorithms. Must be called at application deinitialization if wxSFAutoLayout were used in the program.
|
inline |
Get pointer to registered layouting algorithm.
algname | Algorithm name |
wxArrayString wxSFAutoLayout::GetRegisteredAlgorithms | ( | ) |
Get string list containing names of registered layouting algorithms.
|
protected |
Register all pre-defined layouting algorithms. The function is called from wxSFAutoLayout class constructor.
void wxSFAutoLayout::Layout | ( | ShapeList & | shapes, |
const wxString & | algname | ||
) |
Layout shapes included in given list.
shapes | List of shapes |
algname | Algorithm name |
void wxSFAutoLayout::Layout | ( | wxSFDiagramManager & | manager, |
const wxString & | algname | ||
) |
Layout shapes included in given diagram manager.
manager | Reference to diagram manager |
algname | Algorithm name |
void wxSFAutoLayout::Layout | ( | wxSFShapeCanvas * | canvas, |
const wxString & | algname | ||
) |
Layout shapes included in given shape canvas.
canvas | Pointer to shape canvas |
algname |
|
static |
Register custom layouting algorithm (class derived from wxSFLayoutAlgorithm).
algname | Algorithm name |
alg | Pointer to class encapsulating the layouting algorithm |
|
protected |
Update given shape canvas.
canvas |
|
staticprotected |