GRE_LAYOUT Class Reference

#include <layout.h>

Inheritance diagram for GRE_LAYOUT:

Inheritance graph
[legend]
List of all members.

Public Types

enum  CREATEFLAGS { CREATEFLAG_None = 0x00, CREATEFLAG_Hardcopy = 0x10 }

Public Member Functions

 GRE_LAYOUT (CREATEFLAGS flags=CREATEFLAG_None)
virtual ~GRE_LAYOUT ()
int AddGroupLayer (MDLGPARENT dlgparent, GRE_LAYER::TYPE layertype)
int AddGroupMulti (MDLGPARENT dlgparent)
int AddGroupSaved (MDLGPARENT dlgparent, bool fromtext)
ERRVALUE CreateGroup (GRE_GROUP **retgroup, UINT32 flags=0, GRE_GROUP *refgroup=0)
void DestroyAllGroups ()
virtual ERRVALUE DrawAllViews (UINT32 drawflags=0)
virtual GRE_LAYERFindLayerByID (UINT32 LayerID) const
GRE_GROUPFindPointGroup (const DPOINT2D &point, const GCTPHANDLE gctph, UINT32 findflags) 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 ()
virtual UINT32 GetNextLayerID () const
UINT8 GetPosnMode () const
virtual ERRVALUE GetSizeMeters (DPOINT2D &sizemeters)
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
bool IsBeingLoaded () 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 UNICODE *newname)
void SetNeedUpdatePositions ()
void SetPosnMode (UINT8 posnmode)
int SetZoomToFitPage ()
ERRVALUE TemplateRead (SERIALIZER &serializer)
ERRVALUE TemplateWrite (SERIALIZER &serializer)
int UpdatePositions (bool ForceUpdate=true)
void ValidateGroupAttachments ()

Static Public Member Functions

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

Public Attributes

GRE_GROUPfirstgroup
GRE_GROUPlastgroup
GRE_GROUPactivegroup
UINT8 PosnMode
UINT8 ElemSelectMode
GRE_LAYOUTprevlayout
GRE_LAYOUTnextlayout
LAYOUTPARMS HardcopyLayout
double PosnScale
DRECT2D FullExtents

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.

Definition at line 72 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

int GRE_LAYOUT::AddGroupLayer MDLGPARENT  dlgparent,
GRE_LAYER::TYPE  layertype
 

Dialog to add group and layer of specified type.

int 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.

ERRVALUE GRE_LAYOUT::CreateGroup GRE_GROUP **  retgroup,
UINT32  flags = 0,
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 ERRVALUE GRE_LAYOUT::DrawAllViews UINT32  drawflags = 0  )  [virtual]
 

Draw all views of this layout.

Implements GRE_VIEWABLE.

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,
const GCTPHANDLE  gctph,
UINT32  findflags
const
 

Find group containing specified point.

GRE_GROUP* GRE_LAYOUT::GetActiveGroup  )  const [inline]
 

Get active group for this layout.

Definition at line 159 of file layout.h.

GRE_LAYOUT* GRE_LAYOUT::GetFirst  )  [inline, static]
 

Get first layout in GRE system.

Definition at line 89 of file layout.h.

GRE_GROUP* GRE_LAYOUT::GetFirstGroup  )  const [inline]
 

Get first group in layout.

Definition at line 165 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 174 of file layout.h.

DRECT2D GRE_LAYOUT::GetHardcopyPageRect  )  const [inline]
 

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

Definition at line 185 of file layout.h.

DRECT2D GRE_LAYOUT::GetHardcopyPrintableRect  )  const [inline]
 

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

Definition at line 195 of file layout.h.

double GRE_LAYOUT::GetHardcopyScale  )  const [inline]
 

Get hardcopy layout scale.

Definition at line 205 of file layout.h.

double GRE_LAYOUT::GetHardcopyZoom  )  const [inline]
 

Get hardcopy zoom factor.

Definition at line 209 of file layout.h.

GRE_GROUP* GRE_LAYOUT::GetLastGroup  )  const [inline]
 

Get last group in layout.

Definition at line 213 of file layout.h.

MATTE& GRE_LAYOUT::GetMatte  )  [inline]
 

Get matte reference for layout.

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

bool GRE_LAYOUT::IsBeingLoaded  )  const [inline]
 

Determine if layout is currently being loaded.

Definition at line 284 of file layout.h.

bool GRE_LAYOUT::IsHardcopy  )  const [inline]
 

Determine if layout is in "hardcopy" mode.

Definition at line 288 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 296 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 316 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 UNICODE newname  ) 
 

Set new layout name.

void GRE_LAYOUT::SetNeedUpdatePositions  )  [inline]
 

Set that group positions need to be recomputed.

Definition at line 335 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::activegroup
 

Currently active group for layout.

Definition at line 79 of file layout.h.

UINT8 GRE_LAYOUT::ElemSelectMode
 

Element selection mode.

Definition at line 81 of file layout.h.

GRE_GROUP* GRE_LAYOUT::firstgroup
 

First group in layout.

Definition at line 77 of file layout.h.

DRECT2D GRE_LAYOUT::FullExtents
 

Extents of entire layout in layout coordinates.

Definition at line 86 of file layout.h.

LAYOUTPARMS GRE_LAYOUT::HardcopyLayout
 

Used in map/poster layout mode.

Definition at line 84 of file layout.h.

GRE_GROUP* GRE_LAYOUT::lastgroup
 

Last group in layout.

Definition at line 78 of file layout.h.

GRE_LAYOUT* GRE_LAYOUT::nextlayout
 

Pointer to "next" layout if multiple layouts are in use.

Definition at line 83 of file layout.h.

UINT8 GRE_LAYOUT::PosnMode
 

Positioning mode, POSNMODE_...

Definition at line 80 of file layout.h.

double GRE_LAYOUT::PosnScale
 

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

Definition at line 85 of file layout.h.

GRE_LAYOUT* GRE_LAYOUT::prevlayout
 

Pointer to "previous" layout if multiple layouts are in use.

Definition at line 82 of file layout.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 12 06:26:44 2004 for TNTsdk by doxygen 1.3.4-20031026