xref: /haiku/src/servers/notification/AppGroupView.h (revision d374a27286b8a52974a97dba0d5966ea026a665d)
1 /*
2  * Copyright 2005-2008, Mikael Eiman.
3  * Copyright 2005-2008, Michael Davidson.
4  * Distributed under the terms of the MIT License.
5  *
6  * Authors:
7  *              Mikael Eiman <mikael@eiman.tv>
8  *              Michael Davidson <slaad@bong.com.au>
9  */
10 
11 #ifndef APPGROUPVIEW_H
12 #define APPGROUPVIEW_H
13 
14 #include <vector>
15 
16 #include <String.h>
17 #include <View.h>
18 
19 class NotificationWindow;
20 class NotificationView;
21 
22 typedef std::vector<NotificationView *> infoview_t;
23 
24 class AppGroupView : public BView {
25 	public:
26 							AppGroupView(NotificationWindow *win, const char *label);
27 							~AppGroupView(void);
28 
29 		// Hooks
30 		void				AttachedToWindow(void);
31 		void				Draw(BRect bounds);
32 		void				MouseDown(BPoint point);
33 		void				GetPreferredSize(float *width, float *height);
34 		void				MessageReceived(BMessage *msg);
35 
36 		// Public
37 		void				AddInfo(NotificationView *view);
38 		void				ResizeViews(void);
39 		bool				HasChildren(void);
40 
41 	private:
42 		BString				fLabel;
43 		NotificationWindow			*fParent;
44 		infoview_t			fInfo;
45 		bool				fCollapsed;
46 		BRect				fCloseRect;
47 		BRect				fCollapseRect;
48 };
49 
50 #endif
51