xref: /haiku/src/apps/expander/DirectoryFilePanel.h (revision 93a78ecaa45114d68952d08c4778f073515102f2)
1 /*
2  * Copyright 2004-2007, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Jérôme Duval
7  */
8 #ifndef _DIRECTORY_FILE_PANEL_H
9 #define _DIRECTORY_FILE_PANEL_H
10 
11 
12 #include <FilePanel.h>
13 #include <Button.h>
14 
15 
16 const uint32 MSG_DIRECTORY = 'mDIR';
17 
18 
19 class DirectoryRefFilter : public BRefFilter {
20 	public:
21 		DirectoryRefFilter();
22 		bool Filter(const entry_ref *ref, BNode* node, struct stat *st,
23 			const char *filetype);
24 };
25 
26 class DirectoryFilePanel : public BFilePanel {
27 	public:
28 		DirectoryFilePanel(file_panel_mode mode = B_OPEN_PANEL,
29 			BMessenger *target = NULL, const entry_ref *startDirectory = NULL,
30 			uint32 nodeFlavors = 0, bool allowMultipleSelection = true,
31 			BMessage *message = NULL, BRefFilter *filter = NULL,
32 			bool modal = false, bool hideWhenDone = true);
33 		virtual ~DirectoryFilePanel() {};
34 
35 		virtual void SelectionChanged();
36 		virtual void Show();
37 			// overrides non-virtual BFilePanel::Show()
38 
39 	protected:
40 		BButton *fCurrentButton;
41 };
42 
43 #endif	// _DIRECTORY_FILE_PANEL_H
44