1/*
2 * Copyright (c) 2007-2010, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
4 *
5 * Author:
6 *		��ukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
7 */
8#ifndef UNINSTALLVIEW_H
9#define UNINSTALLVIEW_H
10
11#include <GroupView.h>
12#include <Path.h>
13
14#include "InstalledPackageInfo.h"
15
16
17class BButton;
18class BListView;
19class BTextView;
20class BScrollView;
21class BFilePanel;
22
23
24class UninstallView : public BGroupView {
25public:
26								UninstallView();
27	virtual						~UninstallView();
28
29	virtual	void				AttachedToWindow();
30	virtual	void				MessageReceived(BMessage* message);
31	virtual void				RefsReceived(BMessage* message);
32
33private:
34			void				_InitView();
35			status_t			_ReloadAppList();
36			void				_AddFile(const char* filename,
37									const node_ref& ref);
38			void				_ClearAppList();
39			void				_CachePathToPackages();
40
41private:
42			class InfoItem;
43
44			BPath				fToPackages;
45			BListView*			fAppList;
46			BTextView*			fDescription;
47			BButton*			fInstallButton;
48			BFilePanel*			fOpenPanel;
49			BButton*			fRemoveButton;
50			BScrollView*		fDescScroll;
51			InstalledPackageInfo fCurrentSelection;
52			bool				fWatcherRunning;
53
54			const char*			fNoPackageSelectedString;
55};
56
57
58#endif // UNINSTALLVIEW_H
59