Ardour  9.0-pre0-582-g084a23a80d
follow_action.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2022 Ben Loftis <ben@harrisonconsoles.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef __ardour_push2_follow_action_h__
21 #define __ardour_push2_follow_action_h__
22 
23 /* This might be moved into libcanvas one day, but for now it is only used by
24  * the push code. It has a dependency on ARDOUR::Trigger so it tricky to place
25  * correctly.
26  */
27 
28 #include "ardour/triggerbox.h"
29 
30 #include "canvas/rectangle.h"
31 
32 #include <pangomm/fontdescription.h>
33 
34 namespace ArdourCanvas {
35 
37 {
38  public:
41 
42  void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
43  void compute_bounding_box () const;
44 
45  void set_font_description (Pango::FontDescription const &);
46  void set_size (double size);
47  void set_scale (double scale);
48  void set_trigger (std::shared_ptr<ARDOUR::Trigger> t);
49  void reset_trigger ();
50 
51  private:
52  std::shared_ptr<ARDOUR::Trigger> trigger;;
53  Pango::FontDescription font_description;
54  double size;
55  double scale;
56 };
57 
58 }
59 
60 #endif /* __ardour_push2_follow_action_h__ */
Pango::FontDescription font_description
Definition: follow_action.h:52
std::shared_ptr< ARDOUR::Trigger > trigger
Definition: follow_action.h:52
void set_scale(double scale)
void set_trigger(std::shared_ptr< ARDOUR::Trigger > t)
void set_font_description(Pango::FontDescription const &)
void render(Rect const &, Cairo::RefPtr< Cairo::Context >) const