]> git.tdb.fi Git - r2c2.git/blob - source/remote/remote.h
Add a new remote control program with GLtk-based UI
[r2c2.git] / source / remote / remote.h
1 #ifndef REMOTE_H_
2 #define REMOTE_H_
3
4 #include <msp/core/application.h>
5 #include <msp/gltk/resources.h>
6 #include <msp/gltk/root.h>
7 #include <msp/graphics/simplewindow.h>
8 #include <msp/io/eventdispatcher.h>
9 #include <msp/time/timestamp.h>
10 #include "network/client.h"
11 #include "statusbar.h"
12 #include "trainpanel.h"
13 #include "trainselector.h"
14
15 class Remote: public Msp::RegisteredApplication<Remote>
16 {
17 private:
18         Msp::Graphics::SimpleGLWindow window;
19         R2C2::Catalogue catalogue;
20         R2C2::Client client;
21         Msp::IO::EventDispatcher ev_disp;
22         Msp::GLtk::Resources ui_resources;
23         Msp::GLtk::Root root;
24         Msp::GLtk::Layout *root_layout;
25         TrainSelector *selectors[2];
26         TrainPanel *panels[2];
27         StatusBar status_bar;
28         Msp::Time::TimeStamp next_frame;
29
30 public:
31         Remote(int, char **);
32
33         virtual int main();
34 private:
35         virtual void tick();
36         void train_selected(R2C2::NetTrain *, unsigned);
37 };
38
39 #endif