00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #ifndef INC_GRE_VIEW_H
00056 #define INC_GRE_VIEW_H
00057
00058 #if !defined(INC_MI32_STDAFX_H) && defined(WIN32_MFC)
00059 #include <mi32/stdafx.h>
00060 #endif
00061
00062 #if !defined(_OXTOOLTIPCTRL_H__) && defined(WIN32_MFC)
00063 #include <mgui/oxttctrl.h>
00064 #endif
00065
00066 #if !defined(INC_MI32_GRTOOL_H) && defined(WIN32_MFC)
00067 #include <mi32/grtool.h>
00068 #endif
00069
00070 #ifndef INC_GRE_OBJECTBASE_H
00071 #include <gre/viewable.h>
00072 #endif
00073
00074 #ifndef INC_GRE_VIEWSCRIPT_H
00075 #include <gre/viewscript.h>
00076 #endif
00077
00078 #ifndef INC_GRE_GEOLOCK_H
00079 #include <gre/geolock.h>
00080 #endif
00081
00082 #if !defined(INC_MI32_XDEFNS_H) && defined(X_NATIVE)
00083 #include <mi32/xdefns.h>
00084 #endif
00085
00086 #ifndef INC_MI32_SERIALIZ_H
00087 #include <mi32/serializ.h>
00088 #endif
00089
00090 #ifndef INC_MI32_MGD_H
00091 #include <mi32/mgd.h>
00092 #endif
00093
00094 #ifndef INC_MI32_TRANS2DC_H
00095 #include <mi32/trans2dc.h>
00096 #endif
00097
00098 #ifndef INC_MI32_UNITCONV_H
00099 #include <mi32/unitconv.h>
00100 #endif
00101
00102 #ifndef INC_MI32_MXSTEREO_H
00103 #include <mi32/mxstereo.h>
00104 #endif
00105
00106 #ifndef INC_MI32_GRTREE_H
00107 #include <mi32/grtree.h>
00108 #endif
00109
00110 #ifndef INC_MI32_LATLONFM_H
00111 #include <mi32/latlonfm.h>
00112 #endif
00113
00114 namespace RVC {
00115 class ELEMENT;
00116 }
00117
00118 namespace GRE {
00119 class DLG_VIEWZOOM;
00120 }
00121
00122 union SMLARG;
00123
00124
00125 enum GRE_PROJACCUR {
00126 GRE_PROJACCUR_Affine = 1,
00127 GRE_PROJACCUR_Exact = 2,
00128 GRE_PROJACCUR_Auto = 3,
00129 };
00130
00131 enum VIEWFLAGS {
00132 VIEWFLAG_None = 0,
00133 VIEWFLAG_Locator = 0x00000001,
00134 VIEWFLAG_3D = 0x00000002,
00135 VIEWFLAG_ForceOneToOne = 0x00000004,
00136 VIEWFLAG_ScaleOneToOne = 0x00000008,
00137 VIEWFLAG_AllowDiffZoom = 0x00000010,
00138 VIEWFLAG_Hardcopy = 0x00000020,
00139 VIEWFLAG_DisableHotKeys = 0x00000040,
00140 VIEWFLAG_NoDrawLayers = 0x00000080,
00141 VIEWFLAG_NoDestroyShell = 0x00000100,
00142 VIEWFLAG_DidAttach = 0x00000200,
00143 VIEWFLAG_DialogModal = 0x00000400,
00144 VIEWFLAG_AllowGeoLock = 0x00000800,
00145 VIEWFLAG_NoCloseOption = 0x00001000,
00146 VIEWFLAG_DestroyOnClose = 0x00002000,
00147 VIEWFLAG_NoSetPixmapBG = 0x00004000,
00148 VIEWFLAG_NoSetPrevViewPos = 0x00008000,
00149 VIEWFLAG_DisableDataTips = 0x00010000,
00150 VIEWFLAG_AutoPanGPS = 0x00040000,
00151 VIEWFLAG_NoBlankScreen = 0x00080000,
00152 VIEWFLAG_NoEditColorHighlight = 0x00100000,
00153 VIEWFLAG_NoFillBackground = 0x00200000,
00154 VIEWFLAG_NoShowTrackingCursor = 0x00800000,
00155 VIEWFLAG_NoLegendView = 0x01000000,
00156 VIEWFLAG_AlwaysTestCancel = 0x02000000,
00157 VIEWFLAG_NoDrawOtherViews = 0x04000000,
00158 VIEWFLAG_NoShowInLocator = 0x08000000,
00159
00160 VIEWFLAG_SaveMask = (VIEWFLAG_AllowDiffZoom)
00161 };
00162 DEFINE_ENUM_OP_BITWISE(VIEWFLAGS);
00163
00164 #define GRE_MaxPrevViews 10
00165
00166
00167 #define MDISPICONVIEW_ViewFull 0x00000001
00168 #define MDISPICONVIEW_ViewPrevious 0x00000002
00169 #define MDISPICONVIEW_ViewPrevZoom 0x00000004
00170 #define MDISPICONVIEW_ViewZoomIn 0x00000008
00171 #define MDISPICONVIEW_ViewZoomOut 0x00000010
00172 #define MDISPICONVIEW_ViewZoom1X 0x00000020
00173 #define MDISPICONVIEW_ViewZoomToGroup 0x00000040
00174 #define MDISPICONVIEW_ViewZoomToLayer 0x00000080
00175 #define MDISPICONVIEW_ViewLocator 0x00000100
00176 #define MDISPICONVIEW_ViewSnapshot 0x00000200
00177 #define MDISPICONVIEW_ViewZoom2X 0x00000400
00178 #define MDISPICONVIEW_ViewZoom3X 0x00000800
00179 #define MDISPICONVIEW_ViewGeoLock 0x00001000
00180 #define MDISPICONVIEW_ViewZoomToLoc 0x00002000
00181 #define MDISPICONVIEW_ViewDefault 0x000030FF
00182
00183
00184
00185
00186 class GRE_TOOL {
00187 public:
00188
00189
00190 GRE_TOOL (
00191 GRE_VIEW *view,
00192 #ifdef WIN32_NATIVE
00193 const char *toolname
00194 #else
00195 const char *toolname,
00196 const char *iconname,
00197 const char *icongroup=NULL,
00198 const char *helpcode=NULL
00199 #endif
00200 );
00201
00202
00203 GRE_TOOL (
00204 GRE_VIEW *view,
00205 ICID icidmenu,
00206 ICID icidicon,
00207 #ifdef WIN32_NATIVE
00208 const char *toolname
00209 #else
00210 const char *toolname,
00211 const char *iconname,
00212 const char *icongroup=NULL,
00213 const char *helpcode=NULL
00214 #endif
00215 );
00216
00217 virtual ~GRE_TOOL ();
00218
00219
00220 void Activate (
00221 );
00222
00223
00224 void Deactivate (
00225 );
00226
00227 #ifdef X_NATIVE
00228
00229 const char* GetHelpCode (
00230 ) const { return (m_HelpCode); }
00231
00232
00233 const char* GetIconGroup (
00234 ) const { return (m_IconGroup); }
00235
00236
00237 const char* GetIconName (
00238 ) const { return (m_IconName); }
00239 #endif
00240
00241
00242 const char* GetName (
00243 ) const { return (m_ToolName); }
00244
00245
00246 GRE_VIEW* GetView (
00247 ) const { return (m_view); }
00248
00249 #ifdef X_NATIVE
00250
00251 Widget GetMenuWidget (
00252 ) const { return (m_MenuWidget); }
00253
00254
00255 Widget GetToolbarWidget (
00256 ) const { return (m_ToolbarWidget); }
00257 #endif
00258
00259
00260 bool IsDisabled (
00261 ) const { return (m_IsDisabled); }
00262
00263
00264
00265 virtual bool IsScript (
00266 ) const;
00267
00268 #ifdef X_NATIVE
00269
00270 void SetupButtonItem (
00271 BUTTONITEM& item
00272 );
00273
00274
00275 void SetupMenuItem (
00276 MENUITEM& item
00277 );
00278
00279
00280 void SetSensitive (
00281 bool sensitive = true
00282 );
00283 #endif
00284
00285
00286
00287 bool Suspend (
00288 );
00289
00290
00291 void Resume (
00292 );
00293
00294 protected:
00295
00296 GRE_VIEW* m_view;
00297
00298 void SetName (
00299 const MISTRING& name
00300 ) { m_ToolNameStr = name; }
00301
00302 private:
00303 #ifndef GENERATING_DOXYGEN_OUTPUT
00304
00305 enum TOOLSTATE {
00306 STATE_NotInitialized = 0,
00307 STATE_Inactive,
00308 STATE_Active,
00309 STATE_NoLayers,
00310 STATE_Suspended
00311 };
00312
00313 char *m_ToolName;
00314 #ifdef X_NATIVE
00315 char *m_IconName;
00316 char *m_IconGroup;
00317 char *m_HelpCode;
00318 #endif
00319 TOOLSTATE m_state;
00320 bool m_IsDisabled;
00321 ICID m_icidmenu;
00322 ICID m_icidicon;
00323 #ifdef X_NATIVE
00324 Widget m_MenuWidget;
00325 Widget m_ToolbarWidget;
00326 #endif
00327 MISTRING m_ToolNameStr;
00328
00329 #endif // GENERATING_DOXYGEN_OUTPUT
00330
00331
00332
00333 virtual bool DoActivate () = 0;
00334 virtual void DoDeactivate () = 0;
00335 virtual bool DoInitialize ();
00336 virtual void DoSuspend ();
00337 virtual void DoResume ();
00338 };
00339
00340 #ifndef GENERATING_DOXYGEN_OUTPUT
00341
00342 class _MDISPTOOL : public GRE_TOOL {
00343 public:
00344
00345 void *privptr;
00346 GRE_VIEW *view;
00347
00348 _MDISPTOOL (
00349 GRE_VIEW *view,
00350 const char *toolname,
00351 const char *iconname,
00352 const char *icongroup,
00353 const char *helpcode,
00354 int (*Init)(_MDISPTOOL*),
00355 int (*Stop)(_MDISPTOOL*),
00356 int (*Activate)(_MDISPTOOL*),
00357 int (*Deactivate)(_MDISPTOOL*),
00358 int (*Suspend)(_MDISPTOOL*),
00359 int (*Resume)(_MDISPTOOL*)
00360 );
00361
00362 _MDISPTOOL (
00363 GRE_VIEW *view,
00364 const char *toolname,
00365 const char *iconname,
00366 const char *icongroup,
00367 const char *helpcode,
00368 ICID icidmenu,
00369 ICID icidicon,
00370 int (*Init)(_MDISPTOOL*),
00371 int (*Stop)(_MDISPTOOL*),
00372 int (*Activate)(_MDISPTOOL*),
00373 int (*Deactivate)(_MDISPTOOL*),
00374 int (*Suspend)(_MDISPTOOL*),
00375 int (*Resume)(_MDISPTOOL*)
00376 );
00377
00378 virtual ~_MDISPTOOL ();
00379
00380 private:
00381
00382 virtual bool DoActivate ();
00383 virtual void DoDeactivate ();
00384 virtual bool DoInitialize ();
00385 virtual void DoSuspend ();
00386 virtual void DoResume ();
00387
00388 int (*OldInit)(_MDISPTOOL*);
00389 int (*OldStop)(_MDISPTOOL*);
00390 int (*OldActivate)(_MDISPTOOL*);
00391 int (*OldDeactivate)(_MDISPTOOL*);
00392 int (*OldSuspend)(_MDISPTOOL*);
00393 int (*OldResume)(_MDISPTOOL*);
00394 };
00395 typedef _MDISPTOOL *MDISPTOOL;
00396 #endif // GENERATING_DOXYGEN_OUTPUT
00397
00398
00399
00400 class GRE_VIEW : public GRE_OBJECT {
00401
00402 private:
00403 #ifndef GENERATING_DOXYGEN_OUTPUT
00404 class STATUSINFO;
00405 #endif // GENERATING_DOXYGEN_OUTPUT
00406
00407 public:
00408
00409 enum COORDSOURCE {
00410 COORDSOURCE_None,
00411 COORDSOURCE_Mouse,
00412 COORDSOURCE_ViewCenter,
00413 COORDSOURCE_Entered,
00414 COORDSOURCE_GPS,
00415 COORDSOURCE_COUNT
00416 };
00417
00418
00419
00420 class GLOBALOPTIONS {
00421 public:
00422
00423 class FORM;
00424
00425 GLOBALOPTIONS (
00426 );
00427
00428 ~GLOBALOPTIONS () {}
00429
00430 #ifdef X_NATIVE
00431 Widget CreateEditForm (
00432 Widget parent,
00433 const Arg *arglist,
00434 int argcount
00435 );
00436 #endif
00437
00438 bool GetAutoOpen3dViewCtrl () const { return (m_AutoOpen3dViewCtrl); }
00439 int GetAutoRedrawDelay () const { return (m_AutoRedrawDelay); }
00440 bool GetDefaultGeoLocked () const { return (m_DefaultGeoLocked); }
00441 bool GetDrawLayerOnUnhide () const { return (m_DrawLayerOnUnhide); }
00442 bool GetRedrawOnAnyChange () const { return (m_RedrawOnAnyChange); }
00443 bool GetUseAntialiasing() const {return (m_UseAntialiasing); }
00444 bool GetThinLineWidthHinting() const {return (m_ThinLineWidthHinting); }
00445 UINT16 GetRefreshInterval () const { return (m_RefreshInterval); }
00446 bool GetTrackCursor () const { return (m_TrackCursor); }
00447 const COLOR& GetTrackCursorColor () const { return (m_TrackCursorColor); }
00448 bool GetUpdateAfterDrawLayer () const { return (m_UpdateAfterDrawLayer); }
00449 bool GetZoomPanWaitForRMB () const { return (m_ZoomPanWaitForRMB); }
00450
00451 void IniRead (
00452 const char *inigroup = 0
00453 );
00454
00455 void IniWrite (
00456 const char *inigroup = 0
00457 ) const;
00458
00459 void SetAutoOpen3dViewCtrl (bool AutoOpen3dViewCtrl) { m_AutoOpen3dViewCtrl = AutoOpen3dViewCtrl; }
00460 void SetAutoRedrawDelay (int AutoRedrawDelay) { m_AutoRedrawDelay = AutoRedrawDelay; }
00461 void SetUseAntialiasing (bool Antialias) { m_UseAntialiasing = Antialias; }
00462 void SetThinLineWidthHinting (bool hint) { m_ThinLineWidthHinting = hint; }
00463 void SetDefaultGeoLocked (bool DefaultGeoLocked) { m_DefaultGeoLocked = DefaultGeoLocked; }
00464 void SetDrawLayerOnUnhide (bool DrawLayerOnUnhide) { m_DrawLayerOnUnhide = DrawLayerOnUnhide; }
00465 void SetRedrawOnAnyChange (bool RedrawOnAnyChange) { m_RedrawOnAnyChange = RedrawOnAnyChange; }
00466 void SetRefreshInterval (UINT16 RefreshInterval) { m_RefreshInterval = RefreshInterval; }
00467 void SetTrackCursor (bool TrackCursor) { m_TrackCursor = TrackCursor; }
00468 void SetTrackCursorColor (const COLOR& TrackCursorColor) { m_TrackCursorColor = TrackCursorColor; }
00469 void SetUpdateAfterDrawLayer (bool UpdateAfterDrawLayer) { m_UpdateAfterDrawLayer = UpdateAfterDrawLayer; }
00470 void SetZoomPanWaitForRMB (bool ZoomPanWaitForRMB) { m_ZoomPanWaitForRMB = ZoomPanWaitForRMB; }
00471
00472 private:
00473 #ifndef GENERATING_DOXYGEN_OUTPUT
00474 bool m_RedrawOnAnyChange;
00475 bool m_DrawLayerOnUnhide;
00476 bool m_UseAntialiasing;
00477 bool m_ThinLineWidthHinting;
00478 bool m_UpdateAfterDrawLayer;
00479 bool m_EnableTransparency;
00480 bool m_TrackCursor;
00481 bool m_ZoomPanWaitForRMB;
00482 bool m_AutoOpen3dViewCtrl;
00483 bool m_DefaultGeoLocked;
00484 UINT16 m_RefreshInterval;
00485 COLOR m_TrackCursorColor;
00486 int m_AutoRedrawDelay;
00487
00488 friend class GRE_VIEW;
00489 #endif // GENERATING_DOXYGEN_OUTPUT
00490 };
00491
00492 class SAVESETTINGS : public SERIALIZABLE {
00493 public:
00494
00495 SAVESETTINGS ();
00496 ~SAVESETTINGS ();
00497
00498 void IniRead (INIHANDLE handle, const char *inigroup);
00499 void IniWrite (INIHANDLE handle, const char *inigroup);
00500
00501 private:
00502 #ifndef GENERATING_DOXYGEN_OUTPUT
00503
00504 struct STATUSPOS {
00505 bool m_Show;
00506 bool m_IsProjSet;
00507 UINT8 m_UnitCode;
00508 MAPPROJPARM m_Proj;
00509 DEGTOSTRFLAGS m_LatLonFormat;
00510 static const SERIALIZER::ITEMDEF* SerialGetItemDef ();
00511 STATUSPOS ();
00512 };
00513
00514 STATUSPOS m_StatusPos1;
00515 STATUSPOS m_StatusPos2;
00516
00517 static const SERIALIZER::ITEMDEF* SerialGetItemDef ();
00518
00519
00520 virtual ERRVALUE SerialRead (SERIALIZER& serializer);
00521 virtual ERRVALUE SerialWrite (SERIALIZER& serializer, const char *tagname = 0) const;
00522
00523 friend class GRE_VIEW;
00524 friend class STATUSINFO;
00525 friend struct STATUSPOS;
00526 #endif // GENERATING_DOXYGEN_OUTPUT
00527 };
00528
00529
00530
00531 class VIEWPOSN {
00532 public:
00533 MAT3X3 ViewToDisp, DispToView;
00534 DPOINT2D centerpoint;
00535 DPOINT2D zoom;
00536 DPOINT2D usedzoom;
00537 double MapScale;
00538
00539 VIEWPOSN ();
00540 };
00541
00542 #ifdef X_NATIVE
00543 Pixmap pixmap;
00544 MgdDISPLAY sdisp;
00545 MGD_GC *sgc;
00546 MgdDISPLAY pdisp;
00547 MGD_GC *pgc;
00548 #endif
00549 MgdDISPLAY gdisp;
00550 MGD_GC *ggc;
00551 MgdDISPLAY mdisp;
00552 MGD_GC *mgc;
00553
00554
00555
00556 static bool EditGlobalSettings (
00557 MDLGPARENT dlgparent
00558 );
00559
00560
00561 static bool GetDrawLayerOnUnhide (
00562 ) { return (s_GlobalOptions.m_DrawLayerOnUnhide); }
00563
00564
00565 static GRE_VIEW* GetFirst (
00566 ) { return (s_FirstView); }
00567
00568
00569 static int GetGlobalAutoRedrawDelay (
00570 ) { return (s_GlobalOptions.m_AutoRedrawDelay); };
00571
00572
00573 static const GLOBALOPTIONS& GetGlobalOptions (
00574 ) { InitStatic(); return (s_GlobalOptions); }
00575
00576
00577 static bool GetRedrawOnAnyChange (
00578 ) { return (s_GlobalOptions.m_RedrawOnAnyChange); }
00579
00580
00581 static UINT8 GetStereoMode (
00582 ) { return (s_StereoParm.StereoMode); }
00583
00584
00585 static bool GetUpdateAfterDrawLayer (
00586 ) { return (s_GlobalOptions.m_UpdateAfterDrawLayer); }
00587
00588
00589
00590 static bool GetZoomPanWaitForRMB (
00591 ) { return (s_GlobalOptions.m_ZoomPanWaitForRMB); }
00592
00593
00594 static void SetEnableTransparency (
00595 bool EnableTransparency
00596 ) { s_GlobalOptions.m_EnableTransparency = EnableTransparency; }
00597
00598
00599 static void SetGlobalAutoRedrawDelay (
00600 int AutoRedrawDelay
00601 ) { s_GlobalOptions.m_AutoRedrawDelay = AutoRedrawDelay; }
00602
00603
00604 static void SetGlobalOptions (
00605 const GLOBALOPTIONS& options
00606 );
00607
00608
00609 static void SetGlobalZoomPanWaitForRMB (
00610 bool ZoomPanWaitForRMB
00611 ) { s_GlobalOptions.m_ZoomPanWaitForRMB = ZoomPanWaitForRMB; }
00612
00613
00614 static void SetRedrawOnAnyChange (
00615 bool RedrawOnAnyChange
00616 ) { s_GlobalOptions.m_RedrawOnAnyChange = RedrawOnAnyChange; }
00617
00618
00619 static void SetTrackCursor (
00620 bool TrackCursor
00621 ) { s_GlobalOptions.m_TrackCursor = TrackCursor; }
00622
00623
00624 static void SetUpdateAfterDrawLayer (
00625 bool UpdateAfterDrawLayer
00626 ) { s_GlobalOptions.m_UpdateAfterDrawLayer = UpdateAfterDrawLayer; }
00627
00628
00629 static void SMLClassInstall (
00630 SMLCONTEXT *context
00631 );
00632
00633
00634
00635
00636 GRE_VIEW ();
00637
00638
00639 virtual ~GRE_VIEW ();
00640
00641 #ifdef X_NATIVE
00642
00643 void AddDftViewIcons (
00644 UINT32 flags = 0
00645 );
00646
00647
00648 void AddDrawIcons (
00649 UINT32 flags = 0
00650 );
00651
00652
00653 Widget AddIconRowItems (
00654 const BUTTONITEM *items,
00655 const char *icongroup = 0,
00656 void *cbdata = 0,
00657 void *userdata = 0
00658 );
00659
00660
00661 void AddMacroScriptIcons (
00662 );
00663
00664
00665 void AddMacroScriptMenuItems (
00666 );
00667
00668
00669 ERRVALUE AddMenuItemsOptions (
00670 const MENUITEM *newitems
00671 );
00672
00673
00674 void AddToolIcons (
00675 bool addscripts = true
00676 );
00677
00678 #endif
00679
00680
00681 void CancelDrawing (
00682 int err = EUserCancel
00683 ) { m_CancelDraw = err; }
00684
00685
00686 void ClearMessage (
00687 ) const;
00688
00689
00690 void ClearPreviousViewList (
00691 ) { m_PrevViewIndex = 0; return; }
00692
00693
00694 bool ContainsLayer (
00695 const GRE_LAYER *layer
00696 ) const;
00697
00698
00699
00700 double ConvertScreenUnits (
00701 GRE_LAYER *layer,
00702 double value,
00703 int iunits,
00704 int ounits
00705 );
00706
00707
00708 ERRVALUE Create (
00709 GRE_VIEWABLE *viewable,
00710 int iwidth,
00711 int iheight,
00712 UINT32 flags
00713 );
00714
00715 #ifdef X_NATIVE
00716
00717
00718 Widget CreateMenuBar (
00719 Widget form,
00720 MENUBARITEM *menubar,
00721 UINT32 flags = 0
00722 );
00723 #endif
00724
00725 #ifdef X_NATIVE
00726
00727
00728 Widget CreateMenuBar (
00729 Widget form,
00730 UINT32 flags = 0
00731 );
00732 #endif
00733
00734 #ifdef X_NATIVE
00735 ERRVALUE CreateX (
00736 GRE_VIEWABLE *viewable,
00737 Widget pwidget,
00738 Arg *arglist,
00739 int argcount,
00740 int iwidth,
00741 int iheight,
00742 const char *sizefield,
00743 UINT32 flags,
00744 const SAVESETTINGS *pSettings = 0
00745 );
00746 #endif
00747
00748
00749
00750 ERRVALUE DataTipGetString (
00751 const DPOINT2D& point, //!< Point to obtain DataTip for
00752 MISTRING& string, //!< String to fill in, will be cleared first
00753 UINT32 findflags, //!< MDISPFIND_ViewCoords or MDISPFIND_DisplayCoords
00754 int maxlines = 0 //!< Approximate maximum number of lines, 0 for no maximum
00755 ) const;
00756 */
00757
00758
00759 void DisableHotKeys (
00760 ) { m_viewflags |= VIEWFLAG_DisableHotKeys; }
00761
00762
00763 void DisableRedraw (
00764 ) { ++m_DisableRedraw; }
00765
00766
00767 ERRVALUE Draw (
00768 );
00769
00770
00771
00772 int DrawDirect (
00773 UINT32 drawflags = 0
00774 );
00775
00776
00777 ERRVALUE DrawGroup (
00778 GRE_GROUP *group,
00779 UINT32 drawflags
00780 );
00781
00782
00783
00784 int DrawIfNeeded (
00785 );
00786
00787
00788 ERRVALUE DrawIfAutoUpdate (
00789 ) { if (s_GlobalOptions.m_RedrawOnAnyChange) return (Draw()); return (0); }
00790
00791
00792 ERRVALUE DrawLayer (
00793 GRE_LAYER *layer,
00794 UINT32 drawflags = 0
00795 );
00796
00797
00798 ERRVALUE DrawLayerElement (
00799 GRE_LAYER *layer,
00800 ELEMTYPE ElemType,
00801 INT32 ElemNum,
00802 UINT32 drawflags
00803 );
00804
00805
00806 ERRVALUE DrawLayerElements (
00807 GRE_LAYER *layer,
00808 ELEMTYPE ElemType,
00809 const UINT8 *ElemSet,
00810 UINT32 drawflags
00811 );
00812
00813
00814
00815 void DrawMargins (
00816 MGD::CONTEXT* gc = 0
00817 );
00818
00819
00820
00821 void DrawPage (
00822 MGD::CONTEXT* gc = 0
00823 );
00824
00825
00826
00827 int EditColors (
00828 );
00829
00830
00831 void EditCustomization (
00832 );
00833
00834
00835 void EnableHotKeys (
00836 ) { m_viewflags -= VIEWFLAG_DisableHotKeys; }
00837
00838
00839 void EnableRedraw (
00840 ) { if (m_DisableRedraw > 0) --m_DisableRedraw; }
00841
00842
00843
00844 INT32 FindClosestLayerElement (
00845 GRE_LAYER *layer,
00846 int component,
00847 const DPOINT2D& point,
00848 double *distret,
00849 UINT32 flags
00850 );
00851
00852
00853
00854 GRE_GROUP* FindPointGroup (
00855 const DPOINT2D& point,
00856 GCTPHANDLE gctph,
00857 UINT32 findflags
00858 ) const;
00859
00860
00861 const COLOR& GetActiveColor (
00862 ) const { return (m_ActiveColor); }
00863
00864
00865 GRE_TOOL* GetActiveTool (
00866 ) const { return (m_ActiveTool); }
00867
00868 bool GetAutoRedrawSolid (
00869 ) const { return (m_AutoRedrawSolid); }
00870
00871
00872 const COLOR& GetBackgroundColor (
00873 ) const { return (m_BackgroundColor); }
00874
00875 #ifdef WIN32_NATIVE
00876
00877 COLOR32 GetBackgroundColorRef (
00878 ) const { return (static_cast<COLOR32>(GetBackgroundColor().GetColorRef())); }
00879 #endif
00880
00881
00882 const char* GetBackgroundColorIniName (
00883 ) const;
00884
00885
00886 void GetCanvasExtentsUsed (
00887 LRECT2D& extents,
00888 bool UseNext = false
00889 ) const;
00890
00891
00892
00893 bool GetClipRegion (
00894 GRE_GROUP *group,
00895 MGD::CONTEXT* ggc,
00896 REGION2D& ClipRegion
00897 );
00898
00899 #ifdef X_NATIVE
00900
00901 Widget GetDrawingArea (
00902 ) const { return (m_da); }
00903
00904
00905 Widget GetDrawingAreaForm (
00906 ) const { return (m_lvswform); }
00907 #endif
00908
00909
00910
00911 UINT32 GetDrawingAreaHeight (
00912 ) const { return (m_height); }
00913
00914
00915
00916 UINT32 GetDrawingAreaWidth (
00917 ) const { return (m_width); }
00918
00919
00920 bool GetDrawWireframe3D (
00921 ) const { return (m_DrawWireframe); }
00922
00923
00924 const DRECT2D& GetFullExtents (
00925 ) const { return (m_FullExtents); }
00926
00927 #ifdef X_NATIVE
00928
00929 Widget GetForm (
00930 ) const { return (m_form); }
00931 #endif
00932
00933
00934 const GRE_GEOLOCKSETTINGS& GetGeoLock (
00935 ) const { return (m_GeoLock); }
00936
00937
00938 const COLOR& GetHighlightColor (
00939 ) const { return (m_HighlightColor); }
00940
00941 #ifdef X_NATIVE
00942
00943
00944 const BUTTONITEM* GetIconItemAdd (
00945 SIMPLE_ARRAY<BUTTONITEM>& items
00946 ) const;
00947
00948
00949
00950 const BUTTONITEM* GetIconItemDraw (
00951 SIMPLE_ARRAY<BUTTONITEM>& items,
00952 UINT32 flags = 0
00953 ) const;
00954
00955
00956
00957
00958 const BUTTONITEM* GetIconItemTool (
00959 SIMPLE_ARRAY<BUTTONITEM>& items
00960 ) const;
00961
00962
00963
00964 const BUTTONITEM* GetIconItemView (
00965 SIMPLE_ARRAY<BUTTONITEM>& items,
00966 UINT32 flags = MDISPICONVIEW_ViewDefault
00967 ) const;
00968
00969
00970
00971 Widget GetIconView (
00972 UINT32 flag
00973 ) const;
00974 #endif
00975
00976 const VIEWPOSN& GetLastPosn (
00977 ) const { return (m_LastPosn); }
00978
00979
00980 bool GetThinLineWidthHinting (
00981 ) { return (m_ThinLineWidthHinting); }
00982
00983 #ifdef X_NATIVE
00984
00985
00986 double GetMargin (
00987 ) const { return (m_MarginMeters); }
00988
00989
00990
00991 const MENUITEM* GetMenuItemLegendView (
00992 );
00993
00994
00995
00996 const MENUITEM* GetMenuItemGPS (
00997 );
00998
00999
01000
01001 const MENUITEM* GetMenuItemOptions (
01002 SIMPLE_ARRAY<MENUITEM>& items
01003 );
01004
01005
01006
01007 const MENUITEM* GetMenuItemTool (
01008 SIMPLE_ARRAY<MENUITEM>& items
01009 ) const;
01010
01011
01012
01013 const MENUITEM* GetMenuItemView (
01014 SIMPLE_ARRAY<MENUITEM>& items
01015 );
01016
01017
01018
01019 Widget GetMenuWidget (
01020 const char* menupath
01021 ) const { return (MxMenuItemWidget(m_menubar,menupath)); }
01022 #endif
01023
01024
01025 void GetName (
01026 MISTRING& name
01027 ) const;
01028
01029
01030
01031 UNICODE* GetName (
01032 ) const;
01033
01034 bool GetNeedsRedraw (
01035 ) const { return (m_NeedsRedraw); }
01036
01037
01038
01039 GRE_VIEW* GetNext (
01040 ) const;
01041
01042 GRE_VIEW* GetNextOfAll (
01043 ) const { return (m_nextview); }
01044
01045 const VIEWPOSN& GetNextPosn (
01046 ) const { return (m_NextPosn); }
01047
01048
01049 GRE_VIEWABLE* GetObject (
01050 ) const { return (m_viewable); }
01051
01052
01053 GRE_OBJTYPE GetObjectType (
01054 ) const { return (m_viewable->GetType()); }
01055
01056 #ifdef X_NATIVE
01057
01058 MGD_GC *GetOverlayGC (
01059 ) const { return (m_ogc); }
01060 #endif
01061
01062 #ifdef X_NATIVE
01063
01064
01065 Pixmap GetOverlayPixmap (
01066 ) const { return (m_opixmap); }
01067 #endif
01068
01069
01070 INT16 GetPadPixels (
01071 ) const { return (m_PadPixels); }
01072
01073
01074 GRE_PROJACCUR GetProjAccur (
01075 ) const { return (m_ProjAccur); }
01076
01077
01078 ERRVALUE GetScale (
01079 double *xscale,
01080 double *yscale
01081 );
01082
01083
01084 double GetScale (
01085 ) { return (m_LastPosn.MapScale); }
01086
01087
01088 ERRVALUE GetSizeMeters (
01089 DPOINT2D& size
01090 ) const { return (m_viewable->GetSizeMeters(size)); }
01091
01092 MSTATUSCONTEXT GetStatusContext (
01093 ) const { return (m_StatusContext); }
01094
01095 MSTATUSHANDLE GetStatusHandle (
01096 ) const { return (m_StatusHandle); }
01097
01098 #ifdef X_NATIVE
01099
01100 Widget GetToolBar (
01101 ) const { return (m_ToolBarRC); }
01102 #endif
01103
01104
01105
01106 int GetTransLayerDisp (
01107 const GRE_LAYER *layer,
01108 TRANSPARM& transparm
01109 ) const;
01110
01111
01112
01113 int GetTransLayerDisp (
01114 const GRE_LAYER *layer,
01115 TRANS2D_MAPGEN& trans
01116 ) const;
01117
01118
01119 ERRVALUE GetTransLayerView (
01120 const GRE_LAYER *layer,
01121 TRANSPARM& transparm
01122 ) const;
01123
01124
01125 ERRVALUE GetTransLayerView (
01126 const GRE_LAYER *layer,
01127 TRANS2D_MAPGEN& trans
01128 ) const;
01129
01130
01131 ERRVALUE GetTransToMap (
01132 const GRE_GROUP *group,
01133 TRANSPARM& TransParm,
01134 MAPPROJPARM *ProjParm,
01135 bool dooutput
01136 ) const;
01137
01138
01139 ERRVALUE GetTransToMap (
01140 TRANS2D_MAPGEN& trans,
01141 bool dooutput,
01142 const GRE_GROUP *group = 0,
01143 MAPPROJPARM *ProjParm = 0
01144 ) const;
01145
01146
01147 void GetTransToDisp (
01148 MAT3X3 ViewToDisp,
01149 MAT3X3 DispToView
01150 ) const {
01151 memcpy(ViewToDisp,m_LastPosn.ViewToDisp,sizeof(MAT3X3));
01152 memcpy(DispToView,m_LastPosn.DispToView,sizeof(MAT3X3));
01153 return;
01154 }
01155
01156
01157
01158 TRANS2D_AFFINE GetTransToDisp (
01159 ) const {
01160
01161 return (TRANS2D_AFFINE(m_LastPosn.ViewToDisp,m_LastPosn.DispToView));
01162 }
01163
01164
01165 bool GetUseAntialiasing (
01166 ) { return (m_UseAntialiasing); }
01167
01168 VIEWFLAGS GetViewFlags (
01169 ) const { return (m_viewflags); }
01170
01171