Ardour  8.12
scene_change.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 Paul Davis <paul@linuxaudiosystems.com>
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_scene_change_h__
20 #define __libardour_scene_change_h__
21 
22 #include "pbd/stateful.h"
23 
24 #include "ardour/types.h"
25 
26 namespace ARDOUR
27 {
28 
29 class SceneChange : public PBD::Stateful
30 {
31  public:
33  virtual ~SceneChange () {};
34 
35  static std::shared_ptr<SceneChange> factory (const XMLNode&, int version);
36  static std::string xml_node_name;
37 
38  uint32_t color() const;
39  void set_color (uint32_t);
40  bool color_out_of_bounds() const { return _color == out_of_bound_color; }
41  static const uint32_t out_of_bound_color;
42 
43  bool active () const { return _active; }
44  void set_active (bool);
45 
46  PBD::Signal0<void> ColorChanged;
47  PBD::Signal0<void> ActiveChanged;
48 
49  protected:
50  /* derived classes are responsible for serializing & deserializing this value */
51  uint32_t _color;
52  bool _active;
53 };
54 
55 } /* namespace */
56 
57 
58 #endif /* __libardour_scene_change_h__ */
static std::shared_ptr< SceneChange > factory(const XMLNode &, int version)
PBD::Signal0< void > ActiveChanged
Definition: scene_change.h:47
void set_color(uint32_t)
bool color_out_of_bounds() const
Definition: scene_change.h:40
virtual ~SceneChange()
Definition: scene_change.h:33
uint32_t color() const
PBD::Signal0< void > ColorChanged
Definition: scene_change.h:46
static std::string xml_node_name
Definition: scene_change.h:36
static const uint32_t out_of_bound_color
Definition: scene_change.h:41
void set_active(bool)
bool active() const
Definition: scene_change.h:43
Definition: xml++.h:114