diff options
Diffstat (limited to 'indra/newview/llsyswellwindow.h')
-rw-r--r-- | indra/newview/llsyswellwindow.h | 101 |
1 files changed, 60 insertions, 41 deletions
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 04596c0622..21391cebea 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -47,7 +47,7 @@ class LLFlatListView; class LLChiclet; class LLIMChiclet; -class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver +class LLSysWellWindow : public LLDockableFloater { public: LLSysWellWindow(const LLSD& key); @@ -59,7 +59,6 @@ public: bool isWindowEmpty(); // Operating with items - void addItem(LLSysWellItem::Params p); void clear( void ); void removeItemByID(const LLUUID& id); @@ -70,18 +69,13 @@ public: // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); - // Handlers - void onItemClick(LLSysWellItem* item); - void onItemClose(LLSysWellItem* item); - void onStoreToast(LLPanel* info_panel, LLUUID id); - void clearScreenChannels(); void onStartUpToastClick(S32 x, S32 y, MASK mask); // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; -private: +protected: typedef enum{ IT_NOTIFICATION, @@ -90,25 +84,17 @@ private: // gets a rect that bounds possible positions for the SysWellWindow on a screen (EXT-1111) void getAllowedRect(LLRect& rect); - // connect counter and list updaters to the corresponding signals - void connectListUpdaterToSignal(std::string notification_type); + + // init Window's channel - void initChannel(); + virtual void initChannel(); void handleItemAdded(EItemType added_item_type); void handleItemRemoved(EItemType removed_item_type); bool anotherTypeExists(EItemType item_type) ; - class RowPanel; void reshapeWindow(); - LLChiclet * findIMChiclet(const LLUUID& sessionId); - void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); - void delIMRow(const LLUUID& sessionId); - // LLIMSessionObserver observe triggers - virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); - virtual void sessionRemoved(const LLUUID& session_id); - void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; @@ -124,27 +110,6 @@ private: typedef std::map<EItemType, S32> typed_items_count_t; typed_items_count_t mTypedItemsCount; -private: - /** - * Scrolling row panel. - */ - class RowPanel: public LLPanel - { - public: - RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, - const std::string& name, const LLUUID& otherParticipantId); - virtual ~RowPanel(); - void onMouseEnter(S32 x, S32 y, MASK mask); - void onMouseLeave(S32 x, S32 y, MASK mask); - BOOL handleMouseDown(S32 x, S32 y, MASK mask); - private: - void onClosePanel(); - public: - LLIMChiclet* mChiclet; - private: - LLButton* mCloseBtn; - const LLSysWellWindow* mParent; - }; }; /** @@ -160,6 +125,25 @@ public: static void initClass() { getInstance(); } + /*virtual*/ void setVisible(BOOL visible); + + // Operating with items + void addItem(LLSysWellItem::Params p); + +private: + // init Window's channel + void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // connect counter and list updaters to the corresponding signals + void connectListUpdaterToSignal(std::string notification_type); + + // Handlers + void onItemClick(LLSysWellItem* item); + void onItemClose(LLSysWellItem* item); + }; /** @@ -167,11 +151,46 @@ public: * * It contains a list list of all active IM sessions. */ -class LLIMWellWindow : public LLSysWellWindow +class LLIMWellWindow : public LLSysWellWindow, LLIMSessionObserver, LLInitClass<LLIMWellWindow> { public: LLIMWellWindow(const LLSD& key); + ~LLIMWellWindow(); + static LLIMWellWindow* getInstance(const LLSD& key = LLSD()); + static void initClass() { getInstance(); } + + // LLIMSessionObserver observe triggers + /*virtual*/ void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); + /*virtual*/ void sessionRemoved(const LLUUID& session_id); + /*virtual*/ void sessionIDUpdated(const LLUUID& old_session_id, const LLUUID& new_session_id); + +private: + LLChiclet * findIMChiclet(const LLUUID& sessionId); + void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); + void delIMRow(const LLUUID& sessionId); + + + /** + * Scrolling row panel. + */ + class RowPanel: public LLPanel + { + public: + RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, + const std::string& name, const LLUUID& otherParticipantId); + virtual ~RowPanel(); + void onMouseEnter(S32 x, S32 y, MASK mask); + void onMouseLeave(S32 x, S32 y, MASK mask); + BOOL handleMouseDown(S32 x, S32 y, MASK mask); + private: + void onClosePanel(); + public: + LLIMChiclet* mChiclet; + private: + LLButton* mCloseBtn; + const LLSysWellWindow* mParent; + }; }; #endif // LL_LLSYSWELLWINDOW_H |