-/* $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