X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.h;h=2bb079d62f3ab5c8c1d77ceab832294611f30bee;hb=abc0c5d8d150dafcf61aa522d56b2a36ee662229;hp=907fae01ba268161966ef6425a7ff1788e679355;hpb=ce29d0ccf89840c9581314301de0ea2b5b261c43;p=r2c2.git diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index 907fae0..2bb079d 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -21,7 +21,7 @@ class MainPanel; class TrainPanel; class TrainView; -class Engineer: public Msp::Application +class Engineer: public Msp::RegisteredApplication { public: sigc::signal signal_pick_done; @@ -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; @@ -55,8 +57,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,18 +79,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 &); virtual void sighandler(int); - - static Msp::Application::RegApp reg; }; #endif