Ardour  9.0-pre0-582-g084a23a80d
button_config_widget.h
Go to the documentation of this file.
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_button_config_widget_h
20 #define ardour_contourdesign_button_config_widget_h
21 
22 #include <gtkmm/box.h>
23 #include <gtkmm/radiobutton.h>
24 #include <gtkmm/combobox.h>
25 #include <gtkmm/treestore.h>
26 
27 #include "contourdesign.h"
28 #include "jump_distance_widget.h"
29 
30 namespace ActionManager
31 {
32 class ActionModel;
33 }
34 
35 namespace ArdourSurface
36 {
38 {
39 public:
42 
43  void set_current_config (std::shared_ptr<ButtonBase> btn_cnf);
44  std::shared_ptr<ButtonBase> get_current_config (ContourDesignControlProtocol& ccp) const;
45 
46  sigc::signal<void> Changed;
47 
48 private:
49  void set_current_action (std::string action_string);
51 
54 
55  void update_choice ();
56  void update_config ();
57 
58  bool find_action_in_model (const Gtk::TreeModel::iterator& iter, std::string const& action_path, Gtk::TreeModel::iterator* found);
59 
62 
64 };
65 }
66 
67 #endif /* ardour_contourdesign_button_config_widget_h */
void set_current_config(std::shared_ptr< ButtonBase > btn_cnf)
void set_jump_distance(JumpDistance dist)
std::shared_ptr< ButtonBase > get_current_config(ContourDesignControlProtocol &ccp) const
const ActionManager::ActionModel & _action_model
void set_current_action(std::string action_string)
bool find_action_in_model(const Gtk::TreeModel::iterator &iter, std::string const &action_path, Gtk::TreeModel::iterator *found)