2 * Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
3 * Copyright 2013, Rene Gollent <rene@gollent.com>.
4 * All rights reserved. Distributed under the terms of the MIT License.
6 #ifndef PACKAGE_LIST_VIEW_H
7 #define PACKAGE_LIST_VIEW_H
10 #include <ColumnListView.h>
11 #include <ColumnTypes.h>
13 #include <util/OpenHashTable.h>
15 #include "PackageInfo.h"
19 class PackageListener
;
23 class PackageListView
: public BColumnListView
{
25 PackageListView(BLocker
* modelLock
);
26 virtual ~PackageListView();
28 virtual void AttachedToWindow();
29 virtual void AllAttached();
31 virtual void MessageReceived(BMessage
* message
);
33 virtual void SelectionChanged();
36 void AddPackage(const PackageInfoRef
& package
);
37 void RemovePackage(const PackageInfoRef
& package
);
39 void SelectPackage(const PackageInfoRef
& package
);
41 void AttachWorkStatusView(WorkStatusView
* view
);
44 PackageRow
* _FindRow(const PackageInfoRef
& package
);
45 PackageRow
* _FindRow(const BString
& packageName
);
49 struct RowByNameHashDefinition
;
50 typedef BOpenHashTable
<RowByNameHashDefinition
> RowByNameTable
;
53 ItemCountView
* fItemCountView
;
54 PackageListener
* fPackageListener
;
55 RowByNameTable
* fRowByNameTable
;
57 WorkStatusView
* fWorkStatusView
;
60 #endif // PACKAGE_LIST_VIEW_H