X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Ftrainview.h;h=598b43fab9209bb520228bd886d9961e9f8e5b34;hb=19a73af1fb956636cb8b9d563ffb6a42e827a5bf;hp=16a1ef978ac46480099894b5521fdd139c1e7e20;hpb=fcaa883538f98bac71ba1a90f98950bb2aa08d88;p=r2c2.git diff --git a/source/engineer/trainview.h b/source/engineer/trainview.h index 16a1ef9..598b43f 100644 --- a/source/engineer/trainview.h +++ b/source/engineer/trainview.h @@ -1,22 +1,16 @@ -/* $Id$ - -This file is part of the MSP Märklin suite -Copyright © 2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef TRAINVIEW_H_ #define TRAINVIEW_H_ #include #include #include -#include -#include "libmarklin/train.h" +#include +#include +#include "libr2c2/train.h" class Engineer; -class TrainView: public Msp::GLtk::Panel +class TrainView: public Msp::GLtk::Dialog { public: enum Mode @@ -28,24 +22,25 @@ public: private: Engineer &engineer; - const Marklin::Train &train; + const R2C2::Train &train; + Msp::GLtk::Toggle *tgl_forward; Mode mode; + bool forward; Msp::GL::Framebuffer fbo; Msp::GL::Texture2D tex; Msp::GL::Renderbuffer depth; - Msp::GL::Camera camera; - Msp::GL::Pipeline pipeline; - bool stale; + R2C2::View3D view; public: - TrainView(Engineer &, const Marklin::Train &); + TrainView(Engineer &, const R2C2::Train &); ~TrainView(); void set_mode(Mode); - void prepare(); private: - virtual void button_release(int, int, unsigned); - void close_clicked(); + void ui_mode_toggled(bool, Mode); +public: + void set_forward(bool); + void prepare(); }; #endif