aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llcombobox.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llui/llcombobox.h')
-rw-r--r--linden/indra/llui/llcombobox.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h
index 5de9463..8c317ee 100644
--- a/linden/indra/llui/llcombobox.h
+++ b/linden/indra/llui/llcombobox.h
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -53,6 +54,12 @@ class LLComboBox
53: public LLUICtrl, public LLCtrlListInterface 54: public LLUICtrl, public LLCtrlListInterface
54{ 55{
55public: 56public:
57 typedef enum e_preferred_position
58 {
59 ABOVE,
60 BELOW
61 } EPreferredPosition;
62
56 LLComboBox( 63 LLComboBox(
57 const LLString& name, 64 const LLString& name,
58 const LLRect &rect, 65 const LLRect &rect,
@@ -77,12 +84,6 @@ public:
77 virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); 84 virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect);
78 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); 85 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
79 virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); 86 virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent);
80 virtual BOOL handleHover(S32 x, S32 y, MASK mask);
81 virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
82 virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
83 virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
84 virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
85 virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask);
86 87
87 // LLUICtrl interface 88 // LLUICtrl interface
88 virtual void clear(); // select nothing 89 virtual void clear(); // select nothing
@@ -165,34 +166,31 @@ public:
165 166
166 void setButtonVisible(BOOL visible); 167 void setButtonVisible(BOOL visible);
167 168
168 static void onButtonClick(void *userdata); 169 static void onButtonDown(void *userdata);
169 static void onItemSelected(LLUICtrl* item, void *userdata); 170 static void onItemSelected(LLUICtrl* item, void *userdata);
170 static void onTopViewLost(LLView* old_focus); 171 static void onListFocusChanged(LLUICtrl* item, void *userdata);
171 static void onMouseCaptureLost(LLMouseHandler* old_captor);
172 static void onTextEntry(LLLineEditor* line_editor, void* user_data); 172 static void onTextEntry(LLLineEditor* line_editor, void* user_data);
173 static void onTextCommit(LLUICtrl* caller, void* user_data); 173 static void onTextCommit(LLUICtrl* caller, void* user_data);
174 174
175 void updateSelection(); 175 void updateSelection();
176 void showList(); 176 virtual void showList();
177 void hideList(); 177 virtual void hideList();
178 178
179 static void onListFocusLost(LLUICtrl* old_focus);
180
181protected: 179protected:
182 LLButton* mButton; 180 LLButton* mButton;
183 LLScrollListCtrl* mList; 181 LLScrollListCtrl* mList;
184 LLViewBorder* mBorder; 182 LLViewBorder* mBorder;
185 BOOL mKeyboardFocusOnClick; 183 BOOL mKeyboardFocusOnClick;
186 BOOL mDrawButton; 184 BOOL mDrawArrow;
187 LLLineEditor* mTextEntry; 185 LLLineEditor* mTextEntry;
188 LLPointer<LLImageGL> mArrowImage; 186 LLPointer<LLImageGL> mArrowImage;
189 S32 mArrowImageWidth; 187 S32 mArrowImageWidth;
190 BOOL mAllowTextEntry; 188 BOOL mAllowTextEntry;
191 S32 mMaxChars; 189 S32 mMaxChars;
192 BOOL mTextEntryTentative; 190 BOOL mTextEntryTentative;
191 EPreferredPosition mListPosition;
193 void (*mPrearrangeCallback)(LLUICtrl*,void*); 192 void (*mPrearrangeCallback)(LLUICtrl*,void*);
194 void (*mTextEntryCallback)(LLLineEditor*, void*); 193 void (*mTextEntryCallback)(LLLineEditor*, void*);
195 S32 mListWidth; // width of pop-up list, 0 = use combobox width
196}; 194};
197 195
198#endif 196#endif