1/*
2 * Copyright 2006-2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _STRING_ITEM_H
6#define _STRING_ITEM_H
7
8
9#include <ListItem.h>
10
11
12class BStringItem : public BListItem {
13public:
14								BStringItem(const char* text,
15									uint32 outlineLevel = 0,
16									bool expanded = true);
17								BStringItem(BMessage* archive);
18	virtual						~BStringItem();
19
20	static	BArchivable*		Instantiate(BMessage* archive);
21	virtual	status_t			Archive(BMessage* archive,
22									bool deep = true) const;
23
24	virtual	void				DrawItem(BView* owner, BRect frame,
25									bool complete = false);
26	virtual	void				SetText(const char* text);
27			const char*			Text() const;
28
29	virtual	void				Update(BView* owner, const BFont* font);
30
31	virtual	status_t			Perform(perform_code code, void* arg);
32
33protected:
34			float				BaselineOffset() const;
35
36private:
37	// FBC padding and forbidden methods
38	virtual	void				_ReservedStringItem1();
39	virtual	void				_ReservedStringItem2();
40
41								BStringItem(const BStringItem& item);
42			BStringItem&		operator=(const BStringItem& item);
43
44private:
45			char*				fText;
46			float				fBaselineOffset;
47			uint32				_reserved[2];
48};
49
50#endif	// _STRING_ITEM_H
51