GRE::LABELPLACE Class Reference

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

#include <gre/labelplacement.h>

List of all members.

Public Member Functions

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 (GRE_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
GRE_LAYERGetLayer () const
const DPOINT2DGetOffset () 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
bool HasPoint () const
bool HasText () const
bool IsAttached (const RVC::ELEMENT &elem) const
bool IsAttached (ELEMTYPE ElemType, INT32 ElemNum) const
bool IsLocked () const
 LABELPLACE (const LABELPLACE &rhs)
 LABELPLACE ()
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 SetPoint (const DPOINT2D &location)
void SetPointStyle (const POINTSTYLE &style)
void SetPointSymbol (const RVC::STYLE::SYMBOLPATTERN &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)
 ~LABELPLACE ()

Private Attributes

bool m_bCopyOnWrite
PRIV * m_priv


Detailed Description

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

Other things we may need in this class: Flag to disallow moving - script for stacking label flags would want to prevent the optimizer from moving labels.

Definition at line 190 of file labelplacement.h.


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 GRE_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
 

GRE_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)

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
 

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]
 

Definition at line 369 of file labelplacement.h.

void GRE::LABELPLACE::SetDrawBaseLine bool  draw = true  ) 
 

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::STYLE::SYMBOLPATTERN 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  ) 
 


Member Data Documentation

bool GRE::LABELPLACE::m_bCopyOnWrite [private]
 

Definition at line 464 of file labelplacement.h.

PRIV* GRE::LABELPLACE::m_priv [private]
 

Definition at line 463 of file labelplacement.h.


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:29:33 2006 for TNTsdk by  doxygen 1.3.8-20040913