1 /*
2  * Copyright (C) 2019 Johannes Mueller <github@johannes-mueller.org>
3  *
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.
8  *
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.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef ardour_contourdesign_jump_distance_widget_h
20 #define ardour_contourdesign_jump_distance_widget_h
21 
22 #include <gtkmm/comboboxtext.h>
23 #include <gtkmm/box.h>
24 #include <gtkmm/adjustment.h>
25 
26 #include "pbd/signals.h"
27 
28 #include "contourdesign.h"
29 
30 namespace ArdourSurface
31 {
32 
33 class JumpDistanceWidget : public Gtk::HBox
34 {
35 public:
36 	JumpDistanceWidget (JumpDistance dist);
~JumpDistanceWidget()37 	~JumpDistanceWidget () {}
38 
get_distance()39 	JumpDistance get_distance () const { return _distance; }
40 	void set_distance (JumpDistance dist);
41 
42 	sigc::signal<void> Changed;
43 
44 private:
45 	JumpDistance _distance;
46 
47 	void update_value ();
48 	void update_unit ();
49 
50 	Gtk::Adjustment _value_adj;
51 	Gtk::ComboBoxText _unit_cb;
52 };
53 
54 } /* namespace */
55 
56 #endif  /* ardour_contourdesign_jump_distance_widget_h */
57