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_INJECTORS_H__
22
#define __LENMUS_INJECTORS_H__
24
#include <wx/wxprec.h>
25
#include <wx/string.h>
26
#include <wx/config.h>
34
//forward declarations
38
//---------------------------------------------------------------------------------------
39
class ApplicationScope
44
wxConfigBase* m_pPrefs;
48
wxString m_sVendorName;
49
wxString m_sVersionString;
53
ApplicationScope(ostream& reporter=cout);
58
void set_bin_folder(const wxString& sBinPath);
59
void create_preferences_object();
61
//access to global objects/variables
63
wxConfigBase* get_preferences();
64
MidiServer* get_midi_server();
66
// inline ostream& default_reporter() { return m_reporter; }
67
// inline LomseDoorway* platform_interface() { return m_pDoorway; }
68
// LdpFactory* ldp_factory();
69
// FontStorage* font_storage();
71
// void notify_user_about(EventInfo& event);
73
// double get_screen_ppi() const;
74
// int get_pixel_format() const;
75
// //MusicGlyphs* music_glyphs();
77
// //global options, mainly for debug
78
//inline void set_justify_systems(bool value) { m_sAppName = value; }
79
inline wxString& get_app_name() { return m_sAppName; }
80
inline wxString& get_vendor_name() { return m_sVendorName; }
81
inline wxString& get_version_string() { return m_sVersionString; }
82
wxString get_app_full_name();
84
// inline void set_dump_column_tables(bool value) { m_fDumpColumnTables = value; }
85
// inline bool dump_column_tables() { return m_fDumpColumnTables; }
88
void set_version_string();
92
////---------------------------------------------------------------------------------------
96
// DocumentScope(ostream& reporter=cout) : m_reporter(reporter) {}
97
// ~DocumentScope() {}
99
// ostream& default_reporter() { return m_reporter; }
100
// IdAssigner* id_assigner() { return &m_idAssigner; }
103
// ostream& m_reporter;
104
// IdAssigner m_idAssigner;
108
//---------------------------------------------------------------------------------------
115
// static LdpParser* inject_LdpParser(ApplicationScope& libraryScope,
116
// DocumentScope& documentScope);
117
// static Analyser* inject_Analyser(ApplicationScope& libraryScope,
118
// DocumentScope& documentScope);
119
// static ModelBuilder* inject_ModelBuilder(DocumentScope& documentScope);
120
// static LdpCompiler* inject_LdpCompiler(ApplicationScope& libraryScope,
121
// DocumentScope& documentScope);
122
// static Document* inject_Document(ApplicationScope& libraryScope);
123
// static ScreenDrawer* inject_ScreenDrawer(ApplicationScope& libraryScope);
124
//// static UserCommandExecuter* inject_UserCommandExecuter(Document* pDoc);
125
// static View* inject_View(ApplicationScope& libraryScope, int viewType, Document* pDoc); //UserCommandExecuter* pExec)
126
// static SimpleView* inject_SimpleView(ApplicationScope& libraryScope, Document* pDoc); //UserCommandExecuter* pExec)
127
// static VerticalBookView* inject_VerticalBookView(ApplicationScope& libraryScope,
128
// Document* pDoc); //UserCommandExecuter* pExec)
129
// static HorizontalBookView* inject_HorizontalBookView(ApplicationScope& libraryScope,
130
// Document* pDoc); //UserCommandExecuter* pExec)
131
// static Interactor* inject_Interactor(ApplicationScope& libraryScope,
132
// Document* pDoc, View* pView); //, UserCommandExecuter* pExec);
133
// static Presenter* inject_Presenter(ApplicationScope& libraryScope,
134
// int viewType, Document* pDoc);
135
// static Task* inject_Task(int taskType, Interactor* pIntor);
143
#endif //__LENMUS_INJECTORS_H__