X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdesigner%2Fmanipulator.h;h=12e551bb7a1da125a7c3365f4806271b5d561d2c;hb=679c37910ab4d8030b3c09f6591381789b14a5f0;hp=d8c3986a6161db02dd1bea7a84bd44a8e09d6841;hpb=f8a7788cee0261babfc4c804a58515aad6dfbc3d;p=r2c2.git diff --git a/source/designer/manipulator.h b/source/designer/manipulator.h index d8c3986..12e551b 100644 --- a/source/designer/manipulator.h +++ b/source/designer/manipulator.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef MANIPULATOR_H_ #define MANIPULATOR_H_ @@ -25,13 +18,13 @@ private: EXTEND }; - struct MTrack + struct MObject { - R2C2::Track *track; + R2C2::Object *object; R2C2::Vector pos; float rot; - MTrack(R2C2::Track *); + MObject(R2C2::Object *); }; struct TrackOrder @@ -48,23 +41,23 @@ public: private: Designer &designer; - Msp::Graphics::EventSource &event_source; + Msp::Input::Mouse &mouse; Selection &selection; - std::vector tracks; + std::vector objects; R2C2::Vector center; + R2C2::Vector pointer; R2C2::Vector gpointer; - int pointer_y; Mode mode; R2C2::Vector move_origin; float angle; float rot_origin; - int elev_origin; - std::set neighbors; + float elev_origin; + std::set neighbors; std::vector extend_tracks; public: - Manipulator(Designer &, Msp::Graphics::EventSource &, Selection &); + Manipulator(Designer &, Msp::Input::Mouse &, Selection &); void start_move(); void start_rotate(); @@ -76,10 +69,10 @@ public: void connect(); void cancel(); private: - void button_press(int, int, unsigned, unsigned); - void pointer_motion(int, int); + void button_press(unsigned); + void axis_motion(unsigned, float, float); void selection_changed(); - void update_tracks(); + void update_objects(); void update_neighbors(); void set_slope(TrackOrder &, float, float); std::vector create_straight(const R2C2::Vector &, float, float, float);