summaryrefslogtreecommitdiff
path: root/indra/newview/llchatitemscontainerctrl.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llchatitemscontainerctrl.h')
-rw-r--r--indra/newview/llchatitemscontainerctrl.h86
1 files changed, 17 insertions, 69 deletions
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index de16cf9505..8fb045b6d9 100644
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -37,6 +37,7 @@
#include "llscrollbar.h"
#include "string"
#include "llchat.h"
+#include "lltoastpanel.h"
typedef enum e_show_item_header
{
@@ -45,20 +46,18 @@ typedef enum e_show_item_header
CHATITEMHEADER_SHOW_BOTH
} EShowItemHeader;
-class LLChatItemCtrl: public LLPanel
+class LLNearbyChatToastPanel: public LLToastPanelBase
{
protected:
- LLChatItemCtrl(){};
+ LLNearbyChatToastPanel():mIsDirty(false){};
public:
- ~LLChatItemCtrl(){}
+ ~LLNearbyChatToastPanel(){}
- static LLChatItemCtrl* createInstance();
+ static LLNearbyChatToastPanel* createInstance();
- void draw();
-
- const LLChat& getMessage() const { return mOriginalMessage;}
+ const LLUUID& getFromID() const { return mFromID;}
void addText (const std::string& message);
void setMessage (const LLChat& msg);
@@ -77,78 +76,27 @@ public:
void setHeaderVisibility(EShowItemHeader e);
BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
-private:
-
- std::string appendTime ();
-
-private:
- LLChat mOriginalMessage;
-
- std::vector<std::string> mMessages;
-};
-
-class LLChatItemsContainerCtrl: public LLPanel
-{
-public:
- struct Params
- : public LLInitParam::Block<Params, LLPanel::Params>
- {
- Params(){};
- };
-
- LLChatItemsContainerCtrl(const Params& params);
-
-
- ~LLChatItemsContainerCtrl(){}
-
- void addMessage (const LLChat& msg);
-
- void draw();
-
- void reshape (S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- void onScrollPosChangeCallback(S32, LLScrollbar*);
-
- virtual BOOL postBuild();
-
- BOOL handleMouseDown (S32 x, S32 y, MASK mask);
- BOOL handleKeyHere (KEY key, MASK mask);
- BOOL handleScrollWheel( S32 x, S32 y, S32 clicks );
-
- void scrollToBottom ();
-
- void setHeaderVisibility(EShowItemHeader e);
- EShowItemHeader getHeaderVisibility() const { return mEShowItemHeader;};
+ virtual void init(LLSD& data);
+ virtual void draw();
private:
- void reformatHistoryScrollItems(S32 width);
- void arrange (S32 width, S32 height);
-
- S32 calcRecuiredHeight ();
- S32 getRecuiredHeight () const { return mInnerRect.getHeight(); }
-
- void updateLayout (S32 width, S32 height);
-
- void show_hide_scrollbar (S32 width, S32 height);
-
- void showScrollbar (S32 width, S32 height);
- void hideScrollbar (S32 width, S32 height);
-
- void panelSetLeftTopAndSize (LLView* panel, S32 left, S32 top, S32 width, S32 height);
- void panelShiftVertical (LLView* panel,S32 delta);
- void shiftPanels (S32 delta);
+
+ std::string appendTime ();
private:
- std::vector<LLChatItemCtrl*> mItems;
+ std::string mText; // UTF-8 line of text
+ std::string mFromName; // agent or object name
+ LLUUID mFromID; // agent id or object id
+ EChatSourceType mSourceType;
- EShowItemHeader mEShowItemHeader;
- LLRect mInnerRect;
- LLScrollbar* mScrollbar;
+ std::vector<std::string> mMessages;
+ bool mIsDirty;
};
+
#endif