diff options
author | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:19:58 -0800 |
---|---|---|
committer | Palmer Truelson <palmer@lindenlab.com> | 2010-02-23 17:19:58 -0800 |
commit | 54a95f706fe42cbef272c53e3fadfc2cf7ecfd0f (patch) | |
tree | d9b1f05ce695fa3ef5ee41949d3799d4e9a3e050 /indra/newview/lltoast.h | |
parent | 7885748497d8b95f51c65f7f84a40d1405429616 (diff) | |
parent | 0980df1e0ce99bdafdd4e806cbacad96c71729cc (diff) |
merge
Diffstat (limited to 'indra/newview/lltoast.h')
-rw-r--r-- | indra/newview/lltoast.h | 26 |
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; }; } |