Loading...
Searching...
No Matches
ScenarioStyle.hpp
1#pragma once
2#include <score/model/ColorReference.hpp>
3#include <score/model/Skin.hpp>
4
5#include <QBrush>
6#include <QPen>
7#include <qnamespace.h>
8
9#include <score_lib_process_export.h>
10namespace Process
11{
12struct SCORE_LIB_PROCESS_EXPORT Style
13{
14 Style(score::Skin&) noexcept;
15
16 Style(const Style&) = delete;
17 Style(Style&&) = delete;
18 Style& operator=(const Style&) = delete;
19 Style& operator=(Style&&) = delete;
20
21 void setIntervalWidth(double w);
22
23 static Style& instance() noexcept;
24 score::Skin& skin;
25
26 const QPen& TransparentPen() const noexcept { return skin.NoPen; }
27 const QPen& NoPen() const noexcept { return skin.NoPen; }
28 const QBrush& TransparentBrush() const noexcept { return skin.NoBrush; }
29 const QBrush& NoBrush() const noexcept { return skin.NoBrush; }
30
31 const score::Brush& IntervalBase() const noexcept { return skin.Base1; }
32 const score::Brush& IntervalSelected() const noexcept { return skin.Base2; }
33 const score::Brush& IntervalDropTarget() const noexcept { return skin.Warn1; }
34 const score::Brush& IntervalPlayFill() const noexcept { return skin.Base3; }
35 const score::Brush& IntervalPlayDashFill() const noexcept { return skin.Pulse1; }
36 const score::Brush& IntervalWaitingDashFill() const noexcept { return skin.Pulse2; }
37 const score::Brush& IntervalLoop() const noexcept { return skin.Warn1; }
38 const score::Brush& IntervalWarning() const noexcept { return skin.Warn2; }
39 const score::Brush& IntervalInvalid() const noexcept { return skin.Warn3; }
40 const score::Brush& IntervalMuted() const noexcept { return skin.HalfDark; }
41 const score::Brush& IntervalDefaultLabel() const noexcept { return skin.Gray; }
42 const score::Brush& IntervalDefaultBackground() const noexcept
43 {
44 return skin.Transparent1;
45 }
46
47 const score::Brush& RackSideBorder() const noexcept { return skin.Base1; }
48
49 const score::Brush& IntervalFullViewParentSelected() const noexcept
50 {
51 return skin.Emphasis1;
52 }
53
54 const score::Brush& IntervalHeaderText() const noexcept { return skin.Light; }
55 const score::Brush& IntervalHeaderBottomLine() const noexcept
56 {
57 return skin.Transparent1;
58 }
59 const score::Brush& IntervalHeaderRackHidden() const noexcept
60 {
61 return skin.Transparent1;
62 }
63 const score::Brush& IntervalHeaderSideBorder() const noexcept { return skin.Base1; }
64
65 const score::Brush& ProcessViewBorder() const noexcept { return skin.Gray; }
66
67 const score::Brush& SlotFocus() const noexcept { return skin.Base2; }
68 const score::Brush& SlotOverlayBorder() const noexcept { return skin.Dark; }
69 const score::Brush& SlotOverlay() const noexcept { return skin.Transparent2; }
70 const score::Brush& SlotHandle() const noexcept { return skin.Transparent3; }
71
72 const score::Brush& TimenodeDefault() const noexcept { return skin.Gray; }
73 const score::Brush& TimenodeSelected() const noexcept { return skin.Base2; }
74
75 const score::Brush& EventDefault() const noexcept { return skin.Emphasis4; }
76 const score::Brush& EventWaiting() const noexcept { return skin.HalfLight; }
77 const score::Brush& EventPending() const noexcept { return skin.Warn1; }
78 const score::Brush& EventHappened() const noexcept { return skin.Base3; }
79 const score::Brush& EventDisposed() const noexcept { return skin.Warn3; }
80 const score::Brush& EventSelected() const noexcept { return skin.Base2; }
81
82 const score::Brush& ConditionDefault() const noexcept { return skin.Smooth3; }
83 const score::Brush& ConditionWaiting() const noexcept { return skin.Gray; }
84 const score::Brush& ConditionDisabled() const noexcept { return skin.Base1; }
85 const score::Brush& ConditionFalse() const noexcept { return skin.Smooth1; }
86 const score::Brush& ConditionTrue() const noexcept { return skin.Smooth2; }
87
88 const score::Brush& StateOutline() const noexcept { return skin.Light; }
89 const score::Brush& StateSelected() const noexcept { return skin.Base2; }
90 const score::Brush& StateDot() const noexcept { return skin.Base1; }
91
92 const score::Brush& Background() const noexcept { return skin.Background1; }
93 const score::Brush& ProcessPanelBackground() const noexcept
94 {
95 return skin.Transparent1;
96 }
97
98 const score::Brush& TimeRulerBackground() const noexcept { return skin.DarkGray; }
99 const score::Brush& MinimapBackground() const noexcept { return skin.Background1; }
100 const score::Brush& TimeRuler() const noexcept { return skin.Base1; }
101 const score::Brush& LocalTimeRuler() const noexcept { return skin.Gray; }
102
103 const score::Brush& SlotHeader() const noexcept { return skin.Base5; }
104
105 const score::Brush& SeparatorBrush() const noexcept { return skin.Base1; }
106 const QBrush& SlotHeaderBrush() const noexcept { return skin.NoBrush; }
107
108 // TODO white
109 const QPen& CommentBlockPen() const noexcept { return skin.Light.main.pen1; }
110 const QPen& CommentBlockSelectedPen() const noexcept { return skin.Light.main.pen2; }
111
112 const QPen& SeparatorPen() const noexcept { return skin.Light.main.pen2; }
113
114 const QPen& RectPen() const noexcept
115 {
116 return skin.Emphasis1.main.pen2_solid_round_round;
117 }
118 const QPen& RectHighlightPen() const noexcept
119 {
120 return skin.Emphasis1.lighter.pen2_solid_round_round;
121 }
122 const QBrush& RectBrush() const noexcept { return skin.NoBrush; }
123 const QBrush& RectHighlightBrush() const noexcept { return skin.NoBrush; }
124
125 static const QPen& IntervalSolidPen(const score::Brush& b) noexcept
126 {
127 return b.main.pen3_solid_flat_miter;
128 }
129 static const QPen& IntervalDashPen(const score::Brush& b) noexcept
130 {
131 return b.main.pen3_dashed_flat_miter;
132 }
133 static const QPen& IntervalRackPen(const score::Brush& b) noexcept
134 {
135 return b.main.pen_cosmetic;
136 }
137 static const QPen& IntervalPlayLinePen(const score::Brush& b) noexcept
138 {
139 return b.main.pen_cosmetic;
140 }
141 const QPen& IntervalHeaderTextPen() const noexcept
142 {
143 return IntervalHeaderText().main.pen1;
144 }
145
146 const QPen& IntervalBrace() const noexcept
147 {
148 return IntervalBase().main.pen2_solid_flat_miter;
149 }
150 const QPen& IntervalBraceSelected() const noexcept
151 {
152 return IntervalSelected().main.pen2_solid_flat_miter;
153 }
154 const QPen& IntervalBraceWarning() const noexcept
155 {
156 return IntervalWarning().main.pen2_solid_flat_miter;
157 }
158 const QPen& IntervalBraceInvalid() const noexcept
159 {
160 return IntervalInvalid().main.pen2_solid_flat_miter;
161 }
162
163 const score::Brush& MutedIntervalHeaderBackground() const noexcept
164 {
165 return skin.HalfDark;
166 }
167
168 const QPen& IntervalHeaderSeparator() const noexcept
169 {
170 return IntervalHeaderSideBorder().main.pen2_solid_flat_miter;
171 }
172
173 static const QPen& ConditionPen(const score::Brush& b) noexcept { return b.main.pen2; }
174 static const QPen& ConditionTrianglePen(const score::Brush& b) noexcept
175 {
176 return b.main.pen_cosmetic;
177 }
178
179 static const QPen& TimenodePen(const score::Brush& b) noexcept
180 {
181 return b.main.pen2_dotted_square_miter;
182 }
183
184 const QPen& MinimapPen() const noexcept { return skin.LightGray.main.pen_cosmetic; }
185 const score::Brush& MinimapBrush() const noexcept { return skin.DarkGray; }
186
187 static const QPen& StateTemporalPointPen(const score::Brush& b) noexcept
188 {
189 return b.main.pen_cosmetic;
190 }
191
192 static const QPen& EventPen(const score::Brush& b) noexcept
193 {
194 return b.main.pen_cosmetic;
195 }
196
197 const QPen& TimeRulerLargePen() const noexcept { return TimeRuler().main.pen2; }
198 const QPen& TimeRulerSmallPen() const noexcept { return TimeRuler().main.pen1; }
199
200 const QPen& SlotHandlePen() const noexcept { return ProcessViewBorder().main.pen0; }
201
202 static const QPen& MiniScenarioPen(const score::Brush& b) noexcept
203 {
204 return b.main.pen_cosmetic;
205 }
206
207 const score::Brush& DefaultBrush() const noexcept { return skin.Base1; }
208
209 const QPen& AudioCablePen() const noexcept
210 {
211 return skin.Cable1.main.pen3_solid_round_round;
212 }
213 const QPen& DataCablePen() const noexcept
214 {
215 return skin.Cable2.main.pen3_solid_round_round;
216 }
217 const QPen& MidiCablePen() const noexcept
218 {
219 return skin.Cable3.main.pen3_solid_round_round;
220 }
221
222 const QPen& SelectedAudioCablePen() const noexcept
223 {
224 return skin.SelectedCable1.lighter.pen3_solid_round_round;
225 }
226 const QPen& SelectedDataCablePen() const noexcept
227 {
228 return skin.SelectedCable2.lighter.pen3_solid_round_round;
229 }
230 const QPen& SelectedMidiCablePen() const noexcept
231 {
232 return skin.SelectedCable3.lighter.pen3_solid_round_round;
233 }
234
235 const QPen& AudioPortPen() const noexcept { return skin.Port1.main.pen1_5; }
236 const QPen& DataPortPen() const noexcept { return skin.Port2.main.pen1_5; }
237 const QPen& MidiPortPen() const noexcept { return skin.Port3.main.pen1_5; }
238
239 const score::BrushSet& AudioPortBrush() const noexcept { return skin.Port1.darker; }
240 const score::BrushSet& DataPortBrush() const noexcept { return skin.Port2.darker; }
241 const score::BrushSet& MidiPortBrush() const noexcept { return skin.Port3.darker; }
242
243 const QPen& SlotHeaderTextPen() const noexcept
244 {
245 return TimenodeDefault().main.pen_cosmetic;
246 }
247 const QPen& SlotHeaderPen() const noexcept
248 {
249 return IntervalHeaderSideBorder().main.pen1_solid_flat_miter;
250 }
251
252 const score::Brush& LoopBrush() const noexcept { return skin.Tender3; }
253
254private:
255 Style() noexcept;
256 ~Style();
257 void update(const score::Skin& skin);
258};
259}
Definition Skin.hpp:93
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Definition ScenarioStyle.hpp:13
Definition Skin.hpp:55
Definition Skin.hpp:19