1 /* 2 * Copyright 2006, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8 #ifndef MOVE_TRANSFORMERS_COMMAND_H 9 #define MOVE_TRANSFORMERS_COMMAND_H 10 11 12 #include "Command.h" 13 #include "IconBuild.h" 14 15 16 // TODO: make a templated "move items" command? 17 18 19 _BEGIN_ICON_NAMESPACE 20 class Shape; 21 class Transformer; 22 _END_ICON_NAMESPACE 23 24 _USING_ICON_NAMESPACE 25 26 27 class MoveTransformersCommand : public Command { 28 public: 29 MoveTransformersCommand( 30 Shape* shape, 31 Transformer** transformers, 32 int32 count, 33 int32 toIndex); 34 virtual ~MoveTransformersCommand(); 35 36 virtual status_t InitCheck(); 37 38 virtual status_t Perform(); 39 virtual status_t Undo(); 40 41 virtual void GetName(BString& name); 42 43 private: 44 Shape* fContainer; 45 Transformer** fTransformers; 46 int32* fIndices; 47 int32 fToIndex; 48 int32 fCount; 49 }; 50 51 #endif // MOVE_TRANSFORMERS_COMMAND_H 52