Ardour  9.0-pre0-350-gf17a656217
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 #pragma once
20 
21 #include "pbd/stateful.h"
22 
23 #include "ardour/types.h"
24 
25 namespace ARDOUR
26 {
27 
28 class SceneChange : public PBD::Stateful
29 {
30  public:
32  virtual ~SceneChange () {};
33 
34  static std::shared_ptr<SceneChange> factory (const XMLNode&, int version);
35  static std::string xml_node_name;
36 
37  uint32_t color() const;
38  void set_color (uint32_t);
39  bool color_out_of_bounds() const { return _color == out_of_bound_color; }
40  static const uint32_t out_of_bound_color;
41 
42  bool active () const { return _active; }
43  void set_active (bool);
44 
47 
48  protected:
49  /* derived classes are responsible for serializing & deserializing this value */
50  uint32_t _color;
51  bool _active;
52 };
53 
54 } /* namespace */
55 
56 
static std::shared_ptr< SceneChange > factory(const XMLNode &, int version)
void set_color(uint32_t)
bool color_out_of_bounds() const
Definition: scene_change.h:39
virtual ~SceneChange()
Definition: scene_change.h:32
uint32_t color() const
PBD::Signal< void()> ActiveChanged
Definition: scene_change.h:46
PBD::Signal< void()> ColorChanged
Definition: scene_change.h:45
static std::string xml_node_name
Definition: scene_change.h:35
static const uint32_t out_of_bound_color
Definition: scene_change.h:40
void set_active(bool)
bool active() const
Definition: scene_change.h:42
Definition: xml++.h:114