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 16static const uint32 MSG_DIRECTORY = 'mDIR'; 17 18 19class DirectoryRefFilter : public BRefFilter { 20public: 21 DirectoryRefFilter(); 22 bool Filter(const entry_ref* ref, BNode* node, 23 struct stat_beos* stat, 24 const char* mimeType); 25}; 26 27 28class DirectoryFilePanel : public BFilePanel { 29public: 30 DirectoryFilePanel( 31 file_panel_mode mode = B_OPEN_PANEL, 32 BMessenger* target = NULL, 33 const entry_ref* startDirectory = NULL, 34 uint32 nodeFlavors = 0, 35 bool allowMultipleSelection = true, 36 BMessage* message = NULL, 37 BRefFilter* filter = NULL, 38 bool modal = false, 39 bool hideWhenDone = true); 40 virtual ~DirectoryFilePanel() {}; 41 42 virtual void SelectionChanged(); 43 virtual void Show(); 44 // overrides non-virtual BFilePanel::Show() 45 46protected: 47 BButton* fCurrentButton; 48}; 49 50 51#endif // _DIRECTORY_FILE_PANEL_H 52