X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fremote%2Fremote.h;h=bff56eddc21efa055c46c83ed043a908c96fe41d;hb=3ffe8b384fabeee1c3e636b83dd0006f3f5acfe1;hp=b4c5c129b904b5e5390c4cb8150d9296f0e53dc2;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/remote/remote.h b/source/remote/remote.h index b4c5c12..bff56ed 100644 --- a/source/remote/remote.h +++ b/source/remote/remote.h @@ -1,37 +1,39 @@ #ifndef REMOTE_H_ #define REMOTE_H_ -#include -#include -#include #include +#include +#include +#include +#include +#include #include "network/client.h" +#include "statusbar.h" +#include "trainpanel.h" +#include "trainselector.h" -class MainPanel; -class TrainPanel; - -class Remote: public Msp::Application +class Remote: public Msp::RegisteredApplication { private: - Msp::IO::EventDispatcher event_disp; + Msp::Graphics::SimpleGLWindow window; R2C2::Catalogue catalogue; R2C2::Client client; - Gtk::Main gtk; - Gtk::Window window; - Gtk::Box *panel_box; - MainPanel *main_panel; - std::vector train_panels; - - static Msp::Application::RegApp reg; + Msp::IO::EventDispatcher ev_disp; + Msp::GLtk::Resources ui_resources; + Msp::GLtk::Root root; + Msp::GLtk::Layout *root_layout; + TrainSelector *selectors[2]; + TrainPanel *panels[2]; + StatusBar status_bar; + Msp::Time::TimeStamp next_frame; public: - Remote(int argc, char **argv); + Remote(int, char **); - const R2C2::Catalogue &get_catalogue() const { return catalogue; } + virtual int main(); private: - void tick(); - - void train_added(R2C2::NetTrain &); + virtual void tick(); + void train_selected(R2C2::NetTrain *, unsigned); }; #endif