xref: /haiku/src/apps/icon-o-matic/transformable/TransformGradientCommand.h (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
1 /*
2  * Copyright 2006-2010, Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef TRANSFORM_GRADIENT_COMMAND_H
6 #define TRANSFORM_GRADIENT_COMMAND_H
7 
8 
9 #include "IconBuild.h"
10 #include "TransformBox.h"
11 #include "TransformCommand.h"
12 
13 
14 _BEGIN_ICON_NAMESPACE
15 	class Gradient;
16 _END_ICON_NAMESPACE
17 
18 _USING_ICON_NAMESPACE
19 
20 
21 class TransformGradientCommand : public TransformCommand,
22 	public TransformBoxListener {
23 public:
24 								TransformGradientCommand(
25 									TransformBox* box, Gradient* gradient,
26 									BPoint pivot, BPoint translation,
27 									double rotation, double xScale,
28 									double yScale, const char* name);
29 	virtual						~TransformGradientCommand();
30 
31 	// Command interface
32 	virtual	status_t			InitCheck();
33 
34 	// TransformBoxListener interface
35 	virtual	void				TransformBoxDeleted(const TransformBox* box);
36 
37 protected:
38  	// TransformCommand interface
39 	virtual	status_t			_SetTransformation(BPoint pivotDiff,
40 									BPoint translationDiff,
41 									double rotationDiff, double xScaleDiff,
42 									double yScaleDiff) const;
43 
44 			TransformBox*		fTransformBox;
45 			Gradient*			fGradient;
46 };
47 
48 
49 #endif // TRANSFORM_GRADIENT_COMMAND_H
50