diff options
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/CMakeLists.txt | 15 | ||||
-rw-r--r-- | linden/indra/llui/llbutton.cpp | 5 | ||||
-rw-r--r-- | linden/indra/llui/llbutton.h | 3 | ||||
-rw-r--r-- | linden/indra/llui/llfloater.cpp | 8 | ||||
-rw-r--r-- | linden/indra/llui/llfocusmgr.cpp | 84 | ||||
-rw-r--r-- | linden/indra/llui/llfocusmgr.h | 49 | ||||
-rw-r--r-- | linden/indra/llui/lliconctrl.cpp | 6 | ||||
-rw-r--r-- | linden/indra/llui/lliconctrl.h | 2 | ||||
-rw-r--r-- | linden/indra/llui/llmultisliderctrl.cpp | 3 | ||||
-rw-r--r-- | linden/indra/llui/llpanel.cpp | 19 | ||||
-rw-r--r-- | linden/indra/llui/llpanel.h | 3 | ||||
-rw-r--r-- | linden/indra/llui/llsliderctrl.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llui/llspinctrl.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/lltextparser.cpp | 48 | ||||
-rw-r--r-- | linden/indra/llui/lltextparser.h | 7 | ||||
-rw-r--r-- | linden/indra/llui/llui.cpp | 1 | ||||
-rw-r--r-- | linden/indra/llui/lluictrl.cpp | 55 | ||||
-rw-r--r-- | linden/indra/llui/lluictrl.h | 26 | ||||
-rw-r--r-- | linden/indra/llui/llview.cpp | 7 | ||||
-rw-r--r-- | linden/indra/llui/llview.h | 14 |
20 files changed, 186 insertions, 172 deletions
diff --git a/linden/indra/llui/CMakeLists.txt b/linden/indra/llui/CMakeLists.txt index a0f80b4..e6b3b63 100644 --- a/linden/indra/llui/CMakeLists.txt +++ b/linden/indra/llui/CMakeLists.txt | |||
@@ -3,11 +3,9 @@ | |||
3 | project(llui) | 3 | project(llui) |
4 | 4 | ||
5 | include(00-Common) | 5 | include(00-Common) |
6 | include(LLAudio) | ||
7 | include(LLCommon) | 6 | include(LLCommon) |
8 | include(LLImage) | 7 | include(LLImage) |
9 | include(LLMath) | 8 | include(LLMath) |
10 | include(LLMedia) | ||
11 | include(LLMessage) | 9 | include(LLMessage) |
12 | include(LLRender) | 10 | include(LLRender) |
13 | include(LLWindow) | 11 | include(LLWindow) |
@@ -15,11 +13,9 @@ include(LLVFS) | |||
15 | include(LLXML) | 13 | include(LLXML) |
16 | 14 | ||
17 | include_directories( | 15 | include_directories( |
18 | ${LLAUDIO_INCLUDE_DIRS} | ||
19 | ${LLCOMMON_INCLUDE_DIRS} | 16 | ${LLCOMMON_INCLUDE_DIRS} |
20 | ${LLIMAGE_INCLUDE_DIRS} | 17 | ${LLIMAGE_INCLUDE_DIRS} |
21 | ${LLMATH_INCLUDE_DIRS} | 18 | ${LLMATH_INCLUDE_DIRS} |
22 | ${LLMEDIA_INCLUDE_DIRS} | ||
23 | ${LLMESSAGE_INCLUDE_DIRS} | 19 | ${LLMESSAGE_INCLUDE_DIRS} |
24 | ${LLRENDER_INCLUDE_DIRS} | 20 | ${LLRENDER_INCLUDE_DIRS} |
25 | ${LLWINDOW_INCLUDE_DIRS} | 21 | ${LLWINDOW_INCLUDE_DIRS} |
@@ -141,3 +137,14 @@ set_source_files_properties(${llui_HEADER_FILES} | |||
141 | list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES}) | 137 | list(APPEND llui_SOURCE_FILES ${llui_HEADER_FILES}) |
142 | 138 | ||
143 | add_library (llui ${llui_SOURCE_FILES}) | 139 | add_library (llui ${llui_SOURCE_FILES}) |
140 | # Libraries on which this library depends, needed for Linux builds | ||
141 | # Sort by high-level to low-level | ||
142 | target_link_libraries(llui | ||
143 | llrender | ||
144 | llwindow | ||
145 | llimage | ||
146 | llvfs # ugh, just for LLDir | ||
147 | llxml | ||
148 | llcommon # must be after llimage, llwindow, llrender | ||
149 | llmath | ||
150 | ) | ||
diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index 1a6c705..702e34e 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp | |||
@@ -840,6 +840,11 @@ void LLButton::setColor(const LLColor4& color) | |||
840 | setImageColor(color); | 840 | setImageColor(color); |
841 | } | 841 | } |
842 | 842 | ||
843 | void LLButton::setAlpha(F32 alpha) | ||
844 | { | ||
845 | mImageColor.setAlpha(alpha); | ||
846 | mDisabledImageColor.setAlpha(alpha * 0.5f); | ||
847 | } | ||
843 | 848 | ||
844 | void LLButton::setImageDisabled(LLPointer<LLUIImage> image) | 849 | void LLButton::setImageDisabled(LLPointer<LLUIImage> image) |
845 | { | 850 | { |
diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index 724b775..2174d95 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h | |||
@@ -136,7 +136,8 @@ public: | |||
136 | 136 | ||
137 | void setImageColor(const std::string& color_control); | 137 | void setImageColor(const std::string& color_control); |
138 | void setImageColor(const LLColor4& c); | 138 | void setImageColor(const LLColor4& c); |
139 | virtual void setColor(const LLColor4& c); | 139 | /*virtual*/ void setColor(const LLColor4& c); |
140 | /*virtual*/ void setAlpha(F32 alpha); | ||
140 | 141 | ||
141 | void setImages(const std::string &image_name, const std::string &selected_name); | 142 | void setImages(const std::string &image_name, const std::string &selected_name); |
142 | void setDisabledImages(const std::string &image_name, const std::string &selected_name); | 143 | void setDisabledImages(const std::string &image_name, const std::string &selected_name); |
diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index f6451a1..bb42ca3 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp | |||
@@ -1459,9 +1459,9 @@ void LLFloater::draw() | |||
1459 | { | 1459 | { |
1460 | if (hasFocus() && getDefaultButton()->getEnabled()) | 1460 | if (hasFocus() && getDefaultButton()->getEnabled()) |
1461 | { | 1461 | { |
1462 | LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); | 1462 | LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); |
1463 | // is this button a direct descendent and not a nested widget (e.g. checkbox)? | 1463 | // is this button a direct descendent and not a nested widget (e.g. checkbox)? |
1464 | BOOL focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && focus_ctrl->getParent() == this; | 1464 | BOOL focus_is_child_button = dynamic_cast<LLButton*>(focus_ctrl) != NULL && dynamic_cast<LLButton*>(focus_ctrl)->getParent() == this; |
1465 | // only enable default button when current focus is not a button | 1465 | // only enable default button when current focus is not a button |
1466 | getDefaultButton()->setBorderEnabled(!focus_is_child_button); | 1466 | getDefaultButton()->setBorderEnabled(!focus_is_child_button); |
1467 | } | 1467 | } |
@@ -1481,7 +1481,7 @@ void LLFloater::draw() | |||
1481 | else | 1481 | else |
1482 | { | 1482 | { |
1483 | // draw children | 1483 | // draw children |
1484 | LLView* focused_child = gFocusMgr.getKeyboardFocus(); | 1484 | LLView* focused_child = dynamic_cast<LLView*>(gFocusMgr.getKeyboardFocus()); |
1485 | BOOL focused_child_visible = FALSE; | 1485 | BOOL focused_child_visible = FALSE; |
1486 | if (focused_child && focused_child->getParent() == this) | 1486 | if (focused_child && focused_child->getParent() == this) |
1487 | { | 1487 | { |
@@ -2239,7 +2239,7 @@ BOOL LLFloaterView::allChildrenClosed() | |||
2239 | LLView* viewp = *it; | 2239 | LLView* viewp = *it; |
2240 | LLFloater* floaterp = (LLFloater*)viewp; | 2240 | LLFloater* floaterp = (LLFloater*)viewp; |
2241 | 2241 | ||
2242 | if (floaterp->getVisible() && !floaterp->isDead() && floaterp->canClose()) | 2242 | if (floaterp->getVisible() && !floaterp->isDead() && floaterp->isCloseable()) |
2243 | { | 2243 | { |
2244 | return false; | 2244 | return false; |
2245 | } | 2245 | } |
diff --git a/linden/indra/llui/llfocusmgr.cpp b/linden/indra/llui/llfocusmgr.cpp index 661ffdd..96b01b9 100644 --- a/linden/indra/llui/llfocusmgr.cpp +++ b/linden/indra/llui/llfocusmgr.cpp | |||
@@ -38,6 +38,68 @@ | |||
38 | 38 | ||
39 | const F32 FOCUS_FADE_TIME = 0.3f; | 39 | const F32 FOCUS_FADE_TIME = 0.3f; |
40 | 40 | ||
41 | // NOTE: the LLFocusableElement implementation has been here from lluictrl.cpp. | ||
42 | |||
43 | LLFocusableElement::LLFocusableElement() | ||
44 | : mFocusLostCallback(NULL), | ||
45 | mFocusReceivedCallback(NULL), | ||
46 | mFocusChangedCallback(NULL), | ||
47 | mFocusCallbackUserData(NULL) | ||
48 | { | ||
49 | } | ||
50 | |||
51 | // virtual | ||
52 | BOOL LLFocusableElement::handleKey(KEY key, MASK mask, BOOL called_from_parent) | ||
53 | { | ||
54 | return FALSE; | ||
55 | } | ||
56 | |||
57 | // virtual | ||
58 | BOOL LLFocusableElement::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) | ||
59 | { | ||
60 | return FALSE; | ||
61 | } | ||
62 | |||
63 | // virtual | ||
64 | LLFocusableElement::~LLFocusableElement() | ||
65 | { | ||
66 | } | ||
67 | |||
68 | void LLFocusableElement::onFocusReceived() | ||
69 | { | ||
70 | if( mFocusReceivedCallback ) | ||
71 | { | ||
72 | mFocusReceivedCallback( this, mFocusCallbackUserData ); | ||
73 | } | ||
74 | if( mFocusChangedCallback ) | ||
75 | { | ||
76 | mFocusChangedCallback( this, mFocusCallbackUserData ); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | void LLFocusableElement::onFocusLost() | ||
81 | { | ||
82 | if( mFocusLostCallback ) | ||
83 | { | ||
84 | mFocusLostCallback( this, mFocusCallbackUserData ); | ||
85 | } | ||
86 | |||
87 | if( mFocusChangedCallback ) | ||
88 | { | ||
89 | mFocusChangedCallback( this, mFocusCallbackUserData ); | ||
90 | } | ||
91 | } | ||
92 | |||
93 | BOOL LLFocusableElement::hasFocus() const | ||
94 | { | ||
95 | return gFocusMgr.getKeyboardFocus() == this; | ||
96 | } | ||
97 | |||
98 | void LLFocusableElement::setFocus(BOOL b) | ||
99 | { | ||
100 | } | ||
101 | |||
102 | |||
41 | LLFocusMgr gFocusMgr; | 103 | LLFocusMgr gFocusMgr; |
42 | 104 | ||
43 | LLFocusMgr::LLFocusMgr() | 105 | LLFocusMgr::LLFocusMgr() |
@@ -87,11 +149,13 @@ void LLFocusMgr::releaseFocusIfNeeded( const LLView* view ) | |||
87 | } | 149 | } |
88 | 150 | ||
89 | 151 | ||
90 | void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystrokes_only) | 152 | void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock, BOOL keystrokes_only) |
91 | { | 153 | { |
92 | if (mLockedView && | 154 | if (mLockedView && |
93 | (new_focus == NULL || | 155 | (new_focus == NULL || |
94 | (new_focus != mLockedView && !new_focus->hasAncestor(mLockedView)))) | 156 | (new_focus != mLockedView |
157 | && dynamic_cast<LLView*>(new_focus) | ||
158 | && !dynamic_cast<LLView*>(new_focus)->hasAncestor(mLockedView)))) | ||
95 | { | 159 | { |
96 | // don't allow focus to go to anything that is not the locked focus | 160 | // don't allow focus to go to anything that is not the locked focus |
97 | // or one of its descendants | 161 | // or one of its descendants |
@@ -121,7 +185,8 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke | |||
121 | mFocusTimer.reset(); | 185 | mFocusTimer.reset(); |
122 | 186 | ||
123 | #ifdef _DEBUG | 187 | #ifdef _DEBUG |
124 | mKeyboardFocusName = new_focus ? new_focus->getName() : std::string("none"); | 188 | LLUICtrl* focus_ctrl = dynamic_cast<LLUICtrl*>(new_focus); |
189 | mKeyboardFocusName = focus_ctrl ? focus_ctrl->getName() : std::string("none"); | ||
125 | #endif | 190 | #endif |
126 | 191 | ||
127 | // If we've got a default keyboard focus, and the caller is | 192 | // If we've got a default keyboard focus, and the caller is |
@@ -131,8 +196,8 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke | |||
131 | mDefaultKeyboardFocus->setFocus(TRUE); | 196 | mDefaultKeyboardFocus->setFocus(TRUE); |
132 | } | 197 | } |
133 | 198 | ||
134 | LLView* focus_subtree = mKeyboardFocus; | 199 | LLView* focus_subtree = dynamic_cast<LLView*>(mKeyboardFocus); |
135 | LLView* viewp = mKeyboardFocus; | 200 | LLView* viewp = dynamic_cast<LLView*>(mKeyboardFocus); |
136 | // find root-most focus root | 201 | // find root-most focus root |
137 | while(viewp) | 202 | while(viewp) |
138 | { | 203 | { |
@@ -146,7 +211,8 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke | |||
146 | 211 | ||
147 | if (focus_subtree) | 212 | if (focus_subtree) |
148 | { | 213 | { |
149 | mFocusHistory[focus_subtree->getHandle()] = mKeyboardFocus ? mKeyboardFocus->getHandle() : LLHandle<LLView>(); | 214 | LLView* focused_view = dynamic_cast<LLView*>(mKeyboardFocus); |
215 | mFocusHistory[focus_subtree->getHandle()] = focused_view ? focused_view->getHandle() : LLHandle<LLView>(); | ||
150 | } | 216 | } |
151 | } | 217 | } |
152 | 218 | ||
@@ -160,7 +226,7 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystroke | |||
160 | // Returns TRUE is parent or any descedent of parent has keyboard focus. | 226 | // Returns TRUE is parent or any descedent of parent has keyboard focus. |
161 | BOOL LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const | 227 | BOOL LLFocusMgr::childHasKeyboardFocus(const LLView* parent ) const |
162 | { | 228 | { |
163 | LLView* focus_view = mKeyboardFocus; | 229 | LLView* focus_view = dynamic_cast<LLView*>(mKeyboardFocus); |
164 | while( focus_view ) | 230 | while( focus_view ) |
165 | { | 231 | { |
166 | if( focus_view == parent ) | 232 | if( focus_view == parent ) |
@@ -190,7 +256,7 @@ BOOL LLFocusMgr::childHasMouseCapture( const LLView* parent ) const | |||
190 | return FALSE; | 256 | return FALSE; |
191 | } | 257 | } |
192 | 258 | ||
193 | void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLView* focus ) | 259 | void LLFocusMgr::removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus ) |
194 | { | 260 | { |
195 | // should be ok to unlock here, as you have to know the locked view | 261 | // should be ok to unlock here, as you have to know the locked view |
196 | // in order to unlock it | 262 | // in order to unlock it |
@@ -313,7 +379,7 @@ void LLFocusMgr::removeTopCtrlWithoutCallback( const LLUICtrl* top_view ) | |||
313 | 379 | ||
314 | void LLFocusMgr::lockFocus() | 380 | void LLFocusMgr::lockFocus() |
315 | { | 381 | { |
316 | mLockedView = mKeyboardFocus; | 382 | mLockedView = dynamic_cast<LLUICtrl*>(mKeyboardFocus); |
317 | } | 383 | } |
318 | 384 | ||
319 | void LLFocusMgr::unlockFocus() | 385 | void LLFocusMgr::unlockFocus() |
diff --git a/linden/indra/llui/llfocusmgr.h b/linden/indra/llui/llfocusmgr.h index aaeb25a..88ede1a 100644 --- a/linden/indra/llui/llfocusmgr.h +++ b/linden/indra/llui/llfocusmgr.h | |||
@@ -37,10 +37,39 @@ | |||
37 | 37 | ||
38 | #include "llstring.h" | 38 | #include "llstring.h" |
39 | #include "llframetimer.h" | 39 | #include "llframetimer.h" |
40 | #include "llview.h" | 40 | #include "llui.h" |
41 | 41 | ||
42 | class LLUICtrl; | 42 | class LLUICtrl; |
43 | class LLMouseHandler; | 43 | class LLMouseHandler; |
44 | class LLView; | ||
45 | |||
46 | class LLFocusableElement | ||
47 | { | ||
48 | friend class LLFocusMgr; // allow access to focus change handlers | ||
49 | public: | ||
50 | LLFocusableElement(); | ||
51 | virtual ~LLFocusableElement(); | ||
52 | |||
53 | virtual void setFocus( BOOL b ); | ||
54 | virtual BOOL hasFocus() const; | ||
55 | |||
56 | void setFocusLostCallback(void (*cb)(LLFocusableElement* caller, void*), void* user_data = NULL) { mFocusLostCallback = cb; mFocusCallbackUserData = user_data; } | ||
57 | void setFocusReceivedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL) { mFocusReceivedCallback = cb; mFocusCallbackUserData = user_data; } | ||
58 | void setFocusChangedCallback( void (*cb)(LLFocusableElement*, void*), void* user_data = NULL ) { mFocusChangedCallback = cb; mFocusCallbackUserData = user_data; } | ||
59 | |||
60 | // These were brought up the hierarchy from LLView so that we don't have to use dynamic_cast when dealing with keyboard focus. | ||
61 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | ||
62 | virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); | ||
63 | |||
64 | protected: | ||
65 | virtual void onFocusReceived(); | ||
66 | virtual void onFocusLost(); | ||
67 | void (*mFocusLostCallback)( LLFocusableElement* caller, void* userdata ); | ||
68 | void (*mFocusReceivedCallback)( LLFocusableElement* ctrl, void* userdata ); | ||
69 | void (*mFocusChangedCallback)( LLFocusableElement* ctrl, void* userdata ); | ||
70 | void* mFocusCallbackUserData; | ||
71 | }; | ||
72 | |||
44 | 73 | ||
45 | class LLFocusMgr | 74 | class LLFocusMgr |
46 | { | 75 | { |
@@ -55,11 +84,11 @@ public: | |||
55 | BOOL childHasMouseCapture( const LLView* parent ) const; | 84 | BOOL childHasMouseCapture( const LLView* parent ) const; |
56 | 85 | ||
57 | // Keyboard Focus | 86 | // Keyboard Focus |
58 | void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE, BOOL keystrokes_only = FALSE); // new_focus = NULL to release the focus. | 87 | void setKeyboardFocus(LLFocusableElement* new_focus, BOOL lock = FALSE, BOOL keystrokes_only = FALSE); // new_focus = NULL to release the focus. |
59 | LLUICtrl* getKeyboardFocus() const { return mKeyboardFocus; } | 88 | LLFocusableElement* getKeyboardFocus() const { return mKeyboardFocus; } |
60 | LLUICtrl* getLastKeyboardFocus() const { return mLastKeyboardFocus; } | 89 | LLFocusableElement* getLastKeyboardFocus() const { return mLastKeyboardFocus; } |
61 | BOOL childHasKeyboardFocus( const LLView* parent ) const; | 90 | BOOL childHasKeyboardFocus( const LLView* parent ) const; |
62 | void removeKeyboardFocusWithoutCallback( const LLView* focus ); | 91 | void removeKeyboardFocusWithoutCallback( const LLFocusableElement* focus ); |
63 | BOOL getKeystrokesOnly() { return mKeystrokesOnly; } | 92 | BOOL getKeystrokesOnly() { return mKeystrokesOnly; } |
64 | void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } | 93 | void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } |
65 | 94 | ||
@@ -75,8 +104,8 @@ public: | |||
75 | 104 | ||
76 | // If setKeyboardFocus(NULL) is called, and there is a non-NULL default | 105 | // If setKeyboardFocus(NULL) is called, and there is a non-NULL default |
77 | // keyboard focus view, focus goes there. JC | 106 | // keyboard focus view, focus goes there. JC |
78 | void setDefaultKeyboardFocus(LLUICtrl* default_focus) { mDefaultKeyboardFocus = default_focus; } | 107 | void setDefaultKeyboardFocus(LLFocusableElement* default_focus) { mDefaultKeyboardFocus = default_focus; } |
79 | LLUICtrl* getDefaultKeyboardFocus() const { return mDefaultKeyboardFocus; } | 108 | LLFocusableElement* getDefaultKeyboardFocus() const { return mDefaultKeyboardFocus; } |
80 | 109 | ||
81 | 110 | ||
82 | // Top View | 111 | // Top View |
@@ -98,9 +127,9 @@ private: | |||
98 | LLMouseHandler* mMouseCaptor; // Mouse events are premptively routed to this object | 127 | LLMouseHandler* mMouseCaptor; // Mouse events are premptively routed to this object |
99 | 128 | ||
100 | // Keyboard Focus | 129 | // Keyboard Focus |
101 | LLUICtrl* mKeyboardFocus; // Keyboard events are preemptively routed to this object | 130 | LLFocusableElement* mKeyboardFocus; // Keyboard events are preemptively routed to this object |
102 | LLUICtrl* mLastKeyboardFocus; // who last had focus | 131 | LLFocusableElement* mLastKeyboardFocus; // who last had focus |
103 | LLUICtrl* mDefaultKeyboardFocus; | 132 | LLFocusableElement* mDefaultKeyboardFocus; |
104 | BOOL mKeystrokesOnly; | 133 | BOOL mKeystrokesOnly; |
105 | 134 | ||
106 | // Top View | 135 | // Top View |
diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp index e73c8fe..0df960e 100644 --- a/linden/indra/llui/lliconctrl.cpp +++ b/linden/indra/llui/lliconctrl.cpp | |||
@@ -112,6 +112,12 @@ void LLIconCtrl::draw() | |||
112 | LLUICtrl::draw(); | 112 | LLUICtrl::draw(); |
113 | } | 113 | } |
114 | 114 | ||
115 | // virtual | ||
116 | void LLIconCtrl::setAlpha(F32 alpha) | ||
117 | { | ||
118 | mColor.setAlpha(alpha); | ||
119 | } | ||
120 | |||
115 | // virtual | 121 | // virtual |
116 | void LLIconCtrl::setValue(const LLSD& value ) | 122 | void LLIconCtrl::setValue(const LLSD& value ) |
117 | { | 123 | { |
diff --git a/linden/indra/llui/lliconctrl.h b/linden/indra/llui/lliconctrl.h index 50778cf..2506fb2 100644 --- a/linden/indra/llui/lliconctrl.h +++ b/linden/indra/llui/lliconctrl.h | |||
@@ -65,6 +65,8 @@ public: | |||
65 | virtual void setValue(const LLSD& value ); | 65 | virtual void setValue(const LLSD& value ); |
66 | virtual LLSD getValue() const; | 66 | virtual LLSD getValue() const; |
67 | 67 | ||
68 | /*virtual*/ void setAlpha(F32 alpha); | ||
69 | |||
68 | void setColor(const LLColor4& color) { mColor = color; } | 70 | void setColor(const LLColor4& color) { mColor = color; } |
69 | 71 | ||
70 | virtual LLXMLNodePtr getXML(bool save_children = true) const; | 72 | virtual LLXMLNodePtr getXML(bool save_children = true) const; |
diff --git a/linden/indra/llui/llmultisliderctrl.cpp b/linden/indra/llui/llmultisliderctrl.cpp index b76c2f6..f9ec6d5 100644 --- a/linden/indra/llui/llmultisliderctrl.cpp +++ b/linden/indra/llui/llmultisliderctrl.cpp | |||
@@ -34,9 +34,6 @@ | |||
34 | 34 | ||
35 | #include "llmultisliderctrl.h" | 35 | #include "llmultisliderctrl.h" |
36 | 36 | ||
37 | #include "audioengine.h" | ||
38 | #include "sound_ids.h" | ||
39 | |||
40 | #include "llmath.h" | 37 | #include "llmath.h" |
41 | #include "llfontgl.h" | 38 | #include "llfontgl.h" |
42 | #include "llgl.h" | 39 | #include "llgl.h" |
diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 709342b..26137d7 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp | |||
@@ -203,6 +203,12 @@ void LLPanel::draw() | |||
203 | LLView::draw(); | 203 | LLView::draw(); |
204 | } | 204 | } |
205 | 205 | ||
206 | /*virtual*/ | ||
207 | void LLPanel::setAlpha(F32 alpha) | ||
208 | { | ||
209 | mBgColorOpaque.setAlpha(alpha); | ||
210 | } | ||
211 | |||
206 | void LLPanel::updateDefaultBtn() | 212 | void LLPanel::updateDefaultBtn() |
207 | { | 213 | { |
208 | // This method does not call LLView::draw() so callers will need | 214 | // This method does not call LLView::draw() so callers will need |
@@ -213,8 +219,7 @@ void LLPanel::updateDefaultBtn() | |||
213 | { | 219 | { |
214 | if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled()) | 220 | if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled()) |
215 | { | 221 | { |
216 | LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); | 222 | LLButton* buttonp = dynamic_cast<LLButton*>(gFocusMgr.getKeyboardFocus()); |
217 | LLButton* buttonp = dynamic_cast<LLButton*>(focus_ctrl); | ||
218 | BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); | 223 | BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); |
219 | // only enable default button when current focus is not a return-capturing button | 224 | // only enable default button when current focus is not a return-capturing button |
220 | mDefaultBtn->setBorderEnabled(!focus_is_child_button); | 225 | mDefaultBtn->setBorderEnabled(!focus_is_child_button); |
@@ -276,7 +281,7 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) | |||
276 | { | 281 | { |
277 | BOOL handled = FALSE; | 282 | BOOL handled = FALSE; |
278 | 283 | ||
279 | LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); | 284 | LLUICtrl* cur_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); |
280 | 285 | ||
281 | // handle user hitting ESC to defocus | 286 | // handle user hitting ESC to defocus |
282 | if (key == KEY_ESCAPE) | 287 | if (key == KEY_ESCAPE) |
@@ -800,6 +805,14 @@ void LLPanel::childSetColor(const std::string& id, const LLColor4& color) | |||
800 | child->setColor(color); | 805 | child->setColor(color); |
801 | } | 806 | } |
802 | } | 807 | } |
808 | void LLPanel::childSetAlpha(const std::string& id, F32 alpha) | ||
809 | { | ||
810 | LLUICtrl* child = getChild<LLUICtrl>(id, true); | ||
811 | if (child) | ||
812 | { | ||
813 | child->setAlpha(alpha); | ||
814 | } | ||
815 | } | ||
803 | 816 | ||
804 | LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const | 817 | LLCtrlSelectionInterface* LLPanel::childGetSelectionInterface(const std::string& id) const |
805 | { | 818 | { |
diff --git a/linden/indra/llui/llpanel.h b/linden/indra/llui/llpanel.h index 756d02e..378b357 100644 --- a/linden/indra/llui/llpanel.h +++ b/linden/indra/llui/llpanel.h | |||
@@ -82,6 +82,8 @@ public: | |||
82 | 82 | ||
83 | // From LLFocusableElement | 83 | // From LLFocusableElement |
84 | /*virtual*/ void setFocus( BOOL b ); | 84 | /*virtual*/ void setFocus( BOOL b ); |
85 | virtual void setAlpha(F32 alpha); | ||
86 | |||
85 | 87 | ||
86 | // New virtuals | 88 | // New virtuals |
87 | virtual void refresh(); // called in setFocus() | 89 | virtual void refresh(); // called in setFocus() |
@@ -174,6 +176,7 @@ public: | |||
174 | void childSetUserData(const std::string& id, void* userdata); | 176 | void childSetUserData(const std::string& id, void* userdata); |
175 | 177 | ||
176 | void childSetColor(const std::string& id, const LLColor4& color); | 178 | void childSetColor(const std::string& id, const LLColor4& color); |
179 | void childSetAlpha(const std::string& id, F32 alpha); | ||
177 | 180 | ||
178 | LLCtrlSelectionInterface* childGetSelectionInterface(const std::string& id) const; | 181 | LLCtrlSelectionInterface* childGetSelectionInterface(const std::string& id) const; |
179 | LLCtrlListInterface* childGetListInterface(const std::string& id) const; | 182 | LLCtrlListInterface* childGetListInterface(const std::string& id) const; |
diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp index 8a13ed4..51d43fb 100644 --- a/linden/indra/llui/llsliderctrl.cpp +++ b/linden/indra/llui/llsliderctrl.cpp | |||
@@ -34,8 +34,6 @@ | |||
34 | 34 | ||
35 | #include "llsliderctrl.h" | 35 | #include "llsliderctrl.h" |
36 | 36 | ||
37 | #include "audioengine.h" | ||
38 | |||
39 | #include "llmath.h" | 37 | #include "llmath.h" |
40 | #include "llfontgl.h" | 38 | #include "llfontgl.h" |
41 | #include "llgl.h" | 39 | #include "llgl.h" |
diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp index 7eccaca..e66b20e 100644 --- a/linden/indra/llui/llspinctrl.cpp +++ b/linden/indra/llui/llspinctrl.cpp | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "lltextbox.h" | 45 | #include "lltextbox.h" |
46 | #include "llkeyboard.h" | 46 | #include "llkeyboard.h" |
47 | #include "llmath.h" | 47 | #include "llmath.h" |
48 | #include "audioengine.h" | ||
49 | #include "llcontrol.h" | 48 | #include "llcontrol.h" |
50 | #include "llfocusmgr.h" | 49 | #include "llfocusmgr.h" |
51 | #include "llresmgr.h" | 50 | #include "llresmgr.h" |
diff --git a/linden/indra/llui/lltextparser.cpp b/linden/indra/llui/lltextparser.cpp index 925b118..707dd0a 100644 --- a/linden/indra/llui/lltextparser.cpp +++ b/linden/indra/llui/lltextparser.cpp | |||
@@ -1,6 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | * @file lltexteditor.cpp | 2 | * @file lltextparser.cpp |
3 | * @brief LLTextEditor base class | ||
4 | * | 3 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 4 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
6 | * | 5 | * |
@@ -32,6 +31,8 @@ | |||
32 | 31 | ||
33 | #include "linden_common.h" | 32 | #include "linden_common.h" |
34 | 33 | ||
34 | #include "lltextparser.h" | ||
35 | |||
35 | #include "llsd.h" | 36 | #include "llsd.h" |
36 | #include "llsdserialize.h" | 37 | #include "llsdserialize.h" |
37 | #include "llerror.h" | 38 | #include "llerror.h" |
@@ -40,23 +41,13 @@ | |||
40 | #include "message.h" | 41 | #include "message.h" |
41 | #include "llmath.h" | 42 | #include "llmath.h" |
42 | #include "v4color.h" | 43 | #include "v4color.h" |
43 | #include "audioengine.h" | ||
44 | #include "llwindow.h" | ||
45 | #include "lldir.h" | 44 | #include "lldir.h" |
46 | 45 | ||
47 | #include "lltextparser.h" | ||
48 | //#include "lltexttospeech.h" | ||
49 | |||
50 | // Routines used for parsing text for TextParsers and html | 46 | // Routines used for parsing text for TextParsers and html |
51 | 47 | ||
52 | LLTextParser* LLTextParser::sInstance = NULL; | 48 | LLTextParser* LLTextParser::sInstance = NULL; |
53 | 49 | ||
54 | // | 50 | // |
55 | // Constants | ||
56 | // | ||
57 | const F32 SOUND_GAIN = 1.0f; | ||
58 | |||
59 | // | ||
60 | // Member Functions | 51 | // Member Functions |
61 | // | 52 | // |
62 | 53 | ||
@@ -76,38 +67,7 @@ LLTextParser* LLTextParser::getInstance() | |||
76 | return sInstance; | 67 | return sInstance; |
77 | } | 68 | } |
78 | 69 | ||
79 | void LLTextParser::triggerAlerts(LLUUID agent_id, LLVector3d position, std::string text, LLWindow* viewer_window) | 70 | // Moved triggerAlerts() to llfloaterchat.cpp to break llui/llaudio library dependency. |
80 | { | ||
81 | // bool spoken=FALSE; | ||
82 | for (S32 i=0;i<mHighlights.size();i++) | ||
83 | { | ||
84 | if (findPattern(text,mHighlights[i]) >= 0 ) | ||
85 | { | ||
86 | if(gAudiop) | ||
87 | { | ||
88 | if ((std::string)mHighlights[i]["sound_lluuid"] != LLUUID::null.asString()) | ||
89 | { | ||
90 | gAudiop->triggerSound(mHighlights[i]["sound_lluuid"].asUUID(), agent_id, SOUND_GAIN, LLAudioEngine::AUDIO_TYPE_UI, position); | ||
91 | } | ||
92 | /* | ||
93 | if (!spoken) | ||
94 | { | ||
95 | LLTextToSpeech* text_to_speech = NULL; | ||
96 | text_to_speech = LLTextToSpeech::getInstance(); | ||
97 | spoken = text_to_speech->speak((LLString)mHighlights[i]["voice"],text); | ||
98 | } | ||
99 | */ | ||
100 | } | ||
101 | if (mHighlights[i]["flash"]) | ||
102 | { | ||
103 | if (viewer_window && viewer_window->getMinimized()) | ||
104 | { | ||
105 | viewer_window->flashIcon(5.f); | ||
106 | } | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | 71 | ||
112 | S32 LLTextParser::findPattern(const std::string &text, LLSD highlight) | 72 | S32 LLTextParser::findPattern(const std::string &text, LLSD highlight) |
113 | { | 73 | { |
diff --git a/linden/indra/llui/lltextparser.h b/linden/indra/llui/lltextparser.h index d69e3a2..32343a2 100644 --- a/linden/indra/llui/lltextparser.h +++ b/linden/indra/llui/lltextparser.h | |||
@@ -34,12 +34,8 @@ | |||
34 | #ifndef LL_LLTEXTPARSER_H | 34 | #ifndef LL_LLTEXTPARSER_H |
35 | #define LL_LLTEXTPARSER_H | 35 | #define LL_LLTEXTPARSER_H |
36 | 36 | ||
37 | #include <vector> | 37 | #include "llsd.h" |
38 | #include "linden_common.h" | ||
39 | 38 | ||
40 | #include "lltextparser.h" | ||
41 | |||
42 | class LLSD; | ||
43 | class LLUUID; | 39 | class LLUUID; |
44 | class LLVector3d; | 40 | class LLVector3d; |
45 | class LLColor4; | 41 | class LLColor4; |
@@ -59,7 +55,6 @@ public: | |||
59 | S32 findPattern(const std::string &text, LLSD highlight); | 55 | S32 findPattern(const std::string &text, LLSD highlight); |
60 | LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color,S32 part=WHOLE, S32 index=0); | 56 | LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color,S32 part=WHOLE, S32 index=0); |
61 | bool parseFullLineHighlights(const std::string &text, LLColor4 *color); | 57 | bool parseFullLineHighlights(const std::string &text, LLColor4 *color); |
62 | void triggerAlerts(LLUUID agent_id, LLVector3d position, std::string text, LLWindow* viewer_window); | ||
63 | 58 | ||
64 | std::string getFileName(); | 59 | std::string getFileName(); |
65 | LLSD loadFromDisk(); | 60 | LLSD loadFromDisk(); |
diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index 57ce13c..75a4467 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <map> | 38 | #include <map> |
39 | 39 | ||
40 | // Linden library includes | 40 | // Linden library includes |
41 | #include "audioengine.h" | ||
42 | #include "v2math.h" | 41 | #include "v2math.h" |
43 | #include "v4color.h" | 42 | #include "v4color.h" |
44 | #include "llrender.h" | 43 | #include "llrender.h" |
diff --git a/linden/indra/llui/lluictrl.cpp b/linden/indra/llui/lluictrl.cpp index 9d97312..3f4ab5e 100644 --- a/linden/indra/llui/lluictrl.cpp +++ b/linden/indra/llui/lluictrl.cpp | |||
@@ -39,54 +39,7 @@ | |||
39 | 39 | ||
40 | static LLRegisterWidget<LLUICtrl> r("ui_ctrl"); | 40 | static LLRegisterWidget<LLUICtrl> r("ui_ctrl"); |
41 | 41 | ||
42 | LLFocusableElement::LLFocusableElement() | 42 | // NOTE: the LLFocusableElement implementation has been moved to llfocusmgr.cpp, to mirror the header where the class is defined. |
43 | : mFocusLostCallback(NULL), | ||
44 | mFocusReceivedCallback(NULL), | ||
45 | mFocusChangedCallback(NULL), | ||
46 | mFocusCallbackUserData(NULL) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | //virtual | ||
51 | LLFocusableElement::~LLFocusableElement() | ||
52 | { | ||
53 | } | ||
54 | |||
55 | void LLFocusableElement::onFocusReceived() | ||
56 | { | ||
57 | if( mFocusReceivedCallback ) | ||
58 | { | ||
59 | mFocusReceivedCallback( this, mFocusCallbackUserData ); | ||
60 | } | ||
61 | if( mFocusChangedCallback ) | ||
62 | { | ||
63 | mFocusChangedCallback( this, mFocusCallbackUserData ); | ||
64 | } | ||
65 | } | ||
66 | |||
67 | void LLFocusableElement::onFocusLost() | ||
68 | { | ||
69 | if( mFocusLostCallback ) | ||
70 | { | ||
71 | mFocusLostCallback( this, mFocusCallbackUserData ); | ||
72 | } | ||
73 | |||
74 | if( mFocusChangedCallback ) | ||
75 | { | ||
76 | mFocusChangedCallback( this, mFocusCallbackUserData ); | ||
77 | } | ||
78 | } | ||
79 | |||
80 | BOOL LLFocusableElement::hasFocus() const | ||
81 | { | ||
82 | return FALSE; | ||
83 | } | ||
84 | |||
85 | void LLFocusableElement::setFocus(BOOL b) | ||
86 | { | ||
87 | } | ||
88 | |||
89 | |||
90 | 43 | ||
91 | LLUICtrl::LLUICtrl() : | 44 | LLUICtrl::LLUICtrl() : |
92 | mCommitCallback(NULL), | 45 | mCommitCallback(NULL), |
@@ -212,7 +165,7 @@ void LLUICtrl::onFocusReceived() | |||
212 | 165 | ||
213 | // find first view in hierarchy above new focus that is a LLUICtrl | 166 | // find first view in hierarchy above new focus that is a LLUICtrl |
214 | LLView* viewp = getParent(); | 167 | LLView* viewp = getParent(); |
215 | LLUICtrl* last_focus = gFocusMgr.getLastKeyboardFocus(); | 168 | LLUICtrl* last_focus = dynamic_cast<LLUICtrl*>(gFocusMgr.getLastKeyboardFocus()); |
216 | 169 | ||
217 | while (viewp && !viewp->isCtrl()) | 170 | while (viewp && !viewp->isCtrl()) |
218 | { | 171 | { |
@@ -590,6 +543,10 @@ void LLUICtrl::setDoubleClickCallback( void (*cb)(void*) ) | |||
590 | // virtual | 543 | // virtual |
591 | void LLUICtrl::setColor(const LLColor4& color) | 544 | void LLUICtrl::setColor(const LLColor4& color) |
592 | { } | 545 | { } |
546 | // virtual | ||
547 | |||
548 | void LLUICtrl::setAlpha(F32 alpha) | ||
549 | { } | ||
593 | 550 | ||
594 | // virtual | 551 | // virtual |
595 | void LLUICtrl::setMinValue(LLSD min_value) | 552 | void LLUICtrl::setMinValue(LLSD min_value) |
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 | ||
diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index 8de376f..1f76696 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp | |||
@@ -136,11 +136,6 @@ LLView::~LLView() | |||
136 | { | 136 | { |
137 | //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; | 137 | //llinfos << "Deleting view " << mName << ":" << (void*) this << llendl; |
138 | // llassert(LLView::sIsDrawing == FALSE); | 138 | // llassert(LLView::sIsDrawing == FALSE); |
139 | if( gFocusMgr.getKeyboardFocus() == this ) | ||
140 | { | ||
141 | llwarns << "View holding keyboard focus deleted: " << getName() << ". Keyboard focus removed." << llendl; | ||
142 | gFocusMgr.removeKeyboardFocusWithoutCallback( this ); | ||
143 | } | ||
144 | 139 | ||
145 | if( hasMouseCapture() ) | 140 | if( hasMouseCapture() ) |
146 | { | 141 | { |
@@ -1327,7 +1322,7 @@ void LLView::draw() | |||
1327 | LLRect screenRect; | 1322 | LLRect screenRect; |
1328 | 1323 | ||
1329 | // draw focused control on top of everything else | 1324 | // draw focused control on top of everything else |
1330 | LLView* focus_view = gFocusMgr.getKeyboardFocus(); | 1325 | LLUICtrl* focus_view = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus()); |
1331 | if (focus_view && focus_view->getParent() != this) | 1326 | if (focus_view && focus_view->getParent() != this) |
1332 | { | 1327 | { |
1333 | focus_view = NULL; | 1328 | focus_view = NULL; |
diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h index 7e09dfa..1c8ab31 100644 --- a/linden/indra/llui/llview.h +++ b/linden/indra/llui/llview.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #include "stdenums.h" | 53 | #include "stdenums.h" |
54 | #include "lluistring.h" | 54 | #include "lluistring.h" |
55 | #include "llcursortypes.h" | 55 | #include "llcursortypes.h" |
56 | #include "llfocusmgr.h" | ||
56 | 57 | ||
57 | const U32 FOLLOWS_NONE = 0x00; | 58 | const U32 FOLLOWS_NONE = 0x00; |
58 | const U32 FOLLOWS_LEFT = 0x01; | 59 | const U32 FOLLOWS_LEFT = 0x01; |
@@ -207,7 +208,7 @@ public: | |||
207 | } | 208 | } |
208 | }; | 209 | }; |
209 | 210 | ||
210 | class LLView : public LLMouseHandler, public LLMortician | 211 | class LLView : public LLMouseHandler, public LLMortician, public LLFocusableElement |
211 | { | 212 | { |
212 | 213 | ||
213 | public: | 214 | public: |
@@ -398,9 +399,11 @@ public: | |||
398 | virtual BOOL canSnapTo(const LLView* other_view); | 399 | virtual BOOL canSnapTo(const LLView* other_view); |
399 | 400 | ||
400 | virtual void snappedTo(const LLView* snap_view); | 401 | virtual void snappedTo(const LLView* snap_view); |
402 | |||
403 | // inherited from LLFocusableElement | ||
404 | /* virtual */ BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | ||
405 | /* virtual */ BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); | ||
401 | 406 | ||
402 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | ||
403 | virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); | ||
404 | virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, | 407 | virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, |
405 | EDragAndDropType cargo_type, | 408 | EDragAndDropType cargo_type, |
406 | void* cargo_data, | 409 | void* cargo_data, |
@@ -421,8 +424,9 @@ public: | |||
421 | BOOL getSaveToXML() const { return mSaveToXML; } | 424 | BOOL getSaveToXML() const { return mSaveToXML; } |
422 | void setSaveToXML(BOOL b) { mSaveToXML = b; } | 425 | void setSaveToXML(BOOL b) { mSaveToXML = b; } |
423 | 426 | ||
424 | virtual void onFocusLost(); | 427 | // inherited from LLFocusableElement |
425 | virtual void onFocusReceived(); | 428 | /* virtual */ void onFocusLost(); |
429 | /* virtual */ void onFocusReceived(); | ||
426 | 430 | ||
427 | typedef enum e_hit_test_type | 431 | typedef enum e_hit_test_type |
428 | { | 432 | { |