GRE_GROUP Class Reference

#include <gre/group.h>

Inheritance diagram for GRE_GROUP:

Inheritance graph
[legend]
List of all members.

Public Types

enum  CREATEFLAGS {
  CREATEFLAG_None = 0x0000, CREATEFLAG_NoCallCreateCB = 0x0001, CREATEFLAG_Temporary = 0x0002, CREATEFLAG_3D = 0x0004,
  CREATEFLAG_NoAutoMatch = 0x0008, CREATEFLAG_NoSetActive = 0x0010, CREATEFLAG_DeferCreate = 0x0020
}
enum  LABEL_MANAGEMENT_MODE { LABEL_MANAGEMENT_MODE_RenderWithLayer = 0, LABEL_MANAGEMENT_MODE_RenderLast }
enum  ORIENTATION_BASE { ORIENTATION_BASE_Projection = 0, ORIENTATION_BASE_North = 1 }

Public Member Functions

bool AdjLatLon ()
bool AdjLatLonCanSet ()
bool ChangeListPos (GRE_GROUP *refgroup, GRE::LISTPOS listpos)
ERRVALUE CheckAddLayer (GRE_LAYER::TYPE layertype=GRE_LAYER::TYPE_None) const
void CheckGeorefCompatible () const
void ComputeLayoutExtents ()
ERRVALUE ComputeMapExtents ()
ERRVALUE ComputeRegionFromLayers (REGION2D &region, bool IncludeMargins, GRE_LAYER::FILTER *filter=0) const
void Create (CREATEFLAGS createflags=CREATEFLAG_None)
void DestroyAllLayers ()
void DestroyLayer (GRE_LAYER *layer)
ERRVALUE DlgGetClipSettings (MDLGPARENT dlgparent)
ERRVALUE DrawActiveOverlay (GRE::DRAWFLAGS DrawFlags=GRE::DRAWFLAG_UpdateScreen, GRE_VIEW *view=0)
virtual GRE_LAYERFindLayerByID (UINT32 LayerID) const
ERRVALUE GeoCatDlgOpen ()
void GeoCatDlgSetSearchPoint (const DPOINT2D &SearchPoint, const SPATREF::COORDREFSYS &PointCRS) const
GRE_LAYERGetActiveLayer () const
const REGION2DGetClipRegion () const
bool GetClipToMatchedLayer () const
ERRVALUE GetExtents (DRECT2D *extents, UINT32 flags)
GRE_LAYERGetFirstLayer () const
UINT32 GetFlags () const
virtual void GetFullName (MISTRING &name) const
const REGION2DGetFullRegion () const
LABEL_MANAGEMENT_MODE GetLabelManagementMode () const
GRE_LAYERGetLastLayer () const
GRE_LAYERGetLayerZoom1X (bool PreferredOnly) const
GRE_LAYOUTGetLayout () const
const DRECT2DGetLayoutExtents () const
int GetListPos ()
GRE_GROUPGetMatchedGroup (bool firstonly=false) const
MATTEGetMatte ()
UINT32 GetMutualExclusiveGroupSet () const
const MISTRINGGetName () const
bool GetNeedUpdateExtents () const
GRE_GROUPGetNext () const
virtual UINT32 GetNextLayerID () const
OBJMGRFORMGetObjMgrForm ()
GRE_GROUPGetPrevious () const
double GetRelativeScale () const
const SPATREF::COORDREFSYSGetRenderCoordRefSys () const
double GetRotationAngle () const
SERIALIZERGetSerializer () const
virtual ERRVALUE GetSizeMeters (DPOINT2D &sizemeters)
const TRANS2D_AFFINEGetTransViewToGroup () const
const SPATREF::COORDREFSYSGetUsedCoordRefSys () const
GRE_VIEWPOINT3DGetViewPoint3D () const
void GetVisibleScaleRange (double &MinScaleVisible, double &MaxScaleVisible)
 GRE_GROUP (GRE_LAYOUT *layout, CREATEFLAGS createflags=CREATEFLAG_None, GRE::LISTPOS listpos=GRE::LISTPOS_Last, GRE_GROUP *refgroup=0)
 GRE_GROUP (CREATEFLAGS createflags=CREATEFLAG_None)
