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/Phrase.h

Go to the documentation of this file.
00001 /*
00002  * @(#)cmd/Phrase.h 3.00 21 November 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_PHRASE_H
00018 #define TSE3_CMD_PHRASE_H
00019 
00020 #include "tse3/cmd/Command.h"
00021 #include "tse3/Phrase.h"
00022 #include "tse3/DisplayParams.h"
00023 
00024 #include <vector>
00025 #include <string>
00026 
00027 namespace TSE3
00028 {
00029     class Phrase;
00030     class Song;
00031     class Part;
00032 
00033     namespace Cmd
00034     {
00049         class Phrase_SetInfo : public Command
00050         {
00051             public:
00052 
00066                 Phrase_SetInfo(TSE3::Phrase              *phrase,
00067                                const std::string         &title,
00068                                const TSE3::DisplayParams &dp);
00069 
00070             protected:
00071 
00075                 virtual void executeImpl();
00076 
00080                 virtual void undoImpl();
00081 
00082             private:
00083 
00084                 TSE3::Phrase        *phrase;
00085                 std::string          newTitle, oldTitle;
00086                 TSE3::DisplayParams  dp;
00087         };
00088 
00101         class Phrase_Create : public Command
00102         {
00103             public:
00104 
00115                 Phrase_Create(TSE3::PhraseList  *phraseList,
00116                               TSE3::PhraseEdit  *phraseEdit,
00117                               const std::string &title = "");
00118                 virtual ~Phrase_Create();
00119 
00124                 TSE3::Phrase *phrase() const { return newPhrase; }
00125 
00126             protected:
00127 
00131                 virtual void executeImpl();
00132 
00136                 virtual void undoImpl();
00137 
00138             private:
00139 
00140                 TSE3::PhraseList    *phraseList;
00141                 TSE3::PhraseEdit    *phraseEdit;
00142                 TSE3::Phrase        *newPhrase;
00143                 std::string          title;
00144         };
00145 
00154         class Phrase_Erase : public Command
00155         {
00156             public:
00157 
00171                 Phrase_Erase(TSE3::Phrase *phrase,
00172                              TSE3::Song   *song);
00173                 virtual ~Phrase_Erase();
00174 
00175             protected:
00176 
00180                 virtual void executeImpl();
00181 
00185                 virtual void undoImpl();
00186 
00187             private:
00188 
00189                 TSE3::Phrase              *phrase;
00190                 TSE3::Song                *song;
00191                 std::vector<TSE3::Part *>  parts;
00192                 bool                       vector_done;
00193         };
00194 
00195         /*
00196          * Command to replace a @ref TSE3::Phrase in a @ref TSE3::Song with
00197          * another @ref TSE3::Phrase. The new @ref TSE3::Phrase can be
00198          * automatically created from a @ref TSE3::PhraseEdit and given the
00199          * same name as the original @ref TSE3::Phrase.
00200          *
00201          * @short   Replace @ref TSE3::Phrase @ref Command
00202          * @author  Pete Goodliffe
00203          * @version 3.00
00204          * @see     Command
00205          */
00206         class Phrase_Replace : public Command
00207         {
00208             public:
00209 
00224                 Phrase_Replace(TSE3::Phrase *oldPhrase,
00225                                TSE3::Phrase *newPhrase,
00226                                TSE3::Song   *song);
00227 
00242                 Phrase_Replace(TSE3::Phrase      *oldPhrase,
00243                                TSE3::PhraseEdit  *phraseEdit,
00244                                TSE3::Song        *song,
00245                                const std::string &title = "");
00246                 ~Phrase_Replace();
00247 
00255                 TSE3::Phrase *phrase() const { return newPhrase; }
00256 
00257             protected:
00258 
00262                 virtual void executeImpl();
00263 
00267                 virtual void undoImpl();
00268 
00269             private:
00270 
00271                 TSE3::Phrase              *newPhrase;
00272                 TSE3::Phrase              *oldPhrase;
00273                 TSE3::PhraseEdit          *phraseEdit;
00274                 TSE3::Song                *song;
00275                 std::string                newTitle;
00276                 std::vector<TSE3::Part *>  parts;
00277         };
00278     }
00279 }
00280 
00281 #endif

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