1 /* 2 * Copyright 2010, Haiku, Inc. All Rights Reserved. 3 * Copyright 2008-2009, Pier Luigi Fiorini. All Rights Reserved. 4 * Copyright 2004-2008, Michael Davidson. All Rights Reserved. 5 * Copyright 2004-2007, Mikael Eiman. All Rights Reserved. 6 * Distributed under the terms of the MIT License. 7 */ 8 #ifndef _APP_GROUP_VIEW_H 9 #define _APP_GROUP_VIEW_H 10 11 #include <vector> 12 13 #include <Box.h> 14 #include <String.h> 15 16 class BGroupView; 17 18 class NotificationWindow; 19 class NotificationView; 20 21 typedef std::vector<NotificationView*> infoview_t; 22 23 class AppGroupView : public BBox { 24 public: 25 AppGroupView(NotificationWindow* win, const char* label); 26 ~AppGroupView(); 27 28 virtual void MouseDown(BPoint point); 29 virtual void MessageReceived(BMessage* msg); 30 31 bool HasChildren(); 32 33 void AddInfo(NotificationView* view); 34 35 private: 36 void _ResizeViews(); 37 38 BString fLabel; 39 NotificationWindow* fParent; 40 BGroupView* fView; 41 infoview_t fInfo; 42 bool fCollapsed; 43 BRect fCloseRect; 44 BRect fCollapseRect; 45 }; 46 47 #endif // _APP_GROUP_VIEW_H 48