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.h72
1 files changed, 49 insertions, 23 deletions
diff --git a/indra/newview/llscreenchannel.h b/indra/newview/llscreenchannel.h
index a205b913ab..579f41eac8 100644
--- a/indra/newview/llscreenchannel.h
+++ b/indra/newview/llscreenchannel.h
@@ -59,36 +59,55 @@ public:
LLScreenChannel();
virtual ~LLScreenChannel();
+ // Channel's outfit-functions
+ // classic reshape
void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
-
- LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true);
+ // initialization of channel's shape and position
void init(S32 channel_left, S32 channel_right);
+ // set allignment of toasts inside a channel
+ void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;}
+ // set a template for a string in the OverflowToast
+ void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; }
+ // Operating with toasts
+ // add a toast to a channel
+ LLToast* addToast(LLUUID id, LLPanel* panel, bool is_not_tip = true);
+ // kill or modify a toast by its ID
void killToastByNotificationID(LLUUID id);
void modifyToastByNotificationID(LLUUID id, LLPanel* panel);
-
- void setToastAlignment(e_notification_toast_alignment align) {mToastAlignment = align;}
-
- void setControlHovering(bool control) { mControlHovering = control; }
- void setHovering(bool hovering) { mIsHovering = hovering; }
-
+ // hide all toasts from screen, but not remove them from a channel
+ void hideToastsFromScreen();
+ // removes all toasts from a channel
void removeToastsFromChannel();
+ // show all toasts in a channel
+ void showToasts();
+ //
+ void loadStoredToastsToChannel();
+ //
void closeUnreadToastsPanel();
- void hideToastsFromScreen();
+ // Channel's behavior-functions
+ // set whether a channel will control hovering inside itself or not
+ void setControlHovering(bool control) { mControlHovering = control; }
+ // set Hovering flag for a channel
+ void setHovering(bool hovering) { mIsHovering = hovering; }
+ // set whether a channel will store faded toasts or not
void setStoreToasts(bool store) { mStoreToasts = store; }
- void loadStoredToastsToChannel();
-
- void showToasts();
+ // tell all channels that the StartUp toast was shown and allow them showing of toasts
+ static void setStartUpToastShown() { mWasStartUpToastShown = true; }
+ // Channel's other interface functions functions
S32 getNumberOfHiddenToasts() { return mHiddenToastsNum;}
+ // TODO: split StartUp and Overflow toasts
void setNumberOfHiddenToasts(S32 num) { mHiddenToastsNum = num;}
-
- static void setStartUpToastShown() { mWasStartUpToastShown = true; }
-
e_notification_toast_alignment getToastAlignment() {return mToastAlignment;}
- void setOverflowFormatString ( std::string str) { mOverflowFormatString = str; }
+ // Channel's callbacks
+ // callback for storing of faded toasts
+ typedef boost::function<void (LLPanel* info_panel, const LLUUID id)> store_tost_callback_t;
+ typedef boost::signals2::signal<void (LLPanel* info_panel, const LLUUID id)> store_tost_signal_t;
+ store_tost_signal_t mOnStoreToast;
+ boost::signals2::connection setOnStoreToastCallback(store_tost_callback_t cb) { return mOnStoreToast.connect(cb); }
private:
struct ToastElem
@@ -117,31 +136,38 @@ private:
}
};
+ // Channel's handlers
void onToastHover(LLToast* toast, bool mouse_enter);
-
void onToastFade(LLToast* toast);
+ void onOverflowToastHide();
+
+ //
void storeToast(ToastElem& toast_elem);
+ // show-functions depending on allignment of toasts
void showToastsBottom();
void showToastsCentre();
void showToastsTop();
+ // create the OverflowToast
void createOverflowToast(S32 bottom, F32 timer);
- void onOverflowToastHide();
+ // Channel's flags
static bool mWasStartUpToastShown;
bool mControlHovering;
bool mIsHovering;
bool mStoreToasts;
bool mOverflowToastHidden;
- S32 mHiddenToastsNum;
- LLToast* mUnreadToastsPanel;
- std::vector<ToastElem> mToastList;
- std::vector<ToastElem> mStoredToastList;
+ //
e_notification_toast_alignment mToastAlignment;
- std::map<LLToast*, bool> mToastEventStack;
+ S32 mHiddenToastsNum;
+ LLToast* mUnreadToastsPanel;
std::string mOverflowFormatString;
+
+ std::vector<ToastElem> mToastList;
+ std::vector<ToastElem> mStoredToastList;
+ std::map<LLToast*, bool> mToastEventStack;
};
}