forked from BOINC/boinc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDlgGenericMessage.cpp
164 lines (128 loc) · 4.89 KB
/
DlgGenericMessage.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC 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 3 of the License, or (at your option) any later version.
//
// BOINC 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.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgGenericMessage.h"
#endif
#include "stdwx.h"
#include "BOINCGUIApp.h"
////@begin includes
////@end includes
#include "DlgGenericMessage.h"
////@begin XPM images
////@end XPM images
/*!
* CDlgGenericMessage type definition
*/
IMPLEMENT_DYNAMIC_CLASS( CDlgGenericMessage, wxDialog )
/*!
* CDlgGenericMessage event table definition
*/
BEGIN_EVENT_TABLE( CDlgGenericMessage, wxDialog )
////@begin CDlgGenericMessage event table entries
////@end CDlgGenericMessage event table entries
END_EVENT_TABLE()
/*!
* CDlgGenericMessage constructors
*/
CDlgGenericMessage::CDlgGenericMessage( )
{
}
CDlgGenericMessage::CDlgGenericMessage( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
Create(parent, id, caption, pos, size, style);
}
/*!
* CDlgFileExit creator
*/
bool CDlgGenericMessage::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin CDlgGenericMessage member initialisation
m_DialogMessage = NULL;
m_DialogDisableMessage = NULL;
////@end CDlgGenericMessage member initialisation
////@begin CDlgGenericMessage creation
SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
GetSizer()->Fit(this);
GetSizer()->SetSizeHints(this);
Centre();
////@end CDlgGenericMessage creation
return true;
}
/*!
* Control creation for CDlgFileExit
*/
void CDlgGenericMessage::CreateControls()
{
////@begin CDlgGenericMessage content construction
CDlgGenericMessage* itemDialog1 = this;
wxFlexGridSizer* itemFlexGridSizer2 = new wxFlexGridSizer(2, 0, 0);
itemDialog1->SetSizer(itemFlexGridSizer2);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemFlexGridSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer4 = new wxFlexGridSizer(1, 0, 0);
itemBoxSizer3->Add(itemFlexGridSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_DialogMessage = new wxStaticText;
m_DialogMessage->Create( itemDialog1, wxID_STATIC, _T(""), wxDefaultPosition, wxDefaultSize, 0);
itemFlexGridSizer4->Add(m_DialogMessage, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemFlexGridSizer4->Add(5, 5, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_DialogDisableMessage = new wxCheckBox;
m_DialogDisableMessage->Create( itemDialog1, ID_DISABLEDIALOG, _("Don't show this dialog again."), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_DialogDisableMessage->SetValue(false);
itemFlexGridSizer4->Add(m_DialogDisableMessage, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(1, 0, 0);
itemFlexGridSizer2->Add(itemFlexGridSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP|wxALL, 5);
wxButton* itemButton9 = new wxButton;
itemButton9->Create( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton9->SetDefault();
itemFlexGridSizer8->Add(itemButton9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton10 = new wxButton;
itemButton10->Create( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemFlexGridSizer8->Add(itemButton10, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end CDlgGenericMessage content construction
}
/*!
* Should we show tooltips?
*/
bool CDlgGenericMessage::ShowToolTips()
{
return true;
}
/*!
* Get bitmap resources
*/
wxBitmap CDlgGenericMessage::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin CDlgGenericMessage bitmap retrieval
wxUnusedVar(name);
return wxNullBitmap;
////@end CDlgGenericMessage bitmap retrieval
}
/*!
* Get icon resources
*/
wxIcon CDlgGenericMessage::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin CDlgGenericMessage icon retrieval
wxUnusedVar(name);
return wxNullIcon;
////@end CDlgGenericMessage icon retrieval
}