GRE::LABELPLACE Class Reference

Class for keeping track of where a label is on the display. More...

#include <gre/labelplacement.h>

List of all members.

Public Member Functions

 LABELPLACE (const LABELPLACE &rhs)
 LABELPLACE ()
 ~LABELPLACE ()
void AddAttachment (const RVC::ELEMENT &element)
void AddAttachment (const LABELATTACHMENT &attachment)
void ComputeLabelExtents (MGD::CONTEXT *gc, REGION2D &region, bool bIgnoreLeaders=false) const
void DeleteAttachment (const RVC::ELEMENT &element)
void Detach ()
ERRVALUE Draw (LAYERDC *pDC, const COLOR *ForegroundColor=0) const
ERRVALUE DrawSample (MGD::CONTEXT &gc, const COLOR *ForegroundColor=0, bool bDrawLeaders=true) const
const MILIST< LABELATTACHMENT > & GetAttachments () const
double GetBaseAngle () const
const POLYLINEGetBaseLine () const
bool GetBaseLineStyle (LINESTYLE &) const
TEXTBASEORIGIN GetBaseOrigin () const
const DPOINT2DGetBasePoint () const
bool GetDrawBaseLine () const
LAYERGetLayer () const
const DPOINT2DGetOffset () const
GRE::LABELPLACEMENTGetParent () const
const POINTSTYLEGetPointStyle () const
const SIMPLE_ARRAY< UINT8 > & GetPointSymbol () const
double GetPriority () const
const REGION2DGetRegion () const
const LABELSTYLEGetStyle () const
const DPOINT2DGetSymbolPoint () const
const MISTRINGGetText () const
const MIUNICODEGetUserString () const
bool HasPoint () const
bool HasText () const
bool IsAttached (const RVC::ELEMENT &elem) const
bool IsAttached (ELEMTYPE ElemType, INT32 ElemNum) const
bool IsLocked () const
void LockPosition (bool locked=true)
void Move (const DPOINT2D &delta)
LABELPLACEoperator= (const LABELPLACE &rhs)
void SetBaseLine (const DPOINT2D &pt, double angle, TEXTBASEORIGIN origin)
void SetBaseLine (const POLYLINE &baseline)
void SetBaseLineStyle (const LINESTYLE &style)
void SetCopyOnWrite (bool bCopyOnWrite=true)
void SetDrawBaseLine (bool draw=true)
void SetID (INT32 id)
void SetParent (GRE::LABELPLACEMENT *parent)
void SetPoint (const DPOINT2D &location)
void SetPointStyle (const POINTSTYLE &style)
void SetPointSymbol (const RVC::STYLEPATTERN_BASE &symbol)
void SetPointSymbol (const SIMPLE_ARRAY< UINT8 > &symbol)
void SetPriority (double priority)
void SetRegion (const REGION2D &region)
void SetStyle (const LABELSTYLE &style)
void SetText (const MISTRING &str)
void SetUserString (const MISTRING &str)
void Zoom (double scale)

Detailed Description

Class for keeping track of where a label is on the display.


Constructor & Destructor Documentation

GRE::LABELPLACE::LABELPLACE (  ) 

Default constructor.

GRE::LABELPLACE::LABELPLACE ( const LABELPLACE rhs  ) 

Copy constructor.

GRE::LABELPLACE::~LABELPLACE (  ) 

Member Function Documentation

void GRE::LABELPLACE::AddAttachment ( const RVC::ELEMENT element  ) 

Add an element attachment for this label (no leader line).

void GRE::LABELPLACE::AddAttachment ( const LABELATTACHMENT attachment  ) 

Add an element attachment for this label.

void GRE::LABELPLACE::ComputeLabelExtents ( MGD::CONTEXT gc,
REGION2D region,
bool  bIgnoreLeaders = false 
) const
void GRE::LABELPLACE::DeleteAttachment ( const RVC::ELEMENT element  ) 

Remove the attachment information for a given element.

void GRE::LABELPLACE::Detach (  ) 
ERRVALUE GRE::LABELPLACE::Draw ( LAYERDC pDC,
const COLOR ForegroundColor = 0 
) const

Draw a label into a view.

Parameters:
pDC layer DC to use (if NULL, will create a temporary one - not very efficient, but ok for datatips and such)
ForegroundColor Overrides Foreground color if not NULL
ERRVALUE GRE::LABELPLACE::DrawSample ( MGD::CONTEXT gc,
const COLOR ForegroundColor = 0,
bool  bDrawLeaders = true 
) const

Draw a label into an arbitrary device.

Parameters:
ForegroundColor Overrides Foreground color if not NULL
const MILIST<LABELATTACHMENT>& GRE::LABELPLACE::GetAttachments (  )  const

Get the list of attachments.

double GRE::LABELPLACE::GetBaseAngle (  )  const
const POLYLINE& GRE::LABELPLACE::GetBaseLine (  )  const
bool GRE::LABELPLACE::GetBaseLineStyle ( LINESTYLE  )  const

