diff options
author | David Robillard <d@drobilla.net> | 2011-12-06 21:01:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-06 21:01:38 +0000 |
commit | fd04fe7efcf0434a3c6a35fd2a65c775fb383bd0 (patch) | |
tree | 4c5b8791f19bcda81060077f2880b30ae4cae4b7 /src/gui | |
parent | a5f256cf923d165afd273914a13726d745a59cbc (diff) | |
download | ingen-fd04fe7efcf0434a3c6a35fd2a65c775fb383bd0.tar.gz ingen-fd04fe7efcf0434a3c6a35fd2a65c775fb383bd0.tar.bz2 ingen-fd04fe7efcf0434a3c6a35fd2a65c775fb383bd0.zip |
FlowCanvas's successor is hereby dubbed Ganv.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3820 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/App.cpp | 2 | ||||
-rw-r--r-- | src/gui/Configuration.cpp | 2 | ||||
-rw-r--r-- | src/gui/Connection.cpp | 8 | ||||
-rw-r--r-- | src/gui/Connection.hpp | 10 | ||||
-rw-r--r-- | src/gui/NodeModule.cpp | 6 | ||||
-rw-r--r-- | src/gui/NodeModule.hpp | 4 | ||||
-rw-r--r-- | src/gui/PatchCanvas.cpp | 46 | ||||
-rw-r--r-- | src/gui/PatchCanvas.hpp | 24 | ||||
-rw-r--r-- | src/gui/PatchPortModule.cpp | 2 | ||||
-rw-r--r-- | src/gui/PatchPortModule.hpp | 4 | ||||
-rw-r--r-- | src/gui/PatchView.hpp | 2 | ||||
-rw-r--r-- | src/gui/Port.cpp | 16 | ||||
-rw-r--r-- | src/gui/Port.hpp | 8 | ||||
-rw-r--r-- | src/gui/wscript | 2 |
14 files changed, 67 insertions, 69 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index c93980a1..4ee1fe74 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -23,7 +23,7 @@ #include <gtk/gtkwindow.h> -#include "flowcanvas/Edge.hpp" +#include "ganv/Edge.hpp" #include "ingen/ServerInterface.hpp" #include "ingen/EngineBase.hpp" #include "ingen/client/ClientStore.hpp" diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp index 51eec5bc..3a2ce696 100644 --- a/src/gui/Configuration.cpp +++ b/src/gui/Configuration.cpp @@ -25,7 +25,7 @@ #include "ingen/client/PluginModel.hpp" #include "ingen/serialisation/Parser.hpp" #include "ingen/shared/LV2URIMap.hpp" -#include "flowcanvas/Port.hpp" +#include "ganv/Port.hpp" #include "App.hpp" #include "Port.hpp" diff --git a/src/gui/Connection.cpp b/src/gui/Connection.cpp index 8e6732ff..f5e6c54f 100644 --- a/src/gui/Connection.cpp +++ b/src/gui/Connection.cpp @@ -25,12 +25,12 @@ using namespace std; namespace Ingen { namespace GUI { -Connection::Connection(FlowCanvas::Canvas& canvas, +Connection::Connection(Ganv::Canvas& canvas, boost::shared_ptr<const ConnectionModel> model, - FlowCanvas::Node* src, - FlowCanvas::Node* dst, + Ganv::Node* src, + Ganv::Node* dst, uint32_t color) - : FlowCanvas::Edge(canvas, src, dst, color) + : Ganv::Edge(canvas, src, dst, color) , _connection_model(model) { } diff --git a/src/gui/Connection.hpp b/src/gui/Connection.hpp index bae9f4aa..02427f12 100644 --- a/src/gui/Connection.hpp +++ b/src/gui/Connection.hpp @@ -20,7 +20,7 @@ #include <cassert> #include <string> -#include "flowcanvas/Edge.hpp" +#include "ganv/Edge.hpp" #include "raul/SharedPtr.hpp" namespace Ingen { @@ -34,13 +34,13 @@ namespace GUI { * * \ingroup GUI */ -class Connection : public FlowCanvas::Edge +class Connection : public Ganv::Edge { public: - Connection(FlowCanvas::Canvas& canvas, + Connection(Ganv::Canvas& canvas, boost::shared_ptr<const ConnectionModel> model, - FlowCanvas::Node* src, - FlowCanvas::Node* dst, + Ganv::Node* src, + Ganv::Node* dst, uint32_t color); SharedPtr<const ConnectionModel> model() const { return _connection_model; } diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 497e6a0a..d03119d6 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -45,7 +45,7 @@ namespace GUI { NodeModule::NodeModule(PatchCanvas& canvas, SharedPtr<const NodeModel> node) - : FlowCanvas::Module(canvas, node->path().symbol(), 0, 0, true, canvas.show_port_names()) + : Ganv::Module(canvas, node->path().symbol(), 0, 0, true, canvas.show_port_names()) , _node(node) , _gui_widget(NULL) , _gui_window(NULL) @@ -214,7 +214,7 @@ NodeModule::embed_gui(bool embed) container->set_name("ingen_embedded_node_gui_container"); container->set_border_width(2.0); container->add(*_gui_widget); - FlowCanvas::Module::embed(container); + Ganv::Module::embed(container); } else { error << "Failed to create LV2 UI" << endl; } @@ -230,7 +230,7 @@ NodeModule::embed_gui(bool embed) } else { // un-embed - FlowCanvas::Module::embed(NULL); + Ganv::Module::embed(NULL); _plugin_ui.reset(); for (NodeModel::Ports::const_iterator p = _node->ports().begin(); diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index 8a46f4f9..7197b80a 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -19,7 +19,7 @@ #define INGEN_GUI_NODEMODULE_HPP #include <string> -#include "flowcanvas/Module.hpp" +#include "ganv/Module.hpp" #include "raul/SharedPtr.hpp" #include "Port.hpp" @@ -45,7 +45,7 @@ class NodeMenu; * * \ingroup GUI */ -class NodeModule : public FlowCanvas::Module +class NodeModule : public Ganv::Module { public: static NodeModule* create( diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index a25acac3..a759d94f 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -20,8 +20,8 @@ #include <string> #include <boost/format.hpp> #include "raul/log.hpp" -#include "flowcanvas/Canvas.hpp" -#include "flowcanvas/Circle.hpp" +#include "ganv/Canvas.hpp" +#include "ganv/Circle.hpp" #include "ingen/ServerInterface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/shared/Builder.hpp" @@ -305,11 +305,11 @@ PatchCanvas::build() } static void -show_module_human_names(FlowCanvasNode* node, void* data) +show_module_human_names(GanvNode* node, void* data) { bool b = *(bool*)data; - if (FLOW_CANVAS_IS_MODULE(node)) { - FlowCanvas::Module* module = Glib::wrap(FLOW_CANVAS_MODULE(node)); + if (GANV_IS_MODULE(node)) { + Ganv::Module* module = Glib::wrap(GANV_MODULE(node)); NodeModule* nmod = dynamic_cast<NodeModule*>(module); if (nmod) nmod->show_human_names(b); @@ -333,7 +333,7 @@ PatchCanvas::show_port_names(bool b) #if 0 _show_port_names = b; FOREACH_ITEM(i, items()) { - FlowCanvas::Module* m = dynamic_cast<FlowCanvas::Module*>(*i); + Ganv::Module* m = dynamic_cast<Ganv::Module*>(*i); if (m) m->set_show_port_labels(b); } @@ -445,17 +445,17 @@ PatchCanvas::remove_port(SharedPtr<const PortModel> pm) assert(_views.find(pm) == _views.end()); } -FlowCanvas::Port* +Ganv::Port* PatchCanvas::get_port_view(SharedPtr<PortModel> port) { - FlowCanvas::Module* module = _views[port]; + Ganv::Module* module = _views[port]; // Port on this patch if (module) { PatchPortModule* ppm = dynamic_cast<PatchPortModule*>(module); return ppm ? *ppm->begin() - : dynamic_cast<FlowCanvas::Port*>(module); + : dynamic_cast<Ganv::Port*>(module); } else { module = dynamic_cast<NodeModule*>(_views[port->parent()]); if (module) { @@ -476,8 +476,8 @@ PatchCanvas::connection(SharedPtr<const ConnectionModel> cm) { assert(cm); - FlowCanvas::Port* const src = get_port_view(cm->src_port()); - FlowCanvas::Port* const dst = get_port_view(cm->dst_port()); + Ganv::Port* const src = get_port_view(cm->src_port()); + Ganv::Port* const dst = get_port_view(cm->dst_port()); if (src && dst) { new GUI::Connection(*this, cm, src, dst, @@ -491,8 +491,8 @@ PatchCanvas::connection(SharedPtr<const ConnectionModel> cm) void PatchCanvas::disconnection(SharedPtr<const ConnectionModel> cm) { - FlowCanvas::Port* const src = get_port_view(cm->src_port()); - FlowCanvas::Port* const dst = get_port_view(cm->dst_port()); + Ganv::Port* const src = get_port_view(cm->src_port()); + Ganv::Port* const dst = get_port_view(cm->dst_port()); if (src && dst) remove_edge(src, dst); @@ -502,8 +502,8 @@ PatchCanvas::disconnection(SharedPtr<const ConnectionModel> cm) } void -PatchCanvas::connect(FlowCanvas::Node* src_port, - FlowCanvas::Node* dst_port) +PatchCanvas::connect(Ganv::Node* src_port, + Ganv::Node* dst_port) { const Ingen::GUI::Port* const src = dynamic_cast<Ingen::GUI::Port*>(src_port); @@ -518,8 +518,8 @@ PatchCanvas::connect(FlowCanvas::Node* src_port, } void -PatchCanvas::disconnect(FlowCanvas::Node* src_port, - FlowCanvas::Node* dst_port) +PatchCanvas::disconnect(Ganv::Node* src_port, + Ganv::Node* dst_port) { const Ingen::GUI::Port* const src = dynamic_cast<Ingen::GUI::Port*>(src_port); @@ -606,19 +606,19 @@ PatchCanvas::clear_selection() win->hide_documentation(); } - FlowCanvas::Canvas::clear_selection(); + Ganv::Canvas::clear_selection(); } static void -destroy_module(FlowCanvasNode* node, void* data) +destroy_module(GanvNode* node, void* data) { - if (!FLOW_CANVAS_IS_MODULE(node)) { + if (!GANV_IS_MODULE(node)) { return; } - App* app = (App*)data; - FlowCanvas::Module* module = Glib::wrap(FLOW_CANVAS_MODULE(node)); - NodeModule* node_module = dynamic_cast<NodeModule*>(module); + App* app = (App*)data; + Ganv::Module* module = Glib::wrap(GANV_MODULE(node)); + NodeModule* node_module = dynamic_cast<NodeModule*>(module); if (node_module) { app->engine()->del(node_module->node()->path()); diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp index 6da98b85..98ee3776 100644 --- a/src/gui/PatchCanvas.hpp +++ b/src/gui/PatchCanvas.hpp @@ -26,8 +26,8 @@ #include "lilv/lilv.h" -#include "flowcanvas/Canvas.hpp" -#include "flowcanvas/Module.hpp" +#include "ganv/Canvas.hpp" +#include "ganv/Module.hpp" #include "raul/SharedPtr.hpp" #include "raul/Path.hpp" @@ -35,11 +35,11 @@ #include "ingen/GraphObject.hpp" #include "NodeModule.hpp" -using namespace FlowCanvas; +using namespace Ganv; using namespace Ingen::Shared; using std::string; -using FlowCanvas::Port; +using Ganv::Port; using Ingen::Client::ConnectionModel; using Ingen::Client::NodeModel; using Ingen::Client::PortModel; @@ -57,7 +57,7 @@ class NodeModule; * * \ingroup GUI */ -class PatchCanvas : public FlowCanvas::Canvas +class PatchCanvas : public Ganv::Canvas { public: PatchCanvas(App& app, @@ -128,20 +128,18 @@ private: GraphObject::Properties get_initial_data(Resource::Graph ctx=Resource::DEFAULT); - FlowCanvas::Port* get_port_view(SharedPtr<PortModel> port); + Ganv::Port* get_port_view(SharedPtr<PortModel> port); - void connect(FlowCanvas::Node* src, - FlowCanvas::Node* dst); + void connect(Ganv::Node* src, + Ganv::Node* dst); - void disconnect(FlowCanvas::Node* src, - FlowCanvas::Node* dst); + void disconnect(Ganv::Node* src, + Ganv::Node* dst); App& _app; SharedPtr<const PatchModel> _patch; - typedef std::map<SharedPtr<const ObjectModel>, - FlowCanvas::Module* - > Views; + typedef std::map<SharedPtr<const ObjectModel>, Ganv::Module*> Views; Views _views; int _auto_position_count; diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index 0dcaf9d0..58c05711 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -40,7 +40,7 @@ namespace GUI { PatchPortModule::PatchPortModule(PatchCanvas& canvas, SharedPtr<const PortModel> model) - : FlowCanvas::Module(canvas, "", 0, 0, false) // FIXME: coords? + : Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords? , _model(model) { assert(model); diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp index 04f70ad1..2478796d 100644 --- a/src/gui/PatchPortModule.hpp +++ b/src/gui/PatchPortModule.hpp @@ -20,7 +20,7 @@ #include <string> #include <boost/enable_shared_from_this.hpp> -#include "flowcanvas/Module.hpp" +#include "ganv/Module.hpp" #include "raul/URI.hpp" #include "Port.hpp" @@ -45,7 +45,7 @@ class PortMenu; * * \ingroup GUI */ -class PatchPortModule : public FlowCanvas::Module +class PatchPortModule : public Ganv::Module { public: static PatchPortModule* create( diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp index 19289164..8d7d78a7 100644 --- a/src/gui/PatchView.hpp +++ b/src/gui/PatchView.hpp @@ -25,7 +25,7 @@ #include "raul/SharedPtr.hpp" namespace Raul { class Atom; } -namespace FlowCanvas { class Port; class Item; } +namespace Ganv { class Port; class Item; } namespace Ingen { diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 293f3a22..950a1df9 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -17,7 +17,7 @@ #include <cassert> #include "raul/log.hpp" -#include "flowcanvas/Module.hpp" +#include "ganv/Module.hpp" #include "ingen/ServerInterface.hpp" #include "ingen/shared/LV2URIMap.hpp" #include "ingen/client/PatchModel.hpp" @@ -42,7 +42,7 @@ namespace GUI { Port* Port::create(App& app, - FlowCanvas::Module& module, + Ganv::Module& module, SharedPtr<const PortModel> pm, bool human_name, bool flip) @@ -64,11 +64,11 @@ Port::create(App& app, /** @a flip Make an input port appear as an output port, and vice versa. */ Port::Port(App& app, - FlowCanvas::Module& module, + Ganv::Module& module, SharedPtr<const PortModel> pm, const string& name, bool flip) - : FlowCanvas::Port(module, name, + : Ganv::Port(module, name, flip ? (!pm->is_input()) : pm->is_input(), app.configuration()->get_port_color(pm.get())) , _app(app) @@ -144,7 +144,7 @@ Port::value_changed(const Atom& value) if (_pressed) return; else if (value.type() == Atom::FLOAT) - FlowCanvas::Port::set_control_value(value.get_float()); + Ganv::Port::set_control_value(value.get_float()); } bool @@ -162,7 +162,7 @@ Port::on_event(GdkEvent* ev) break; } - return FlowCanvas::Port::on_event(ev); + return Ganv::Port::on_event(ev); } bool @@ -249,7 +249,7 @@ Port::set_control(float value, bool signal) pw->show_port_status(model().get(), value); } - FlowCanvas::Port::set_control_value(value); + Ganv::Port::set_control_value(value); } void @@ -312,7 +312,7 @@ void Port::set_selected(gboolean b) { if (b != get_selected()) { - FlowCanvas::Port::set_selected(b); + Ganv::Port::set_selected(b); SharedPtr<const PortModel> pm = _port_model.lock(); if (pm && b) { SharedPtr<const NodeModel> node = PtrCast<NodeModel>(pm->parent()); diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 569090a5..3cea7bc5 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -20,7 +20,7 @@ #include <cassert> #include <string> -#include "flowcanvas/Port.hpp" +#include "ganv/Port.hpp" #include "raul/SharedPtr.hpp" #include "raul/WeakPtr.hpp" @@ -39,12 +39,12 @@ class App; * * \ingroup GUI */ -class Port : public FlowCanvas::Port +class Port : public Ganv::Port { public: static Port* create( App& app, - FlowCanvas::Module& module, + Ganv::Module& module, SharedPtr<const PortModel> pm, bool human_name, bool flip = false); @@ -66,7 +66,7 @@ public: private: Port(App& app, - FlowCanvas::Module& module, + Ganv::Module& module, SharedPtr<const PortModel> pm, const std::string& name, bool flip = false); diff --git a/src/gui/wscript b/src/gui/wscript index a550e56a..720b100f 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -11,7 +11,7 @@ def build(bld): install_path = '${LIBDIR}', use = 'libingen_shared libingen_client libingen_serialisation') autowaf.use_lib(bld, obj, ''' - FLOWCANVAS + GANV GLADEMM GLIBMM GNOMECANVAS |