GRE::VIEWABLE Class Reference

Base class for objects that can have "views" (GRE::LAYOUT, GRE::GROUP). More...

#include <gre/viewable.h>

Inheritance diagram for GRE::VIEWABLE:

Inheritance graph
GRE::GROUPGRE::LAYOUTGRE::OBJECT
[legend]
List of all members.

Public Member Functions

void ClearMacroScriptList ()
void ClearSaveLocation ()
void ClearToolScriptList ()
ERRVALUE ControlScriptEdit (MDLGPARENT dlgparent)
void DestroyAllViews ()
ERRVALUE DrawAllViews (GRE::DRAWCONDITION condition=GRE::DRAWCONDITION_Always)
virtual GRE::LAYERFindLayerByID (UINT32 LayerID) const =0
MAINSCRIPTGetControlScript ()
double GetDesignScale () const
GRE::HIGHLIGHTMODE GetElemHighlightMode () const
const DRECT2DGetExtents () const
GRE::VIEWGetFirstView () const
virtual void GetFullName (MISTRING &name) const =0
const char * GetIniName () const
GRE::MACROSCRIPTLISTGetMacroScriptList ()
double GetMaxScaleVisibleAny () const
double GetMinScaleVisibleAny () const
virtual UINT32 GetNextLayerID () const=0
const FILEPATHGetSaveFilePath () const
const RVC::OBJITEMGetSaveObjItem () const
virtual ERRVALUE GetSizeMeters (DPOINT2D &sizemeters)=0
GRE::TOOLSCRIPTLISTGetToolScriptList ()
VIEWABLEGetTopViewable ()
const VIEWABLEGetTopViewable () const
GRE::VIEWGetView (int ViewNum) const
virtual bool HasLayers () const=0
bool HasSaveLocation () const
bool IsModified () const
bool IsTopViewable () const
ERRVALUE RenderToRaster (RVC::OBJITEM &objitem, COLORSPACE colorspace, INT32 rastcols, INT32 rastlins, double cellsize, const COLOR &bgcolor, int viewnum=1, bool savegeoref=true, const SIMPLE_ARRAY< COLOR > *pColors=0, const DRECT2D *pRect=0, MGD::PIXEL *pFallbackPixel=0)
void ResetModified ()
void SetDesignScale (double DesignScale, bool notify=true)
void SetElemHighlightMode (GRE::HIGHLIGHTMODE HighlightMode)
void SetIniBase (const char *name)
void SetMacroScriptList (const GRE::MACROSCRIPTLIST &ScriptList)
void SetSaveFilePath (const FILEPATH &SaveFilePath)
void SetSaveObjItem (const RVC::OBJITEM &SaveObjItem)
void SetToolScriptList (const GRE::TOOLSCRIPTLIST &ScriptList)
void TreeViewGetAll (SIMPLE_ARRAY< GRE::CTRL_TREEVIEW * > &TreeViewPtrs) const
void TreeViewSetPtr (GRE::CTRL_TREEVIEW *pTreeView)
void UpdateViewScriptUI ()
virtual ~VIEWABLE ()

Static Public Member Functions

static void SMLClassInstall (SMLCONTEXT *context)

Protected Member Functions

ERRVALUE ControlScriptInitialize ()
UINT8 GetIniIndex () const
void SetIniIndex (UINT8 IniIndex)
 VIEWABLE (OBJECT::TYPE type, VIEWABLE *container)

Static Protected Member Functions

static const SERIALIZER::ITEMDEFSerialGetItemDef (SERIALIZER &)
static const SERIALIZER::ITEMDEFTemplateGetItemDef ()

Protected Attributes

bool m_IsModified

Classes

class  MAINSCRIPT

Detailed Description

Base class for objects that can have "views" (GRE::LAYOUT, GRE::GROUP).

Definition at line 159 of file viewable.h.


Constructor & Destructor Documentation

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

Destructor.

GRE::VIEWABLE::VIEWABLE ( OBJECT::TYPE  type,
VIEWABLE container 
) [explicit, protected]

Constructor.

Parameters:
type  Object type
container  Containing viewable


Member Function Documentation

void GRE::VIEWABLE::ClearMacroScriptList (  )  [inline]

Clear MacroScript list.

Definition at line 224 of file viewable.h.

void GRE::VIEWABLE::ClearSaveLocation (  )  [inline]

Clear save location specification.

Definition at line 229 of file viewable.h.

void GRE::VIEWABLE::ClearToolScriptList (  )  [inline]

