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 <gtkmmext/slider_controller.h>
27 #include <gtkmmext/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::Viewport panning_viewport;
71 Gtk::EventBox panning_up;
72 Gtk::Arrow panning_up_arrow;
73 Gtk::EventBox panning_down;
74 Gtk::Arrow panning_down_arrow;
78 gint panning_scroll_button_press_event (GdkEventButton*, int32_t dir);
79 gint panning_scroll_button_release_event (GdkEventButton*, int32_t dir);
81 Gtk::ToggleButton panning_link_button;
82 Gtk::Button panning_link_direction_button;
83 Gtk::HBox panning_link_box;
85 gint panning_link_button_press (GdkEventButton*);
86 gint panning_link_button_release (GdkEventButton*);
87 void panning_link_direction_clicked ();
89 vector<Gtk::Adjustment*> pan_adjustments;
90 vector<Gtkmmext::BarController*> pan_bars;
92 void pan_adjustment_changed (uint32_t which);
93 void pan_value_changed (uint32_t which);
94 void pan_printer (char* buf, uint32_t, Gtk::Adjustment*);
95 void update_pan_bars (bool only_if_aplay);
96 void update_pan_linkage ();
97 void update_pan_state ();
99 void panner_changed ();
103 void panner_moved (int which);
104 void panner_bypass_toggled ();
106 gint start_pan_touch (GdkEventButton*);
107 gint end_pan_touch (GdkEventButton*);
109 gint entry_focus_event (GdkEventFocus* ev);
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__ */