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