1 /* 2 * Copyright 2002-2009 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 9 #ifndef IMAGE_FILE_PANEL_H 10 #define IMAGE_FILE_PANEL_H 11 12 13 #include <FilePanel.h> 14 #include <Node.h> 15 16 17 class BStringView; 18 class BView; 19 20 21 class ImageFilter: public BRefFilter { 22 public: 23 ImageFilter(bool filtering); 24 virtual ~ImageFilter() {}; 25 26 bool Filter(const entry_ref* ref, BNode* node, 27 struct stat_beos* st, const char* filetype); 28 29 protected: 30 bool fImageFiltering; 31 // true for images 32 // false for directory 33 }; 34 35 36 class ImageFilePanel: public BFilePanel { 37 public: 38 ImageFilePanel(file_panel_mode mode = B_OPEN_PANEL, 39 BMessenger* target = NULL, 40 const entry_ref* startDirectory = NULL, 41 uint32 nodeFlavors = 0, 42 bool allowMultipleSelection = true, 43 BMessage* message = NULL, 44 BRefFilter* filter = NULL, 45 bool modal = false, 46 bool hideWhenDone = true); 47 ~ImageFilePanel(); 48 49 virtual void SelectionChanged(); 50 void Show(); 51 52 protected: 53 BView* fImageView; 54 BStringView* fResolutionView; 55 BStringView* fImageTypeView; 56 }; 57 58 #endif // IMAGE_FILE_PANEL_H 59