1de9dcd41SStephan Aßmus/*
26aa05872SBrian Hill * Copyright 2010-2017, Haiku, Inc. All Rights Reserved.
34ec6c3a0SAdrien Destugues * Copyright 2008-2009, Pier Luigi Fiorini. All Rights Reserved.
44ec6c3a0SAdrien Destugues * Copyright 2004-2008, Michael Davidson. All Rights Reserved.
54ec6c3a0SAdrien Destugues * Copyright 2004-2007, Mikael Eiman. All Rights Reserved.
6de9dcd41SStephan Aßmus * Distributed under the terms of the MIT License.
7de9dcd41SStephan Aßmus */
84ec6c3a0SAdrien Destugues#ifndef _APP_GROUP_VIEW_H
94ec6c3a0SAdrien Destugues#define _APP_GROUP_VIEW_H
10de9dcd41SStephan Aßmus
11de9dcd41SStephan Aßmus#include <vector>
12de9dcd41SStephan Aßmus
1344c6e69bSAdrien Destugues#include <GroupView.h>
146aa05872SBrian Hill#include <Messenger.h>
15de9dcd41SStephan Aßmus#include <String.h>
164ec6c3a0SAdrien Destugues
174ec6c3a0SAdrien Destuguesclass BGroupView;
18de9dcd41SStephan Aßmus
19de9dcd41SStephan Aßmusclass NotificationWindow;
20de9dcd41SStephan Aßmusclass NotificationView;
21de9dcd41SStephan Aßmus
224ec6c3a0SAdrien Destuguestypedef std::vector<NotificationView*> infoview_t;
234ec6c3a0SAdrien Destugues
2444c6e69bSAdrien Destuguesclass AppGroupView : public BGroupView {
254ec6c3a0SAdrien Destuguespublic:
266aa05872SBrian Hill								AppGroupView(const BMessenger& messenger, const char* label);
274ec6c3a0SAdrien Destugues
284ec6c3a0SAdrien Destugues	virtual	void				MouseDown(BPoint point);
294ec6c3a0SAdrien Destugues	virtual	void				MessageReceived(BMessage* msg);
3044c6e69bSAdrien Destugues			void				Draw(BRect updateRect);
314ec6c3a0SAdrien Destugues
324ec6c3a0SAdrien Destugues			bool				HasChildren();
33f6afd3e9SRyan Leavengood			int32				ChildrenCount();
344ec6c3a0SAdrien Destugues
354ec6c3a0SAdrien Destugues			void				AddInfo(NotificationView* view);
366aa05872SBrian Hill			void				SetPreviewModeOn(bool enabled);
374ec6c3a0SAdrien Destugues
38cbdd108aSAlex Wilson			const BString&		Group() const;
396aa05872SBrian Hill			void				SetGroup(const char* group);
40cbdd108aSAlex Wilson
414ec6c3a0SAdrien Destuguesprivate:
4282a67460SAdrien Destugues - PulkoMandy			void				_DrawCloseButton(const BRect& updateRect);
4382a67460SAdrien Destugues - PulkoMandy
444ec6c3a0SAdrien Destugues			BString				fLabel;
456aa05872SBrian Hill			BMessenger			fMessenger;
464ec6c3a0SAdrien Destugues			infoview_t			fInfo;
474ec6c3a0SAdrien Destugues			bool				fCollapsed;
484ec6c3a0SAdrien Destugues			BRect				fCloseRect;
494ec6c3a0SAdrien Destugues			BRect				fCollapseRect;
506aa05872SBrian Hill			float				fHeaderSize;
5182a67460SAdrien Destugues - PulkoMandy			bool				fCloseClicked;
526aa05872SBrian Hill			bool				fPreviewModeOn;
53de9dcd41SStephan Aßmus};
54de9dcd41SStephan Aßmus
554ec6c3a0SAdrien Destugues#endif	// _APP_GROUP_VIEW_H
56