aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-02-23 19:55:13 +0000
committerDavid Robillard <d@drobilla.net>2013-02-23 19:55:13 +0000
commitbb67af535ef57101f6b543c99e9489e984c8f1ec (patch)
treea18aebb32a20ccad6a51f57e5e037f43eb742639 /src/gui
parentb8e54f8f66abaf71927a023e1cfee905842078aa (diff)
downloadmachina-bb67af535ef57101f6b543c99e9489e984c8f1ec.tar.gz
machina-bb67af535ef57101f6b543c99e9489e984c8f1ec.tar.bz2
machina-bb67af535ef57101f6b543c99e9489e984c8f1ec.zip
Move Atom implementation out of Raul so it can depend on LV2.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@5076 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/EdgeView.cpp4
-rw-r--r--src/gui/EdgeView.hpp2
-rw-r--r--src/gui/MachinaCanvas.cpp8
-rw-r--r--src/gui/MachinaGUI.hpp4
-rw-r--r--src/gui/NodeView.cpp12
-rw-r--r--src/gui/NodeView.hpp6
-rw-r--r--src/gui/main.cpp2
7 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/EdgeView.cpp b/src/gui/EdgeView.cpp
index a332859..67fc821 100644
--- a/src/gui/EdgeView.cpp
+++ b/src/gui/EdgeView.cpp
@@ -108,7 +108,7 @@ bool
EdgeView::on_event(GdkEvent* ev)
{
MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(this->canvas());
- Raul::Forge& forge = canvas->app()->forge();
+ Forge& forge = canvas->app()->forge();
if (ev->type == GDK_BUTTON_PRESS) {
if (ev->button.state & GDK_CONTROL_MASK) {
@@ -131,7 +131,7 @@ EdgeView::on_event(GdkEvent* ev)
}
void
-EdgeView::on_property(machina::URIInt key, const Raul::Atom& value)
+EdgeView::on_property(machina::URIInt key, const Atom& value)
{
if (key == URIs::instance().machina_probability) {
set_color(edge_color(value.get<float>()));
diff --git a/src/gui/EdgeView.hpp b/src/gui/EdgeView.hpp
index bd84ba6..1ad2dd0 100644
--- a/src/gui/EdgeView.hpp
+++ b/src/gui/EdgeView.hpp
@@ -46,7 +46,7 @@ public:
private:
bool on_event(GdkEvent* ev);
- void on_property(machina::URIInt key, const Raul::Atom& value);
+ void on_property(machina::URIInt key, const Atom& value);
float probability() const;
diff --git a/src/gui/MachinaCanvas.cpp b/src/gui/MachinaCanvas.cpp
index 2c5e8a0..76c029c 100644
--- a/src/gui/MachinaCanvas.cpp
+++ b/src/gui/MachinaCanvas.cpp
@@ -108,14 +108,14 @@ void
MachinaCanvas::on_new_object(SPtr<client::ClientObject> object)
{
const machina::URIs& uris = URIs::instance();
- const Raul::Atom& type = object->get(uris.rdf_type);
+ const Atom& type = object->get(uris.rdf_type);
if (!type.is_valid()) {
return;
}
if (type.get<URIInt>() == uris.machina_Node) {
- const Raul::Atom& node_x = object->get(uris.machina_canvas_x);
- const Raul::Atom& node_y = object->get(uris.machina_canvas_y);
+ const Atom& node_x = object->get(uris.machina_canvas_x);
+ const Atom& node_y = object->get(uris.machina_canvas_y);
float x, y;
if (node_x.type() == _app->forge().Float &&
node_y.type() == _app->forge().Float) {
@@ -167,7 +167,7 @@ MachinaCanvas::on_new_object(SPtr<client::ClientObject> object)
void
MachinaCanvas::on_erase_object(SPtr<client::ClientObject> object)
{
- const Raul::Atom& type = object->get(URIs::instance().rdf_type);
+ const Atom& type = object->get(URIs::instance().rdf_type);
if (type.get<URIInt>() == URIs::instance().machina_Node) {
delete object->view();
object->set_view(NULL);
diff --git a/src/gui/MachinaGUI.hpp b/src/gui/MachinaGUI.hpp
index c450ebb..bb111a2 100644
--- a/src/gui/MachinaGUI.hpp
+++ b/src/gui/MachinaGUI.hpp
@@ -54,7 +54,7 @@ public:
SPtr<MachinaCanvas> canvas() { return _canvas; }
SPtr<machina::Engine> engine() { return _engine; }
SPtr<machina::Controller> controller() { return _controller; }
- Raul::Forge& forge() { return _forge; }
+ Forge& forge() { return _forge; }
SPtr<Raul::Maid> maid() { return _maid; }
Gtk::Window* window() { return _main_window; }
@@ -132,7 +132,7 @@ protected:
SPtr<Raul::Maid> _maid;
SPtr<machina::Evolver> _evolver;
- Raul::Forge _forge;
+ Forge _forge;
Gtk::Main* _gtk_main;
diff --git a/src/gui/NodeView.cpp b/src/gui/NodeView.cpp
index 09ec6a8..f87b74a 100644
--- a/src/gui/NodeView.cpp
+++ b/src/gui/NodeView.cpp
@@ -74,9 +74,9 @@ NodeView::on_double_click(GdkEventButton*)
}
bool
-NodeView::is(Raul::Forge& forge, machina::URIInt key)
+NodeView::is(Forge& forge, machina::URIInt key)
{
- const Raul::Atom& value = _node->get(key);
+ const Atom& value = _node->get(key);
return value.type() == forge.Bool && value.get<int32_t>();
}
@@ -84,7 +84,7 @@ bool
NodeView::on_event(GdkEvent* event)
{
MachinaCanvas* canvas = dynamic_cast<MachinaCanvas*>(this->canvas());
- Raul::Forge& forge = canvas->app()->forge();
+ Forge& forge = canvas->app()->forge();
if (event->type == GDK_BUTTON_PRESS) {
if (event->button.state & GDK_CONTROL_MASK) {
if (event->button.button == 1) {
@@ -131,7 +131,7 @@ void
NodeView::show_label(bool show)
{
if (show && _enter_action) {
- Raul::Atom note_number = _enter_action->get(
+ Atom note_number = _enter_action->get(
URIs::instance().machina_note_number);
if (note_number.is_valid()) {
uint8_t buf[8];
@@ -145,7 +145,7 @@ NodeView::show_label(bool show)
}
void
-NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
+NodeView::on_property(machina::URIInt key, const Atom& value)
{
static const uint32_t active_color = 0x408040FF;
static const uint32_t active_border_color = 0x00FF00FF;
@@ -183,7 +183,7 @@ NodeView::on_property(machina::URIInt key, const Raul::Atom& value)
}
void
-NodeView::on_action_property(machina::URIInt key, const Raul::Atom& value)
+NodeView::on_action_property(machina::URIInt key, const Atom& value)
{
if (key == URIs::instance().machina_note_number) {
show_label(true);
diff --git a/src/gui/NodeView.hpp b/src/gui/NodeView.hpp
index d9ea1e8..6e0681c 100644
--- a/src/gui/NodeView.hpp
+++ b/src/gui/NodeView.hpp
@@ -54,10 +54,10 @@ public:
private:
bool on_event(GdkEvent* ev);
bool on_double_click(GdkEventButton* ev);
- void on_property(machina::URIInt key, const Raul::Atom& value);
- void on_action_property(machina::URIInt key, const Raul::Atom& value);
+ void on_property(machina::URIInt key, const Atom& value);
+ void on_action_property(machina::URIInt key, const Atom& value);
- bool is(Raul::Forge& forge, machina::URIInt key);
+ bool is(Forge& forge, machina::URIInt key);
Gtk::Window* _window;
SPtr<machina::client::ClientObject> _node;
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index 04d9e6d..407258d 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -42,7 +42,7 @@ main(int argc, char** argv)
rdf_world.add_prefix("", MACHINA_NS);
rdf_world.add_prefix("midi", LV2_MIDI_PREFIX);
- Raul::Forge forge;
+ Forge forge;
SPtr<machina::Machine> machine;
Raul::TimeUnit beats(TimeUnit::BEATS, MACHINA_PPQN);