xref: /haiku/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h (revision 9d6d3fcf5fe8308cd020cecf89dede440346f8c4)
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 ADD_TRANSFORMERS_COMMAND_H
10 #define ADD_TRANSFORMERS_COMMAND_H
11 
12 #include "Command.h"
13 
14 class Shape;
15 class Transformer;
16 
17 // TODO: make a templated "add items" command?
18 
19 class AddTransformersCommand : public Command {
20  public:
21 								AddTransformersCommand(
22 									Shape* container,
23 									Transformer** const transformers,
24 									int32 count,
25 									int32 index);
26 	virtual						~AddTransformersCommand();
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 			Shape*				fContainer;
37 			Transformer**		fTransformers;
38 			int32				fCount;
39 			int32				fIndex;
40 			bool				fTransformersAdded;
41 };
42 
43 #endif // ADD_TRANSFORMERS_COMMAND_H
44