Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

CSArea.h

Go to the documentation of this file.
00001 #ifndef CSArea_h
00002 #define CSArea_h
00003 
00004 // USES SDL_Surface
00005 
00006 #ifdef WIN32
00007 #pragma warning(disable : 4786 )
00008 #endif
00009 
00010 #include <string>
00011 
00012 #include "SDLMain.h"
00013 #include "CSLog.h"
00014 
00015 class CSArea;
00016 class CSPicture;
00017 typedef std::vector<CSArea *> CSAreas;
00018 
00019 class CSArea
00020 {
00021     private:
00022     protected:
00023         int mColor;
00024 
00025     public:
00026         static const char *CLASS;
00027         virtual std::string getType() {return (std::string) CLASS;}
00028         CSArea();
00029         virtual ~CSArea() {}
00030         virtual void paint(SDL_Surface *destination, SDL_Rect *parentViewport);
00031         void setColor(int color){mColor = color;}
00032 };
00033 
00034 class CSRoundedArea : public CSArea
00035 {
00036     private:
00037     protected:
00038         int mCorner;
00039 
00040     public:
00041         static const char *CLASS;
00042         virtual std::string getType() {return (std::string) CLASS;}
00043         CSRoundedArea();
00044         virtual void paint(SDL_Surface *destination, SDL_Rect *parentViewport);
00045         void setCorner(int corner){mCorner = corner;}
00046 };
00047 
00048 class CSGradientArea : public CSArea
00049 {
00050     private:
00051     protected:
00052         int mType;
00053         int mSecondColor;
00054 
00055     public:
00056         static const char *CLASS;
00057         virtual std::string getType() {return (std::string) CLASS;}
00058         CSGradientArea();
00059         virtual void paint(SDL_Surface *destination, SDL_Rect *parentViewport);
00060         void setType(int type){mType = type;}
00061         void setSecondColor(int color){mSecondColor = color;}
00062 };
00063 
00064 class CSPictureArea : public CSArea
00065 {
00066     private:
00067     protected:
00068         bool mStretched;
00069         bool mCentered;
00070         CSPicture *mPicture;
00071 
00072     public:
00073         static const char *CLASS;
00074         virtual std::string getType() {return (std::string) CLASS;}
00075         CSPictureArea();
00076         virtual void paint(SDL_Surface *destination, SDL_Rect *parentViewport);
00077         void setPicture(CSPicture *picture){mPicture = picture;}
00078         void setCentered(bool centered){mCentered = centered;}
00079         void setStretched(bool stretched){mStretched = stretched;}
00080 };
00081 #endif // CSArea_h

Generated on Wed Jul 14 00:43:28 2004 for CSLib by doxygen 1.3.6