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 uint32 nameIndex); 45 46 // TransformPointsBox 47 void Cancel(); 48 49 private: 50 PathManipulator* fManipulator; 51 VectorPath* fPath; 52 53 int32* fIndices; 54 int32 fCount; 55 56 control_point* fPoints; 57 }; 58 59 #endif // TRANSFORM_POINTS_BOX_H 60 61