xref: /haiku/headers/os/interface/StringItem.h (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
1 /*
2  * Copyright 2006, 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 
12 class BStringItem : public BListItem {
13 	public:
14 							BStringItem(const char* text, uint32 outlineLevel = 0,
15 								bool expanded = true);
16 							BStringItem(BMessage* archive);
17 		virtual				~BStringItem();
18 
19 		static BArchivable*	Instantiate(BMessage* archive);
20 		virtual status_t	Archive(BMessage* archive, bool deep = true) const;
21 
22 		virtual	void		DrawItem(BView* owner, BRect frame, bool complete = false);
23 		virtual	void		SetText(const char* text);
24 		const char*			Text() const;
25 
26 		virtual	void		Update(BView* owner, const BFont* font);
27 
28 		virtual status_t	Perform(perform_code code, void* arg);
29 
30 	private:
31 		virtual	void		_ReservedStringItem1();
32 		virtual	void		_ReservedStringItem2();
33 
34 							BStringItem(const BStringItem& item);
35 		BStringItem&		operator=(const BStringItem& item);
36 
37 		char*				fText;
38 		float				fBaselineOffset;
39 		uint32				_reserved[2];
40 };
41 
42 #endif	// _STRING_ITEM_H
43