Get the line style for drawing the baseline.

Returns:
true if line style has been set, false if not
TEXTBASEORIGIN GRE::LABELPLACE::GetBaseOrigin (  )  const
const DPOINT2D& GRE::LABELPLACE::GetBasePoint (  )  const
bool GRE::LABELPLACE::GetDrawBaseLine (  )  const
LAYER* GRE::LABELPLACE::GetLayer (  )  const

Get the layer for this label.

Note: you don't have to set the layer because LABLEPLACEMENT::Add does it for you.

const DPOINT2D& GRE::LABELPLACE::GetOffset (  )  const

Get the offset from the original location.

If the optimizer is not run, this will return a (0,0)

GRE::LABELPLACEMENT* GRE::LABELPLACE::GetParent (  )  const
const POINTSTYLE& GRE::LABELPLACE::GetPointStyle (  )  const

Get the POINTSTYLE to use for the symbol.

const SIMPLE_ARRAY<UINT8>& GRE::LABELPLACE::GetPointSymbol (  )  const

Get the symbol data for the point symbol.

double GRE::LABELPLACE::GetPriority (  )  const

Get the priority used in label optimization Higher numbers are higher priority.

const REGION2D& GRE::LABELPLACE::GetRegion (  )  const

Return the region of the actual label.

const LABELSTYLE& GRE::LABELPLACE::GetStyle (  )  const
const DPOINT2D& GRE::LABELPLACE::GetSymbolPoint (  )  const

Get the location of the point symbol (if any) in screen coordinates.

const MISTRING& GRE::LABELPLACE::GetText (  )  const
const MIUNICODE* GRE::LABELPLACE::GetUserString (  )  const
bool GRE::LABELPLACE::HasPoint (  )  const

Returns true if the place holds point symbol information.

bool GRE::LABELPLACE::HasText (  )  const

Returns true if the place holds text label information.

bool GRE::LABELPLACE::IsAttached ( const RVC::ELEMENT elem  )  const

Returns true if the label is attached to the given element.

bool GRE::LABELPLACE::IsAttached ( ELEMTYPE  ElemType,
INT32  ElemNum 
) const

Returns true if the label is attached to the given element.

bool GRE::LABELPLACE::IsLocked (  )  const

Return true if label is locked.

When deconflicting labels, locked labels are not allowed to move.

void GRE::LABELPLACE::LockPosition ( bool  locked = true  ) 

Lock a label in place.

This prevents deconflicting from being able to move the label.

void GRE::LABELPLACE::Move ( const DPOINT2D delta  ) 

Move a label a given ammount.

LABELPLACE& GRE::LABELPLACE::operator= ( const LABELPLACE rhs  ) 

Assignment operator.

void GRE::LABELPLACE::SetBaseLine ( const DPOINT2D pt,
double  angle,
TEXTBASEORIGIN  origin 
)
void GRE::LABELPLACE::SetBaseLine ( const POLYLINE baseline  ) 
void GRE::LABELPLACE::SetBaseLineStyle ( const LINESTYLE style  ) 

Set the style for drawing the baseline.

void GRE::LABELPLACE::SetCopyOnWrite ( bool  bCopyOnWrite = true  )  [inline]
void GRE::LABELPLACE::SetDrawBaseLine ( bool  draw = true  ) 
void GRE::LABELPLACE::SetID ( INT32  id  ) 

Sets the ID in the qtree.

used internally by Move and LABELPLACEMENT Add and Remove

void GRE::LABELPLACE::SetParent ( GRE::LABELPLACEMENT parent  ) 
void GRE::LABELPLACE::SetPoint ( const DPOINT2D location  ) 

Set the location of the point symbol (if any) in screen coordinates.

void GRE::LABELPLACE::SetPointStyle ( const POINTSTYLE style  ) 

Set the POINTSTYLE to use for the symbol.

void GRE::LABELPLACE::SetPointSymbol ( const RVC::STYLEPATTERN_BASE symbol  ) 

Set the symbol data for the point symbol.

void GRE::LABELPLACE::SetPointSymbol ( const SIMPLE_ARRAY< UINT8 > &  symbol  ) 

Set the symbol data for the point symbol.

void GRE::LABELPLACE::SetPriority ( double  priority  ) 

Set the priority used in label optimization Higher numbers are higher priority.

void GRE::LABELPLACE::SetRegion ( const REGION2D region  ) 

Set the extents region of the label.

void GRE::LABELPLACE::SetStyle ( const LABELSTYLE style  ) 
void GRE::LABELPLACE::SetText ( const MISTRING str  ) 
void GRE::LABELPLACE::SetUserString ( const MISTRING str  ) 

For SML script access.

This allows an SML Control Script to attach any string data to the label. The only thing it's useful for is for the script to retrieve later.

void GRE::LABELPLACE::Zoom ( double  scale  ) 

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

Generated on Sun Oct 7 21:34:15 2012 for TNTsdk 2012 by  doxygen 1.6.1