bool HasAttachedGroups () const
bool HasHighlightableLayer (GRE_VIEW *view=0) const
virtual bool HasLayers () const
bool HasLegend () const
bool HasMutuallyExclusiveLayers () const
bool HasTempLayers () const
void HighlightSetupDefault (GRE_VIEW *view=0)
void InvalidateAllViews (GRE::RENDERTARGET Target=GRE::RENDERTARGET_GroupAll|GRE::RENDERTARGET_LayerAll)
bool Is3D () const
bool IsBeingLoaded () const
bool IsClipped () const
bool IsClippedToMatchedLayer () const
bool IsCreated () const
bool IsIgnored () const
bool IsSingleLayer () const
bool IsValid () const
bool IsVisibleAtScale (double scale) const
bool IsVisibleInView (const GRE_VIEW *view) const
virtual ERRVALUE SerialRead (SERIALIZER &serializer)
virtual ERRVALUE SerialWrite (SERIALIZER &serializer, const char *tagname=0) const
void Set2D ()
void SetActiveLayer (GRE_LAYER *layer)
void SetClipRect (const DRECT2D &ClipRect, const SPATREF::COORDREFSYS &RectCRS, bool notify=true)
void SetClipToMatchedLayer (bool ClipToMatchedLayer, bool notify=true)
void SetFlags (UINT32 flags, UINT32 mask)
void SetLabelManagementMode (LABEL_MANAGEMENT_MODE mode)
void SetListPos (int newpos)
void SetModified (bool notify=true, bool ViewsNeedRedraw=true)
void SetMutualExclusiveGroupSet (UINT32 GroupSet)
void SetMutuallyExclusiveLayers (bool LayersMutuallyExclusive=true)
ERRVALUE SetName (const MISTRING &newname)
void SetNeedUpdateExtents ()
void SetOrientation (UINT8 NewRotBase, double NewRotAngle)
void SetProjView (const GRE_LAYER *layer)
void SetRelativeScale (double RelativeScale, bool notify=true)
ERRVALUE SetRenderCoordRefSys (const SPATREF::COORDREFSYS &RenderCRS)
ERRVALUE SetupEquirectangular (SPATREF::COORDREFSYS &CoordRefSys, const DPOINT2D &center) const
void SetVisible (UINT32 flags, bool set)
void SetVisibleScaleRange (double MinScaleVisible, double MaxScaleVisible)
void SetVisibleView (GRE_VIEW *view, bool visible)
ERRVALUE TemplateWrite (SERIALIZER &serializer, const char *tagname=0)
virtual ~GRE_GROUP ()

Static Public Member Functions

GRE_GROUPGetFromWidget (Widget w)
void SMLClassInstall (SMLCONTEXT *context)

Public Attributes

GRE_LAYERactivelayer
double AspectX
double AspectY
GRE_LAYERfirstlayer
UINT32 groupflags
GRE_LAYERlastlayer
GRE_LAYOUTlayout
GRE_VIEWPOINT3Dm_ViewPoint3D
GRE_LAYERmatchedlayer
GRE_GROUPnextgroup
GRE_GROUPprevgroup
double RotAngle
UINT8 RotBase
UINT32 VisibleViewLayout
MDISPGROUPPOSN xposn
MDISPGROUPPOSN yposn
double zinit
double zlast

Protected Member Functions

virtual void ObjMgrInitItems ()

Member Enumeration Documentation

enum GRE_GROUP::CREATEFLAGS
 

Flags for group creation.

Enumeration values:
CREATEFLAG_None 
CREATEFLAG_NoCallCreateCB  Don't call callback list when object created.
CREATEFLAG_Temporary  Object is temporary.
CREATEFLAG_3D  Group is 3D.
CREATEFLAG_NoAutoMatch  Don't default to automatch any layers.
CREATEFLAG_NoSetActive  Don't make newly-created group "active".
CREATEFLAG_DeferCreate  Defer creation until Create() called (standalone group only).

