1 /* 2 * Copyright 2002-2005, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Jerome Duval (jerome.duval@free.fr) 7 */ 8 #ifndef IMAGE_FILE_PANEL_H 9 #define IMAGE_FILE_PANEL_H 10 11 12 #include <Node.h> 13 #include <FilePanel.h> 14 15 class BStringView; 16 class BView; 17 18 19 class CustomRefFilter : public BRefFilter { 20 public: 21 CustomRefFilter(bool imageFiltering); 22 virtual ~CustomRefFilter() {}; 23 24 bool Filter(const entry_ref *ref, BNode* node, struct stat *st, 25 const char *filetype); 26 27 protected: 28 bool fImageFiltering; // true for images only, false for directory only 29 }; 30 31 32 class ImageFilePanel : public BFilePanel { 33 public: 34 ImageFilePanel(file_panel_mode mode = B_OPEN_PANEL, 35 BMessenger* target = NULL, const entry_ref* startDirectory = NULL, 36 uint32 nodeFlavors = 0, bool allowMultipleSelection = true, 37 BMessage* message = NULL, BRefFilter* filter = NULL, 38 bool modal = false, bool hideWhenDone = true); 39 40 virtual void SelectionChanged(); 41 42 void Show(); 43 44 protected: 45 BView* fImageView; 46 BStringView* fResolutionView; 47 BStringView* fImageTypeView; 48 }; 49 50 #endif // IMAGE_FILE_PANEL_H 51