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

/Users/blackie/Documents/myRepository/phobosengine-vc2005/phobosengine/phobosengine/Component.h

Go to the documentation of this file.
00001 
00002 
00003 #ifndef COMPONENT_H
00004 #define COMPONENT_H
00005 
00006 
00007 #include "RenderableObject.h"
00008 
00009 #include "Vector2i.h"
00010 #include "Vector4f.h"
00011 
00012 namespace pge {
00013         
00014 
00015         class Texture;
00016 
00017 
00018         namespace gui {
00019 
00020 
00021                 class Component : public IRenderableObject {
00022 
00023 
00024                 public:
00025                         //************************************************************************
00026                         //
00027                         // Constructor
00028                         //
00029                         //************************************************************************
00031                         Component(int x, int y, int width, int height);
00032 
00033 
00034                         //************************************************************************
00035                         //
00036                         // Destructor
00037                         //
00038                         //************************************************************************
00040                         virtual ~Component(void);
00041 
00042 
00043                         //************************************************************************
00044                         //
00045                         // Functions
00046                         //
00047                         //************************************************************************
00048                         void render(void);
00049 
00050                         void setBackgroundColor(const Vector4f &color);
00051                         Vector4f getBackgroundColor(void);
00052                         void setPosition(Vector2i position);
00053                         Vector2i getPosition(void);
00054                         void setDimension(const Vector2i &dimension);
00055                         Vector2i getDimension(void);
00056                         void setTextureEnabled(bool texEnabled);
00057                         bool isTextureEnabled(void);
00058                         void setTexture(Texture *texture);
00059                         static Vector2i convertToGLCoords(const Vector2i &coords);
00060                         static Vector2i convertToGLCoords(int x, int y);
00061 
00062 
00063                 private:
00064                         //************************************************************************
00065                         //
00066                         // Variables
00067                         //
00068                         //************************************************************************
00069                         Vector2i m_position;
00070                         Vector2i m_dimension;
00071                         Vector4f m_backgroundColor;
00072                         Texture *m_texture;
00073                         bool m_textureEnabled;
00074                 };
00075         };
00076 };
00077 
00078 #endif

Generated on Mon Oct 16 12:08:10 2006 for Phobosengine by doxygen 1.3.4