|
SCV
4.2.1
Simple Components for Visual
|
Functionality to customize SCV component color themes. More...
#include <ColorScheme.h>
Public Types | |
| enum | Target { CURSOR, TEXT, TEXTSELECTION, TEXTSELECTED, BACKGROUND, MENUBAR, PROGRESSBAR, SEPARATOR, TEXTFIELD, CONTEXTMENU, CONTEXTMENUFONT, PANEL, SCROLLPANEL, MAINCOMPONENTS, OVERCOMPONENTS, HOLDCOMPONENTS, FONT, s_nComponents } |
| Possible color values that can be customized. More... | |
| enum | SchemeStyle { SCVDEFAULT, WARCRAFT, WINDOWS, OSX, CLEAN } |
| Predefined color schemes. More... | |
Public Member Functions | |
| void | loadScheme (ColorScheme::SchemeStyle style) |
| Load a predefined SCV color scheme. | |
| void | setColor (ColorScheme::Target target, const Color4f &color) |
| Sets a color value in the color scheme. | |
| const Color4f & | getColor (ColorScheme::Target target) const |
| Returns component's current color in the color scheme. | |
| void | applyColor (const Color4f &color) |
| Prepares the graphics system to draw a component with the specified color. Should be called only by widget implementations. | |
| void | applyColor (ColorScheme::Target target) |
| Prepares to draw component with specified color target. | |
| void | applyColor (ColorScheme::Target target, float w) |
| Prepares to draw a component with the specified color target, brightened/darkened by the value w. | |
| void | applyDefaultModulate () |
Friends | |
| class | Singleton< ColorScheme > |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< T > | |
| static void | setInstance (T *instance) |
| static T * | getInstance () |
| static void | destroyInstance () |
Protected Member Functions inherited from Singleton< T > | |
| Singleton (void) | |
| virtual | ~Singleton (void) |
| Singleton (const Singleton &source) | |
Static Protected Attributes inherited from Singleton< T > | |
| static T * | _instance = 0 |
Functionality to customize SCV component color themes.
Since it's a Singleton class, it must be acessed via getInstance().
Example:
Possible color values that can be customized.
| CURSOR |
SCV cursor. |
| TEXT |
Text color. |
| TEXTSELECTION |
Color of text selection rectangle. |
| TEXTSELECTED |
Color of selected text. |
| BACKGROUND |
Main window background. |
| MENUBAR |
widget |
| PROGRESSBAR |
ProgressBar widget. |
| SEPARATOR |
Separator widget. |
| TEXTFIELD |
TextField widget. |
| CONTEXTMENU |
Context menus. |
| CONTEXTMENUFONT |
Context menu text. |
| PANEL |
Panel background. |
| SCROLLPANEL |
Scrollable panel background. |
| MAINCOMPONENTS | |
| OVERCOMPONENTS | |
| HOLDCOMPONENTS | |
| FONT |
General text. |
| s_nComponents |
Total number of color settings. |
| void scv::ColorScheme::applyColor | ( | const Color4f & | color | ) |
Prepares the graphics system to draw a component with the specified color. Should be called only by widget implementations.
| void scv::ColorScheme::applyColor | ( | ColorScheme::Target | target | ) |
Prepares to draw component with specified color target.
| void scv::ColorScheme::applyColor | ( | ColorScheme::Target | target, |
| float | w | ||
| ) |
Prepares to draw a component with the specified color target, brightened/darkened by the value w.
| void scv::ColorScheme::applyDefaultModulate | ( | ) |
| const Color4f & scv::ColorScheme::getColor | ( | ColorScheme::Target | target | ) | const |
Returns component's current color in the color scheme.
| void scv::ColorScheme::loadScheme | ( | ColorScheme::SchemeStyle | style | ) |
Load a predefined SCV color scheme.
| void scv::ColorScheme::setColor | ( | ColorScheme::Target | target, |
| const Color4f & | color | ||
| ) |
Sets a color value in the color scheme.
| target | Color scheme entry that should be modified. |
| color | New color of component. |
|
friend |