Only show user-presets in favorite sidebar
[ardour.git] / gtk2_ardour / sys_ex.h
1 /*
2     Copyright (C) 2009 Paul Davis
3     Author: Hans Baier
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #ifndef __SYSEX_H__
21 #define __SYSEX_H__
22
23 #include "midi_region_view.h"
24
25 namespace ArdourCanvas {
26         class Flag;
27 }
28
29 class SysEx
30 {
31 public:
32         SysEx (
33                 MidiRegionView&             region,
34                 ArdourCanvas::Container*    parent,
35                 std::string&                text,
36                 double                      height,
37                 double                      x,
38                 double                      y,
39                 ARDOUR::MidiModel::SysExPtr sysex);
40
41         ~SysEx ();
42
43         void hide ();
44         void show ();
45
46         void set_height (ArdourCanvas::Distance h) { _flag->set_height (h); }
47
48         ArdourCanvas::Item& item() const { return *_flag; }
49
50 private:
51         bool event_handler (GdkEvent* ev);
52         SysEx(const SysEx& rhs){}
53         ArdourCanvas::Flag* _flag;
54         ARDOUR::MidiModel::SysExPtr _sysex;
55 };
56
57 #endif /* __SYSEX_H__ */