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 <Referenceable.h>
13#include <String.h>
14
15#include "Observable.h"
16#include "Selectable.h"
17
18class BMessage;
19class PropertyObject;
20
21class IconObject : public Observable,
22				   public BReferenceable,
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(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	// TODO: let IconObject control its own manipulators?
47	// This would allow VectorPaths to control their own PathManipulator,
48	// Styles to control their own TransformGradientBox, etc.
49 private:
50			BString				fName;
51};
52
53#endif // ICON_OBJECT_H
54