30#include <FL/Enumerations.H>
31#include <sptk5/xdoc/Node.h>
32#include <sptk5/gui/CThemeImageState.h>
35#include <sptk5/xdoc/Document.h>
71#define THM_MAX_COLOR_INDEX 4
110#define THM_MAX_COLOR_STATE 5
112using gtk_color_function = Fl_Color (*)(
const String& expression);
116 static std::map<String, gtk_color_function>* m_gtkColorFunctionMap;
117 static std::map<String, Fl_Color> m_colorMap;
118 Fl_Color m_colors[THM_MAX_COLOR_INDEX][MAX_IMAGE_STATES];
120 static Fl_Color gtkColorFunction(
const String& expression);
126 static Fl_Color passby(
const String& expression);
128 static Fl_Color lighter(
const String& expression);
130 static Fl_Color darker(
const String& expression);
132 static Fl_Color shade(
const String& expression);
134 static Fl_Color mix(
const String& expression);
145 void loadFromSptkTheme(xdoc::Document& gtkTheme);
150 void loadFromGtkTheme(xdoc::Document& gtkTheme);
157 return m_colors[colorIndex][state];
Definition: CThemeColorCollection.h:115
CThemeColorCollection() noexcept
Constructor.
Fl_Color textColor(CThemeColorState state) const
Returns text color.
Definition: CThemeColorCollection.h:187
Fl_Color fgColor(CThemeColorState state) const
Returns foreground color.
Definition: CThemeColorCollection.h:163
Fl_Color baseColor(CThemeColorState state) const
Returns base color.
Definition: CThemeColorCollection.h:179
Fl_Color bgColor(CThemeColorState state) const
Returns background color.
Definition: CThemeColorCollection.h:171
Definition: Document.h:34
CThemeColorState
Definition: CThemeColorCollection.h:77
CThemeColorIndex
Definition: CThemeColorCollection.h:48
@ THM_COLOR_INSENSITIVE
Definition: CThemeColorCollection.h:106
@ THM_COLOR_ACTIVE
Definition: CThemeColorCollection.h:101
@ THM_COLOR_NORMAL
Definition: CThemeColorCollection.h:86
@ THM_COLOR_PRELIGHT
Definition: CThemeColorCollection.h:91
@ THM_COLOR_UNDEFINED
Definition: CThemeColorCollection.h:81
@ THM_COLOR_SELECTED
Definition: CThemeColorCollection.h:96
@ THM_TEXT_COLOR
Definition: CThemeColorCollection.h:67
@ THM_FOREGROUND_COLOR
Definition: CThemeColorCollection.h:52
@ THM_BACKGROUND_COLOR
Definition: CThemeColorCollection.h:57
@ THM_BASE_COLOR
Definition: CThemeColorCollection.h:62