GRE_LAYOUT Class Reference

#include <gre/layout.h>

Inheritance diagram for GRE_LAYOUT:

Inheritance graph
[legend]
List of all members.

Public Types

enum  CREATEFLAGS { CREATEFLAG_None = 0x0000, CREATEFLAG_Hardcopy = 0x0010, CREATEFLAG_DeferCreate = 0x0020 }

Public Member Functions

ERRVALUE AddGroupLayer (MDLGPARENT dlgparent, GRE_LAYER::TYPE layertype, GRE_LAYER **player=0)
ERRVALUE AddGroupMulti (MDLGPARENT dlgparent)
int AddGroupSaved (MDLGPARENT dlgparent, bool fromtext)
void Create (CREATEFLAGS createflags=CREATEFLAG_None)
ERRVALUE CreateGroup (GRE_GROUP **retgroup=0, GRE_GROUP::CREATEFLAGS createflags=GRE_GROUP::CREATEFLAG_None, GRE::LISTPOS listpos=GRE::LISTPOS_After, GRE_GROUP *refgroup=0)
void DestroyAllGroups ()
virtual GRE_LAYERFindLayerByID (UINT32 LayerID) const
GRE_GROUPFindPointGroup (const DPOINT2D &point, GRE_FIND_FLAGS findflags, const SPATREF::COORDREFSYS *pPointCRS=NULL) const
GRE_GROUPGetActiveGroup () const
GRE_GROUPGetFirstGroup () const
virtual void GetFullName (MISTRING &name) const
DRECT2D GetHardcopyMarginRect () const
DRECT2D GetHardcopyPageRect () const
DRECT2D GetHardcopyPrintableRect () const
double GetHardcopyScale () const
double GetHardcopyZoom () const
GRE_GROUPGetLastGroup () const
MATTEGetMatte ()
GRE_LAYOUTGetNext () const
virtual UINT32 GetNextLayerID () const
UINT8 GetPosnMode () const
virtual ERRVALUE GetSizeMeters (DPOINT2D &sizemeters)
 GRE_LAYOUT (CREATEFLAGS flags=CREATEFLAG_None)
bool GroupControlsGetAutoRedraw () const
int GroupControlsGetLayoutUnits () const
bool GroupControlsIsOpen () const
void GroupControlsOpen (MDLGPARENT dlgparent=0, GRE_GROUP *group=0, UINT32 flags=0)
void GroupControlsSetPrompts (double hoffset, double hsize, double voffset, double vsize, double relscale)
void GroupControlsSetTabLayout ()
virtual bool HasLayers () const
bool HasTempLayers () const
void InvalidateAllViews ()
bool IsBeingLoaded () const
bool IsCreated () const
bool IsHardcopy () const
bool IsValid () const
bool KeepInTNTserverCache () const
virtual ERRVALUE SerialRead (SERIALIZER &serializer)
virtual ERRVALUE SerialWrite (SERIALIZER &serializer, const char *tagname=0) const
void SetActiveGroup (GRE_GROUP *group)
void SetKeepInTNTserverCache (bool keepInTNTserverCache)
void SetModified (bool notify=true, bool ViewsNeedRedraw=true)
int SetName (const MIUNICODE *newname)
void SetNeedUpdatePositions ()
void SetPosnMode (UINT8 posnmode)
int SetZoomToFitPage ()
ERRVALUE TemplateRead (SERIALIZER &serializer)
ERRVALUE TemplateWrite (SERIALIZER &serializer)
int UpdatePositions (bool ForceUpdate=true)
void ValidateGroupAttachments ()
virtual ~GRE_LAYOUT ()

Static Public Member Functions

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

Public Attributes

GRE_GROUPfirstgroup
DRECT2D FullExtents
LAYOUTPARMS HardcopyLayout
GRE_GROUPlastgroup
UINT8 PosnMode
double PosnScale

Protected Member Functions

virtual void ObjMgrInitItems ()

Member Enumeration Documentation

enum GRE_LAYOUT::CREATEFLAGS
 

Flags used in creation.

Enumeration values:
CREATEFLAG_None 
CREATEFLAG_Hardcopy  Create layout in "hardcopy" mode.
CREATEFLAG_DeferCreate  Defer creation until Create() called.

Definition at line 104 of file layout.h.


Constructor & Destructor Documentation

GRE_LAYOUT::GRE_LAYOUT CREATEFLAGS  flags = CREATEFLAG_None  )  [explicit]
 

Constructor.

virtual GRE_LAYOUT::~GRE_LAYOUT  )  [virtual]
 

Destructor.


Member Function Documentation

ERRVALUE GRE_LAYOUT::AddGroupLayer MDLGPARENT  dlgparent,
GRE_LAYER::TYPE  layertype,
GRE_LAYER **  player = 0
 

