GRE::LEGEND Class Reference

Legend base class. More...

#include <gre/legend.h>

Inheritance diagram for GRE::LEGEND:
Inheritance graph
[legend]

List of all members.

Classes

class  DRAWCONTEXT
 Context for legend item drawing. More...
class  ITEMBASE
 End of LEGEND::DRAWCONTEXT class. More...

Public Types

typedef MILIST< ITEMBASE * > ITEMLIST

Public Member Functions

 LEGEND (GRE::LAYER *layer, ELEMTYPE ElemType)
virtual ~LEGEND ()
ERRVALUE AddElemPrompted (MDLGPARENT dlgparent, const RVC::ELEMENT &element)
bool ContainsElem (const RVC::ELEMENT &element) const
ERRVALUE CreateElemTable (const RVC::DESCRIPTOR &descriptor)
void DeleteAllItems ()
ERRVALUE DeleteElem (const RVC::ELEMENT &element)
void Draw (const DRAWCONTEXT &dc, LPOINT2D &origin) const
const COLORGetBackgroundColor () const
ELEMTYPE GetElemType () const
const ITEMLISTGetItemList () const
void GetItemSizePixels (LPOINT2D &size) const
GRE::LAYERGetLayer () const
bool GetNeedStyleObject () const
MGD::STYLESAMPLEFLAGS GetSampleFlags () const
LPOINT2D GetSize (const DRAWCONTEXT &dc) const
const RVC::OBJITEMGetStyleObjItem ()
bool HasElemTable () const
bool HasItems () const
bool IsMergingDuplicateStyles () const
bool IsSorted () const
void SetBackgroundColor (const COLOR &color)
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)
MGUI::CTRL_TREE::ITEMHND TreeViewInsertItems (GRE::CTRL_TREEVIEW &TreeView, MGUI::CTRL_TREE::ITEMHND hParent, MGUI::CTRL_TREE::ITEMHND hInsertAfter)

Static Public Member Functions

static void SetDftBackgroundColor (const COLOR &color)

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::OBJITEM m_GeoObjItem
ITEMLIST m_ItemList
RVC::DBASE_ELEMENTm_pDbObject
RVC::DBTABLEm_pElemTable

Private Member Functions

virtual ERRVALUE v_AddElemPrompted (MDLGPARENT dlgparent, const RVC::ELEMENT &element)
virtual void v_GetItemSizePixels (LPOINT2D &size) const

Detailed Description

Legend base class.


Member Typedef Documentation


Constructor & Destructor Documentation

GRE::LEGEND::LEGEND ( GRE::LAYER layer,
ELEMTYPE  ElemType 
) [explicit]

Constructor.

virtual GRE::LEGEND::~LEGEND (  )  [virtual]

Destructor.


Member Function Documentation

ERRVALUE GRE::LEGEND::AddElemPrompted ( MDLGPARENT  dlgparent,
const RVC::ELEMENT element 
) [inline]

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

Parameters:
dlgparent Parent for dialog
element Element to add
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::DESCRIPTOR descriptor  ) 

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

Parameters:
descriptor Table descriptor
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
const COLOR& GRE::LEGEND::GetBackgroundColor (  )  const [inline]
ELEMTYPE GRE::LEGEND::GetElemType (  )  const [inline]

Return element type legend is for.

const ITEMLIST& GRE::LEGEND::GetItemList (  )  const [inline]

Get legend item list.

void GRE::LEGEND::GetItemSizePixels ( LPOINT2D size  )  const [inline]

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
GRE::LAYER* GRE::LEGEND::GetLayer (  )  const [inline]

Return layer legend is associated with.

bool GRE::LEGEND::GetNeedStyleObject (  )  const [inline]

Determine if set as needing style object.

MGD::STYLESAMPLEFLAGS GRE::LEGEND::GetSampleFlags (  )  const [inline]

Return flags for sample style rendering.

Returns:
Flags for sample style rendering.
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.

bool GRE::LEGEND::HasElemTable (  )  const

Determine if legend has associated 'element table'.

bool GRE::LEGEND::HasItems (  )  const [inline]

Determine if legend has any items.

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.

bool GRE::LEGEND::IsSorted (  )  const [inline]

Determine if legend is sorted by label strings.

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::SetBackgroundColor ( const COLOR color  )  [inline]

Set background color.

static void GRE::LEGEND::SetDftBackgroundColor ( const COLOR color  )  [inline, static]

Set default background color.

void GRE::LEGEND::SetHasMergedStyles (  )  [inline, protected]
void GRE::LEGEND::SetMergeDuplicateStyles ( bool  MergeDupStyles = true  )  [inline]

Set whether to merge duplicate styles.

void GRE::LEGEND::SetNeedStyleObject ( bool  NeedStyleObj = true  )  [inline]

Set whether a style object is needed.

void GRE::LEGEND::SetSampleFlags ( MGD::STYLESAMPLEFLAGS  newflags  )  [inline]

Set sample flags.

void GRE::LEGEND::SetSorted ( bool  sorted = true  )  [inline]

Set whether should be sorted by labels.

Must be done before adding items.

void GRE::LEGEND::SetStyleObject ( const RVC::OBJITEM StyleObj  ) 

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

MGUI::CTRL_TREE::ITEMHND GRE::LEGEND::TreeViewInsertItems ( GRE::CTRL_TREEVIEW TreeView,
MGUI::CTRL_TREE::ITEMHND  hParent,
MGUI::CTRL_TREE::ITEMHND  hInsertAfter 
)

Add all legend items to TreeView (MGUI only).

Returns:
Handle for last item inserted.
virtual ERRVALUE GRE::LEGEND::v_AddElemPrompted ( MDLGPARENT  dlgparent,
const RVC::ELEMENT element 
) [private, virtual]

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

Default implementation returns EProgramError.

Parameters:
dlgparent Parent for dialog
element Element to add
virtual void GRE::LEGEND::v_GetItemSizePixels ( LPOINT2D size  )  const [private, 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

Member Data Documentation

List of legend items.


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

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