xref: /haiku/src/apps/packageinstaller/PackageView.h (revision 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e)
1 /*
2  * Copyright (c) 2007, Haiku, Inc.
3  * Distributed under the terms of the MIT license.
4  *
5  * Author:
6  *		Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
7  */
8 #ifndef PACKAGE_VIEW_H
9 #define PACKAGE_VIEW_H
10 
11 
12 #include "PackageInfo.h"
13 #include "PackageStatus.h"
14 
15 #include <View.h>
16 #include <Box.h>
17 #include <Button.h>
18 #include <MenuField.h>
19 #include <FilePanel.h>
20 
21 class BPopUpMenu;
22 class BTextView;
23 
24 
25 enum {
26 	P_MSG_GROUP_CHANGED = 'gpch',
27 	P_MSG_PATH_CHANGED,
28 	P_MSG_OPEN_PANEL,
29 	P_MSG_INSTALL
30 };
31 
32 class PackageView : public BView {
33 	public:
34 		PackageView(BRect frame, const entry_ref *ref);
35 		~PackageView();
36 
37 		void AttachedToWindow();
38 		void MessageReceived(BMessage *msg);
39 
40 		status_t Install();
41 
42 	private:
43 		void _InitView();
44 		void _InitProfiles();
45 
46 		status_t _GroupChanged(int32 index);
47 
48 		BPopUpMenu *fInstallTypes;
49 		BTextView *fInstallDesc;
50 		BPopUpMenu *fDestination;
51 		BMenuField *fDestField;
52 		BButton *fInstall;
53 
54 		BFilePanel *fOpenPanel;
55 		BPath fCurrentPath;
56 		uint32 fCurrentType;
57 
58 		PackageInfo fInfo;
59 		PackageStatus *fStatusWindow;
60 };
61 
62 #endif	// PACKAGE_VIEW_H
63 
64