SUMap Class Reference

Represents the ShapeUp map window. More...

#include <ShapeUpAPI.h>

Inheritance diagram for SUMap:

SUObject List of all members.

Public Member Functions

 SUMap (SUHANDLE hMap)
void GetBounds (SURectf &r)
void GetViewSize (SUSize &s)
void GPtoDP (const SUPointf &p, SUPoint &pt)
void DPtoGP (const SUPoint &p, SUPointf &pt)
HWND GetHWND ()
void Repaint (bool bFullRedraw)
void Draw (HDC hdc, const SUSize &imagesize, const SUPointf &center, double geoWidth=0., double geoHeight=0.)
void CenterMap (const SUPointf &pt)
void CenterMap (double x, double y)
void Zoom (double factor)
void ZoomToSelection (SUHANDLE hTheme)
void ZoomToExtent (SUHANDLE hTheme)
unsigned long GetInteractionState ()
void SetInteractionState (unsigned long state)

Detailed Description

Each ShapeUp workspace contains a ShapeUp map window. This window may be used to overlay graphics, or change the view of the graphics within it.

The ShapeUp map also maintaines an interaction state, MAPSTATE, which controls the behaviour of the map presented to the user.


Constructor & Destructor Documentation

SUMap::SUMap ( SUHANDLE  hMap  )  [inline]

Constructor.

Parameters:
hMap = handle to a ShapeUp map window.
See also:
SUWorkspace::GetMapWindow(), Workspace_GetMapWindow()


Member Function Documentation

void SUMap::GetBounds ( SURectf r  )  [inline]

Retrieves the geographical bounds of the map window.

Parameters:
r = a SURectf that will receive the bounds.
See also:
Map_GetBounds()

void SUMap::GetViewSize ( SUSize s  )  [inline]

Retrieves the view size in device units of the map window.

Parameters:
s = a SUSize that will receive the size.
See also:
Map_GetViewSize()

void SUMap::GPtoDP ( const SUPointf p,
SUPoint pt 
) [inline]

Converts geographical points, GP, to device points, DP.

Parameters:
p = a SUPointf containing the geographical points.
pt = a SUPoint that will receive the device points.
See also:
Map_GetViewSize()

void SUMap::DPtoGP ( const SUPoint p,
SUPointf pt 
) [inline]

Converts device points, DP, to geographical points, GP.

Parameters:
p = a SUPoint containing the device points.
pt = a SUPointf that will receive the geographical points.
See also:
Map_GetViewSize()

HWND SUMap::GetHWND (  )  [inline]

Gets access to the ShapeUp map window.

Returns:
Returns the windows handle to the map window.
See also:
Map_GetHWND()

void SUMap::Repaint ( bool  bFullRedraw  )  [inline]

Forces the map window to repaint itself. The map is rendered in two steps. First all map objects are drawn to a background buffer. Then that buffer is painted on the map, and on top of that, temporary objects are drawn. Temporary objects are rubber rectangles, bookmark icons, shapes being drawn, etc.

Parameters:
bFullRedraw if true, all map objects are redrawn, and if false, the background buffer is used to paint the map objects and only the top items are redrawn.
See also:
Map_Repaint()

void SUMap::Draw ( HDC  hdc,
const SUSize imagesize,
const SUPointf center,
double  geoWidth = 0.,
double  geoHeight = 0. 
) [inline]

Paints the current map to a dc.

See also:
Map_Draw()

void SUMap::CenterMap ( const SUPointf pt  )  [inline]

Centers the map.

Parameters:
pt is the new center point.
See also:
Map_GetViewSize()

void SUMap::CenterMap ( double  x,
double  y 
) [inline]

Centers the map.

Parameters:
x is the new center point east-west component.
y is the new center point north-south component.
See also:
Map_GetViewSize()

void SUMap::Zoom ( double  factor  )  [inline]

Zooms the map.

Parameters:
factor is the factor used to zoom the map. 0.0 < factor < 1.0 zooms in, and 1.0 < factor zooms out.
See also:
Map_Zoom()

void SUMap::ZoomToSelection ( SUHANDLE  hTheme  )  [inline]

Zooms the map to the extent of selected shapes in a layer.

Parameters:
hTheme is a handle to a ShapeUp theme, or a SUTheme object, in which to find selected ojects.
See also:
Map_Zoom()

void SUMap::ZoomToExtent ( SUHANDLE  hTheme  )  [inline]

Zooms the map to the extent of a layer.

Parameters:
hTheme is a handle to a ShapeUp theme, or a SUTheme object.
See also:
Map_ZoomToExtent()

unsigned long SUMap::GetInteractionState (  )  [inline]

Returns the current map interaction state. The interaction state is a value indicating what the user is about to do, or is doing, in the map. This is in short the state of the mutual exclusive toolbar buttons like select, rectangle select, circle select, etc. This can be used to add new states to the map.

Returns:
A ShapeUp map interaction state.
See also:
SetInteractionState(), Map_GetInteractionState(), MAPSTATE

void SUMap::SetInteractionState ( unsigned long  state  )  [inline]

Sets a new map interaction state. The interaction state is a value indicating what the user is about to do, or is doing, in the map. This is in short the state of the mutual exclusive toolbar buttons like select, rectangle select, circle select, etc. This can be used to add new states to the map.

Parameters:
state is the new state. It must be one of the defined map interaction states. Note: Not all map states defined can be set. Check MAPSTATE for more info.
See also:
GetInteractionState(), Map_SetInteractionState(), MAPSTATE


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 10:55:35 2010 for ShapeUp API by  doxygen 1.5.2