Ardour  9.0-pre0-1935-g02af9cb3d6
trigger_strip.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Robin Gareus <robin@gareus.org>
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 __ardour_trigger_strip__
20 #define __ardour_trigger_strip__
21 
22 #include <ytkmm/box.h>
23 #include <ytkmm/eventbox.h>
24 #include <ytkmm/frame.h>
25 
26 #include "pbd/stateful.h"
27 
28 #include "ardour/ardour.h"
29 #include "ardour/types.h"
30 
31 #include "widgets/ardour_button.h"
32 
33 #include "automation_controller.h"
34 #include "axis_view.h"
35 #include "fitted_canvas_widget.h"
36 #include "io_button.h"
37 #include "level_meter.h"
38 #include "panner_ui.h"
39 #include "processor_box.h"
40 #include "processor_selection.h"
41 #include "route_ui.h"
42 #include "triggerbox_ui.h"
43 
44 class PluginSelector;
45 class TriggerMaster;
46 
47 class TriggerStrip : public AxisView, public RouteUI, public Gtk::EventBox
48 {
49 public:
50  TriggerStrip (ARDOUR::Session*, std::shared_ptr<ARDOUR::Route>);
52 
53  /* AxisView */
54  std::string name () const;
55  Gdk::Color color () const;
56 
57  std::shared_ptr<ARDOUR::Stripable> stripable () const
58  {
59  return RouteUI::stripable ();
60  }
61 
63  void set_selected (bool yn);
64 
65  void fast_update ();
66 
68 
70 
71 protected:
72  void self_delete ();
73 
74  //void on_size_allocate (Gtk::Allocation&);
75  //void on_size_request (Gtk::Requisition*);
76 
77  /* AxisView */
78  std::string state_id () const;
79 
80  /* route UI */
82 #if 0
84  void blink_rec_display (bool onoff);
85 #endif
86 
87 private:
88  void init ();
89 
90  /* RouteUI */
91  void set_route (std::shared_ptr<ARDOUR::Route>);
95  void parameter_changed (std::string);
97  void map_frozen ();
98 
99  /* Callbacks */
100  void io_changed ();
101  void name_changed ();
108 
109  /* Plugin related */
111  void hide_processor_editor (std::weak_ptr<ARDOUR::Processor>);
112 
113  /* Panner */
114  void connect_to_pan ();
116 
120 
121  /* Layout */
126 
129 
130  /* Widgets */
133 
141  std::shared_ptr<AutomationController> _gain_control;
142 
144 
146 };
147 
148 #endif /* __ardour_trigger_strip__ */
virtual void blink_rec_display(bool onoff)
std::shared_ptr< ARDOUR::Stripable > stripable() const
virtual void route_rec_enable_changed()
void reset_peak_display()
void io_changed()
TriggerBoxWidget _trigger_display
IOButton input_button
bool name_button_press(GdkEventButton *)
std::string name() const
TriggerMaster * _tmaster
Gtk::VBox global_vpacker
FittedCanvasWidget _tmaster_widget
PluginSelector * plugin_selector()
bool rec_toggle_press(GdkEventButton *ev)
void name_button_resized(Gtk::Allocation &)
void set_selected(bool yn)
void route_color_changed()
PBD::ScopedConnection _panstate_connection
void box_rec_enable_change()
LevelMeterVBox _level_meter
ArdourWidgets::ArdourButton _name_button
void set_route(std::shared_ptr< ARDOUR::Route >)
TriggerStrip(ARDOUR::Session *, std::shared_ptr< ARDOUR::Route >)
std::shared_ptr< ARDOUR::Stripable > stripable() const
Definition: trigger_strip.h:57
void update_sensitivity()
void self_delete()
void set_session(ARDOUR::Session *s)
Gtk::Menu * _route_ops_menu
void build_route_ops_menu()
void update_panner_choices()
IOButton output_button
void route_active_changed()
PannerUI _panners
Gtk::Table volume_table
ArdourWidgets::ArdourButton * rec_toggle_button
void fast_update()
void name_changed()
TriggerBoxWidget & triggerbox_widget()
Definition: trigger_strip.h:67
void connect_to_pan()
void hide_processor_editor(std::weak_ptr< ARDOUR::Processor >)
static PBD::Signal< void(TriggerStrip *)> CatchDeletion
Definition: trigger_strip.h:69
void reset_route_peak_display(ARDOUR::Route *)
void route_property_changed(const PBD::PropertyChange &)
void reset_group_peak_display(ARDOUR::RouteGroup *)
Gtk::Frame global_frame
Gtk::Table mute_solo_table
ProcessorBox _processor_box
std::shared_ptr< AutomationController > _gain_control
void set_button_names()
std::string state_id() const
ProcessorSelection _pb_selection
void parameter_changed(std::string)
void map_frozen()
Gdk::Color color() const