blob: 1d3d4a728bfdc479eda6cfaf79e5a626ef7bb4d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/**
* @file lltoolfocus.h
* @brief A tool to set the build focus point.
*
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#ifndef LL_LLTOOLFOCUS_H
#define LL_LLTOOLFOCUS_H
#include "lltool.h"
class LLToolCamera
: public LLTool
{
public:
LLToolCamera();
virtual ~LLToolCamera();
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
virtual BOOL handleHover(S32 x, S32 y, MASK mask);
virtual void onMouseCaptureLost();
virtual void handleSelect();
virtual void handleDeselect();
static void pickCallback(S32 x, S32 y, MASK mask);
BOOL mouseSteerMode() { return mMouseSteering; }
protected:
// called from handleMouseUp and onMouseCaptureLost to "let go"
// of the mouse and make it visible JC
void releaseMouse();
protected:
S32 mAccumX;
S32 mAccumY;
S32 mMouseDownX;
S32 mMouseDownY;
BOOL mOutsideSlopX;
BOOL mOutsideSlopY;
BOOL mValidClickPoint;
BOOL mMouseSteering;
S32 mMouseUpX; // needed for releaseMouse()
S32 mMouseUpY;
MASK mMouseUpMask;
};
extern LLToolCamera *gToolCamera;
extern BOOL gCameraBtnOrbit;
extern BOOL gCameraBtnPan;
#endif
|