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

Go to the documentation of this file.
00001 /*
00002  * @(#)cmd/Track.h 3.00 8 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_TRACK_H
00018 #define TSE3_CMD_TRACK_H
00019 
00020 #include "tse3/cmd/Command.h"
00021 #include "tse3/MidiFilter.h"
00022 #include "tse3/MidiParams.h"
00023 #include "tse3/DisplayParams.h"
00024 
00025 #include <string>
00026 #include <cstddef>
00027 
00028 namespace TSE3
00029 {
00030     class Track;
00031     class Part;
00032 
00033     namespace App
00034     {
00035         class TrackSelection;
00036     }
00037 
00038     namespace Cmd
00039     {
00049         class Track_SetInfo : public Command
00050         {
00051             public:
00052 
00057                 Track_SetInfo(TSE3::Track               *track,
00058                               const std::string         &title,
00059                               const TSE3::MidiFilter    &smef,
00060                               const TSE3::MidiParams    &mp,
00061                               const TSE3::DisplayParams &dp);
00062 
00063             protected:
00064 
00068                 virtual void executeImpl();
00069 
00073                 virtual void undoImpl();
00074 
00075             private:
00076 
00077                 TSE3::Track         *track;
00078                 std::string          newTitle, oldTitle;
00079                 TSE3::MidiFilter     smef;
00080                 TSE3::MidiParams     mp;
00081                 TSE3::DisplayParams  dp;
00082         };
00083 
00096         class Track_Snip : public Command
00097         {
00098             public:
00099 
00105                 Track_Snip(TSE3::Track *track, TSE3::Clock snipTime);
00106                 virtual ~Track_Snip();
00107 
00108             protected:
00109 
00113                 virtual void executeImpl();
00114 
00118                 virtual void undoImpl();
00119 
00120             private:
00121 
00122                 TSE3::Track                 *track;
00123                 TSE3::Clock                  snipTime;
00124                 bool                         valid;
00125                 TSE3::Part                  *oldPart, *newPart;
00126                 TSE3::Clock                  oldEndTime;
00127                 bool                         shouldDelete;
00128         };
00129 
00145         class Track_Glue : public Command
00146         {
00147             public:
00148 
00153                 Track_Glue(TSE3::Track *track, TSE3::Clock glueTime);
00154                 virtual ~Track_Glue();
00155 
00163                 static bool valid(TSE3::Track *track, TSE3::Clock glueTime);
00164 
00165             protected:
00166 
00170                 virtual void executeImpl();
00171 
00175                 virtual void undoImpl();
00176 
00177             private:
00178 
00179                 TSE3::Track                 *track;
00180                 TSE3::Clock                  glueTime;
00181                 bool                         _valid;
00182                 size_t                       pos;
00183                 TSE3::Part                  *oldPart;
00184                 TSE3::Clock                  oldEndTime;
00185         };
00186 
00197         class Track_RemovePart : public Command
00198         {
00199             public:
00200 
00207                 Track_RemovePart(TSE3::Part *part);
00208 
00216                 Track_RemovePart(TSE3::Track *track, size_t part);
00217 
00225                 Track_RemovePart(TSE3::Track *track, Part *part);
00226 
00227                 virtual ~Track_RemovePart();
00228 
00229             protected:
00230 
00234                 virtual void executeImpl();
00235 
00239                 virtual void undoImpl();
00240 
00241             private:
00242 
00243                 TSE3::Track *track;
00244                 TSE3::Part  *part;
00245                 int          partno;
00246         };
00247 
00256         class Track_Sort : public Command
00257         {
00258             public:
00259 
00263                 enum SortBy
00264                 {
00265                     ByName,
00266                     ByMuted,
00267                     BySelected,
00268                     ByPort,
00269                     ByChannel,
00270                     BySize
00271                 };
00272 
00276                 enum SortOrder
00277                 {
00278                     Ascending,
00279                     Descending
00280                 };
00281 
00292                 Track_Sort(TSE3::Song                *song,
00293                            SortBy                     by,
00294                            SortOrder                  order,
00295                            TSE3::App::TrackSelection *selection = 0);
00296                 virtual ~Track_Sort();
00297 
00298             protected:
00299 
00303                 virtual void executeImpl();
00304 
00308                 virtual void undoImpl();
00309 
00310             private:
00311 
00312                 class Track_SortImpl *pimpl;
00313         };
00314     }
00315 }
00316 
00317 #endif

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