diff options
Diffstat (limited to 'indra/newview/llsyswellwindow.h')
-rw-r--r-- | indra/newview/llsyswellwindow.h | 53 |
1 files changed, 37 insertions, 16 deletions
diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index d76147b489..37a2690a82 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -44,7 +44,7 @@ #include "boost/shared_ptr.hpp" - +class LLFlatListView; class LLSysWellWindow : public LLDockableFloater, LLIMSessionObserver { @@ -54,36 +54,52 @@ public: BOOL postBuild(); // other interface functions + // check is window empty bool isWindowEmpty(); - // change attributes - void setChannel(LLNotificationsUI::LLScreenChannel* channel) {mChannel = channel;} - // Operating with items void addItem(LLSysWellItem::Params p); void clear( void ); void removeItemByID(const LLUUID& id); - S32 findItemByID(const LLUUID& id); // Operating with outfit virtual void setVisible(BOOL visible); void adjustWindowPosition(); void toggleWindow(); - /*virtua*/BOOL canClose() { return FALSE; } + /*virtual*/ BOOL canClose() { return FALSE; } + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // Handlers void onItemClick(LLSysWellItem* item); void onItemClose(LLSysWellItem* item); + void onStoreToast(LLPanel* info_panel, LLUUID id); + void onChicletClick(); // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 320; - static const S32 MIN_PANELLIST_WIDTH = 318; + static const S32 MIN_WINDOW_WIDTH = 318; private: + + typedef enum{ + IT_NOTIFICATION, + IT_INSTANT_MESSAGE + }EItemType; + + // gets a rect valid for SysWellWindow's position on a screen (EXT-1111) + void getEnabledRect(LLRect& rect); + // connect counter and list updaters to the corresponding signals + void connectListUpdaterToSignal(std::string notification_type); + // init Window's channel + void initChannel(); + void handleItemAdded(EItemType added_item_type); + void handleItemRemoved(EItemType removed_item_type); + bool anotherTypeExists(EItemType item_type) ; + + + class RowPanel; void reshapeWindow(); - RowPanel * findIMRow(const LLUUID& sessionId); LLChiclet * findIMChiclet(const LLUUID& sessionId); void addIMRow(const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); void delIMRow(const LLUUID& sessionId); @@ -93,23 +109,28 @@ private: // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; - LLPanel* mTwinListPanel; - LLScrollContainer* mScrollContainer; - LLScrollingPanelList* mIMRowList; - LLScrollingPanelList* mNotificationList; + LLFlatListView* mMessageList; + + /** + * Special panel which is used as separator of Notifications & IM Rows. + * It is always presents in the list and shown when it is necessary. + * It should be taken into account when reshaping and checking list size + */ + LLPanel* mSeparator; + + typedef std::map<EItemType, S32> typed_items_count_t; + typed_items_count_t mTypedItemsCount; private: /** * Scrolling row panel. */ - class RowPanel: public LLScrollingPanel + class RowPanel: public LLPanel { public: RowPanel(const LLSysWellWindow* parent, const LLUUID& sessionId, S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId); virtual ~RowPanel(); - /*virtual*/ - void updatePanel(BOOL allow_modify); void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); BOOL handleMouseDown(S32 x, S32 y, MASK mask); |