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 uint32 nameIndex); 38 39 // TransformShapesBox 40 Shape** Shapes() const 41 { return fShapes; } 42 int32 CountShapes() const 43 { return fCount; } 44 45 private: 46 Shape** fShapes; 47 int32 fCount; 48 49 // saves the transformable objects transformation states 50 // prior to this transformation 51 double* fOriginals; 52 53 Transformable fParentTransform; 54 }; 55 56 #endif // TRANSFORM_SHAPES_BOX_H 57 58