00001 #ifndef AEDTHEME_H 00002 #define AEDTHEME_H 00003 00004 #include <string> 00005 #include "dllmacros.h" 00006 #include "drawlibs.h" 00007 #include "aedColor.h" 00008 00009 class aedColor; 00010 class aedWidget; 00011 class aedButton; 00012 class aedStaticText; 00013 class aedTextBox; 00014 class aedDialogBox; 00015 class aedProgressBar; 00016 class aedFrame; 00017 class aedCheckBox; 00018 class aedSlider; 00019 class aedScrollBar; 00020 class aedRadioButtonGroup; 00021 class aedListBox; 00022 00023 // This has to be modified after every breakage of 00024 // binary compatibility of the plugin interface. 00025 #define AEDGUI_PIF_VERSION (0 * 100 + 1 * 10 + 7) 00026 00027 #define DRAWFUNC(x) virtual void draw##x(aed##x *widget, SDL_Surface *screen) 00028 00029 struct aedThemeInfo 00030 { 00031 std::string name; 00032 std::string author; 00033 std::string description; 00034 }; 00035 00036 class DLLEXPORT aedTheme 00037 { 00038 public: 00039 aedTheme(); 00040 virtual ~ aedTheme(); 00041 00042 const aedThemeInfo *getThemeInfo() 00043 { 00044 return &m_ThemeInfo; 00045 } 00046 00047 // Font properties 00048 std::string defaultFontName; 00049 Uint8 defaultFontSize; 00050 aedColor defaultTextColor; 00051 00052 // Colors 00053 aedColor colorBoxBackground; 00054 aedColor colorButtonNormal1; 00055 aedColor colorButtonNormal2; 00056 aedColor colorButtonPushed1; 00057 aedColor colorButtonPushed2; 00058 aedColor colorButtonOver1; 00059 aedColor colorButtonOver2; 00060 00061 aedColor colorDefaultWidgetBackground; 00062 00063 // Drawing functions 00064 DRAWFUNC(Button); 00065 DRAWFUNC(Slider); 00066 DRAWFUNC(ScrollBar); 00067 DRAWFUNC(Frame); 00068 DRAWFUNC(ProgressBar); 00069 DRAWFUNC(CheckBox); 00070 00071 virtual void drawBorder(aedWidget * widget, SDL_Surface * screen); 00072 virtual void drawBox(aedWidget * widget, SDL_Surface * screen); 00073 virtual void drawSquareButton(aedButton * widget, SDL_Surface * screen); 00074 00075 protected: 00076 aedThemeInfo m_ThemeInfo; 00077 }; 00078 00079 #define PROCESS_ALPHA(a,b) ( (Uint8) ((((Uint32)a * b) >> 8) & 0xff) ) 00080 00081 #endif /* AEDTHEME_H */
1.4.7