00001 #ifndef _GSKIN_ENGINE_H_
00002 #define _GSKIN_ENGINE_H_
00003
00004 #include "GList.h"
00005
00006
00007 #define GSKIN_COLOUR 0x00000001
00008 #define GSKIN_BUTTON 0x00000002
00009 #define GSKIN_EDIT 0x00000004
00010 #define GSKIN_CHECKBOX 0x00000008
00011 #define GSKIN_RADIO 0x00000010
00012 #define GSKIN_GROUP 0x00000020
00013 #define GSKIN_SLIDER 0x00000040
00014 #define GSKIN_COMBO 0x00000080
00015 #define GSKIN_BITMAP 0x00000100
00016 #define GSKIN_PROGRESS 0x00000200
00017 #define GSKIN_TREE 0x00000400
00018 #define GSKIN_LIST 0x00000800
00019 #define GSKIN_LISTCOL 0x00001000
00020 #define GSKIN_TABVIEW 0x00002000
00021
00022
00023 class GSkinState
00024 {
00025 public:
00026 int Size;
00027 GSurface *pScreen;
00028 GDisplayString **Text;
00029 bool MouseOver;
00030 GRect Rect;
00031
00032 GSkinState()
00033 {
00034 Size = sizeof(*this);
00035 pScreen = 0;
00036 Text = 0;
00037 MouseOver = false;
00038 }
00039 };
00040
00041
00042 class GSkinEngine
00043 {
00044 public:
00045 virtual ~GSkinEngine() {}
00046
00047
00048
00049
00050
00051
00052
00053
00054 virtual uint32 GetFeatures() { return 0; }
00055
00056
00057
00058 virtual uint32 GetColour(int i) { return 0; }
00059
00060
00061
00062 virtual void OnPaint_GText (GText *Ctrl, GSkinState *State) {};
00063 virtual void OnPaint_GButton (GButton *Ctrl, GSkinState *State) {};
00064 virtual void OnPaint_GEdit (GEdit *Ctrl, GSkinState *State) {};
00065 virtual void OnPaint_GCheckBox (GCheckBox *Ctrl, GSkinState *State) {};
00066 virtual void OnPaint_GRadioGroup (GRadioGroup *Ctrl, GSkinState *State) {};
00067 virtual void OnPaint_GRadioButton (GRadioButton *Ctrl, GSkinState *State) {};
00068 virtual void OnPaint_GTabView (GTabView *Ctrl, GSkinState *State) {};
00069 virtual void OnPaint_GSlider (GSlider *Ctrl, GSkinState *State) {};
00070 virtual void OnPaint_GCombo (GCombo *Ctrl, GSkinState *State) {};
00071 virtual void OnPaint_GBitmap (GBitmap *Ctrl, GSkinState *State) {};
00072 virtual void OnPaint_GProgress (GProgress *Ctrl, GSkinState *State) {};
00073 virtual void OnPaint_GTree (GTree *Ctrl, GSkinState *State) {};
00074 virtual void OnPaint_GList (GList *Ctrl, GSkinState *State) {};
00075
00076
00077
00078
00079 virtual void OnPaint_GListColumn(GListColumn *Col, GSkinState *State) {};
00080
00081
00082 virtual GFont *GetDefaultFont(char *Class) { return SysFont; }
00083
00085
00087 };
00088
00089 #define LgiSkinEntryPoint "CreateSkinEngine"
00090 typedef GSkinEngine *(*Proc_CreateSkinEngine)(class GApp *App);
00091
00092 #endif