Definition at line 204 of file group.h.

enum GRE_GROUP::LABEL_MANAGEMENT_MODE
 

Enumeration values:
LABEL_MANAGEMENT_MODE_RenderWithLayer 
LABEL_MANAGEMENT_MODE_RenderLast 

Definition at line 219 of file group.h.

enum GRE_GROUP::ORIENTATION_BASE
 

Enumeration values:
ORIENTATION_BASE_Projection 
ORIENTATION_BASE_North 

Definition at line 214 of file group.h.


Constructor & Destructor Documentation

GRE_GROUP::GRE_GROUP CREATEFLAGS  createflags = CREATEFLAG_None  )  [explicit]
 

Construct "stand-alone" group.

GRE_GROUP::GRE_GROUP GRE_LAYOUT layout,
CREATEFLAGS  createflags = CREATEFLAG_None,
GRE::LISTPOS  listpos = GRE::LISTPOS_Last,
GRE_GROUP refgroup = 0
 

Construct group within a layout.

virtual GRE_GROUP::~GRE_GROUP  )  [virtual]
 

Destructor.


Member Function Documentation

bool GRE_GROUP::AdjLatLon  ) 
 

Determine if lat/lon aspect adjustment will be done.

bool GRE_GROUP::AdjLatLonCanSet  ) 
 

Determine if option to adjust lat/lon aspect can be set.

bool GRE_GROUP::ChangeListPos GRE_GROUP refgroup,
GRE::LISTPOS  listpos
 

Change group position in list.

ERRVALUE GRE_GROUP::CheckAddLayer GRE_LAYER::TYPE  layertype = GRE_LAYER::TYPE_None  )  const
 

Check if layer of specified type can be added.

void GRE_GROUP::CheckGeorefCompatible  )  const
 

Check if georeference for layers in group are compatible.

void GRE_GROUP::ComputeLayoutExtents  ) 
 

Compute extents of group in layout.

ERRVALUE GRE_GROUP::ComputeMapExtents  ) 
 

Compute map coordinate extents for group.

ERRVALUE GRE_GROUP::ComputeRegionFromLayers REGION2D region,
bool  IncludeMargins,
GRE_LAYER::FILTER filter = 0
const
 

Parameters:
region  Region returned, will be in group's RenderCoordRefSys
IncludeMargins  Include layer margins
filter  Filter

void GRE_GROUP::Create CREATEFLAGS  createflags = CREATEFLAG_None  ) 
 

Create group if CREATEFLAG_DeferCreate was specified in constructor.

void GRE_GROUP::DestroyAllLayers  ) 
 

Destroy all layers in this group.

void GRE_GROUP::DestroyLayer GRE_LAYER layer  ) 
 

Destroy specified layer in this group.

ERRVALUE GRE_GROUP::DlgGetClipSettings MDLGPARENT  dlgparent  ) 
 

Dialog to specify group clip settings.

ERRVALUE GRE_GROUP::DrawActiveOverlay GRE::DRAWFLAGS  DrawFlags = GRE::DRAWFLAG_UpdateScreen,
GRE_VIEW view = 0
 

Draw group overlay containing 'active' element for each layer.

Parameters:
view  View to draw overlay for, 0 for all, will be drawn first if drawing multiple

virtual GRE_LAYER* GRE_GROUP::FindLayerByID UINT32  LayerID  )  const [virtual]
 

Find layer using unique ID.

Implements GRE_VIEWABLE.

ERRVALUE GRE_GROUP::GeoCatDlgOpen  ) 
 

Open geocatalog dialog for adding layers to group.

void GRE_GROUP::GeoCatDlgSetSearchPoint const DPOINT2D SearchPoint,
const SPATREF::COORDREFSYS PointCRS
const
 

Set point for next "point search" operation in geocatalog dialog.

