]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/manipulator.h
Add an internal layout to Catalogue for selecting tracks
[r2c2.git] / source / designer / manipulator.h
index 9e17384e4ee39b90c178d8e55c402e81bc9ec601..2ed49fb1a754bf8a2f1caf6e336896a78aafc7be 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
 #ifndef MANIPULATOR_H_
 #define MANIPULATOR_H_
 
@@ -9,22 +16,6 @@ class Selection;
 
 class Manipulator
 {
-public:
-       sigc::signal<void, const std::string &> signal_status;
-       sigc::signal<void, bool> signal_done;
-
-       Manipulator(Designer &);
-       void set_selection(Selection *);
-       void start_move();
-       void start_rotate();
-       void start_elevate();
-       void duplicate();
-       void flatten();
-       void even_slope(bool =false);
-       void cancel();
-       void button_press(int, int, float, float, unsigned);
-       void pointer_motion(int, int, float, float);
-       void render();
 private:
        enum Mode
        {
@@ -59,8 +50,13 @@ private:
                float height;
        };
 
-       Designer   &designer;
-       Selection  *selection;
+public:
+       sigc::signal<void, const std::string &> signal_status;
+       sigc::signal<void, bool> signal_done;
+
+private:
+       Designer &designer;
+       Selection &selection;
        std::vector<MTrack> tracks;
        Marklin::Point center;
 
@@ -69,15 +65,28 @@ private:
        float wrap_rot;
 
        Marklin::Point gpointer;
-       int            pointer_y;
-       Mode           mode;
+       int pointer_y;
+       Mode mode;
        Marklin::Point move_origin;
-       float          angle;
-       float          rot_origin;
-       int            elev_origin;
+       float angle;
+       float rot_origin;
+       int elev_origin;
        std::set<Marklin::Track *> neighbors;
-       sigc::connection selection_changed_conn;
 
+public:
+       Manipulator(Designer &, Selection &);
+
+       void start_move();
+       void start_rotate();
+       void start_elevate();
+       void duplicate();
+       void flatten();
+       void even_slope(bool =false);
+       void cancel();
+       void button_press(int, int, float, float, unsigned);
+       void pointer_motion(int, int, float, float);
+       void render();
+private:
        void selection_changed();
        void update_wrap();
        void update_neighbors();