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 REMOVE_PATHS_COMMAND_H 9 #define REMOVE_PATHS_COMMAND_H 10 11 12 #include "Command.h" 13 14 #include <List.h> 15 16 17 namespace BPrivate { 18 namespace Icon { 19 class VectorPath; 20 class PathContainer; 21 } 22 } 23 using namespace BPrivate::Icon; 24 25 class RemovePathsCommand : public Command { 26 public: 27 RemovePathsCommand( 28 PathContainer* container, 29 VectorPath** const paths, 30 int32 count); 31 virtual ~RemovePathsCommand(); 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 struct PathInfo { 43 VectorPath* path; 44 int32 index; 45 BList shapes; 46 }; 47 PathInfo* fInfos; 48 int32 fCount; 49 bool fPathsRemoved; 50 }; 51 52 #endif // REMOVE_PATHS_COMMAND_H 53