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 MOVE_SHAPES_COMMAND_H 9 #define MOVE_SHAPES_COMMAND_H 10 11 12 #include "Command.h" 13 14 // TODO: make a templated "move items" command? 15 16 namespace BPrivate { 17 namespace Icon { 18 class VectorPath; 19 class PathContainer; 20 } 21 } 22 using namespace BPrivate::Icon; 23 24 class MovePathsCommand : public Command { 25 public: 26 MovePathsCommand( 27 PathContainer* container, 28 VectorPath** paths, 29 int32 count, 30 int32 toIndex); 31 virtual ~MovePathsCommand(); 32 33 virtual status_t InitCheck(); 34 35 virtual status_t Perform(); 36 virtual status_t Undo(); 37 38 virtual void GetName(BString& name); 39 40 private: 41 PathContainer* fContainer; 42 VectorPath** fPaths; 43 int32* fIndices; 44 int32 fToIndex; 45 int32 fCount; 46 }; 47 48 #endif // MOVE_SHAPES_COMMAND_H 49