Ardour  8.7-14-g57a6773833
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 "canvas/rectangle.h"
29 
30 namespace ArdourCanvas {
31 
33 {
34  public:
37 
38  void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
39  void compute_bounding_box () const;
40 
41  void set_font_description (Pango::FontDescription const &);
42  void set_size (double size);
43  void set_scale (double scale);
44  void set_trigger (std::shared_ptr<ARDOUR::Trigger> t);
45  void reset_trigger ();
46 
47  private:
48  std::shared_ptr<ARDOUR::Trigger> trigger;;
49  Pango::FontDescription font_description;
50  double size;
51  double scale;
52 };
53 
54 }
55 
56 #endif /* __ardour_push2_follow_action_h__ */
Pango::FontDescription font_description
Definition: follow_action.h:48
std::shared_ptr< ARDOUR::Trigger > trigger
Definition: follow_action.h:48
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