wxShapeFramework  1.13.0 beta
wxSFLayoutAlgorithm Class Reference

Base class for all layouting algorithms. The class containts one abstract function modifying shapes' layout and several helper functions. More...

#include <AutoLayout.h>

Inheritance diagram for wxSFLayoutAlgorithm:

List of all members.

Public Member Functions

virtual ~wxSFLayoutAlgorithm ()
 Destructor.
virtual void DoLayout (ShapeList &shapes)=0
 Function performing the layout change. All derived classes must implement it.

Protected Member Functions

wxRect GetBoundingBox (const ShapeList &shapes)
 Calculate bounding box surroundig given shapes.
wxSize GetShapesExtent (const ShapeList &shapes)
 Get overall extent of all given shapes calculated as a sum of their width and height.
wxRealPoint GetShapesCenter (const ShapeList &shapes)
 Get center point of given shapes.
wxRealPoint GetTopLeft (const ShapeList &shapes)
 Get top-left point of bounding box surrounding given shapes.

Detailed Description

Base class for all layouting algorithms. The class containts one abstract function modifying shapes' layout and several helper functions.


Constructor & Destructor Documentation

virtual wxSFLayoutAlgorithm::~wxSFLayoutAlgorithm ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void wxSFLayoutAlgorithm::DoLayout ( ShapeList &  shapes) [pure virtual]

Function performing the layout change. All derived classes must implement it.

Parameters:
shapesList of shapes which should be layouted

Implemented in wxSFLayoutMesh, wxSFLayoutHorizontalTree, wxSFLayoutVerticalTree, and wxSFLayoutCircle.

wxRect wxSFLayoutAlgorithm::GetBoundingBox ( const ShapeList &  shapes) [protected]

Calculate bounding box surroundig given shapes.

Parameters:
shapesList of shapes
Returns:
Bounding box
wxRealPoint wxSFLayoutAlgorithm::GetShapesCenter ( const ShapeList &  shapes) [protected]

Get center point of given shapes.

Parameters:
shapesList of shapes
Returns:
Center point
wxSize wxSFLayoutAlgorithm::GetShapesExtent ( const ShapeList &  shapes) [protected]

Get overall extent of all given shapes calculated as a sum of their width and height.

Parameters:
shapesList of shapes
Returns:
Overall shapes extent
wxRealPoint wxSFLayoutAlgorithm::GetTopLeft ( const ShapeList &  shapes) [protected]

Get top-left point of bounding box surrounding given shapes.

Parameters:
shapesList of shapes
Returns:
Top-left point of bounding box surrounding given shapes

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