GRE::GROUP Class Reference

#include <gre/group.h>

Inheritance diagram for GRE::GROUP:

Inheritance graph
GRE::VIEWABLEGRE::OBJECTSERIALIZABLE
[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, CREATEFLAG_SML = 0x0040
}
enum  EXTENTCOORD { EXTENTCOORD_Group, EXTENTCOORD_Layout, EXTENTCOORD_View }
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 (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 (MDLGPARENT dlgparent)
void GeoCatDlgSetSearchPoint (const DPOINT2D &SearchPoint, const SPATREF::COORDREFSYS &PointCRS) const
GRE::LAYERGetActiveLayer () const
const REGION2DGetClipRegion () const
bool GetClipToMatchedLayer () const
ERRVALUE GetExtents (DRECT2D &extents, EXTENTCOORD coords)
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 ()
GROUPGetMatchedGroup (bool firstonly=false) const
MATTEGetMatte ()
UINT32 GetMutualExclusiveGroupSet () const
const MISTRINGGetName () const
bool GetNeedUpdateExtents () const
GROUPGetNext () const
virtual UINT32 GetNextLayerID () const
GROUPGetPrevious () const
double GetRelativeScale () const
double GetRotationAngle () const
SERIALIZERGetSerializer () const
virtual ERRVALUE GetSizeMeters (DPOINT2D &sizemeters)
const TRANS2D_AFFINEGetTransViewToGroup () const
const SPATREF::COORDREFSYSGetUsedCoordRefSys () const
GRE::VIEWPOINT3DGetViewPoint3D () const
UINT32 GetVisible () const
void GetVisibleScaleRange (double &MinScaleVisible, double &MaxScaleVisible)
 GROUP (GRE::LAYOUT *layout, CREATEFLAGS createflags=CREATEFLAG_None, GRE::LISTPOS listpos=GRE::LISTPOS_Last, GROUP *refgroup=0)
 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 ~GROUP ()

Static Public Member Functions

static GROUPGetFromWidget (Widget w)
static 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
GROUPnextgroup
GROUPprevgroup
double RotAngle
UINT8 RotBase
UINT32 VisibleViewLayout
POSN xposn
POSN yposn
double zinit
double zlast

Classes

struct  POSN
 Layout/Positioning parameters. More...

Detailed Description

Definition at line 215 of file group.h.


Member Enumeration Documentation

enum GRE::GROUP::CREATEFLAGS

Flags for group creation.

Enumerator:
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).
CREATEFLAG_SML  Being created by SML (standalone group only).

Definition at line 220 of file group.h.

enum GRE::GROUP::EXTENTCOORD

Used with GetExtents().

Enumerator:
EXTENTCOORD_Group 
EXTENTCOORD_Layout 
EXTENTCOORD_View 

Definition at line 242 of file group.h.

enum GRE::GROUP::LABEL_MANAGEMENT_MODE

Enumerator:
LABEL_MANAGEMENT_MODE_RenderWithLayer 
LABEL_MANAGEMENT_MODE_RenderLast 

Definition at line 236 of file group.h.

enum GRE::GROUP::ORIENTATION_BASE

Enumerator:
ORIENTATION_BASE_Projection 
ORIENTATION_BASE_North 

Definition at line 231 of file group.h.


Constructor & Destructor Documentation

GRE::GROUP::GROUP ( CREATEFLAGS  createflags = CREATEFLAG_None  )  [explicit]

Construct "stand-alone" group.

GRE::GROUP::GROUP ( GRE::LAYOUT layout,
CREATEFLAGS  createflags = CREATEFLAG_None,
GRE::LISTPOS  listpos = GRE::LISTPOS_Last,
GROUP refgroup = 0 
)

Construct group within a layout.

