Ardour  9.0-pre0-582-g084a23a80d
panner_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2011 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
5  * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2014-2017 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include <vector>
26 
27 #include <gtkmm/box.h>
28 #include <gtkmm/adjustment.h>
29 #include <gtkmm/eventbox.h>
30 #include <gtkmm/arrow.h>
31 #include <gtkmm/togglebutton.h>
32 #include <gtkmm/button.h>
33 
34 #include "ardour/session_handle.h"
35 
36 #include "enums.h"
37 
38 class Panner2d;
39 class Panner2dWindow;
40 class StereoPanner;
41 class MonoPanner;
42 
43 namespace ARDOUR {
44  class Session;
45  class Panner;
46  class PannerShell;
47  class Delivery;
48  class AutomationControl;
49 }
50 
51 namespace Gtk {
52  class CheckMenuItem;
53  class Menu;
54  class Menuitem;
55 }
56 
58 {
59 public:
62 
63  virtual void set_panner (std::shared_ptr<ARDOUR::PannerShell>, std::shared_ptr<ARDOUR::Panner>);
64 
66 
69 
70  void set_width (Width);
71  void setup_pan ();
72  void set_available_panners(std::map<std::string,std::string>);
73  void set_send_drawing_mode (bool);
74 
76 
77  void set_meter_strip_name (std::string name);
78 
80 
81  static void setup_slider_pix ();
82 
83 private:
84  friend class MixerStrip;
85  friend class TriggerStrip;
86  friend class SendUI;
87 
88  std::shared_ptr<ARDOUR::PannerShell> _panshell;
89  std::shared_ptr<ARDOUR::Panner> _panner;
92 
96  std::string _current_uri;
97  bool _send_mode;
98 
101 
106 
109 
112  void width_adjusted ();
113  void show_width ();
115  void show_position ();
116 
119 
121 
122  void pan_value_changed (uint32_t which);
125 
126  void hide_pans ();
127 
128  void panner_moved (int which);
130 
133 
135 
139  void build_pan_menu ();
140  void pan_reset ();
143  void pan_edit ();
144  void pan_set_custom_type (std::string type);
145 
148 
149  void start_touch (std::weak_ptr<ARDOUR::AutomationControl>);
150  void stop_touch (std::weak_ptr<ARDOUR::AutomationControl>);
151 
152  std::map<std::string,std::string> _panner_list;
154 };
155 
156 
virtual void set_panner(std::shared_ptr< ARDOUR::PannerShell >, std::shared_ptr< ARDOUR::Panner >)
void on_size_allocate(Gtk::Allocation &)
This is a default handler for the signal signal_size_allocate().
MonoPanner * _mono_panner
Definition: panner_ui.h:108
Gtk::Menu * pan_astate_menu
Definition: panner_ui.h:117
void update_pan_sensitive()
bool pan_button_event(GdkEventButton *)
std::shared_ptr< ARDOUR::Panner > _panner
Definition: panner_ui.h:89
void build_pan_menu()
void hide_pans()
Gtk::VBox poswidth_box
Definition: panner_ui.h:104
static void setup_slider_pix()
PBD::ScopedConnectionList connections
Definition: panner_ui.h:90
bool _ignore_width_change
Definition: panner_ui.h:110
void pan_reset()
void pan_set_custom_type(std::string type)
std::shared_ptr< ARDOUR::PannerShell > _panshell
Definition: panner_ui.h:88
gint end_pan_touch(GdkEventButton *)
void pan_automation_state_changed()
Gtk::ToggleButton pan_automation_state_button
Definition: panner_ui.h:120
gint start_pan_touch(GdkEventButton *)
void build_astyle_menu()
std::string _current_uri
Definition: panner_ui.h:96
void position_adjusted()
void width_adjusted()
int _current_nins
Definition: panner_ui.h:95
bool _ignore_position_change
Definition: panner_ui.h:111
Width _width
Definition: panner_ui.h:105
void setup_pan()
int _current_nouts
Definition: panner_ui.h:94
void set_meter_strip_name(std::string name)
Gtk::VBox pan_vbox
Definition: panner_ui.h:103
Gtk::CheckMenuItem * send_link_menu_item
Definition: panner_ui.h:138
gint pan_automation_state_button_event(GdkEventButton *)
void set_send_drawing_mode(bool)
void pan_edit()
bool in_pan_update
Definition: panner_ui.h:93
PannerUI(ARDOUR::Session *)
bool _suspend_menu_callbacks
Definition: panner_ui.h:153
void show_width()
void pan_link_toggle()
Gtk::VBox pan_bar_packer
Definition: panner_ui.h:102
Gtk::Menu * pan_menu
Definition: panner_ui.h:136
void stop_touch(std::weak_ptr< ARDOUR::AutomationControl >)
void panner_bypass_toggled()
bool _send_mode
Definition: panner_ui.h:97
void build_astate_menu()
StereoPanner * _stereo_panner
Definition: panner_ui.h:107
void panshell_changed()
void panner_moved(int which)
Gtk::CheckMenuItem * bypass_menu_item
Definition: panner_ui.h:137
void set_available_panners(std::map< std::string, std::string >)
PBD::ScopedConnectionList _pan_control_connections
Definition: panner_ui.h:91
Panner2dWindow * big_window
Definition: panner_ui.h:100
void start_touch(std::weak_ptr< ARDOUR::AutomationControl >)
void set_width(Width)
void show_position()
std::map< std::string, std::string > _panner_list
Definition: panner_ui.h:152
void pan_bypass_toggle()
void update_gain_sensitive()
Panner2d * twod_panner
2D panner, or 0
Definition: panner_ui.h:99
void effective_pan_display()
Gtk::Menu * pan_astyle_menu
Definition: panner_ui.h:118
void pan_value_changed(uint32_t which)
Definition: send_ui.h:39
GtkImageIconNameData name
Definition: gtkimage.h:6
Definition: ardour_ui.h:188