00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef TSE3_DISPLAYPARAMS_H
00018 #define TSE3_DISPLAYPARAMS_H
00019
00020 #include "tse3/listen/DisplayParams.h"
00021
00022 #include "tse3/Notifier.h"
00023 #include "tse3/Serializable.h"
00024
00025 namespace TSE3
00026 {
00066 class DisplayParams : public Notifier<DisplayParamsListener>,
00067 public Serializable
00068 {
00069 public:
00070
00076 DisplayParams();
00077 DisplayParams(const DisplayParams &);
00078 virtual ~DisplayParams();
00079 DisplayParams &operator=(const DisplayParams &);
00080
00102 enum DrawingStyle
00103 {
00104 Default,
00105 PresetColour,
00106 Colour,
00107 None
00108 };
00109
00122 enum PresetColours
00123 {
00124 Intro,
00125 Verse,
00126 Chorus,
00127 Bridge,
00128 Coda,
00129 Refrain,
00130 Melody,
00131 Solo,
00132 Backing,
00133
00134 Brass,
00135 Percussion,
00136 Drums,
00137 Guitar,
00138 Bass,
00139 Flute,
00140 Strings,
00141 Keyboard,
00142 Piano,
00143 Saxophone,
00144
00145 NoPresetColours
00146 };
00147
00155 static const char *presetColourString(int pc);
00156
00167 int style() { return _style; }
00168
00175 void setStyle(int s);
00176
00191 int presetColour() const { return _preset; }
00192
00199 void setPresetColour(int pc);
00200
00216 void colour(int &r, int &g, int &b)
00217 {
00218 r = _r;
00219 g = _g;
00220 b = _b;
00221 }
00222
00231 void setColour(int r, int g, int b);
00232
00236 virtual void save(std::ostream &o, int i) const;
00237
00241 virtual void load(std::istream &in, SerializableLoadInfo &info);
00242
00243 private:
00244
00245 int _style;
00246 int _r, _g, _b;
00247 int _preset;
00248 };
00249
00260 class PresetColours : public Notifier<PresetColoursListener>
00261 {
00262 public:
00263
00264 PresetColours();
00265
00280 void colour(int preset, int &r, int &g, int &b)
00281 {
00282 r = _r[preset];
00283 g = _g[preset];
00284 b = _b[preset];
00285 }
00286
00299 void setColour(int preset, int r, int g, int b);
00300
00301 private:
00302
00303 int _r[DisplayParams::NoPresetColours];
00304 int _g[DisplayParams::NoPresetColours];
00305 int _b[DisplayParams::NoPresetColours];
00306 };
00307 }
00308
00309 #endif