Clear ToolScript list.

Definition at line 234 of file viewable.h.

ERRVALUE GRE::VIEWABLE::ControlScriptEdit ( MDLGPARENT  dlgparent  ) 

ERRVALUE GRE::VIEWABLE::ControlScriptInitialize (  )  [protected]

void GRE::VIEWABLE::DestroyAllViews (  ) 

Destroy all views of this object.

ERRVALUE GRE::VIEWABLE::DrawAllViews ( GRE::DRAWCONDITION  condition = GRE::DRAWCONDITION_Always  )  [inline]

Draw all views of this object.

Definition at line 248 of file viewable.h.

virtual GRE::LAYER* GRE::VIEWABLE::FindLayerByID ( UINT32  LayerID  )  const [pure virtual]

Find layer using unique ID.

Implemented in GRE::GROUP, and GRE::LAYOUT.

MAINSCRIPT& GRE::VIEWABLE::GetControlScript (  )  [inline]

Get reference to "display control script".

Definition at line 254 of file viewable.h.

double GRE::VIEWABLE::GetDesignScale (  )  const [inline]

Get 'design scale' for layout or group.

Definition at line 268 of file viewable.h.

GRE::HIGHLIGHTMODE GRE::VIEWABLE::GetElemHighlightMode (  )  const [inline]

Get element highlighting mode.

Definition at line 272 of file viewable.h.

const DRECT2D& GRE::VIEWABLE::GetExtents (  )  const [inline]

Get overall viewable extents.

Definition at line 259 of file viewable.h.

GRE::VIEW* GRE::VIEWABLE::GetFirstView (  )  const

Get first view of this object.

Returns:
Pointer to view or NULL if no views of this object.
To loop through all views for an object use this method to get the first view. Then use the GRE::VIEW::GetNext() to obtain the next view, checking for NULL as shown:

for (GRE::VIEW *view = object->GetFirstView(); (view != 0); view = view->GetNext()) { ... }

virtual void GRE::VIEWABLE::GetFullName ( MISTRING name  )  const [pure virtual]

Get full object name.

Parameters:
name  Name returned

Implemented in GRE::GROUP, and GRE::LAYOUT.

UINT8 GRE::VIEWABLE::GetIniIndex (  )  const [inline, protected]

Get unique index for building Ini name.

Definition at line 458 of file viewable.h.

const char* GRE::VIEWABLE::GetIniName (  )  const [inline]

Get name of object to use in Ini file access.

Definition at line 293 of file viewable.h.

GRE::MACROSCRIPTLIST& GRE::VIEWABLE::GetMacroScriptList (  )  [inline]

Get MacroScript list.

Definition at line 298 of file viewable.h.

double GRE::VIEWABLE::GetMaxScaleVisibleAny (  )  const [inline]

Get maximum visible scale for any item in viewable.

Returns:
0 if at least one item has no maximum scale set.

Definition at line 304 of file viewable.h.

double GRE::VIEWABLE::GetMinScaleVisibleAny (  )  const [inline]

Get minimum visible scale for any item in viewable.

Definition at line 308 of file viewable.h.

virtual UINT32 GRE::VIEWABLE::GetNextLayerID (  )  const [pure virtual]

Get next available unique ID.

Implemented in GRE::GROUP, and GRE::LAYOUT.

const FILEPATH& GRE::VIEWABLE::GetSaveFilePath (  )  const [inline]

Get path to file where viewable saved.

Definition at line 316 of file viewable.h.

const RVC::OBJITEM& GRE::VIEWABLE::GetSaveObjItem (  )  const [inline]

Get object item reference to save location.

Definition at line 320 of file viewable.h.

virtual ERRVALUE GRE::VIEWABLE::GetSizeMeters ( DPOINT2D sizemeters  )  [pure virtual]

Compute dimensions of object based on scale and georeference.

Parameters:
sizemeters  Size returned in meters

Implemented in GRE::GROUP, and GRE::LAYOUT.

GRE::TOOLSCRIPTLIST& GRE::VIEWABLE::GetToolScriptList (  )  [inline]

Get ToolScript list.

Definition at line 330 of file viewable.h.

VIEWABLE* GRE::VIEWABLE::GetTopViewable (  ) 

Get topmost containing viewable (non-const).

const VIEWABLE* GRE::VIEWABLE::GetTopViewable (  )  const

Get topmost containing viewable (const).

GRE::VIEW* GRE::VIEWABLE::GetView ( int  ViewNum  )  const

