Ardour  8.12
mixer_scene.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 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 _libardour_mixer_scene_h_
20 #define _libardour_mixer_scene_h_
21 
22 #include "pbd/stateful.h"
23 
25 #include "ardour/session_handle.h"
26 #include "ardour/types.h"
27 
28 namespace PBD {
29  class Controllable;
30 }
31 
32 namespace ARDOUR {
33 
35 {
36 public:
39 
40  void snapshot ();
41  bool apply () const;
42  bool apply (PBD::ControllableSet const&, AutomationTypeSet const& ts = AutomationTypeSet()) const;
43  void clear ();
44  bool empty () const { return _ctrl_map.empty (); }
45 
46  std::string name () const { return _name; }
47  bool set_name (std::string const& name);
48 
49  XMLNode& get_state () const;
50  int set_state (XMLNode const&, int version);
51 
52  static PBD::Signal0<void> Change;
53 
54 private:
55  typedef std::map<PBD::ID, double> ControllableValueMap;
56 
57  bool recurse_to_master (std::shared_ptr<PBD::Controllable>, std::set <PBD::ID>&, AutomationTypeSet const&) const;
58 
60  std::string _name;
61 };
62 
63 }
64 
65 #endif
bool empty() const
Definition: mixer_scene.h:44
bool apply(PBD::ControllableSet const &, AutomationTypeSet const &ts=AutomationTypeSet()) const
std::string _name
Definition: mixer_scene.h:60
bool apply() const
bool set_name(std::string const &name)
bool recurse_to_master(std::shared_ptr< PBD::Controllable >, std::set< PBD::ID > &, AutomationTypeSet const &) const
XMLNode & get_state() const
ControllableValueMap _ctrl_map
Definition: mixer_scene.h:59
MixerScene(Session &)
std::map< PBD::ID, double > ControllableValueMap
Definition: mixer_scene.h:55
static PBD::Signal0< void > Change
Definition: mixer_scene.h:52
int set_state(XMLNode const &, int version)
std::string name() const
Definition: mixer_scene.h:46
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
std::set< AutomationType > AutomationTypeSet
std::shared_ptr< PBD::Controllable > Controllable
Definition: console1.h:80
Definition: axis_view.h:42
std::set< std::shared_ptr< Controllable > > ControllableSet
Definition: controllable.h:41