GRE_LEGEND Class Reference

Legend base class. More...

#include <gre/legend.h>

Inheritance diagram for GRE_LEGEND:

Inheritance graph
[legend]
List of all members.

Public Types

typedef MILIST< ITEMBASE * > ITEMLIST

Public Member Functions

virtual ERRVALUE AddElemPrompted (MDLGPARENT dlgparent, const RVC::ELEMENT &element)
bool ContainsElem (const RVC::ELEMENT &element) const
ERRVALUE CreateElemTable (const RVC::OBJECTNAME &TableName, const RVC::OBJECTDESC &TableDesc)
void DeleteAllItems ()
ERRVALUE DeleteElem (const RVC::ELEMENT &element)
void Draw (const DRAWCONTEXT &dc, LPOINT2D &origin) const
ELEMTYPE GetElemType () const
const ITEMLISTGetItemList () const
virtual void GetItemSizeMM (DPOINT2D &size) const
virtual void GetItemSizePixels (LPOINT2D &size) const
GRE_LAYERGetLayer () const
MGD::STYLESAMPLEFLAGS GetSampleFlags () const
LPOINT2D GetSize (const DRAWCONTEXT &dc) const
const RVC::OBJITEMGetStyleObjItem ()
 GRE_LEGEND (GRE_LAYER *layer, ELEMTYPE ElemType)
bool HasElemTable () const
bool HasItems () const
bool IsMergingDuplicateStyles () const
bool IsSorted () const
void SetMergeDuplicateStyles (bool MergeDupStyles=true)
void SetNeedStyleObject (bool NeedStyleObj=true)
void SetSampleFlags (MGD::STYLESAMPLEFLAGS newflags)
void SetSorted (bool sorted=true)
void SetStyleObject (const RVC::OBJITEM &StyleObj)
virtual ~GRE_LEGEND ()

Protected Member Functions

ERRVALUE AddElemRecord (const RVC::ELEMENT &element, const MISTRING &prilabel, const MISTRING &seclabel)
void InsertItem (ITEMBASE *item)
ERRVALUE OpenElemTable (const RVC::OBJECTNAME &ElemTableName)
ERRVALUE OpenStyle (RVC::DBTABLE_STYLE &StyleTable, const RVC::OBJITEM &StyleObjItem, const RVC::OBJITEM &GeoObjItem, RVC::STYLE &StyleObj)
void SetHasMergedStyles ()

Protected Attributes

RVC::DBASE_ELEMENT m_DbObject
RVC::DBTABLE m_ElemTable
RVC::OBJITEM m_GeoObjItem
ITEMLIST m_ItemList

Detailed Description

Legend base class.

Definition at line 32 of file legend.h.


Member Typedef Documentation

typedef MILIST<ITEMBASE*> GRE_LEGEND::ITEMLIST
 

Definition at line 37 of file legend.h.


Constructor & Destructor Documentation

GRE_LEGEND::GRE_LEGEND GRE_LAYER layer,
ELEMTYPE  ElemType
[explicit]
 

Constructor.

virtual GRE_LEGEND::~GRE_LEGEND  )  [virtual]
 

Destructor.


Member Function Documentation

virtual ERRVALUE GRE_LEGEND::AddElemPrompted MDLGPARENT  dlgparent,
const RVC::ELEMENT element
[virtual]
 

Add element to legend 'element table' with prompt for label(s).

Parameters:
dlgparent  Parent for dialog
element  Element to add

Reimplemented in GRE_LEGEND_POINT, GRE_LEGEND_LINE, and GRE_LEGEND_POLY.

ERRVALUE GRE_LEGEND::AddElemRecord const RVC::ELEMENT element,
const MISTRING prilabel,
const MISTRING seclabel
[protected]
 

bool GRE_LEGEND::ContainsElem const RVC::ELEMENT element  )  const
 

Determine if legend 'element table' contains specified element.

Parameters:
element  Element

ERRVALUE GRE_LEGEND::CreateElemTable const RVC::OBJECTNAME TableName,
const RVC::OBJECTDESC TableDesc
 

Create 'element table' if don't already have one attached.

Parameters:
TableName  Name of table to create
TableDesc  Description of table to create

void GRE_LEGEND::DeleteAllItems  ) 
 

Delete all items from the legend.

ERRVALUE GRE_LEGEND::DeleteElem const RVC::ELEMENT element  ) 
 

Delete element from legend 'element table'.

Parameters:
element  Element

void GRE_LEGEND::Draw const DRAWCONTEXT dc,
LPOINT2D origin
const
 

