Ardour  8.12
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 #ifndef __ardour_stripable_time_axis_h__
20 #define __ardour_stripable_time_axis_h__
21 
22 #include "automation_time_axis.h"
23 #include "time_axis_view.h"
24 
26 {
27 public:
30 
31  void set_stripable (std::shared_ptr<ARDOUR::Stripable>);
32  std::shared_ptr<ARDOUR::Stripable> stripable() const { return _stripable; }
33 
34  typedef std::map<Evoral::Parameter, std::shared_ptr<AutomationTimeAxisView> > AutomationTracks;
37 
38  virtual void create_automation_child (const Evoral::Parameter& param, bool show) = 0;
39  virtual std::shared_ptr<AutomationTimeAxisView> automation_child (Evoral::Parameter param, PBD::ID ctrl_id = PBD::ID(0));
40 
41  virtual std::shared_ptr<AutomationLine> automation_child_by_alist_id (PBD::ID);
42 
43  void request_redraw ();
44 
45  virtual void show_all_automation (bool apply_to_selection = false);
46  virtual void show_existing_automation (bool apply_to_selection = false);
47  virtual void hide_all_automation (bool apply_to_selection = false);
48 
49 protected:
51  virtual void set_samples_per_pixel (double);
52  void add_automation_child(Evoral::Parameter param, std::shared_ptr<AutomationTimeAxisView> track, bool show=true);
53 
54  virtual void create_gain_automation_child (const Evoral::Parameter &, bool) = 0;
55  virtual void create_trim_automation_child (const Evoral::Parameter &, bool) = 0;
56  virtual void create_mute_automation_child (const Evoral::Parameter &, bool) = 0;
57 
59 
63 
64  std::shared_ptr<ARDOUR::Stripable> _stripable;
65 
66  std::shared_ptr<AutomationTimeAxisView> gain_track;
67  std::shared_ptr<AutomationTimeAxisView> trim_track;
68  std::shared_ptr<AutomationTimeAxisView> mute_track;
69 
70  typedef std::map<Evoral::Parameter, Gtk::CheckMenuItem*> ParameterMenuMap;
73 
77 
79 
81  bool no_redraw;
82 };
83 
84 #endif /* __ardour_stripable_time_axis_h__ */
Definition: id.h:35
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))