MuseScore  3.4
Music composition and notation
globals.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2011 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __GLOBALS_H__
21 #define __GLOBALS_H__
22 
23 namespace Ms {
24 
25 extern bool enableExperimental;
26 extern bool noSeq;
27 extern bool noMidi;
28 extern bool midiInputTrace;
29 extern bool midiOutputTrace;
30 extern bool converterMode;
31 extern bool pluginMode;
32 extern double guiScaling;
33 extern int trimMargin;
34 extern bool noWebView;
35 extern bool ignoreWarnings;
36 
37 //---------------------------------------------------------
38 // MsWidget
39 // used to assign actions (shortcuts) to the appropriate
40 // widget (actions.cpp, shortcuts.cpp)
41 //---------------------------------------------------------
42 
43 enum MsWidget {
45  SCORE_TAB = 1 << 0
46  };
47 
48 //---------------------------------------------------------
49 // ScoreState
50 // used also to mask out shortcuts (actions.cpp)
51 //---------------------------------------------------------
52 
53 enum ScoreState {
55  STATE_DISABLED = 1 << 0,
56  STATE_NORMAL = 1 << 1,
57  // STATE_NOTE_ENTRY_STAFF_PITCHED
65  STATE_EDIT = 1 << 9,
66  STATE_TEXT_EDIT = 1 << 10,
67  STATE_LYRICS_EDIT = 1 << 11,
69  STATE_PLAY = 1 << 13,
70  STATE_FOTO = 1 << 14,
71  STATE_LOCK = 1 << 15,
73 
74  STATE_NEVER = 1 << 31,
75 
84  STATE_ALL = -1
85  };
86 
87 //---------------------------------------------------------
88 // MidiRemoteType
89 //---------------------------------------------------------
90 
94  };
95 
96 //---------------------------------------------------------
97 // MidiRemote
98 //---------------------------------------------------------
99 
100 struct MidiRemote {
101  int channel;
103  int data; // pitch or controller number
104  };
105 
106 extern const char* stateName(ScoreState);
107 
108 static constexpr qreal DPI_DISPLAY = 96.0; // 96 DPI nominal resolution
109 static constexpr qreal DPMM_DISPLAY = DPI_DISPLAY / 25.4;
110 static constexpr qreal PALETTE_SPATIUM = 1.764 * DPMM_DISPLAY;
111 
112 } // namespace Ms
113 #endif
Definition: globals.h:67
bool midiOutputTrace
debug option: dump midi output
Definition: score.cpp:85
Definition: globals.h:68
bool enableExperimental
Definition: musescore.cpp:174
Definition: globals.h:61
MsWidget
Definition: globals.h:43
Definition: globals.h:56
Definition: globals.h:58
Definition: globals.h:70
Definition: globals.h:44
Definition: globals.h:71
Definition: globals.h:76
Definition: globals.h:65
Definition: globals.h:92
int channel
Definition: globals.h:101
Definition: globals.h:83
Definition: globals.h:45
Definition: globals.h:84
bool ignoreWarnings
Definition: musescore.cpp:192
MidiRemoteType
Definition: globals.h:91
double guiScaling
Definition: musescore.cpp:187
ScoreState
Definition: globals.h:53
bool converterMode
Definition: musescore.cpp:179
Definition: globals.h:55
Definition: globals.h:74
Definition: globals.h:93
Definition: globals.h:69
bool noSeq
Don’t use sequencer; cmd line option.
Definition: score.cpp:82
bool noWebView
Definition: musescore.cpp:190
Definition: globals.h:100
MidiRemoteType type
Definition: globals.h:102
const char * stateName(ScoreState)
Definition: musescore.cpp:5256
bool pluginMode
Definition: musescore.cpp:185
Definition: aeolus.cpp:26
bool midiInputTrace
debug option: dump midi input
Definition: score.cpp:84
int data
Definition: globals.h:103
Definition: globals.h:54
Definition: globals.h:72
Definition: globals.h:66
int trimMargin
Definition: musescore.cpp:189
Definition: globals.h:60
Definition: globals.h:62
bool noMidi
Don’t use midi; cmd line option.
Definition: score.cpp:83
Definition: globals.h:93
Definition: globals.h:82
Definition: globals.h:59