20 #ifndef __gtk_ardour_option_editor_h__
21 #define __gtk_ardour_option_editor_h__
23 #include <gtkmm/notebook.h>
24 #include <gtkmm/checkbutton.h>
25 #include <gtkmm/comboboxtext.h>
26 #include <gtkmm/spinbutton.h>
27 #include <gtkmm/table.h>
109 _box = Gtk::manage (
new Gtk::VBox);
110 _box->set_spacing (4);
133 std::string
const & n
149 std::string
id ()
const {
164 BoolOption (std::string
const &, std::string
const &, sigc::slot<bool>, sigc::slot<bool, bool>);
187 RouteDisplayBoolOption (std::string
const &, std::string
const &, sigc::slot<bool>, sigc::slot<bool, bool>);
214 EntryOption (std::string
const &, std::string
const &, sigc::slot<std::string>, sigc::slot<bool, std::string>);
229 sigc::slot<bool, std::string>
_set;
251 std::string
const & i,
252 std::string
const & n,
254 sigc::slot<bool, T> s
260 _label = Gtk::manage (
new Gtk::Label (n +
":"));
261 _label->set_alignment (0, 0.5);
262 _combo = Gtk::manage (
new Gtk::ComboBoxText);
286 void add (T e, std::string
const & o) {
297 uint32_t
const r =
_combo->get_active_row_number ();
304 _combo->set_sensitive (yn);
332 std::string
const & i,
333 std::string
const & n,
338 _label = Gtk::manage (
new Gtk::Label (n +
":"));
339 _label->set_alignment (0, 0.5);
340 _hscale = Gtk::manage (
new Gtk::HScale(adj));
345 std::string
const & i,
346 std::string
const & n,
347 Gtk::Adjustment *adj,
349 sigc::slot<bool, float> s
356 _label = Gtk::manage (
new Gtk::Label (n +
":"));
357 _label->set_alignment (0, 0.5);
404 std::string
const & i,
405 std::string
const & n,
406 sigc::slot<std::string> g,
407 sigc::slot<bool, std::string> s
413 _label = Gtk::manage (
new Gtk::Label (n +
":"));
414 _label->set_alignment (0, 0.5);
415 _combo = Gtk::manage (
new Gtk::ComboBoxText);
433 for (std::vector<std::string>::const_iterator i = strings.begin(); i != strings.end(); ++i) {
447 _combo->set_sensitive (yn);
454 sigc::slot<bool, std::string>
_set;
473 sigc::slot<bool, bool>
512 std::string
const & i,
513 std::string
const & n,
515 sigc::slot<bool, T> s,
520 std::string
const & unit =
"",
529 _label = Gtk::manage (
new Gtk::Label (n +
":"));
530 _label->set_alignment (0, 0.5);
532 _spin = Gtk::manage (
new Gtk::SpinButton);
533 _spin->set_range (min, max);
534 _spin->set_increments (step, page);
535 _spin->set_digits(digits);
537 _box = Gtk::manage (
new Gtk::HBox);
539 _box->set_spacing (4);
541 _box->pack_start (*Gtk::manage (
new Gtk::Label (unit)),
false,
false);
577 FaderOption (std::string
const &, std::string
const &, sigc::slot<ARDOUR::gain_t> g, sigc::slot<bool, ARDOUR::gain_t> s);
592 sigc::slot<ARDOUR::gain_t>
_get;
593 sigc::slot<bool, ARDOUR::gain_t>
_set;
599 ClockOption (std::string
const &, std::string
const &, sigc::slot<std::string>, sigc::slot<bool, std::string>);
612 sigc::slot<bool, std::string>
_set;
619 DirectoryOption (std::string
const &, std::string
const &, sigc::slot<std::string>, sigc::slot<bool, std::string>);
630 sigc::slot<bool, std::string>
_set;
656 void add_page (std::string
const &, Gtk::Widget& page_widget);
671 std::map<std::string, OptionEditorPage*>
_pages;
void set_note(std::string const &)
std::list< OptionEditorComponent * > components
void filter_text(const Glib::ustring &, int *)
virtual void parameter_changed(std::string const &p)=0
void set_popdown_strings(const std::vector< std::string > &strings)
Gtk::Widget & tip_widget()
SpinOption(std::string const &i, std::string const &n, sigc::slot< T > g, sigc::slot< bool, T > s, T min, T max, T step, T page, std::string const &unit="", float scale=1, unsigned digits=0)
void set_state_from_config()=0
Gtk::Widget & tip_widget()
void set_current_page(std::string const &)
void set_sensitive(bool yn)
void add_page(std::string const &, Gtk::Widget &page_widget)
void parameter_changed(std::string const &)
void parameter_changed(std::string const &)=0
Gtk::Widget & tip_widget()
void parameter_changed(std::string const &)
OptionEditorPage(Gtk::Notebook &, std::string const &)
Gtkmm2ext::HSliderController * _db_slider
ComboStringOption(std::string const &i, std::string const &n, sigc::slot< std::string > g, sigc::slot< bool, std::string > s)
void set_state_from_config()
DirectoryOption(std::string const &, std::string const &, sigc::slot< std::string >, sigc::slot< bool, std::string >)
Gtk::CheckButton * _button
UI button.
ClockOption(std::string const &, std::string const &, sigc::slot< std::string >, sigc::slot< bool, std::string >)
Gtk::Widget & tip_widget()
void set_state_from_config()
HSliderOption(std::string const &i, std::string const &n, Gtk::Adjustment *adj, sigc::slot< float > g, sigc::slot< bool, float > s)
std::map< std::string, OptionEditorPage * > _pages
std::vector< T > _options
ComboOption(std::string const &i, std::string const &n, sigc::slot< T > g, sigc::slot< bool, T > s)
FooOption(Gtk::Widget *w)
Gtk::VBox * _box
constituent box for subclasses to add widgets to
Gtk::VBox _fader_centering_box
sigc::slot< bool, std::string > _set
slot to set the configuration variable's value
void add_to_page(OptionEditorPage *p)
sigc::slot< std::string > _get
slot to get the configuration variable's value
sigc::slot< std::string > _get
sigc::slot< bool, T > _set
void set_state_from_config()
void set_sensitive(bool yn)
Gtk::Widget & tip_widget()
virtual void parameter_changed(std::string const &)
sigc::slot< bool, std::string > _set
slot to set the configuration variable's value
void add_to_page(OptionEditorPage *)
Gtk::Widget & tip_widget()
virtual Gtk::Widget & tip_widget()=0
void set_state_from_config()
Gtk::FileChooserButton _file_chooser
sigc::slot< bool, T > _set
ARDOUR::Session * _session
void add_to_page(OptionEditorPage *p)
Gtk::Widget & tip_widget()
Gtk::Widget & tip_widget()
PBD::ScopedConnection config_connection
void add_to_page(OptionEditorPage *p)
void maybe_add_note(OptionEditorPage *, int)
sigc::slot< ARDOUR::gain_t > _get
Gtk::Label * _label
the label used for the heading
void set_invalid_chars(std::string i)
Gtk::Widget & tip_widget()
void add_option(std::string const &, OptionEditorComponent *)
LIBPBD_API uint64_t Configuration
Gtk::Widget & tip_widget()
void add_to_page(OptionEditorPage *p)
void add_widget_to_page(OptionEditorPage *, Gtk::Widget *)
Gtk::Entry * _entry
UI entry.
void add(T e, std::string const &o)
void set_state_from_config()
virtual ~OptionEditorComponent()
sigc::slot< std::string > _get
void set_state_from_config()
BoolComboOption(std::string const &, std::string const &, std::string const &, std::string const &, sigc::slot< bool >, sigc::slot< bool, bool >)
void set_state_from_config()
void set_session(ARDOUR::Session *)
void add_to_page(OptionEditorPage *)
sigc::slot< bool, bool > _set
void set_state_from_config()
Gtk::Widget & tip_widget()
Gtk::ComboBoxText * _combo
virtual void add_to_page(OptionEditorPage *)=0
sigc::slot< bool, std::string > _set
void set_state_from_config()
BoolOption(std::string const &, std::string const &, sigc::slot< bool >, sigc::slot< bool, bool >)
void add_widgets_to_page(OptionEditorPage *, Gtk::Widget *, Gtk::Widget *)
RouteDisplayBoolOption(std::string const &, std::string const &, sigc::slot< bool >, sigc::slot< bool, bool >)
void set_sensitive(bool yn)
virtual void set_state_from_config()=0
void set_state_from_config()
virtual void add_to_page(OptionEditorPage *)=0
sigc::slot< bool, std::string > _set
void parameter_changed(std::string const &p)
Gtk::Label * _label
label for button, so we can use markup
EntryOption(std::string const &, std::string const &, sigc::slot< std::string >, sigc::slot< bool, std::string >)
void add_to_page(OptionEditorPage *)
Gtk::Adjustment _db_adjustment
void set_state_from_config()
void add_to_page(OptionEditorPage *p)
FaderOption(std::string const &, std::string const &, sigc::slot< ARDOUR::gain_t > g, sigc::slot< bool, ARDOUR::gain_t > s)
Gtk::ComboBoxText * _combo
sigc::slot< bool, ARDOUR::gain_t > _set
Gtk::Widget & tip_widget()
Gtk::ComboBoxText * _combo
sigc::slot< std::string > _get
slot to get the configuration variable's value
virtual void set_state_from_config()=0
void set_state_from_config()
Gtk::Widget & tip_widget()
OptionEditor(PBD::Configuration *, std::string const &)
Gtk::Label * _label
UI label.
OptionEditorHeading(std::string const &)
void add_to_page(OptionEditorPage *)
void set_sensitive(bool yn)
void add_to_page(OptionEditorPage *)
void add_to_page(OptionEditorPage *)
void add_to_page(OptionEditorPage *)
bool focus_out(GdkEventFocus *)
sigc::slot< bool, bool > _set
slot to set the configuration variable's value
Option(std::string const &i, std::string const &n)
PBD::Configuration * _config
sigc::slot< bool > _get
slot to get the configuration variable's value
sigc::slot< bool, float > _set
HSliderOption(std::string const &i, std::string const &n, Gtk::Adjustment &adj)
void add_to_page(OptionEditorPage *)