Annotation of /trunk/indra/newview/jcfloaterareasearch.h
Parent Directory
|
Revision Log
Revision 137 - (view) (download)
| 1 : | mjm | 135 | /* Copyright (c) 2009 |
| 2 : | * | ||
| 3 : | * Modular Systems. All rights reserved. | ||
| 4 : | * | ||
| 5 : | * Redistribution and use in source and binary forms, with or | ||
| 6 : | * without modification, are permitted provided that the following | ||
| 7 : | * conditions are met: | ||
| 8 : | * | ||
| 9 : | * 1. Redistributions of source code must retain the above copyright | ||
| 10 : | * notice, this list of conditions and the following disclaimer. | ||
| 11 : | * 2. Redistributions in binary form must reproduce the above | ||
| 12 : | * copyright notice, this list of conditions and the following | ||
| 13 : | * disclaimer in the documentation and/or other materials provided | ||
| 14 : | * with the distribution. | ||
| 15 : | * 3. Neither the name Modular Systems nor the names of its contributors | ||
| 16 : | * may be used to endorse or promote products derived from this | ||
| 17 : | * software without specific prior written permission. | ||
| 18 : | * | ||
| 19 : | * THIS SOFTWARE IS PROVIDED BY MODULAR SYSTEMS AND CONTRIBUTORS AS IS | ||
| 20 : | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 21 : | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 22 : | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MODULAR SYSTEMS OR CONTRIBUTORS | ||
| 23 : | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 24 : | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 25 : | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
| 26 : | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
| 27 : | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 28 : | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | ||
| 29 : | * THE POSSIBILITY OF SUCH DAMAGE. | ||
| 30 : | * | ||
| 31 : | * Modified, debugged, optimized and improved by Henri Beauchamp Feb 2010. | ||
| 32 : | */ | ||
| 33 : | |||
| 34 : | #include "llfloater.h" | ||
| 35 : | #include "lluuid.h" | ||
| 36 : | #include "llstring.h" | ||
| 37 : | #include "llframetimer.h" | ||
| 38 : | |||
| 39 : | class LLTextBox; | ||
| 40 : | class LLScrollListCtrl; | ||
| 41 : | mjm | 137 | class LLViewerRegion; |
| 42 : | mjm | 135 | |
| 43 : | struct AObjectDetails | ||
| 44 : | { | ||
| 45 : | LLUUID id; | ||
| 46 : | std::string name; | ||
| 47 : | std::string desc; | ||
| 48 : | LLUUID owner_id; | ||
| 49 : | LLUUID group_id; | ||
| 50 : | }; | ||
| 51 : | |||
| 52 : | class JCFloaterAreaSearch : public LLFloater | ||
| 53 : | { | ||
| 54 : | public: | ||
| 55 : | JCFloaterAreaSearch(); | ||
| 56 : | virtual ~JCFloaterAreaSearch(); | ||
| 57 : | |||
| 58 : | /*virtual*/ BOOL postBuild(); | ||
| 59 : | /*virtual*/ void close(bool app = false); | ||
| 60 : | |||
| 61 : | static void results(); | ||
| 62 : | static void toggle(); | ||
| 63 : | static JCFloaterAreaSearch* getInstance() { return sInstance; } | ||
| 64 : | static void callbackLoadOwnerName(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data); | ||
| 65 : | static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data); | ||
| 66 : | |||
| 67 : | private: | ||
| 68 : | mjm | 137 | static void checkRegion(); |
| 69 : | mjm | 135 | static void cancel(void* data); |
| 70 : | static void search(void* data); | ||
| 71 : | static void onCommitLine(LLLineEditor* line, void* user_data); | ||
| 72 : | static void requestIfNeeded(LLViewerObject *objectp); | ||
| 73 : | static void onDoubleClick(void *userdata); | ||
| 74 : | |||
| 75 : | enum OBJECT_COLUMN_ORDER | ||
| 76 : | { | ||
| 77 : | LIST_OBJECT_NAME, | ||
| 78 : | LIST_OBJECT_DESC, | ||
| 79 : | LIST_OBJECT_OWNER, | ||
| 80 : | LIST_OBJECT_GROUP | ||
| 81 : | }; | ||
| 82 : | |||
| 83 : | static JCFloaterAreaSearch* sInstance; | ||
| 84 : | |||
| 85 : | static S32 sRequested; | ||
| 86 : | |||
| 87 : | LLTextBox* mCounterText; | ||
| 88 : | LLScrollListCtrl* mResultList; | ||
| 89 : | LLFrameTimer mLastUpdateTimer; | ||
| 90 : | |||
| 91 : | static std::map<LLUUID, AObjectDetails> sObjectDetails; | ||
| 92 : | |||
| 93 : | static std::string sSearchedName; | ||
| 94 : | static std::string sSearchedDesc; | ||
| 95 : | static std::string sSearchedOwner; | ||
| 96 : | static std::string sSearchedGroup; | ||
| 97 : | mjm | 137 | |
| 98 : | static LLViewerRegion* sLastRegion; | ||
| 99 : | mjm | 135 | }; |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

