1 #ifndef PROJECTMISSINGLIBS_H
2 #define PROJECTMISSINGLIBS_H
3 
4 //(*Headers(ProjectMissingLibs)
5 #include "scrollingdialog.h"
6 class wxStaticBoxSizer;
7 class wxFlexGridSizer;
8 class wxButton;
9 class wxStaticLine;
10 class wxStaticText;
11 class wxPanel;
12 //*)
13 
14 #include <wx/stattext.h>
15 #include <wx/choice.h>
16 
17 #include "libraryresult.h"
18 #include "librarydetectionmanager.h"
19 #include "webresourcesmanager.h"
20 
21 class ProjectMissingLibs: public wxScrollingDialog, public WebResourcesManager::ProgressHandler
22 {
23 	public:
24 
25 		ProjectMissingLibs( wxWindow* parent,wxArrayString& missingList, TypedResults& currentResults );
26 		virtual ~ProjectMissingLibs();
27 
28 	private:
29 
30 		//(*Declarations(ProjectMissingLibs)
31 		wxPanel* m_LibsBack;
32 		wxStaticText* m_StatusText;
33 		wxFlexGridSizer* m_LibsContainer;
34 		wxButton* Button1;
35 		wxButton* m_MissingDefsBtn;
36 		//*)
37 
38 		//(*Identifiers(ProjectMissingLibs)
39 		static const long ID_STATICTEXT1;
40 		static const long ID_STATICLINE2;
41 		static const long ID_STATICTEXT2;
42 		static const long ID_STATICLINE3;
43 		static const long ID_STATICTEXT3;
44 		static const long ID_STATICLINE10;
45 		static const long ID_STATICLINE11;
46 		static const long ID_STATICLINE12;
47 		static const long ID_STATICLINE13;
48 		static const long ID_STATICLINE14;
49 		static const long ID_PANEL1;
50 		static const long ID_BUTTON1;
51 		static const long ID_BUTTON2;
52 		static const long ID_STATICTEXT4;
53 		//*)
54 
55 		//(*Handlers(ProjectMissingLibs)
56 		void OnButton1Click(wxCommandEvent& event);
57 		void OnButton1Click1(wxCommandEvent& event);
58 		//*)
59 
60 		void InsertLibEntry( const wxString& lib, bool hasSearchFilter, bool isDetected );
61 		void TryDownloadMissing();
62 		bool StoreLibraryConfig( const wxString& lib, const std::vector< char >& content );
63 		bool AreMissingSearchFilters();
64 		void RecreateLibsList();
65 
66         // Implementation of download progress handler
67         virtual int  StartDownloading( const wxString& Url );
68         virtual void SetProgress( float progress, int id );
69         virtual void JobFinished( int id );
70         virtual void Error( const wxString& info, int id );
71         wxString m_CurrentUrl;
72         int      m_CurrentUrlId;
73 
74 		wxArrayString           m_Libs;
75 		TypedResults&           m_CurrentResults;
76 		LibraryDetectionManager m_DetectionManager;
77 		wxWindowList            m_SearchFlags;
78 
79 		DECLARE_EVENT_TABLE()
80 };
81 
82 #endif
83