]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/remote.h
Add a new remote control program with GLtk-based UI
[r2c2.git] / source / remote / remote.h
index 4599a139af32989b2c0c4212168c8d15694cac29..bff56eddc21efa055c46c83ed043a908c96fe41d 100644 (file)
@@ -1,37 +1,39 @@
-/* $Id$
-
-This file is part of the MSP Märklin suite
-Copyright © 2009  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef REMOTE_H_
 #define REMOTE_H_
 
-#include <gtkmm/main.h>
-#include <gtkmm/window.h>
-#include <gtkmm/box.h>
 #include <msp/core/application.h>
+#include <msp/gltk/resources.h>
+#include <msp/gltk/root.h>
+#include <msp/graphics/simplewindow.h>
+#include <msp/io/eventdispatcher.h>
+#include <msp/time/timestamp.h>
 #include "network/client.h"
+#include "statusbar.h"
+#include "trainpanel.h"
+#include "trainselector.h"
 
-class Remote: public Msp::Application
+class Remote: public Msp::RegisteredApplication<Remote>
 {
 private:
-       Msp::IO::EventDispatcher event_disp;
-       Marklin::Catalogue catalogue;
-       Marklin::Client client;
-       Gtk::Main gtk;
-       Gtk::Window window;
-       Gtk::Box *train_box;
-
-       static Msp::Application::RegApp<Remote> reg;
+       Msp::Graphics::SimpleGLWindow window;
+       R2C2::Catalogue catalogue;
+       R2C2::Client client;
+       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);
-private:
-       void tick();
+       Remote(int, char **);
 
-       void train_added(Marklin::NetTrain &);
+       virtual int main();
+private:
+       virtual void tick();
+       void train_selected(R2C2::NetTrain *, unsigned);
 };
 
 #endif