diff options
Diffstat (limited to 'src/ui/tools/livecode-tool.cpp')
| -rw-r--r-- | src/ui/tools/livecode-tool.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ui/tools/livecode-tool.cpp b/src/ui/tools/livecode-tool.cpp index 0071f47b3..8b096dbf0 100644 --- a/src/ui/tools/livecode-tool.cpp +++ b/src/ui/tools/livecode-tool.cpp @@ -53,7 +53,7 @@ const std::string LivecodeTool::prefsPath = "/tools/livecode"; LivecodeTool::LivecodeTool() : ToolBase(nullptr, false) - , api(SP_ACTIVE_DESKTOP) + , context(SP_ACTIVE_DESKTOP) { } @@ -83,25 +83,30 @@ bool LivecodeTool::root_handler(GdkEvent* event) ret = ToolBase::root_handler(event); if (!ret) { - api.push_event(event); + context.push_event(event); } return ret; } +void LivecodeTool::load_script(Glib::ustring const &path) +{ + context.load_script(path); +} + static Geom::Point p(100, 100); static Geom::Point a(50, 100), b(120, 300); static Geom::Rect rect(Geom::Point(20, 200), Geom::Point(220, 20)); bool LivecodeTool::handle_tick(Glib::RefPtr<Gdk::FrameClock> const &frame_clock) { - api.setup_frame(); + context.setup_frame(); - api.input_point("p", &p); - api.input_arrow("a->b", &a, &b); - api.input_rect("rect", &rect); + context.input_point("p", &p); + context.input_arrow("a->b", &a, &b); + context.input_rect("rect", &rect); - api.finish_frame(); + context.finish_frame(); return true; } |
