2 Copyright (C) 2004 Paul Davis
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.
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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __ardour_gtk_panner_ui_h__
22 #define __ardour_gtk_panner_ui_h__
26 #include <gtkmm/box.h>
27 #include <gtkmm/adjustment.h>
28 #include <gtkmm/viewport.h>
29 #include <gtkmm/eventbox.h>
30 #include <gtkmm/arrow.h>
31 #include <gtkmm/togglebutton.h>
32 #include <gtkmm/button.h>
34 #include <gtkmm2ext/slider_controller.h>
35 #include <gtkmm2ext/click_box.h>
55 class PannerUI : public Gtk::HBox
58 PannerUI (ARDOUR::IO&, ARDOUR::Session&);
61 void pan_changed (void *);
63 void update_pan_sensitive ();
64 void update_gain_sensitive ();
66 void set_width (Width);
69 void effective_pan_display ();
71 void set_meter_strip_name (string name);
75 ARDOUR::Session& _session;
82 Gtk::VBox pan_bar_packer;
83 Gtk::Adjustment hAdjustment;
84 Gtk::Adjustment vAdjustment;
85 Gtk::Viewport panning_viewport;
86 Gtk::EventBox panning_up;
87 Gtk::Arrow panning_up_arrow;
88 Gtk::EventBox panning_down;
89 Gtk::Arrow panning_down_arrow;
93 gint panning_scroll_button_press_event (GdkEventButton*, int32_t dir);
94 gint panning_scroll_button_release_event (GdkEventButton*, int32_t dir);
96 Gtk::ToggleButton panning_link_button;
97 Gtk::Button panning_link_direction_button;
98 Gtk::HBox panning_link_box;
100 gint panning_link_button_press (GdkEventButton*);
101 gint panning_link_button_release (GdkEventButton*);
102 void panning_link_direction_clicked ();
104 vector<Gtk::Adjustment*> pan_adjustments;
105 vector<Gtkmm2ext::BarController*> pan_bars;
107 void pan_adjustment_changed (uint32_t which);
108 void pan_value_changed (uint32_t which);
109 void pan_printer (char* buf, uint32_t, Gtk::Adjustment*);
110 void update_pan_bars (bool only_if_aplay);
111 void update_pan_linkage ();
112 void update_pan_state ();
114 void panner_changed ();
118 void panner_moved (int which);
119 void panner_bypass_toggled ();
121 gint start_pan_touch (GdkEventButton*);
122 gint end_pan_touch (GdkEventButton*);
124 gint pan_button_event (GdkEventButton*, uint32_t which);
126 Gtk::CheckMenuItem* bypass_menu_item;
127 void build_pan_menu (uint32_t which);
128 void pan_mute (uint32_t which);
130 void pan_bypass_toggle ();
133 #endif /* __ardour_gtk_panner_ui_h__ */