1 /* 2 * Copyright (c) 2007-2010, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Author: 6 * Łukasz 'Sil2100' Zemczak <sil2100@vexillium.org> 7 */ 8 #ifndef UNINSTALLVIEW_H 9 #define UNINSTALLVIEW_H 10 11 #include <GroupView.h> 12 #include <Path.h> 13 14 #include "InstalledPackageInfo.h" 15 16 17 class BButton; 18 class BListView; 19 class BTextView; 20 class BScrollView; 21 class BFilePanel; 22 23 24 class UninstallView : public BGroupView { 25 public: 26 UninstallView(); 27 virtual ~UninstallView(); 28 29 virtual void AttachedToWindow(); 30 virtual void MessageReceived(BMessage* message); 31 virtual void RefsReceived(BMessage* message); 32 33 private: 34 void _InitView(); 35 status_t _ReloadAppList(); 36 void _AddFile(const char* filename, 37 const node_ref& ref); 38 void _ClearAppList(); 39 void _CachePathToPackages(); 40 41 private: 42 class InfoItem; 43 44 BPath fToPackages; 45 BListView* fAppList; 46 BTextView* fDescription; 47 BButton* fInstallButton; 48 BFilePanel* fOpenPanel; 49 BButton* fRemoveButton; 50 BScrollView* fDescScroll; 51 InstalledPackageInfo fCurrentSelection; 52 bool fWatcherRunning; 53 54 const char* fNoPackageSelectedString; 55 }; 56 57 58 #endif // UNINSTALLVIEW_H 59