Ardour  9.0-pre0-582-g084a23a80d
mergeable_line.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 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 __gtk2_ardour_mergeable_line__
20 #define __gtk2_ardour_mergeable_line__
21 
22 #include <functional>
23 #include <memory>
24 
25 #include "evoral/ControlList.h"
26 
27 #include "ardour/types.h"
28 
29 class AutomationLine;
30 class RouteTimeAxisView;
31 class EditingContext;
32 
33 namespace ARDOUR {
34  class Session;
35 class AutomationControl;
36 }
37 
39 {
40  public:
41  MergeableLine (std::shared_ptr<AutomationLine> l, std::shared_ptr<ARDOUR::AutomationControl> c,
42  std::function<Temporal::timepos_t(Temporal::timepos_t const &)> tf,
43  std::function<void(ARDOUR::AutoState)> asc,
44  std::function<void()> ctc)
45  : _line (l)
46  , _control (c)
47  , time_filter (tf)
49  , control_touched_callback (ctc) {}
50 
51  virtual ~MergeableLine() {}
52 
54 
55  private:
56  std::shared_ptr<AutomationLine> _line;
57  std::shared_ptr<ARDOUR::AutomationControl> _control;
60  std::function<void()> control_touched_callback;
61 };
62 
63 #endif /* __gtk2_ardour_mergeable_line__ */
std::vector< OrderedPoint > OrderedPoints
Definition: ControlList.h:178
MergeableLine(std::shared_ptr< AutomationLine > l, std::shared_ptr< ARDOUR::AutomationControl > c, std::function< Temporal::timepos_t(Temporal::timepos_t const &)> tf, std::function< void(ARDOUR::AutoState)> asc, std::function< void()> ctc)
std::shared_ptr< ARDOUR::AutomationControl > _control
std::function< void()> control_touched_callback
std::function< Temporal::timepos_t(Temporal::timepos_t const &)> time_filter
std::function< void(ARDOUR::AutoState)> automation_state_callback
void merge_drawn_line(EditingContext &e, ARDOUR::Session &s, Evoral::ControlList::OrderedPoints &points, bool thin)
virtual ~MergeableLine()
std::shared_ptr< AutomationLine > _line
Temporal::timepos_t timepos_t