]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/engineer.h
Split block allocation to a separate class
[r2c2.git] / source / engineer / engineer.h
index 85dc347937b1f7d55d1e7654186f3911a01bff48..72fdd29c877fcd778f0a829c9fec6f51fd4a049e 100644 (file)
@@ -30,6 +30,8 @@ private:
        Options options;
 
        Msp::Graphics::SimpleGLWindow window;
+       Msp::Input::Keyboard keyboard;
+       Msp::Input::Mouse mouse;
        Msp::GLtk::Resources ui_res;
        Msp::GLtk::Root *root;
 
@@ -48,6 +50,7 @@ private:
        Msp::GL::Mesh arrow_mesh;
 
        MainPanel *main_panel;
+       std::list<R2C2::Train *> new_trains;
        std::list<TrainPanel *> train_panels;
        std::list<TrainView *> train_views;
        Msp::Time::TimeStamp status_timeout;
@@ -55,8 +58,7 @@ private:
        R2C2::Track *picking_track;
        int picking_entry;
        R2C2::Path3D *picking_path;
-       int pointer_x;
-       int pointer_y;
+       R2C2::Vector pointer;
        bool pointer_moved;
 
 public:
@@ -78,15 +80,16 @@ public:
        void quit() { exit(0); }
 private:
        void tick();
-       void button_press(int, int, unsigned, unsigned);
-       void pointer_motion(int, int);
+       void button_press(unsigned);
+       void axis_motion(unsigned, float, float);
        void view_all();
        void set_block_color(const R2C2::Block &, const Msp::GL::Color &);
        void reset_block_color(const R2C2::Block &);
        void sensor_event(unsigned, bool);
        void block_reserved(const R2C2::Block &, const R2C2::Train *);
-       R2C2::Track *pick_track(int, int);
+       R2C2::Track *pick_track(const R2C2::Vector &);
        void train_added(R2C2::Train &);
+       void process_new_train(R2C2::Train &);
        virtual void sighandler(int);
 };