SDL_Window.h

Aller à la documentation de ce fichier.
00001 #ifndef _SDL_WINDOW_H
00002 #define _SDL_WINDOW_H
00003 
00009 #include <list> // permet d'utilser les listes chaînées
00010 #include <vector> //utilisation de tableaux dinamiques
00011 #include <algorithm> //pour for_each, qui appelle une fonction pour tous les éléments d'une liste
00012 #include <functional> //pour mem_fun, qui permet de transformer une méthode en fonction
00013 
00014 #include "BorderTexture.h"
00015 #include "refevent.h"
00016 
00027 class SDL_Window
00028 {
00029 public:
00030     Uint32 Rmask; 
00031     Uint32 Gmask; 
00032     Uint32 Bmask; 
00033     Uint32 Amask; 
00034 
00035 protected:
00036     std::list<SDL_Window *> filles; 
00037     SDL_Rect coord; 
00038     SDL_Window *mere; 
00039     SDL_Surface *shadow; 
00040     SDL_Surface *window; 
00041     SDL_Surface *body; 
00042     BorderTexture *border; 
00043     std::vector<RefEvent> gesEvent; 
00044     // TODO (Bérenger#1#): Ajouter une méthode pour ajouter/supprimer de nouveaux gestionnaires d'évènements
00045     // TODO (Bérenger#1#): gérer les priorités pourrait s'avérer très utile. Utiliser un algo de la STL comme sort et un index de priorité dans la classe pour le gérer?
00046 
00047 private:
00048     SDL_Surface * screen; 
00049     SDL_Rect oldCoord; 
00050     bool drawed; 
00051     bool needInit; 
00052 
00053 public:
00057     bool Draw(void);
00069     bool Resize(short width, short height, unsigned char relative = 0);
00080     bool Resize(float width, float height, bool target=0);
00092     bool Move(short x, short y, unsigned char relative);
00100     bool Move(float x, float y);
00105     bool ClearWindow();
00109     SDL_Window(void);
00115     virtual ~SDL_Window();
00126     void SetMasks(unsigned long rmask, unsigned long gmask, unsigned long bmask, unsigned long amask=0);
00132     std::list<SDL_Window*>::iterator CreateSubWindow(void);
00139     bool InitTextures(BorderTexture *bordTex,char* filebody);
00149     bool SetAlpha(unsigned char alpha,bool srcAlpha=true,bool rleAccel=true);
00154     void calcCoord(SDL_Rect *c);
00162     SDL_Window(SDL_Window &source, SDL_Window *mere=0);
00170     SDL_Window &operator=(SDL_Window &source);
00175     SDL_Window(SDL_Window *Mere);
00176 
00177 protected:
00182     bool PrepareWindow();
00183 
00184 };
00185 #endif
00186 

Généré le Sun Nov 15 16:53:06 2009 pour PFen par  doxygen 1.6.1