#include <llfloaterfriends.h>
Inheritance diagram for LLPanelFriends:
Public Member Functions | |
LLPanelFriends () | |
virtual | ~LLPanelFriends () |
virtual BOOL | tick () |
This method either creates or brings to the front the current instantiation of this floater. There is only once since you can currently only look at your local friends. | |
void | updateFriends (U32 changed_mask) |
This method is called in response to the LLAvatarTracker sending out a changed() message. | |
virtual BOOL | postBuild () |
Static Public Member Functions | |
static void | requestFriendshipDialog (const LLUUID &target_id, const std::string &target_name) |
static void | requestFriendship (const LLUUID &target_id, const LLString &target_name) |
Private Types | |
LIST_ONLINE_STATUS | |
LIST_FRIEND_NAME | |
LIST_VISIBLE_ONLINE | |
LIST_VISIBLE_MAP | |
LIST_EDIT_MINE | |
LIST_EDIT_THEIRS | |
enum | FRIENDS_COLUMN_ORDER { LIST_ONLINE_STATUS, LIST_FRIEND_NAME, LIST_VISIBLE_ONLINE, LIST_VISIBLE_MAP, LIST_EDIT_MINE, LIST_EDIT_THEIRS } |
Private Member Functions | |
void | reloadNames () |
void | refreshNames () |
void | refreshUI () |
void | refreshRightsChangeList () |
void | applyRightsToFriends (S32 flag, BOOL value) |
void | updateMenuState (S32 flag, BOOL value) |
S32 | getMenuState () |
void | addFriend (const std::string &name, const LLUUID &agent_id) |
LLDynamicArray< LLUUID > | getSelectedIDs () |
Static Private Member Functions | |
static void | onSelectName (LLUICtrl *ctrl, void *user_data) |
static void | callbackAddFriend (S32 option, void *user_data) |
static void | onPickAvatar (const std::vector< std::string > &names, const std::vector< LLUUID > &ids, void *user_data) |
static void | onMaximumSelect (void *user_data) |
static void | onClickIM (void *user_data) |
static void | onClickProfile (void *user_data) |
static void | onClickAddFriend (void *user_data) |
static void | onClickRemove (void *user_data) |
static void | onClickOfferTeleport (void *user_data) |
static void | onClickPay (void *user_data) |
static void | onClickOnlineStatus (LLUICtrl *ctrl, void *user_data) |
static void | onClickMapStatus (LLUICtrl *ctrl, void *user_data) |
static void | onClickModifyStatus (LLUICtrl *ctrl, void *user_data) |
static void | handleRemove (S32 option, void *user_data) |
static void | handleModifyRights (S32 option, void *user_data) |
Private Attributes | |
LLFriendObserver * | mObserver |
LLUUID | mAddFriendID |
LLString | mAddFriendName |
LLScrollListCtrl * | mFriendsList |
S32 | mMenuState |
BOOL | mShowMaxSelectWarning |
BOOL | mAllowRightsChange |
S32 | mNumRightsChanged |
Definition at line 52 of file llfloaterfriends.h.
enum LLPanelFriends::FRIENDS_COLUMN_ORDER [private] |
LIST_ONLINE_STATUS | |
LIST_FRIEND_NAME | |
LIST_VISIBLE_ONLINE | |
LIST_VISIBLE_MAP | |
LIST_EDIT_MINE | |
LIST_EDIT_THEIRS |
Definition at line 84 of file llfloaterfriends.h.
LLPanelFriends::LLPanelFriends | ( | ) |
Definition at line 79 of file llfloaterfriends.cpp.
References LLAvatarTracker::addObserver(), LLAvatarTracker::instance(), LLEventTimer::mEventTimer, mObserver, and LLTimer::stop().
LLPanelFriends::~LLPanelFriends | ( | ) | [virtual] |
Definition at line 93 of file llfloaterfriends.cpp.
References LLAvatarTracker::instance(), mObserver, and LLAvatarTracker::removeObserver().
Definition at line 187 of file llfloaterfriends.cpp.
References ADD_BOTTOM, LLScrollListCtrl::addElement(), LLAvatarTracker::getBuddyInfo(), LLControlGroup::getString(), LLRelationship::GRANT_MAP_LOCATION, LLRelationship::GRANT_MODIFY_OBJECTS, LLRelationship::GRANT_ONLINE_STATUS, gViewerArt, LLAvatarTracker::instance(), LLRelationship::isOnline(), LLRelationship::isRightGrantedFrom(), LLRelationship::isRightGrantedTo(), LIST_EDIT_MINE, LIST_EDIT_THEIRS, LIST_FRIEND_NAME, LIST_ONLINE_STATUS, LIST_VISIBLE_MAP, LIST_VISIBLE_ONLINE, and mFriendsList.
Referenced by refreshNames().
Definition at line 730 of file llfloaterfriends.cpp.
References _PREHASH_AgentData, _PREHASH_AgentID, _PREHASH_AgentRelated, _PREHASH_GrantUserRights, _PREHASH_RelatedRights, _PREHASH_Rights, _PREHASH_SessionID, LLMessageSystem::addS32(), LLMessageSystem::addUUID(), gAgent, LLAvatarTracker::getBuddyInfo(), LLAgent::getID(), LLRelationship::getRightsGrantedTo(), getSelectedIDs(), LLAgent::getSessionID(), gMessageSystem, LLAvatarTracker::instance(), mNumRightsChanged, LLMessageSystem::newMessageFast(), LLMessageSystem::nextBlockFast(), S32, and LLAgent::sendReliableMessage().
Referenced by onClickMapStatus(), and onClickOnlineStatus().
Definition at line 557 of file llfloaterfriends.cpp.
References LLAddFriendData::mID, LLAddFriendData::mName, and requestFriendship().
Referenced by requestFriendshipDialog().
S32 LLPanelFriends::getMenuState | ( | ) | [inline, private] |
LLDynamicArray< LLUUID > LLPanelFriends::getSelectedIDs | ( | ) | [private] |
Definition at line 452 of file llfloaterfriends.cpp.
References LLScrollListCtrl::getAllSelected(), and mFriendsList.
Referenced by applyRightsToFriends(), onClickIM(), onClickModifyStatus(), onClickOfferTeleport(), onClickPay(), onClickProfile(), onClickRemove(), refreshNames(), refreshRightsChangeList(), and updateFriends().
Definition at line 709 of file llfloaterfriends.cpp.
References LLRelationship::GRANT_MODIFY_OBJECTS.
Referenced by onClickModifyStatus().
Definition at line 759 of file llfloaterfriends.cpp.
References LLInventoryModel::addChangedMask(), LLInventoryObserver::CALLING_CARD, LLAvatarTracker::empower(), FALSE, LLAvatarTracker::getBuddyInfo(), gInventory, LLRelationship::GRANT_MODIFY_OBJECTS, LLAvatarTracker::instance(), LLRelationship::isRightGrantedTo(), LLInventoryObserver::LABEL, llendl, llinfos, LLInventoryModel::notifyObservers(), LLAvatarTracker::notifyObservers(), LLUUID::null, and LLAvatarTracker::terminateBuddy().
Referenced by onClickRemove().
Definition at line 598 of file llfloaterfriends.cpp.
References LLFloater::addDependentFloater(), FALSE, LLFloaterView::getParentFloater(), gFloaterView, onPickAvatar(), LLFloaterAvatarPicker::show(), and TRUE.
Referenced by postBuild().
Definition at line 500 of file llfloaterfriends.cpp.
References LLIMMgr::addSession(), DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, first, gCacheName, LLAvatarTracker::getBuddyInfo(), LLCacheName::getName(), getSelectedIDs(), gIMMgr, IM_NOTHING_SPECIAL, IM_SESSION_CONFERENCE_START, LLAvatarTracker::instance(), make_ui_sound(), MAX_STRING, LLIMMgr::setFloaterOpen(), and TRUE.
Referenced by postBuild().
Definition at line 675 of file llfloaterfriends.cpp.
References applyRightsToFriends(), LLUICtrl::getValue(), LLRelationship::GRANT_MAP_LOCATION, and updateMenuState().
Referenced by postBuild().
Definition at line 683 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, first, gCacheName, LLCacheName::getName(), getSelectedIDs(), LLUICtrl::getValue(), gViewerWindow, and handleModifyRights().
Referenced by postBuild().
Definition at line 643 of file llfloaterfriends.cpp.
References getSelectedIDs(), and handle_lure().
Referenced by postBuild().
Definition at line 666 of file llfloaterfriends.cpp.
References applyRightsToFriends(), LLUICtrl::getValue(), LLRelationship::GRANT_ONLINE_STATUS, and updateMenuState().
Referenced by postBuild().
Definition at line 655 of file llfloaterfriends.cpp.
References getSelectedIDs(), and handle_pay_by_id().
Referenced by postBuild().
Definition at line 484 of file llfloaterfriends.cpp.
References getSelectedIDs(), LLAvatarTracker::instance(), LLAvatarTracker::isBuddyOnline(), and LLFloaterAvatarInfo::showFromFriend().
Referenced by postBuild().
Definition at line 610 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), DB_FIRST_NAME_BUF_SIZE, DB_LAST_NAME_BUF_SIZE, first, gCacheName, LLCacheName::getName(), getSelectedIDs(), gViewerWindow, and handleRemove().
Referenced by postBuild().
Definition at line 476 of file llfloaterfriends.cpp.
References llformat(), MAX_FRIEND_SELECT, and LLNotifyBox::showXml().
Referenced by postBuild().
void LLPanelFriends::onPickAvatar | ( | const std::vector< std::string > & | names, | |
const std::vector< LLUUID > & | ids, | |||
void * | user_data | |||
) | [static, private] |
Definition at line 568 of file llfloaterfriends.cpp.
References requestFriendshipDialog().
Referenced by onClickAddFriend().
BOOL LLPanelFriends::postBuild | ( | ) | [virtual] |
Reimplemented from LLPanel.
Definition at line 157 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetDoubleClickCallback(), LLUICtrlFactory::getScrollListByName(), MAX_FRIEND_SELECT, mFriendsList, onClickAddFriend(), onClickIM(), onClickMapStatus(), onClickModifyStatus(), onClickOfferTeleport(), onClickOnlineStatus(), onClickPay(), onClickProfile(), onClickRemove(), onMaximumSelect(), onSelectName(), refreshNames(), refreshUI(), LLScrollListCtrl::setCommitOnSelectionChange(), LLPanel::setDefaultBtn(), LLScrollListCtrl::setMaxiumumSelectCallback(), LLScrollListCtrl::setMaxSelectable(), TRUE, and updateFriends().
void LLPanelFriends::refreshNames | ( | ) | [private] |
Definition at line 385 of file llfloaterfriends.cpp.
References addFriend(), LLAvatarTracker::applyFunctor(), end, LLScrollListCtrl::getScrollPos(), getSelectedIDs(), LLAvatarTracker::instance(), mFriendsList, LLCollectAllBuddies::mOffline, LLCollectAllBuddies::mOnline, LLCtrlSelectionInterface::OP_DELETE, LLScrollListCtrl::operateOnAll(), S32, LLScrollListCtrl::selectMultiple(), and LLScrollListCtrl::setScrollPos().
Referenced by postBuild(), and updateFriends().
void LLPanelFriends::refreshRightsChangeList | ( | ) | [private] |
Definition at line 241 of file llfloaterfriends.cpp.
References LLPanel::childSetEnabled(), LLPanel::childSetTentative(), LLPanel::childSetValue(), LLPanel::childSetVisible(), FALSE, LLAvatarTracker::getBuddyInfo(), getSelectedIDs(), LLUICtrlFactory::getTextBoxByName(), LLRelationship::GRANT_MAP_LOCATION, LLRelationship::GRANT_MODIFY_OBJECTS, LLRelationship::GRANT_ONLINE_STATUS, LLAvatarTracker::instance(), LLRelationship::isOnline(), LLRelationship::isRightGrantedTo(), mAllowRightsChange, mMenuState, NULL, S32, LLView::setVisible(), and TRUE.
Referenced by refreshUI().
void LLPanelFriends::refreshUI | ( | ) | [private] |
Definition at line 415 of file llfloaterfriends.cpp.
References LLPanel::childGetText(), LLPanel::childSetEnabled(), LLPanel::childSetText(), FALSE, LLScrollListCtrl::getAllSelected(), LLScrollListItem::getColumn(), LLScrollListCtrl::getFirstSelected(), LLScrollListCell::getText(), LIST_FRIEND_NAME, mFriendsList, LLStringBase< char >::null, refreshRightsChangeList(), and TRUE.
Referenced by postBuild(), and updateFriends().
void LLPanelFriends::reloadNames | ( | ) | [private] |
void LLPanelFriends::requestFriendship | ( | const LLUUID & | target_id, | |
const LLString & | target_name | |||
) | [static] |
Definition at line 538 of file llfloaterfriends.cpp.
References LLUUID::asString(), LLAssetType::AT_CALLINGCARD, LLInventoryModel::findCategoryUUIDForType(), gInventory, IM_FRIENDSHIP_OFFERED, IM_ONLINE, and send_improved_im().
Referenced by callbackAddFriend(), and request_friendship().
void LLPanelFriends::requestFriendshipDialog | ( | const LLUUID & | target_id, | |
const std::string & | target_name | |||
) | [static] |
Definition at line 578 of file llfloaterfriends.cpp.
References LLViewerWindow::alertXml(), callbackAddFriend(), gAgentID, gViewerWindow, LLAddFriendData::mID, LLAddFriendData::mName, and LLNotifyBox::showXml().
Referenced by LLPanelAvatar::onClickAddFriend(), and onPickAvatar().
BOOL LLPanelFriends::tick | ( | ) | [virtual] |
This method either creates or brings to the front the current instantiation of this floater. There is only once since you can currently only look at your local friends.
Implements LLEventTimer.
Definition at line 99 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, FALSE, mAllowRightsChange, LLEventTimer::mEventTimer, LLEventTimer::mPeriod, LLTimer::stop(), TRUE, and updateFriends().
Referenced by updateFriends().
This method is called in response to the LLAvatarTracker sending out a changed() message.
Definition at line 108 of file llfloaterfriends.cpp.
References LLFriendObserver::ADD, LLPanel::childGetListInterface(), LLPanel::childGetScrollInterface(), FALSE, getSelectedIDs(), mAllowRightsChange, LLEventTimer::mEventTimer, mNumRightsChanged, LLEventTimer::mPeriod, mShowMaxSelectWarning, LLFriendObserver::ONLINE, LLFriendObserver::POWERS, refreshNames(), refreshUI(), LLFriendObserver::REMOVE, LLTimer::reset(), RIGHTS_CHANGE_TIMEOUT, LLCtrlSelectionInterface::setCurrentByID(), LLCtrlSelectionInterface::setSelectedByValue(), LLTimer::start(), and tick().
Referenced by LLLocalFriendsObserver::changed(), postBuild(), and tick().
Definition at line 724 of file llfloaterfriends.cpp.
References mMenuState.
Referenced by onClickMapStatus(), and onClickOnlineStatus().
LLUUID LLPanelFriends::mAddFriendID [private] |
Definition at line 132 of file llfloaterfriends.h.
LLString LLPanelFriends::mAddFriendName [private] |
Definition at line 133 of file llfloaterfriends.h.
BOOL LLPanelFriends::mAllowRightsChange [private] |
Definition at line 137 of file llfloaterfriends.h.
Referenced by refreshRightsChangeList(), tick(), and updateFriends().
LLScrollListCtrl* LLPanelFriends::mFriendsList [private] |
Definition at line 134 of file llfloaterfriends.h.
Referenced by addFriend(), getSelectedIDs(), postBuild(), refreshNames(), and refreshUI().
S32 LLPanelFriends::mMenuState [private] |
Definition at line 135 of file llfloaterfriends.h.
Referenced by getMenuState(), refreshRightsChangeList(), and updateMenuState().
S32 LLPanelFriends::mNumRightsChanged [private] |
Definition at line 138 of file llfloaterfriends.h.
Referenced by applyRightsToFriends(), and updateFriends().
LLFriendObserver* LLPanelFriends::mObserver [private] |
Definition at line 131 of file llfloaterfriends.h.
Referenced by LLPanelFriends(), and ~LLPanelFriends().
BOOL LLPanelFriends::mShowMaxSelectWarning [private] |