1 /* 2 * Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>. 3 * Copyright 2020, Andrew Lindesay <apl@lindesay.co.nz> 4 * All rights reserved. Distributed under the terms of the MIT License. 5 */ 6 #ifndef PACKAGE_INFO_VIEW_H 7 #define PACKAGE_INFO_VIEW_H 8 9 #include <GroupView.h> 10 11 #include "Model.h" 12 #include "PackageInfo.h" 13 #include "PackageInfoListener.h" 14 15 16 class BCardLayout; 17 class BLocker; 18 class OnePackageMessagePackageListener; 19 class PackageActionHandler; 20 class PackageActionView; 21 class PagesView; 22 class TitleView; 23 24 enum { 25 MSG_RATE_PACKAGE = 'rate', 26 MSG_SHOW_SCREENSHOT = 'shws', 27 }; 28 29 30 class PackageInfoView : public BView { 31 public: 32 PackageInfoView(Model* model, 33 PackageActionHandler* handler); 34 virtual ~PackageInfoView(); 35 36 virtual void AttachedToWindow(); 37 virtual void MessageReceived(BMessage* message); 38 39 void SetPackage(const PackageInfoRef& package); 40 const PackageInfoRef& Package() const 41 { return fPackage; } 42 void Clear(); 43 44 private: 45 Model* fModel; 46 47 BCardLayout* fCardLayout; 48 TitleView* fTitleView; 49 PackageActionView* fPackageActionView; 50 PagesView* fPagesView; 51 52 PackageInfoRef fPackage; 53 OnePackageMessagePackageListener* fPackageListener; 54 }; 55 56 #endif // PACKAGE_INFO_VIEW_H 57