summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llscreenchannel.h')
-rw-r--r--indra/newview/llscreenchannel.h40
1 files changed, 26 insertions, 14 deletions
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index 2f23552828..56a9cf8b4b 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -69,6 +69,8 @@ public:
};
LLScreenChannelBase(const Params&);
+
+ BOOL postBuild();
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
@@ -115,7 +117,7 @@ public:
// get ID of a channel
LLUUID getChannelID() { return mID; }
- LLHandle<LLScreenChannelBase> getHandle() { mRootHandle.bind(this); return mRootHandle; }
+ LLHandle<LLScreenChannelBase> getHandle() { return getDerivedHandle<LLScreenChannelBase>(); }
protected:
void updateRect();
@@ -123,12 +125,11 @@ protected:
// Channel's flags
bool mControlHovering;
- LLToast* mHoveredToast;
+ LLToast* mHoveredToast;
bool mCanStoreToasts;
bool mDisplayToastsAlways;
// controls whether a channel shows toasts or not
bool mShowToasts;
- LLRootHandle<LLScreenChannelBase> mRootHandle;
//
EToastAlignment mToastAlignment;
EChannelAlignment mChannelAlignment;
@@ -137,6 +138,9 @@ protected:
// channel's ID
LLUUID mID;
+
+ LLView* mFloaterSnapRegion;
+ LLView* mChicletRegion;
};
@@ -158,7 +162,7 @@ public:
virtual bool matches(const LLNotificationPtr) const = 0;
};
- std::list<LLToast*> findToasts(const Matcher& matcher);
+ std::list<const LLToast*> findToasts(const Matcher& matcher);
// Channel's outfit-functions
// update channel's size and position in the World View
@@ -233,31 +237,39 @@ public:
reject_tost_signal_t mRejectToastSignal; boost::signals2::connection setOnRejectToastCallback(reject_tost_callback_t cb) { return mRejectToastSignal.connect(cb); }
private:
- struct ToastElem
+ class ToastElem
{
- LLUUID id;
- LLToast* toast;
+ public:
+ ToastElem(const LLHandle<LLToast>& toast) : mToast(toast)
+ {
+ }
- ToastElem(LLToast::Params p) : id(p.notif_id)
+ ToastElem(const ToastElem& toast_elem) : mToast(toast_elem.mToast)
{
- toast = new LLToast(p);
}
- ToastElem(const ToastElem& toast_elem)
+ LLToast* getToast() const
{
- id = toast_elem.id;
- toast = toast_elem.toast;
+ return mToast.get();
+ }
+
+ LLUUID getID() const
+ {
+ return mToast.isDead() ? LLUUID() : mToast.get()->getNotificationID();
}
bool operator == (const LLUUID &id_op) const
{
- return (id == id_op);
+ return (getID() == id_op);
}
bool operator == (LLPanel* panel_op) const
{
- return (toast == panel_op);
+ return (mToast.get() == panel_op);
}
+
+ private:
+ LLHandle<LLToast> mToast;
};
// Channel's handlers