Ardour  9.0-pre0-582-g084a23a80d
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 <gtkmm/box.h>
23 #include <gtkmm/eventbox.h>
24 #include <gtkmm/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 
69 protected:
70  void self_delete ();
71 
72  //void on_size_allocate (Gtk::Allocation&);
73  //void on_size_request (Gtk::Requisition*);
74 
75  /* AxisView */
76  std::string state_id () const;
77 
78  /* route UI */
80 #if 0
82  void blink_rec_display (bool onoff);
83 #endif
84 
85 private:
86  void init ();
87 
88  /* RouteUI */
89  void set_route (std::shared_ptr<ARDOUR::Route>);
93  void parameter_changed (std::string);
95  void map_frozen ();
96 
97  /* Callbacks */
98  void io_changed ();
99  void name_changed ();
106 
107  /* Plugin related */
109  void hide_processor_editor (std::weak_ptr<ARDOUR::Processor>);
110 
111  /* Panner */
112  void connect_to_pan ();
114 
118 
119  /* Layout */
124 
125  /* Widgets */
128 
136  std::shared_ptr<AutomationController> _gain_control;
137 
139 };
140 
141 #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()
void name_button_resized(Gtk::Allocation &)
void set_selected(bool yn)
void route_color_changed()
PBD::ScopedConnection _panstate_connection
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
void fast_update()
void name_changed()
void connect_to_pan()
void hide_processor_editor(std::weak_ptr< ARDOUR::Processor >)
static PBD::Signal< void(TriggerStrip *)> CatchDeletion
Definition: trigger_strip.h:67
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