Parameters:
SearchPoint  Point coordinates
PointCRS  Point coordinate reference system

GRE_LAYER* GRE_GROUP::GetActiveLayer  )  const [inline]
 

Determine "active" layer for group.

Returns:
Active layer or NULL if none.

Definition at line 426 of file group.h.

const REGION2D& GRE_GROUP::GetClipRegion  )  const
 

Get clipping region for group.

bool GRE_GROUP::GetClipToMatchedLayer  )  const [inline]
 

Get setting for "clip to matched layer" regardless of whether or not will be auto-matched.

Definition at line 434 of file group.h.

ERRVALUE GRE_GROUP::GetExtents DRECT2D extents,
UINT32  flags
 

Get extents of group in specified coordinates.

Parameters:
extents  Group extents returned
flags  MDISPEXTENTS_... flags

GRE_LAYER* GRE_GROUP::GetFirstLayer  )  const [inline]
 

Get first layer in group.

Definition at line 444 of file group.h.

UINT32 GRE_GROUP::GetFlags  )  const [inline]
 

Get current group flag settings.

Definition at line 448 of file group.h.

GRE_GROUP* GRE_GROUP::GetFromWidget Widget  w  )  [static]
 

Get group from object attached to Widget userData.

virtual void GRE_GROUP::GetFullName MISTRING name  )  const [virtual]
 

Get full group name as MISTRING.

Parameters:
name  Name returned

Implements GRE_VIEWABLE.

const REGION2D& GRE_GROUP::GetFullRegion  )  const [inline]
 

Definition at line 456 of file group.h.

LABEL_MANAGEMENT_MODE GRE_GROUP::GetLabelManagementMode  )  const [inline]
 

Definition at line 459 of file group.h.

GRE_LAYER* GRE_GROUP::GetLastLayer  )  const [inline]
 

Get last layer in group.

Definition at line 463 of file group.h.

GRE_LAYER* GRE_GROUP::GetLayerZoom1X bool  PreferredOnly  )  const
 

Get layer to use for 1X zoom.

Parameters:
PreferredOnly  Use 'preferred' layers only

GRE_LAYOUT* GRE_GROUP::GetLayout  )  const [inline]
 

Get layout group is contained in.

Returns:
pointer to layout.

Definition at line 473 of file group.h.

const DRECT2D& GRE_GROUP::GetLayoutExtents  )  const [inline]
 

Definition at line 476 of file group.h.

int GRE_GROUP::GetListPos  ) 
 

Get current group drawing order position in list.

Returns:
0 for first group, 1 for second, etc.

GRE_GROUP* GRE_GROUP::GetMatchedGroup bool  firstonly = false  )  const
 

Return geographically-attached reference group if any.

Parameters:
firstonly  True to return immediate (first link) matched group

MATTE& GRE_GROUP::GetMatte  )  [inline]
 

Definition at line 489 of file group.h.

UINT32 GRE_GROUP::GetMutualExclusiveGroupSet  )  const [inline]
 

Get "set" for mutual exclusiveness between groups.

Definition at line 493 of file group.h.

const MISTRING& GRE_GROUP::GetName  )  const [inline]
 

Get group name.

Definition at line 497 of file group.h.

bool GRE_GROUP::GetNeedUpdateExtents  )  const [inline]
 

Determine if need updated extents.

Definition at line 501 of file group.h.

GRE_GROUP* GRE_GROUP::GetNext  )  const [inline]
 

Get next group in layout.

Definition at line 505 of file group.h.

virtual UINT32 GRE_GROUP::GetNextLayerID  )  const [virtual]
 

Get next available unique ID.

Implements GRE_VIEWABLE.

OBJMGRFORM& GRE_GROUP::GetObjMgrForm  )  [inline]
 

Definition at line 513 of file group.h.

GRE_GROUP* GRE_GROUP::GetPrevious  )  const [inline]
 

Get previous group in layout.

Definition at line 518 of file group.h.

double GRE_GROUP::GetRelativeScale  )  const [inline]
 

