diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-10 23:28:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-10 23:28:07 +0000 |
commit | 1a530550196050dfe4a67732965ae3ddc3e1b077 (patch) | |
tree | f2f7692e22eb276673541cc4901733f55a78d3a4 /gtk2_ardour/option_editor.h | |
parent | 71b7326576c773a14300fad7564c4f24d9c23c04 (diff) |
add the notion of a "tip widget" for all option editor elements, allowing us to add tooltips to each item; add one such proto-tool-tip
git-svn-id: svn://localhost/ardour2/branches/3.0@13236 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/option_editor.h')
-rw-r--r-- | gtk2_ardour/option_editor.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h index b896411a71..3e64e4f125 100644 --- a/gtk2_ardour/option_editor.h +++ b/gtk2_ardour/option_editor.h @@ -74,6 +74,8 @@ public: void set_note (std::string const &); + virtual Gtk::Widget& tip_widget() = 0; + private: void maybe_add_note (OptionEditorPage *, int); @@ -90,6 +92,8 @@ public: void set_state_from_config () {} void add_to_page (OptionEditorPage *); + Gtk::Widget& tip_widget() { return *_label; } + private: Gtk::Label* _label; ///< the label used for the heading }; @@ -110,6 +114,8 @@ public: void set_state_from_config () = 0; void add_to_page (OptionEditorPage *); + Gtk::Widget& tip_widget() { return *_box->children().front().get_widget(); } + protected: Gtk::VBox* _box; ///< constituent box for subclasses to add widgets to @@ -163,6 +169,8 @@ public: _button->set_sensitive (yn); } + Gtk::Widget& tip_widget() { return *_button; } + private: void toggled (); @@ -181,6 +189,8 @@ public: void set_state_from_config (); void add_to_page (OptionEditorPage*); + Gtk::Widget& tip_widget() { return *_entry; } + private: void activated (); @@ -263,6 +273,8 @@ public: _combo->set_sensitive (yn); } + Gtk::Widget& tip_widget() { return *_combo; } + private: sigc::slot<T> _get; @@ -294,6 +306,8 @@ public: void changed (); void set_sensitive (bool); + Gtk::Widget& tip_widget() { return *_combo; } + private: sigc::slot<bool> _get; @@ -370,6 +384,8 @@ public: _set (static_cast<T> (_spin->get_value ()) * _scale); } + Gtk::Widget& tip_widget() { return *_spin; } + private: sigc::slot<T> _get; sigc::slot<bool, T> _set; @@ -387,6 +403,8 @@ public: void set_state_from_config (); void add_to_page (OptionEditorPage *); + Gtk::Widget& tip_widget() { return *_db_slider; } + private: void db_changed (); @@ -410,6 +428,8 @@ public: void add_to_page (OptionEditorPage *); void set_session (ARDOUR::Session *); + Gtk::Widget& tip_widget() { return _clock; } + private: Gtk::Label _label; AudioClock _clock; @@ -425,6 +445,8 @@ public: void set_state_from_config (); void add_to_page (OptionEditorPage *); + Gtk::Widget& tip_widget() { return _file_chooser; } + private: void file_set (); void current_folder_set (); |