1 /* 2 * Copyright 2006-2007, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 #ifndef TRANSFORM_SHAPES_BOX_H 9 #define TRANSFORM_SHAPES_BOX_H 10 11 12 #include "CanvasTransformBox.h" 13 #include "IconBuild.h" 14 15 16 _BEGIN_ICON_NAMESPACE 17 class Shape; 18 _END_ICON_NAMESPACE 19 20 _USING_ICON_NAMESPACE 21 22 23 class TransformShapesBox : public CanvasTransformBox { 24 public: 25 TransformShapesBox(CanvasView* view, 26 const Shape** objects, 27 int32 count); 28 virtual ~TransformShapesBox(); 29 30 // Observer interface (Manipulator is an Observer) 31 virtual void ObjectChanged(const Observable* object); 32 33 // TransformBox interface 34 virtual void Update(bool deep = true); 35 36 virtual TransformCommand* MakeCommand(const char* actionName); 37 38 // TransformShapesBox 39 Shape** Shapes() const 40 { return fShapes; } 41 int32 CountShapes() const 42 { return fCount; } 43 44 private: 45 Shape** fShapes; 46 int32 fCount; 47 48 // saves the transformable objects transformation states 49 // prior to this transformation 50 double* fOriginals; 51 52 Transformable fParentTransform; 53 }; 54 55 #endif // TRANSFORM_SHAPES_BOX_H 56 57