1
// Berkeley Open Infrastructure for Network Computing
2
// http://boinc.berkeley.edu
3
// Copyright (C) 2005 University of California
5
// This is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation;
8
// either version 2.1 of the License, or (at your option) any later version.
10
// This software 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.
15
// To view the GNU Lesser General Public License visit
16
// http://www.gnu.org/copyleft/lesser.html
17
// or write to the Free Software Foundation, Inc.,
18
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef _WIZ_PROJECTPROPERTIESPAGE_H_
22
#define _WIZ_PROJECTPROPERTIESPAGE_H_
24
#if defined(__GNUG__) && !defined(__APPLE__)
25
#pragma interface "ProjectPropertiesPage.cpp"
29
* CProjectPropertiesPage custom events
32
class CProjectPropertiesPageEvent : public wxEvent
35
CProjectPropertiesPageEvent(wxEventType evtType, wxWizardPageEx *parent)
36
: wxEvent(-1, evtType)
38
SetEventObject(parent);
41
virtual wxEvent *Clone() const { return new CProjectPropertiesPageEvent(*this); }
45
BEGIN_DECLARE_EVENT_TYPES()
46
DECLARE_EVENT_TYPE( wxEVT_PROJECTPROPERTIES_STATECHANGE, 11000 )
47
END_DECLARE_EVENT_TYPES()
49
#define EVT_PROJECTPROPERTIES_STATECHANGE(fn) \
50
DECLARE_EVENT_TABLE_ENTRY(wxEVT_PROJECTPROPERTIES_STATECHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
53
* CProjectPropertiesPage states
56
#define PROJPROP_INIT 0
57
#define PROJPROP_RETRPROJECTPROPERTIES_BEGIN 1
58
#define PROJPROP_RETRPROJECTPROPERTIES_EXECUTE 2
59
#define PROJPROP_DETERMINENETWORKSTATUS_BEGIN 3
60
#define PROJPROP_DETERMINENETWORKSTATUS_EXECUTE 4
61
#define PROJPROP_CLEANUP 5
62
#define PROJPROP_END 6
65
* CProjectPropertiesPage class declaration
68
class CProjectPropertiesPage: public wxWizardPageEx
70
DECLARE_DYNAMIC_CLASS( CProjectPropertiesPage )
75
CProjectPropertiesPage( );
77
CProjectPropertiesPage( CBOINCBaseWizard* parent );
80
bool Create( CBOINCBaseWizard* parent );
82
/// Creates the controls and sizers
83
void CreateControls();
85
////@begin CProjectPropertiesPage event handler declarations
87
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_PROJECTPROPERTIESPAGE
88
void OnPageChanged( wxWizardExEvent& event );
90
/// wxEVT_WIZARD_CANCEL event handler for ID_PROJECTPROPERTIESPAGE
91
void OnCancel( wxWizardExEvent& event );
93
////@end CProjectPropertiesPage event handler declarations
95
void OnStateChange( CProjectPropertiesPageEvent& event );
97
////@begin CProjectPropertiesPage member function declarations
99
/// Gets the previous page.
100
virtual wxWizardPageEx* GetPrev() const;
102
/// Gets the next page.
103
virtual wxWizardPageEx* GetNext() const;
105
/// Retrieves bitmap resources
106
wxBitmap GetBitmapResource( const wxString& name );
108
/// Retrieves icon resources
109
wxIcon GetIconResource( const wxString& name );
110
////@end CProjectPropertiesPage member function declarations
112
bool GetProjectPropertiesSucceeded() const { return m_bProjectPropertiesSucceeded ; }
113
void SetProjectPropertiesSucceeded(bool value) { m_bProjectPropertiesSucceeded = value ; }
115
bool GetProjectPropertiesURLFailure() const { return m_bProjectPropertiesURLFailure ; }
116
void SetProjectPropertiesURLFailure(bool value) { m_bProjectPropertiesURLFailure = value ; }
118
bool GetProjectAccountCreationDisabled() const { return m_bProjectAccountCreationDisabled ; }
119
void SetProjectAccountCreationDisabled(bool value) { m_bProjectAccountCreationDisabled = value ; }
121
bool GetProjectClientAccountCreationDisabled() const { return m_bProjectClientAccountCreationDisabled ; }
122
void SetProjectClientAccountCreationDisabled(bool value) { m_bProjectClientAccountCreationDisabled = value ; }
124
bool GetProjectAlreadyAttached() const { return m_bProjectAlreadyAttached ; }
125
void SetProjectAlreadyAttached(bool value) { m_bProjectAlreadyAttached = value ; }
127
bool GetNetworkConnectionDetected() const { return m_bNetworkConnectionDetected ; }
128
void SetNetworkConnectionDetected(bool value) { m_bNetworkConnectionDetected = value ; }
130
bool GetServerReportedError() const { return m_bServerReportedError ; }
131
void SetServerReportedError(bool value) { m_bServerReportedError = value ; }
133
bool GetTermsOfUseRequired() const { return m_bTermsOfUseRequired ; }
134
void SetTermsOfUseRequired(bool value) { m_bTermsOfUseRequired = value ; }
136
wxInt32 GetCurrentState() const { return m_iCurrentState ; }
137
void SetNextState(wxInt32 value) { m_iCurrentState = value ; }
139
/// Should we show tooltips?
140
static bool ShowToolTips();
142
/// Progress Image Support
143
void StartProgress(wxStaticBitmap* pBitmap);
144
void IncrementProgress(wxStaticBitmap* pBitmap);
145
void FinishProgress(wxStaticBitmap* pBitmap);
147
////@begin CProjectPropertiesPage member variables
148
wxStaticText* m_pTitleStaticCtrl;
149
wxStaticBitmap* m_pProgressIndicator;
150
////@end CProjectPropertiesPage member variables
151
bool m_bProjectPropertiesSucceeded;
152
bool m_bProjectPropertiesURLFailure;
153
bool m_bProjectAccountCreationDisabled;
154
bool m_bProjectClientAccountCreationDisabled;
155
bool m_bProjectAlreadyAttached;
156
bool m_bNetworkConnectionDetected;
157
bool m_bServerReportedError;
158
bool m_bTermsOfUseRequired;
163
#endif // _WIZ_PROJECTPROPERTIESPAGE_H_
1
// This file is part of BOINC.
2
// http://boinc.berkeley.edu
3
// Copyright (C) 2008 University of California
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.
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.
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/>.
18
#ifndef _WIZ_PROJECTPROPERTIESPAGE_H_
19
#define _WIZ_PROJECTPROPERTIESPAGE_H_
21
#if defined(__GNUG__) && !defined(__APPLE__)
22
#pragma interface "ProjectPropertiesPage.cpp"
26
* CProjectPropertiesPage custom events
29
class CProjectPropertiesPageEvent : public wxEvent
32
CProjectPropertiesPageEvent(wxEventType evtType, wxWizardPageEx *parent)
33
: wxEvent(-1, evtType)
35
SetEventObject(parent);
38
virtual wxEvent *Clone() const { return new CProjectPropertiesPageEvent(*this); }
42
BEGIN_DECLARE_EVENT_TYPES()
43
DECLARE_EVENT_TYPE( wxEVT_PROJECTPROPERTIES_STATECHANGE, 11000 )
44
END_DECLARE_EVENT_TYPES()
46
#define EVT_PROJECTPROPERTIES_STATECHANGE(fn) \
47
DECLARE_EVENT_TABLE_ENTRY(wxEVT_PROJECTPROPERTIES_STATECHANGE, -1, -1, (wxObjectEventFunction) (wxEventFunction) &fn, NULL),
50
* CProjectPropertiesPage states
53
#define PROJPROP_INIT 0
54
#define PROJPROP_RETRPROJECTPROPERTIES_BEGIN 1
55
#define PROJPROP_RETRPROJECTPROPERTIES_EXECUTE 2
56
#define PROJPROP_DETERMINENETWORKSTATUS_BEGIN 3
57
#define PROJPROP_DETERMINENETWORKSTATUS_EXECUTE 4
58
#define PROJPROP_DETERMINEACCOUNTINFOSTATUS_BEGIN 5
59
#define PROJPROP_DETERMINEACCOUNTINFOSTATUS_EXECUTE 6
60
#define PROJPROP_CLEANUP 7
61
#define PROJPROP_END 8
64
* CProjectPropertiesPage class declaration
67
class CProjectPropertiesPage: public wxWizardPageEx
69
DECLARE_DYNAMIC_CLASS( CProjectPropertiesPage )
74
CProjectPropertiesPage( );
76
CProjectPropertiesPage( CBOINCBaseWizard* parent );
79
bool Create( CBOINCBaseWizard* parent );
81
/// Creates the controls and sizers
82
void CreateControls();
84
////@begin CProjectPropertiesPage event handler declarations
86
/// wxEVT_WIZARD_PAGE_CHANGED event handler for ID_PROJECTPROPERTIESPAGE
87
void OnPageChanged( wxWizardExEvent& event );
89
/// wxEVT_WIZARD_CANCEL event handler for ID_PROJECTPROPERTIESPAGE
90
void OnCancel( wxWizardExEvent& event );
92
////@end CProjectPropertiesPage event handler declarations
94
void OnStateChange( CProjectPropertiesPageEvent& event );
96
////@begin CProjectPropertiesPage member function declarations
98
/// Gets the previous page.
99
virtual wxWizardPageEx* GetPrev() const;
101
/// Gets the next page.
102
virtual wxWizardPageEx* GetNext() const;
104
/// Retrieves bitmap resources
105
wxBitmap GetBitmapResource( const wxString& name );
107
/// Retrieves icon resources
108
wxIcon GetIconResource( const wxString& name );
109
////@end CProjectPropertiesPage member function declarations
111
bool GetProjectPropertiesSucceeded() const { return m_bProjectPropertiesSucceeded ; }
112
void SetProjectPropertiesSucceeded(bool value) { m_bProjectPropertiesSucceeded = value ; }
114
bool GetProjectPropertiesURLFailure() const { return m_bProjectPropertiesURLFailure ; }
115
void SetProjectPropertiesURLFailure(bool value) { m_bProjectPropertiesURLFailure = value ; }
117
bool GetProjectPropertiesCommunicationFailure() const { return m_bProjectPropertiesCommunicationFailure ; }
118
void SetProjectPropertiesCommunicationFailure(bool value) { m_bProjectPropertiesCommunicationFailure = value ; }
120
bool GetProjectAccountCreationDisabled() const { return m_bProjectAccountCreationDisabled ; }
121
void SetProjectAccountCreationDisabled(bool value) { m_bProjectAccountCreationDisabled = value ; }
123
bool GetProjectClientAccountCreationDisabled() const { return m_bProjectClientAccountCreationDisabled ; }
124
void SetProjectClientAccountCreationDisabled(bool value) { m_bProjectClientAccountCreationDisabled = value ; }
126
bool GetNetworkConnectionNotDetected() const { return m_bNetworkConnectionNotDetected ; }
127
void SetNetworkConnectionNotDetected(bool value) { m_bNetworkConnectionNotDetected = value ; }
129
bool GetServerReportedError() const { return m_bServerReportedError ; }
130
void SetServerReportedError(bool value) { m_bServerReportedError = value ; }
132
bool GetTermsOfUseRequired() const { return m_bTermsOfUseRequired ; }
133
void SetTermsOfUseRequired(bool value) { m_bTermsOfUseRequired = value ; }
135
bool GetCredentialsAlreadyAvailable() const { return m_bCredentialsAlreadyAvailable ; }
136
void SetCredentialsAlreadyAvailable(bool value) { m_bCredentialsAlreadyAvailable = value ; }
138
wxInt32 GetCurrentState() const { return m_iCurrentState ; }
139
void SetNextState(wxInt32 value) { m_iCurrentState = value ; }
141
/// Should we show tooltips?
142
static bool ShowToolTips();
144
/// Progress Image Support
145
void StartProgress(wxStaticBitmap* pBitmap);
146
void IncrementProgress(wxStaticBitmap* pBitmap);
147
void FinishProgress(wxStaticBitmap* pBitmap);
149
////@begin CProjectPropertiesPage member variables
150
wxStaticText* m_pTitleStaticCtrl;
151
wxStaticBitmap* m_pProgressIndicator;
152
////@end CProjectPropertiesPage member variables
153
bool m_bProjectPropertiesSucceeded;
154
bool m_bProjectPropertiesURLFailure;
155
bool m_bProjectPropertiesCommunicationFailure;
156
bool m_bProjectAccountCreationDisabled;
157
bool m_bProjectClientAccountCreationDisabled;
158
bool m_bNetworkConnectionNotDetected;
159
bool m_bServerReportedError;
160
bool m_bTermsOfUseRequired;
161
bool m_bCredentialsAlreadyAvailable;
166
#endif // _WIZ_PROJECTPROPERTIESPAGE_H_