Draw entire legend.

Parameters:
dc  Legend drawing context
origin  Origin passed / returned

ELEMTYPE GRE_LEGEND::GetElemType  )  const [inline]
 

Return element type legend is for.

Definition at line 84 of file legend.h.

const ITEMLIST& GRE_LEGEND::GetItemList  )  const [inline]
 

Get legend item list.

Definition at line 88 of file legend.h.

virtual void GRE_LEGEND::GetItemSizeMM DPOINT2D size  )  const [virtual]
 

Get "preferred" item size in millimeters.

Parameters:
size  Size in millimeters returned, not including labels

virtual void GRE_LEGEND::GetItemSizePixels LPOINT2D size  )  const [virtual]
 

Get "preferred" item size in pixels.

This is used for rendering legend in user interface (ie. LegendView).

Parameters:
size  Size in pixels returned, not including labels

Reimplemented in GRE_LEGEND_COLORSCALE, and GRE_LAYER_RASTER::LEGEND_IMAGESAMPLE.

GRE_LAYER* GRE_LEGEND::GetLayer  )  const [inline]
 

Return layer legend is associated with.

Definition at line 103 of file legend.h.

MGD::STYLESAMPLEFLAGS GRE_LEGEND::GetSampleFlags  )  const [inline]
 

Return flags for sample style rendering.

Returns:
Flags for sample style rendering.

Definition at line 108 of file legend.h.

LPOINT2D GRE_LEGEND::GetSize const DRAWCONTEXT dc  )  const
 

Get size of legend given sample item height and width.

Returns:
Size of legend given sample item height and width.
Parameters:
dc  Legend drawing context

const RVC::OBJITEM& GRE_LEGEND::GetStyleObjItem  )  [inline]
 

Get reference to style object item used by legend.

Definition at line 118 of file legend.h.

bool GRE_LEGEND::HasElemTable  )  const [inline]
 

Determine if legend has associated 'element table'.

Definition at line 122 of file legend.h.

bool GRE_LEGEND::HasItems  )  const [inline]
 

Determine if legend has any items.

Definition at line 126 of file legend.h.

void GRE_LEGEND::InsertItem ITEMBASE item  )  [protected]
 

Parameters:
item  Item to insert

bool GRE_LEGEND::IsMergingDuplicateStyles  )  const [inline]
 

Determine if duplicate styles are being merged as items are added.

Definition at line 130 of file legend.h.

bool GRE_LEGEND::IsSorted  )  const [inline]
 

Determine if legend is sorted by label strings.

Definition at line 134 of file legend.h.

ERRVALUE GRE_LEGEND::OpenElemTable const RVC::OBJECTNAME ElemTableName  )  [protected]
 

ERRVALUE GRE_LEGEND::OpenStyle RVC::DBTABLE_STYLE StyleTable,
const RVC::OBJITEM StyleObjItem,
const RVC::OBJITEM GeoObjItem,
RVC::STYLE StyleObj
[protected]
 

void GRE_LEGEND::SetHasMergedStyles  )  [inline, protected]
 

Definition at line 191 of file legend.h.

void GRE_LEGEND::SetMergeDuplicateStyles bool  MergeDupStyles = true  )  [inline]
 

Set whether to merge duplicate styles.

Definition at line 138 of file legend.h.

void GRE_LEGEND::SetNeedStyleObject bool  NeedStyleObj = true  )  [inline]
 

Set whether a style object is needed.

Definition at line 143 of file legend.h.

void GRE_LEGEND::SetSampleFlags MGD::STYLESAMPLEFLAGS  newflags  )  [inline]
 

Set sample flags.

Definition at line 148 of file legend.h.

void GRE_LEGEND::SetSorted bool  sorted = true  )  [inline]
 

Set whether should be sorted by labels.

Must be done before adding items.

Definition at line 154 of file legend.h.

void GRE_LEGEND::SetStyleObject const RVC::OBJITEM StyleObj  ) 
 

Set style object to use for legend using RVC::OBJITEM reference.


Member Data Documentation

RVC::DBASE_ELEMENT GRE_LEGEND::m_DbObject [protected]
 

Definition at line 167 of file legend.h.

RVC::DBTABLE GRE_LEGEND::m_ElemTable [protected]
 

Definition at line 168 of file legend.h.

RVC::OBJITEM GRE_LEGEND::m_GeoObjItem [protected]
 

Definition at line 166 of file legend.h.

ITEMLIST GRE_LEGEND::m_ItemList [protected]
 

List of legend items.

Definition at line 165 of file legend.h.


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