From da849d4bbe24793b650a80fdb00ce87c1c94517f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 6 Jun 2007 02:51:08 +0000 Subject: Nicer Flowcanvas naming. git-svn-id: http://svn.drobilla.net/lad/ingen@529 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/Connection.h | 10 +++++----- src/libs/gui/NodeModule.cpp | 4 ++-- src/libs/gui/NodeModule.h | 2 +- src/libs/gui/PatchCanvas.cpp | 34 +++++++++++++++++----------------- src/libs/gui/PatchCanvas.h | 22 +++++++++++----------- src/libs/gui/PatchPortModule.cpp | 2 +- src/libs/gui/PatchPortModule.h | 2 +- src/libs/gui/PatchView.cpp | 4 ++-- src/libs/gui/Port.cpp | 4 ++-- src/libs/gui/Port.h | 4 ++-- 10 files changed, 44 insertions(+), 44 deletions(-) (limited to 'src/libs') diff --git a/src/libs/gui/Connection.h b/src/libs/gui/Connection.h index d4d5c10c..75c988ac 100644 --- a/src/libs/gui/Connection.h +++ b/src/libs/gui/Connection.h @@ -33,15 +33,15 @@ namespace GUI { * * \ingroup GUI */ -class Connection : public LibFlowCanvas::Connection +class Connection : public FlowCanvas::Connection { public: - Connection(boost::shared_ptr canvas, + Connection(boost::shared_ptr canvas, boost::shared_ptr model, - boost::shared_ptr src, - boost::shared_ptr dst, + boost::shared_ptr src, + boost::shared_ptr dst, uint32_t color) - : LibFlowCanvas::Connection(canvas, src, dst, color) + : FlowCanvas::Connection(canvas, src, dst, color) , _connection_model(model) {} diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index 3c80f5e2..188e3a42 100644 --- a/src/libs/gui/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -36,7 +36,7 @@ namespace GUI { NodeModule::NodeModule(boost::shared_ptr canvas, SharedPtr node) -: LibFlowCanvas::Module(canvas, node->path().name()), +: FlowCanvas::Module(canvas, node->path().name()), _node(node), _menu(node) { @@ -102,7 +102,7 @@ NodeModule::add_port(SharedPtr port, bool resize_to_fit) void NodeModule::remove_port(SharedPtr port) { - SharedPtr p = Module::remove_port(port->path().name()); + SharedPtr p = Module::remove_port(port->path().name()); p.reset(); } diff --git a/src/libs/gui/NodeModule.h b/src/libs/gui/NodeModule.h index 8e88b34c..66a46503 100644 --- a/src/libs/gui/NodeModule.h +++ b/src/libs/gui/NodeModule.h @@ -48,7 +48,7 @@ class Port; * * \ingroup GUI */ -class NodeModule : public LibFlowCanvas::Module +class NodeModule : public FlowCanvas::Module { public: static boost::shared_ptr create (boost::shared_ptr canvas, SharedPtr node); diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp index 623d0c7c..4808c288 100644 --- a/src/libs/gui/PatchCanvas.cpp +++ b/src/libs/gui/PatchCanvas.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include "interface/EngineInterface.h" #include "client/PluginModel.h" #include "client/PatchModel.h" @@ -46,7 +46,7 @@ namespace GUI { PatchCanvas::PatchCanvas(SharedPtr patch, int width, int height) -: FlowCanvas(width, height), +:Canvas(width, height), _patch(patch), _last_click_x(0), _last_click_y(0) @@ -186,7 +186,7 @@ PatchCanvas::build() void PatchCanvas::arrange() { - LibFlowCanvas::FlowCanvas::arrange(); + FlowCanvas::Canvas::arrange(); for (list >::iterator i = _items.begin(); i != _items.end(); ++i) (*i)->store_location(); @@ -249,17 +249,17 @@ PatchCanvas::remove_port(SharedPtr pm) } -SharedPtr +SharedPtr PatchCanvas::get_port_view(SharedPtr port) { - SharedPtr ret; - SharedPtr module = _views[port]; + SharedPtr ret; + SharedPtr module = _views[port]; // Port on this patch if (module) { ret = (PtrCast(module)) ? *(PtrCast(module)->ports().begin()) - : PtrCast(module); + : PtrCast(module); } else { module = PtrCast(_views[port->parent()]); if (module) @@ -273,8 +273,8 @@ PatchCanvas::get_port_view(SharedPtr port) void PatchCanvas::connection(SharedPtr cm) { - const SharedPtr src = get_port_view(cm->src_port()); - const SharedPtr dst = get_port_view(cm->dst_port()); + const SharedPtr src = get_port_view(cm->src_port()); + const SharedPtr dst = get_port_view(cm->dst_port()); if (src && dst) add_connection(boost::shared_ptr(new Connection(shared_from_this(), @@ -288,8 +288,8 @@ PatchCanvas::connection(SharedPtr cm) void PatchCanvas::disconnection(SharedPtr cm) { - const SharedPtr src = get_port_view(cm->src_port()); - const SharedPtr dst = get_port_view(cm->dst_port()); + const SharedPtr src = get_port_view(cm->src_port()); + const SharedPtr dst = get_port_view(cm->dst_port()); if (src && dst) remove_connection(src, dst); @@ -300,8 +300,8 @@ PatchCanvas::disconnection(SharedPtr cm) void -PatchCanvas::connect(boost::shared_ptr src_port, - boost::shared_ptr dst_port) +PatchCanvas::connect(boost::shared_ptr src_port, + boost::shared_ptr dst_port) { const boost::shared_ptr src = boost::dynamic_pointer_cast(src_port); @@ -343,8 +343,8 @@ PatchCanvas::connect(boost::shared_ptr src_port, void -PatchCanvas::disconnect(boost::shared_ptr src_port, - boost::shared_ptr dst_port) +PatchCanvas::disconnect(boost::shared_ptr src_port, + boost::shared_ptr dst_port) { const boost::shared_ptr src = boost::dynamic_pointer_cast(src_port); @@ -382,7 +382,7 @@ PatchCanvas::canvas_event(GdkEvent* event) break; } - return FlowCanvas::canvas_event(event); + return Canvas::canvas_event(event); } @@ -420,7 +420,7 @@ PatchCanvas::copy_selection() } } - for (list >::iterator c = _selected_connections.begin(); + for (list >::iterator c = _selected_connections.begin(); c != _selected_connections.end(); ++c) { boost::shared_ptr connection = boost::dynamic_pointer_cast(*c); if (connection) diff --git a/src/libs/gui/PatchCanvas.h b/src/libs/gui/PatchCanvas.h index 8634b7bf..275d6209 100644 --- a/src/libs/gui/PatchCanvas.h +++ b/src/libs/gui/PatchCanvas.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,9 +30,9 @@ #include "NodeModule.h" using std::string; -using namespace LibFlowCanvas; +using namespace FlowCanvas; -using LibFlowCanvas::Port; +using FlowCanvas::Port; using Ingen::Client::ConnectionModel; using Ingen::Client::PatchModel; using Ingen::Client::NodeModel; @@ -49,7 +49,7 @@ class NodeModule; * * \ingroup GUI */ -class PatchCanvas : public LibFlowCanvas::FlowCanvas +class PatchCanvas : public FlowCanvas::Canvas { public: PatchCanvas(SharedPtr patch, int width, int height); @@ -58,7 +58,7 @@ public: /*boost::shared_ptr find_module(const string& name) { return boost::dynamic_pointer_cast( - FlowCanvas::get_item(name)); + Canvas::get_item(name)); }*/ void build(); @@ -94,17 +94,17 @@ private: bool canvas_event(GdkEvent* event); - SharedPtr get_port_view(SharedPtr port); + SharedPtr get_port_view(SharedPtr port); - void connect(boost::shared_ptr src, - boost::shared_ptr dst); + void connect(boost::shared_ptr src, + boost::shared_ptr dst); - void disconnect(boost::shared_ptr src, - boost::shared_ptr dst); + void disconnect(boost::shared_ptr src, + boost::shared_ptr dst); SharedPtr _patch; - typedef std::map, SharedPtr > Views; + typedef std::map, SharedPtr > Views; Views _views; int _last_click_x; diff --git a/src/libs/gui/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp index 2a812296..6f309324 100644 --- a/src/libs/gui/PatchPortModule.cpp +++ b/src/libs/gui/PatchPortModule.cpp @@ -32,7 +32,7 @@ namespace GUI { PatchPortModule::PatchPortModule(boost::shared_ptr canvas, SharedPtr port) -: LibFlowCanvas::Module(canvas, port->path().name(), 0, 0, false), // FIXME: coords? +: FlowCanvas::Module(canvas, port->path().name(), 0, 0, false), // FIXME: coords? _port(port) { /*if (port_model()->polyphonic() && port_model()->parent() != NULL diff --git a/src/libs/gui/PatchPortModule.h b/src/libs/gui/PatchPortModule.h index c5c01f50..81bc7b53 100644 --- a/src/libs/gui/PatchPortModule.h +++ b/src/libs/gui/PatchPortModule.h @@ -46,7 +46,7 @@ class Port; * * \ingroup GUI */ -class PatchPortModule : public LibFlowCanvas::Module +class PatchPortModule : public FlowCanvas::Module { public: static boost::shared_ptr create(boost::shared_ptr canvas, diff --git a/src/libs/gui/PatchView.cpp b/src/libs/gui/PatchView.cpp index 7b12fe40..fa0d01a0 100644 --- a/src/libs/gui/PatchView.cpp +++ b/src/libs/gui/PatchView.cpp @@ -84,10 +84,10 @@ PatchView::set_patch(SharedPtr patch) _refresh_but->signal_clicked().connect(sigc::mem_fun(this, &PatchView::refresh_clicked)); _zoom_normal_but->signal_clicked().connect(sigc::bind(sigc::mem_fun( - _canvas.get(), &FlowCanvas::set_zoom), 1.0)); + _canvas.get(), &PatchCanvas::set_zoom), 1.0)); _zoom_full_but->signal_clicked().connect( - sigc::mem_fun(_canvas.get(), &FlowCanvas::zoom_full)); + sigc::mem_fun(_canvas.get(), &PatchCanvas::zoom_full)); } diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp index 9b21b8be..a03a60d4 100644 --- a/src/libs/gui/Port.cpp +++ b/src/libs/gui/Port.cpp @@ -34,8 +34,8 @@ namespace GUI { /** @param flip Make an input port appear as an output port, and vice versa. */ -Port::Port(boost::shared_ptr module, SharedPtr pm, bool flip, bool destroyable) -: LibFlowCanvas::Port(module, +Port::Port(boost::shared_ptr module, SharedPtr pm, bool flip, bool destroyable) +: FlowCanvas::Port(module, pm->path().name(), flip ? (!pm->is_input()) : pm->is_input(), App::instance().configuration()->get_port_color(pm.get())), diff --git a/src/libs/gui/Port.h b/src/libs/gui/Port.h index b798cbca..507ced21 100644 --- a/src/libs/gui/Port.h +++ b/src/libs/gui/Port.h @@ -34,10 +34,10 @@ namespace GUI { * * \ingroup GUI */ -class Port : public LibFlowCanvas::Port +class Port : public FlowCanvas::Port { public: - Port(boost::shared_ptr module, SharedPtr pm, bool flip = false, bool destroyable = false); + Port(boost::shared_ptr module, SharedPtr pm, bool flip = false, bool destroyable = false); virtual ~Port() {} -- cgit v1.2.1