xref: /haiku/src/preferences/filetypes/ApplicationTypeWindow.h (revision 2f470aec1c92ce6917b8a903e343795dc77af41f)
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 APPLICATION_TYPE_WINDOW_H
6 #define APPLICATION_TYPE_WINDOW_H
7 
8 
9 #include "IconView.h"
10 
11 #include <Mime.h>
12 #include <String.h>
13 #include <Window.h>
14 
15 class BButton;
16 class BCheckBox;
17 class BListView;
18 class BPopUpMenu;
19 class BRadioButton;
20 class BTextControl;
21 class BTextView;
22 
23 class MimeTypeListView;
24 
25 
26 class ApplicationTypeWindow : public BWindow {
27 	public:
28 		ApplicationTypeWindow(BPoint position, const BEntry& entry);
29 		virtual ~ApplicationTypeWindow();
30 
31 		virtual void FrameResized(float width, float height);
32 		virtual void MessageReceived(BMessage* message);
33 		virtual bool QuitRequested();
34 
35 	private:
36 		BString _Title(const BEntry& entry);
37 		void _SetTo(const BEntry& entry);
38 		void _UpdateAppFlagsEnabled();
39 		void _MakeNumberTextControl(BTextControl* control);
40 		void _Save();
41 
42 	private:
43 		BEntry			fEntry;
44 
45 		BTextControl*	fSignatureControl;
46 		IconView*		fIconView;
47 		Icon			fIcon;
48 
49 		BCheckBox*		fFlagsCheckBox;
50 		BRadioButton*	fSingleLaunchButton;
51 		BRadioButton*	fMultipleLaunchButton;
52 		BRadioButton*	fExclusiveLaunchButton;
53 		BCheckBox*		fArgsOnlyCheckBox;
54 		BCheckBox*		fBackgroundAppCheckBox;
55 
56 		BListView*		fTypeListView;
57 		BButton*		fAddTypeButton;
58 		BButton*		fRemoveTypeButton;
59 		IconView*		fTypeIconView;
60 
61 		BTextControl*	fMajorVersionControl;
62 		BTextControl*	fMiddleVersionControl;
63 		BTextControl*	fMinorVersionControl;
64 		BPopUpMenu*		fVarietyMenu;
65 		BTextControl*	fInternalVersionControl;
66 		BTextControl*	fShortDescriptionControl;
67 		BTextView*		fLongDescriptionView;
68 };
69 
70 #endif // APPLICATION_TYPE_WINDOW_H
71