]> git.tdb.fi Git - r2c2.git/blob - source/remote/remote.h
Send and receive power/halt states over network
[r2c2.git] / source / remote / remote.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2009-2010  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef REMOTE_H_
9 #define REMOTE_H_
10
11 #include <gtkmm/main.h>
12 #include <gtkmm/window.h>
13 #include <gtkmm/box.h>
14 #include <msp/core/application.h>
15 #include "network/client.h"
16
17 class MainPanel;
18 class TrainPanel;
19
20 class Remote: public Msp::Application
21 {
22 private:
23         Msp::IO::EventDispatcher event_disp;
24         R2C2::Catalogue catalogue;
25         R2C2::Client client;
26         Gtk::Main gtk;
27         Gtk::Window window;
28         Gtk::Box *panel_box;
29         MainPanel *main_panel;
30         std::vector<TrainPanel *> train_panels;
31
32         static Msp::Application::RegApp<Remote> reg;
33
34 public:
35         Remote(int argc, char **argv);
36
37         const R2C2::Catalogue &get_catalogue() const { return catalogue; }
38 private:
39         void tick();
40
41         void train_added(R2C2::NetTrain &);
42 };
43
44 #endif