1 //////////////////////////////////////////////////////////////////////////////// 2 // 3 // File: StringItem.h 4 // 5 // Description: 6 // 7 // Copyright 2001, Ulrich Wimboeck 8 // 9 //////////////////////////////////////////////////////////////////////////////// 10 11 #ifndef _STRING_ITEM_H 12 #define _STRING_ITEM_H 13 14 #include <ListItem.h> 15 16 17 #ifdef USE_OPENBEOS_NAMESPACE 18 namespace OpenBeOS { 19 #endif 20 21 22 //----- BStringItem class ---------------------------------------- 23 24 class BStringItem : public BListItem 25 { 26 public: 27 BStringItem(const char *text, uint32 outlineLevel = 0, bool expanded = true); 28 BStringItem(BMessage *data); 29 virtual ~BStringItem(); 30 31 static BArchivable *Instantiate(BMessage *data); 32 virtual status_t Archive(BMessage *data, bool deep = true) const; 33 34 virtual void DrawItem(BView *owner, BRect frame, bool complete = false); 35 virtual void SetText(const char *text); 36 const char *Text() const; 37 38 virtual void Update(BView *owner, const BFont *font); 39 40 virtual status_t Perform(perform_code code, void *arg); 41 42 private: 43 virtual void _ReservedStringItem1(); 44 virtual void _ReservedStringItem2(); 45 46 BStringItem(const BStringItem &); 47 BStringItem& operator=(const BStringItem &); 48 49 char *fText; 50 float fBaselineOffset; 51 uint32 _reserved[2]; 52 }; 53 54 #ifdef USE_OPENBEOS_NAMESPACE 55 } 56 #endif 57 58 #endif /* _STRING_ITEM_H */ 59