xref: /haiku/src/apps/icon-o-matic/shape/commands/AddShapesCommand.h (revision 1acbe440b8dd798953bec31d18ee589aa3f71b73)
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_SHAPES_COMMAND_H
9 #define ADD_SHAPES_COMMAND_H
10 
11 
12 #include "Command.h"
13 
14 
15 class Selection;
16 
17 namespace BPrivate {
18 namespace Icon {
19 	class Shape;
20 	class ShapeContainer;
21 }
22 }
23 using namespace BPrivate::Icon;
24 
25 class AddShapesCommand : public Command {
26  public:
27 								AddShapesCommand(
28 									ShapeContainer* container,
29 									Shape** const shapes,
30 									int32 count,
31 									int32 index,
32 									Selection* selection);
33 	virtual						~AddShapesCommand();
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 			ShapeContainer*		fContainer;
44 			Shape**				fShapes;
45 			int32				fCount;
46 			int32				fIndex;
47 			bool				fShapesAdded;
48 
49 			Selection*			fSelection;
50 };
51 
52 #endif // ADD_SHAPES_COMMAND_H
53