add a special bool option that prevents redrawing
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "ardour/dB.h"
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "public_editor.h"
|
||||
#include "option_editor.h"
|
||||
#include "gui_thread.h"
|
||||
#include "i18n.h"
|
||||
@@ -139,6 +140,18 @@ BoolOption::toggled ()
|
||||
_set (_button->get_active ());
|
||||
}
|
||||
|
||||
RouteDisplayBoolOption::RouteDisplayBoolOption (string const & i, string const & n, sigc::slot<bool> g, sigc::slot<bool, bool> s)
|
||||
: BoolOption (i, n, g, s)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
RouteDisplayBoolOption::toggled ()
|
||||
{
|
||||
DisplaySuspender ds;
|
||||
BoolOption::toggled ();
|
||||
}
|
||||
|
||||
EntryOption::EntryOption (string const & i, string const & n, sigc::slot<string> g, sigc::slot<bool, string> s)
|
||||
: Option (i, n),
|
||||
_get (g),
|
||||
|
||||
@@ -169,11 +169,11 @@ public:
|
||||
_button->set_sensitive (yn);
|
||||
}
|
||||
|
||||
Gtk::Widget& tip_widget() { return *_button; }
|
||||
Gtk::Widget& tip_widget() { return *_button; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
|
||||
void toggled ();
|
||||
virtual void toggled ();
|
||||
|
||||
sigc::slot<bool> _get; ///< slot to get the configuration variable's value
|
||||
sigc::slot<bool, bool> _set; ///< slot to set the configuration variable's value
|
||||
@@ -181,6 +181,14 @@ private:
|
||||
Gtk::Label* _label; ///< label for button, so we can use markup
|
||||
};
|
||||
|
||||
class RouteDisplayBoolOption : public BoolOption
|
||||
{
|
||||
public:
|
||||
RouteDisplayBoolOption (std::string const &, std::string const &, sigc::slot<bool>, sigc::slot<bool, bool>);
|
||||
protected:
|
||||
virtual void toggled ();
|
||||
};
|
||||
|
||||
/** Component which allows to add any GTK Widget - intended for single buttons and custom stateless objects */
|
||||
class FooOption : public OptionEditorComponent
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user