xref: /haiku/src/apps/bootmanager/FileSelectionPage.h (revision 22440f4105cafc95cc1d49f9bc65bb395c527d86)
1 /*
2  * Copyright 2008-2010, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Pfeiffer <laplace@users.sourceforge.net>
7  */
8 #ifndef FILE_SELECTION_PAGE_H
9 #define FILE_SELECTION_PAGE_H
10 
11 
12 #include "WizardPageView.h"
13 
14 #include <FilePanel.h>
15 
16 
17 class BButton;
18 class BTextControl;
19 class BTextView;
20 
21 
22 class FileSelectionPage : public WizardPageView {
23 public:
24 								FileSelectionPage(BMessage* settings,
25 									BRect frame, const char* name,
26 									const char* description,
27 									file_panel_mode mode);
28 	virtual						~FileSelectionPage();
29 
30 	virtual	void				FrameResized(float width, float height);
31 	virtual	void				AttachedToWindow();
32 	virtual	void				MessageReceived(BMessage* message);
33 
34 	virtual	void				PageCompleted();
35 
36 private:
37 			void				_BuildUI(const char* description);
38 			void				_Layout();
39 			void				_OpenFilePanel();
40 			void				_SetFileFromFilePanelMessage(BMessage* message);
41 			void				_FilePanelCanceled();
42 
43 private:
44 			file_panel_mode		fMode;
45 			BFilePanel*			fFilePanel;
46 
47 			BTextView*			fDescription;
48 			BTextControl*		fFile;
49 			BButton*			fSelect;
50 };
51 
52 
53 #endif	// FILE_SELECTION_PAGE_H
54