summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-12-29 20:34:32 +0000
committerDavid Robillard <d@drobilla.net>2012-12-29 20:34:32 +0000
commit79275fc579c0dbe1ce4ca109edb95f2c1e0802a5 (patch)
tree72bb18ea61f485c47514a511dd3067c57aa2fb4b /src/gui
parent9bdf223f830d3b430563e96d93efc073b1882e96 (diff)
downloadingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.gz
ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.bz2
ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.zip
"edge" => "arc".
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4897 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Arc.cpp (renamed from src/gui/Edge.cpp)14
-rw-r--r--src/gui/Arc.hpp (renamed from src/gui/Edge.hpp)24
-rw-r--r--src/gui/GraphCanvas.cpp56
-rw-r--r--src/gui/GraphCanvas.hpp6
-rw-r--r--src/gui/wscript2
5 files changed, 51 insertions, 51 deletions
diff --git a/src/gui/Edge.cpp b/src/gui/Arc.cpp
index 9916959e..b75f30ae 100644
--- a/src/gui/Edge.cpp
+++ b/src/gui/Arc.cpp
@@ -14,18 +14,18 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "Edge.hpp"
+#include "Arc.hpp"
namespace Ingen {
namespace GUI {
-Edge::Edge(Ganv::Canvas& canvas,
- boost::shared_ptr<const Client::EdgeModel> model,
- Ganv::Node* src,
- Ganv::Node* dst,
- uint32_t color)
+Arc::Arc(Ganv::Canvas& canvas,
+ boost::shared_ptr<const Client::ArcModel> model,
+ Ganv::Node* src,
+ Ganv::Node* dst,
+ uint32_t color)
: Ganv::Edge(canvas, src, dst, color)
- , _edge_model(model)
+ , _arc_model(model)
{
}
diff --git a/src/gui/Edge.hpp b/src/gui/Arc.hpp
index cf1dafe8..df6dfbfb 100644
--- a/src/gui/Edge.hpp
+++ b/src/gui/Arc.hpp
@@ -14,8 +14,8 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef INGEN_GUI_EDGE_HPP
-#define INGEN_GUI_EDGE_HPP
+#ifndef INGEN_GUI_ARC_HPP
+#define INGEN_GUI_ARC_HPP
#include <cassert>
@@ -24,27 +24,27 @@
namespace Ingen {
-namespace Client { class EdgeModel; }
+namespace Client { class ArcModel; }
namespace GUI {
-/** An Edge in a Graph.
+/** An Arc (directed edge) in a Graph.
*
* \ingroup GUI
*/
-class Edge : public Ganv::Edge
+class Arc : public Ganv::Edge
{
public:
- Edge(Ganv::Canvas& canvas,
- boost::shared_ptr<const Client::EdgeModel> model,
- Ganv::Node* src,
- Ganv::Node* dst,
- uint32_t color);
+ Arc(Ganv::Canvas& canvas,
+ boost::shared_ptr<const Client::ArcModel> model,
+ Ganv::Node* src,
+ Ganv::Node* dst,
+ uint32_t color);
- SharedPtr<const Client::EdgeModel> model() const { return _edge_model; }
+ SharedPtr<const Client::ArcModel> model() const { return _arc_model; }
private:
- SharedPtr<const Client::EdgeModel> _edge_model;
+ SharedPtr<const Client::ArcModel> _arc_model;
};
} // namespace GUI
diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp
index 86b21cc2..d35e678f 100644
--- a/src/gui/GraphCanvas.cpp
+++ b/src/gui/GraphCanvas.cpp
@@ -38,7 +38,7 @@
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "App.hpp"
-#include "Edge.hpp"
+#include "Arc.hpp"
#include "GraphCanvas.hpp"
#include "GraphPortModule.hpp"
#include "GraphWindow.hpp"
@@ -142,9 +142,9 @@ GraphCanvas::GraphCanvas(App& app,
sigc::mem_fun(this, &GraphCanvas::add_port));
_graph->signal_removed_port().connect(
sigc::mem_fun(this, &GraphCanvas::remove_port));
- _graph->signal_new_edge().connect(
+ _graph->signal_new_arc().connect(
sigc::mem_fun(this, &GraphCanvas::connection));
- _graph->signal_removed_edge().connect(
+ _graph->signal_removed_arc().connect(
sigc::mem_fun(this, &GraphCanvas::disconnection));
_app.store()->signal_new_plugin().connect(
@@ -321,10 +321,10 @@ GraphCanvas::build()
add_port(*i);
}
- // Create edges
- for (GraphModel::Edges::const_iterator i = _graph->edges().begin();
- i != _graph->edges().end(); ++i) {
- connection(PtrCast<EdgeModel>(i->second));
+ // Create arcs
+ for (GraphModel::Arcs::const_iterator i = _graph->arcs().begin();
+ i != _graph->arcs().end(); ++i) {
+ connection(PtrCast<ArcModel>(i->second));
}
}
@@ -500,30 +500,30 @@ GraphCanvas::get_port_view(SharedPtr<PortModel> port)
}
void
-GraphCanvas::connection(SharedPtr<const EdgeModel> cm)
+GraphCanvas::connection(SharedPtr<const ArcModel> arc)
{
- Ganv::Port* const tail = get_port_view(cm->tail());
- Ganv::Port* const head = get_port_view(cm->head());
+ Ganv::Port* const tail = get_port_view(arc->tail());
+ Ganv::Port* const head = get_port_view(arc->head());
if (tail && head) {
- new GUI::Edge(*this, cm, tail, head, tail->get_fill_color());
+ new GUI::Arc(*this, arc, tail, head, tail->get_fill_color());
} else {
_app.log().error(Raul::fmt("Unable to find ports to connect %1% => %2%\n")
- % cm->tail_path() % cm->head_path());
+ % arc->tail_path() % arc->head_path());
}
}
void
-GraphCanvas::disconnection(SharedPtr<const EdgeModel> cm)
+GraphCanvas::disconnection(SharedPtr<const ArcModel> arc)
{
- Ganv::Port* const src = get_port_view(cm->tail());
- Ganv::Port* const dst = get_port_view(cm->head());
+ Ganv::Port* const src = get_port_view(arc->tail());
+ Ganv::Port* const dst = get_port_view(arc->head());
if (src && dst) {
remove_edge(src, dst);
} else {
_app.log().error(Raul::fmt("Unable to find ports to disconnect %1% => %2%\n")
- % cm->tail_path() % cm->head_path());
+ % arc->tail_path() % arc->head_path());
}
}
@@ -647,13 +647,13 @@ destroy_node(GanvNode* node, void* data)
}
static void
-destroy_edge(GanvEdge* edge, void* data)
+destroy_arc(GanvEdge* arc, void* data)
{
- App* app = (App*)data;
- Ganv::Edge* edgemm = Glib::wrap(edge);
+ App* app = (App*)data;
+ Ganv::Edge* arcmm = Glib::wrap(arc);
- Port* tail = dynamic_cast<Port*>(edgemm->get_tail());
- Port* head = dynamic_cast<Port*>(edgemm->get_head());
+ Port* tail = dynamic_cast<Port*>(arcmm->get_tail());
+ Port* head = dynamic_cast<Port*>(arcmm->get_head());
app->interface()->disconnect(tail->model()->path(), head->model()->path());
}
@@ -661,7 +661,7 @@ void
GraphCanvas::destroy_selection()
{
for_each_selected_node(destroy_node, &_app);
- for_each_selected_edge(destroy_edge, &_app);
+ for_each_selected_edge(destroy_arc, &_app);
}
static void
@@ -686,16 +686,16 @@ serialise_node(GanvNode* node, void* data)
}
static void
-serialise_edge(GanvEdge* edge, void* data)
+serialise_arc(GanvEdge* arc, void* data)
{
Serialisation::Serialiser* serialiser = (Serialisation::Serialiser*)data;
- if (!GANV_IS_EDGE(edge)) {
+ if (!GANV_IS_EDGE(arc)) {
return;
}
- GUI::Edge* gedge = dynamic_cast<GUI::Edge*>(Glib::wrap(GANV_EDGE(edge)));
- if (gedge) {
- serialiser->serialise_edge(Sord::Node(), gedge->model());
+ GUI::Arc* garc = dynamic_cast<GUI::Arc*>(Glib::wrap(GANV_EDGE(arc)));
+ if (garc) {
+ serialiser->serialise_arc(Sord::Node(), garc->model());
}
}
@@ -707,7 +707,7 @@ GraphCanvas::copy_selection()
serialiser.start_to_string(_graph->path(), base_uri);
for_each_selected_node(serialise_node, &serialiser);
- for_each_selected_edge(serialise_edge, &serialiser);
+ for_each_selected_edge(serialise_arc, &serialiser);
const std::string result = serialiser.finish();
_paste_count = 0;
diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp
index 3fb00619..1d04e582 100644
--- a/src/gui/GraphCanvas.hpp
+++ b/src/gui/GraphCanvas.hpp
@@ -32,7 +32,7 @@
#include "NodeModule.hpp"
#include "ingen/Node.hpp"
-#include "ingen/client/EdgeModel.hpp"
+#include "ingen/client/ArcModel.hpp"
namespace Ingen {
@@ -68,8 +68,8 @@ public:
void remove_block(SharedPtr<const Client::BlockModel> bm);
void add_port(SharedPtr<const Client::PortModel> pm);
void remove_port(SharedPtr<const Client::PortModel> pm);
- void connection(SharedPtr<const Client::EdgeModel> cm);
- void disconnection(SharedPtr<const Client::EdgeModel> cm);
+ void connection(SharedPtr<const Client::ArcModel> am);
+ void disconnection(SharedPtr<const Client::ArcModel> am);
void get_new_module_location(double& x, double& y);
diff --git a/src/gui/wscript b/src/gui/wscript
index 4732e56f..1f0a567f 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -28,9 +28,9 @@ def build(bld):
obj.source = '''
App.cpp
+ Arc.cpp
BreadCrumbs.cpp
ConnectWindow.cpp
- Edge.cpp
GraphBox.cpp
GraphCanvas.cpp
GraphPortModule.cpp