1/*
2 * Copyright 2006, Haiku.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Stephan Aßmus <superstippi@gmx.de>
7 */
8
9#ifndef ICON_OBJECT_H
10#define ICON_OBJECT_H
11
12#include <String.h>
13
14#include "Observable.h"
15#include "Referenceable.h"
16#include "Selectable.h"
17
18class BMessage;
19class PropertyObject;
20
21class IconObject : public Observable,
22				   public Referenceable,
23				   public Selectable {
24 public:
25								IconObject(const char* name);
26								IconObject(const IconObject& other);
27								IconObject(BMessage* archive);
28	virtual						~IconObject();
29
30	// Selectable interface
31	virtual	void				SelectedChanged();
32
33	// IconObject
34	virtual	status_t			Unarchive(const BMessage* archive);
35	virtual status_t			Archive(BMessage* into,
36										bool deep = true) const;
37
38	virtual	PropertyObject*		MakePropertyObject() const;
39	virtual	bool				SetToPropertyObject(
40									const PropertyObject* object);
41
42			void				SetName(const char* name);
43			const char*			Name() const
44									{ return fName.String(); }
45
46 private:
47			BString				fName;
48};
49
50#endif // ICON_OBJECT_H
51