2 * Copyright 2006-2007, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
8 #ifndef PATH_CONTAINER_H
9 #define PATH_CONTAINER_H
14 #include "IconBuild.h"
23 class PathContainerListener
{
25 PathContainerListener();
26 virtual ~PathContainerListener();
28 virtual void PathAdded(VectorPath
* path
, int32 index
) = 0;
29 virtual void PathRemoved(VectorPath
* path
) = 0;
31 #endif // ICON_O_MATIC
35 PathContainer(bool ownsPaths
);
36 virtual ~PathContainer();
38 bool AddPath(VectorPath
* path
);
39 bool AddPath(VectorPath
* path
, int32 index
);
40 bool RemovePath(VectorPath
* path
);
41 VectorPath
* RemovePath(int32 index
);
45 int32
CountPaths() const;
46 bool HasPath(VectorPath
* path
) const;
47 int32
IndexOf(VectorPath
* path
) const;
49 VectorPath
* PathAt(int32 index
) const;
50 VectorPath
* PathAtFast(int32 index
) const;
60 bool AddListener(PathContainerListener
* listener
);
61 bool RemoveListener(PathContainerListener
* listener
);
64 void _NotifyPathAdded(VectorPath
* path
,
66 void _NotifyPathRemoved(VectorPath
* path
) const;
69 #endif // ICON_O_MATIC
76 #endif // PATH_CONTAINER_H