/[svn]/gigedit/trunk/src/gigedit/gigedit.h
ViewVC logotype

Contents of /gigedit/trunk/src/gigedit/gigedit.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1654 - (show annotations) (download) (as text)
Wed Jan 30 02:20:48 2008 UTC (16 years, 2 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 2665 byte(s)
* first step to make the virtual keyboard interactive: active keys of the
  sampler (in live-mode only of course) are highlighted on the virtual
  keyboard - NOTE: yet inaccurate draw of the keys and this mechanism
  yet only works on the first gigedit invocation by the sampler process,
  so this still has to be fixed

1 /* -*- c++ -*-
2 * Copyright (C) 2007, 2008 Andreas Persson
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2, or (at
7 * your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with program; see the file COPYING. If not, write to the Free
16 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20 #ifndef GIGEDIT_H
21 #define GIGEDIT_H
22
23 #include <gig.h>
24
25 #include <list>
26 #include <sigc++/signal.h>
27
28 class GigEditJob {
29 public:
30 GigEditJob();
31 virtual bool runGigEditJob() = 0;
32 int msecs();
33 private:
34 int _msecs;
35 };
36
37 class GigEdit {
38 public:
39 GigEdit();
40
41 int run(int argc, char* argv[]);
42 int run(gig::Instrument* pInstrument);
43
44 sigc::signal<void, gig::File*>& signal_file_structure_to_be_changed();
45 sigc::signal<void, gig::File*>& signal_file_structure_changed();
46 sigc::signal<void, std::list<gig::Sample*> >& signal_samples_to_be_removed();
47 sigc::signal<void>& signal_samples_removed();
48 sigc::signal<void, gig::Region*>& signal_region_to_be_changed();
49 sigc::signal<void, gig::Region*>& signal_region_changed();
50 sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_to_be_changed();
51 sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();
52 sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();
53
54 void on_note_on_event(int key, int velocity);
55 void on_note_off_event(int key, int velocity);
56
57 void add_timeout_job(GigEditJob* job);
58
59 private:
60 sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;
61 sigc::signal<void, gig::File*> file_structure_changed_signal;
62 sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal;
63 sigc::signal<void> samples_removed_signal;
64 sigc::signal<void, gig::Region*> region_to_be_changed_signal;
65 sigc::signal<void, gig::Region*> region_changed_signal;
66 sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;
67 sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;
68 sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;
69 void* state;
70 };
71
72 #endif // GIGEDIT_H

  ViewVC Help
Powered by ViewVC