1 // This file is part of BOINC. 2 // http://boinc.berkeley.edu 3 // Copyright (C) 2008 University of California 4 // 5 // BOINC is free software; you can redistribute it and/or modify it 6 // under the terms of the GNU Lesser General Public License 7 // as published by the Free Software Foundation, 8 // either version 3 of the License, or (at your option) any later version. 9 // 10 // BOINC is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 // See the GNU Lesser General Public License for more details. 14 // 15 // You should have received a copy of the GNU Lesser General Public License 16 // along with BOINC. If not, see <http://www.gnu.org/licenses/>. 17 // 18 #ifndef BOINC_ACCOUNTMANAGERINFOPAGE_H 19 #define BOINC_ACCOUNTMANAGERINFOPAGE_H 20 21 #if defined(__GNUG__) && !defined(__APPLE__) 22 #pragma interface "AccountManagerInfoPage.cpp" 23 #endif 24 25 /*! 26 * CProjectListItem class declaration 27 */ 28 29 class CAcctMgrListItem: public wxObject 30 { DECLARE_DYNAMIC_CLASS(CAcctMgrListItem)31 DECLARE_DYNAMIC_CLASS( CAcctMgrListItem ) 32 public: 33 34 wxString GetURL() const { return m_strURL ; } SetURL(wxString value)35 void SetURL(wxString value) { m_strURL = value ; } 36 GetName()37 wxString GetName() const { return m_strName ; } SetName(wxString value)38 void SetName(wxString value) { m_strName = value ; } 39 GetImage()40 wxString GetImage() const { return m_strImage ; } SetImage(wxString value)41 void SetImage(wxString value) { m_strImage = value ; } 42 GetDescription()43 wxString GetDescription() const { return m_strDescription ; } SetDescription(wxString value)44 void SetDescription(wxString value) { m_strDescription = value ; } 45 46 private: 47 wxString m_strURL; 48 wxString m_strName; 49 wxString m_strImage; 50 wxString m_strDescription; 51 }; 52 53 54 /*! 55 * CAccountManagerInfoPage class declaration 56 */ 57 58 class CAccountManagerInfoPage: public wxWizardPageEx 59 { 60 DECLARE_DYNAMIC_CLASS( CAccountManagerInfoPage ) 61 DECLARE_EVENT_TABLE() 62 63 public: 64 /// Constructors 65 CAccountManagerInfoPage( ); 66 67 CAccountManagerInfoPage( CBOINCBaseWizard* parent ); 68 69 /// Creation 70 bool Create( CBOINCBaseWizard* parent ); 71 72 /// Creates the controls and sizers 73 void CreateControls(); 74 75 ////@begin CAccountManagerInfoPage event handler declarations 76 77 /// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_ACCOUNTMANAGERINFOPAGE 78 void OnPageChanged( wxWizardExEvent& event ); 79 80 /// wxEVT_WIZARD_PAGE_CHANGING event handler for ID_ACCOUNTMANAGERINFOPAGE 81 void OnPageChanging( wxWizardExEvent& event ); 82 83 /// wxEVT_LISTBOX event handler for ID_PROJECTS 84 void OnProjectSelected( wxCommandEvent& event ); 85 86 /// wxEVT_TEXT event handler for ID_PROJECTURLCTRL 87 void OnURLChanged( wxCommandEvent& event ); 88 89 /// wxEVT_BUTTON event handler for ID_PROJECTWEBPAGECTRL 90 void OnProjectItemDisplay( wxCommandEvent& event ); 91 92 /// wxEVT_WIZARD_CANCEL event handler for ID_ACCOUNTMANAGERINFOPAGE 93 void OnCancel( wxWizardExEvent& event ); 94 95 ////@end CAccountManagerInfoPage event handler declarations 96 97 ////@begin CAccountManagerInfoPage member function declarations 98 99 /// Gets the previous page. 100 virtual wxWizardPageEx* GetPrev() const; 101 102 /// Gets the next page. 103 virtual wxWizardPageEx* GetNext() const; 104 105 /// Retrieves bitmap resources 106 wxBitmap GetBitmapResource( const wxString& name ); 107 108 /// Retrieves icon resources 109 wxIcon GetIconResource( const wxString& name ); 110 ////@end CAccountManagerInfoPage member function declarations 111 112 /// Should we show tooltips? 113 static bool ShowToolTips(); 114 115 ////@begin CAccountManagerInfoPage member variables 116 wxStaticText* m_pTitleStaticCtrl; 117 wxStaticText* m_pDescriptionStaticCtrl; 118 wxListBox* m_pProjectListCtrl; 119 wxStaticText* m_pProjectDetailsStaticCtrl; 120 wxTextCtrl* m_pProjectDetailsDescriptionCtrl; 121 wxButton* m_pOpenWebSiteButton; 122 wxStaticText* m_pProjectUrlStaticCtrl; 123 wxTextCtrl* m_pProjectUrlCtrl; 124 ////@end CAccountManagerInfoPage member variables 125 bool m_bAccountManagerListPopulated; 126 }; 127 128 #endif 129