xref: /haiku/src/apps/icon-o-matic/shape/commands/RemovePathsCommand.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2006-2007, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef REMOVE_PATHS_COMMAND_H
9 #define REMOVE_PATHS_COMMAND_H
10 
11 
12 #include "Command.h"
13 #include "IconBuild.h"
14 
15 #include <List.h>
16 
17 
18 _BEGIN_ICON_NAMESPACE
19 	class VectorPath;
20 	class PathContainer;
21 _END_ICON_NAMESPACE
22 
23 _USING_ICON_NAMESPACE
24 
25 
26 class RemovePathsCommand : public Command {
27  public:
28 								RemovePathsCommand(
29 									PathContainer* container,
30 									VectorPath** const paths,
31 									int32 count);
32 	virtual						~RemovePathsCommand();
33 
34 	virtual	status_t			InitCheck();
35 
36 	virtual	status_t			Perform();
37 	virtual status_t			Undo();
38 
39 	virtual void				GetName(BString& name);
40 
41  private:
42 			PathContainer*		fContainer;
43 			struct PathInfo {
44 				VectorPath*		path;
45 				int32			index;
46 				BList			shapes;
47 			};
48 			PathInfo*			fInfos;
49 			int32				fCount;
50 			bool				fPathsRemoved;
51 };
52 
53 #endif // REMOVE_PATHS_COMMAND_H
54