1270142Semaste/*
2270142Semaste * Copyright 2006-2007, Haiku. All rights reserved.
3270142Semaste * Distributed under the terms of the MIT License.
4270142Semaste *
5270142Semaste * Authors:
6270142Semaste *		Stephan A��mus <superstippi@gmx.de>
7270142Semaste */
8270142Semaste#ifndef TRANSFORM_OBJECTS_COMMAND_H
9270142Semaste#define TRANSFORM_OBJECTS_COMMAND_H
10270142Semaste
11270142Semaste
12270142Semaste#include "IconBuild.h"
13270142Semaste#include "TransformBox.h"
14270142Semaste#include "TransformCommand.h"
15270142Semaste
16270142Semaste
17270142Semaste_BEGIN_ICON_NAMESPACE
18270142Semaste	class Transformable;
19270142Semaste_END_ICON_NAMESPACE
20270142Semaste
21270142Semaste_USING_ICON_NAMESPACE
22270142Semaste
23270142Semaste
24270142Semasteclass TransformObjectsCommand : public TransformCommand,
25270142Semaste								public TransformBoxListener {
26270142Semaste public:
27270142Semaste								TransformObjectsCommand(
28270142Semaste										TransformBox* box,
29270142Semaste										Transformable** const objects,
30270142Semaste										const double* originals,
31270142Semaste										int32 count,
32270142Semaste
33270142Semaste										BPoint pivot,
34270142Semaste										BPoint translation,
35270142Semaste										double rotation,
36270142Semaste										double xScale,
37270142Semaste										double yScale,
38270142Semaste
39270142Semaste										const char* name);
40270142Semaste	virtual						~TransformObjectsCommand();
41270142Semaste
42270142Semaste	// Command interface
43270142Semaste	virtual	status_t			InitCheck();
44270142Semaste
45270142Semaste	// TransformBoxListener interface
46270142Semaste	virtual	void				TransformBoxDeleted(
47270142Semaste									const TransformBox* box);
48270142Semaste protected:
49270310Sse 	// TransformCommand interface
50270142Semaste	virtual	status_t			_SetTransformation(BPoint pivotDiff,
51270142Semaste												   BPoint translationDiff,
52270142Semaste												   double rotationDiff,
53270142Semaste												   double xScaleDiff,
54270142Semaste												   double yScaleDiff) const;
55270142Semaste
56270142Semaste			TransformBox*		fTransformBox;
57270142Semaste			Transformable**		fObjects;
58270142Semaste			double*				fOriginals;
59270310Sse			int32				fCount;
60270310Sse};
61270142Semaste
62270142Semaste#endif // TRANSFORM_OBJECTS_COMMAND_H
63270142Semaste