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

/indra/newview/llpanelmarketplaceinboxinventory.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 121 lines | 62 code | 32 blank | 27 comment | 0 complexity | 7ea0a24fb543b1abee797166def11c5a MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llpanelmarketplaceinboxinventory.h
  3. * @brief LLInboxInventoryPanel 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_INBOXINVENTORYPANEL_H
  27. #define LL_INBOXINVENTORYPANEL_H
  28. #include "llbadgeowner.h"
  29. #include "llinventorypanel.h"
  30. #include "llfolderviewitem.h"
  31. #define SUPPORTING_FRESH_ITEM_COUNT 1
  32. class LLInboxInventoryPanel : public LLInventoryPanel
  33. {
  34. public:
  35. struct Params : public LLInitParam::Block<Params, LLInventoryPanel::Params>
  36. {};
  37. LLInboxInventoryPanel(const Params& p);
  38. ~LLInboxInventoryPanel();
  39. // virtual
  40. void buildFolderView(const LLInventoryPanel::Params& params);
  41. // virtual
  42. LLFolderViewFolder * createFolderViewFolder(LLInvFVBridge * bridge);
  43. LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge);
  44. };
  45. class LLInboxFolderViewFolder : public LLFolderViewFolder, public LLBadgeOwner
  46. {
  47. public:
  48. struct Params : public LLInitParam::Block<Params, LLFolderViewFolder::Params>
  49. {
  50. Optional<LLBadge::Params> new_badge;
  51. Params()
  52. : new_badge("new_badge")
  53. {
  54. }
  55. };
  56. LLInboxFolderViewFolder(const Params& p);
  57. void draw();
  58. void selectItem();
  59. void toggleOpen();
  60. void computeFreshness();
  61. void deFreshify();
  62. bool isFresh() const { return mFresh; }
  63. protected:
  64. void setCreationDate(time_t creation_date_utc);
  65. bool mFresh;
  66. };
  67. class LLInboxFolderViewItem : public LLFolderViewItem, public LLBadgeOwner
  68. {
  69. public:
  70. struct Params : public LLInitParam::Block<Params, LLFolderViewItem::Params>
  71. {
  72. Optional<LLBadge::Params> new_badge;
  73. Params()
  74. : new_badge("new_badge")
  75. {
  76. }
  77. };
  78. LLInboxFolderViewItem(const Params& p);
  79. BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
  80. BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
  81. void draw();
  82. void selectItem();
  83. void computeFreshness();
  84. void deFreshify();
  85. bool isFresh() const { return mFresh; }
  86. protected:
  87. bool mFresh;
  88. };
  89. #endif //LL_INBOXINVENTORYPANEL_H