llfloaterchatterbox.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /**
  2. * @file llfloaterchatterbox.h
  3. * @author Richard
  4. * @date 2007-05-04
  5. * @brief Integrated friends and group management/communication tool
  6. *
  7. * $LicenseInfo:firstyear=2007&license=viewergpl$
  8. *
  9. * Copyright (c) 2007-2009, Linden Research, Inc.
  10. *
  11. * Second Life Viewer Source Code
  12. * The source code in this file ("Source Code") is provided by Linden Lab
  13. * to you under the terms of the GNU General Public License, version 2.0
  14. * ("GPL"), unless you have obtained a separate licensing agreement
  15. * ("Other License"), formally executed by you and Linden Lab. Terms of
  16. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  17. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  18. *
  19. * There are special exceptions to the terms and conditions of the GPL as
  20. * it is applied to this Source Code. View the full text of the exception
  21. * in the file doc/FLOSS-exception.txt in this software distribution, or
  22. * online at
  23. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  24. *
  25. * By copying, modifying or distributing this software, you acknowledge
  26. * that you have read and understood your obligations described above,
  27. * and agree to abide by those obligations.
  28. *
  29. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  30. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  31. * COMPLETENESS OR PERFORMANCE.
  32. * $/LicenseInfo$
  33. */
  34. #ifndef LL_LLFLOATERCHATTERBOX_H
  35. #define LL_LLFLOATERCHATTERBOX_H
  36. #include "llfloater.h"
  37. #include "lltabcontainer.h"
  38. class LLFloaterNewIM;
  39. class LLFloaterChatterBox final : public LLMultiFloater,
  40. public LLUISingleton<LLFloaterChatterBox,
  41. LLFloaterChatterBox>
  42. {
  43. public:
  44. LLFloaterChatterBox(const LLSD& seed);
  45. bool handleKeyHere(KEY key, MASK mask) override;
  46. void draw() override;
  47. void onOpen() override;
  48. void onClose(bool app_quitting) override;
  49. void setMinimized(bool minimized) override;
  50. void removeFloater(LLFloater* floaterp) override;
  51. void addFloater(LLFloater* floaterp, bool select_added_floater,
  52. LLTabContainer::eInsertionPoint p =
  53. LLTabContainer::END) override;
  54. LL_INLINE LLFloaterNewIM* getFloaterNewIM() { return mFloaterNewIM; }
  55. static LLFloater* getCurrentVoiceFloater();
  56. // Visibility policy for LLUISingleton
  57. static bool visible(LLFloater* instance, const LLSD& key);
  58. static void show(LLFloater* instance, const LLSD& key);
  59. static void hide(LLFloater* instance, const LLSD& key);
  60. private:
  61. LLFloater* getFloater(const LLSD& key);
  62. protected:
  63. LLFloater* mActiveVoiceFloater;
  64. LLFloaterNewIM* mFloaterNewIM;
  65. private:
  66. bool mFirstOpen;
  67. };
  68. #endif // LL_LLFLOATERCHATTERBOX_H