MGUI::TOOL_MULTIPOINT Class Reference

Multi-Point tool. More...

#include <mgui/toolmultipoint.h>

Inheritance diagram for MGUI::TOOL_MULTIPOINT:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
fastdelegate::FastDelegate
< bool(CHANGESEQ, DPOINT3D &)> 
DELEGATE_ONSETPOINT

Public Member Functions

 TOOL_MULTIPOINT (TOOLCANVAS *canvas)
virtual ~TOOL_MULTIPOINT ()
void AddPoint (const DPOINT3D &pt, bool MakePointActive=true)
void DeletePoint (int index)
DPOINT3D GetActivePoint () const
int GetActivePointIndex () const
int GetNumPoints () const
DPOINT3D GetPoint (int index) const
const POLYLINEGetPoints () const
bool IsActiveValid () const
void SetActivePointIndex (int index)
void SetDelegateOnSetPoint (DELEGATE_ONSETPOINT delegate)
void SetMarker (MARKER marker, UINT16 size=0)
void SetPoint (int index, const DPOINT3D &pt, bool MakePointActive=true)
void SetPoints (const POLYLINE &PointArray)

Detailed Description

Multi-Point tool.


Member Typedef Documentation

typedef fastdelegate::FastDelegate<bool(CHANGESEQ, DPOINT3D&)> MGUI::TOOL_MULTIPOINT::DELEGATE_ONSETPOINT

Constructor & Destructor Documentation

MGUI::TOOL_MULTIPOINT::TOOL_MULTIPOINT ( TOOLCANVAS canvas  )  [explicit]

Constructor.

virtual MGUI::TOOL_MULTIPOINT::~TOOL_MULTIPOINT (  )  [virtual]

Destructor.


Member Function Documentation

void MGUI::TOOL_MULTIPOINT::AddPoint ( const DPOINT3D pt,
bool  MakePointActive = true 
) [inline]

Add a point to the set.

Parameters:
MakePointActive If not already, make this point the active point
void MGUI::TOOL_MULTIPOINT::DeletePoint ( int  index  ) 

Delete a single point.

If the index is out of range the operation is ignored

Parameters:
index Zero-based index of point to delete
DPOINT3D MGUI::TOOL_MULTIPOINT::GetActivePoint (  )  const [inline]

Get active point coordinates.

int MGUI::TOOL_MULTIPOINT::GetActivePointIndex (  )  const [inline]

Get active point array index.

int MGUI::TOOL_MULTIPOINT::GetNumPoints (  )  const [inline]

Get number of points.

DPOINT3D MGUI::TOOL_MULTIPOINT::GetPoint ( int  index  )  const

Get single point.

If the index is out of range the results are unpredictable.

Parameters:
index Zero-based index of point to retrieve
const POLYLINE& MGUI::TOOL_MULTIPOINT::GetPoints (  )  const [inline]

Get points.

bool MGUI::TOOL_MULTIPOINT::IsActiveValid (  )  const [inline]

Determine if "active" point is valid.

void MGUI::TOOL_MULTIPOINT::SetActivePointIndex ( int  index  ) 

Set active point array index.

void MGUI::TOOL_MULTIPOINT::SetDelegateOnSetPoint ( DELEGATE_ONSETPOINT  delegate  )  [inline]

Set delegate to call when a point is added or moved This allows the user of the tool to determine if the point is to be moved and where.

Return 'true' for the delegate to modify the point.

void MGUI::TOOL_MULTIPOINT::SetMarker ( MARKER  marker,
UINT16  size = 0 
)

Set marker type and size.

The default marker is MARKER_Plus with a size of 9 pixels.

Parameters:
marker New marker type
size New marker size, 0 to retain current size
void MGUI::TOOL_MULTIPOINT::SetPoint ( int  index,
const DPOINT3D pt,
bool  MakePointActive = true 
)

Set single point.

If the index is the same as the number of points, the point will be added otherwise if the index is out of range the point is ignored.

Parameters:
index Zero-based index of point to set
pt Point to set
MakePointActive If not already, make this point the active point
void MGUI::TOOL_MULTIPOINT::SetPoints ( const POLYLINE PointArray  ) 

Set the list of points.


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

Generated on Sun Oct 7 21:36:19 2012 for TNTsdk 2012 by  doxygen 1.6.1