/indra/newview/llfloatertestinspectors.cpp

https://bitbucket.org/lindenlab/viewer-beta/ · C++ · 113 lines · 65 code · 17 blank · 31 comment · 1 complexity · 80f7bdff1b14cf49b07f0885d2016c37 MD5 · raw file

  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. #include "llfloatertestinspectors.h"
  27. // Viewer includes
  28. #include "llstartup.h"
  29. // Linden library includes
  30. #include "llfloaterreg.h"
  31. //#include "lluictrlfactory.h"
  32. LLFloaterTestInspectors::LLFloaterTestInspectors(const LLSD& seed)
  33. : LLFloater(seed)
  34. {
  35. mCommitCallbackRegistrar.add("ShowAvatarInspector",
  36. boost::bind(&LLFloaterTestInspectors::showAvatarInspector, this, _1, _2));
  37. mCommitCallbackRegistrar.add("ShowObjectInspector",
  38. boost::bind(&LLFloaterTestInspectors::showObjectInspector, this, _1, _2));
  39. }
  40. LLFloaterTestInspectors::~LLFloaterTestInspectors()
  41. {}
  42. BOOL LLFloaterTestInspectors::postBuild()
  43. {
  44. // Test the dummy widget construction code
  45. getChild<LLUICtrl>("intentionally-not-found")->setEnabled(true);
  46. // getChild<LLUICtrl>("avatar_2d_btn")->setCommitCallback(
  47. // boost::bind(&LLFloaterTestInspectors::onClickAvatar2D, this));
  48. getChild<LLUICtrl>("avatar_3d_btn")->setCommitCallback(
  49. boost::bind(&LLFloaterTestInspectors::onClickAvatar3D, this));
  50. getChild<LLUICtrl>("object_2d_btn")->setCommitCallback(
  51. boost::bind(&LLFloaterTestInspectors::onClickObject2D, this));
  52. getChild<LLUICtrl>("object_3d_btn")->setCommitCallback(
  53. boost::bind(&LLFloaterTestInspectors::onClickObject3D, this));
  54. getChild<LLUICtrl>("group_btn")->setCommitCallback(
  55. boost::bind(&LLFloaterTestInspectors::onClickGroup, this));
  56. getChild<LLUICtrl>("place_btn")->setCommitCallback(
  57. boost::bind(&LLFloaterTestInspectors::onClickPlace, this));
  58. getChild<LLUICtrl>("event_btn")->setCommitCallback(
  59. boost::bind(&LLFloaterTestInspectors::onClickEvent, this));
  60. return LLFloater::postBuild();
  61. }
  62. void LLFloaterTestInspectors::showAvatarInspector(LLUICtrl*, const LLSD& avatar_id)
  63. {
  64. LLUUID id; // defaults to null
  65. if (LLStartUp::getStartupState() >= STATE_STARTED)
  66. {
  67. id = avatar_id.asUUID();
  68. }
  69. // spawns off mouse position automatically
  70. LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", id));
  71. }
  72. void LLFloaterTestInspectors::showObjectInspector(LLUICtrl*, const LLSD& object_id)
  73. {
  74. LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", object_id));
  75. }
  76. void LLFloaterTestInspectors::onClickAvatar2D()
  77. {
  78. }
  79. void LLFloaterTestInspectors::onClickAvatar3D()
  80. {
  81. }
  82. void LLFloaterTestInspectors::onClickObject2D()
  83. {
  84. }
  85. void LLFloaterTestInspectors::onClickObject3D()
  86. {
  87. }
  88. void LLFloaterTestInspectors::onClickGroup()
  89. {
  90. }
  91. void LLFloaterTestInspectors::onClickPlace()
  92. {
  93. }
  94. void LLFloaterTestInspectors::onClickEvent()
  95. {
  96. }