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_OBJECTS_COMMAND_H 9 #define TRANSFORM_OBJECTS_COMMAND_H 10 11 12 #include "TransformBox.h" 13 #include "TransformCommand.h" 14 15 16 namespace BPrivate { 17 namespace Icon { 18 class Transformable; 19 } 20 } 21 using namespace BPrivate::Icon; 22 23 class TransformObjectsCommand : public TransformCommand, 24 public TransformBoxListener { 25 public: 26 TransformObjectsCommand( 27 TransformBox* box, 28 Transformable** const objects, 29 const double* originals, 30 int32 count, 31 32 BPoint pivot, 33 BPoint translation, 34 double rotation, 35 double xScale, 36 double yScale, 37 38 const char* name, 39 int32 nameIndex); 40 virtual ~TransformObjectsCommand(); 41 42 // Command interface 43 virtual status_t InitCheck(); 44 45 // TransformBoxListener interface 46 virtual void TransformBoxDeleted( 47 const TransformBox* box); 48 protected: 49 // TransformCommand interface 50 virtual status_t _SetTransformation(BPoint pivotDiff, 51 BPoint translationDiff, 52 double rotationDiff, 53 double xScaleDiff, 54 double yScaleDiff) const; 55 56 TransformBox* fTransformBox; 57 Transformable** fObjects; 58 double* fOriginals; 59 int32 fCount; 60 }; 61 62 #endif // TRANSFORM_OBJECTS_COMMAND_H 63