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 <GroupView.h>
14#include <String.h>
15
16class BGroupView;
17
18class NotificationWindow;
19class NotificationView;
20
21typedef std::vector<NotificationView*> infoview_t;
22
23class AppGroupView : public BGroupView {
24public:
25								AppGroupView(NotificationWindow* win, const char* label);
26
27	virtual	void				MouseDown(BPoint point);
28	virtual	void				MessageReceived(BMessage* msg);
29			void				Draw(BRect updateRect);
30
31			bool				HasChildren();
32
33			void				AddInfo(NotificationView* view);
34
35			const BString&		Group() const;
36
37private:
38			void				_DrawCloseButton(const BRect& updateRect);
39
40			BString				fLabel;
41			NotificationWindow*	fParent;
42			infoview_t			fInfo;
43			bool				fCollapsed;
44			BRect				fCloseRect;
45			BRect				fCollapseRect;
46			bool				fCloseClicked;
47};
48
49#endif	// _APP_GROUP_VIEW_H
50