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 7 8 9 #include <Mime.h> 10 #include <Window.h> 11 12 class BButton; 13 class BListView; 14 class BMenuField; 15 class BMimeType; 16 class BOutlineListView; 17 class BTextControl; 18 19 class AttributeListView; 20 class IconView; 21 class MimeTypeListView; 22 23 24 class FileTypesWindow : public BWindow { 25 public: 26 FileTypesWindow(BRect frame); 27 virtual ~FileTypesWindow(); 28 29 virtual void MessageReceived(BMessage* message); 30 virtual bool QuitRequested(); 31 32 private: 33 void _UpdateExtensions(BMimeType* type); 34 void _AddSignature(BMenuItem* item, const char* signature); 35 void _UpdatePreferredApps(BMimeType* type); 36 void _UpdateIcon(BMimeType* type); 37 void _SetType(BMimeType* type, int32 forceUpdate = 0); 38 39 private: 40 BMimeType fCurrentType; 41 42 MimeTypeListView* fTypeListView; 43 BButton* fRemoveTypeButton; 44 45 IconView* fIconView; 46 47 BListView* fExtensionListView; 48 BButton* fAddExtensionButton; 49 BButton* fRemoveExtensionButton; 50 51 BTextControl* fInternalNameControl; 52 BTextControl* fTypeNameControl; 53 BTextControl* fDescriptionControl; 54 55 BMenuField* fPreferredField; 56 BButton* fSelectButton; 57 BButton* fSameAsButton; 58 59 AttributeListView* fAttributeListView; 60 BButton* fAddAttributeButton; 61 BButton* fRemoveAttributeButton; 62 63 }; 64 65 #endif // FILE_TYPES_WINDOW_H 66