31#include <sptk5/gui/CFont.h>
32#include <sptk5/gui/CFrame.h>
33#include <sptk5/gui/CIcon.h>
34#include <sptk5/gui/CRect.h>
35#include <sptk5/gui/CTabImage.h>
36#include <sptk5/gui/CThemeColorCollection.h>
37#include <sptk5/gui/CThemeImageCollection.h>
38#include <sptk5/gui/CThemeScrollBar.h>
39#include <sptk5/xdoc/Node.h>
48#define MAX_BACKGROUND_IMAGES 7
75 static std::string m_name;
81 static Fl_Box_Draw_F* m_flatBox;
86 static Fl_Box_Draw_F* m_thinUpBox;
91 static Fl_Box_Draw_F* m_upBox;
96 static Fl_Box_Draw_F* m_thinDownBox;
101 static Fl_Box_Draw_F* m_downBox;
107 static Fl_Box_Draw_F* m_thinUpFrame;
112 static Fl_Box_Draw_F* m_upFrame;
117 static Fl_Box_Draw_F* m_thinDownFrame;
122 static Fl_Box_Draw_F* m_downFrame;
138 static std::string m_themeFolder;
145 static CPngImage* m_background[MAX_BACKGROUND_IMAGES];
193 static bool m_flatButtons;
198 static bool m_gtkTheme;
221 static void replaceImage(
CPngImage** images,
int ndx,
const std::string& fileName);
231 static void paintBackground(
int xx,
int yy,
int ww,
int hh,
CPngImage* image);
242 static void drawThemeBox(
int x,
int y,
int w,
int h, Fl_Color color, Fl_Boxtype frameType = FL_NO_BOX);
252 static void drawThemeFrame(
int x,
int y,
int w,
int h, Fl_Boxtype frameType);
258 static CPngImage* imageForColor(Fl_Color clr);
264 static bool m_desaturateInactiveButtons;
269 static int m_buttonFocusRadius;
281 static bool drawCheckOrRadioButton(
CThemeImageCollection& buttonImages,
int x,
int y,
bool checked,
bool highlited);
294 static void loadGtkButton(
const xdoc::SNode& imageNode, std::map<CThemeImageState, std::string>& buttonFileNames);
304 std::map<CThemeImageState, std::string>& fileNames,
305 std::string orientation =
"");
339 static void set(std::string themeName);
367 static void drawFlatBox(
int x,
int y,
int w,
int h, Fl_Color clr);
377 static void drawUpBox(
int x,
int y,
int w,
int h, Fl_Color clr);
387 static void drawDownBox(
int x,
int y,
int w,
int h, Fl_Color clr);
397 static void drawUpFrame(
int x,
int y,
int w,
int h, Fl_Color clr);
487 static bool drawTab(
int x,
int y,
int w,
int h,
bool active);
CFontsMap is a map font names to fonts.
Definition: CFont.h:157
CFontsVector is a map font names to fonts.
Definition: CFont.h:184
Frame images collection.
Definition: CFrame.h:157
A map of theme icon names to theme icons.
Definition: CIcon.h:153
Class CIcon provides a storage of PNG image.
Definition: CIcon.h:72
PNG image that is initialized from the memory buffer.
Definition: CPngImage.h:53
Definition: CTabImage.h:128
Definition: CThemeColorCollection.h:115
A collection of theme images.
Definition: CThemeImageCollection.h:46
Widget themes.
Definition: CThemes.h:69
static void drawThinDownFrame(int x, int y, int w, int h, Fl_Color clr)
static int buttonFocusRadius()
static CIcon * getIcon(const String &iconName, CIconSize iconSize)
Returns a button icon by symbolic name.
static void set(std::string themeName)
static const Strings & searchDirectories()
Themes root directories.
static void drawThinUpFrame(int x, int y, int w, int h, Fl_Color clr)
static bool drawButton(CThemeButtonType sz, int x, int y, int &w, int &h, bool highlited, bool pressed, bool defaultButton)
static CFontsVector screenFonts
All the available screen fonts.
Definition: CThemes.h:518
static bool drawRadioButton(int x, int y, bool checked, bool highlited)
static void loadGtkButtonFileNames(xdoc::Document &xml, std::string XPath, std::map< CThemeImageState, std::string > &fileNames, std::string orientation="")
Loads GTK theme button file names from XPath.
static void registerIcon(CIcon *icon, CIconSize iconSize)
Registers a new button icon.
static CPngImage * getIconImage(const String &iconName, CIconSize iconSize)
Returns a button icon image by symbolic name.
static void drawDownFrame(int x, int y, int w, int h, Fl_Color clr)
static void drawThinUpBox(int x, int y, int w, int h, Fl_Color clr)
static void loadGtkButtons(xdoc::Document &xml, const String &styleName, CThemeImageCollection &buttons, const String &function)
Loads GTK theme button images from 'style' node.
static bool sizeButton(CThemeButtonType sz, int &w, int &h)
static bool drawTabFrame(int x, int y, int w, int h)
Draws a tab frame.
static void drawFlatBox(int x, int y, int w, int h, Fl_Color clr)
static bool sizeProgressBar(int &w, int &h)
static void drawThinDownBox(int x, int y, int w, int h, Fl_Color clr)
static void drawUpBox(int x, int y, int w, int h, Fl_Color clr)
static void loadGtkTheme(const String >kThemeName)
Loads current Gnome GTK theme.
static void loadGtkButton(const xdoc::SNode &imageNode, std::map< CThemeImageState, std::string > &buttonFileNames)
Loads GTK theme button file name from 'image' node, and stores it into the map.
static Strings availableThemes()
static bool drawProgressBar(int x, int y, int w, float percent)
static void drawUpFrame(int x, int y, int w, int h, Fl_Color clr)
static std::string themeFolder()
Returns path to the theme folder.
static void drawDownBox(int x, int y, int w, int h, Fl_Color clr)
static Tar m_tar
Theme tar archive. Contains all the theme data.
Definition: CThemes.h:533
static bool drawTab(int x, int y, int w, int h, bool active)
Draws a tab.
static bool drawCheckButton(int x, int y, bool checked, bool highlited)
static std::string name()
Returns theme name.
Definition: Document.h:34
CThemeButtonType
Theme button size - defines the button size and look to select the correct pixmap.
Definition: CThemes.h:54
CIconSize
Icon size variations.
Definition: CIcon.h:45