summaryrefslogtreecommitdiff
path: root/gtk2_ardour/option_editor.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-23 23:32:36 +0000
committerRobin Gareus <robin@gareus.org>2012-10-23 23:32:36 +0000
commit6f15ec961801599b6a76926f2a4ba6e96c7335e6 (patch)
tree135324f4e27d8143f6d3ab3c639075cdfd418f9f /gtk2_ardour/option_editor.h
parent4600530d50fb31c4ba9f2e76ce258519a336c82a (diff)
LTC generator config
git-svn-id: svn://localhost/ardour2/branches/3.0@13324 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/option_editor.h')
-rw-r--r--gtk2_ardour/option_editor.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index 6ea38648b0..07c11ac8b4 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -285,6 +285,48 @@ private:
};
+/** Component which provides the UI for a GTK HScale.
+ */
+class HSliderOption : public Option
+{
+public:
+
+ /** Construct an ComboOption.
+ * @param i id
+ * @param n User-visible name.
+ * @param g Slot to get the variable's value.
+ * @param s Slot to set the variable's value.
+ */
+ HSliderOption (
+ std::string const & i,
+ std::string const & n,
+ Gtk::Adjustment &adj
+ )
+ : Option (i, n)
+ {
+ _label = manage (new Gtk::Label (n + ":"));
+ _label->set_alignment (0, 0.5);
+ _hscale = manage (new Gtk::HScale(adj));
+ }
+
+ void set_state_from_config () { }
+
+ void add_to_page (OptionEditorPage* p)
+ {
+ add_widgets_to_page (p, _label, _hscale);
+ }
+
+ void set_sensitive (bool yn) {
+ _hscale->set_sensitive (yn);
+ }
+
+ Gtk::Widget& tip_widget() { return *_hscale; }
+
+private:
+ Gtk::Label* _label;
+ Gtk::HScale* _hscale;
+};
+
/** Component which provides the UI to handle an enumerated option using a GTK ComboBox.
* The template parameter is the enumeration.
*/