3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
12 #include <msp/core/application.h>
13 #include <msp/gl/font.h>
14 #include <msp/time/timestamp.h>
15 #include "libmarklin/catalogue.h"
16 #include "libmarklin/layout.h"
17 #include "3d/layout.h"
25 class Designer: public Msp::Application
40 Marklin::Catalogue catalogue;
41 Marklin::Layout *layout;
42 Marklin::Layout3D *layout_3d;
43 Marklin::Layout *cat_layout;
44 Marklin::Layout3D *cat_layout_3d;
46 Manipulator *manipulator;
52 Marklin::Point cam_pos;
64 Msp::Time::TimeStamp tooltip_timeout;
65 Msp::Time::TimeStamp last_tick;
68 Designer(int, char **);
71 Marklin::Layout *get_layout() { return layout; }
72 Marklin::Layout3D *get_layout_3d() { return layout_3d; }
73 Msp::GL::Font &get_font() { return *font; }
75 void map_pointer_coords(int, int, float &, float &);
78 void key_press(unsigned, unsigned, wchar_t);
79 void key_release(unsigned, unsigned);
80 void button_press(int, int, float, float, unsigned);
81 void pointer_motion(int, int, float, float);
85 Marklin::Track3D *pick_track(int, int);
86 void manipulation_status(const std::string &);
87 void manipulation_done(bool);
88 void measure_changed();
90 void move_tooltip(int, int);
92 void turnout_id_accept();
93 void sensor_id_accept();
96 static Msp::Application::RegApp<Designer> reg;