diff options
author | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
commit | 198560d5fd499ab14eb4e130ee74e21fa86674a4 (patch) | |
tree | eb7bd2ae2d19b6db2c28c79d1c7663fe5b1f49de /src/gui/NodeModule.hpp | |
parent | 981c7950a6f5fc9f22decaee261556d20b641d5c (diff) | |
download | ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.gz ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.bz2 ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.zip |
Make models const in client code.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3259 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/NodeModule.hpp')
-rw-r--r-- | src/gui/NodeModule.hpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index 95ded490..78a301c5 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -50,22 +50,22 @@ class NodeModule : public FlowCanvas::Module public: static boost::shared_ptr<NodeModule> create ( boost::shared_ptr<PatchCanvas> canvas, - SharedPtr<NodeModel> node, - bool human_names); + SharedPtr<const NodeModel> node, + bool human_names); virtual ~NodeModule(); - boost::shared_ptr<Port> port(boost::shared_ptr<PortModel> model); + boost::shared_ptr<Port> port(boost::shared_ptr<const PortModel> model); - void remove_port(SharedPtr<PortModel> port); + void remove_port(SharedPtr<const PortModel> port); virtual void store_location(); void show_human_names(bool b); - SharedPtr<NodeModel> node() const { return _node; } + SharedPtr<const NodeModel> node() const { return _node; } protected: - NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node); + NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<const NodeModel> node); void on_double_click(GdkEventButton* ev); @@ -78,7 +78,7 @@ protected: void rename(); void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - void add_port(SharedPtr<PortModel> port, bool resize=true); + void add_port(SharedPtr<const PortModel> port, bool resize=true); void value_changed(uint32_t index, const Raul::Atom& value); void plugin_changed(); @@ -86,11 +86,11 @@ protected: void create_menu(); - SharedPtr<NodeModel> _node; - NodeMenu* _menu; - SharedPtr<PluginUI> _plugin_ui; - Gtk::Widget* _gui_widget; - Gtk::Window* _gui_window; ///< iff popped up + SharedPtr<const NodeModel> _node; + NodeMenu* _menu; + SharedPtr<PluginUI> _plugin_ui; + Gtk::Widget* _gui_widget; + Gtk::Window* _gui_window; ///< iff popped up }; } // namespace GUI |