diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/JackDbusDriver.hpp | 2 | ||||
-rw-r--r-- | src/JackDriver.cpp | 8 | ||||
-rw-r--r-- | src/JackDriver.hpp | 2 | ||||
-rw-r--r-- | src/Patchage.cpp | 16 | ||||
-rw-r--r-- | src/Patchage.hpp | 2 | ||||
-rw-r--r-- | src/PatchageCanvas.cpp | 38 | ||||
-rw-r--r-- | src/PatchageCanvas.hpp | 18 | ||||
-rw-r--r-- | src/PatchageModule.cpp | 8 | ||||
-rw-r--r-- | src/PatchageModule.hpp | 16 | ||||
-rw-r--r-- | src/PatchagePort.hpp | 18 |
10 files changed, 66 insertions, 62 deletions
diff --git a/src/JackDbusDriver.hpp b/src/JackDbusDriver.hpp index fa6d61c..f2c2b1f 100644 --- a/src/JackDbusDriver.hpp +++ b/src/JackDbusDriver.hpp @@ -28,7 +28,7 @@ #include "PatchageModule.hpp" class PatchageEvent; -class PatchageFlowCanvas; +class PatchageCanvas; class PatchagePort; class JackDriver : public Driver diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 61d57d4..4d2411f 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -295,14 +295,14 @@ JackDriver::refresh() PatchageModule* client2_module = _app->canvas()->find_module(client2_name, port2_type); - FlowCanvas::Port* port1 = client1_module->get_port(port1_name); - FlowCanvas::Port* port2 = client2_module->get_port(port2_name); + Ganv::Port* port1 = client1_module->get_port(port1_name); + Ganv::Port* port2 = client2_module->get_port(port2_name); if (!port1 || !port2) continue; - FlowCanvas::Port* src = NULL; - FlowCanvas::Port* dst = NULL; + Ganv::Port* src = NULL; + Ganv::Port* dst = NULL; if (port1->is_output() && port2->is_input()) { src = port1; diff --git a/src/JackDriver.hpp b/src/JackDriver.hpp index df1a33f..2206d37 100644 --- a/src/JackDriver.hpp +++ b/src/JackDriver.hpp @@ -28,7 +28,7 @@ class Patchage; class PatchageEvent; -class PatchageFlowCanvas; +class PatchageCanvas; class PatchagePort; class PatchageModule; diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 49e632a..8ed0467 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -31,8 +31,8 @@ #include <gtkmm/stock.h> #include <gtkmm/treemodel.h> -#include "flowcanvas/Module.hpp" -#include "flowcanvas/Edge.hpp" +#include "ganv/Module.hpp" +#include "ganv/Edge.hpp" #include "patchage-config.h" #include "UIFile.hpp" @@ -414,10 +414,10 @@ Patchage::warning_msg(const std::string& msg) } static void -load_module_location(FlowCanvasNode* node, void* data) +load_module_location(GanvNode* node, void* data) { - if (FLOW_CANVAS_IS_MODULE(node)) { - FlowCanvas::Module* cmodule = Glib::wrap(FLOW_CANVAS_MODULE(node)); + if (GANV_IS_MODULE(node)) { + Ganv::Module* cmodule = Glib::wrap(GANV_MODULE(node)); PatchageModule* pmodule = dynamic_cast<PatchageModule*>(cmodule); if (pmodule) { pmodule->load_location(); @@ -494,10 +494,10 @@ Patchage::show_open_session_dialog() } static void -print_edge(FlowCanvasEdge* edge, void* data) +print_edge(GanvEdge* edge, void* data) { - std::ofstream* script = (std::ofstream*)data; - FlowCanvas::Edge* edgemm = Glib::wrap(edge); + std::ofstream* script = (std::ofstream*)data; + Ganv::Edge* edgemm = Glib::wrap(edge); PatchagePort* src = dynamic_cast<PatchagePort*>((edgemm)->get_tail()); PatchagePort* dst = dynamic_cast<PatchagePort*>((edgemm)->get_head()); diff --git a/src/Patchage.hpp b/src/Patchage.hpp index a4b8c73..403ab03 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -46,7 +46,7 @@ class JackDriver; class PatchageCanvas; class StateManager; -namespace FlowCanvas { class Module; } +namespace Ganv { class Module; } class Patchage { public: diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 7021d89..732adf1 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -27,7 +27,7 @@ #include "AlsaDriver.hpp" #endif -#include "flowcanvas/Edge.hpp" +#include "ganv/Edge.hpp" #include "Patchage.hpp" #include "PatchageCanvas.hpp" @@ -38,7 +38,7 @@ using std::string; using boost::format; PatchageCanvas::PatchageCanvas(Patchage* app, int width, int height) - : FlowCanvas::Canvas(width, height) + : Ganv::Canvas(width, height) , _app(app) { } @@ -132,7 +132,7 @@ struct RemovePortsData { }; static void -delete_port_if_matches(FlowCanvasPort* port, void* cdata) +delete_port_if_matches(GanvPort* port, void* cdata) { RemovePortsData* data = (RemovePortsData*)cdata; PatchagePort* pport = dynamic_cast<PatchagePort*>(Glib::wrap(port)); @@ -142,14 +142,14 @@ delete_port_if_matches(FlowCanvasPort* port, void* cdata) } static void -remove_ports_matching(FlowCanvasNode* node, void* cdata) +remove_ports_matching(GanvNode* node, void* cdata) { - if (!FLOW_CANVAS_IS_MODULE(node)) { + if (!GANV_IS_MODULE(node)) { return; } - FlowCanvas::Module* cmodule = Glib::wrap(FLOW_CANVAS_MODULE(node)); - PatchageModule* pmodule = dynamic_cast<PatchageModule*>(cmodule); + Ganv::Module* cmodule = Glib::wrap(GANV_MODULE(node)); + PatchageModule* pmodule = dynamic_cast<PatchageModule*>(cmodule); if (!pmodule) { return; } @@ -204,8 +204,8 @@ PatchageCanvas::find_port_by_name(const std::string& client_name, } void -PatchageCanvas::connect(FlowCanvas::Node* port1, - FlowCanvas::Node* port2) +PatchageCanvas::connect(Ganv::Node* port1, + Ganv::Node* port2) { PatchagePort* p1 = dynamic_cast<PatchagePort*>(port1); PatchagePort* p2 = dynamic_cast<PatchagePort*>(port2); @@ -227,8 +227,8 @@ PatchageCanvas::connect(FlowCanvas::Node* port1, } void -PatchageCanvas::disconnect(FlowCanvas::Node* port1, - FlowCanvas::Node* port2) +PatchageCanvas::disconnect(Ganv::Node* port1, + Ganv::Node* port2) { PatchagePort* input = dynamic_cast<PatchagePort*>(port1); PatchagePort* output = dynamic_cast<PatchagePort*>(port2); @@ -282,7 +282,7 @@ PatchageCanvas::add_module(const std::string& name, PatchageModule* module) } bool -PatchageCanvas::on_connection_event(FlowCanvas::Edge* c, GdkEvent* ev) +PatchageCanvas::on_connection_event(Ganv::Edge* c, GdkEvent* ev) { if (ev->type == GDK_BUTTON_PRESS) { switch (ev->button.button) { @@ -302,10 +302,10 @@ PatchageCanvas::on_connection_event(FlowCanvas::Edge* c, GdkEvent* ev) } static void -disconnect_edge(FlowCanvasEdge* edge, void* data) +disconnect_edge(GanvEdge* edge, void* data) { - PatchageCanvas* canvas = (PatchageCanvas*)data; - FlowCanvas::Edge* edgemm = Glib::wrap(edge); + PatchageCanvas* canvas = (PatchageCanvas*)data; + Ganv::Edge* edgemm = Glib::wrap(edge); canvas->disconnect(edgemm->get_tail(), edgemm->get_head()); } @@ -322,11 +322,11 @@ PatchageCanvas::on_event(GdkEvent* ev) } bool -PatchageCanvas::make_connection(FlowCanvas::Node* tail, - FlowCanvas::Node* head, +PatchageCanvas::make_connection(Ganv::Node* tail, + Ganv::Node* head, uint32_t color) { - FlowCanvas::Edge* c = new FlowCanvas::Edge( + Ganv::Edge* c = new Ganv::Edge( *this, tail, head, color); c->signal_event().connect( sigc::bind<0>(sigc::mem_fun(*this, &PatchageCanvas::on_connection_event), @@ -352,5 +352,5 @@ PatchageCanvas::destroy() { _port_index.clear(); _module_index.clear(); - FlowCanvas::Canvas::destroy(); + Ganv::Canvas::destroy(); } diff --git a/src/PatchageCanvas.hpp b/src/PatchageCanvas.hpp index cf536ba..b4dd510 100644 --- a/src/PatchageCanvas.hpp +++ b/src/PatchageCanvas.hpp @@ -26,7 +26,7 @@ #include <alsa/asoundlib.h> #endif -#include "flowcanvas/Canvas.hpp" +#include "ganv/Canvas.hpp" #include "PatchageEvent.hpp" #include "PatchageModule.hpp" @@ -37,7 +37,7 @@ class Patchage; class PatchageModule; class PatchagePort; -class PatchageCanvas : public FlowCanvas::Canvas { +class PatchageCanvas : public Ganv::Canvas { public: PatchageCanvas(Patchage* _app, int width, int height); @@ -50,11 +50,11 @@ public: PatchagePort* find_port_by_name(const std::string& client_name, const std::string& port_name); - void connect(FlowCanvas::Node* port1, - FlowCanvas::Node* port2); + void connect(Ganv::Node* port1, + Ganv::Node* port2); - void disconnect(FlowCanvas::Node* port1, - FlowCanvas::Node* port2); + void disconnect(Ganv::Node* port1, + Ganv::Node* port2); void index_port(const PortID& id, PatchagePort* port) { _port_index.insert(std::make_pair(id, port)); @@ -64,8 +64,8 @@ public: void add_module(const std::string& name, PatchageModule* module); - bool make_connection(FlowCanvas::Node* tail, - FlowCanvas::Node* head, + bool make_connection(Ganv::Node* tail, + Ganv::Node* head, uint32_t color); void remove_port(const PortID& id); @@ -76,7 +76,7 @@ private: Patchage* _app; bool on_event(GdkEvent* ev); - bool on_connection_event(FlowCanvas::Edge* c, GdkEvent* ev); + bool on_connection_event(Ganv::Edge* c, GdkEvent* ev); typedef std::map<const PortID, PatchagePort*> PortIndex; PortIndex _port_index; diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index 46188f8..8b6a2ec 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -131,18 +131,18 @@ PatchageModule::join() } void -PatchageModule::add_port(FlowCanvas::Port* port) +PatchageModule::add_port(Ganv::Port* port) { std::cerr << "FIXME: add port" << std::endl; - //FlowCanvas::Module::add_port(port); + //Ganv::Module::add_port(port); update_menu(); } void -PatchageModule::remove_port(FlowCanvas::Port* port) +PatchageModule::remove_port(Ganv::Port* port) { std::cerr << "FIXME: remove port" << std::endl; - //FlowCanvas::Module::remove_port(port); + //Ganv::Module::remove_port(port); update_menu(); } diff --git a/src/PatchageModule.hpp b/src/PatchageModule.hpp index a0b6da9..f429831 100644 --- a/src/PatchageModule.hpp +++ b/src/PatchageModule.hpp @@ -21,18 +21,22 @@ #include <gtkmm/menu_elems.h> -#include "flowcanvas/Module.hpp" -#include "flowcanvas/Port.hpp" +#include "ganv/Module.hpp" +#include "ganv/Port.hpp" #include "StateManager.hpp" class Patchage; class PatchagePort; -class PatchageModule : public FlowCanvas::Module +class PatchageModule : public Ganv::Module { public: - PatchageModule(Patchage* app, const std::string& name, ModuleType type, double x=0, double y=0); + PatchageModule(Patchage* app, + const std::string& name, + ModuleType type, + double x = 0, + double y = 0); ~PatchageModule(); void split(); @@ -53,8 +57,8 @@ public: protected: bool on_click(GdkEventButton* ev); - void add_port(FlowCanvas::Port* port); - void remove_port(FlowCanvas::Port* port); + void add_port(Ganv::Port* port); + void remove_port(Ganv::Port* port); Patchage* _app; Gtk::Menu* _menu; diff --git a/src/PatchagePort.hpp b/src/PatchagePort.hpp index c54e055..2eda81b 100644 --- a/src/PatchagePort.hpp +++ b/src/PatchagePort.hpp @@ -23,8 +23,8 @@ #include <gtkmm.h> -#include "flowcanvas/Port.hpp" -#include "flowcanvas/Module.hpp" +#include "ganv/Port.hpp" +#include "ganv/Module.hpp" #include "patchage-config.h" #include "PatchageCanvas.hpp" @@ -33,14 +33,14 @@ /** A Port on a PatchageModule */ -class PatchagePort : public FlowCanvas::Port +class PatchagePort : public Ganv::Port { public: - PatchagePort(FlowCanvas::Module& module, - PortType type, - const std::string& name, - bool is_input, - uint32_t color) + PatchagePort(Ganv::Module& module, + PortType type, + const std::string& name, + bool is_input, + uint32_t color) : Port(module, name, is_input, color) , _type(type) { @@ -55,7 +55,7 @@ public: bool on_click(GdkEventButton* ev) { if (ev->button != 3) { - return FlowCanvas::Port::on_click(ev); + return Ganv::Port::on_click(ev); } Gtk::Menu* menu = Gtk::manage(new Gtk::Menu()); |