Main Page | Class List | File List | Class Members | Related Pages

frame.h

00001 /***************************************************************************
00002                            frame.h
00003                            -------------------
00004     begin                : 2004-05-25 21:59
00005     copyright            : (C) 2004-2005 by Michael Menne
00006     email                : menne@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  This program is free software; you can redistribute it and/or
00011  modify it under the terms of the GNU General Public License
00012  as published by the Free Software Foundation; either version 2
00013  of the License, or (at your option) any later version.
00014 
00015  This program is distributed in the hope that it will be useful,
00016  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  GNU General Public License for more details.
00019 
00020  You should have received a copy of the GNU General Public License
00021  along with this program; if not, write to the Free Software
00022  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023  ***************************************************************************/
00024 
00025 #ifndef FRAME_H
00026 #define FRAME_H
00027 
00028 #include "global.h"
00029 
00030 namespace WDS
00031 {
00032 
00033 // Forward declarations
00034 class CGLCanvas;
00035 class CMap;
00036 class CDlgFind;
00037 class CProfile;
00038 
00043 class CFrame : public wxFrame
00044 {
00045 public:
00046     CFrame(const wxChar *title, int xpos, int ypos, int width, int height);
00047     ~CFrame();
00048 
00049     void Init( );
00050 
00051     CGLCanvas* GetGLCanvas()      { return m_pCanvas; }
00052     CMap*      GetMap()           { return m_pMap; }
00053 
00054     // Event functions
00055     void OnKeyDown(wxKeyEvent& event);
00056 
00057     void SwitchProfile( CProfile* newProfile );
00058 
00059 protected:
00060     CMap *m_pMap;
00061 
00062 protected:
00063     wxMenuBar *m_pMenuBar;
00064     wxMenu    *m_pFileMenu;
00065     wxMenu    *m_pFuncMenu;
00066     wxMenu    *m_pViewMenu;
00067     wxMenu    *m_pInfoMenu;
00068 
00069     wxComboBox *m_pCbZoom;  // ComboBox fuer Zoom
00070     wxTextCtrl *m_pTxtXPos;
00071     wxTextCtrl *m_pTxtYPos;
00072     wxButton   *m_pBtnGo;
00073 
00074     wxPoint m_ptLastMousePos;
00075 
00076     CDlgFind *m_pDlgFind;
00077 
00078     bool    m_bPathStart;
00079     wxPoint m_ptPathStart, m_ptPathEnd;
00080 
00081     void InitMenu( );
00082     void InitToolBar( );
00083 
00084     void OnNew  ( wxEvent &event );
00085     void OnOpen ( wxEvent &event );
00086     void OnClose( wxEvent &event );
00087     void OnQuit ( wxEvent &event );
00088 
00089     void OnEditProfiles( wxEvent &event );
00090 
00091     void OnZoomIn ( wxEvent &event );
00092     void OnZoomOut( wxEvent &event );
00093     void OnCbZoom ( wxCommandEvent& event );
00094     void UpdateCbZoom( );
00095 
00096     void OnMenuGoTo( wxEvent &event );
00097     void OnMenuFind( wxEvent &event );
00098     void OnUpdateClient( wxEvent &event );
00099 
00100     void OnMenuFogOfWar  ( wxCommandEvent &event );
00101     void OnMenuFullScreen( wxCommandEvent &event );
00102     void OnMenuToolbar   ( wxCommandEvent &event );
00103     void OnMenuStatusbar ( wxCommandEvent &event );
00104 
00105     void OnMenuAbout( wxEvent &event );
00106 
00107     void OnPathStart( wxEvent &event );
00108     void OnPathEnd  ( wxEvent &event );
00109 
00110     void OnAddToFavourites( wxEvent &event );
00111 
00112     void OnMouseMove ( wxMouseEvent &event );
00113     void OnMouseWheel( wxMouseEvent &event );
00114 
00115     void OnRButtonUp( wxMouseEvent &event );
00116 
00117     void OnTimerToolTip( wxTimerEvent &event );
00118 
00119     void SetFullScreen( bool bFull );
00120 
00121     void GoTo( int x, int y );
00122 
00123     void LoadProfile( CProfile* newProfile );
00124 
00125     CGLCanvas *m_pCanvas;
00126 
00127     // Event-IDs
00128     enum
00129     {
00130         // Menu IDs
00131         IDM_EDIT_PROFILES,
00132         IDM_UPDATE,
00133         IDM_ZOOM_IN,
00134         IDM_ZOOM_OUT,
00135         IDM_GOTO,
00136         IDM_SEARCH,
00137         IDM_ABOUT,
00138         IDM_FOGOFWAR,
00139         IDM_FULLSCREEN,
00140         IDM_TOOLBAR,
00141         IDM_STATUSBAR,
00142 
00143         // Toolbar ID
00144         IDT_TOOLBAR,
00145 
00146         // Popup Menue
00147         IDM_PATH_START,
00148         IDM_PATH_END,
00149         IDM_ADD_TO_FAVOURITES,
00150 
00151         // Timer event
00152         IDM_TIMER_TOOLTIP,
00153 
00154         // Combobox fuer Zoom
00155         IDC_CB_ZOOM
00156     };
00157 
00158     DECLARE_EVENT_TABLE()
00159 };
00160 
00161 
00162 }
00163 #endif // FRAME_H
00164 
00165 // kate: space-indent off; tab-width 4; replace-tabs off;

Generated on Sun Jan 16 18:20:26 2005 for WDSMap by  doxygen 1.3.9.1