NIREP
|
00001 00002 // Name: QuickView.cpp 00003 // Purpose: 00004 // Author: 00005 // Modified by: 00006 // Created: 10/08/2010 15:46:09 00007 // RCS-ID: 00008 // Copyright: 00009 // Licence: 00011 00012 // For compilers that support precompilation, includes "wx/wx.h". 00013 #include "wx/wxprec.h" 00014 00015 #ifdef __BORLANDC__ 00016 #pragma hdrstop 00017 #endif 00018 00019 #ifndef WX_PRECOMP 00020 #include "wx/wx.h" 00021 #endif 00022 00025 00026 #include "QuickView.h" 00027 00030 00031 00032 /* 00033 * QuickView type definition 00034 */ 00035 00036 IMPLEMENT_DYNAMIC_CLASS( QuickView, wxWizard ) 00037 00038 00039 /* 00040 * QuickView event table definition 00041 */ 00042 00043 BEGIN_EVENT_TABLE( QuickView, wxWizard ) 00044 00047 00048 END_EVENT_TABLE() 00049 00050 00051 /* 00052 * QuickView constructors 00053 */ 00054 00055 QuickView::QuickView() 00056 { 00057 Init(); 00058 } 00059 00060 QuickView::QuickView( wxWindow* parent, wxWindowID id, const wxPoint& pos ) 00061 { 00062 Init(); 00063 Create(parent, id, pos); 00064 } 00065 00066 00067 /* 00068 * QuickView creator 00069 */ 00070 00071 bool QuickView::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos ) 00072 { 00074 SetExtraStyle(wxWS_EX_BLOCK_EVENTS|wxWIZARD_EX_HELPBUTTON); 00075 wxBitmap wizardBitmap(wxNullBitmap); 00076 wxWizard::Create( parent, id, _("QuickView"), wizardBitmap, pos, wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxFULL_REPAINT_ON_RESIZE ); 00077 00078 CreateControls(); 00080 return true; 00081 } 00082 00083 00084 /* 00085 * QuickView destructor 00086 */ 00087 00088 QuickView::~QuickView() 00089 { 00092 } 00093 00094 00095 /* 00096 * Member initialisation 00097 */ 00098 00099 void QuickView::Init() 00100 { 00103 } 00104 00105 00106 /* 00107 * Control creation for QuickView 00108 */ 00109 00110 void QuickView::CreateControls() 00111 { 00113 QuickView* itemWizard1 = this; 00114 00115 WizardPage* itemWizardPageSimple2 = new WizardPage( itemWizard1 ); 00116 itemWizard1->GetPageAreaSizer()->Add(itemWizardPageSimple2); 00117 00118 WizardPage2* itemWizardPageSimple49 = new WizardPage2( itemWizard1 ); 00119 itemWizard1->GetPageAreaSizer()->Add(itemWizardPageSimple49); 00120 00121 wxWizardPageSimple* lastPage = NULL; 00122 if (lastPage) 00123 wxWizardPageSimple::Chain(lastPage, itemWizardPageSimple2); 00124 lastPage = itemWizardPageSimple2; 00125 if (lastPage) 00126 wxWizardPageSimple::Chain(lastPage, itemWizardPageSimple49); 00127 lastPage = itemWizardPageSimple49; 00129 } 00130 00131 00132 /* 00133 * Runs the wizard. 00134 */ 00135 00136 bool QuickView::Run() 00137 { 00138 wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); 00139 while (node) 00140 { 00141 wxWizardPage* startPage = wxDynamicCast(node->GetData(), wxWizardPage); 00142 if (startPage) return RunWizard(startPage); 00143 node = node->GetNext(); 00144 } 00145 return false; 00146 } 00147 00148 00149 /* 00150 * Should we show tooltips? 00151 */ 00152 00153 bool QuickView::ShowToolTips() 00154 { 00155 return true; 00156 } 00157 00158 /* 00159 * Get bitmap resources 00160 */ 00161 00162 wxBitmap QuickView::GetBitmapResource( const wxString& name ) 00163 { 00164 // Bitmap retrieval 00166 wxUnusedVar(name); 00167 return wxNullBitmap; 00169 } 00170 00171 /* 00172 * Get icon resources 00173 */ 00174 00175 wxIcon QuickView::GetIconResource( const wxString& name ) 00176 { 00177 // Icon retrieval 00179 wxUnusedVar(name); 00180 return wxNullIcon; 00182 } 00183 00184 00185 /* 00186 * WizardPage type definition 00187 */ 00188 00189 IMPLEMENT_DYNAMIC_CLASS( WizardPage, wxWizardPageSimple ) 00190 00191 00192 /* 00193 * WizardPage event table definition 00194 */ 00195 00196 BEGIN_EVENT_TABLE( WizardPage, wxWizardPageSimple ) 00197 00198 //@begin WizardPage event table entries 00199 EVT_BUTTON( ID_BROWSE, WizardPage::OnBrowseClick ) 00200 00201 //@end WizardPage event table entries 00202 00203 END_EVENT_TABLE() 00204 00205 00206 /* 00207 * WizardPage constructors 00208 */ 00209 00210 WizardPage::WizardPage() 00211 { 00212 Init(); 00213 } 00214 00215 WizardPage::WizardPage( wxWizard* parent ) 00216 { 00217 Init(); 00218 Create( parent ); 00219 } 00220 00221 00222 /* 00223 * WizardPage creator 00224 */ 00225 00226 bool WizardPage::Create( wxWizard* parent ) 00227 { 00229 wxBitmap wizardBitmap(wxNullBitmap); 00230 wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap ); 00231 00232 CreateControls(); 00233 if (GetSizer()) 00234 GetSizer()->Fit(this); 00236 return true; 00237 } 00238 00239 00240 /* 00241 * WizardPage destructor 00242 */ 00243 00244 WizardPage::~WizardPage() 00245 { 00248 } 00249 00250 00251 /* 00252 * Member initialisation 00253 */ 00254 00255 void WizardPage::Init() 00256 { 00258 m_browseText = NULL; 00260 } 00261 00262 00263 /* 00264 * Control creation for WizardPage 00265 */ 00266 00267 void WizardPage::CreateControls() 00268 { 00270 WizardPage* itemWizardPageSimple2 = this; 00271 00272 wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(0, 1, 0, 0); 00273 itemFlexGridSizer3->AddGrowableRow(1); 00274 itemFlexGridSizer3->AddGrowableRow(5); 00275 itemFlexGridSizer3->AddGrowableCol(0); 00276 itemWizardPageSimple2->SetSizer(itemFlexGridSizer3); 00277 00278 wxStaticText* itemStaticText4 = new wxStaticText( itemWizardPageSimple2, wxID_STATIC, _("Evaluator Commands"), wxDefaultPosition, wxDefaultSize, 0 ); 00279 itemStaticText4->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma"))); 00280 itemFlexGridSizer3->Add(itemStaticText4, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00281 00282 wxArrayString itemListBox5Strings; 00283 wxListBox* itemListBox5 = new wxListBox( itemWizardPageSimple2, ID_LISTBOX1, wxDefaultPosition, wxDefaultSize, itemListBox5Strings, wxLB_SINGLE ); 00284 itemFlexGridSizer3->Add(itemListBox5, 0, wxGROW|wxGROW|wxALL, 5); 00285 00286 wxGrid* itemGrid6 = new wxGrid( itemWizardPageSimple2, ID_GRID1, wxDefaultPosition, wxSize(200, 85), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); 00287 itemGrid6->SetDefaultColSize(100); 00288 itemGrid6->SetDefaultRowSize(50); 00289 itemGrid6->SetColLabelSize(25); 00290 itemGrid6->SetRowLabelSize(50); 00291 itemGrid6->CreateGrid(1, 7, wxGrid::wxGridSelectCells); 00292 itemFlexGridSizer3->Add(itemGrid6, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL, 5); 00293 00294 wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxHORIZONTAL); 00295 itemFlexGridSizer3->Add(itemBoxSizer7, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00296 00297 m_browseText = new wxTextCtrl( itemWizardPageSimple2, ID_TEXTCTRL19, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00298 itemBoxSizer7->Add(m_browseText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00299 00300 wxButton* itemButton9 = new wxButton( itemWizardPageSimple2, ID_BROWSE, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); 00301 itemBoxSizer7->Add(itemButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00302 00303 wxCollapsiblePane* itemCollapsiblePane10 = new wxCollapsiblePane( itemWizardPageSimple2, ID_COLLAPSIBLEPANE2, _("Label"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE ); 00304 itemFlexGridSizer3->Add(itemCollapsiblePane10, 0, wxGROW|wxGROW|wxALL, 5); 00305 00306 wxBoxSizer* itemBoxSizer11 = new wxBoxSizer(wxHORIZONTAL); 00307 itemCollapsiblePane10->GetPane()->SetSizer(itemBoxSizer11); 00308 00309 wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL); 00310 itemBoxSizer11->Add(itemBoxSizer12, 0, wxGROW|wxALL, 5); 00311 00312 wxStaticText* itemStaticText13 = new wxStaticText( itemCollapsiblePane10->GetPane(), wxID_STATIC, _("Datatype"), wxDefaultPosition, wxDefaultSize, 0 ); 00313 itemBoxSizer12->Add(itemStaticText13, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00314 00315 wxArrayString itemComboBox14Strings; 00316 wxComboBox* itemComboBox14 = new wxComboBox( itemCollapsiblePane10->GetPane(), ID_COMBOBOX2, wxEmptyString, wxDefaultPosition, wxDefaultSize, itemComboBox14Strings, wxCB_DROPDOWN ); 00317 itemBoxSizer12->Add(itemComboBox14, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00318 00319 wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); 00320 itemBoxSizer11->Add(itemBoxSizer15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00321 00322 wxStaticText* itemStaticText16 = new wxStaticText( itemCollapsiblePane10->GetPane(), wxID_STATIC, _("Format"), wxDefaultPosition, wxDefaultSize, 0 ); 00323 itemBoxSizer15->Add(itemStaticText16, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00324 00325 wxArrayString itemComboBox17Strings; 00326 wxComboBox* itemComboBox17 = new wxComboBox( itemCollapsiblePane10->GetPane(), ID_COMBOBOX3, wxEmptyString, wxDefaultPosition, wxDefaultSize, itemComboBox17Strings, wxCB_DROPDOWN ); 00327 itemBoxSizer15->Add(itemComboBox17, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00328 00329 wxBoxSizer* itemBoxSizer18 = new wxBoxSizer(wxVERTICAL); 00330 itemBoxSizer11->Add(itemBoxSizer18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00331 00332 wxStaticText* itemStaticText19 = new wxStaticText( itemCollapsiblePane10->GetPane(), wxID_STATIC, _("Label"), wxDefaultPosition, wxDefaultSize, 0 ); 00333 itemBoxSizer18->Add(itemStaticText19, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00334 00335 wxTextCtrl* itemTextCtrl20 = new wxTextCtrl( itemCollapsiblePane10->GetPane(), ID_TEXTCTRL11, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00336 itemBoxSizer18->Add(itemTextCtrl20, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00337 00338 wxBoxSizer* itemBoxSizer21 = new wxBoxSizer(wxVERTICAL); 00339 itemBoxSizer11->Add(itemBoxSizer21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00340 00341 wxStaticText* itemStaticText22 = new wxStaticText( itemCollapsiblePane10->GetPane(), wxID_STATIC, _("Namespace"), wxDefaultPosition, wxDefaultSize, 0 ); 00342 itemBoxSizer21->Add(itemStaticText22, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00343 00344 wxTextCtrl* itemTextCtrl23 = new wxTextCtrl( itemCollapsiblePane10->GetPane(), ID_TEXTCTRL13, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00345 itemBoxSizer21->Add(itemTextCtrl23, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00346 00347 wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxVERTICAL); 00348 itemBoxSizer11->Add(itemBoxSizer24, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00349 00350 wxStaticText* itemStaticText25 = new wxStaticText( itemCollapsiblePane10->GetPane(), wxID_STATIC, _("Transformation units"), wxDefaultPosition, wxDefaultSize, 0 ); 00351 itemBoxSizer24->Add(itemStaticText25, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00352 00353 wxArrayString itemComboBox26Strings; 00354 wxComboBox* itemComboBox26 = new wxComboBox( itemCollapsiblePane10->GetPane(), ID_COMBOBOX4, wxEmptyString, wxDefaultPosition, wxDefaultSize, itemComboBox26Strings, wxCB_DROPDOWN ); 00355 itemBoxSizer24->Add(itemComboBox26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00356 00357 wxCollapsiblePane* itemCollapsiblePane27 = new wxCollapsiblePane( itemWizardPageSimple2, ID_COLLAPSIBLEPANE, _("Label"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE ); 00358 itemFlexGridSizer3->Add(itemCollapsiblePane27, 0, wxGROW|wxGROW|wxALL, 5); 00359 00360 wxFlexGridSizer* itemFlexGridSizer28 = new wxFlexGridSizer(0, 1, 0, 0); 00361 itemFlexGridSizer28->AddGrowableRow(0); 00362 itemFlexGridSizer28->AddGrowableCol(0); 00363 itemCollapsiblePane27->GetPane()->SetSizer(itemFlexGridSizer28); 00364 00365 wxScrolledWindow* itemScrolledWindow29 = new wxScrolledWindow( itemCollapsiblePane27->GetPane(), ID_SCROLLEDWINDOW3, wxDefaultPosition, wxSize(100, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); 00366 itemFlexGridSizer28->Add(itemScrolledWindow29, 0, wxGROW|wxGROW|wxALL, 5); 00367 itemScrolledWindow29->SetScrollbars(1, 1, 0, 0); 00368 wxBoxSizer* itemBoxSizer30 = new wxBoxSizer(wxHORIZONTAL); 00369 itemScrolledWindow29->SetSizer(itemBoxSizer30); 00370 00371 wxBoxSizer* itemBoxSizer31 = new wxBoxSizer(wxVERTICAL); 00372 itemBoxSizer30->Add(itemBoxSizer31, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00373 wxStaticText* itemStaticText32 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("coordinate 0 (source)"), wxDefaultPosition, wxDefaultSize, 0 ); 00374 itemBoxSizer31->Add(itemStaticText32, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00375 00376 wxTextCtrl* itemTextCtrl33 = new wxTextCtrl( itemScrolledWindow29, ID_TEXTCTRL16, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00377 itemBoxSizer31->Add(itemTextCtrl33, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00378 00379 wxStaticText* itemStaticText34 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("namespace"), wxDefaultPosition, wxDefaultSize, 0 ); 00380 itemBoxSizer31->Add(itemStaticText34, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00381 00382 wxTextCtrl* itemTextCtrl35 = new wxTextCtrl( itemScrolledWindow29, ID_TEXTCTRL17, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00383 itemBoxSizer31->Add(itemTextCtrl35, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00384 00385 wxStaticText* itemStaticText36 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("->"), wxDefaultPosition, wxDefaultSize, 0 ); 00386 itemStaticText36->SetForegroundColour(wxColour(255, 0, 0)); 00387 itemStaticText36->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma"))); 00388 itemBoxSizer30->Add(itemStaticText36, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00389 00390 wxBoxSizer* itemBoxSizer37 = new wxBoxSizer(wxVERTICAL); 00391 itemBoxSizer30->Add(itemBoxSizer37, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00392 wxStaticText* itemStaticText38 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("Algorithm Name"), wxDefaultPosition, wxDefaultSize, 0 ); 00393 itemBoxSizer37->Add(itemStaticText38, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00394 00395 wxTextCtrl* itemTextCtrl39 = new wxTextCtrl( itemScrolledWindow29, ID_TEXTCTRL18, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00396 itemBoxSizer37->Add(itemTextCtrl39, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00397 00398 wxStaticText* itemStaticText40 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("->"), wxDefaultPosition, wxDefaultSize, 0 ); 00399 itemStaticText40->SetForegroundColour(wxColour(255, 0, 0)); 00400 itemStaticText40->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma"))); 00401 itemBoxSizer30->Add(itemStaticText40, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00402 00403 wxBoxSizer* itemBoxSizer41 = new wxBoxSizer(wxVERTICAL); 00404 itemBoxSizer30->Add(itemBoxSizer41, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00405 wxStaticText* itemStaticText42 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("coordinate 1 (target)"), wxDefaultPosition, wxDefaultSize, 0 ); 00406 itemBoxSizer41->Add(itemStaticText42, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00407 00408 wxTextCtrl* itemTextCtrl43 = new wxTextCtrl( itemScrolledWindow29, ID_TEXTCTRL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00409 itemBoxSizer41->Add(itemTextCtrl43, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00410 00411 wxStaticText* itemStaticText44 = new wxStaticText( itemScrolledWindow29, wxID_STATIC, _("namespace"), wxDefaultPosition, wxDefaultSize, 0 ); 00412 itemBoxSizer41->Add(itemStaticText44, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00413 00414 wxTextCtrl* itemTextCtrl45 = new wxTextCtrl( itemScrolledWindow29, ID_TEXTCTRL1, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00415 itemBoxSizer41->Add(itemTextCtrl45, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00416 00417 itemScrolledWindow29->FitInside(); 00418 00419 wxBoxSizer* itemBoxSizer46 = new wxBoxSizer(wxHORIZONTAL); 00420 itemFlexGridSizer3->Add(itemBoxSizer46, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00421 00422 wxButton* itemButton47 = new wxButton( itemWizardPageSimple2, ID_BUTTON3, _("Add Command"), wxDefaultPosition, wxDefaultSize, 0 ); 00423 itemBoxSizer46->Add(itemButton47, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00424 00425 wxButton* itemButton48 = new wxButton( itemWizardPageSimple2, ID_BUTTON4, _("Delete Command"), wxDefaultPosition, wxDefaultSize, 0 ); 00426 itemBoxSizer46->Add(itemButton48, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00427 00429 } 00430 00431 00432 /* 00433 * Should we show tooltips? 00434 */ 00435 00436 bool WizardPage::ShowToolTips() 00437 { 00438 return true; 00439 } 00440 00441 /* 00442 * Get bitmap resources 00443 */ 00444 00445 wxBitmap WizardPage::GetBitmapResource( const wxString& name ) 00446 { 00447 // Bitmap retrieval 00449 wxUnusedVar(name); 00450 return wxNullBitmap; 00452 } 00453 00454 /* 00455 * Get icon resources 00456 */ 00457 00458 wxIcon WizardPage::GetIconResource( const wxString& name ) 00459 { 00460 // Icon retrieval 00462 wxUnusedVar(name); 00463 return wxNullIcon; 00465 } 00466 00467 00468 /* 00469 * WizardPage2 type definition 00470 */ 00471 00472 IMPLEMENT_DYNAMIC_CLASS( WizardPage2, wxWizardPageSimple ) 00473 00474 00475 /* 00476 * WizardPage2 event table definition 00477 */ 00478 00479 BEGIN_EVENT_TABLE( WizardPage2, wxWizardPageSimple ) 00480 00482 EVT_COLLAPSIBLEPANE_CHANGED( ID_COLLAPSIBLEPANE4, WizardPage2::OnCollapsiblepane4PaneChanged ) 00483 00485 00486 END_EVENT_TABLE() 00487 00488 00489 /* 00490 * WizardPage2 constructors 00491 */ 00492 00493 WizardPage2::WizardPage2() 00494 { 00495 Init(); 00496 } 00497 00498 WizardPage2::WizardPage2( wxWizard* parent ) 00499 { 00500 Init(); 00501 Create( parent ); 00502 } 00503 00504 00505 /* 00506 * WizardPage2 creator 00507 */ 00508 00509 bool WizardPage2::Create( wxWizard* parent ) 00510 { 00512 wxBitmap wizardBitmap(wxNullBitmap); 00513 wxWizardPageSimple::Create( parent, NULL, NULL, wizardBitmap ); 00514 00515 CreateControls(); 00516 if (GetSizer()) 00517 GetSizer()->Fit(this); 00519 return true; 00520 } 00521 00522 00523 /* 00524 * WizardPage2 destructor 00525 */ 00526 00527 WizardPage2::~WizardPage2() 00528 { 00531 } 00532 00533 00534 /* 00535 * Member initialisation 00536 */ 00537 00538 void WizardPage2::Init() 00539 { 00542 } 00543 00544 00545 /* 00546 * Control creation for WizardPage2 00547 */ 00548 00549 void WizardPage2::CreateControls() 00550 { 00552 WizardPage2* itemWizardPageSimple49 = this; 00553 00554 wxFlexGridSizer* itemFlexGridSizer50 = new wxFlexGridSizer(0, 1, 0, 0); 00555 itemFlexGridSizer50->AddGrowableRow(2); 00556 itemFlexGridSizer50->AddGrowableCol(0); 00557 itemWizardPageSimple49->SetSizer(itemFlexGridSizer50); 00558 00559 wxStaticText* itemStaticText51 = new wxStaticText( itemWizardPageSimple49, wxID_STATIC, _("Widget Commands"), wxDefaultPosition, wxDefaultSize, 0 ); 00560 itemStaticText51->SetFont(wxFont(16, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Tahoma"))); 00561 itemFlexGridSizer50->Add(itemStaticText51, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00562 00563 wxBoxSizer* itemBoxSizer52 = new wxBoxSizer(wxVERTICAL); 00564 itemFlexGridSizer50->Add(itemBoxSizer52, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00565 00566 wxBoxSizer* itemBoxSizer53 = new wxBoxSizer(wxHORIZONTAL); 00567 itemBoxSizer52->Add(itemBoxSizer53, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00568 00569 wxStaticText* itemStaticText54 = new wxStaticText( itemWizardPageSimple49, wxID_STATIC, _("Row Size"), wxDefaultPosition, wxDefaultSize, 0 ); 00570 itemBoxSizer53->Add(itemStaticText54, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00571 00572 wxTextCtrl* itemTextCtrl55 = new wxTextCtrl( itemWizardPageSimple49, ID_TEXTCTRL14, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00573 itemBoxSizer53->Add(itemTextCtrl55, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00574 00575 wxBoxSizer* itemBoxSizer56 = new wxBoxSizer(wxHORIZONTAL); 00576 itemBoxSizer52->Add(itemBoxSizer56, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); 00577 00578 wxStaticText* itemStaticText57 = new wxStaticText( itemWizardPageSimple49, wxID_STATIC, _("Column Size"), wxDefaultPosition, wxDefaultSize, 0 ); 00579 itemBoxSizer56->Add(itemStaticText57, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00580 00581 wxTextCtrl* itemTextCtrl58 = new wxTextCtrl( itemWizardPageSimple49, ID_TEXTCTRL15, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); 00582 itemBoxSizer56->Add(itemTextCtrl58, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00583 00584 wxGrid* itemGrid59 = new wxGrid( itemWizardPageSimple49, ID_GRID2, wxDefaultPosition, wxSize(200, 150), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); 00585 itemGrid59->SetDefaultColSize(50); 00586 itemGrid59->SetDefaultRowSize(25); 00587 itemGrid59->SetColLabelSize(25); 00588 itemGrid59->SetRowLabelSize(50); 00589 itemGrid59->CreateGrid(5, 5, wxGrid::wxGridSelectCells); 00590 itemFlexGridSizer50->Add(itemGrid59, 0, wxGROW|wxGROW|wxALL, 5); 00591 00592 wxGrid* itemGrid60 = new wxGrid( itemWizardPageSimple49, ID_GRID4, wxDefaultPosition, wxSize(200, 150), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); 00593 itemGrid60->SetDefaultColSize(50); 00594 itemGrid60->SetDefaultRowSize(25); 00595 itemGrid60->SetColLabelSize(25); 00596 itemGrid60->SetRowLabelSize(50); 00597 itemGrid60->CreateGrid(1, 3, wxGrid::wxGridSelectCells); 00598 itemFlexGridSizer50->Add(itemGrid60, 0, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxALL, 5); 00599 00600 wxBoxSizer* itemBoxSizer61 = new wxBoxSizer(wxHORIZONTAL); 00601 itemFlexGridSizer50->Add(itemBoxSizer61, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00602 00603 wxButton* itemButton62 = new wxButton( itemWizardPageSimple49, ID_BUTTON15, _("Add Command"), wxDefaultPosition, wxDefaultSize, 0 ); 00604 itemBoxSizer61->Add(itemButton62, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00605 00606 wxButton* itemButton63 = new wxButton( itemWizardPageSimple49, ID_BUTTON16, _("Delete Command"), wxDefaultPosition, wxDefaultSize, 0 ); 00607 itemBoxSizer61->Add(itemButton63, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00608 00609 wxCollapsiblePane* itemCollapsiblePane64 = new wxCollapsiblePane( itemWizardPageSimple49, ID_COLLAPSIBLEPANE4, _("Label"), wxDefaultPosition, wxDefaultSize, wxCP_DEFAULT_STYLE ); 00610 itemFlexGridSizer50->Add(itemCollapsiblePane64, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00611 00612 wxFlexGridSizer* itemFlexGridSizer65 = new wxFlexGridSizer(0, 1, 0, 0); 00613 itemCollapsiblePane64->GetPane()->SetSizer(itemFlexGridSizer65); 00614 00615 wxStaticText* itemStaticText66 = new wxStaticText( itemCollapsiblePane64->GetPane(), wxID_STATIC, _("Display Attributes"), wxDefaultPosition, wxDefaultSize, 0 ); 00616 itemFlexGridSizer65->Add(itemStaticText66, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00617 00618 wxArrayString itemListBox67Strings; 00619 wxListBox* itemListBox67 = new wxListBox( itemCollapsiblePane64->GetPane(), ID_LISTBOX3, wxDefaultPosition, wxDefaultSize, itemListBox67Strings, wxLB_SINGLE ); 00620 itemFlexGridSizer65->Add(itemListBox67, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00621 00622 wxGrid* itemGrid68 = new wxGrid( itemCollapsiblePane64->GetPane(), ID_GRID5, wxDefaultPosition, wxSize(300, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); 00623 itemGrid68->SetDefaultColSize(100); 00624 itemGrid68->SetDefaultRowSize(40); 00625 itemGrid68->SetColLabelSize(25); 00626 itemGrid68->SetRowLabelSize(50); 00627 itemGrid68->CreateGrid(1, 2, wxGrid::wxGridSelectCells); 00628 itemFlexGridSizer65->Add(itemGrid68, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00629 00630 wxBoxSizer* itemBoxSizer69 = new wxBoxSizer(wxHORIZONTAL); 00631 itemFlexGridSizer65->Add(itemBoxSizer69, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); 00632 00633 wxButton* itemButton70 = new wxButton( itemCollapsiblePane64->GetPane(), ID_BUTTON17, _("Add Attribute"), wxDefaultPosition, wxDefaultSize, 0 ); 00634 itemBoxSizer69->Add(itemButton70, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00635 00636 wxButton* itemButton71 = new wxButton( itemCollapsiblePane64->GetPane(), ID_BUTTON18, _("Delete Attribute"), wxDefaultPosition, wxDefaultSize, 0 ); 00637 itemBoxSizer69->Add(itemButton71, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); 00638 00640 } 00641 00642 00643 /* 00644 * Should we show tooltips? 00645 */ 00646 00647 bool WizardPage2::ShowToolTips() 00648 { 00649 return true; 00650 } 00651 00652 /* 00653 * Get bitmap resources 00654 */ 00655 00656 wxBitmap WizardPage2::GetBitmapResource( const wxString& name ) 00657 { 00658 // Bitmap retrieval 00660 wxUnusedVar(name); 00661 return wxNullBitmap; 00663 } 00664 00665 /* 00666 * Get icon resources 00667 */ 00668 00669 wxIcon WizardPage2::GetIconResource( const wxString& name ) 00670 { 00671 // Icon retrieval 00673 wxUnusedVar(name); 00674 return wxNullIcon; 00676 } 00677 00678 00679 /* 00680 * wxEVT_COMMAND_COLLPANE_CHANGED event handler for ID_COLLAPSIBLEPANE4 00681 */ 00682 00683 void WizardPage2::OnCollapsiblepane4PaneChanged( wxCollapsiblePaneEvent& event ) 00684 { 00686 // Before editing this code, remove the block markers. 00687 event.Skip(); 00689 } 00690 00691 00692 /* 00693 * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE 00694 */ 00695 00696 void WizardPage::OnBrowseClick( wxCommandEvent& event ) 00697 { 00698 wxFileDialog * filedialog = new wxFileDialog(this, wxT("Choose a file(s) to use for data. If multiple files then please choose 3 that correspond to one data."), wxT(""), wxT("*"), wxT("*"), wxOPEN|wxFILE_MUST_EXIST|wxMULTIPLE, wxDefaultPosition, wxDefaultSize, wxT("Open")); 00699 if( filedialog->ShowModal() == wxID_CANCEL ){ delete filedialog; return;} 00700 00701 wxArrayString tempTwo; 00702 filedialog->GetPaths(tempTwo); 00703 wxString tempThree; 00704 for(wxArrayString::iterator i = tempTwo.begin(); i != tempTwo.end(); i++) { 00705 tempThree.Append(wxString(i->c_str(), wxConvUTF8)); 00706 tempThree.Append(wxT(";")); 00707 } 00708 wxString::iterator semiColonErase = tempThree.end(); 00709 semiColonErase--; 00710 tempThree.erase(semiColonErase,tempThree.end()); 00711 m_browseText->SetValue(tempThree ); 00712 00713 delete filedialog; 00715 // Before editing this code, remove the block markers. 00716 event.Skip(); 00718 } 00719