Get relative scale.

Definition at line 522 of file group.h.

const SPATREF::COORDREFSYS& GRE_GROUP::GetRenderCoordRefSys  )  const [inline]
 

Get CoordRefSys group is to be rendered in if not auto-matched.

Definition at line 526 of file group.h.

double GRE_GROUP::GetRotationAngle  )  const [inline]
 

Get rotation angle relative to base in radians.

Definition at line 530 of file group.h.

SERIALIZER* GRE_GROUP::GetSerializer  )  const [inline]
 

Get serializer instance being used to load group.

Returns:
Pointer to SERIALIZER, NULL if not being loaded.

Definition at line 535 of file group.h.

virtual ERRVALUE GRE_GROUP::GetSizeMeters DPOINT2D sizemeters  )  [virtual]
 

Compute dimensions of object based on scale and georeference.

Parameters:
sizemeters  Size returned in meters

Implements GRE_VIEWABLE.

const TRANS2D_AFFINE& GRE_GROUP::GetTransViewToGroup  )  const [inline]
 

Get transformation from group to view.

Definition at line 544 of file group.h.

const SPATREF::COORDREFSYS& GRE_GROUP::GetUsedCoordRefSys  )  const
 

Get CoordRefSys group actually used for rendering.

GRE_VIEWPOINT3D* GRE_GROUP::GetViewPoint3D  )  const [inline]
 

Definition at line 551 of file group.h.

void GRE_GROUP::GetVisibleScaleRange double &  MinScaleVisible,
double &  MaxScaleVisible
[inline]
 

Get scale range over which group is visible.

Parameters:
MinScaleVisible  Minimum scale visible returned, 0 for no minimum
MaxScaleVisible  Maximum scale visible returned, 0 for no maximum

Definition at line 555 of file group.h.

bool GRE_GROUP::HasAttachedGroups  )  const
 

Determine if group has other groups attached to it.

bool GRE_GROUP::HasHighlightableLayer GRE_VIEW view = 0  )  const
 

Determine if any layers in group have "highlightable" elements.

Parameters:
view  Reference view for layer visibility test

virtual bool GRE_GROUP::HasLayers  )  const [virtual]
 

Determine if group has any layers.

Implements GRE_VIEWABLE.

bool GRE_GROUP::HasLegend  )  const [inline]
 

Determine if group has a legend.

Definition at line 574 of file group.h.

bool GRE_GROUP::HasMutuallyExclusiveLayers  )  const [inline]
 

Determine if group has mutually-exclusive layers.

Definition at line 578 of file group.h.

bool GRE_GROUP::HasTempLayers  )  const
 

Determine if group has any temporary layers.

void GRE_GROUP::HighlightSetupDefault GRE_VIEW view = 0  ) 
 

Setup for default highlighting of layer elements.

Parameters:
view  Optional view for determining layer visibility

void GRE_GROUP::InvalidateAllViews GRE::RENDERTARGET  Target = GRE::RENDERTARGET_GroupAll|GRE::RENDERTARGET_LayerAll  ) 
 

Invalidate all view buffers for this group.

bool GRE_GROUP::Is3D  )  const [inline]
 

Determine if group can be viewed in 3D.

Definition at line 596 of file group.h.

bool GRE_GROUP::IsBeingLoaded  )  const [inline]
 

Definition at line 599 of file group.h.

bool GRE_GROUP::IsClipped  )  const
 

Determine if group is to be clipped.

bool GRE_GROUP::IsClippedToMatchedLayer  )  const [inline]
 

Determine if group is to be clipped to the auto-matched layer.

Definition at line 607 of file group.h.

bool GRE_GROUP::IsCreated  )  const [inline]
 

Determine if group has been created.

This is done automatically by constructor unless CREATEFLAG_DeferCreate was specified.

Definition at line 612 of file group.h.

bool GRE_GROUP::IsIgnored  )  const
 

Determine if group should be ignored for extents determination.

