diff options
Diffstat (limited to 'linden/indra/newview/qtoolalign.h')
-rw-r--r-- | linden/indra/newview/qtoolalign.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/linden/indra/newview/qtoolalign.h b/linden/indra/newview/qtoolalign.h new file mode 100644 index 0000000..b2c18b7 --- /dev/null +++ b/linden/indra/newview/qtoolalign.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /** | ||
2 | * @file qtoolalign.h | ||
3 | * @brief A tool to align objects | ||
4 | * @author Karl Stiefvater (Qarl) | ||
5 | * | ||
6 | * Karl has given permission to use this code under the terms of | ||
7 | * the GNU GPL v2 plus FLOSS exception and/or the GNU LGPL v2.1. | ||
8 | * | ||
9 | * Backported for Viewer 1.X code base by Jacek Antonelli. | ||
10 | */ | ||
11 | |||
12 | #ifndef Q_QTOOLALIGN_H | ||
13 | #define Q_QTOOLALIGN_H | ||
14 | |||
15 | #include "lltool.h" | ||
16 | #include "llbbox.h" | ||
17 | |||
18 | class LLViewerObject; | ||
19 | class LLPickInfo; | ||
20 | class LLToolSelectRect; | ||
21 | |||
22 | class QToolAlign | ||
23 | : public LLTool, public LLSingleton<QToolAlign> | ||
24 | { | ||
25 | public: | ||
26 | QToolAlign(); | ||
27 | virtual ~QToolAlign(); | ||
28 | |||
29 | virtual void handleSelect(); | ||
30 | virtual void handleDeselect(); | ||
31 | virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); | ||
32 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | ||
33 | virtual void render(); | ||
34 | |||
35 | static void pickCallback(const LLPickInfo& pick_info); | ||
36 | |||
37 | private: | ||
38 | void align(); | ||
39 | void computeManipulatorSize(); | ||
40 | void renderManipulators(); | ||
41 | BOOL findSelectedManipulator(S32 x, S32 y); | ||
42 | |||
43 | LLBBox mBBox; | ||
44 | F32 mManipulatorSize; | ||
45 | S32 mHighlightedAxis; | ||
46 | F32 mHighlightedDirection; | ||
47 | BOOL mForce; | ||
48 | }; | ||
49 | |||
50 | #endif // Q_QTOOLALIGN_H | ||