PageRenderTime 32ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llsidepanelinventorysubpanel.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 75 lines | 32 code | 11 blank | 32 comment | 0 complexity | 803f42807956f73d6ea7352f81a6b257 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llsidepanelinventorysubpanel.h
  3. * @brief A panel which shows an inventory item's properties.
  4. *
  5. * $LicenseInfo:firstyear=2002&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_LLSIDEPANELINVENTORYSUBPANEL_H
  27. #define LL_LLSIDEPANELINVENTORYSUBPANEL_H
  28. #include "llpanel.h"
  29. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. // Class LLSidepanelInventorySubpanel
  31. // Base class for inventory sidepanel panels (e.g. item info, task info).
  32. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  33. class LLButton;
  34. class LLInventoryItem;
  35. class LLSidepanelInventorySubpanel : public LLPanel
  36. {
  37. public:
  38. LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams());
  39. virtual ~LLSidepanelInventorySubpanel();
  40. /*virtual*/ void setVisible(BOOL visible);
  41. virtual BOOL postBuild();
  42. virtual void draw();
  43. virtual void reset();
  44. void dirty();
  45. void setIsEditing(BOOL edit);
  46. protected:
  47. virtual void refresh() = 0;
  48. virtual void save() = 0;
  49. virtual void updateVerbs();
  50. BOOL getIsEditing() const;
  51. //
  52. // UI Elements
  53. //
  54. protected:
  55. void onEditButtonClicked();
  56. void onSaveButtonClicked();
  57. void onCancelButtonClicked();
  58. LLButton* mSaveBtn;
  59. LLButton* mCancelBtn;
  60. private:
  61. BOOL mIsDirty; // item properties need to be updated
  62. BOOL mIsEditing; // if we're in edit mode
  63. };
  64. #endif // LL_LLSIDEPANELINVENTORYSUBPANEL_H