1/*
2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef FILE_TYPE_WINDOW_H
6#define FILE_TYPE_WINDOW_H
7
8
9#include <Mime.h>
10#include <String.h>
11#include <Window.h>
12
13#include <ObjectList.h>
14
15class BButton;
16class BMenuField;
17class BTextControl;
18
19class IconView;
20class MimeTypeListView;
21
22
23class FileTypeWindow : public BWindow {
24	public:
25		FileTypeWindow(BPoint position, const BMessage& refs);
26		virtual ~FileTypeWindow();
27
28		virtual void MessageReceived(BMessage* message);
29		virtual bool QuitRequested();
30
31	private:
32		BString _Title(const BMessage& refs);
33		void _SetTo(const BMessage& refs);
34		void _AdoptType(BMessage* message);
35		void _AdoptType();
36		void _AdoptPreferredApp(BMessage* message, bool sameAs);
37		void _AdoptPreferredApp();
38		void _UpdatePreferredApps();
39
40	private:
41		BObjectList<entry_ref> fEntries;
42		BString			fCommonType;
43		BString			fCommonPreferredApp;
44
45		BTextControl*	fTypeControl;
46		BButton*		fSelectTypeButton;
47		BButton*		fSameTypeAsButton;
48
49		IconView*		fIconView;
50
51		BMenuField*		fPreferredField;
52		BButton*		fSelectAppButton;
53		BButton*		fSameAppAsButton;
54};
55
56#endif // FILE_TYPE_WINDOW_H
57