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 14 15 namespace BPrivate { 16 namespace Icon { 17 class Shape; 18 } 19 } 20 using namespace BPrivate::Icon; 21 22 class TransformShapesBox : public CanvasTransformBox { 23 public: 24 TransformShapesBox(CanvasView* view, 25 const Shape** objects, 26 int32 count); 27 virtual ~TransformShapesBox(); 28 29 // Observer interface (Manipulator is an Observer) 30 virtual void ObjectChanged(const Observable* object); 31 32 // TransformBox interface 33 virtual void Update(bool deep = true); 34 35 virtual TransformCommand* MakeCommand(const char* actionName, 36 uint32 nameIndex); 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