xref: /haiku/src/apps/icon-o-matic/shape/commands/MovePathsCommand.h (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
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 MOVE_PATHS_COMMAND_H
9 #define MOVE_PATHS_COMMAND_H
10 
11 
12 #include "Command.h"
13 #include "IconBuild.h"
14 
15 
16 // TODO: make a templated "move items" command?
17 
18 _BEGIN_ICON_NAMESPACE
19 	class VectorPath;
20 	class PathContainer;
21 _END_ICON_NAMESPACE
22 
23 _USING_ICON_NAMESPACE
24 
25 
26 class MovePathsCommand : public Command {
27  public:
28 								MovePathsCommand(
29 									PathContainer* container,
30 									VectorPath** paths,
31 									int32 count,
32 									int32 toIndex);
33 	virtual						~MovePathsCommand();
34 
35 	virtual	status_t			InitCheck();
36 
37 	virtual	status_t			Perform();
38 	virtual status_t			Undo();
39 
40 	virtual void				GetName(BString& name);
41 
42  private:
43 			PathContainer*		fContainer;
44 			VectorPath**		fPaths;
45 			int32*				fIndices;
46 			int32				fToIndex;
47 			int32				fCount;
48 };
49 
50 #endif // MOVE_PATHS_COMMAND_H
51