#ifndef __gtk_ardour_option_editor_h__
#define __gtk_ardour_option_editor_h__
-#include <gtkmm/notebook.h>
#include <gtkmm/checkbutton.h>
#include <gtkmm/comboboxtext.h>
+#include <gtkmm/filechooserbutton.h>
+#include <gtkmm/label.h>
+#include <gtkmm/notebook.h>
+#include <gtkmm/scale.h>
#include <gtkmm/spinbutton.h>
#include <gtkmm/table.h>
+#include <gtkmm/treestore.h>
+#include <gtkmm/treeview.h>
#include <gtkmm/window.h>
-#include "gtkmm2ext/slider_controller.h"
+#include "widgets/slider_controller.h"
+#include "actions.h"
#include "ardour_window.h"
#include "audio_clock.h"
#include "ardour/types.h"
std::string _name;
};
+/** Just a Gtk Checkbutton, masquerading as an option component */
+class CheckOption : public OptionEditorComponent , public Gtkmm2ext::Activatable
+{
+public:
+ CheckOption (std::string const &, std::string const &, Glib::RefPtr<Gtk::Action> act );
+ virtual ~CheckOption ();
+ void set_state_from_config () {}
+ void parameter_changed (std::string const &) {}
+ void add_to_page (OptionEditorPage*);
+
+ void set_sensitive (bool yn) {
+ _button->set_sensitive (yn);
+ }
+
+ Gtk::Widget& tip_widget() { return *_button; }
+
+protected:
+ void action_toggled ();
+ void action_sensitivity_changed () {}
+ void action_visibility_changed () {}
+
+ virtual void toggled ();
+
+ Gtk::CheckButton* _button; ///< UI button
+ Gtk::Label* _label; ///< label for button, so we can use markup
+
+private:
+ sigc::connection _callback_connection;
+};
+
/** Component which provides the UI to handle a boolean option using a GTK CheckButton */
class BoolOption : public Option
{
bool on_key_press (GdkEventKey* ev);
Gtk::Adjustment _db_adjustment;
- Gtkmm2ext::HSliderController* _db_slider;
+ ArdourWidgets::HSliderController* _db_slider;
Gtk::Entry _db_display;
Gtk::Label _label;
Gtk::HBox _box;
sigc::slot<bool, ARDOUR::gain_t> _set;
};
+class WidgetOption : public Option
+{
+ public:
+ WidgetOption (std::string const & i, std::string const & n, Gtk::Widget& w);
+
+ void add_to_page (OptionEditorPage*);
+ void parameter_changed (std::string const &) {}
+ void set_state_from_config () {}
+
+ Gtk::Widget& tip_widget() { return *_widget; }
+
+ private:
+ Gtk::Widget* _widget;
+};
+
class ClockOption : public Option
{
public: