2 * Copyright 2007-2014, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * Ćukasz 'Sil2100' Zemczak <sil2100@vexillium.org>
12 #include "PackageInfo.h"
13 #include "PackageInstall.h"
14 #include "PackageStatus.h"
28 P_MSG_INSTALL_TYPE_CHANGED
= 'gpch',
34 class PackageView
: public BView
{
36 PackageView(const entry_ref
* ref
);
37 virtual ~PackageView();
39 virtual void AttachedToWindow();
40 virtual void MessageReceived(BMessage
* message
);
42 int32
ItemExists(PackageItem
& item
,
43 BPath
& path
, int32
& policy
);
46 { return &fCurrentPath
; }
47 PackageInfo
* GetPackageInfo()
49 uint32
CurrentType() const
50 { return fCurrentType
; }
51 PackageStatus
* StatusWindow()
52 { return fStatusWindow
; }
58 status_t
_InstallTypeChanged(int32 index
);
60 BString
_NamePlusSizeString(BString name
,
61 size_t size
, const char* format
) const;
62 BMenuItem
* _AddInstallTypeMenuItem(BString baseName
,
63 size_t size
, int32 index
) const;
64 BMenuItem
* _AddDestinationMenuItem(BString baseName
,
65 size_t size
, const char* path
) const;
66 BMenuItem
* _AddMenuItem(const char* name
,
67 BMessage
* message
, BMenu
* menu
) const;
69 bool _ValidateFilePanelMessage(BMessage
* message
);
72 BPopUpMenu
* fInstallTypes
;
73 BTextView
* fInstallTypeDescriptionView
;
74 BPopUpMenu
* fDestination
;
75 BMenuField
* fDestField
;
76 BButton
* fBeginButton
;
78 BFilePanel
* fOpenPanel
;
79 bool fExpectingOpenPanelResult
;
85 PackageStatus
* fStatusWindow
;
86 PackageInstall fInstallProcess
;
89 #endif // PACKAGE_VIEW_H