00001
00023 #ifndef INC_GRE_UIFORMZOOM_H
00024 #define INC_GRE_UIFORMZOOM_H
00025
00026 #ifndef INC_MGUI_EDIT_H
00027 #include <mgui/edit.h>
00028 #endif
00029
00030 #ifndef INC_MGUI_FORMLIST_H
00031 #include <mgui/formlist.h>
00032 #endif
00033
00034 #ifndef INC_MGUI_COMBOBOX_H
00035 #include <mgui/combobox.h>
00036 #endif
00037
00038 #ifndef INC_MGUI_FORMBTXT_H
00039 #include <mgui/formbtxt.h>
00040 #endif
00041
00042 #ifndef INC_SPATMOD_IMAGETILESET_H
00043 #include <spatmod/imagetileset.h>
00044 #endif
00045
00046 namespace GRE {
00047 class VIEW;
00048 class VIEWABLE;
00049 class GROUP;
00050 class MSG;
00051 }
00052
00053 namespace GRE {
00054 namespace UI {
00055
00056
00058 class FORM_ZOOM : public MGUI::FORM_COMPOSITE {
00059 public:
00061 FORM_ZOOM (VIEW* view, VIEWABLE* viewable);
00062
00064 virtual ~FORM_ZOOM ();
00065
00067 void Create (
00068 MGUI::LAYOUT_PANE_BASE& ParentPane,
00069 INT32 width,
00070 INT32 height
00071 );
00072
00074 MGUI::LAYOUT_PANE& GetFormPane (
00075 ) { return (GetPane()); }
00076
00077 private:
00078 #ifndef GENERATING_DOXYGEN_OUTPUT
00079
00080 enum CMDID {
00081 CMDID_ZoomTo = 0,
00082 CMDID_ZoomToScale,
00083 CMDID_ZoomToWidth,
00084 CMDID_ZoomToHeight,
00085 CMDID_ZoomToLevelGoogleMaps,
00086 CMDID_ZoomToLevelBingMaps,
00087 CMDID_ZoomToLevelGoogleEarth,
00088 CMDID_ZoomToLevelNASAWorldWind
00089 };
00090
00091
00092 static void GRECB_View (const GRE::MSG *msg, void *vcb);
00093 static void GRECB_Viewable (const GRE::MSG *msg, void *vcb);
00094
00095 double GetLevelFromZoom (double zoom);
00096 double GetSizeFromZoom (double scale);
00097 ERRVALUE GetViewableSize (DPOINT2D& size);
00098 void OnBtnScaleList ();
00099 void OnBtnZoomUnits ();
00100 void OnBtnZoomLevels ();
00101 void OnComboZoomTo ();
00102 void OnViewChanged ();
00103 void OnZoomToZoom ();
00104 bool SetupTileset ();
00105 void ZoomToLevel (double value);
00106 void ZoomToHeight (double value);
00107 void ZoomToWidth (double value);
00108 void ZoomToScale (double value);
00109
00110 UOM::UNIT m_unit;
00111 SPATMOD::IMAGE::TILESET m_Tileset;
00112
00113 MGUI::CTRL_PUSHBUTTON m_BtnZoom;
00114 MGUI::FORM_COMBOBOX m_CbxZoomTo;
00115 MGUI::CTRL_EDIT_NUMBER m_EditZoom;
00116 MGUI::CTRL_PUSHBUTTON m_BtnScales;
00117 MGUI::CTRL_LABEL m_LblZoomUnits;
00118 MGUI::CTRL_PUSHBUTTON m_BtnZoomUnits;
00119 MGUI::CTRL_LABEL m_LblLevel;
00120 MGUI::CTRL_PUSHBUTTON m_BtnZoomLevels;
00121
00122
00123 VIEW *m_view;
00124 VIEWABLE *m_viewable;
00125
00126 #endif // GENERATING_DOXYGEN_OUTPUT
00127 };
00128
00129 }
00130 }
00131
00132 #endif // INC_GRE_UIFORMZOOM_H