Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

/home/pete/Work/TSE3.svn/tse3/src/tse3/cmd/Part.h

Go to the documentation of this file.
00001 /*
00002  * @(#)cmd/Part.h 3.00 9 July 2000
00003  *
00004  * Copyright (c) 2000 Pete Goodliffe (pete@cthree.org)
00005  *
00006  * This file is part of TSE3 - the Trax Sequencer Engine version 3.00.
00007  *
00008  * This library is modifiable/redistributable under the terms of the GNU
00009  * General Public License.
00010  *
00011  * You should have received a copy of the GNU General Public License along
00012  * with this program; see the file COPYING. If not, write to the Free Software
00013  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00014  *
00015  */
00016 
00017 #ifndef TSE3_CMD_PART_H
00018 #define TSE3_CMD_PART_H
00019 
00020 #include "tse3/cmd/Command.h"
00021 #include "tse3/util/Track.h"
00022 #include "tse3/MidiFilter.h"
00023 #include "tse3/MidiParams.h"
00024 #include "tse3/DisplayParams.h"
00025 
00026 namespace TSE3
00027 {
00028     class Part;
00029     class Phrase;
00030 
00031     namespace Cmd
00032     {
00046         class Part_SetInfo : public Command
00047         {
00048             public:
00049 
00054                 Part_SetInfo(TSE3::Part                *part,
00055                              TSE3::Phrase              *phrase,
00056                              TSE3::Clock                repeat,
00057                              const TSE3::MidiFilter    &smef,
00058                              const TSE3::MidiParams    &mp,
00059                              const TSE3::DisplayParams &dp);
00060 
00061             protected:
00062 
00066                 virtual void executeImpl();
00067 
00071                 virtual void undoImpl();
00072 
00073             private:
00074 
00075                 TSE3::Part          *part;
00076                 TSE3::Phrase        *newPhrase, *oldPhrase;
00077                 TSE3::Clock          newRepeat, oldRepeat;
00078                 TSE3::MidiFilter     smef;
00079                 TSE3::MidiParams     mp;
00080                 TSE3::DisplayParams  dp;
00081         };
00082 
00091         class Part_SetPhrase : public Command
00092         {
00093             public:
00094 
00099                 Part_SetPhrase(TSE3::Part *part, TSE3::Phrase *phrase);
00100 
00101             protected:
00102 
00106                 virtual void executeImpl();
00107 
00111                 virtual void undoImpl();
00112 
00113             private:
00114 
00115                 TSE3::Part          *part;
00116                 TSE3::Phrase        *newPhrase, *oldPhrase;
00117         };
00118 
00130         class Part_Move : public Command
00131         {
00132             public:
00133 
00156                 enum PartInsertAction
00157                 {
00158                     NoOverlap,
00159                     Replace,
00160                     Under
00161                 };
00162 
00176                 Part_Move(int          action,
00177                           TSE3::Part  *part,
00178                           TSE3::Track *track,
00179                           TSE3::Clock  newStart = -1,
00180                           TSE3::Clock  newEnd   = -1);
00181                 virtual ~Part_Move();
00182 
00183             protected:
00184 
00189                 virtual void executeImpl();
00190 
00194                 virtual void undoImpl();
00195 
00196             private:
00197 
00205                 static const char *prvTitle(bool hasParent, bool relativeEnd,
00206                                             bool sameTrack);
00207 
00208                 void removeAndSetPart();
00209                 void unsetAndReinsertPart();
00210                 TSE3::Part               *part;
00211                 TSE3::Track              *newTrack, *oldTrack;
00212                 TSE3::Clock               newStart, oldStart;
00213                 TSE3::Clock               newEnd,   oldEnd;
00214                 int                       action;
00215                 std::vector<TSE3::Part*>  removed;
00216                 TSE3::Clock               clippedStart;
00217                 TSE3::Clock               clippedEnd;
00218                 TSE3::Part               *newPart;
00219                 bool                      valid;
00220         };
00221     }
00222 }
00223 
00224 #endif

Generated on Wed May 25 14:45:05 2005 for TSE3 by doxygen 1.3.2