PageRenderTime 28ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloateravatarpicker.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 99 lines | 52 code | 20 blank | 27 comment | 0 complexity | 2b6e34049477c9b02a0416887d5e5bce MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llfloateravatarpicker.h
  3. * @brief was llavatarpicker.h
  4. *
  5. * $LicenseInfo:firstyear=2003&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 LLFLOATERAVATARPICKER_H
  27. #define LLFLOATERAVATARPICKER_H
  28. #include "llfloater.h"
  29. #include <vector>
  30. class LLAvatarName;
  31. class LLScrollListCtrl;
  32. class LLFloaterAvatarPicker : public LLFloater
  33. {
  34. public:
  35. typedef boost::signals2::signal<bool(const uuid_vec_t&), boost_boolean_combiner> validate_signal_t;
  36. typedef validate_signal_t::slot_type validate_callback_t;
  37. // The callback function will be called with an avatar name and UUID.
  38. typedef boost::function<void (const uuid_vec_t&, const std::vector<LLAvatarName>&)> select_callback_t;
  39. // Call this to select an avatar.
  40. static LLFloaterAvatarPicker* show(select_callback_t callback,
  41. BOOL allow_multiple = FALSE,
  42. BOOL closeOnSelect = FALSE);
  43. LLFloaterAvatarPicker(const LLSD& key);
  44. virtual ~LLFloaterAvatarPicker();
  45. virtual BOOL postBuild();
  46. void setOkBtnEnableCb(validate_callback_t cb);
  47. static void processAvatarPickerReply(class LLMessageSystem* msg, void**);
  48. void processResponse(const LLUUID& query_id, const LLSD& content);
  49. BOOL handleDragAndDrop(S32 x, S32 y, MASK mask,
  50. BOOL drop, EDragAndDropType cargo_type,
  51. void *cargo_data, EAcceptance *accept,
  52. std::string& tooltip_msg);
  53. void openFriendsTab();
  54. private:
  55. void editKeystroke(class LLLineEditor* caller, void* user_data);
  56. void onBtnFind();
  57. void onBtnSelect();
  58. void onBtnRefresh();
  59. void onRangeAdjust();
  60. void onBtnClose();
  61. void onList();
  62. void onTabChanged();
  63. bool isSelectBtnEnabled();
  64. void populateNearMe();
  65. void populateFriend();
  66. BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected.
  67. void find();
  68. void setAllowMultiple(BOOL allow_multiple);
  69. LLScrollListCtrl* getActiveList();
  70. virtual void draw();
  71. virtual BOOL handleKeyHere(KEY key, MASK mask);
  72. LLUUID mQueryID;
  73. int mNumResultsReturned;
  74. BOOL mNearMeListComplete;
  75. BOOL mCloseOnSelect;
  76. validate_signal_t mOkButtonValidateSignal;
  77. select_callback_t mSelectionCallback;
  78. };
  79. #endif