html/text.hh

00001 /* -*- mode: c++; c-basic-offset: 4; -*- */
00002 #ifndef HTML_TEXT_HH
00003 #define HTML_TEXT_HH
00004 
00005 #include "html/textAttr.hh"
00006 #include "html/object.hh"
00007 #include <string>
00008 
00009 class Time;
00010 
00011 namespace html {
00012   class color;
00013   class font;
00014   class size;
00015 
00025   class text : public object {
00026   public:
00030     text(void);
00031 
00037     text(const std::string& x);
00038 
00042     text(double x);
00043 
00047     text(const Time& x, const char* fmt="%M %d, %Y %02H:%02N");
00048 
00052     virtual ~text(void);
00053 
00060     text* clone(void) const;
00061 
00066     void write(writer& out) const;
00067 
00072     void insertText(const std::string& txt);
00073 
00078     void addText(const std::string& txt);
00079 
00085     text& operator<<(const std::string& txt);
00086 
00092     text& operator<<(double x);
00093 
00099     text& setColor(const color& Color);
00100 
00106     text& setFont(const font& Font);
00107 
00113     text& setSize(const size& Size);
00114 
00115   private:
00116     textAttr    mAttr;
00117     std::string mText;
00118   };
00119 
00120 }
00121 
00122 #endif  // HTML_TEXT_HH

Generated on Sun Mar 8 19:20:49 2009 for dmt by  doxygen 1.5.4