/* * Copyright 2013, Stephan Aßmus . * Copyright 2013, Rene Gollent . * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef PACKAGE_LIST_VIEW_H #define PACKAGE_LIST_VIEW_H #include #include #include #include #include "PackageInfo.h" class PackageRow; class PackageListener; class WorkStatusView; class PackageListView : public BColumnListView { public: PackageListView(BLocker* modelLock); virtual ~PackageListView(); virtual void AttachedToWindow(); virtual void AllAttached(); virtual void MessageReceived(BMessage* message); virtual void SelectionChanged(); virtual void Clear(); void AddPackage(const PackageInfoRef& package); void RemovePackage(const PackageInfoRef& package); void SelectPackage(const PackageInfoRef& package); void AttachWorkStatusView(WorkStatusView* view); private: PackageRow* _FindRow(const PackageInfoRef& package); PackageRow* _FindRow(const BString& packageName); private: class ItemCountView; struct RowByNameHashDefinition; typedef BOpenHashTable RowByNameTable; BLocker* fModelLock; ItemCountView* fItemCountView; PackageListener* fPackageListener; RowByNameTable* fRowByNameTable; WorkStatusView* fWorkStatusView; }; #endif // PACKAGE_LIST_VIEW_H