xref: /haiku/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h (revision 302f62604763c95777d6d04cca456e876f471c4f)
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 TRANSFORM_OBJECTS_COMMAND_H
10 #define TRANSFORM_OBJECTS_COMMAND_H
11 
12 #include "TransformBox.h"
13 #include "TransformCommand.h"
14 
15 class Transformable;
16 
17 class TransformObjectsCommand : public TransformCommand,
18 								public TransformBoxListener {
19  public:
20 								TransformObjectsCommand(
21 										TransformBox* box,
22 										Transformable** const objects,
23 										const double* originals,
24 										int32 count,
25 
26 										BPoint pivot,
27 										BPoint translation,
28 										double rotation,
29 										double xScale,
30 										double yScale,
31 
32 										const char* name,
33 										int32 nameIndex);
34 	virtual						~TransformObjectsCommand();
35 
36 	// Command interface
37 	virtual	status_t			InitCheck();
38 
39 	// TransformBoxListener interface
40 	virtual	void				TransformBoxDeleted(
41 									const TransformBox* box);
42  protected:
43  	// TransformCommand interface
44 	virtual	status_t			_SetTransformation(BPoint pivotDiff,
45 												   BPoint translationDiff,
46 												   double rotationDiff,
47 												   double xScaleDiff,
48 												   double yScaleDiff) const;
49 
50 			TransformBox*		fTransformBox;
51 			Transformable**		fObjects;
52 			double*				fOriginals;
53 			int32				fCount;
54 };
55 
56 #endif // TRANSFORM_OBJECTS_COMMAND_H
57