]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/designer.h
Remove the scripting-based timetable
[r2c2.git] / source / designer / designer.h
index cbf01d040a07b82808893fdd305f8732ade02080..fd70358c56698b0ee923a478d1902becdce06e35 100644 (file)
@@ -1,16 +1,9 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef DESIGNER_H_
 #define DESIGNER_H_
 
 #include <string>
 #include <msp/core/application.h>
-#include <msp/gbase/simplewindow.h>
+#include <msp/graphics/simplewindow.h>
 #include <msp/gl/camera.h>
 #include <msp/gl/font.h>
 #include <msp/gl/light.h>
@@ -31,11 +24,11 @@ Distributed under the GPL
 #include "manipulator.h"
 #include "measure.h"
 #include "selection.h"
-#include "trackwrap.h"
+#include "selectionwrap.h"
 
 class Toolbar;
 
-class Designer: public Msp::Application
+class Designer: public Msp::RegisteredApplication<Designer>
 {
 private:
        enum Mode
@@ -48,6 +41,8 @@ private:
        };
 
        Msp::Graphics::SimpleGLWindow window;
+       Msp::Input::Keyboard keyboard;
+       Msp::Input::Mouse mouse;
        Msp::GLtk::Resources ui_res;
        Msp::GLtk::Root root;
 
@@ -70,15 +65,13 @@ private:
 
        Mode mode;
        Selection selection;
+       SelectionWrap sel_wrap;
        Manipulator manipulator;
        Measure measure;
        CameraController *camera_ctl;
-       TrackWrap *track_wrap;
 
        Msp::Time::TimeStamp last_tick;
 
-       static Msp::Application::RegApp<Designer> reg;
-
 public:
        Designer(int, char **);
        ~Designer();
@@ -112,17 +105,17 @@ public:
        R2C2::Zone *get_current_zone() const { return cur_zone; }
        void add_selection_to_zone();
 
-       R2C2::Vector map_pointer_to_ground(int, int);
+       R2C2::Vector map_pointer_to_ground(const R2C2::Vector &);
 private:
        void tick();
-       void key_press(unsigned, unsigned, wchar_t);
-       void button_press(int, int, unsigned, unsigned);
-       void pointer_motion(int, int);
+       void key_press(unsigned);
+       void button_press(unsigned);
+       void axis_motion(unsigned, float, float);
        void apply_camera();
        void render();
-       void track_added(R2C2::Track &);
-       void track_removed(R2C2::Track &);
-       R2C2::Track *pick_track(int, int);
+       void object_added(R2C2::Object &);
+       void object_removed(R2C2::Object &);
+       R2C2::Object *pick_object(const R2C2::Vector &);
        void update_track_icon(R2C2::Track3D &);
        void selection_changed();
        void manipulation_status(const std::string &);