PageRenderTime 32ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/newview/llnearbychat.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 83 lines | 34 code | 22 blank | 27 comment | 0 complexity | 44c0224805f40caeea70a1a856717ad1 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llnearbychat.h
  3. * @brief nearby chat history scrolling panel implementation
  4. *
  5. * $LicenseInfo:firstyear=2004&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_LLNEARBYCHAT_H_
  27. #define LL_LLNEARBYCHAT_H_
  28. #include "llscrollbar.h"
  29. #include "llviewerchat.h"
  30. #include "llfloater.h"
  31. class LLResizeBar;
  32. class LLChatHistory;
  33. class LLNearbyChat: public LLPanel
  34. {
  35. public:
  36. LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
  37. BOOL postBuild ();
  38. /** @param archive true - to save a message to the chat history log */
  39. void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD());
  40. void onNearbyChatContextMenuItemClicked(const LLSD& userdata);
  41. bool onNearbyChatCheckContextMenuItem(const LLSD& userdata);
  42. virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
  43. virtual void draw();
  44. // focus overrides
  45. /*virtual*/ void onFocusLost();
  46. /*virtual*/ void onFocusReceived();
  47. /*virtual*/ void setVisible(BOOL visible);
  48. virtual void updateChatHistoryStyle();
  49. static void processChatHistoryStyleUpdate(const LLSD& newvalue);
  50. void loadHistory();
  51. static LLNearbyChat* getInstance();
  52. void removeScreenChat();
  53. private:
  54. void getAllowedRect (LLRect& rect);
  55. void onNearbySpeakers ();
  56. private:
  57. LLHandle<LLView> mPopupMenuHandle;
  58. LLChatHistory* mChatHistory;
  59. std::vector<LLChat> mMessageArchive;
  60. };
  61. #endif