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