MGUI::TOOL_POLYLINE Class Reference

TOOL_POLYLINE - Polyline / polygon tool. More...

#include <toolpoly.h>

Inheritance diagram for MGUI::TOOL_POLYLINE:

Inheritance graph
[legend]
List of all members.

Public Types

enum  EDITMODE {
  EDITMODE_AddEnd, EDITMODE_AddStart, EDITMODE_InsertVertex, EDITMODE_DragVertex,
  EDITMODE_DeleteVertex, EDITMODE_Move
}

Public Member Functions

 TOOL_POLYLINE (TOOLCANVAS *canvas, bool AllowMulti=false)
virtual ~TOOL_POLYLINE ()
const POLYLINEGetActiveLine () const
const MILIST< POLYLINE > & GetLineList () const
int GetNumLines () const
bool Is3D () const
bool IsActiveValid () const
void LockEndPoint (bool locked=true)
void LockStartPoint (bool locked=true)
void Set3D (bool set3d=true)
void SetClosed (bool closed=true)
void SetEditMode (EDITMODE EditMode)
void SetMarkers (MARKER startmarker, MARKER endmarker, UINT16 startmarkersize=0, UINT16 endmarkersize=0)

Protected Member Functions

virtual void v_OnChangeActiveElem ()

Detailed Description

TOOL_POLYLINE - Polyline / polygon tool.

Definition at line 37 of file toolpoly.h.


Member Enumeration Documentation

enum MGUI::TOOL_POLYLINE::EDITMODE
 

Editing modes.

Enumeration values:
EDITMODE_AddEnd  Add vertices to end of active line (default).
EDITMODE_AddStart  Add vertices to start of active line.
EDITMODE_InsertVertex  Insert vertex.
EDITMODE_DragVertex  Drag nearest vertex.
EDITMODE_DeleteVertex  Delete nearest vertex.
EDITMODE_Move  Move active line.

Definition at line 41 of file toolpoly.h.


Constructor & Destructor Documentation

MGUI::TOOL_POLYLINE::TOOL_POLYLINE TOOLCANVAS canvas,
bool  AllowMulti = false
[explicit]
 

Constructor.

Parameters:
canvas  View to contain tool
AllowMulti  Allow multiple lines

virtual MGUI::TOOL_POLYLINE::~TOOL_POLYLINE  )  [virtual]
 

Destructor.


Member Function Documentation

const POLYLINE& MGUI::TOOL_POLYLINE::GetActiveLine  )  const [inline]
 

Get reference to active line.

IsActiveValid() should be used first to determine if the active line is valid. Failure to do so will likely result in an exception.

Definition at line 62 of file toolpoly.h.

const MILIST<POLYLINE>& MGUI::TOOL_POLYLINE::GetLineList  )  const [inline]
 

Get list of lines.

Definition at line 66 of file toolpoly.h.

int MGUI::TOOL_POLYLINE::GetNumLines  )  const [inline]
 

Get number of valid lines.

Definition at line 70 of file toolpoly.h.

bool MGUI::TOOL_POLYLINE::Is3D  )  const [inline]
 

Determine if tool points are 3D.

Definition at line 74 of file toolpoly.h.

bool MGUI::TOOL_POLYLINE::IsActiveValid  )  const [inline]
 

Determine if active line is valid.

In single-line mode the active line is always valid.

Definition at line 79 of file toolpoly.h.

void MGUI::TOOL_POLYLINE::LockEndPoint bool  locked = true  ) 
 

Lock or unlock end point of active line.

Parameters:
locked  'true' to lock, 'false' to unlock

void MGUI::TOOL_POLYLINE::LockStartPoint bool  locked = true  ) 
 

Lock or unlock start point of active line.

Parameters:
locked  'true' to lock, 'false' to unlock

void MGUI::TOOL_POLYLINE::Set3D bool  set3d = true  ) 
 

Set whether points are 3D.

void MGUI::TOOL_POLYLINE::SetClosed bool  closed = true  ) 
 

Set line to draw as "closed".

This only affects how the tool is drawn, it does not add a closing point to the POLYLINE.

void MGUI::TOOL_POLYLINE::SetEditMode EDITMODE  EditMode  ) 
 

Set line editing mode.

Parameters:
EditMode  New editing mode

void MGUI::TOOL_POLYLINE::SetMarkers MARKER  startmarker,
MARKER  endmarker,
UINT16  startmarkersize = 0,
UINT16  endmarkersize = 0
 

Set markers for start and end points.

Parameters:
startmarker  Starting point marker type
endmarker  Ending point marker type
startmarkersize  Starting point marker size, 0 to retain current size
endmarkersize  Ending point marker size, 0 to retain current size

virtual void MGUI::TOOL_POLYLINE::v_OnChangeActiveElem  )  [protected, virtual]
 

Called when "active element" changed.


The documentation for this class was generated from the following file:
Generated on Thu Aug 12 06:28:39 2004 for TNTsdk by doxygen 1.3.4-20031026