1 /* 2 * Copyright (C) 2002 - David W. Durham 3 * 4 * This file is part of ReZound, an audio editing application. 5 * 6 * ReZound is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published 8 * by the Free Software Foundation; either version 2 of the License, 9 * or (at your option) any later version. 10 * 11 * ReZound is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 19 */ 20 21 #ifndef __CCopyCutDeleteEdit_H__ 22 #define __CCopyCutDeleteEdit_H__ 23 24 25 #include "../../../config/common.h" 26 27 #include "../AAction.h" 28 29 30 class CCopyCutDeleteEdit : public AAction 31 { 32 public: 33 enum CCDType 34 { 35 ccdtCopy, 36 ccdtCut, 37 ccdtDelete 38 }; 39 40 CCopyCutDeleteEdit(const AActionFactory *factory,const CActionSound *actionSound,CCDType type); 41 virtual ~CCopyCutDeleteEdit(); 42 43 protected: 44 bool doActionSizeSafe(CActionSound *actionSound,bool prepareForUndo); 45 void undoActionSizeSafe(const CActionSound *actionSound); 46 CanUndoResults canUndo(const CActionSound *actionSound) const; 47 48 bool doesWarrantSaving() const; 49 50 private: 51 CCDType type; 52 53 }; 54 55 // --------------- 56 57 class CCopyEditFactory : public AActionFactory 58 { 59 public: 60 CCopyEditFactory(AActionDialog *channelSelectDialog); 61 virtual ~CCopyEditFactory(); 62 63 CCopyCutDeleteEdit *manufactureAction(const CActionSound *actionSound,const CActionParameters *actionParameters) const; 64 }; 65 66 class CCutEditFactory : public AActionFactory 67 { 68 public: 69 CCutEditFactory(AActionDialog *channelSelectDialog); 70 virtual ~CCutEditFactory(); 71 72 CCopyCutDeleteEdit *manufactureAction(const CActionSound *actionSound,const CActionParameters *actionParameters) const; 73 }; 74 75 class CDeleteEditFactory : public AActionFactory 76 { 77 public: 78 CDeleteEditFactory(AActionDialog *channelSelectDialog); 79 virtual ~CDeleteEditFactory(); 80 81 CCopyCutDeleteEdit *manufactureAction(const CActionSound *actionSound,const CActionParameters *actionParameters) const; 82 }; 83 84 #endif 85