Ardour  9.0-pre0-582-g084a23a80d
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/controllable.h"
23 #include "pbd/stateful.h"
24 
26 #include "ardour/session_handle.h"
27 #include "ardour/types.h"
28 
29 namespace ARDOUR {
30 
32 {
33 public:
36 
37  void snapshot ();
38  bool apply () const;
39  bool apply (PBD::ControllableSet const&, AutomationTypeSet const& ts = AutomationTypeSet()) const;
40  void clear ();
41  bool empty () const { return _ctrl_map.empty (); }
42 
43  std::string name () const { return _name; }
44  bool set_name (std::string const& name);
45 
46  XMLNode& get_state () const;
47  int set_state (XMLNode const&, int version);
48 
49  static PBD::Signal<void()> Change;
50 
51 private:
52  typedef std::map<PBD::ID, double> ControllableValueMap;
53 
54  bool recurse_to_master (std::shared_ptr<PBD::Controllable>, std::set <PBD::ID>&, AutomationTypeSet const&) const;
55 
57  std::string _name;
58 };
59 
60 }
61 
62 #endif
bool empty() const
Definition: mixer_scene.h:41
bool apply(PBD::ControllableSet const &, AutomationTypeSet const &ts=AutomationTypeSet()) const
std::string _name
Definition: mixer_scene.h:57
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
static PBD::Signal< void()> Change
Definition: mixer_scene.h:49
ControllableValueMap _ctrl_map
Definition: mixer_scene.h:56
MixerScene(Session &)
std::map< PBD::ID, double > ControllableValueMap
Definition: mixer_scene.h:52
int set_state(XMLNode const &, int version)
std::string name() const
Definition: mixer_scene.h:43
Definition: xml++.h:114
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
std::set< AutomationType > AutomationTypeSet
std::set< std::shared_ptr< Controllable > > ControllableSet
Definition: controllable.h:40