PageRenderTime 36ms CodeModel.GetById 17ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/newview/llfloatertopobjects.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 105 lines | 49 code | 25 blank | 31 comment | 0 complexity | 9a7073cd083b56dd897f9e8db19e453d MD5 | raw file
  1/** 
  2 * @file llfloatertopobjects.h
  3 * @brief Shows top colliders or top scripts
  4 *
  5 * $LicenseInfo:firstyear=2005&license=viewerlgpl$
  6 * Second Life Viewer Source Code
  7 * Copyright (C) 2010, Linden Research, Inc.
  8 * 
  9 * This library is free software; you can redistribute it and/or
 10 * modify it under the terms of the GNU Lesser General Public
 11 * License as published by the Free Software Foundation;
 12 * version 2.1 of the License only.
 13 * 
 14 * This library is distributed in the hope that it will be useful,
 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 17 * Lesser General Public License for more details.
 18 * 
 19 * You should have received a copy of the GNU Lesser General Public
 20 * License along with this library; if not, write to the Free Software
 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 22 * 
 23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
 24 * $/LicenseInfo$
 25 */
 26
 27#ifndef LL_LLFLOATERTOPOBJECTS_H
 28#define LL_LLFLOATERTOPOBJECTS_H
 29
 30#include "llfloater.h"
 31
 32class LLUICtrl;
 33
 34class LLFloaterTopObjects : public LLFloater
 35{
 36	friend class LLFloaterReg;
 37public:
 38	// Opens the floater on screen.
 39//	static void show();
 40
 41	// Opens the floater if it's not on-screen.
 42	// Juggles the UI based on method = "scripts" or "colliders"
 43	static void handle_land_reply(LLMessageSystem* msg, void** data);
 44	void handleReply(LLMessageSystem* msg, void** data);
 45	
 46	void clearList();
 47	void updateSelectionInfo();
 48	virtual BOOL postBuild();
 49
 50	void onRefresh();
 51
 52	static void setMode(U32 mode);
 53
 54private:
 55	LLFloaterTopObjects(const LLSD& key);
 56	~LLFloaterTopObjects();
 57
 58	void initColumns(LLCtrlListInterface *list);
 59
 60	void onCommitObjectsList();
 61	static void onDoubleClickObjectsList(void* data);
 62	void onClickShowBeacon();
 63
 64	void doToObjects(int action, bool all);
 65
 66	void onReturnAll();
 67	void onReturnSelected();
 68	void onDisableAll();
 69	void onDisableSelected();
 70
 71	static bool callbackReturnAll(const LLSD& notification, const LLSD& response);
 72	static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
 73
 74	void onGetByOwnerName();
 75	void onGetByObjectName();
 76
 77//	static void onGetByOwnerNameClicked(void* data)  { onGetByOwnerName(NULL, data); };
 78//	static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
 79
 80	void showBeacon();
 81
 82private:
 83	std::string mMethod;
 84
 85	LLSD mObjectListData;
 86	uuid_vec_t mObjectListIDs;
 87
 88	U32 mCurrentMode;
 89	U32 mFlags;
 90	std::string mFilter;
 91
 92	BOOL mInitialized;
 93
 94	F32 mtotalScore;
 95
 96	enum
 97	{
 98		ACTION_RETURN = 0,
 99		ACTION_DISABLE
100	};
101
102	static LLFloaterTopObjects* sInstance;
103};
104
105#endif