diff options
Diffstat (limited to 'src/gui/Controls.hpp')
-rw-r--r-- | src/gui/Controls.hpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/gui/Controls.hpp b/src/gui/Controls.hpp index d83a0bff..d85afffc 100644 --- a/src/gui/Controls.hpp +++ b/src/gui/Controls.hpp @@ -1,15 +1,15 @@ /* This file is part of Ingen. * Copyright (C) 2007 Dave Robillard <http://drobilla.net> - * + * * Ingen is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. - * + * * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * + * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -42,25 +42,25 @@ class Control : public Gtk::VBox public: Control(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml); virtual ~Control(); - + virtual void init(ControlPanel* panel, SharedPtr<Client::PortModel> pm); - + virtual void enable() = 0; virtual void disable() = 0; - + inline const SharedPtr<Client::PortModel> port_model() const { return _port_model; } protected: virtual void set_value(const Raul::Atom& value) = 0; virtual void set_range(float min, float max) {} - + void menu_properties(); ControlPanel* _control_panel; SharedPtr<Client::PortModel> _port_model; sigc::connection _control_connection; bool _enable_signal; - + Gtk::Menu* _menu; Gtk::MenuItem* _menu_properties; }; @@ -78,7 +78,7 @@ public: void enable(); void disable(); - + void set_min(float val); void set_max(float val); @@ -86,18 +86,18 @@ private: void set_name(const std::string& name); void set_value(const Raul::Atom& value); void set_range(float min, float max); - + void port_variable_change(const Raul::URI& key, const Raul::Atom& value); void update_range(); void update_value_from_slider(); void update_value_from_spinner(); - + bool slider_pressed(GdkEvent* ev); bool clicked(GdkEventButton* ev); bool _enabled; - + Gtk::Label* _name_label; Gtk::SpinButton* _value_spinner; Gtk::HScale* _slider; @@ -107,23 +107,23 @@ private: #if 0 /** A spinbutton for integer controls. - * + * * \ingroup GUI */ class IntegerControl : public Control { public: IntegerControl(ControlPanel* panel, SharedPtr<PortModel> pm); - + void enable(); void disable(); - + private: void set_name(const string& name); void set_value(float val); void update_value(); - + bool _enable_signal; Gtk::Alignment _alignment; Gtk::Label _name_label; @@ -133,25 +133,25 @@ private: /** A radio button for toggle controls. - * + * * \ingroup GUI */ class ToggleControl : public Control { public: ToggleControl(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml); - + void init(ControlPanel* panel, SharedPtr<Client::PortModel> pm); - + void enable(); void disable(); - + private: void set_name(const std::string& name); void set_value(const Raul::Atom& value); void toggled(); - + Gtk::Label* _name_label; Gtk::CheckButton* _checkbutton; }; |