xref: /haiku/src/apps/icon-o-matic/transformable/TransformObjectsCommand.h (revision 220d04022750f40f8bac8f01fa551211e28d04f2)
1 /*
2  * Copyright 2006-2007, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef TRANSFORM_OBJECTS_COMMAND_H
9 #define TRANSFORM_OBJECTS_COMMAND_H
10 
11 
12 #include "IconBuild.h"
13 #include "TransformBox.h"
14 #include "TransformCommand.h"
15 
16 
17 _BEGIN_ICON_NAMESPACE
18 	class Transformable;
19 _END_ICON_NAMESPACE
20 
21 _USING_ICON_NAMESPACE
22 
23 
24 class TransformObjectsCommand : public TransformCommand,
25 								public TransformBoxListener {
26  public:
27 								TransformObjectsCommand(
28 										TransformBox* box,
29 										Transformable** const objects,
30 										const double* originals,
31 										int32 count,
32 
33 										BPoint pivot,
34 										BPoint translation,
35 										double rotation,
36 										double xScale,
37 										double yScale,
38 
39 										const char* name,
40 										int32 nameIndex);
41 	virtual						~TransformObjectsCommand();
42 
43 	// Command interface
44 	virtual	status_t			InitCheck();
45 
46 	// TransformBoxListener interface
47 	virtual	void				TransformBoxDeleted(
48 									const TransformBox* box);
49  protected:
50  	// TransformCommand interface
51 	virtual	status_t			_SetTransformation(BPoint pivotDiff,
52 												   BPoint translationDiff,
53 												   double rotationDiff,
54 												   double xScaleDiff,
55 												   double yScaleDiff) const;
56 
57 			TransformBox*		fTransformBox;
58 			Transformable**		fObjects;
59 			double*				fOriginals;
60 			int32				fCount;
61 };
62 
63 #endif // TRANSFORM_OBJECTS_COMMAND_H
64