xref: /haiku/src/preferences/filetypes/AttributeWindow.h (revision 89fe2e175ea025304e167719c798aa63a9e45559)
1 /*
2  * Copyright 2006-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef ATTRIBUTE_WINDOW_H
6 #define ATTRIBUTE_WINDOW_H
7 
8 
9 #include "AttributeListView.h"
10 
11 #include <Messenger.h>
12 #include <Mime.h>
13 #include <String.h>
14 #include <Window.h>
15 
16 class BButton;
17 class BCheckBox;
18 class BMenu;
19 class BMenuField;
20 class BTextControl;
21 
22 class FileTypesWindow;
23 
24 
25 class AttributeWindow : public BWindow {
26 	public:
27 		AttributeWindow(FileTypesWindow* target, BMimeType& type,
28 			AttributeItem* item);
29 		virtual ~AttributeWindow();
30 
31 		virtual void MessageReceived(BMessage* message);
32 		virtual bool QuitRequested();
33 
34 	private:
35 		type_code _CurrentType() const;
36 		BMenuItem* _DefaultDisplayAs() const;
37 		void _CheckDisplayAs();
38 		void _CheckAcceptable();
39 		AttributeItem* _NewItemFromCurrent();
40 
41 	private:
42 		BMessenger		fTarget;
43 		BMimeType		fMimeType;
44 		AttributeItem	fAttribute;
45 		BTextControl*	fPublicNameControl;
46 		BTextControl*	fAttributeControl;
47 		BMenu*			fTypeMenu;
48 		BMenuField*		fDisplayAsMenuField;
49 		BMenuField*		fAlignmentMenuField;
50 		BCheckBox*		fVisibleCheckBox;
51 		BCheckBox*		fEditableCheckBox;
52 		BTextControl*	fSpecialControl;
53 		BTextControl*	fWidthControl;
54 		BButton*		fAcceptButton;
55 };
56 
57 #endif	// ATTRIBUTE_WINDOW_H
58