00001 #ifndef CSLabel_h 00002 #define CSLabel_h 00003 00004 // USES SDL_Surface 00005 00006 #ifdef WIN32 00007 #pragma warning(disable : 4786 ) 00008 #endif 00009 00010 #include <vector> 00011 #include <string> 00012 00013 #include "CSGrafikElement.h" 00014 #include "CSLog.h" 00015 00016 class CSLabel; 00017 typedef std::vector<CSLabel *> CSLabels; 00018 00019 class CSLabel : public CSGrafikElement 00020 { 00021 private: 00022 std::string mString; 00023 protected: 00024 virtual void layoutSetupLabel(); 00025 public: 00026 CSLabel(); 00027 CSLabel(const std::string &string); 00028 static const char *CLASS; 00029 virtual std::string getType() {return (std::string) CLASS;} 00030 00031 virtual void paint(SDL_Surface *destination, SDL_Rect *parentViewport); 00032 virtual bool isFocusable() {return false;} 00033 virtual void setText(const std::string &t) {mString = t; layoutChanged(true);} 00034 virtual void layoutSetup() {layoutSetupLabel();} 00035 }; 00036 00037 #endif // CSLabel_h