diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lluictrl.h | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h index db41af8..be8e863 100644 --- a/linden/indra/llui/lluictrl.h +++ b/linden/indra/llui/lluictrl.h | |||
@@ -39,31 +39,8 @@ | |||
39 | #include "llsd.h" | 39 | #include "llsd.h" |
40 | 40 | ||
41 | 41 | ||
42 | class LLFocusableElement | ||
43 | { | ||
44 | friend class LLFocusMgr; // allow access to focus change handlers | ||
45 | public: | ||
46 | LLFocusableElement(); | ||
47 | virtual ~LLFocusableElement(); | ||
48 | |||
49 | virtual void setFocus( BOOL b ); | ||
50 | virtual BOOL hasFocus() const; | ||
51 | |||
52 | void setFocusLostCallback(void (*cb)(LLFocusableElement* caller, void*), void* user_data = NULL) { mFocusLostCallback = cb; mFocusCallbackUserData = user_data; } | ||
53 | void setFocusReceivedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL) { mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; } | ||
54 | void setFocusChangedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL ) { mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; } | ||
55 | |||
56 | protected: | ||
57 | virtual void onFocusReceived(); | ||
58 | virtual void onFocusLost(); | ||
59 | void (*mFocusLostCallback)( LLFocusableElement* caller, void* userdata ); | ||
60 | void (*mFocusReceivedCallback)( LLFocusableElement* ctrl, void* userdata ); | ||
61 | void (*mFocusChangedCallback)( LLFocusableElement* ctrl, void* userdata ); | ||
62 | void* mFocusCallbackUserData; | ||
63 | }; | ||
64 | |||
65 | class LLUICtrl | 42 | class LLUICtrl |
66 | : public LLView, public LLFocusableElement | 43 | : public LLView |
67 | { | 44 | { |
68 | public: | 45 | public: |
69 | typedef void (*LLUICtrlCallback)(LLUICtrl* ctrl, void* userdata); | 46 | typedef void (*LLUICtrlCallback)(LLUICtrl* ctrl, void* userdata); |
@@ -117,6 +94,7 @@ public: | |||
117 | virtual void clear(); | 94 | virtual void clear(); |
118 | virtual void setDoubleClickCallback( void (*cb)(void*) ); | 95 | virtual void setDoubleClickCallback( void (*cb)(void*) ); |
119 | virtual void setColor(const LLColor4& color); | 96 | virtual void setColor(const LLColor4& color); |
97 | virtual void setAlpha(F32 alpha); | ||
120 | virtual void setMinValue(LLSD min_value); | 98 | virtual void setMinValue(LLSD min_value); |
121 | virtual void setMaxValue(LLSD max_value); | 99 | virtual void setMaxValue(LLSD max_value); |
122 | 100 | ||