summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlistitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarlistitem.h')
-rw-r--r--indra/newview/llavatarlistitem.h94
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