34 #include <wx/statline.h>
35 #include <wx/html/htmlwin.h>
62 wxDialog(parent, -1, _T("Validate
Machine"), wxDefaultPosition),
65 createContents(
this,
true,
true);
67 checkAnsiC_ =
dynamic_cast<wxCheckBox*
>(
FindWindow(ID_CHECK_ANSI_C));
68 checkGlobalConnReg_ =
dynamic_cast<wxCheckBox*
>(
96 if (checkAnsiC_->IsChecked() ||
97 checkGlobalConnReg_->IsChecked()) {
117 wxString resultPage = _T(
"<html><body><small>");
119 std::set<ProgrammabilityValidator::ErrorCode> checks;
120 if (checkGlobalConnReg_->IsChecked()) {
125 if (checkAnsiC_->IsChecked()) {
128 OPERATION_MISSING_FROM_THE_PRIMITIVE_OPERATION_SET);
137 for (
int i = 0; i < results->
errorCount(); i++) {
141 resultPage.Append(_T(
"<hr>"));
151 _T(
"<font color=#00c000>Validity checks passed!</font>"));
153 resultPage.Append(_T(
"</small></body></html>"));
154 resultsWindow_->SetPage(resultPage);
182 wxWindow *parent,
bool call_fit,
bool set_sizer) {
184 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
186 wxBoxSizer *item1 =
new wxBoxSizer( wxVERTICAL );
188 wxStaticBox *item3 =
new wxStaticBox( parent, -1, wxT(
"Validate:") );
189 wxStaticBoxSizer *item2 =
new wxStaticBoxSizer( item3, wxVERTICAL );
191 wxCheckBox *item4 =
new wxCheckBox( parent, ID_CHECK_ANSI_C, wxT(
"Check for operations needed to support ANSI C."), wxDefaultPosition, wxDefaultSize, 0 );
192 item2->Add( item4, 0, wxALL, 5 );
194 wxCheckBox *item5 =
new wxCheckBox( parent, ID_CHECK_GLOBAL_CONN_REGISTER, wxT(
"Check for global connection register."), wxDefaultPosition, wxDefaultSize, 0 );
195 item2->Add( item5, 0, wxALL, 5 );
197 wxButton *item6 =
new wxButton( parent, ID_VALIDATE, wxT(
"Validate"), wxDefaultPosition, wxDefaultSize, 0 );
198 item2->Add( item6, 0, wxALIGN_RIGHT|wxALL, 5 );
200 item1->Add( item2, 0, wxGROW|wxALL, 5 );
202 wxStaticBox *item8 =
new wxStaticBox( parent, -1, wxT(
"Results:") );
203 wxStaticBoxSizer *item7 =
new wxStaticBoxSizer( item8, wxVERTICAL );
205 resultsWindow_ =
new wxHtmlWindow(parent, ID_RESULTS, wxDefaultPosition, wxSize(250, 250));
206 wxWindow* item9 = resultsWindow_;
208 item7->Add( item9, 0, wxGROW|wxALL, 5 );
210 item1->Add( item7, 0, wxGROW|wxALL, 5 );
212 item0->Add( item1, 0, wxGROW|wxALL, 5 );
214 wxStaticLine *item10 =
new wxStaticLine( parent, ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
215 item0->Add( item10, 0, wxGROW|wxALL, 5 );
217 wxButton *item11 =
new wxButton( parent, ID_CLOSE, wxT(
"Close"), wxDefaultPosition, wxDefaultSize, 0 );
218 item0->Add( item11, 0, wxALIGN_RIGHT|wxALL, 5 );
222 parent->SetSizer( item0 );
224 item0->SetSizeHints( parent );