docs/ikteam: Delete most files.
[haiku.git] / src / preferences / filetypes / FileTypesWindow.h
blob67e15c5df5f36c1e6270f50b2f8e5f070108e270
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_TYPES_WINDOW_H
6 #define FILE_TYPES_WINDOW_H
9 #include <Alert.h>
10 #include <Mime.h>
11 #include <Window.h>
14 class BBox;
15 class BButton;
16 class BListView;
17 class BMenuField;
18 class BMimeType;
19 class BOutlineListView;
20 class BSplitView;
21 class BTextControl;
23 class AttributeListView;
24 class ExtensionListView;
25 class MimeTypeListView;
26 class StringView;
27 class TypeIconView;
30 static const uint32 kMsgSelectNewType = 'slnt';
31 static const uint32 kMsgNewTypeWindowClosed = 'ntwc';
34 class FileTypesWindow : public BWindow {
35 public:
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);
46 private:
47 BRect _Frame(const BMessage& settings) const;
48 void _ShowSnifferRule(bool show);
49 void _UpdateExtensions(BMimeType* type);
50 void _AdoptPreferredApplication(BMessage* message,
51 bool sameAs);
52 void _UpdatePreferredApps(BMimeType* type);
53 void _UpdateIcon(BMimeType* type);
54 void _SetType(BMimeType* type,
55 int32 forceUpdate = 0);
56 void _MoveUpAttributeIndex(int32 index);
58 private:
59 BMimeType fCurrentType;
61 BSplitView* fMainSplitView;
63 MimeTypeListView* fTypeListView;
64 BButton* fRemoveTypeButton;
66 BBox* fIconBox;
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;
81 BBox* fPreferredBox;
82 BMenuField* fPreferredField;
83 BButton* fSelectButton;
84 BButton* fSameAsButton;
86 BBox* fAttributeBox;
87 AttributeListView* fAttributeListView;
88 BButton* fAddAttributeButton;
89 BButton* fRemoveAttributeButton;
90 BButton* fMoveUpAttributeButton;
91 BButton* fMoveDownAttributeButton;
93 BWindow* fNewTypeWindow;
97 #endif // FILE_TYPES_WINDOW_H