X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fengineer%2Fengineer.h;h=d7fb2b859ed61408abb4bff097db1642ab096674;hb=5116fff210cdc3f0fbdae13046cc60450aad5e8f;hp=4ca753e949f230b864acf266f3e07b2403c86294;hpb=1ff06c5bc46a677fa389ef86c6b26664368f1653;p=r2c2.git diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index 4ca753e..d7fb2b8 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -1,15 +1,8 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef ENGINEER_H_ #define ENGINEER_H_ #include -#include +#include #include #include #include @@ -24,11 +17,10 @@ Distributed under the GPL #include "network/server.h" #include "options.h" -class MainPanel; -class TrainPanel; +class MainWindow; class TrainView; -class Engineer: public Msp::Application +class Engineer: public Msp::RegisteredApplication { public: sigc::signal signal_pick_done; @@ -37,6 +29,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; @@ -54,16 +48,15 @@ private: Msp::GL::Pipeline pipeline; Msp::GL::Mesh arrow_mesh; - MainPanel *main_panel; - std::list train_panels; + MainWindow *main_wnd; + std::list new_trains; std::list train_views; Msp::Time::TimeStamp status_timeout; bool picking; R2C2::Track *picking_track; int picking_entry; R2C2::Path3D *picking_path; - int pointer_x; - int pointer_y; + R2C2::Vector pointer; bool pointer_moved; public: @@ -77,7 +70,6 @@ public: R2C2::Layout3D &get_layout_3d() { return layout_3d; } const Msp::GL::Lighting &get_lighting() const { return lighting; } void set_status(const std::string &); - void rearrange_panels(); void add_train_view(TrainView &); void remove_train_view(TrainView &); void pick(bool); @@ -85,18 +77,15 @@ 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::Track3D *pick_track(int, int); + R2C2::Object *pick_object(const R2C2::Vector &); void train_added(R2C2::Train &); + void process_new_train(R2C2::Train &); virtual void sighandler(int); - - static Msp::Application::RegApp reg; }; #endif