]> git.tdb.fi Git - r2c2.git/blob - source/remote/remote.h
6d6be3377aa1f1cc71ffb2b4407c88335f0ee03e
[r2c2.git] / source / remote / remote.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
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 TrainPanel;
18
19 class Remote: public Msp::Application
20 {
21 private:
22         Msp::IO::EventDispatcher event_disp;
23         Marklin::Catalogue catalogue;
24         Marklin::Client client;
25         Gtk::Main gtk;
26         Gtk::Window window;
27         Gtk::Box *train_box;
28         std::vector<TrainPanel *> train_panels;
29
30         static Msp::Application::RegApp<Remote> reg;
31
32 public:
33         Remote(int argc, char **argv);
34
35         const Marklin::Catalogue &get_catalogue() const { return catalogue; }
36 private:
37         void tick();
38
39         void train_added(Marklin::NetTrain &);
40 };
41
42 #endif