X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fdesigner.h;h=c2c949eb409e706243db867eeb0115c2467c6934;hb=de09cba1d12af38ff2e7e4312d67624fe63bf0e4;hp=ece41a5dadb021fb96fc64587472f8763b1338eb;hpb=6c61179fe09af2f5366d50f10aadbf5f83438087;p=r2c2.git diff --git a/source/designer/designer.h b/source/designer/designer.h index ece41a5..c2c949e 100644 --- a/source/designer/designer.h +++ b/source/designer/designer.h @@ -1,8 +1,18 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef DESIGNER_H_ #define DESIGNER_H_ #include #include +#include +#include +#include #include #include #include "libmarklin/catalogue.h" @@ -17,14 +27,6 @@ class Selection; class Designer: public Msp::Application { -public: - Designer(int, char **); - Marklin::Layout *get_layout() { return layout; } - Marklin::Layout3D *get_layout_3d() { return layout_3d; } - Msp::GL::Font &get_font() { return *font; } - int main(); - void map_pointer_coords(int, int, float &, float &); - ~Designer(); private: enum Mode { @@ -35,6 +37,9 @@ private: INPUT }; + Msp::Graphics::Display *dpy; + Msp::Graphics::Window *wnd; + Msp::Graphics::GLContext *glc; unsigned screen_w; unsigned screen_h; Msp::GL::Font *font; @@ -61,15 +66,25 @@ private: int pointer_y; int tooltip_x; int tooltip_y; - std::wstring tooltip; + std::string tooltip; Msp::Time::TimeStamp tooltip_timeout; Msp::Time::TimeStamp last_tick; +public: + Designer(int, char **); + ~Designer(); + + Marklin::Layout *get_layout() { return layout; } + Marklin::Layout3D *get_layout_3d() { return layout_3d; } + Msp::GL::Font &get_font() { return *font; } + int main(); + void map_pointer_coords(int, int, float &, float &); +private: void tick(); void key_press(unsigned, unsigned, wchar_t); void key_release(unsigned, unsigned); - void button_press(int, int, float, float, unsigned); - void pointer_motion(int, int, float, float); + void button_press(int, int, unsigned, unsigned); + void pointer_motion(int, int); void project_3d(); void apply_camera(); void render();