PageRenderTime 34ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llplacesinventorypanel.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 92 lines | 41 code | 17 blank | 34 comment | 0 complexity | d92b73823c6b1813a526baa62fe9f531 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llplacesinventorypanel.h
  3. * @brief LLPlacesInventoryPanel class declaration
  4. *
  5. * $LicenseInfo:firstyear=2009&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. #ifndef LL_LLINVENTORYSUBTREEPANEL_H
  27. #define LL_LLINVENTORYSUBTREEPANEL_H
  28. #include "llfloaterinventory.h"
  29. #include "llinventorypanel.h"
  30. #include "llfolderview.h"
  31. class LLLandmarksPanel;
  32. class LLPlacesInventoryPanel : public LLInventoryPanel
  33. {
  34. public:
  35. struct Params
  36. : public LLInitParam::Block<Params, LLInventoryPanel::Params>
  37. {
  38. Params()
  39. {}
  40. };
  41. LLPlacesInventoryPanel(const Params& p);
  42. ~LLPlacesInventoryPanel();
  43. /*virtual*/ void buildFolderView(const LLInventoryPanel::Params& params);
  44. void saveFolderState();
  45. void restoreFolderState();
  46. virtual S32 notify(const LLSD& info) ;
  47. private:
  48. LLSaveFolderState* mSavedFolderState;
  49. };
  50. class LLPlacesFolderView : public LLFolderView
  51. {
  52. public:
  53. LLPlacesFolderView(const LLFolderView::Params& p);
  54. /**
  55. * Handles right mouse down
  56. *
  57. * Contains workaround for EXT-2786: sets current selected list for landmark
  58. * panel using @c mParentLandmarksPanel which is set in @c LLLandmarksPanel::initLandmarksPanel
  59. */
  60. /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
  61. void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle);
  62. void setParentLandmarksPanel(LLLandmarksPanel* panel)
  63. {
  64. mParentLandmarksPanel = panel;
  65. }
  66. S32 getSelectedCount() { return (S32)mSelectedItems.size(); }
  67. private:
  68. /**
  69. * holds pointer to landmark panel. This pointer is used in @c LLPlacesFolderView::handleRightMouseDown
  70. */
  71. LLLandmarksPanel* mParentLandmarksPanel;
  72. typedef std::map<LLInventoryType::EType, LLHandle<LLView> > inventory_type_menu_handle_t;
  73. inventory_type_menu_handle_t mMenuHandlesByInventoryType;
  74. };
  75. #endif //LL_LLINVENTORYSUBTREEPANEL_H