xref: /haiku/src/apps/icon-o-matic/transformable/TransformPointsBox.h (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
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_POINTS_BOX_H
9 #define TRANSFORM_POINTS_BOX_H
10 
11 
12 #include "CanvasTransformBox.h"
13 #include "IconBuild.h"
14 
15 
16 class CanvasView;
17 class PathManipulator;
18 
19 _BEGIN_ICON_NAMESPACE
20 	class VectorPath;
21 	struct control_point;
22 _END_ICON_NAMESPACE
23 
24 _USING_ICON_NAMESPACE
25 
26 
27 class TransformPointsBox : public CanvasTransformBox {
28  public:
29 								TransformPointsBox(
30 									CanvasView* view,
31 									PathManipulator* manipulator,
32 									VectorPath* path,
33 									const int32* indices,
34 									int32 count);
35 	virtual						~TransformPointsBox();
36 
37 	// Observer interface (Manipulator is an Observer)
38 	virtual	void				ObjectChanged(const Observable* object);
39 
40 	// TransformBox interface
41 	virtual	void				Update(bool deep = true);
42 
43 	virtual	TransformCommand*	MakeCommand(const char* commandName);
44 
45 	// TransformPointsBox
46 			void				Cancel();
47 
48  private:
49 			PathManipulator*	fManipulator;
50 			VectorPath*			fPath;
51 
52 			int32*				fIndices;
53 			int32				fCount;
54 
55 			control_point*		fPoints;
56 };
57 
58 #endif // TRANSFORM_POINTS_BOX_H
59 
60