00001 00020 #ifndef INC_GRE_VIEWCOMMON_H 00021 #define INC_GRE_VIEWCOMMON_H 00022 00023 #ifndef INC_MI32_MG2IMAGEFILEWRITER_H 00024 #include <mi32/mg2imagefilewriter.h> 00025 #endif 00026 00027 #ifndef INC_MI32_FILEPATH_H 00028 #include <mi32/filepath.h> 00029 #endif 00030 00031 #ifndef INC_MI32_COLOR_H 00032 #include <mi32/color.h> 00033 #endif 00034 00035 namespace GRE { 00036 //=================================================================================================================== 00037 00039 class VIEWCOMMON { 00040 public: 00041 00042 class FORM; 00043 class FORM_SNAPSHOT; 00044 00045 VIEWCOMMON (); 00046 00047 ~VIEWCOMMON (); 00048 00049 #ifdef USE_MGUI 00051 ERRVALUE DlgEditValues ( 00052 MDLGPARENT dlgparent 00053 ); 00054 #endif 00055 00056 #ifdef USE_MGUI 00058 ERRVALUE DlgSnapshotSetup ( 00059 MDLGPARENT dlgparent 00060 ); 00061 #endif 00062 00063 bool GetAutoOpen3dViewCtrl () const { return (m_AutoOpen3dViewCtrl); } 00064 bool GetAutoRaise () const { return (m_AutoRaise); } 00065 int GetAutoRedrawDelay () const { return (m_AutoRedrawDelay); } 00066 bool GetDefaultGeoLocked () const { return (m_DefaultGeoLocked); } 00067 bool GetLocatorRedrawOnAnyChange () const { return (m_LocatorRedrawOnAnyChange); } 00068 bool GetRedrawOnAnyChange () const { return (m_RedrawOnAnyChange); } 00069 UINT16 GetRefreshInterval () const { return (m_RefreshInterval); } 00070 bool GetSnapshotAddGeoFiles () const { return (m_SnapshotAddGeoFiles); } 00071 const FILEPATH& GetSnapshotFolder () const { return (m_SnapshotFolder); } 00072 const MGD::IMAGEFILEWRITER::SETTINGS& GetSnapshotFormat () const { return (m_SnapshotFormat); } 00073 UINT32 GetSnapshotIndex () const { return (m_SnapshotIndex); } 00074 bool GetSnapshotLaunchViewer () const { return (m_SnapshotLaunchViewer); } 00075 UINT32 GetSnapshotMaxIndex () const { return (m_SnapshotMaxIndex); } 00076 const MISTRING& GetSnapshotPrefix () const { return (m_SnapshotPrefix); } 00077 bool GetSnapshotUseSubFolder () const { return (m_SnapshotUseSubFolder); } 00078 bool GetTrackCursor () const { return (m_TrackCursor); } 00079 const COLOR& GetTrackCursorColor () const { return (m_TrackCursorColor); } 00080 bool GetUpdateAfterDrawLayer () const { return (m_UpdateAfterDrawLayer); } 00081 bool GetZoomPanWaitForRMB () const { return (m_ZoomPanWaitForRMB); } 00082 00085 void IncrementSnapshotIndex ( 00086 ); 00087 00091 void IniRead (); 00092 00096 void IniWrite () const; 00097 00098 void SetAutoOpen3dViewCtrl (bool AutoOpen3dViewCtrl) { m_AutoOpen3dViewCtrl = AutoOpen3dViewCtrl; } 00099 void SetAutoRedrawDelay (int AutoRedrawDelay) { m_AutoRedrawDelay = AutoRedrawDelay; } 00100 void SetAutoRaise (bool AutoRaise) { m_AutoRaise = AutoRaise; } 00101 void SetDefaultGeoLocked (bool DefaultGeoLocked) { m_DefaultGeoLocked = DefaultGeoLocked; } 00102 void SetLocatorRedrawOnAnyChange (bool RedrawOnAnyChange) { m_LocatorRedrawOnAnyChange = RedrawOnAnyChange; } 00103 void SetRedrawOnAnyChange (bool RedrawOnAnyChange) { m_RedrawOnAnyChange = RedrawOnAnyChange; } 00104 void SetRefreshInterval (UINT16 RefreshInterval) { m_RefreshInterval = RefreshInterval; } 00105 void SetSnapshot (const FILEPATH& Folder, const MGD::IMAGEFILEWRITER::SETTINGS& Format, bool AddGeoFiles, bool UseSubFolder, const MISTRING& Prefix, UINT32 Index = 0); 00106 void SetSnapshotFolder (const FILEPATH& Folder) { m_SnapshotFolder = Folder; } 00107 void SetSnapshotLaunchViewer (bool LaunchViewer) { m_SnapshotLaunchViewer = LaunchViewer; } 00108 void SetSnapshotMaxIndex (bool MaxIndex) { m_SnapshotMaxIndex = MaxIndex; } 00109 void SetTrackCursor (bool TrackCursor) { m_TrackCursor = TrackCursor; } 00110 void SetTrackCursorColor (const COLOR& TrackCursorColor) { m_TrackCursorColor = TrackCursorColor; } 00111 void SetUpdateAfterDrawLayer (bool UpdateAfterDrawLayer) { m_UpdateAfterDrawLayer = UpdateAfterDrawLayer; } 00112 void SetZoomPanWaitForRMB (bool ZoomPanWaitForRMB) { m_ZoomPanWaitForRMB = ZoomPanWaitForRMB; } 00113 00114 private: 00115 #ifndef GENERATING_DOXYGEN_OUTPUT 00116 bool m_RedrawOnAnyChange; // Redraw view when any change made to object in view 00117 bool m_AutoRaise; // Auto-raise view when activate viewable 00118 bool m_UpdateAfterDrawLayer; // Update display after each layer is drawn 00119 bool m_TrackCursor; // Track cursor between views 00120 bool m_ZoomPanWaitForRMB; // Wait for right mouse button (or <Enter>) to activate zoom/pan tool 00121 bool m_AutoOpen3dViewCtrl; // Automatically open viewpoint controls for 3D view 00122 bool m_DefaultGeoLocked; // Default views to be geolocked 00123 bool m_SnapshotAddGeoFiles; // Add georeference files for non-RVC formats 00124 bool m_SnapshotUseSubFolder; // Use sub-folder for quick snapshot if adding georeference files 00125 bool m_SnapshotLaunchViewer; // Launch snapshot viewer (eg Google Earth) 00126 bool m_LocatorRedrawOnAnyChange; // Redraw locator views on any change 00127 UINT16 m_RefreshInterval; // Refresh interval for updates while layer is being drawn 00128 COLOR m_TrackCursorColor; // Color of "tracking" cursor 00129 int m_AutoRedrawDelay; // Delay for auto-redraw after change (milliseconds) 00130 FILEPATH m_SnapshotFolder; // Folder for quick-snapshot files 00131 MGD::IMAGEFILEWRITER::SETTINGS m_SnapshotFormat; 00132 MISTRING m_SnapshotPrefix; // Prefix for snapshot file/subfolder name 00133 UINT32 m_SnapshotIndex; // Index of next snapshot 00134 UINT32 m_SnapshotMaxIndex; // Maximum snapshot index before reuse, 0 to not reuse 00135 00136 void IniWriteSnapshot () const; 00137 friend class VIEW; 00138 friend class VIEW_LEGACY; 00139 #endif // GENERATING_DOXYGEN_OUTPUT 00140 }; 00141 00142 //=================================================================================================================== 00143 } // End namespace GRE 00144 00145 #endif // INC_GRE_VIEWCOMMON_H
1.6.1