2 * Copyright 2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef FILE_TYPES_WINDOW_H
6 #define FILE_TYPES_WINDOW_H
19 class BOutlineListView
;
23 class AttributeListView
;
24 class ExtensionListView
;
25 class MimeTypeListView
;
30 static const uint32 kMsgSelectNewType
= 'slnt';
31 static const uint32 kMsgNewTypeWindowClosed
= 'ntwc';
34 class FileTypesWindow
: public BWindow
{
36 FileTypesWindow(const BMessage
& settings
);
37 virtual ~FileTypesWindow();
39 virtual void MessageReceived(BMessage
* message
);
40 virtual bool QuitRequested();
42 void SelectType(const char* type
);
44 void PlaceSubWindow(BWindow
* window
);
47 BRect
_Frame(const BMessage
& settings
) const;
48 void _ShowSnifferRule(bool show
);
49 void _UpdateExtensions(BMimeType
* type
);
50 void _AdoptPreferredApplication(BMessage
* message
,
52 void _UpdatePreferredApps(BMimeType
* type
);
53 void _UpdateIcon(BMimeType
* type
);
54 void _SetType(BMimeType
* type
,
55 int32 forceUpdate
= 0);
56 void _MoveUpAttributeIndex(int32 index
);
59 BMimeType fCurrentType
;
61 BSplitView
* fMainSplitView
;
63 MimeTypeListView
* fTypeListView
;
64 BButton
* fRemoveTypeButton
;
67 TypeIconView
* fIconView
;
69 BBox
* fRecognitionBox
;
70 StringView
* fExtensionLabel
;
71 ExtensionListView
* fExtensionListView
;
72 BButton
* fAddExtensionButton
;
73 BButton
* fRemoveExtensionButton
;
74 BTextControl
* fRuleControl
;
76 BBox
* fDescriptionBox
;
77 StringView
* fInternalNameView
;
78 BTextControl
* fTypeNameControl
;
79 BTextControl
* fDescriptionControl
;
82 BMenuField
* fPreferredField
;
83 BButton
* fSelectButton
;
84 BButton
* fSameAsButton
;
87 AttributeListView
* fAttributeListView
;
88 BButton
* fAddAttributeButton
;
89 BButton
* fRemoveAttributeButton
;
90 BButton
* fMoveUpAttributeButton
;
91 BButton
* fMoveDownAttributeButton
;
93 BWindow
* fNewTypeWindow
;
97 #endif // FILE_TYPES_WINDOW_H