bool GRE_GROUP::IsSingleLayer  )  const [inline]
 

Determine if group only allows a single layer.

Definition at line 620 of file group.h.

bool GRE_GROUP::IsValid  )  const
 

Determine if group is a valid object.

bool GRE_GROUP::IsVisibleAtScale double  scale  )  const [inline]
 

Determine if group visible at specified scale.

Definition at line 628 of file group.h.

bool GRE_GROUP::IsVisibleInView const GRE_VIEW view  )  const
 

Determine if group is visible in specified view.

virtual void GRE_GROUP::ObjMgrInitItems  )  [protected, virtual]
 

Create initial set of items in object manager.

Implements GRE_VIEWABLE.

virtual ERRVALUE GRE_GROUP::SerialRead SERIALIZER serializer  )  [virtual]
 

Read from serialization.

Implements SERIALIZABLE.

virtual ERRVALUE GRE_GROUP::SerialWrite SERIALIZER serializer,
const char *  tagname = 0
const [virtual]
 

Write values to serialization.

Implements SERIALIZABLE.

void GRE_GROUP::Set2D  ) 
 

Set group to 2D.

void GRE_GROUP::SetActiveLayer GRE_LAYER layer  ) 
 

Set active layer for group.

Parameters:
layer  Layer to make active

void GRE_GROUP::SetClipRect const DRECT2D ClipRect,
const SPATREF::COORDREFSYS RectCRS,
bool  notify = true
 

Set clipping rectangle.

Parameters:
ClipRect  Rectangle to clip to
RectCRS  Rectangle CRS

void GRE_GROUP::SetClipToMatchedLayer bool  ClipToMatchedLayer,
bool  notify = true
 

Set whether to clip to 'auto-matched' layer.

Parameters:
ClipToMatchedLayer  'true' to clip, 'false' to not
notify  Send ACTION_ChangeBegin/End notification

void GRE_GROUP::SetFlags UINT32  flags,
UINT32  mask
 

Set specified group flags.

Parameters:
flags  GROUPFLAG_... flag values
mask  GROUPFLAG_... mask for which flags to change

void GRE_GROUP::SetLabelManagementMode LABEL_MANAGEMENT_MODE  mode  )  [inline]
 

Definition at line 682 of file group.h.

void GRE_GROUP::SetListPos int  newpos  ) 
 

Set group position in list.

Parameters:
newpos  New list position

void GRE_GROUP::SetModified bool  notify = true,
bool  ViewsNeedRedraw = true
 

Set group to "modified" status.

Parameters:
notify  Set to invoke callbacks with "Changed" message
ViewsNeedRedraw  Set all views of group as needing redraw

void GRE_GROUP::SetMutualExclusiveGroupSet UINT32  GroupSet  ) 
 

Set "group set" which group is mutually-exclusive with.

Parameters:
GroupSet  Group set bits

void GRE_GROUP::SetMutuallyExclusiveLayers bool  LayersMutuallyExclusive = true  ) 
 

Set whether layers are mutually-exclusive.

ERRVALUE GRE_GROUP::SetName const MISTRING newname  ) 
 

Set group name.

Parameters:
newname  New name

void GRE_GROUP::SetNeedUpdateExtents  )  [inline]
 

Set group to recompute extents.

Definition at line 713 of file group.h.

void GRE_GROUP::SetOrientation UINT8  NewRotBase,
double  NewRotAngle
[inline]
 

Set group rotation base and orientation.

Parameters:
NewRotBase  ROTBASE_Projection or ROTBASE_North
NewRotAngle  Rotation angle, radians clockwise relative to base

Definition at line 717 of file group.h.

void GRE_GROUP::SetProjView const GRE_LAYER layer  ) 
 

Set group projection to match specified layer.

Parameters:
layer  Layer to obtain projection from, NULL to match first raster/layer

void GRE_GROUP::SetRelativeScale double  RelativeScale,
bool  notify = true
 

Set group scale relative to layout design scale.

ERRVALUE GRE_GROUP::SetRe