Ardour  9.0-pre0-582-g084a23a80d
midiaction.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2015 Paul Davis <paul@linuxaudiosystems.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __gm_midiaction_h__
20 #define __gm_midiaction_h__
21 
22 #include <string>
23 
24 #include "midi++/types.h"
25 
26 #include "pbd/signals.h"
27 #include "pbd/stateful.h"
28 
29 #include "ardour/types.h"
30 
31 #include "midiinvokable.h"
32 
33 namespace Gtk {
34  class Action;
35 }
36 
37 namespace MIDI {
38  class Parser;
39 }
40 
42 
43 class MIDIAction : public MIDIInvokable
44 {
45  public:
47  virtual ~MIDIAction ();
48 
49  int init (GenericMidiControlProtocol&, const std::string& action_name, MIDI::byte* sysex = 0, size_t ssize = 0);
50 
51  const std::string& action_name() const { return _invokable_name; }
52 
53  XMLNode& get_state () const;
54  int set_state (const XMLNode&, int version);
55 
56  private:
57  void execute ();
58 };
59 
60 #endif // __gm_midicontrollable_h__
61 
int init(GenericMidiControlProtocol &, const std::string &action_name, MIDI::byte *sysex=0, size_t ssize=0)
virtual ~MIDIAction()
int set_state(const XMLNode &, int version)
void execute()
const std::string & action_name() const
Definition: midiaction.h:51
MIDIAction(MIDI::Parser &)
XMLNode & get_state() const
std::string _invokable_name
Definition: midiinvokable.h:55
Definition: xml++.h:114
Definition: ardour_ui.h:188