libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / preferences / filetypes / ApplicationTypeWindow.h
blob5beb43650b1fbe86853677b8de5330f3f17a8624
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
9 #include "IconView.h"
11 #include <AppFileInfo.h>
12 #include <Mime.h>
13 #include <String.h>
14 #include <Window.h>
16 class BButton;
17 class BCheckBox;
18 class BListView;
19 class BPopUpMenu;
20 class BRadioButton;
21 class BTextControl;
22 class BTextView;
24 class MimeTypeListView;
27 class ApplicationTypeWindow : public BWindow {
28 public:
29 ApplicationTypeWindow(BPoint position, const BEntry& entry);
30 virtual ~ApplicationTypeWindow();
32 virtual void FrameResized(float width, float height);
33 virtual void MessageReceived(BMessage* message);
34 virtual bool QuitRequested();
36 private:
37 BString _Title(const BEntry& entry);
38 void _SetTo(const BEntry& entry);
39 void _UpdateAppFlagsEnabled();
40 void _MakeNumberTextControl(BTextControl* control);
41 void _Save();
43 bool _Flags(uint32& flags) const;
44 BMessage _SupportedTypes() const;
45 version_info _VersionInfo() const;
47 void _CheckSaveMenuItem(uint32 flags);
48 uint32 _NeedsSaving(uint32 flags) const;
50 private:
51 struct AppInfo {
52 BString signature;
53 bool gotFlags;
54 uint32 flags;
55 version_info versionInfo;
57 BMessage supportedTypes;
59 bool iconChanged;
60 bool typeIconsChanged;
62 enum {
63 CHECK_SIGNATUR = 1 << 0,
64 CHECK_FLAGS = 1 << 1,
65 CHECK_VERSION = 1 << 2,
66 CHECK_ICON = 1 << 3,
68 CHECK_TYPES = 1 << 4,
69 CHECK_TYPE_ICONS = 1 << 5,
71 CHECK_ALL = 0xffffffff
74 private:
75 BEntry fEntry;
76 AppInfo fOriginalInfo;
78 BTextControl* fSignatureControl;
79 IconView* fIconView;
80 Icon fIcon;
82 BCheckBox* fFlagsCheckBox;
83 BRadioButton* fSingleLaunchButton;
84 BRadioButton* fMultipleLaunchButton;
85 BRadioButton* fExclusiveLaunchButton;
86 BCheckBox* fArgsOnlyCheckBox;
87 BCheckBox* fBackgroundAppCheckBox;
89 BListView* fTypeListView;
90 BButton* fAddTypeButton;
91 BButton* fRemoveTypeButton;
92 IconView* fTypeIconView;
94 BTextControl* fMajorVersionControl;
95 BTextControl* fMiddleVersionControl;
96 BTextControl* fMinorVersionControl;
97 BPopUpMenu* fVarietyMenu;
98 BTextControl* fInternalVersionControl;
99 BTextControl* fShortDescriptionControl;
100 BTextView* fLongDescriptionView;
102 BMenuItem* fSaveMenuItem;
103 uint32 fChangedProperties;
106 #endif // APPLICATION_TYPE_WINDOW_H