xref: /haiku/src/apps/icon-o-matic/shape/commands/RemoveTransformersCommand.h (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
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 REMOVE_TRANSFORMERS_COMMAND_H
9 #define REMOVE_TRANSFORMERS_COMMAND_H
10 
11 
12 #include "Command.h"
13 
14 
15 namespace BPrivate {
16 namespace Icon {
17 	class Shape;
18 	class Transformer;
19 }
20 }
21 using namespace BPrivate::Icon;
22 
23 // TODO: make a templated "remove items" command?
24 
25 class RemoveTransformersCommand : public Command {
26  public:
27 								RemoveTransformersCommand(
28 									Shape* container,
29 									const int32* indices,
30 									int32 count);
31 	virtual						~RemoveTransformersCommand();
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				fCount;
45 			bool				fTransformersRemoved;
46 };
47 
48 #endif // REMOVE_TRANSFORMERS_COMMAND_H
49