Ardour  8.12
patch_change.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013-2014 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2014 David Robillard <d@drobilla.net>
4  * Copyright (C) 2016-2017 Nick Mainsbridge <mainsbridge@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __PATCH_CHANGE_H__
22 #define __PATCH_CHANGE_H__
23 
24 #include "canvas/flag.h"
25 
26 class MidiRegionView;
27 
28 namespace MIDI {
29  namespace Name {
30  struct PatchPrimaryKey;
31  }
32 }
33 
35 {
36 public:
39  double height,
40  double x,
41  double y,
44  Gtkmm2ext::Color outline_color,
45  Gtkmm2ext::Color fill_color);
46 
48 
50 
52 
55  void hide ();
56  void show ();
57 
58  void update_name ();
59 
60  double width () const { return _flag->width (); }
62  ArdourCanvas::Item* canvas_item () const { return _flag; }
63  ArdourCanvas::Item& item () const { return *_flag; }
64 
65 private:
67 
74 };
75 
76 #endif /* __PATCH_CHANGE_H__ */
double width() const
std::shared_ptr< PatchChange< Temporal::Beats > > PatchChangePtr
Definition: Sequence.h:205
ARDOUR::MidiModel::PatchChangePtr patch() const
Definition: patch_change.h:61
PatchChange(MidiRegionView &region, ArdourCanvas::Container *parent, double height, double x, double y, ARDOUR::InstrumentInfo &info, ARDOUR::MidiModel::PatchChangePtr patch, Gtkmm2ext::Color outline_color, Gtkmm2ext::Color fill_color)
ARDOUR::InstrumentInfo & _info
Definition: patch_change.h:69
ArdourCanvas::Item * canvas_item() const
Definition: patch_change.h:62
ArdourCanvas::Item & item() const
Definition: patch_change.h:63
void on_patch_menu_selected(const MIDI::Name::PatchPrimaryKey &key)
void update_name()
ARDOUR::MidiModel::PatchChangePtr _patch
Definition: patch_change.h:70
ArdourCanvas::Flag * _flag
Definition: patch_change.h:73
void initialize_popup_menus()
bool _popup_initialized
Definition: patch_change.h:72
MidiRegionView & _region
Definition: patch_change.h:68
void move(ArdourCanvas::Duple)
Gtk::Menu _popup
Definition: patch_change.h:71
double width() const
Definition: patch_change.h:60
void set_height(ArdourCanvas::Distance)
bool event_handler(GdkEvent *)
uint32_t Color
Definition: colors.h:33
Transmitter info
gint height
Definition: xcursors.h:1