00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef SDLWINDOW_H
00030 #define SDLWINDOW_H
00031
00032 #ifdef SWIG
00033 %include "swigcommon.h"
00034 %module sdlwindow
00035 %{
00036 #include "sdlwindow.h"
00037 %}
00038 #endif
00039
00040 #include "sdlgradientwidget.h"
00041 #include "sdlbutton.h"
00042
00051
00052
00053
00054
00055
00056
00057 class DECLSPEC SDLWindow : public SDLGradientWidget {
00058 public:
00059
00061 SDLWindow(SDLWidget* parent, SDL_Rect& r, char* windowtext);
00062
00064 ~SDLWindow();
00065
00066 void LoadThemeStyle(const char* widgettype);
00067
00068 void SetColorTitlebar(Uint32 color);
00069
00070 protected:
00071
00073 void eventDraw(SDL_Surface* surface, SDL_Rect* rect);
00074
00076 void eventSizeWindow(int w, int h);
00077
00079 bool eventButtonClick(int id, SDLWidget* widget);
00080
00082 bool eventMouseButtonDown(const SDL_MouseButtonEvent* button);
00083
00085 bool eventMouseButtonUp(const SDL_MouseButtonEvent* button);
00086
00088 bool eventMouseMotion(const SDL_MouseMotionEvent* motion);
00089
00090 private:
00091
00092 SDL_Rect my_rectTitlebar;
00093 SDL_Surface* my_srfTitlebar;
00094 SDL_Gradient my_gradientTitlebar;
00095 SDL_Color my_colorTitlebar;
00096 char my_text[255];
00097 Uint8 my_heightTitlebar;
00098 SDL_Surface* my_backgroundTitlebar;
00099 int my_backmodeTitlebar;
00100 int my_blendTitlebar;
00101 int my_bordersizeTitlebar;
00102
00103 SDLButton* my_buttonClose;
00104 bool my_moveMode;
00105 Uint8 my_moveTransparency;
00106 SDL_Point my_moveDelta;
00107
00108 private:
00109 SDLWindow(const SDLWindow&);
00110 SDLWindow& operator=(const SDLWindow&);
00111 };
00112
00113 #endif // SDLWINDOW_H