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 <gtkmm2ext/slider_controller.h>
27 #include <gtkmm2ext/click_box.h>
42 class PannerUI : public Gtk::HBox
45 PannerUI (ARDOUR::IO&, ARDOUR::Session&);
48 void pan_changed (void *);
50 void update_pan_sensitive ();
51 void update_gain_sensitive ();
53 void set_width (Width);
56 void effective_pan_display ();
58 void set_meter_strip_name (string name);
62 ARDOUR::Session& _session;
69 Gtk::VBox pan_bar_packer;
70 Gtk::Adjustment hAdjustment;
71 Gtk::Adjustment vAdjustment;
72 Gtk::Viewport panning_viewport;
73 Gtk::EventBox panning_up;
74 Gtk::Arrow panning_up_arrow;
75 Gtk::EventBox panning_down;
76 Gtk::Arrow panning_down_arrow;
80 gint panning_scroll_button_press_event (GdkEventButton*, int32_t dir);
81 gint panning_scroll_button_release_event (GdkEventButton*, int32_t dir);
83 Gtk::ToggleButton panning_link_button;
84 Gtk::Button panning_link_direction_button;
85 Gtk::HBox panning_link_box;
87 gint panning_link_button_press (GdkEventButton*);
88 gint panning_link_button_release (GdkEventButton*);
89 void panning_link_direction_clicked ();
91 vector<Gtk::Adjustment*> pan_adjustments;
92 vector<Gtkmm2ext::BarController*> pan_bars;
94 void pan_adjustment_changed (uint32_t which);
95 void pan_value_changed (uint32_t which);
96 void pan_printer (char* buf, uint32_t, Gtk::Adjustment*);
97 void update_pan_bars (bool only_if_aplay);
98 void update_pan_linkage ();
99 void update_pan_state ();
101 void panner_changed ();
105 void panner_moved (int which);
106 void panner_bypass_toggled ();
108 gint start_pan_touch (GdkEventButton*);
109 gint end_pan_touch (GdkEventButton*);
111 gint pan_button_event (GdkEventButton*, uint32_t which);
113 Gtk::CheckMenuItem* bypass_menu_item;
114 void build_pan_menu (uint32_t which);
115 void pan_mute (uint32_t which);
117 void pan_bypass_toggle ();
120 #endif /* __ardour_gtk_panner_ui_h__ */