Ardour  9.0-pre0-582-g084a23a80d
stripable_time_axis.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
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 #pragma once
20 
21 #include "automation_time_axis.h"
22 #include "time_axis_view.h"
23 
25 {
26 public:
29 
30  void set_stripable (std::shared_ptr<ARDOUR::Stripable>);
31  std::shared_ptr<ARDOUR::Stripable> stripable() const { return _stripable; }
32 
33  typedef std::map<Evoral::Parameter, std::shared_ptr<AutomationTimeAxisView> > AutomationTracks;
36 
37  virtual void create_automation_child (const Evoral::Parameter& param, bool show) = 0;
38  virtual std::shared_ptr<AutomationTimeAxisView> automation_child (Evoral::Parameter param, PBD::ID ctrl_id = PBD::ID(0));
39 
40  virtual std::shared_ptr<AutomationLine> automation_child_by_alist_id (PBD::ID);
41 
42  void request_redraw ();
43 
44  virtual void show_all_automation (bool apply_to_selection = false);
45  virtual void show_existing_automation (bool apply_to_selection = false);
46  virtual void hide_all_automation (bool apply_to_selection = false);
47 
48 protected:
50  virtual void set_samples_per_pixel (double);
51  void add_automation_child(Evoral::Parameter param, std::shared_ptr<AutomationTimeAxisView> track, bool show=true);
52 
53  virtual void create_gain_automation_child (const Evoral::Parameter &, bool) = 0;
54  virtual void create_trim_automation_child (const Evoral::Parameter &, bool) = 0;
55  virtual void create_mute_automation_child (const Evoral::Parameter &, bool) = 0;
56 
58 
62 
63  std::shared_ptr<ARDOUR::Stripable> _stripable;
64 
65  std::shared_ptr<AutomationTimeAxisView> gain_track;
66  std::shared_ptr<AutomationTimeAxisView> trim_track;
67  std::shared_ptr<AutomationTimeAxisView> mute_track;
68 
69  typedef std::map<Evoral::Parameter, Gtk::CheckMenuItem*> ParameterMenuMap;
72 
76 
78 
80  bool no_redraw;
81 };
82 
Definition: id.h:34
Representation of the interface of the Editor class.
virtual void create_automation_child(const Evoral::Parameter &param, bool show)=0
virtual void hide_all_automation(bool apply_to_selection=false)
std::shared_ptr< AutomationTimeAxisView > trim_track
virtual void create_trim_automation_child(const Evoral::Parameter &, bool)=0
virtual void create_mute_automation_child(const Evoral::Parameter &, bool)=0
std::shared_ptr< AutomationTimeAxisView > mute_track
ParameterMenuMap _main_automation_menu_map
std::shared_ptr< ARDOUR::Stripable > _stripable
StripableTimeAxisView(PublicEditor &, ARDOUR::Session *, ArdourCanvas::Canvas &canvas)
void add_automation_child(Evoral::Parameter param, std::shared_ptr< AutomationTimeAxisView > track, bool show=true)
AutomationTracks _automation_tracks
std::shared_ptr< ARDOUR::Stripable > stripable() const
std::shared_ptr< AutomationTimeAxisView > gain_track
void update_mute_track_visibility()
std::map< Evoral::Parameter, std::shared_ptr< AutomationTimeAxisView > > AutomationTracks
void update_gain_track_visibility()
void update_trim_track_visibility()
virtual void create_gain_automation_child(const Evoral::Parameter &, bool)=0
ArdourCanvas::Canvas & parent_canvas
virtual std::shared_ptr< AutomationLine > automation_child_by_alist_id(PBD::ID)
const AutomationTracks & automation_tracks() const
virtual Gtk::CheckMenuItem * automation_child_menu_item(Evoral::Parameter)
virtual ~StripableTimeAxisView()
Gtk::CheckMenuItem * trim_automation_item
std::map< Evoral::Parameter, Gtk::CheckMenuItem * > ParameterMenuMap
virtual void show_existing_automation(bool apply_to_selection=false)
virtual void show_all_automation(bool apply_to_selection=false)
void set_stripable(std::shared_ptr< ARDOUR::Stripable >)
Gtk::CheckMenuItem * gain_automation_item
virtual void set_samples_per_pixel(double)
Gtk::CheckMenuItem * mute_automation_item
void automation_track_hidden(Evoral::Parameter param)
virtual std::shared_ptr< AutomationTimeAxisView > automation_child(Evoral::Parameter param, PBD::ID ctrl_id=PBD::ID(0))