Version: 0.6.0
application.h
1 /******************************************************************************
2  * Project: wxGIS
3  * Purpose: wxGISApplication class. Base application functionality (commands, menues, etc.)
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009-2012,2014 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/framework/applicationbase.h"
24 #include "wxgis/framework/accelerator.h"
25 
26 #include "wx/ffile.h"
27 #include "wx/dir.h"
28 #include "wx/filename.h"
29 #include "wx/file.h"
30 #include "wx/datetime.h"
31 #include "wx/intl.h"
32 
39 class WXDLLIMPEXP_GIS_FRW wxGISApplication :
40  public wxFrame,
42 {
43  DECLARE_CLASS(wxGISApplication)
44 public:
45  //constructor
46  wxGISApplication(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER );
47  //destructor
48  virtual ~wxGISApplication(void);
49  virtual wxStatusBar* OnCreateStatusBar(int number, long style, wxWindowID id, const wxString& name);
50  virtual wxGISAcceleratorTable* GetGISAcceleratorTable(void) const;
51  virtual void UpdateTitle(const wxString & sPath);
52 //wxGISApplicationBase
53  wxGISStatusBar* GetStatusBar(void) const;
54  virtual void ShowStatusBar(bool bShow);
55  virtual bool IsStatusBarShown(void);
56  virtual void ShowToolBarMenu(void);
57  virtual void Command(wxGISCommand* pCmd);
58  //IApplication
59  virtual bool CreateApp(void);
60  virtual void OnAppOptions(void);
61  virtual bool SetupLog(const wxString &sLogPath, const wxString &sNamePrefix = wxEmptyString);
62  virtual bool SetupSys(const wxString &sSysPath);
63  virtual bool SetupLoc(const wxString &sLoc, const wxString &sLocPath);
64  virtual wxString GetDecimalPoint(void) const{return m_sDecimalPoint;};
65  //events
66  virtual void OnEraseBackground(wxEraseEvent& event);
67  virtual void OnSize(wxSizeEvent& event);
68  virtual void OnCommand(wxCommandEvent& event);
69  virtual void OnCommandUI(wxUpdateUIEvent& event);
70  virtual void OnRightDown(wxMouseEvent& event);
71  virtual void OnAuiRightDown(wxAuiToolBarEvent& event);
72  virtual void OnClose(wxCloseEvent & event);
73 protected:
74  virtual void SerializeFramePos(bool bSave = false);
75  virtual void LoadToolbars(wxXmlNode* pRootNode);
76  virtual void SerializeCommandBars(bool bSave = false);
77  virtual void UpdateAccelerators();
78 //
79 protected:
80  wxGISAcceleratorTable* m_pGISAcceleratorTable;
81  ITrackCancel* m_pTrackCancel;
82  wxFFile m_LogFile;
83  wxLocale* m_pLocale; // locale we'll be using
84  wxString m_sDecimalPoint;
85 private:
86  DECLARE_EVENT_TABLE()
87 };
Definition: applicationbase.h:65
Definition: command.h:53
A TrackCancel interface class.
Definition: core.h:144
Definition: application.h:39
Definition: statusbar.h:58
Definition: accelerator.h:28