00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012 #ifndef _DEPENDENCYDLG_H_
00013 #define _DEPENDENCYDLG_H_
00014
00019 #include "wxp/packagedep.h"
00020
00021
00026 class wxPackageDownloadQueuePanel;
00027
00028
00033
00034 #define SYMBOL_WXPACKAGEDEPENDENCYDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00035 #define SYMBOL_WXPACKAGEDEPENDENCYDLG_TITLE _("Package dependencies")
00036 #define SYMBOL_WXPACKAGEDEPENDENCYDLG_IDNAME wxID_ANY
00037 #define SYMBOL_WXPACKAGEDEPENDENCYDLG_SIZE wxSize(400, 300)
00038 #define SYMBOL_WXPACKAGEDEPENDENCYDLG_POSITION wxDefaultPosition
00039 #define ID_DEPENDENCY_REQUIRED_LIST 10060
00040 #define ID_DEPENDENCY_SUGGESTED_LIST 10061
00041 #define ID_DEPENDENCY_NOTINREPO 10064
00043
00044
00045
00046
00047
00048
00049 class wxPackageDependencyDlg: public wxDialog
00050 {
00051 DECLARE_DYNAMIC_CLASS( wxPackageDependencyDlg )
00052 DECLARE_EVENT_TABLE()
00053
00054 public:
00056 wxPackageDependencyDlg( );
00057
00058
00059
00060
00062 bool Create( wxWindow* parent,
00063 wxWindowID id = SYMBOL_WXPACKAGEDEPENDENCYDLG_IDNAME,
00064 const wxString& caption = SYMBOL_WXPACKAGEDEPENDENCYDLG_TITLE,
00065 const wxPoint& pos = SYMBOL_WXPACKAGEDEPENDENCYDLG_POSITION,
00066 const wxSize& size = SYMBOL_WXPACKAGEDEPENDENCYDLG_SIZE,
00067 long style = SYMBOL_WXPACKAGEDEPENDENCYDLG_STYLE );
00068
00070 void CreateControls();
00071
00073 static bool ShowToolTips();
00074
00075 public:
00076
00077 void OnButton(wxCommandEvent &ev);
00078
00079
00080 public:
00081
00082
00083 bool SetPackageArray(const wxPackageArray &arr,
00084 const wxPackageArray &installed,
00085 const wxPackageArray &remote);
00086 bool SetPackage(const wxPackage &pkg,
00087 const wxPackageArray &installed,
00088 const wxPackageArray &remote);
00089
00090 bool IsEmpty() const
00091 { return m_required.IsEmpty() && m_suggested.IsEmpty() && m_notfound.IsEmpty(); }
00092
00093
00094
00095 void QueueAdditionalPackages(wxPackageDependencyType type,
00096 wxPackageDownloadQueuePanel *panel);
00097
00101 wxPackageArray GetAdditionalPackages(wxPackageDependencyType t = wxPDT_INVALID) const;
00102
00103
00104 protected:
00105
00106 void FillListbox(wxListBox *box, const wxPackageDependencyArray &arr,
00107 bool useversionrange = false);
00108
00109 wxPackageArray GetPackagesFromCheckListbox(wxCheckListBox *box,
00110 const wxPackageDependencyArray &arr) const;
00111 protected:
00112
00113 wxStaticText* m_pMainMsg;
00114 wxCheckListBox* m_pRequiredCheckList;
00115 wxCheckListBox* m_pSuggestedCheckList;
00116 wxListBox* m_pNotFoundList;
00117 wxStaticText* m_pQuestionMsg;
00118
00119 protected:
00120
00121
00122 wxPackageDependencyArray m_required, m_suggested, m_notfound;
00123
00124
00125 const wxPackageArray *m_pRemote;
00126
00127
00128
00129 bool m_bSelectedPackagesAreDownloaded;
00130 };
00131
00132 #endif
00133