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