PFen.h
Aller à la documentation de ce fichier.00001 #ifndef PFEN_H
00002 #define PFEN_H
00003
00009 #include <list>
00010 #include <vector>
00011 #include <algorithm>
00012 #include <functional>
00013
00014 #include "BorderTexture.h"
00015 #include "refevent.h"
00016
00027 class PFen
00028 {
00029 public:
00030 Uint32 Rmask;
00031 Uint32 Gmask;
00032 Uint32 Bmask;
00033 Uint32 Amask;
00034
00035 protected:
00036 std::list<PFen *> filles;
00037 SDL_Rect coord;
00038 PFen *mere;
00039 SDL_Surface *shadow;
00040 SDL_Surface *window;
00041 SDL_Surface *body;
00042 BorderTexture *border;
00043 std::vector<RefEvent> refEvent;
00044 SDL_Event *event;
00045 bool evFired;
00046
00047
00048
00049 private:
00050 SDL_Surface * screen;
00051 SDL_Rect oldCoord;
00052 bool drawed;
00053 bool needInit;
00054
00055 public:
00062 bool testEvent(const SDL_Event *evnt);
00066 bool Draw(void);
00078 bool Resize(short width, short height, unsigned char relative = 0);
00089 bool Resize(float width, float height, bool target=0);
00101 bool Move(short x, short y, unsigned char relative);
00109 bool Move(float x, float y);
00114 bool ClearWindow();
00118 PFen(void);
00124 virtual ~PFen();
00135 void SetMasks(unsigned long rmask, unsigned long gmask, unsigned long bmask, unsigned long amask=0);
00141 std::list<PFen*>::iterator CreateSubWindow(void);
00148 bool InitTextures(BorderTexture *bordTex,char* filebody);
00158 bool SetAlpha(unsigned char alpha,bool srcAlpha=true,bool rleAccel=true);
00163 void calcCoord(SDL_Rect *c);
00171 PFen(PFen &source, PFen *mere=0);
00179 PFen &operator=(PFen &source);
00184 PFen(PFen *Mere);
00185
00186 protected:
00191 bool pTestEvent(void);
00196 bool PrepareWindow();
00197
00198 };
00199 #endif
00200