aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llfocusmgr.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llfocusmgr.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/linden/indra/llui/llfocusmgr.h b/linden/indra/llui/llfocusmgr.h
index 3bd5b35..842c874 100644
--- a/linden/indra/llui/llfocusmgr.h
+++ b/linden/indra/llui/llfocusmgr.h
@@ -45,48 +45,48 @@ class LLFocusMgr
45{ 45{
46public: 46public:
47 LLFocusMgr(); 47 LLFocusMgr();
48 ~LLFocusMgr(); 48 ~LLFocusMgr() { mFocusHistory.clear(); }
49 49
50 // Mouse Captor 50 // Mouse Captor
51 void setMouseCapture(LLMouseHandler* new_captor); // new_captor = NULL to release the mouse. 51 void setMouseCapture(LLMouseHandler* new_captor); // new_captor = NULL to release the mouse.
52 LLMouseHandler* getMouseCapture() { return mMouseCaptor; } 52 LLMouseHandler* getMouseCapture() const { return mMouseCaptor; }
53 void removeMouseCaptureWithoutCallback( LLMouseHandler* captor ); 53 void removeMouseCaptureWithoutCallback( const LLMouseHandler* captor );
54 BOOL childHasMouseCapture( LLView* parent ); 54 BOOL childHasMouseCapture( const LLView* parent ) const;
55 55
56 // Keyboard Focus 56 // Keyboard Focus
57 void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE); // new_focus = NULL to release the focus. 57 void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE); // new_focus = NULL to release the focus.
58 LLUICtrl* getKeyboardFocus() const { return mKeyboardFocus; } 58 LLUICtrl* getKeyboardFocus() const { return mKeyboardFocus; }
59 LLUICtrl* getLastKeyboardFocus() const { return mLastKeyboardFocus; } 59 LLUICtrl* getLastKeyboardFocus() const { return mLastKeyboardFocus; }
60 BOOL childHasKeyboardFocus( const LLView* parent ) const; 60 BOOL childHasKeyboardFocus( const LLView* parent ) const;
61 void removeKeyboardFocusWithoutCallback( LLView* focus ); 61 void removeKeyboardFocusWithoutCallback( const LLView* focus );
62 F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); } 62 F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); }
63 F32 getFocusFlashAmt(); 63 F32 getFocusFlashAmt() const;
64 LLColor4 getFocusColor(); 64 LLColor4 getFocusColor() const;
65 void triggerFocusFlash(); 65 void triggerFocusFlash();
66 BOOL getAppHasFocus() { return mAppHasFocus; } 66 BOOL getAppHasFocus() const { return mAppHasFocus; }
67 void setAppHasFocus(BOOL focus); 67 void setAppHasFocus(BOOL focus);
68 LLUICtrl* getLastFocusForGroup(LLView* subtree_root); 68 LLUICtrl* getLastFocusForGroup(LLView* subtree_root) const;
69 void clearLastFocusForGroup(LLView* subtree_root); 69 void clearLastFocusForGroup(LLView* subtree_root);
70 70
71 // If setKeyboardFocus(NULL) is called, and there is a non-NULL default 71 // If setKeyboardFocus(NULL) is called, and there is a non-NULL default
72 // keyboard focus view, focus goes there. JC 72 // keyboard focus view, focus goes there. JC
73 void setDefaultKeyboardFocus(LLUICtrl* default_focus); 73 void setDefaultKeyboardFocus(LLUICtrl* default_focus) { mDefaultKeyboardFocus = default_focus; }
74 LLUICtrl* getDefaultKeyboardFocus() const { return mDefaultKeyboardFocus; } 74 LLUICtrl* getDefaultKeyboardFocus() const { return mDefaultKeyboardFocus; }
75 75
76 76
77 // Top View 77 // Top View
78 void setTopCtrl(LLUICtrl* new_top); 78 void setTopCtrl(LLUICtrl* new_top);
79 LLUICtrl* getTopCtrl() const { return mTopCtrl; } 79 LLUICtrl* getTopCtrl() const { return mTopCtrl; }
80 void removeTopCtrlWithoutCallback( LLUICtrl* top_view ); 80 void removeTopCtrlWithoutCallback( const LLUICtrl* top_view );
81 BOOL childIsTopCtrl( LLView* parent ); 81 BOOL childIsTopCtrl( const LLView* parent ) const;
82 82
83 // All Three 83 // All Three
84 void releaseFocusIfNeeded( LLView* top_view ); 84 void releaseFocusIfNeeded( const LLView* top_view );
85 void lockFocus(); 85 void lockFocus();
86 void unlockFocus(); 86 void unlockFocus();
87 BOOL focusLocked() { return mLockedView != NULL; } 87 BOOL focusLocked() const { return mLockedView != NULL; }
88 88
89protected: 89private:
90 LLUICtrl* mLockedView; 90 LLUICtrl* mLockedView;
91 91
92 // Mouse Captor 92 // Mouse Captor
@@ -105,7 +105,7 @@ protected:
105 105
106 BOOL mAppHasFocus; 106 BOOL mAppHasFocus;
107 107
108 typedef std::map<LLViewHandle, LLViewHandle> focus_history_map_t; 108 typedef std::map<LLHandle<LLView>, LLHandle<LLView> > focus_history_map_t;
109 focus_history_map_t mFocusHistory; 109 focus_history_map_t mFocusHistory;
110 110
111 #ifdef _DEBUG 111 #ifdef _DEBUG
@@ -119,3 +119,4 @@ extern LLFocusMgr gFocusMgr;
119 119
120#endif // LL_LLFOCUSMGR_H 120#endif // LL_LLFOCUSMGR_H
121 121
122