llfloatertestinspectors.cpp
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:4k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. /** 
  2. * @file llfloatertestinspectors.cpp
  3. *
  4. * $LicenseInfo:firstyear=2009&license=viewergpl$
  5. * Copyright (c) 2009-2010, Linden Research, Inc.
  6. * Second Life Viewer Source Code
  7. * 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. * ("GPL"), unless you have obtained a separate licensing agreement
  10. * ("Other License"), formally executed by you and Linden Lab.  Terms of
  11. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  12. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  13. * There are special exceptions to the terms and conditions of the GPL as
  14. * it is applied to this Source Code. View the full text of the exception
  15. * in the file doc/FLOSS-exception.txt in this software distribution, or
  16. * online at
  17. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  18. * By copying, modifying or distributing this software, you acknowledge
  19. * that you have read and understood your obligations described above,
  20. * and agree to abide by those obligations.
  21. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  22. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  23. * COMPLETENESS OR PERFORMANCE.
  24. * $/LicenseInfo$
  25. */
  26. #include "llviewerprecompiledheaders.h"
  27. #include "llfloatertestinspectors.h"
  28. // Viewer includes
  29. #include "llstartup.h"
  30. // Linden library includes
  31. #include "llfloaterreg.h"
  32. //#include "lluictrlfactory.h"
  33. LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed)
  34. : LLFloater(seed)
  35. {
  36. mCommitCallbackRegistrar.add("ShowAvatarInspector",
  37. boost::bind(&LLFloaterTestInspectors::showAvatarInspector, this, _1, _2));
  38. mCommitCallbackRegistrar.add("ShowObjectInspector",
  39. boost::bind(&LLFloaterTestInspectors::showObjectInspector, this, _1, _2));
  40. }
  41. LLFloaterTestInspectors::~LLFloaterTestInspectors()
  42. {}
  43. BOOL LLFloaterTestInspectors::postBuild()
  44. {
  45. // Test the dummy widget construction code
  46. getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true);
  47. // getChild<LLUICtrl>("avatar_2d_btn")->setCommitCallback(
  48. // boost::bind(&LLFloaterTestInspectors::onClickAvatar2D, this));
  49. getChild<LLUICtrl>("avatar_3d_btn")->setCommitCallback(
  50. boost::bind(&LLFloaterTestInspectors::onClickAvatar3D, this));
  51. getChild<LLUICtrl>("object_2d_btn")->setCommitCallback(
  52. boost::bind(&LLFloaterTestInspectors::onClickObject2D, this));
  53. getChild<LLUICtrl>("object_3d_btn")->setCommitCallback(
  54. boost::bind(&LLFloaterTestInspectors::onClickObject3D, this));
  55. getChild<LLUICtrl>("group_btn")->setCommitCallback(
  56. boost::bind(&LLFloaterTestInspectors::onClickGroup, this));
  57. getChild<LLUICtrl>("place_btn")->setCommitCallback(
  58. boost::bind(&LLFloaterTestInspectors::onClickPlace, this));
  59. getChild<LLUICtrl>("event_btn")->setCommitCallback(
  60. boost::bind(&LLFloaterTestInspectors::onClickEvent, this));
  61. return LLFloater::postBuild();
  62. }
  63. void LLFloaterTestInspectors::showAvatarInspector(LLUICtrl*, const LLSD& avatar_id)
  64. {
  65. LLUUID id;  // defaults to null
  66. if (LLStartUp::getStartupState() >= STATE_STARTED)
  67. {
  68. id = avatar_id.asUUID();
  69. }
  70. // spawns off mouse position automatically
  71. LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", id));
  72. }
  73. void LLFloaterTestInspectors::showObjectInspector(LLUICtrl*, const LLSD& object_id)
  74. {
  75. LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id));
  76. }
  77. void LLFloaterTestInspectors::onClickAvatar2D()
  78. {
  79. }
  80. void LLFloaterTestInspectors::onClickAvatar3D()
  81. {
  82. }
  83. void LLFloaterTestInspectors::onClickObject2D()
  84. {
  85. }
  86. void LLFloaterTestInspectors::onClickObject3D()
  87. {
  88. }
  89. void LLFloaterTestInspectors::onClickGroup()
  90. {
  91. }
  92. void LLFloaterTestInspectors::onClickPlace()
  93. {
  94. }
  95. void LLFloaterTestInspectors::onClickEvent()
  96. {
  97. }