Ardour  8.12
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 "level_meter.h"
37 #include "panner_ui.h"
38 #include "processor_box.h"
39 #include "processor_selection.h"
40 #include "route_ui.h"
41 #include "triggerbox_ui.h"
42 
43 class PluginSelector;
44 class TriggerMaster;
45 
46 class TriggerStrip : public AxisView, public RouteUI, public Gtk::EventBox
47 {
48 public:
49  TriggerStrip (ARDOUR::Session*, std::shared_ptr<ARDOUR::Route>);
51 
52  /* AxisView */
53  std::string name () const;
54  Gdk::Color color () const;
55 
56  std::shared_ptr<ARDOUR::Stripable> stripable () const
57  {
58  return RouteUI::stripable ();
59  }
60 
62  void set_selected (bool yn);
63 
64  void fast_update ();
65 
66  static PBD::Signal1<void, TriggerStrip*> CatchDeletion;
67 
68 protected:
69  void self_delete ();
70 
71  //void on_size_allocate (Gtk::Allocation&);
72  //void on_size_request (Gtk::Requisition*);
73 
74  /* AxisView */
75  std::string state_id () const;
76 
77  /* route UI */
79 #if 0
81  void blink_rec_display (bool onoff);
82 #endif
83 
84 private:
85  void init ();
86 
87  /* RouteUI */
88  void set_route (std::shared_ptr<ARDOUR::Route>);
92  void parameter_changed (std::string);
94  void map_frozen ();
95 
96  /* Callbacks */
97  void io_changed ();
98  void name_changed ();
105 
106  /* Plugin related */
108  void hide_processor_editor (std::weak_ptr<ARDOUR::Processor>);
109 
110  /* Panner */
111  void connect_to_pan ();
113 
117 
118  /* Layout */
123 
124  /* Widgets */
127 
133  std::shared_ptr<AutomationController> _gain_control;
134 
136 };
137 
138 #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
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:56
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()
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 >)
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
static PBD::Signal1< void, TriggerStrip * > CatchDeletion
Definition: trigger_strip.h:66
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