Dialog to add single-layer group and layer of specified type.

Should only be used for single-layer-group types (eg scalebar, text, legend).

Parameters:
player  Pointer to layer returned

ERRVALUE GRE_LAYOUT::AddGroupMulti MDLGPARENT  dlgparent  ) 
 

Dialog to prompt user for objects and add as multiple groups.

int GRE_LAYOUT::AddGroupSaved MDLGPARENT  dlgparent,
bool  fromtext
 

Dialog to prompt user for saved group and add to layout.

void GRE_LAYOUT::Create CREATEFLAGS  createflags = CREATEFLAG_None  ) 
 

Create layout if CREATEFLAG_DeferCreate was specified in constructor.

ERRVALUE GRE_LAYOUT::CreateGroup GRE_GROUP **  retgroup = 0,
GRE_GROUP::CREATEFLAGS  createflags = GRE_GROUP::CREATEFLAG_None,
GRE::LISTPOS  listpos = GRE::LISTPOS_After,
GRE_GROUP refgroup = 0
 

Create new group in this layout.

Parameters:
retgroup  New group returned
refgroup  Reference group for InsertBefore/InsertAfter

void GRE_LAYOUT::DestroyAllGroups  ) 
 

Destroy all groups in this layout This method must not be used if any groups exist which have been created on the stack.

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

Find layer using unique ID.

Implements GRE_VIEWABLE.

GRE_GROUP* GRE_LAYOUT::FindPointGroup const DPOINT2D point,
GRE_FIND_FLAGS  findflags,
const SPATREF::COORDREFSYS pPointCRS = NULL
const
 

Find group containing specified point.

GRE_GROUP* GRE_LAYOUT::GetActiveGroup  )  const [inline]
 

Get active group for this layout.

Definition at line 187 of file layout.h.

GRE_GROUP* GRE_LAYOUT::GetFirstGroup  )  const [inline]
 

Get first group in layout.

Definition at line 191 of file layout.h.

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

Get layout from object attached to Widget userData.

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

Get full layout name.

Parameters:
name  Name returned

Implements GRE_VIEWABLE.

DRECT2D GRE_LAYOUT::GetHardcopyMarginRect  )  const [inline]
 

Get "margin" rectangle in layout (page) coordinates.

Definition at line 200 of file layout.h.

DRECT2D GRE_LAYOUT::GetHardcopyPageRect  )  const [inline]
 

Get "page" rectangle in layout (page) coordinates.

Definition at line 211 of file layout.h.

DRECT2D GRE_LAYOUT::GetHardcopyPrintableRect  )  const [inline]
 

Get "printable" rectangle in layout (page) coordinates.

Definition at line 221 of file layout.h.

double GRE_LAYOUT::GetHardcopyScale  )  const [inline]
 

Get hardcopy layout scale.

Definition at line 231 of file layout.h.

double GRE_LAYOUT::GetHardcopyZoom  )  const [inline]
 

Get hardcopy zoom factor.

Definition at line 235 of file layout.h.

GRE_GROUP* GRE_LAYOUT::GetLastGroup  )  const [inline]
 

Get last group in layout.

Definition at line 239 of file layout.h.

MATTE& GRE_LAYOUT::GetMatte  )  [inline]
 

Get matte reference for layout.

Definition at line 243 of file layout.h.

GRE_LAYOUT* GRE_LAYOUT::GetNext  )  const [inline]
 

Get next layout.

Definition at line 247 of file layout.h.

virtual UINT32 GRE_LAYOUT::GetNextLayerID  )  const [virtual]
 

Get next available unique ID.

Implements GRE_VIEWABLE.

UINT8 GRE_LAYOUT::GetPosnMode  )  const [inline]
 

Get group positioning mode.

Definition at line 255 of file layout.h.

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

Compute dimensions of object based on scale and georeference.

Parameters:
sizemeters  Size returned in meters

Implements GRE_VIEWABLE.

bool GRE_LAYOUT::GroupControlsGetAutoRedraw  )  const
 

Return true if Auto-Redraw toggle is set on the Group Controls dialog.

int GRE_LAYOUT::GroupControlsGetLayoutUnits  )  const
 

Return the units for measurements in the Layout tab of the Group Controls dialog.

bool GRE_LAYOUT::GroupControlsIsOpen  )  const
 

Determine if the Group Controls dialog is open.

void GRE_LAYOUT::GroupControlsOpen MDLGPARENT  dlgparent = 0,
GRE_GROUP group = 0,
UINT32  flags = 0
 

Open the Group Controls dialog.

If already open, it is brought to the front. If group passed in is NULL (default) use the Active group.

Parameters:
dlgparent  Parent (0 to use default)
group  Group to show initially,
flags  MDISP_GCP_Xxxx

