summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.h
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-17 18:54:47 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-17 18:54:47 +0000
commitb31d7cb22f1ab51428bdfbae6d252d7c22167b7a (patch)
tree0202d447218fade13c7e9f87972d7c4966174d47 /indra/newview/lltoast.h
parent2398ac98d01d3809904759251e2c98cf2740e139 (diff)
parent2490f50ce1bc7ffe1e53a99e4081bee13253f09a (diff)
merge from viewer2.
Diffstat (limited to 'indra/newview/lltoast.h')
-rw-r--r--indra/newview/lltoast.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 3d25fd4f02..64855020a9 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -86,8 +86,6 @@ public:
// Toast handlers
virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
- virtual void onMouseEnter(S32 x, S32 y, MASK mask);
- virtual void onMouseLeave(S32 x, S32 y, MASK mask);
//Fading
@@ -97,6 +95,7 @@ public:
/** Start fading timer */
virtual void startFading();
+ bool isHovered();
// Operating with toasts
// insert a panel to a toast
@@ -118,10 +117,22 @@ public:
virtual void draw();
//
virtual void setVisible(BOOL show);
+
+ /*virtual*/ void setBackgroundOpaque(BOOL b);
//
virtual void hide();
+ /*virtual*/ void onFocusLost();
+
+ /*virtual*/ void onFocusReceived();
+ /**
+ * Returns padding between floater top and wrapper_panel top.
+ * This padding should be taken into account when positioning or reshaping toasts
+ */
+ S32 getTopPad();
+
+ S32 getRightPad();
// get/set Toast's flags or states
// get information whether the notification corresponding to the toast is valid or not
@@ -154,9 +165,15 @@ public:
toast_hover_check_signal_t mOnToastHoverSignal;
boost::signals2::connection setOnToastHoverCallback(toast_hover_check_callback_t cb) { return mOnToastHoverSignal.connect(cb); }
+ boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseEnterSignal.connect(cb); };
+ boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseLeaveSignal.connect(cb); };
private:
+ void onToastMouseEnter();
+
+ void onToastMouseLeave();
+
void handleTipToastClick(S32 x, S32 y, MASK mask);
// check timer
@@ -168,6 +185,8 @@ private:
LLUUID mSessionID;
LLNotificationPtr mNotification;
+ LLPanel* mWrapperPanel;
+
// timer counts a lifetime of a toast
LLTimer mTimer;
F32 mToastLifetime; // in seconds
@@ -184,6 +203,9 @@ private:
bool mHideBtnPressed;
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
+
+ commit_signal_t mToastMouseEnterSignal;
+ commit_signal_t mToastMouseLeaveSignal;
};
}