virtual GRE::GROUP::~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 ( 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 ( MDLGPARENT  dlgparent  ) 

Open geocatalog dialog for adding layers to group.

Parameters:
dlgparent  Parent for dialog

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 397 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 405 of file group.h.

ERRVALUE GRE::GROUP::GetExtents ( DRECT2D extents,
EXTENTCOORD  coords 
)

Get extents of group in specified coordinates.

Parameters:
extents  Group extents returned
coords  What to return extents in

GRE::LAYER* GRE::GROUP::GetFirstLayer (  )  const [inline]

Get first layer in group.

Definition at line 415 of file group.h.

UINT32 GRE::GROUP::GetFlags (  )  const [inline]

Get current group flag settings.

Definition at line 419 of file group.h.

static 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 427 of file group.h.

LABEL_MANAGEMENT_MODE GRE::GROUP::GetLabelManagementMode (  )  const [inline]

Definition at line 430 of file group.h.

GRE::LAYER* GRE::GROUP::GetLastLayer (  )  const [inline]

Get last layer in group.

Definition at line 434 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 444 of file group.h.

const DRECT2D& GRE::GROUP::GetLayoutExtents (  )  const [inline]

Definition at line 447 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.

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 460 of file group.h.

UINT32 GRE::GROUP::GetMutualExclusiveGroupSet (  )  const [inline]

Get "set" for mutual exclusiveness between groups.

Definition at line 464 of file group.h.

const MISTRING& GRE::GROUP::GetName (  )  const [inline]

Get group name.

Definition at line 468 of file group.h.

bool GRE::GROUP::GetNeedUpdateExtents (  )  const [inline]

Determine if need updated extents.

Definition at line 472 of file group.h.

GROUP* GRE::GROUP::GetNext (  )  const [inline]

Get next group in layout.

Definition at line 476 of file group.h.

virtual UINT32 GRE::GROUP::GetNextLayerID (  )  const [virtual]

Get next available unique ID.

Implements GRE::VIEWABLE.

GROUP* GRE::GROUP::GetPrevious (  )  const [inline]

Get previous group in layout.

Definition at line 484 of file group.h.

double GRE::GROUP::GetRelativeScale (  )  const [inline]

Get relative scale.

Definition at line 488 of file group.h.

double GRE::GROUP::GetRotationAngle (  )  const [inline]

Get rotation angle relative to base in radians.

Definition at line 492 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 497 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 506 of file group.h.

const SPATREF::COORDREFSYS& GRE::GROUP::GetUsedCoordRefSys (  )  const

Get CoordRefSys used for rendering.

GRE::VIEWPOINT3D* GRE::GROUP::GetViewPoint3D (  )  const [inline]

Definition at line 513 of file group.h.

UINT32 GRE::GROUP::GetVisible (  )  const [inline]

Get visibility bits.

Definition at line 517 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 521 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 540 of file group.h.

bool GRE::GROUP::HasMutuallyExclusiveLayers (  )  const [inline]

Determine if group has mutually-exclusive layers.

Definition at line 544 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 562 of file group.h.

bool GRE::GROUP::IsBeingLoaded (  )  const [inline]

Definition at line 565 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 573 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 578 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 586 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 594 of file group.h.

bool GRE::GROUP::IsVisibleInView ( const GRE::VIEW view  )  const

Determine if group is visible in specified view.

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 648 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 679 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 683 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::SetRenderCoordRefSys ( const SPATREF::COORDREFSYS RenderCRS  ) 

Set coordinate reference system to render group in.

ERRVALUE GRE::GROUP::SetupEquirectangular ( SPATREF::COORDREFSYS CoordRefSys,
const DPOINT2D center 
) const

Setup equirectangular CRS based on group datum.

Parameters:
CoordRefSys  Coordinate Reference System definition returned
center  Projection center in CRS used by group

void GRE::GROUP::SetVisible ( UINT32  flags,
bool  set 
)

Set group visibility in specified views.

Parameters:
flags  Bits indicating which views to modify visibility for
set  true if visible, false if not

void GRE::GROUP::SetVisibleScaleRange ( double  MinScaleVisible,
double  MaxScaleVisible 
) [inline]