1
//---------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2011 LenMus project
5
// This program is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software Foundation,
7
// either version 3 of the License, or (at your option) any later version.
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
10
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License along with this
14
// program. If not, see <http://www.gnu.org/licenses/>.
16
// For any comment, suggestion or feature request, please contact the manager of
17
// the project at cecilios@users.sourceforge.net
19
//---------------------------------------------------------------------------------------
21
#ifndef __LENMUS_APP_H__ //to avoid nested includes
22
#define __LENMUS_APP_H__
25
#include "lenmus_injectors.h"
28
#include <wx/wxprec.h>
31
#include <wx/snglinst.h>
37
//forward declarations
41
//---------------------------------------------------------------------------------------
42
// Define the application
43
class TheApp : public wxApp
48
wxSingleInstanceChecker* m_pInstanceChecker;
49
// lmDocManager* m_pDocManager;
50
wxLocale* m_pLocale; //locale we'll be using (user config)
51
SplashFrame* m_pSplash;
52
ApplicationScope m_appScope;
53
long m_nSplashStartTime;
54
long m_nSplashVisibleMilliseconds;
55
// wxBitmap m_background; //background bitmap (user config)
63
// void OnChangeLanguage(wxCommandEvent& WXUNUSED(event));
66
// wxBitmap& GetBackgroundBitmap() const { return (wxBitmap&) m_background; }
67
// wxString GetLanguageCanonicalName() { return m_pLocale->GetCanonicalName(); }
68
// wxString GetLocaleName() { return m_pLocale->GetLocale(); }
69
// wxString GetLocaleSysName() { return m_pLocale->GetSysName(); }
70
// const wxString GetCurrentUser();
73
// virtual int FilterEvent(wxEvent& event);
74
// virtual void OnFatalException();
75
// virtual void OnInitCmdLine(wxCmdLineParser& parser);
76
// virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
78
// ApplicationScope& app_scope() { return m_appScope; }
79
// LibraryScope& library_scope() { return m_appScope.library_scope(); }
82
bool do_application_setup();
83
void do_application_cleanup();
84
void create_paths_object();
85
void load_user_preferences();
86
void create_needed_folders_if_dont_exist();
88
void get_main_window_placement(wxRect* frameRect, bool* fMaximized);
89
void get_default_placement(wxRect* defRect);
90
// wxString GetInstallerLanguage();
91
// wxString ChooseLanguage(wxWindow *parent);
92
// void SetUpLocale(wxString lang);
93
SplashFrame* create_GUI(int milliseconds, bool fFirstTime);
94
// void SendForensicLog(wxString& sLogFile, bool fHandlingCrash);
95
// void ParseCommandLine();
96
// void SetUpCurrentLanguage();
97
void create_main_frame();
98
// void wait_and_destroy_splash();
99
void show_welcome_window();
100
// void RecoverScoreIfPreviousCrash();
101
// void CheckForUpdates();
102
void configure_midi();
103
// void CreateDocumentManager();
104
// void CreateDocumentTemplates();
105
// void InitializeXrcResources();
106
// void DefineTraceMasks();
107
// void OpenDataBase();
110
// DECLARE_EVENT_TABLE()
116
} // namespace lenmus
118
#endif // __LENMUS_APP_H__