diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-26 21:24:17 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-03-26 21:24:17 +0000 |
commit | 316fca72dbad5bae530816714de52eadc9d7f243 (patch) | |
tree | 91787da195c44cdce57587b00d2c17b328bcaabe /libs/gtkmm2ext/gtkmm2ext | |
parent | ac5bbf4b99635a71093f859e233ad5fe4b07453b (diff) |
lots of work to hide prelight from most buttons, etc. etc. etc; increase range of solo boost knob; theme RC files changes need propagating to the light theme, sigh
git-svn-id: svn://localhost/ardour2/branches/3.0@6799 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/stateful_button.h | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h index 1ba8ddf6f5..b69dba83fc 100644 --- a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/stateful_button.h @@ -40,42 +40,52 @@ class StateButton int visual_state; bool _self_managed; bool _is_realized; + bool style_changing; + Gtk::StateType state_before_prelight; + bool is_toggle; - virtual std::string get_widget_name() const = 0; - virtual void set_widget_name (const std::string&) = 0; - virtual int get_widget_state() = 0; + virtual std::string get_widget_name() const = 0; + virtual void set_widget_name (const std::string& name) = 0; + virtual Gtk::Widget* get_child_widget () = 0; + + void avoid_prelight_on_style_changed (const Glib::RefPtr<Gtk::Style>& style, GtkWidget* widget); + void avoid_prelight_on_state_changed (Gtk::StateType old_state, GtkWidget* widget); }; class StatefulToggleButton : public StateButton, public Gtk::ToggleButton { public: - StatefulToggleButton() {} - explicit StatefulToggleButton(const std::string &label) : Gtk::ToggleButton (label) {} + StatefulToggleButton(); + explicit StatefulToggleButton(const std::string &label); ~StatefulToggleButton() {} protected: void on_realize (); void on_toggled (); + void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); + void on_state_changed (Gtk::StateType old_state); + Gtk::Widget* get_child_widget (); std::string get_widget_name() const { return get_name(); } void set_widget_name (const std::string& name); - int get_widget_state() { return get_state(); } }; class StatefulButton : public StateButton, public Gtk::Button { public: - StatefulButton() {} - explicit StatefulButton(const std::string &label) : Gtk::Button (label) {} + StatefulButton(); + explicit StatefulButton(const std::string &label); virtual ~StatefulButton() {} - + protected: void on_realize (); - + void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); + void on_state_changed (Gtk::StateType old_state); + + Gtk::Widget* get_child_widget (); std::string get_widget_name() const { return get_name(); } void set_widget_name (const std::string& name); - int get_widget_state() { return get_state(); } }; }; |