GLICT/skinner.h

00001 /*
00002     GLICT - Graphics Library Interface Creation Toolkit
00003     Copyright (C) 2006-2007 OBJECT Networks
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __GLICT_SKINNER_H
00021 #define __GLICT_SKINNER_H
00022 #ifdef WIN32
00023     #include <windows.h>
00024 #endif
00025 #ifndef NO_GL
00026         #include <GL/gl.h>
00027 #else
00028         typedef unsigned int GLuint;
00029 #endif
00030 #include <GLICT/types.h>
00031 
00038 class glictSkinner;
00039 typedef void(*glictBindCallback)(glictSkinner *callback, void*param) ;
00040 
00041 class glictSkinner {
00042     public:
00043         glictSkinner();
00044         ~glictSkinner();
00045 
00046         void Paint(glictSize *size); 
00047 
00048         // first, the corner parts. their both height and width get specified.
00049         // look at how beautifully "aligned" the texxt is :)
00050         void SetTL(GLuint textureid, glictSize *size);    
00051         void SetTL(glictBindCallback bindf, void* param, glictSize *size); 
00052         void SetTR(GLuint textureid, glictSize *size);    
00053         void SetTR(glictBindCallback bindf, void* param, glictSize *size); 
00054         void SetBL(GLuint textureid, glictSize *size);    
00055         void SetBL(glictBindCallback bindf, void* param, glictSize *size); 
00056         void SetBR(GLuint textureid, glictSize *size);    
00057         void SetBR(glictBindCallback bindf, void* param, glictSize *size); 
00058 
00059         void SetTop(GLuint textureid, glictSize *size);   
00060         void SetTop(glictBindCallback bindf, void* param, glictSize *size); 
00061         void SetLeft(GLuint textureid, glictSize *size);  
00062         void SetLeft(glictBindCallback bindf, void* param, glictSize *size); 
00063         void SetRight(GLuint textureid, glictSize *size); 
00064         void SetRight(glictBindCallback bindf, void* param, glictSize *size); 
00065         void SetBottom(GLuint textureid, glictSize *size);
00066         void SetBottom(glictBindCallback bindf, void* param, glictSize *size); 
00067 
00068         void SetCenter(GLuint textureid, glictSize *size);
00069         void SetCenter(glictBindCallback bindf, void* param, glictSize *size); 
00070 
00071         glictSize *GetTopSize();
00072         glictSize *GetLeftSize();
00073         glictSize *GetRightSize();
00074         glictSize *GetBottomSize();
00075     private:
00076         GLuint topleft; glictSize toplefts;
00077         GLuint topright; glictSize toprights;
00078         GLuint bottomleft; glictSize bottomlefts;
00079         GLuint bottomright; glictSize bottomrights;
00080 
00081         GLuint top; glictSize tops;
00082         GLuint left; glictSize lefts;
00083         GLuint right; glictSize rights;
00084         GLuint bottom; glictSize bottoms;
00085 
00086         GLuint center; glictSize centers;
00087 
00088         glictBindCallback topleftf; void* topleftp;
00089         glictBindCallback toprightf; void* toprightp;
00090         glictBindCallback bottomleftf; void* bottomleftp;
00091         glictBindCallback bottomrightf; void* bottomrightp;
00092 
00093         glictBindCallback topf; void* topp;
00094         glictBindCallback leftf; void* leftp;
00095         glictBindCallback rightf; void* rightp;
00096         glictBindCallback bottomf; void* bottomp;
00097 
00098         glictBindCallback centerf; void* centerp;
00099 
00100         glictSize size;
00101 };
00102 
00103 #endif

SourceForge.net Logo
generated with doxygen 1.5.3 on Mon Oct 29 18:09:26 2007