/indra/newview/llfloatertestinspectors.cpp
C++ | 113 lines | 65 code | 17 blank | 31 comment | 1 complexity | 80f7bdff1b14cf49b07f0885d2016c37 MD5 | raw file
Possible License(s): LGPL-2.1
1/** 2* @file llfloatertestinspectors.cpp 3* 4* $LicenseInfo:firstyear=2009&license=viewerlgpl$ 5* Second Life Viewer Source Code 6* Copyright (C) 2010, Linden Research, Inc. 7* 8* This library is free software; you can redistribute it and/or 9* modify it under the terms of the GNU Lesser General Public 10* License as published by the Free Software Foundation; 11* version 2.1 of the License only. 12* 13* This library is distributed in the hope that it will be useful, 14* but WITHOUT ANY WARRANTY; without even the implied warranty of 15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16* Lesser General Public License for more details. 17* 18* You should have received a copy of the GNU Lesser General Public 19* License along with this library; if not, write to the Free Software 20* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21* 22* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA 23* $/LicenseInfo$ 24*/ 25#include "llviewerprecompiledheaders.h" 26 27#include "llfloatertestinspectors.h" 28 29// Viewer includes 30#include "llstartup.h" 31 32// Linden library includes 33#include "llfloaterreg.h" 34//#include "lluictrlfactory.h" 35 36LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed) 37: LLFloater(seed) 38{ 39 mCommitCallbackRegistrar.add("ShowAvatarInspector", 40 boost::bind(&LLFloaterTestInspectors::showAvatarInspector, this, _1, _2)); 41 mCommitCallbackRegistrar.add("ShowObjectInspector", 42 boost::bind(&LLFloaterTestInspectors::showObjectInspector, this, _1, _2)); 43} 44 45LLFloaterTestInspectors::~LLFloaterTestInspectors() 46{} 47 48BOOL LLFloaterTestInspectors::postBuild() 49{ 50 // Test the dummy widget construction code 51 getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true); 52 53// getChild<LLUICtrl>("avatar_2d_btn")->setCommitCallback( 54// boost::bind(&LLFloaterTestInspectors::onClickAvatar2D, this)); 55 getChild<LLUICtrl>("avatar_3d_btn")->setCommitCallback( 56 boost::bind(&LLFloaterTestInspectors::onClickAvatar3D, this)); 57 getChild<LLUICtrl>("object_2d_btn")->setCommitCallback( 58 boost::bind(&LLFloaterTestInspectors::onClickObject2D, this)); 59 getChild<LLUICtrl>("object_3d_btn")->setCommitCallback( 60 boost::bind(&LLFloaterTestInspectors::onClickObject3D, this)); 61 getChild<LLUICtrl>("group_btn")->setCommitCallback( 62 boost::bind(&LLFloaterTestInspectors::onClickGroup, this)); 63 getChild<LLUICtrl>("place_btn")->setCommitCallback( 64 boost::bind(&LLFloaterTestInspectors::onClickPlace, this)); 65 getChild<LLUICtrl>("event_btn")->setCommitCallback( 66 boost::bind(&LLFloaterTestInspectors::onClickEvent, this)); 67 68 return LLFloater::postBuild(); 69} 70 71void LLFloaterTestInspectors::showAvatarInspector(LLUICtrl*, const LLSD& avatar_id) 72{ 73 LLUUID id; // defaults to null 74 if (LLStartUp::getStartupState() >= STATE_STARTED) 75 { 76 id = avatar_id.asUUID(); 77 } 78 // spawns off mouse position automatically 79 LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", id)); 80} 81 82void LLFloaterTestInspectors::showObjectInspector(LLUICtrl*, const LLSD& object_id) 83{ 84 LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id)); 85} 86 87void LLFloaterTestInspectors::onClickAvatar2D() 88{ 89} 90 91void LLFloaterTestInspectors::onClickAvatar3D() 92{ 93} 94 95void LLFloaterTestInspectors::onClickObject2D() 96{ 97} 98 99void LLFloaterTestInspectors::onClickObject3D() 100{ 101} 102 103void LLFloaterTestInspectors::onClickGroup() 104{ 105} 106 107void LLFloaterTestInspectors::onClickPlace() 108{ 109} 110 111void LLFloaterTestInspectors::onClickEvent() 112{ 113}