fat: Greatly simplify and clean up dosfs_get_file_map().
[haiku.git] / src / preferences / backgrounds / ImageFilePanel.h
blobb38626c18a416481de5431695c846bf16152c3ac
1 /*
2 * Copyright 2002-2009 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Jerome Duval, jerome.duval@free.fr
7 */
9 #ifndef IMAGE_FILE_PANEL_H
10 #define IMAGE_FILE_PANEL_H
13 #include <FilePanel.h>
14 #include <Node.h>
17 class BStringView;
18 class BView;
21 class CustomRefFilter : public BRefFilter {
22 public:
23 CustomRefFilter(bool imageFiltering);
24 virtual ~CustomRefFilter() {};
26 bool Filter(const entry_ref* ref, BNode* node,
27 struct stat_beos* st, const char* filetype);
29 protected:
30 bool fImageFiltering;
31 // true for images
32 // false for directory
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();
49 virtual void SelectionChanged();
50 void Show();
52 protected:
53 BView* fImageView;
54 BStringView* fResolutionView;
55 BStringView* fImageTypeView;
58 #endif // IMAGE_FILE_PANEL_H