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 9 #ifndef REMOVE_POINTS_COMMAND_H 10 #define REMOVE_POINTS_COMMAND_H 11 12 #include "PathCommand.h" 13 14 class BPoint; 15 16 class RemovePointsCommand : public PathCommand { 17 public: 18 // for removing the point clicked on 19 // independent of selection 20 RemovePointsCommand(VectorPath* path, 21 int32 index, 22 const int32* selection, 23 int32 count); 24 // for removing the selection 25 RemovePointsCommand(VectorPath* path, 26 const int32* selection, 27 int32 count); 28 virtual ~RemovePointsCommand(); 29 30 virtual status_t InitCheck(); 31 32 virtual status_t Perform(); 33 virtual status_t Undo(); 34 virtual status_t Redo(); 35 36 virtual void GetName(BString& name); 37 38 private: 39 void _Init(const int32* indices, int32 count, 40 const int32* selection, 41 int32 selectionCount); 42 43 int32* fIndex; 44 BPoint* fPoint; 45 BPoint* fPointIn; 46 BPoint* fPointOut; 47 bool* fConnected; 48 int32 fCount; 49 50 bool fWasClosed; 51 52 int32* fOldSelection; 53 int32 fOldSelectionCount; 54 }; 55 56 #endif // REMOVE_POINTS_COMMAND_H 57