Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
EnviroApp.h
1 //
2 // Name: EnviroApp.h
3 //
4 // Copyright (c) 2001-2011 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 class EnviroFrame;
9 class vtTerrain;
10 
12 class EnviroApp: public wxApp
13 {
14 public:
15  EnviroApp();
16 
17  bool OnInit();
18  int OnExit();
19  void Args(int argc, wxChar **argv);
20 
21  void RefreshTerrainList();
22  bool AskForTerrainName(wxWindow *pParent, wxString &strTerrainName);
23  vtString GetIniFileForTerrain(const vtString &name);
24  wxString GetLanguageCode() { return m_locale.GetCanonicalName(); }
25  wxString MakeFrameTitle(vtTerrain *terrain = NULL);
26 
27  bool m_bShowStartupDialog;
28 
29  vtStringArray terrain_files;
30  vtStringArray terrain_paths;
31  vtStringArray terrain_names;
32 
33 protected:
34  void StartLog();
35  void LoadOptions();
36  void SetupLocale();
37  EnviroFrame *CreateMainFrame();
38 
39  wxLocale m_locale; // locale we'll be using
40  vtString m_locale_name;
41 };
42 
43 // helpers
44 int EditTerrainParameters(wxWindow *parent, const char *filename);
45 
46 #ifndef STRING_ORGNAME
47 #define STRING_ORGNAME "Umasoft"
48 #endif
49 
50 #ifndef STRING_APPNAME
51 #define STRING_APPNAME "Demo"
52 #define ENVIRO_NATIVE
53 #else
54 void SetupCustomOptions();
55 #endif
56 
57 #define STRING_APPORG STRING_ORGNAME " " STRING_APPNAME
58