#ifndef TextItem_First #define TextItem_First #ifdef __GNUG__ #pragma interface #endif #include "VObject.h" //---- TextItem ---------------------------------------------------------------- class TextItem : public VObject { public: MetaDef(TextItem); TextItem(const char *t, Font *f= gSysFont, const Point &b= gBorder); TextItem(int id, const char *t, Font *f= gSysFont, const Point &b= gBorder); ~TextItem(); void SetString(const char*, bool redraw= FALSE); void SetFString(bool redraw, const char *fmt, ...); void SetBorder(const Point &b); Metric GetMinSize(); Font *GetFont(); void SetFont(Font *fp, bool redraw= FALSE); void Draw(Rectangle); const char *AsString(); int Compare(Object *op); bool IsEqual(Object *op); OStream& PrintOn(OStream&); IStream& ReadFrom(IStream&); protected: char *text; Font *font; Point border; }; inline void TextItem::SetBorder(const Point &b) { border= b; } inline Font *TextItem::GetFont() { return font; } #endif