aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/EdgeView.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-10 21:23:14 +0000
committerDavid Robillard <d@drobilla.net>2011-01-10 21:23:14 +0000
commitf293da6bc4f0f631c086d35666e3e8bfef19b8f2 (patch)
treed0e693bdec5e4a53daca500434533d2fc5c43650 /src/gui/EdgeView.hpp
parentdb319f5a8cb7915b2d5b93adab148fa16d92e7e5 (diff)
downloadmachina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.tar.gz
machina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.tar.bz2
machina-f293da6bc4f0f631c086d35666e3e8bfef19b8f2.zip
Rewrite with UI/engine split.
Note some things aren't quite working right again yet... git-svn-id: http://svn.drobilla.net/lad/trunk/machina@2821 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/EdgeView.hpp')
-rw-r--r--src/gui/EdgeView.hpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/gui/EdgeView.hpp b/src/gui/EdgeView.hpp
index ea49b27..d9ffe71 100644
--- a/src/gui/EdgeView.hpp
+++ b/src/gui/EdgeView.hpp
@@ -15,32 +15,38 @@
* along with Machina. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef MACHINA_EDGEVIEW_H
-#define MACHINA_EDGEVIEW_H
+#ifndef MACHINA_EDGEVIEW_HPP
+#define MACHINA_EDGEVIEW_HPP
#include "flowcanvas/Connection.hpp"
-namespace Machina { class Edge; }
-class NodeView;
+#include "client/ClientObject.hpp"
+
+#include "machina/types.hpp"
+class NodeView;
-class EdgeView : public FlowCanvas::Connection {
+class EdgeView
+ : public FlowCanvas::Connection
+ , public Machina::Client::ClientObject::View {
public:
- EdgeView(SharedPtr<FlowCanvas::Canvas> canvas,
- SharedPtr<NodeView> src,
- SharedPtr<NodeView> dst,
- SharedPtr<Machina::Edge> edge);
+ EdgeView(SharedPtr<FlowCanvas::Canvas> canvas,
+ SharedPtr<NodeView> src,
+ SharedPtr<NodeView> dst,
+ SharedPtr<Machina::Client::ClientObject> edge);
void show_label(bool show);
- void update();
virtual double length_hint() const;
private:
bool on_event(GdkEvent* ev);
+ void on_property(Machina::URIInt key, const Raul::Atom& value);
+
+ float probability() const;
- SharedPtr<Machina::Edge> _edge;
+ SharedPtr<Machina::Client::ClientObject> _edge;
};
-#endif // MACHINA_EDGEVIEW_H
+#endif // MACHINA_EDGEVIEW_HPP