Ardour  9.0-pre0-582-g084a23a80d
midi_streamview.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2014 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007 Doug McLain <doug@nostar.net>
4  * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include <list>
26 #include <cmath>
27 
28 #include "ardour/location.h"
29 #include "enums.h"
30 #include "midi_view_background.h"
31 #include "streamview.h"
32 #include "time_axis_view_item.h"
33 #include "route_time_axis.h"
34 
35 namespace Gdk {
36  class Color;
37 }
38 
39 namespace ARDOUR {
40  class Crossfade;
41  class MidiModel;
42  class MidiRegion;
43  class Route;
44  class Source;
45  struct PeakData;
46 }
47 
48 namespace ArdourCanvas {
49  class LineSet;
50 }
51 
52 class PublicEditor;
53 class Selectable;
54 class MidiTimeAxisView;
55 class MidiRegionView;
56 class RegionSelection;
57 class CrossfadeView;
58 class Selection;
59 
61 {
62 public:
65 
67 
69  //bool can_change_layer_display() const { return false; } // revert this change for now. Although stacked view is weirdly implemented wrt the "scroomer", it is still necessary to be able to manage layered regions.
70  void redisplay_track ();
71 
72  double contents_height() const {
74  }
75 
76  double y_position () const;
77 
78  RegionView* create_region_view (std::shared_ptr<ARDOUR::Region>, bool, bool);
79 
80  bool paste (Temporal::timepos_t const & pos, const Selection& selection, PasteContext& ctx);
81 
82  void suspend_updates ();
83  void resume_updates ();
84 
86 
87  void parameter_changed (std::string const &);
88  uint8_t get_preferred_midi_channel () const;
89  void record_layer_check (std::shared_ptr<ARDOUR::Region>, samplepos_t);
90  void set_note_highlight (bool);
91 
92 protected:
93  void setup_rec_box ();
94  void update_rec_box ();
95  bool updates_suspended() const { return _updates_suspended; }
96 
98 
99 private:
101  std::shared_ptr<ARDOUR::Region>,
102  bool wait_for_waves,
103  bool recording = false);
104 
105  void display_region(MidiRegionView* region_view, bool load_model);
106  void display_track (std::shared_ptr<ARDOUR::Track> tr);
108  void update_contents_metrics (std::shared_ptr<ARDOUR::Region> r);
109  void color_handler ();
111 
114 };
115 
void parameter_changed(std::string const &)
void resume_updates()
void display_region(MidiRegionView *region_view, bool load_model)
void display_track(std::shared_ptr< ARDOUR::Track > tr)
void color_handler()
void update_contents_metrics(std::shared_ptr< ARDOUR::Region > r)
void set_note_highlight(bool)
ArdourCanvas::Container * _region_group
void update_contents_height()
void redisplay_track()
bool updates_suspended() const
void get_regions_with_selected_data(RegionSelection &)
void apply_note_range_to_children()
bool paste(Temporal::timepos_t const &pos, const Selection &selection, PasteContext &ctx)
void suspend_updates()
RegionView * create_region_view(std::shared_ptr< ARDOUR::Region >, bool, bool)
double contents_height() const
void record_layer_check(std::shared_ptr< ARDOUR::Region >, samplepos_t)
void set_layer_display(LayerDisplay)
ArdourCanvas::Container * region_canvas() const
double y_position() const
void update_rec_box()
uint8_t get_preferred_midi_channel() const
MidiStreamView(MidiTimeAxisView &)
void setup_rec_box()
RegionView * add_region_view_internal(std::shared_ptr< ARDOUR::Region >, bool wait_for_waves, bool recording=false)
Representation of the interface of the Editor class.
Lists of selected things.
double child_height() const
static double NAME_HIGHLIGHT_SIZE
LayerDisplay
Temporal::samplepos_t samplepos_t
uint32_t Color
Definition: colors.h:33
link region and track selection