2006-07-20 19:33:08 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
|
2006-07-20 17:57:23 +00:00
|
|
|
#ifndef _DLG_PREFERENCES_H_
|
|
|
|
#define _DLG_PREFERENCES_H_
|
2006-07-05 21:36:56 +00:00
|
|
|
|
2006-07-20 19:33:08 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "sg_DlgPreferences.cpp"
|
|
|
|
#endif
|
|
|
|
|
2006-10-25 14:09:47 +00:00
|
|
|
/*!
|
|
|
|
* Includes
|
|
|
|
*/
|
2006-07-05 21:36:56 +00:00
|
|
|
|
2006-10-25 14:09:47 +00:00
|
|
|
////@begin includes
|
|
|
|
////@end includes
|
2006-07-24 22:10:28 +00:00
|
|
|
|
2006-10-25 14:09:47 +00:00
|
|
|
/*!
|
|
|
|
* Forward declarations
|
|
|
|
*/
|
2006-07-24 22:10:28 +00:00
|
|
|
|
2006-10-25 14:09:47 +00:00
|
|
|
////@begin forward declarations
|
|
|
|
////@end forward declarations
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control identifiers
|
|
|
|
*/
|
|
|
|
|
|
|
|
////@begin control identifiers
|
|
|
|
#define ID_DIALOG 10000
|
|
|
|
#define SYMBOL_CDLGPREFERENCES_STYLE wxDEFAULT_DIALOG_STYLE
|
|
|
|
#define SYMBOL_CDLGPREFERENCES_TITLE _("BOINC Manager - Preferences")
|
|
|
|
#define SYMBOL_CDLGPREFERENCES_IDNAME ID_DIALOG
|
|
|
|
#define SYMBOL_CDLGPREFERENCES_SIZE wxDefaultSize
|
|
|
|
#define SYMBOL_CDLGPREFERENCES_POSITION wxDefaultPosition
|
|
|
|
#define ID_CANCELBUTTON 10001
|
|
|
|
#define ID_CHANGEBUTTON 10002
|
|
|
|
#define ID_CLEARBUTTON 10003
|
|
|
|
#define ID_SAVEBUTTON 10004
|
|
|
|
#define ID_SKINPICKERCMBBOX 10005
|
|
|
|
#define ID_DOWORKONLYBGNCMBBOX 10006
|
|
|
|
#define ID_DOCONNECTONLYBGNCMBBOX 10007
|
|
|
|
////@end control identifiers
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Compatibility
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef wxCLOSE_BOX
|
|
|
|
#define wxCLOSE_BOX 0x1000
|
|
|
|
#endif
|
|
|
|
#ifndef wxFIXED_MINSIZE
|
|
|
|
#define wxFIXED_MINSIZE 0
|
|
|
|
#endif
|
2006-07-24 22:10:28 +00:00
|
|
|
|
2006-10-25 14:09:47 +00:00
|
|
|
/*!
|
|
|
|
* CDlgPreferences class declaration
|
|
|
|
*/
|
|
|
|
|
|
|
|
class CDlgPreferences : public wxDialog
|
2006-07-05 21:36:56 +00:00
|
|
|
{
|
2006-10-25 14:09:47 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS( CDlgPreferences )
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
|
2006-07-05 21:36:56 +00:00
|
|
|
public:
|
2006-10-25 14:09:47 +00:00
|
|
|
/// Constructors
|
|
|
|
CDlgPreferences();
|
|
|
|
CDlgPreferences( wxWindow* parent, wxWindowID id = SYMBOL_CDLGPREFERENCES_IDNAME, const wxString& caption = SYMBOL_CDLGPREFERENCES_TITLE, const wxPoint& pos = SYMBOL_CDLGPREFERENCES_POSITION, const wxSize& size = SYMBOL_CDLGPREFERENCES_SIZE, long style = SYMBOL_CDLGPREFERENCES_STYLE );
|
|
|
|
|
|
|
|
/// Creation
|
|
|
|
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CDLGPREFERENCES_IDNAME, const wxString& caption = SYMBOL_CDLGPREFERENCES_TITLE, const wxPoint& pos = SYMBOL_CDLGPREFERENCES_POSITION, const wxSize& size = SYMBOL_CDLGPREFERENCES_SIZE, long style = SYMBOL_CDLGPREFERENCES_STYLE );
|
|
|
|
|
|
|
|
/// Creates the controls and sizers
|
|
|
|
void CreateControls();
|
|
|
|
|
2006-09-15 16:47:04 +00:00
|
|
|
|
2006-08-10 19:32:47 +00:00
|
|
|
wxBitmapButton *btnSave;
|
2006-09-14 16:02:55 +00:00
|
|
|
wxBitmapButton *btnSaveSkin;
|
2006-08-10 19:32:47 +00:00
|
|
|
wxBitmapButton *btnCancel;
|
|
|
|
wxBitmapButton *btnClear;
|
|
|
|
// Pointer control
|
|
|
|
wxStaticText *lblPref;
|
|
|
|
wxStaticText *lblModifySett;
|
|
|
|
wxStaticText *lblDoWorkBtwn;
|
|
|
|
wxStaticText *lblAnd1;
|
|
|
|
wxStaticText *lblConnToIntBtwn;
|
|
|
|
wxComboBox *cmbDWBtwnBgn;
|
|
|
|
wxComboBox *cmbDWBtwnEnd;
|
|
|
|
wxComboBox *cmbCTIBtwnBgn;
|
|
|
|
wxComboBox *cmbCTIBtwnEnd;
|
|
|
|
wxStaticText *lblAnd2;
|
|
|
|
wxStaticText *lblUseNoMoreGB;
|
|
|
|
wxComboBox *cmbUseNoMoreGB;
|
|
|
|
wxStaticText *lblGB;
|
|
|
|
wxStaticText *lblDWWCInUse;
|
|
|
|
wxStaticText *lblDWACIdleFor;
|
|
|
|
wxComboBox *cmbDWACIdleFor;
|
|
|
|
wxStaticText *lblMinutes;
|
|
|
|
wxComboBox *cmbDWWCInUse;
|
|
|
|
|
|
|
|
wxStaticText *lblSkinXML;
|
|
|
|
wxComboBox *cmbSkinPicker;
|
2006-07-05 21:36:56 +00:00
|
|
|
|
2006-08-18 21:45:17 +00:00
|
|
|
void WriteSettings();
|
2006-08-17 17:36:51 +00:00
|
|
|
bool CheckIfInArray(wxString valArray[],wxString value,int size);
|
|
|
|
void ReadSettings(GLOBAL_PREFS prefs);
|
|
|
|
int ConvertToNumber(wxString num);
|
2006-08-10 19:32:47 +00:00
|
|
|
wxString GetSkinName() const { return m_SkinName; }
|
|
|
|
void SetSkinName(const wxString& skinName) { m_SkinName = skinName; }
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
2006-07-05 21:36:56 +00:00
|
|
|
|
|
|
|
protected:
|
2006-08-10 19:32:47 +00:00
|
|
|
wxString m_SkinName;
|
2006-08-17 17:36:51 +00:00
|
|
|
wxString m_PrefIndicator;
|
2006-08-10 19:32:47 +00:00
|
|
|
wxArrayString m_skinNames;
|
2006-08-17 17:36:51 +00:00
|
|
|
GLOBAL_PREFS m_prefs;
|
2006-08-10 19:32:47 +00:00
|
|
|
void OnEraseBackground(wxEraseEvent& event);
|
2006-10-25 14:09:47 +00:00
|
|
|
|
|
|
|
void OnChange(wxCommandEvent& event);
|
|
|
|
|
2006-08-10 19:32:47 +00:00
|
|
|
void OnBtnClick(wxCommandEvent& event);
|
2006-09-15 16:47:04 +00:00
|
|
|
void VwXDrawBackImg(wxEraseEvent& event,wxWindow *win,wxBitmap* bitMap,int opz);
|
2006-07-05 21:36:56 +00:00
|
|
|
|
2006-09-14 16:02:55 +00:00
|
|
|
private:
|
|
|
|
CStaticLine *lnMyTop;
|
|
|
|
|
2006-07-05 21:36:56 +00:00
|
|
|
};
|
|
|
|
|
2006-07-20 17:57:23 +00:00
|
|
|
#endif // end CDlgPreferences
|