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 19 #ifndef BOINC_DLGITEMPROPERTIES_H 20 #define BOINC_DLGITEMPROPERTIES_H 21 22 #if defined(__GNUG__) && !defined(__APPLE__) 23 #pragma interface "DlgItemProperties.cpp" 24 #endif 25 26 #include <wx/intl.h> 27 28 #include <wx/gdicmn.h> 29 #include <wx/gbsizer.h> 30 #include <wx/sizer.h> 31 #include <wx/scrolwin.h> 32 #include <wx/font.h> 33 #include <wx/colour.h> 34 #include <wx/settings.h> 35 #include <wx/string.h> 36 #include <wx/button.h> 37 #include <wx/dialog.h> 38 39 #include "MainDocument.h" 40 41 class CDlgItemProperties : public wxDialog { 42 DECLARE_DYNAMIC_CLASS( CDlgItemProperties ) 43 DECLARE_EVENT_TABLE() 44 public: 45 CDlgItemProperties(wxWindow* parent=NULL);//to act as standard constructor set a default value 46 virtual ~CDlgItemProperties(); 47 // 48 void renderInfos(PROJECT* project); 49 void renderInfos(RESULT* result); 50 void show_rsc(wxString rsc_name, RSC_DESC rsc_desc); 51 private: 52 int m_current_row; 53 //formatting methods 54 wxString FormatDiskSpace(double bytes); 55 wxString FormatApplicationName(RESULT* result ); 56 //generic layout methods 57 bool SaveState(); 58 bool RestoreState(); 59 void addSection(const wxString& title); 60 void addProperty(const wxString& name, const wxString& value); 61 protected: 62 wxBoxSizer* m_bSizer1; 63 wxScrolledWindow* m_scrolledWindow; 64 wxGridBagSizer* m_gbSizer; 65 wxButton* m_btnClose; 66 wxString m_strBaseConfigLocation; 67 }; 68 69 #endif 70