1139790Simp/*
226159Sse * Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
366529Smsmith * Distributed under the terms of the MIT License.
466529Smsmith *
5138468Sscottl * Authors:
626159Sse *		Jerome Duval (jerome.duval@free.fr)
726159Sse */
826159Sse#ifndef IMAGE_FILE_PANEL_H
926159Sse#define IMAGE_FILE_PANEL_H
1026159Sse
1126159Sse
1226159Sse#include <FilePanel.h>
1326159Sse#include <Node.h>
1426159Sse
1526159Sse
1626159Sseclass BStringView;
1726159Sseclass BView;
1826159Sse
1926159Sse
2026159Sseclass CustomRefFilter : public BRefFilter {
2126159Ssepublic:
2226159Sse							CustomRefFilter(bool imageFiltering);
2326159Sse	virtual					~CustomRefFilter() {};
2426159Sse
2526159Sse			bool			Filter(const entry_ref* ref, BNode* node,
2626159Sse								struct stat_beos* st, const char* filetype);
2726159Sse
2826159Sseprotected:
296104Sse			bool			fImageFiltering;
30115706Sobrien								// true for images
31115706Sobrien								// false for directory
32115706Sobrien};
33152219Simp
34152219Simp
35125981Sjhbclass ImageFilePanel : public BFilePanel {
366734Sbdepublic:
3747307Speter							ImageFilePanel(file_panel_mode mode = B_OPEN_PANEL,
38111068Speter								BMessenger* target = NULL,
39182947Sjhb								const entry_ref* startDirectory = NULL,
40111068Speter								uint32 nodeFlavors = 0,
41138429Sscottl								bool allowMultipleSelection = true,
42138429Sscottl								BMessage* message = NULL,
43192342Sjhb								BRefFilter* filter = NULL,
44100435Simp								bool modal = false,
45100435Simp								bool hideWhenDone = true);
4666529Smsmith							~ImageFilePanel();
4759294Smsmith
4859294Smsmith	virtual	void			SelectionChanged();
49138429Sscottl			void			Show();
50138429Sscottl
51138429Sscottlprotected:
52138429Sscottl			BView*			fImageView;
53138429Sscottl			BStringView*	fResolutionView;
54138429Sscottl			BStringView*	fImageTypeView;
55138429Sscottl};
56152219Simp
57152219Simp#endif	// IMAGE_FILE_PANEL_H
58152219Simp
59152219Simp