summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.h
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2010-11-02 19:02:49 -0700
committerbrad kittenbrink <brad@lindenlab.com>2010-11-02 19:02:49 -0700
commit6a9e70053beaa0fb936482f5594137a8bcdf2f1e (patch)
tree9f6a44825ed0886807c4b38d9a92188261bbaf25 /indra/newview/lltoast.h
parent4902a2752e6ee5dfd47be3d94955f88bf73bf5d8 (diff)
parentaccbddaeadeec7221c9244bf1c0245b8ccbd12bc (diff)
Merge
Diffstat (limited to 'indra/newview/lltoast.h')
-rw-r--r--indra/newview/lltoast.h35
1 files changed, 24 insertions, 11 deletions
diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h
index 0a96c092a0..fb534561c9 100644
--- a/indra/newview/lltoast.h
+++ b/indra/newview/lltoast.h
@@ -49,14 +49,16 @@ class LLToast;
class LLToastLifeTimer: public LLEventTimer
{
public:
- LLToastLifeTimer(LLToast* toast, F32 period) : mToast(toast), LLEventTimer(period){}
+ LLToastLifeTimer(LLToast* toast, F32 period);
/*virtual*/
BOOL tick();
- void stop() { mEventTimer.stop(); }
- void start() { mEventTimer.start(); }
- void restart() {mEventTimer.reset(); }
- BOOL getStarted() { return mEventTimer.getStarted(); }
+ void stop();
+ void start();
+ void restart();
+ BOOL getStarted();
+ void setPeriod(F32 period);
+ F32 getRemainingTimeF32();
LLTimer& getEventTimer() { return mEventTimer;}
private :
@@ -80,8 +82,14 @@ public:
Optional<LLUUID> notif_id, //notification ID
session_id; //im session ID
Optional<LLNotificationPtr> notification;
- Optional<F32> lifetime_secs,
- fading_time_secs; // Number of seconds while a toast is fading
+
+ //NOTE: Life time of a toast (i.e. period of time from the moment toast was shown
+ //till the moment when toast was hidden) is the sum of lifetime_secs and fading_time_secs.
+
+ Optional<F32> lifetime_secs, // Number of seconds while a toast is non-transparent
+ fading_time_secs; // Number of seconds while a toast is transparent
+
+
Optional<toast_callback_t> on_delete_toast,
on_mouse_enter;
Optional<bool> can_fade,
@@ -125,10 +133,8 @@ public:
LLPanel* getPanel() { return mPanel; }
// enable/disable Toast's Hide button
void setHideButtonEnabled(bool enabled);
- //
- void resetTimer() { mTimer->start(); }
//
- void stopTimer() { mTimer->stop(); }
+ F32 getTimeLeftToLive();
//
LLToastLifeTimer* getTimer() { return mTimer.get();}
//
@@ -144,6 +150,10 @@ public:
/*virtual*/ void onFocusReceived();
+ void setLifetime(S32 seconds);
+
+ void setFadingTime(S32 seconds);
+
/**
* Returns padding between floater top and wrapper_panel top.
* This padding should be taken into account when positioning or reshaping toasts
@@ -196,7 +206,9 @@ private:
void onToastMouseLeave();
- void expire();
+ void expire();
+
+ void setTransparentState(bool transparent);
LLUUID mNotificationID;
LLUUID mSessionID;
@@ -222,6 +234,7 @@ private:
bool mHideBtnPressed;
bool mIsHidden; // this flag is TRUE when a toast has faded or was hidden with (x) button (EXT-1849)
bool mIsTip;
+ bool mIsTransparent;
commit_signal_t mToastMouseEnterSignal;
commit_signal_t mToastMouseLeaveSignal;