PageRenderTime 29ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llui/llflyoutbutton.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 68 lines | 29 code | 11 blank | 28 comment | 0 complexity | 2625bf16e63c576b589a6f15ac533a44 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llflyoutbutton.h
  3. * @brief LLFlyoutButton base class
  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. // A control that displays the name of the chosen item, which when clicked
  27. // shows a scrolling box of choices.
  28. #ifndef LL_LLFLYOUTBUTTON_H
  29. #define LL_LLFLYOUTBUTTON_H
  30. #include "llcombobox.h"
  31. // Classes
  32. class LLFlyoutButton : public LLComboBox
  33. {
  34. public:
  35. struct Params : public LLInitParam::Block<Params, LLComboBox::Params>
  36. {
  37. Optional<LLButton::Params> action_button;
  38. Deprecated allow_text_entry;
  39. Params()
  40. : action_button("action_button"),
  41. allow_text_entry("allow_text_entry")
  42. {
  43. changeDefault(LLComboBox::Params::allow_text_entry, false);
  44. }
  45. };
  46. protected:
  47. LLFlyoutButton(const Params&);
  48. friend class LLUICtrlFactory;
  49. public:
  50. virtual void draw();
  51. void setToggleState(BOOL state);
  52. void onActionButtonClick(const LLSD& data);
  53. protected:
  54. LLButton* mActionButton;
  55. BOOL mToggleState;
  56. };
  57. #endif // LL_LLFLYOUTBUTTON_H