Get view of this object given view number.

Returns:
Pointer to view or NULL if no matching view.

virtual bool GRE::VIEWABLE::HasLayers (  )  const [pure virtual]

Determine if object has any layers.

Implemented in GRE::GROUP, and GRE::LAYOUT.

bool GRE::VIEWABLE::HasSaveLocation (  )  const

Determine if save location has been specified.

bool GRE::VIEWABLE::IsModified (  )  const [inline]

Determine if changes have been made since last save.

Definition at line 357 of file viewable.h.

bool GRE::VIEWABLE::IsTopViewable (  )  const [inline]

Determine if is topmost viewable.

Definition at line 361 of file viewable.h.

ERRVALUE GRE::VIEWABLE::RenderToRaster ( RVC::OBJITEM objitem,
COLORSPACE  colorspace,
INT32  rastcols,
INT32  rastlins,
double  cellsize,
const COLOR bgcolor,
int  viewnum = 1,
bool  savegeoref = true,
const SIMPLE_ARRAY< COLOR > *  pColors = 0,
const DRECT2D pRect = 0,
MGD::PIXEL pFallbackPixel = 0 
)

Render to raster.

Parameters:
pColors  Colormap to use for COLORSPACE_Indexed
pRect  Rectangle in viewable coordinates to limit extent
pFallbackPixel  Pointer to fallback pixel, NULL to use 'transparent'

void GRE::VIEWABLE::ResetModified (  )  [inline]

Reset "is modified" status to "false".

Definition at line 380 of file viewable.h.

static const SERIALIZER::ITEMDEF* GRE::VIEWABLE::SerialGetItemDef ( SERIALIZER  )  [inline, static, protected]

Get serialization item definition array.

Definition at line 462 of file viewable.h.

void GRE::VIEWABLE::SetDesignScale ( double  DesignScale,
bool  notify = true 
) [inline]

Set 'design scale' for layout or group.

Parameters:
DesignScale  Design scale to set
notify  Send notification if changed

Definition at line 384 of file viewable.h.

void GRE::VIEWABLE::SetElemHighlightMode ( GRE::HIGHLIGHTMODE  HighlightMode  ) 

Set element highlighting mode.

void GRE::VIEWABLE::SetIniBase ( const char *  name  ) 

Set base name of object for use in Ini file acces.

void GRE::VIEWABLE::SetIniIndex ( UINT8  IniIndex  )  [protected]

Set index for building Ini name.

void GRE::VIEWABLE::SetMacroScriptList ( const GRE::MACROSCRIPTLIST ScriptList  )  [inline]

Definition at line 400 of file viewable.h.

void GRE::VIEWABLE::SetSaveFilePath ( const FILEPATH SaveFilePath  ) 

Set path to file where viewable saved.

Also resets object such that expects to save to non-RVC file.

void GRE::VIEWABLE::SetSaveObjItem ( const RVC::OBJITEM SaveObjItem  )  [inline]

Set object item reference to save location.

Definition at line 412 of file viewable.h.

void GRE::VIEWABLE::SetToolScriptList ( const GRE::TOOLSCRIPTLIST ScriptList  )  [inline]

Definition at line 417 of file viewable.h.

static void GRE::VIEWABLE::SMLClassInstall ( SMLCONTEXT context  )  [static]

Install SML class, called by internal SML function.

Reimplemented in GRE::GROUP, and GRE::LAYOUT.

static const SERIALIZER::ITEMDEF* GRE::VIEWABLE::TemplateGetItemDef (  )  [static, protected]

Get serialization item definition array.

void GRE::VIEWABLE::TreeViewGetAll ( SIMPLE_ARRAY< GRE::CTRL_TREEVIEW * > &  TreeViewPtrs  )  const

Get all TreeViews which may contain this viewable.

void GRE::VIEWABLE::TreeViewSetPtr ( GRE::CTRL_TREEVIEW pTreeView  )  [inline]

Set TreeView pointer.

Used by GRE CTRL_TREEVIEW implementation, should not be called directly.

Definition at line 432 of file viewable.h.

void GRE::VIEWABLE::UpdateViewScriptUI (  ) 

Update user interface for changes to view scripts.


Member Data Documentation

bool GRE::VIEWABLE::m_IsModified [protected]

Changes have been made since last save.

Definition at line 445 of file viewable.h.


The documentation for this class was generated from the following file:
Generated on Thu Apr 26 04:48:15 2007 for TNTsdk by  doxygen 1.5.2