2002-07-09 16:24:59 +04:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// File: StringItem.h
|
|
|
|
//
|
2002-10-28 04:38:57 +03:00
|
|
|
// Description:
|
2002-07-09 16:24:59 +04:00
|
|
|
//
|
|
|
|
// Copyright 2001, Ulrich Wimboeck
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _STRING_ITEM_H
|
|
|
|
#define _STRING_ITEM_H
|
|
|
|
|
|
|
|
#include <ListItem.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef USE_OPENBEOS_NAMESPACE
|
2002-10-29 21:41:51 +03:00
|
|
|
namespace OpenBeOS {
|
2002-07-09 16:24:59 +04:00
|
|
|
#endif
|
|
|
|
|
2002-10-29 21:41:51 +03:00
|
|
|
|
|
|
|
//----- BStringItem class ----------------------------------------
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
class BStringItem : public BListItem
|
|
|
|
{
|
|
|
|
public:
|
2002-10-28 04:38:57 +03:00
|
|
|
BStringItem(const char *text, uint32 outlineLevel = 0, bool expanded = true);
|
|
|
|
BStringItem(BMessage *data);
|
|
|
|
virtual ~BStringItem();
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
static BArchivable *Instantiate(BMessage *data);
|
|
|
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
virtual void DrawItem(BView *owner, BRect frame, bool complete = false);
|
|
|
|
virtual void SetText(const char *text);
|
|
|
|
const char *Text() const;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
virtual void Update(BView *owner, const BFont *font);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
virtual status_t Perform(perform_code code, void *arg);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
private:
|
2002-10-29 21:41:51 +03:00
|
|
|
virtual void _ReservedStringItem1();
|
|
|
|
virtual void _ReservedStringItem2();
|
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
BStringItem(const BStringItem &);
|
|
|
|
BStringItem& operator=(const BStringItem &);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-28 04:38:57 +03:00
|
|
|
char *fText;
|
|
|
|
float fBaselineOffset;
|
2002-10-29 21:41:51 +03:00
|
|
|
uint32 _reserved[2];
|
2002-10-28 04:38:57 +03:00
|
|
|
};
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
#ifdef USE_OPENBEOS_NAMESPACE
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _STRING_ITEM_H */
|