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 #include "ardour/io.h"
22 #include "ardour/dB.h"
23 #include <gtkmm2ext/utils.h>
24 #include <gtkmm2ext/barcontroller.h>
25 #include "midi++/manager.h"
26 #include "pbd/fastlog.h"
28 #include "ardour_ui.h"
29 #include "panner_ui.h"
33 #include "gui_thread.h"
35 #include "ardour/delivery.h"
36 #include "ardour/session.h"
37 #include "ardour/panner.h"
38 #include "ardour/route.h"
43 using namespace ARDOUR;
45 using namespace Gtkmm2ext;
48 const int PannerUI::pan_bar_height = 20;
49 Glib::RefPtr<Gdk::Pixbuf> PannerUI::_poswidth_slider;
51 PannerUI::PannerUI (Session* s)
54 , hAdjustment(0.0, 0.0, 0.0)
55 , vAdjustment(0.0, 0.0, 0.0)
56 , panning_viewport(hAdjustment, vAdjustment)
57 , panning_up_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT)
58 , panning_down_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT)
59 , _position_adjustment (0.5, 0.0, 1.0, 0.01, 0.1)
60 , _width_adjustment (0.0, -1.0, 1.0, 0.01, 0.1)
61 , panning_link_button (_("link"))
62 , pan_automation_style_button ("")
63 , pan_automation_state_button ("")
64 , _bar_spinner_active (false)
68 ignore_toggle = false;
72 in_pan_update = false;
75 _ignore_width_change = false;
76 _ignore_position_change = false;
78 pan_automation_style_button.set_name ("MixerAutomationModeButton");
79 pan_automation_state_button.set_name ("MixerAutomationPlaybackButton");
81 ARDOUR_UI::instance()->set_tip (pan_automation_state_button, _("Pan automation mode"));
82 ARDOUR_UI::instance()->set_tip (pan_automation_style_button, _("Pan automation type"));
84 //set_size_request_to_display_given_text (pan_automation_state_button, X_("O"), 2, 2);
85 //set_size_request_to_display_given_text (pan_automation_style_button, X_("0"), 2, 2);
87 panning_viewport.set_name (X_("BaseFrame"));
89 ARDOUR_UI::instance()->set_tip (panning_link_button,
90 _("panning link control"));
91 ARDOUR_UI::instance()->set_tip (panning_link_direction_button,
92 _("panning link direction"));
94 pan_automation_style_button.unset_flags (Gtk::CAN_FOCUS);
95 pan_automation_state_button.unset_flags (Gtk::CAN_FOCUS);
97 pan_automation_style_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_style_button_event), false);
98 pan_automation_state_button.signal_button_press_event().connect (sigc::mem_fun(*this, &PannerUI::pan_automation_state_button_event), false);
100 panning_link_button.set_name (X_("PanningLinkButton"));
101 panning_link_direction_button.set_name (X_("PanningLinkDirectionButton"));
103 panning_link_box.pack_start (panning_link_button, true, true);
104 panning_link_box.pack_start (panning_link_direction_button, true, true);
105 panning_link_box.pack_start (pan_automation_state_button, true, true);
107 /* the pixmap will be reset at some point, but the key thing is that
108 we need a pixmap in the button just to get started.
110 panning_link_direction_button.add (*(manage (new Image (get_xpm("forwardblarrow.xpm")))));
112 panning_link_direction_button.signal_clicked().connect
113 (sigc::mem_fun(*this, &PannerUI::panning_link_direction_clicked));
115 panning_link_button.signal_button_press_event().connect
116 (sigc::mem_fun(*this, &PannerUI::panning_link_button_press), false);
117 panning_link_button.signal_button_release_event().connect
118 (sigc::mem_fun(*this, &PannerUI::panning_link_button_release), false);
120 panning_up.set_border_width (3);
121 panning_down.set_border_width (3);
122 panning_up.add (panning_up_arrow);
123 panning_down.add (panning_down_arrow);
124 panning_up.set_name (X_("PanScrollerBase"));
125 panning_down.set_name (X_("PanScrollerBase"));
126 panning_up_arrow.set_name (X_("PanScrollerArrow"));
127 panning_down_arrow.set_name (X_("PanScrollerArrow"));
129 pan_vbox.set_spacing (2);
130 pan_vbox.pack_start (panning_viewport, Gtk::PACK_SHRINK);
131 pan_vbox.pack_start (panning_link_box, Gtk::PACK_SHRINK);
133 pack_start (pan_vbox, true, true);
142 PannerUI::set_panner (boost::shared_ptr<Panner> p)
144 connections.drop_connections ();
146 delete pan_astyle_menu;
149 delete pan_astate_menu;
161 _panner->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panner_changed, this, this), gui_context());
162 _panner->LinkStateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_linkage, this), gui_context());
163 _panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_state, this), gui_context());
166 update_pan_sensitive ();
167 update_pan_linkage ();
168 pan_automation_state_changed ();
172 PannerUI::build_astate_menu ()
174 using namespace Menu_Helpers;
176 if (pan_astate_menu == 0) {
177 pan_astate_menu = new Menu;
178 pan_astate_menu->set_name ("ArdourContextMenu");
180 pan_astate_menu->items().clear ();
183 pan_astate_menu->items().push_back (MenuElem (_("Manual"), sigc::bind (
184 sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
186 pan_astate_menu->items().push_back (MenuElem (_("Play"), sigc::bind (
187 sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
189 pan_astate_menu->items().push_back (MenuElem (_("Write"), sigc::bind (
190 sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
191 (AutoState) Write)));
192 pan_astate_menu->items().push_back (MenuElem (_("Touch"), sigc::bind (
193 sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
194 (AutoState) Touch)));
199 PannerUI::build_astyle_menu ()
201 using namespace Menu_Helpers;
203 if (pan_astyle_menu == 0) {
204 pan_astyle_menu = new Menu;
205 pan_astyle_menu->set_name ("ArdourContextMenu");
207 pan_astyle_menu->items().clear();
210 pan_astyle_menu->items().push_back (MenuElem (_("Trim")));
211 pan_astyle_menu->items().push_back (MenuElem (_("Abs")));
214 boost::shared_ptr<PBD::Controllable>
215 PannerUI::get_controllable()
217 return pan_bars[0]->get_controllable();
221 PannerUI::panning_link_button_press (GdkEventButton*)
227 PannerUI::panning_link_button_release (GdkEventButton*)
229 if (!ignore_toggle) {
230 _panner->set_linked (!_panner->linked());
236 PannerUI::panning_link_direction_clicked()
238 switch (_panner->link_direction()) {
239 case Panner::SameDirection:
240 _panner->set_link_direction (Panner::OppositeDirection);
243 _panner->set_link_direction (Panner::SameDirection);
249 PannerUI::update_pan_linkage ()
251 ENSURE_GUI_THREAD (*this, &PannerUI::update_pan_linkage)
253 bool const x = _panner->linked();
254 bool const bx = panning_link_button.get_active();
258 ignore_toggle = true;
259 panning_link_button.set_active (x);
260 ignore_toggle = false;
263 panning_link_direction_button.set_sensitive (x);
265 switch (_panner->link_direction()) {
266 case Panner::SameDirection:
267 panning_link_direction_button.set_image (*(manage (new Image (get_xpm ("forwardblarrow.xpm")))));
270 panning_link_direction_button.set_image (*(manage (new Image (get_xpm("revdblarrow.xpm")))));
276 PannerUI::on_size_allocate (Allocation& a)
278 HBox::on_size_allocate (a);
282 PannerUI::set_width (Width w)
286 panning_link_button.set_label (_("link"));
289 panning_link_button.set_label (_("L"));
297 PannerUI::~PannerUI ()
299 for (vector<Adjustment*>::iterator i = pan_adjustments.begin(); i != pan_adjustments.end(); ++i) {
303 for (vector<PannerBar*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
310 delete pan_astyle_menu;
311 delete pan_astate_menu;
312 delete _position_fader;
318 PannerUI::panner_changed (void* src)
320 ENSURE_GUI_THREAD (*this, &PannerUI::panner_changed)
328 switch (_panner->npanners()) {
330 panning_link_direction_button.set_sensitive (false);
331 panning_link_button.set_sensitive (false);
334 panning_link_direction_button.set_sensitive (false);
335 panning_link_button.set_sensitive (false);
338 panning_link_direction_button.set_sensitive (_panner->linked ());
339 panning_link_button.set_sensitive (true);
342 uint32_t const nouts = _panner->nouts();
351 /* bring pan bar state up to date */
352 update_pan_bars (false);
356 // panner->move_puck (pan_value (pans[0], pans[1]), 0.5);
362 PannerUI::update_pan_state ()
364 /* currently nothing to do */
365 // ENSURE_GUI_THREAD (*this, &PannerUI::update_panner_state)
369 PannerUI::setup_pan ()
375 uint32_t const nouts = _panner->nouts();
376 uint32_t const npans = _panner->npanners();
378 if (int32_t (nouts) == _current_nouts && int32_t (npans) == _current_npans) {
382 _pan_control_connections.drop_connections ();
383 for (uint32_t i = 0; i < _panner->npanners(); ++i) {
384 connect_to_pan_control (i);
387 _current_nouts = nouts;
388 _current_npans = npans;
390 if (nouts == 0 || nouts == 1) {
392 while (!pan_adjustments.empty()) {
393 delete pan_bars.back();
394 pan_bars.pop_back ();
395 delete pan_adjustments.back();
396 pan_adjustments.pop_back ();
402 /* stick something into the panning viewport so that it redraws */
404 EventBox* eb = manage (new EventBox());
405 panning_viewport.remove ();
406 panning_viewport.add (*eb);
407 panning_viewport.show_all ();
409 } else if (nouts == 2) {
411 vector<Adjustment*>::size_type asz;
413 while (!pan_adjustments.empty()) {
414 delete pan_bars.back();
415 pan_bars.pop_back ();
416 delete pan_adjustments.back();
417 pan_adjustments.pop_back ();
423 while ((asz = pan_adjustments.size()) < npans) {
428 /* initialize adjustment with 0.0 (L) or 1.0 (R) for the first and second panners,
429 which serves as a default, otherwise use current value */
431 rx = _panner->pan_control( asz)->get_value();
435 } else if (asz == 0) {
437 } else if (asz == 1) {
443 pan_adjustments.push_back (new Adjustment (x, 0, 1.0, 0.005, 0.05));
444 bc = new PannerBar (*pan_adjustments[asz],
445 boost::static_pointer_cast<PBD::Controllable>( _panner->pan_control( asz )) );
447 /* now set adjustment with current value of panner, then connect the signals */
448 pan_adjustments.back()->set_value(rx);
449 pan_adjustments.back()->signal_value_changed().connect (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_adjustment_changed), (uint32_t) asz));
450 connect_to_pan_control (asz);
452 bc->set_name ("PanSlider");
453 bc->set_shadow_type (Gtk::SHADOW_NONE);
455 boost::shared_ptr<AutomationControl> ac = _panner->pan_control (asz);
458 bc->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
459 boost::weak_ptr<AutomationControl> (ac)));
460 bc->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
461 boost::weak_ptr<AutomationControl>(ac)));
465 snprintf (buf, sizeof (buf), _("panner for channel %zu"), asz + 1);
466 ARDOUR_UI::instance()->set_tip (bc->event_widget(), buf);
468 bc->event_widget().signal_button_release_event().connect
469 (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) asz));
471 bc->set_size_request (-1, pan_bar_height);
472 bc->SpinnerActive.connect (sigc::mem_fun (*this, &PannerUI::bar_spinner_activate));
474 pan_bars.push_back (bc);
475 pan_bar_packer.pack_start (*bc, false, false);
478 /* now that we actually have the pan bars,
479 set their sensitivity based on current
483 update_pan_sensitive ();
485 panning_viewport.remove ();
486 panning_viewport.add (pan_bar_packer);
487 panning_viewport.show_all ();
490 /* add position and width controls */
491 if (_position_fader == 0) {
492 _position_fader = new BarController (_position_adjustment, _panner->direction_control());
493 _position_fader->set_size_request (-1, pan_bar_height/2);
494 _position_fader->set_name ("PanSlider");
495 _position_fader->set_style (BarController::Line);
496 ARDOUR_UI::instance()->set_tip (_position_fader, _("Pan Position"));
497 _position_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &PannerUI::position_adjusted));
498 _panner->direction_control()->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::show_position, this), gui_context());
501 _width_fader = new BarController (_width_adjustment, _panner->width_control());
502 _width_fader->set_size_request (-1, pan_bar_height/2);
503 _width_fader->set_name ("PanSlider");
504 _width_fader->set_style (BarController::CenterOut);
505 ARDOUR_UI::instance()->set_tip (_width_fader, _("Stereo Image Width"));
506 _width_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &PannerUI::width_adjusted));
507 _panner->width_control()->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::show_width, this), gui_context());
510 poswidth_box.pack_start (*_position_fader, true, true);
511 poswidth_box.pack_start (*_width_fader, true, true);
513 pan_vbox.pack_start (poswidth_box, false, false);
514 poswidth_box.show_all ();
515 cerr << "Packed poswidth and mde it visible\n";
517 if (_position_fader) {
518 pan_vbox.remove (poswidth_box);
519 cerr << "Hid poswidth\n";
526 twod_panner = new Panner2d (_panner, 61);
527 twod_panner->set_name ("MixerPanZone");
528 twod_panner->show ();
530 twod_panner->signal_button_press_event().connect
531 (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) 0), false);
534 update_pan_sensitive ();
535 twod_panner->reset (npans);
537 big_window->reset (npans);
539 twod_panner->set_size_request (-1, 61);
541 /* and finally, add it to the panner frame */
543 panning_viewport.remove ();
544 panning_viewport.add (*twod_panner);
545 panning_viewport.show_all ();
550 PannerUI::start_touch (boost::weak_ptr<AutomationControl> wac)
552 boost::shared_ptr<AutomationControl> ac = wac.lock();
556 ac->start_touch (ac->session().transport_frame());
560 PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac)
562 boost::shared_ptr<AutomationControl> ac = wac.lock();
566 ac->stop_touch (false, ac->session().transport_frame());
570 PannerUI::pan_button_event (GdkEventButton* ev, uint32_t which)
572 switch (ev->button) {
574 if (twod_panner && ev->type == GDK_2BUTTON_PRESS) {
576 big_window = new Panner2dWindow (_panner, 400, _panner->npanners());
585 pan_menu = manage (new Menu);
586 pan_menu->set_name ("ArdourContextMenu");
588 build_pan_menu (which);
589 pan_menu->popup (1, ev->time);
596 return false; // what's wrong with gcc?
600 PannerUI::build_pan_menu (uint32_t which)
602 using namespace Menu_Helpers;
603 MenuList& items (pan_menu->items());
607 items.push_back (CheckMenuElem (_("Mute")));
609 /* set state first, connect second */
611 (dynamic_cast<CheckMenuItem*> (&items.back()))->set_active (_panner->streampanner(which).muted());
612 (dynamic_cast<CheckMenuItem*> (&items.back()))->signal_toggled().connect
613 (sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_mute), which));
615 items.push_back (CheckMenuElem (_("Bypass"), sigc::mem_fun(*this, &PannerUI::pan_bypass_toggle)));
616 bypass_menu_item = static_cast<CheckMenuItem*> (&items.back());
618 /* set state first, connect second */
620 bypass_menu_item->set_active (_panner->bypassed());
621 bypass_menu_item->signal_toggled().connect (sigc::mem_fun(*this, &PannerUI::pan_bypass_toggle));
623 items.push_back (MenuElem (_("Reset"), sigc::bind (sigc::mem_fun (*this, &PannerUI::pan_reset), which)));
624 items.push_back (SeparatorElem());
625 items.push_back (MenuElem (_("Reset all"), sigc::mem_fun (*this, &PannerUI::pan_reset_all)));
629 PannerUI::pan_mute (uint32_t which)
631 StreamPanner& sp = _panner->streampanner(which);
632 sp.set_muted (!sp.muted());
636 PannerUI::pan_bypass_toggle ()
638 if (bypass_menu_item && (_panner->bypassed() != bypass_menu_item->get_active())) {
639 _panner->set_bypassed (!_panner->bypassed());
644 PannerUI::pan_reset (uint32_t which)
646 _panner->reset_streampanner (which);
650 PannerUI::pan_reset_all ()
652 _panner->reset_to_default ();
656 PannerUI::effective_pan_display ()
658 if (_panner->empty()) {
662 switch (_panner->nouts()) {
669 update_pan_bars (true);
673 //panner->move_puck (pan_value (v, right), 0.5);
679 PannerUI::pan_adjustment_changed (uint32_t which)
681 if (!in_pan_update && which < _panner->npanners()) {
683 float val = pan_adjustments[which]->get_value ();
684 float const xpos = _panner->pan_control(which)->get_value();
686 /* add a kinda-sorta detent for the middle */
688 if (val != 0.5 && Panner::equivalent (val, 0.5)) {
689 /* this is going to be reentrant, so just
693 in_pan_update = true;
694 pan_adjustments[which]->set_value (0.5);
695 in_pan_update = false;
699 if (!Panner::equivalent (val, xpos)) {
701 _panner->pan_control(which)->set_value (val);
703 the panner objects have no access to the session,
704 so do this here. ick.
706 _session->set_dirty();
712 PannerUI::pan_value_changed (uint32_t which)
714 ENSURE_GUI_THREAD (*this, &PannerUI::pan_value_changed, which)
718 in_pan_update = true;
719 twod_panner->move_puck (which, _panner->streampanner(which).get_position());
720 in_pan_update = false;
722 } else if (_panner->npanners() > 0 && which < _panner->npanners()) {
723 AngularVector model = _panner->streampanner(which).get_position();
724 double fract = pan_adjustments[which]->get_value();
725 AngularVector view (BaseStereoPanner::lr_fract_to_azimuth (fract), 0.0);
727 if (!Panner::equivalent (model, view)) {
728 in_pan_update = true;
729 pan_adjustments[which]->set_value (BaseStereoPanner::azimuth_to_lr_fract (model.azi));
730 in_pan_update = false;
736 PannerUI::update_pan_bars (bool only_if_aplay)
739 vector<Adjustment*>::iterator i;
741 in_pan_update = true;
743 /* this runs during automation playback, and moves the bar controllers
747 for (i = pan_adjustments.begin(), n = 0; i != pan_adjustments.end(); ++i, ++n) {
750 boost::shared_ptr<AutomationList> alist (_panner->streampanner(n).pan_control()->alist());
752 if (!alist->automation_playback()) {
757 AngularVector model = _panner->streampanner(n).get_effective_position();
758 double fract = (*i)->get_value();
759 AngularVector view (BaseStereoPanner::lr_fract_to_azimuth (fract), 0.0);
761 if (!Panner::equivalent (model, view)) {
762 (*i)->set_value (BaseStereoPanner::azimuth_to_lr_fract (model.azi));
766 in_pan_update = false;
770 PannerUI::update_pan_sensitive ()
772 bool const sensitive = !(_panner->mono()) && !(_panner->automation_state() & Play);
774 switch (_panner->nouts()) {
779 for (vector<PannerBar*>::iterator i = pan_bars.begin(); i != pan_bars.end(); ++i) {
780 (*i)->set_sensitive (sensitive);
785 twod_panner->set_sensitive (sensitive);
788 big_window->set_sensitive (sensitive);
795 PannerUI::pan_automation_state_button_event (GdkEventButton *ev)
797 using namespace Menu_Helpers;
799 if (ev->type == GDK_BUTTON_RELEASE) {
803 switch (ev->button) {
805 if (pan_astate_menu == 0) {
806 build_astate_menu ();
808 pan_astate_menu->popup (1, ev->time);
818 PannerUI::pan_automation_style_button_event (GdkEventButton *ev)
820 if (ev->type == GDK_BUTTON_RELEASE) {
824 switch (ev->button) {
826 if (pan_astyle_menu == 0) {
827 build_astyle_menu ();
829 pan_astyle_menu->popup (1, ev->time);
838 PannerUI::pan_automation_style_changed ()
840 ENSURE_GUI_THREAD (*this, &PannerUI::pan_automation_style_changed)
844 pan_automation_style_button.set_label (astyle_string(_panner->automation_style()));
847 pan_automation_style_button.set_label (short_astyle_string(_panner->automation_style()));
853 PannerUI::pan_automation_state_changed ()
855 ENSURE_GUI_THREAD (*this, &PannerUI::pan_automation_state_changed)
861 pan_automation_state_button.set_label (astate_string(_panner->automation_state()));
864 pan_automation_state_button.set_label (short_astate_string(_panner->automation_state()));
868 /* when creating a new session, we get to create busses (and
869 sometimes tracks) with no outputs by the time they get
873 if (_panner->empty()) {
877 x = (_panner->streampanner(0).pan_control()->alist()->automation_state() != Off);
879 if (pan_automation_state_button.get_active() != x) {
880 ignore_toggle = true;
881 pan_automation_state_button.set_active (x);
882 ignore_toggle = false;
885 update_pan_sensitive ();
887 /* start watching automation so that things move */
889 pan_watching.disconnect();
892 pan_watching = ARDOUR_UI::RapidScreenUpdate.connect (sigc::mem_fun (*this, &PannerUI::effective_pan_display));
897 PannerUI::astate_string (AutoState state)
899 return _astate_string (state, false);
903 PannerUI::short_astate_string (AutoState state)
905 return _astate_string (state, true);
909 PannerUI::_astate_string (AutoState state, bool shrt)
915 sstr = (shrt ? "M" : _("M"));
918 sstr = (shrt ? "P" : _("P"));
921 sstr = (shrt ? "T" : _("T"));
924 sstr = (shrt ? "W" : _("W"));
932 PannerUI::astyle_string (AutoStyle style)
934 return _astyle_string (style, false);
938 PannerUI::short_astyle_string (AutoStyle style)
940 return _astyle_string (style, true);
944 PannerUI::_astyle_string (AutoStyle style, bool shrt)
949 /* XXX it might different in different languages */
951 return (shrt ? _("Abs") : _("Abs"));
956 PannerUI::set_mono (bool yn)
958 _panner->set_mono (yn);
959 update_pan_sensitive ();
964 PannerUI::connect_to_pan_control (uint32_t i)
966 _panner->pan_control(i)->Changed.connect (
967 _pan_control_connections, invalidator (*this), boost::bind (&PannerUI::pan_value_changed, this, i), gui_context ()
972 PannerUI::bar_spinner_activate (bool a)
974 _bar_spinner_active = a;
978 PannerUI::setup_slider_pix ()
980 _poswidth_slider = ::get_icon ("fader_belt_h_thin");
981 assert (_poswidth_slider);
985 PannerUI::show_width ()
987 float const value = _panner->width_control()->get_value ();
989 if (_width_adjustment.get_value() != value) {
990 _ignore_width_change = true;
991 _width_adjustment.set_value (value);
992 _ignore_width_change = false;
997 PannerUI::width_adjusted ()
999 if (_ignore_width_change) {
1003 _panner->width_control()->set_value (_width_adjustment.get_value());
1007 PannerUI::show_position ()
1009 float const value = _panner->direction_control()->get_value ();
1011 if (_position_adjustment.get_value() != value) {
1012 _ignore_position_change = true;
1013 _position_adjustment.set_value (value);
1014 _ignore_position_change = false;
1019 PannerUI::position_adjusted ()
1021 if (_ignore_position_change) {
1025 _panner->direction_control()->set_value (_position_adjustment.get_value());