/indra/newview/llpopupview.h

https://bitbucket.org/lindenlab/viewer-beta/ · C++ Header · 61 lines · 29 code · 7 blank · 25 comment · 0 complexity · 77a6bbdd5858234ba61e62c26d45aaa2 MD5 · raw file

  1. /**
  2. * @file llpopupview.h
  3. * @brief Holds transient popups
  4. *
  5. * $LicenseInfo:firstyear=2001&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_LLPOPUPVIEW_H
  27. #define LL_LLPOPUPVIEW_H
  28. #include "llpanel.h"
  29. class LLPopupView : public LLPanel
  30. {
  31. public:
  32. LLPopupView(const Params& p = LLPanel::Params());
  33. ~LLPopupView();
  34. /*virtual*/ void draw();
  35. /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask);
  36. /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
  37. /*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask);
  38. /*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask);
  39. /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
  40. /*virtual*/ BOOL handleRightMouseUp(S32 x, S32 y, MASK mask);
  41. /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask);
  42. /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
  43. /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
  44. /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask);
  45. void addPopup(LLView* popup);
  46. void removePopup(LLView* popup);
  47. void clearPopups();
  48. typedef std::list<LLHandle<LLView> > popup_list_t;
  49. popup_list_t getCurrentPopups() { return mPopups; }
  50. private:
  51. BOOL handleMouseEvent(boost::function<BOOL(LLView*, S32, S32)>, boost::function<bool(LLView*)>, S32 x, S32 y, bool close_popups);
  52. popup_list_t mPopups;
  53. };
  54. #endif //LL_LLROOTVIEW_H