diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-11 23:50:59 +0000 |
commit | 7df79382a075646a51f21bed0d7f8de883fc3608 (patch) | |
tree | e7a71ed0dc7e05e4091066e3a0455343dfcfce4f /indra/newview/llavatarlistitem.h | |
parent | 56449313529145a3d3c0e231967d9502b549056c (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1634 https://svn.aws.productengine.com/secondlife/pe/stable-2@1648 -> viewer-2.0.0-3
* Bugs: EXT-888 EXT-866 EXT-861 EXT-858 EXT-864 EXT-875 EXT-884 EXT-718 EXT-786 EXT-885 EXT-910 EXT-845 EXT-312 EXT-823 EXT-868
* New Development: EXT-748 EXT-863 EXT-835
QA: Please test Recent List to verify it has no troubles.
Diffstat (limited to 'indra/newview/llavatarlistitem.h')
-rw-r--r-- | indra/newview/llavatarlistitem.h | 94 |
1 files changed, 32 insertions, 62 deletions
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index b41e0ff209..dc5606e4c2 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -2,9 +2,9 @@ * @file llavatarlistitem.h * @avatar list item header file * - * $LicenseInfo:firstyear=2004&license=viewergpl$ + * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -30,75 +30,45 @@ * $/LicenseInfo$ */ -#include "llavatariconctrl.h" -#include <llview.h> -#include <llpanel.h> -#include <llfloater.h> -#include <lltextbox.h> -#include <llbutton.h> -#include <lluuid.h> +#ifndef LL_LLAVATARLISTITEM_H +#define LL_LLAVATARLISTITEM_H -//#include "llfloaterminiinspector.h" +#include "llpanel.h" +#include "lloutputmonitorctrl.h" +#include "llbutton.h" +#include "lltextbox.h" -class LLAvatarListItem : public LLPanel +class LLAvatarIconCtrl; + +class LLAvatarListItem : public LLPanel { public: - struct Params : public LLInitParam::Block<Params, LLPanel::Params> - { - Optional<LLUUID> avatar_icon; - Optional<std::string> user_name; - struct avatar_list_item_buttons - { - bool status; - bool info; - bool profile; - bool locator; - avatar_list_item_buttons() : status(true), info(true), profile(true), locator(true) - {}; - } buttons; - - Params() - : avatar_icon("avatar_icon"), - user_name("user_name") - {}; - }; - - - LLAvatarListItem(const Params& p); - virtual ~LLAvatarListItem(); - - void reshape(S32 width, S32 height, BOOL called_from_parent); - - //interface - void setStatus(int status); - void setName(std::string name); - void setAvatar(LLSD& data); - void needsArrange( void ) {mNeedsArrange = true;} - + LLAvatarListItem(); + virtual ~LLAvatarListItem() {}; - //event handlers - //mouse - virtual BOOL handleHover(S32 x, S32 y, MASK mask); + virtual BOOL postBuild(); virtual void onMouseLeave(S32 x, S32 y, MASK mask); virtual void onMouseEnter(S32 x, S32 y, MASK mask); - //buttons - void onInfoBtnClick(); - void onProfileBtnClick(); + virtual void setValue(const LLSD& value); -private: - LLAvatarIconCtrl* mAvatar; - LLIconCtrl* mLocator; - LLTextBox* mName; - LLTextBox* mStatus; - LLButton* mInfo; - LLButton* mProfile; + void setStatus(const std::string& status); + void setName(const std::string& name); + void setAvatarId(const LLUUID& id); + + void onInfoBtnClick(); - S32 mYPos; - S32 mXPos; + void showSpeakingIndicator(bool show) { mSpeakingIndicator->setVisible(show); } + void showInfoBtn(bool show_info_btn) {mInfoBtn->setVisible(show_info_btn); } + void showStatus(bool show_status) {mStatus->setVisible(show_status); } - LLFloater* mInspector; - bool mNeedsArrange; - // - void init(const Params& p); +private: + LLAvatarIconCtrl*mAvatarIcon; + LLTextBox* mAvatarName; + LLTextBox* mStatus; + + LLOutputMonitorCtrl* mSpeakingIndicator; + LLButton* mInfoBtn; }; + +#endif //LL_LLAVATARLISTITEM_H |