xref: /haiku/src/apps/icon-o-matic/shape/commands/AddTransformersCommand.h (revision 002f37b0cca92e4cf72857c72ac95db5a8b09615)
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 ADD_TRANSFORMERS_COMMAND_H
9 #define ADD_TRANSFORMERS_COMMAND_H
10 
11 
12 #include "Command.h"
13 #include "IconBuild.h"
14 
15 
16 _BEGIN_ICON_NAMESPACE
17 	class Shape;
18 	class Transformer;
19 _END_ICON_NAMESPACE
20 
21 _USING_ICON_NAMESPACE
22 
23 
24 // TODO: make a templated "add items" command?
25 
26 class AddTransformersCommand : public Command {
27  public:
28 								AddTransformersCommand(
29 									Shape* container,
30 									Transformer** const transformers,
31 									int32 count,
32 									int32 index);
33 	virtual						~AddTransformersCommand();
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 			Shape*				fContainer;
44 			Transformer**		fTransformers;
45 			int32				fCount;
46 			int32				fIndex;
47 			bool				fTransformersAdded;
48 };
49 
50 #endif // ADD_TRANSFORMERS_COMMAND_H
51