2019-05-18 07:31:24 -04:00
|
|
|
/*
|
2019-08-03 08:34:29 -04:00
|
|
|
* Copyright (C) 2019 Johannes Mueller <github@johannes-mueller.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2019-05-18 07:31:24 -04:00
|
|
|
|
|
|
|
#ifndef ardour_contourdesign_button_config_widget_h
|
|
|
|
#define ardour_contourdesign_button_config_widget_h
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/radiobutton.h>
|
|
|
|
#include <gtkmm/combobox.h>
|
|
|
|
#include <gtkmm/treestore.h>
|
|
|
|
|
|
|
|
#include "contourdesign.h"
|
|
|
|
#include "jump_distance_widget.h"
|
|
|
|
|
2019-05-19 10:43:48 -04:00
|
|
|
namespace ActionManager
|
|
|
|
{
|
2019-05-18 07:31:24 -04:00
|
|
|
class ActionModel;
|
2019-05-19 10:43:48 -04:00
|
|
|
}
|
2019-05-18 07:31:24 -04:00
|
|
|
|
|
|
|
namespace ArdourSurface
|
|
|
|
{
|
|
|
|
class ButtonConfigWidget : public Gtk::HBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ButtonConfigWidget ();
|
|
|
|
~ButtonConfigWidget () {};
|
|
|
|
|
|
|
|
void set_current_config (boost::shared_ptr<ButtonBase> btn_cnf);
|
|
|
|
boost::shared_ptr<ButtonBase> get_current_config (ContourDesignControlProtocol& ccp) const;
|
|
|
|
|
|
|
|
sigc::signal<void> Changed;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void set_current_action (std::string action_string);
|
|
|
|
void set_jump_distance (JumpDistance dist);
|
|
|
|
|
|
|
|
Gtk::RadioButton _choice_jump;
|
|
|
|
Gtk::RadioButton _choice_action;
|
|
|
|
|
|
|
|
void update_choice ();
|
|
|
|
void update_config ();
|
|
|
|
|
|
|
|
bool find_action_in_model (const Gtk::TreeModel::iterator& iter, std::string const& action_path, Gtk::TreeModel::iterator* found);
|
|
|
|
|
|
|
|
JumpDistanceWidget _jump_distance;
|
|
|
|
Gtk::ComboBox _action_cb;
|
|
|
|
|
2019-05-19 10:43:48 -04:00
|
|
|
const ActionManager::ActionModel& _action_model;
|
2019-05-18 07:31:24 -04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* ardour_contourdesign_button_config_widget_h */
|