void GRE_LAYOUT::GroupControlsSetPrompts double  hoffset,
double  hsize,
double  voffset,
double  vsize,
double  relscale
 

Set the values of the size, spacing and relative zoom prompts in the Group Controls dialog.

This is used to temporarly change the values being reported in several of the prompts while a group is being moved or resized by an external tool. It is assumed that when the user releases the mouse, the tool will actually modify the group and the prompts will be restored to new "real" values.

This function should only be called by GRE_TOOL_PLACEMENT

Parameters:
hoffset  value for "Spacing" (horizontal)
hsize  value for "Width"
voffset  value for "Spacing" (vertical)
vsize  value for "Height"
relscale  value for "Relative Zoom"

void GRE_LAYOUT::GroupControlsSetTabLayout  ) 
 

Set the group controls dialog (if open) to the "layout" tab.

virtual bool GRE_LAYOUT::HasLayers  )  const [virtual]
 

Determine if layout has any layers.

Implements GRE_VIEWABLE.

bool GRE_LAYOUT::HasTempLayers  )  const
 

Determine if layout has any "temporary" layers.

void GRE_LAYOUT::InvalidateAllViews  ) 
 

Invalidate all view buffers for this layout.

bool GRE_LAYOUT::IsBeingLoaded  )  const [inline]
 

Determine if layout is currently being loaded.

Definition at line 318 of file layout.h.

bool GRE_LAYOUT::IsCreated  )  const [inline]
 

Determine if layout has been created.

This is done automatically by constructor unless CREATEFLAG_DeferCreate was specified.

Definition at line 323 of file layout.h.

bool GRE_LAYOUT::IsHardcopy  )  const [inline]
 

Determine if layout is in "hardcopy" mode.

Definition at line 327 of file layout.h.

bool GRE_LAYOUT::IsValid  )  const
 

Determine if layout is an existing GRE object.

bool GRE_LAYOUT::KeepInTNTserverCache  )  const [inline]
 

Determine if layout should be kept in TNTserver cache.

Definition at line 335 of file layout.h.

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

Create initial set of items in object manager.

Implements GRE_VIEWABLE.

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

Read from serialization.

Implements SERIALIZABLE.

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

Write values to serialization.

Implements SERIALIZABLE.

void GRE_LAYOUT::SetActiveGroup GRE_GROUP group  ) 
 

Set active group for layout.

void GRE_LAYOUT::SetKeepInTNTserverCache bool  keepInTNTserverCache  )  [inline]
 

Set whether layout should be retained in TNTserver cache.

Definition at line 355 of file layout.h.

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

Set that layout has been modified.

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

int GRE_LAYOUT::SetName const MIUNICODE newname  ) 
 

Set new layout name.

void GRE_LAYOUT::SetNeedUpdatePositions  )  [inline]
 

Set that group positions need to be recomputed.

Definition at line 374 of file layout.h.

void GRE_LAYOUT::SetPosnMode UINT8  posnmode  ) 
 

Set group positioning mode.

int GRE_LAYOUT::SetZoomToFitPage  ) 
 

Set hardcopy zoom to fit to page size.

void GRE_LAYOUT::SMLClassInstall SMLCONTEXT context  )  [static]
 

Install SML class, called by internal SML function.

Parameters:
context  SML context

Reimplemented from GRE_VIEWABLE.

ERRVALUE GRE_LAYOUT::TemplateRead SERIALIZER serializer  ) 
 

Read from template (serialization).

ERRVALUE GRE_LAYOUT::TemplateWrite SERIALIZER serializer  ) 
 

Write template to serialization.

int GRE_LAYOUT::UpdatePositions bool  ForceUpdate = true  ) 
 

Recompute group positions.

void GRE_LAYOUT::ValidateGroupAttachments  ) 
 

Validate and correct group attachments.


Member Data Documentation

GRE_GROUP* GRE_LAYOUT::firstgroup
 

First group in layout.

Definition at line 110 of file layout.h.

DRECT2D GRE_LAYOUT::FullExtents
 

Extents of entire layout in layout coordinates.

Definition at line 115 of file layout.h.

LAYOUTPARMS GRE_LAYOUT::HardcopyLayout
 

Used in map/poster layout mode.

Definition at line 113 of file layout.h.

GRE_GROUP* GRE_LAYOUT::lastgroup
 

Last group in layout.

Definition at line 111 of file layout.h.

UINT8 GRE_LAYOUT::PosnMode
 

Positioning mode, POSNMODE_...

Definition at line 112 of file layout.h.

double GRE_LAYOUT::PosnScale
 

Scale used for attachment offsets in group positioning (eg. 24000).

Definition at line 114 of file layout.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