SCV  4.2.1
Simple Components for Visual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ColorScheme.h
Go to the documentation of this file.
1 
7 #ifndef __SCV_COLOR_SCHEME_H__
8 #define __SCV_COLOR_SCHEME_H__
9 
10 #include "Singleton.h"
11 #include "Color4f.h"
12 
13 namespace scv {
14 
23 class ColorScheme : public Singleton<ColorScheme> {
24 friend class Singleton<ColorScheme>;
25 public:
27  enum Target {
29  TEXT,
41  MAINCOMPONENTS, // if not specified like a special widget
42  OVERCOMPONENTS, // if not specified like a special widget
43  HOLDCOMPONENTS, // if not specified like a special widget
44  FONT,
46  };
47 
49  enum SchemeStyle {
53  OSX,
55  };
57 
59 
60  void setColor(ColorScheme::Target target, const Color4f &color);
61  const Color4f& getColor(ColorScheme::Target target) const;
62 
63  void applyColor(const Color4f &color);
64  void applyColor(ColorScheme::Target target);
65  void applyColor(ColorScheme::Target target, float w);
66 
67  void applyDefaultModulate();
68 
69 private:
70  ColorScheme();
71 
72  Color4f _pColors[s_nComponents];
73  const Color4f _defaultModulateColor;
74 };
75 
76 } // namespace scv
77 
78 #endif // __SCV_COLOR_SCHEME_H__