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
24class 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	virtual						~TransformObjectsCommand();
41
42	// Command interface
43	virtual	status_t			InitCheck();
44
45	// TransformBoxListener interface
46	virtual	void				TransformBoxDeleted(
47									const TransformBox* box);
48 protected:
49 	// TransformCommand interface
50	virtual	status_t			_SetTransformation(BPoint pivotDiff,
51												   BPoint translationDiff,
52												   double rotationDiff,
53												   double xScaleDiff,
54												   double yScaleDiff) const;
55
56			TransformBox*		fTransformBox;
57			Transformable**		fObjects;
58			double*				fOriginals;
59			int32				fCount;
60};
61
62#endif // TRANSFORM_OBJECTS_COMMAND_H
63