Changeset 1563 for GTP/trunk/Lib/Vis/Preprocessing/FrontEnd
- Timestamp:
- 10/03/06 22:03:58 (18 years ago)
- Location:
- GTP/trunk/Lib/Vis/Preprocessing/FrontEnd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/FrontEnd/preprocessorFrontEnd.cpp
r1558 r1563 31 31 IMPLEMENT_APP(MyApp) 32 32 33 33 34 bool MyApp::OnInit() 34 35 { 35 36 // Create the main window 36 MyFrame *frame = new MyFrame( wxT("Notebook sample"));37 MyFrame *frame = new MyFrame(wxT("Preprocessor Frontend")); 37 38 38 39 // Problem with generic wxNotebook implementation whereby it doesn't size 39 40 // properly unless you set the size again 40 #if defined(__WXMOTIF__) 41 //#if defined(__WXMOTIF__) 42 // frame->SetSize(wxDefaultCoord, wxDefaultCoord, 1024, 768); 41 43 int width, height; 42 frame->GetSize(& width, &height);44 frame->GetSize(&width, &height); 43 45 frame->SetSize(wxDefaultCoord, wxDefaultCoord, width, height); 44 #endif46 //#endif 45 47 46 48 frame->Show(); … … 49 51 } 50 52 51 wxPanel *CreateUserCreatedPage(wxBookCtrlBase *parent) 53 54 wxPanel *MyFrame::CreateUserCreatedPage(wxBookCtrlBase *parent) 52 55 { 53 56 wxPanel *panel = new wxPanel(parent); 54 57 55 (void) new wxButton( 56 wxPoint(10, 10), wxDefaultSize 58 (void) new wxButton(panel, wxID_ANY, wxT("Button"), 59 wxPoint(10, 10), wxDefaultSize); 57 60 58 61 return panel; 59 62 } 60 63 61 wxPanel *CreateRadioButtonsPage(wxBookCtrlBase *parent) 64 65 wxPanel *MyFrame::CreatePreprocessorPage(wxBookCtrlBase *parent) 62 66 { 63 67 wxPanel *panel = new wxPanel(parent); 64 68 65 wxString animals[] = { wxT("Fox"), wxT("Hare"), wxT("Rabbit"), 66 wxT("Sabre-toothed tiger"), wxT("T Rex") }; 67 68 wxRadioBox *radiobox1 = new wxRadioBox(panel, wxID_ANY, wxT("Choose one"), 69 wxDefaultPosition, wxDefaultSize, 5, animals, 2, wxRA_SPECIFY_ROWS); 70 71 wxString computers[] = { wxT("Amiga"), wxT("Commodore 64"), wxT("PET"), 72 wxT("Another") }; 73 74 wxRadioBox *radiobox2 = new wxRadioBox(panel, wxID_ANY, 75 wxT("Choose your favourite"), wxDefaultPosition, wxDefaultSize, 76 4, computers, 0, wxRA_SPECIFY_COLS); 69 wxString preprocessorType[] = {wxT("Rss"), wxT("Gvs"), wxT("None")}; 70 71 wxRadioBox *radiobox1 = new wxRadioBox(panel, wxID_ANY, wxT("Choose preprocessor type"), 72 wxDefaultPosition, wxDefaultSize, 3, preprocessorType, 1, wxRA_SPECIFY_ROWS); 73 74 mDetectEmptyViewSpaceText = new wxTextCtrl(panel, wxID_ANY, "detect emtpy view space", 75 wxDefaultPosition, wxDefaultSize); 76 77 //mDetectEmptyViewSpaceCheckBox = new wxCheckBox(panel, wxID_ANY); 77 78 78 79 wxBoxSizer *sizerPanel = new wxBoxSizer(wxVERTICAL); 79 sizerPanel->Add(radiobox1, 2, wxEXPAND); 80 sizerPanel->Add(radiobox2, 1, wxEXPAND); 80 sizerPanel->Add(radiobox1, 1, wxEXPAND); 81 sizerPanel->Add(mDetectEmptyViewSpaceText, 1); 82 sizerPanel->Add(mDetectEmptyViewSpaceCheckBox, 1); 83 81 84 panel->SetSizer(sizerPanel); 82 85 … … 84 87 } 85 88 86 wxPanel *CreateVetoPage(wxBookCtrlBase *parent) 89 90 wxPanel *MyFrame::CreateViewCellsPage(wxBookCtrlBase *parent) 91 { 92 wxPanel *panel = new wxPanel(parent); 93 94 wxString viewSpaceHierarchy[] = {wxT("vspBsp"), wxT("vspOsp"), wxT("bsp")}; 95 96 wxRadioBox *radiobox1 = new wxRadioBox(panel, wxID_ANY, wxT("Choose view space hierarchy type"), 97 wxDefaultPosition, wxDefaultSize, 3, viewSpaceHierarchy, 1, wxRA_SPECIFY_ROWS); 98 99 wxBoxSizer *sizerPanel = new wxBoxSizer(wxVERTICAL); 100 sizerPanel->Add(radiobox1, 1, wxEXPAND); 101 panel->SetSizer(sizerPanel); 102 103 return panel; 104 } 105 106 107 /*wxPanel *CreateVetoPage(wxBookCtrlBase *parent) 87 108 { 88 109 wxPanel *panel = new wxPanel(parent); … … 92 113 93 114 return panel; 94 } 95 96 wxPanel *CreateBigButtonPage(wxBookCtrlBase *parent) 97 { 98 wxPanel *panel = new wxPanel(parent); 99 100 wxButton *buttonBig = new wxButton(panel, wxID_ANY, wxT("Maximized button")); 101 102 wxBoxSizer *sizerPanel = new wxBoxSizer(wxVERTICAL); 103 sizerPanel->Add(buttonBig, 1, wxEXPAND); 104 panel->SetSizer(sizerPanel); 105 106 return panel; 107 } 108 109 110 wxPanel *CreateInsertPage(wxBookCtrlBase *parent) 115 }*/ 116 117 118 /*wxPanel *CreateInsertPage(wxBookCtrlBase *parent) 111 119 { 112 120 wxPanel *panel = new wxPanel(parent); … … 117 125 118 126 return panel; 119 } 127 }*/ 128 120 129 121 130 int GetIconIndex(wxBookCtrlBase* bookCtrl) … … 133 142 } 134 143 135 void CreateInitialPages(wxBookCtrlBase *parent) 144 145 void MyFrame::CreateInitialPages(wxBookCtrlBase *parent) 136 146 { 137 147 // Create and add some panels to the notebook 138 139 wxPanel *panel = CreateRadioButtonsPage(parent); 140 parent->AddPage( panel, RADIOBUTTONS_PAGE_NAME, false, GetIconIndex(parent) ); 141 142 panel = CreateVetoPage(parent); 143 parent->AddPage( panel, VETO_PAGE_NAME, false, GetIconIndex(parent) ); 144 145 panel = CreateBigButtonPage(parent); 146 parent->AddPage( panel, MAXIMIZED_BUTTON_PAGE_NAME, false, GetIconIndex(parent) ); 147 148 panel = CreateInsertPage(parent); 149 parent->InsertPage( 0, panel, I_WAS_INSERTED_PAGE_NAME, false, GetIconIndex(parent) ); 148 wxPanel *panel = CreatePreprocessorPage(parent); 149 parent->AddPage(panel, PREPROCESSOR_PAGE_NAME, false, GetIconIndex(parent)); 150 151 panel = CreateViewCellsPage(parent); 152 parent->AddPage(panel, VIEWCELLS_PAGE_NAME, false, GetIconIndex(parent)); 153 154 //panel = CreateVetoPage(parent); 155 //parent->AddPage( panel, VETO_PAGE_NAME, false, GetIconIndex(parent) ); 156 157 //panel = CreateInsertPage(parent); 158 //parent->InsertPage( 0, panel, I_WAS_INSERTED_PAGE_NAME, false, GetIconIndex(parent) ); 150 159 151 160 parent->SetSelection(1); 152 161 } 153 162 154 wxPanel *CreatePage(wxBookCtrlBase *parent, const wxString&pageName) 155 { 156 if 157 ( 158 pageName.Contains(INSERTED_PAGE_NAME) 159 || pageName.Contains(ADDED_PAGE_NAME) 160 ) 161 { 162 return CreateUserCreatedPage(parent); 163 } 164 165 if (pageName == I_WAS_INSERTED_PAGE_NAME) 166 { 167 return CreateInsertPage(parent); 168 } 169 170 if (pageName == VETO_PAGE_NAME) 171 { 172 return CreateVetoPage(parent); 173 } 174 175 if (pageName == RADIOBUTTONS_PAGE_NAME) 176 { 177 return CreateRadioButtonsPage(parent); 178 } 179 180 181 if (pageName == MAXIMIZED_BUTTON_PAGE_NAME) 182 { 183 return CreateBigButtonPage(parent); 163 164 wxPanel *MyFrame::CreatePage(wxBookCtrlBase *parent, const wxString&pageName) 165 { 166 167 if (pageName == VIEWCELLS_PAGE_NAME) 168 { 169 return CreateViewCellsPage(parent); 170 } 171 172 if (pageName == PREPROCESSOR_PAGE_NAME) 173 { 174 return CreatePreprocessorPage(parent); 184 175 } 185 176 … … 189 180 } 190 181 191 MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, 182 MyFrame::MyFrame(const wxString& title, 183 const wxPoint& pos, 184 const wxSize& size, 192 185 long style) 193 186 : wxFrame((wxWindow *) NULL, wxID_ANY, title, pos, size, style) 194 187 { 195 188 #if wxUSE_NOTEBOOK 196 m _type = ID_BOOK_NOTEBOOK;189 mType = ID_BOOK_NOTEBOOK; 197 190 #elif wxUSE_CHOICEBOOK 198 m _type = ID_BOOK_CHOICEBOOK;191 mType = ID_BOOK_CHOICEBOOK; 199 192 #elif wxUSE_LISTBOOK 200 m _type = ID_BOOK_LISTBOOK;193 mType = ID_BOOK_LISTBOOK; 201 194 #elif 202 195 #error "Don't use Notebook sample without any book enabled in wxWidgets build!" 203 196 #endif 204 197 205 m _orient = ID_ORIENT_DEFAULT;206 m _chkShowImages = true;207 m _multi = false;198 mOrient = ID_ORIENT_DEFAULT; 199 mChkShowImages = true; 200 mMulti = false; 208 201 209 202 SetIcon(wxICON(sample)); … … 212 205 wxMenu *menuType = new wxMenu; 213 206 #if wxUSE_NOTEBOOK 214 menuType->AppendRadioItem(ID_BOOK_NOTEBOOK, 207 menuType->AppendRadioItem(ID_BOOK_NOTEBOOK, wxT("&Notebook\tCtrl-1")); 215 208 #endif 216 209 #if wxUSE_LISTBOOK 217 menuType->AppendRadioItem(ID_BOOK_LISTBOOK, 210 menuType->AppendRadioItem(ID_BOOK_LISTBOOK, wxT("&Listbook\tCtrl-2")); 218 211 #endif 219 212 #if wxUSE_CHOICEBOOK 220 213 menuType->AppendRadioItem(ID_BOOK_CHOICEBOOK, wxT("&Choicebook\tCtrl-3")); 221 214 #endif 222 menuType->Check(m_type, true); 215 216 menuType->Check(mType, true); 223 217 224 218 wxMenu *menuOrient = new wxMenu; … … 243 237 menuFile->AppendSeparator(); 244 238 menuFile->Append(wxID_EXIT, wxT("E&xit"), wxT("Quits the application")); 245 menuFile->Check(ID_SHOW_IMAGES, m _chkShowImages);246 menuFile->Check(ID_MULTI, m _multi);239 menuFile->Check(ID_SHOW_IMAGES, mChkShowImages); 240 menuFile->Check(ID_MULTI, mMulti); 247 241 248 242 wxMenuBar *menuBar = new wxMenuBar; … … 253 247 // books creation 254 248 255 m _panel = (wxPanel *)NULL;249 mPanel = (wxPanel *) NULL; 256 250 #if wxUSE_NOTEBOOK 257 m _notebook = (wxNotebook *)NULL;251 mNotebook = (wxNotebook *) NULL; 258 252 #endif 259 253 #if wxUSE_CHOICEBOOK 260 m _choicebook = (wxChoicebook *) NULL;254 mChoicebook = (wxChoicebook *) NULL; 261 255 #endif 262 256 #if wxUSE_LISTBOOK 263 m _listbook = (wxListbook *)NULL;257 mListbook = (wxListbook *) NULL; 264 258 #endif 265 259 … … 267 261 wxSize imageSize(32, 32); 268 262 269 m _imageList263 mImageList 270 264 = new wxImageList( imageSize.GetWidth(), imageSize.GetHeight() ); 271 265 272 m _imageList->Add266 mImageList->Add 273 267 ( 274 268 wxArtProvider::GetIcon(wxART_INFORMATION, wxART_OTHER, imageSize) 275 269 ); 276 270 277 m _imageList->Add271 mImageList->Add 278 272 ( 279 273 wxArtProvider::GetIcon(wxART_QUESTION, wxART_OTHER, imageSize) 280 274 ); 281 275 282 m _imageList->Add276 mImageList->Add 283 277 ( 284 278 wxArtProvider::GetIcon(wxART_WARNING, wxART_OTHER, imageSize) 285 279 ); 286 280 287 m _imageList->Add281 mImageList->Add 288 282 ( 289 283 wxArtProvider::GetIcon(wxART_ERROR, wxART_OTHER, imageSize) 290 284 ); 291 285 292 m _panel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,286 mPanel = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 293 287 wxTAB_TRAVERSAL | wxCLIP_CHILDREN | wxNO_BORDER | wxNO_FULL_REPAINT_ON_RESIZE); 294 288 295 289 #if USE_LOG 296 m _text = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString,290 mText = new wxTextCtrl(mPanel, wxID_ANY, wxEmptyString, 297 291 wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY); 298 292 299 m _logTargetOld = wxLog::SetActiveTarget( new wxLogTextCtrl(m_text) );293 mLogTargetOld = wxLog::SetActiveTarget( new wxLogTextCtrl(mText) ); 300 294 #endif // USE_LOG 301 295 302 296 // Set sizers 303 m _sizerFrame = new wxBoxSizer(wxVERTICAL);297 mSizerFrame = new wxBoxSizer(wxVERTICAL); 304 298 305 299 #if USE_LOG 306 m _sizerFrame->Add(m_text, 1, wxEXPAND);300 mSizerFrame->Add(mText, 1, wxEXPAND); 307 301 #endif // USE_LOG 308 302 303 // create preprocessor front end 304 //mPreprocessorFrontEnd = new PreprocessorFrontEnd(); 309 305 RecreateBooks(); 310 311 m_panel->SetSizer(m_sizerFrame); 312 313 m_sizerFrame->Fit(this); 314 m_sizerFrame->SetSizeHints(this); 306 mPanel->SetSizer(mSizerFrame); 307 308 mSizerFrame->Fit(this); 309 mSizerFrame->SetSizeHints(this); 315 310 316 311 Centre(wxBOTH); 317 312 } 318 313 314 319 315 MyFrame::~MyFrame() 320 316 { 321 317 #if USE_LOG 322 delete wxLog::SetActiveTarget(m _logTargetOld);318 delete wxLog::SetActiveTarget(mLogTargetOld); 323 319 #endif // USE_LOG 324 320 325 if (m _imageList)326 { 327 delete m _imageList;328 m _imageList = (wxImageList *) NULL;321 if (mImageList) 322 { 323 delete mImageList; 324 mImageList = (wxImageList *) NULL; 329 325 } 330 326 } … … 347 343 #endif 348 344 349 #define RECREATE( wxBookType , idBook, oldBook , newBook )\345 #define RECREATE(wxBookType , idBook, oldBook, newBook) \ 350 346 { \ 351 347 int flags; \ 352 348 \ 353 switch ( m_orient )\349 switch (mOrient) \ 354 350 { \ 355 351 case ID_ORIENT_TOP: \ … … 372 368 flags = SelectFlag(idBook, wxNB_DEFAULT, wxLB_DEFAULT, wxCHB_DEFAULT); \ 373 369 } \ 374 375 if ( m_multi && ( idBook == ID_NOTEBOOK ) )\370 \ 371 if (mMulti && (idBook == ID_NOTEBOOK)) \ 376 372 flags |= wxNB_MULTILINE; \ 377 373 \ 378 374 wxBookType *oldBook = newBook; \ 379 375 \ 380 newBook = new wxBookType(m _panel, idBook,\376 newBook = new wxBookType(mPanel, idBook, \ 381 377 wxDefaultPosition, wxDefaultSize, \ 382 378 flags); \ 383 379 \ 384 if ( m_chkShowImages )\380 if (mChkShowImages) \ 385 381 { \ 386 newBook->SetImageList(m _imageList);\382 newBook->SetImageList(mImageList); \ 387 383 } \ 388 384 \ … … 400 396 } \ 401 397 \ 402 m _sizerFrame->Detach(oldBook);\398 mSizerFrame->Detach(oldBook); \ 403 399 \ 404 400 delete oldBook; \ … … 414 410 CreateInitialPages(newBook); \ 415 411 } \ 416 417 m_sizerFrame->Insert(0, newBook, 5, wxEXPAND | wxALL, MARGIN);\418 419 m_sizerFrame->Hide(newBook); \ 420 } 412 \ 413 mSizerFrame->Insert(0, newBook, 5, wxEXPAND | wxALL, MARGIN); \ 414 mSizerFrame->Hide(newBook); \ 415 } 416 421 417 422 418 void MyFrame::RecreateBooks() 423 419 { 424 420 #if wxUSE_NOTEBOOK 425 RECREATE( wxNotebook , ID_NOTEBOOK , notebook , m_notebook);421 RECREATE(wxNotebook, ID_NOTEBOOK, notebook, mNotebook); 426 422 #endif 427 423 #if wxUSE_LISTBOOK 428 RECREATE( wxListbook , ID_LISTBOOK , listbook , m_listbook);424 // RECREATE(wxListbook, ID_LISTBOOK, listbook, mListbook); 429 425 #endif 430 426 #if wxUSE_CHOICEBOOK 431 RECREATE( wxChoicebook , ID_CHOICEBOOK , choicebook , m_choicebook);427 RECREATE(wxChoicebook, ID_CHOICEBOOK, choicebook, mChoicebook); 432 428 #endif 433 429 … … 435 431 } 436 432 433 437 434 wxBookCtrlBase *MyFrame::GetCurrentBook() 438 435 { 439 switch (m _type)436 switch (mType) 440 437 { 441 438 #if wxUSE_NOTEBOOK 442 case ID_BOOK_NOTEBOOK: return m _notebook;439 case ID_BOOK_NOTEBOOK: return mNotebook; 443 440 #endif 444 441 #if wxUSE_LISTBOOK 445 case ID_BOOK_LISTBOOK: return m _listbook;442 case ID_BOOK_LISTBOOK: return mListbook; 446 443 #endif 447 444 #if wxUSE_CHOICEBOOK 448 case ID_BOOK_CHOICEBOOK: return m _choicebook;445 case ID_BOOK_CHOICEBOOK: return mChoicebook; 449 446 #endif 450 447 } … … 454 451 void MyFrame::ShowCurrentBook() 455 452 { 456 switch(m _type)453 switch(mType) 457 454 { 458 455 #if wxUSE_NOTEBOOK 459 case ID_BOOK_NOTEBOOK: if(m_notebook) m_sizerFrame->Show(m_notebook); break; 456 case ID_BOOK_NOTEBOOK: 457 if (mNotebook) 458 { 459 mSizerFrame->Show(mNotebook); 460 } 461 462 break; 460 463 #endif 461 464 #if wxUSE_LISTBOOK 462 case ID_BOOK_LISTBOOK: if(m_listbook) m_sizerFrame->Show(m_listbook); break; 465 case ID_BOOK_LISTBOOK: 466 if (mListbook) 467 { 468 mSizerFrame->Show(mListbook); 469 break; 470 } 463 471 #endif 464 472 #if wxUSE_CHOICEBOOK 465 case ID_BOOK_CHOICEBOOK: if(m_choicebook) m_sizerFrame->Show(m_choicebook); break; 466 #endif 467 } 468 469 m_sizerFrame->Layout(); 473 case ID_BOOK_CHOICEBOOK: 474 if (mChoicebook) 475 { 476 mSizerFrame->Show(mChoicebook); 477 break; 478 } 479 #endif 480 } 481 482 mSizerFrame->Layout(); 470 483 } 471 484 … … 507 520 wxBookCtrlBase *currBook = GetCurrentBook(); 508 521 509 m _type = event.GetId();522 mType = event.GetId(); 510 523 511 524 if (currBook) 512 m _sizerFrame->Hide(currBook);525 mSizerFrame->Hide(currBook); 513 526 514 527 ShowCurrentBook(); … … 517 530 void MyFrame::OnOrient(wxCommandEvent& event) 518 531 { 519 m _orient = event.GetId();532 mOrient = event.GetId(); 520 533 RecreateBooks(); 521 m _sizerFrame->Layout();534 mSizerFrame->Layout(); 522 535 } 523 536 524 537 void MyFrame::OnShowImages(wxCommandEvent& event) 525 538 { 526 m _chkShowImages = event.IsChecked();539 mChkShowImages = event.IsChecked(); 527 540 RecreateBooks(); 528 m _sizerFrame->Layout();541 mSizerFrame->Layout(); 529 542 } 530 543 531 544 void MyFrame::OnMulti(wxCommandEvent& event) 532 545 { 533 m _multi = event.IsChecked();546 mMulti = event.IsChecked(); 534 547 RecreateBooks(); 535 m _sizerFrame->Layout();548 mSizerFrame->Layout(); 536 549 wxLogMessage(_T("Multiline setting works only in wxNotebook.")); 537 550 } … … 548 561 wxBookCtrlBase *currBook = GetCurrentBook(); 549 562 550 if ( currBook ) 551 { 552 wxPanel *panel = new wxPanel( currBook, wxID_ANY ); 563 if (currBook) 564 { 565 wxPanel *panel = new wxPanel(currBook, wxID_ANY); 566 553 567 (void) new wxButton( panel, wxID_ANY, wxT("First button"), 554 568 wxPoint(10, 10), wxDefaultSize ); … … 556 570 wxPoint(50, 100), wxDefaultSize ); 557 571 558 currBook->AddPage(panel, wxString::Format(ADDED_PAGE_NAME wxT("%u"), 559 ++s_pageAdded), true, GetIconIndex(currBook) ); 560 } 561 } 572 currBook->AddPage( 573 panel, wxString::Format(ADDED_PAGE_NAME wxT("%u"), 574 ++ s_pageAdded), true, GetIconIndex(currBook) ); 575 } 576 } 577 562 578 563 579 void MyFrame::OnInsertPage(wxCommandEvent& WXUNUSED(event)) … … 567 583 wxBookCtrlBase *currBook = GetCurrentBook(); 568 584 569 if ( currBook)570 { 571 wxPanel *panel = CreateUserCreatedPage( currBook);585 if (currBook) 586 { 587 wxPanel *panel = CreateUserCreatedPage(currBook); 572 588 573 589 currBook->InsertPage( 0, panel, 574 wxString::Format(INSERTED_PAGE_NAME wxT("%u"), ++ s_pageIns), false,590 wxString::Format(INSERTED_PAGE_NAME wxT("%u"), ++ s_pageIns), false, 575 591 GetIconIndex(currBook) ); 576 592 … … 579 595 } 580 596 597 581 598 void MyFrame::OnDeleteCurPage(wxCommandEvent& WXUNUSED(event)) 582 599 { 583 600 wxBookCtrlBase *currBook = GetCurrentBook(); 584 601 585 if ( currBook)586 { 587 int sel = currBook->GetSelection();602 if (currBook) 603 { 604 const int sel = currBook->GetSelection(); 588 605 589 606 if (sel != wxNOT_FOUND) … … 600 617 if ( currBook ) 601 618 { 602 int page = currBook->GetPageCount();619 const int page = currBook->GetPageCount(); 603 620 604 621 if ( page != 0 ) … … 613 630 wxBookCtrlBase *currBook = GetCurrentBook(); 614 631 615 if ( currBook)632 if (currBook) 616 633 { 617 634 currBook->AdvanceSelection(); … … 643 660 644 661 wxString title; 645 title.Printf(wxT(" Notebook and friends(%d pages, selection: %s)"), nPages, selection.c_str());662 title.Printf(wxT("Preprocessor (%d pages, selection: %s)"), nPages, selection.c_str()); 646 663 647 664 SetTitle(title); … … 650 667 651 668 #if USE_LOG 652 #define BOOKEVENT_LOG m _text->SetInsertionPointEnd();669 #define BOOKEVENT_LOG mText->SetInsertionPointEnd(); 653 670 #else 654 671 #define BOOKEVENT_LOG -
GTP/trunk/Lib/Vis/Preprocessing/FrontEnd/preprocessorFrontEnd.h
r1558 r1563 29 29 DECLARE_APP(MyApp) 30 30 31 31 32 class MyFrame : public wxFrame 32 33 { 33 34 public: 34 MyFrame(const wxString& title, const wxPoint& pos = wxDefaultPosition, 35 const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE); 35 MyFrame(const wxString& title, 36 const wxPoint& pos = wxDefaultPosition, 37 const wxSize& size = wxDefaultSize, 38 long style = wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN | wxNO_FULL_REPAINT_ON_RESIZE); 36 39 37 40 virtual ~MyFrame(); … … 63 66 wxBookCtrlBase *GetCurrentBook(); 64 67 68 wxPanel *CreateUserCreatedPage(wxBookCtrlBase *parent); 69 wxPanel *CreatePreprocessorPage(wxBookCtrlBase *parent); 70 wxPanel *CreateViewCellsPage(wxBookCtrlBase *parent); 71 void CreateInitialPages(wxBookCtrlBase *parent); 72 wxPanel *CreatePage(wxBookCtrlBase *parent, const wxString&pageName); 73 65 74 private: 66 wxLog *m_logTargetOld;67 75 68 76 int SelectFlag(int id, int nb, int lb, int chb); … … 71 79 72 80 // Sample setup 73 int m _type;74 int m _orient;75 bool m _chkShowImages;76 bool m _multi;81 int mType; 82 int mOrient; 83 bool mChkShowImages; 84 bool mMulti; 77 85 86 wxLog *mLogTargetOld; 87 88 ///////// 78 89 // Controls 79 90 80 wxPanel *m_panel; // Panel containing notebook and other controls 91 /// Panel containing notebook and other controls 92 wxPanel *mPanel; 81 93 82 94 #if wxUSE_NOTEBOOK 83 wxNotebook *m _notebook;95 wxNotebook *mNotebook; 84 96 #endif 85 97 #if wxUSE_CHOICEBOOK 86 wxChoicebook *m _choicebook;98 wxChoicebook *mChoicebook; 87 99 #endif 88 100 #if wxUSE_LISTBOOK 89 wxListbook *m _listbook;101 wxListbook *mListbook; 90 102 #endif 91 103 92 104 #if USE_LOG 93 105 // Log window 94 wxTextCtrl *m _text;106 wxTextCtrl *mText; 95 107 #endif // USE_LOG 96 108 97 wxBoxSizer *m_sizerFrame; 109 wxTextCtrl *mDetectEmptyViewSpaceText; 110 wxCheckBox *mDetectEmptyViewSpaceCheckBox; 98 111 99 wxImageList *m_imageList; 112 wxBoxSizer *mSizerFrame; 113 wxImageList *mImageList; 100 114 101 115 DECLARE_EVENT_TABLE() … … 126 140 }; 127 141 142 143 /*class PreprocessorFrontEnd 144 { 145 wxPanel *CreateUserCreatedPage(wxBookCtrlBase *parent); 146 wxPanel *CreatePreprocessorPage(wxBookCtrlBase *parent); 147 wxPanel *CreateViewCellsPage(wxBookCtrlBase *parent); 148 149 MyFrame *mFrame; 150 }*/ 151 152 128 153 /* 129 154 Name of each notebook page. … … 131 156 to decide what type of page it is. 132 157 */ 158 #define PREPROCESSOR_PAGE_NAME wxT("Preprocessor") 159 #define VIEWCELLS_PAGE_NAME wxT("ViewCells") 133 160 134 161 #define I_WAS_INSERTED_PAGE_NAME wxT("Inserted") 135 #define RADIOBUTTONS_PAGE_NAME wxT("Radiobuttons")136 162 #define VETO_PAGE_NAME wxT("Veto") 137 163 #define MAXIMIZED_BUTTON_PAGE_NAME wxT("Maximized button") -
GTP/trunk/Lib/Vis/Preprocessing/FrontEnd/preprocessorFrontEnd.vcproj
r1558 r1563 92 92 Optimization="2" 93 93 InlineFunctionExpansion="1" 94 AdditionalIncludeDirectories=" $(WXWIN)\lib\vc_lib\msw,$(WXWIN)\include,.,$(WXWIN)\samples"94 AdditionalIncludeDirectories=""$(WXWIN)\lib\vc_lib\msw";"$(WXWIN)\include";.;"$(WXWIN)\samples"" 95 95 PreprocessorDefinitions="WIN32;__WXMSW__;_WINDOWS;NOPCH" 96 96 StringPooling="TRUE" … … 564 564 AdditionalOptions="/EHsc " 565 565 Optimization="0" 566 AdditionalIncludeDirectories=" $(WXWIN)\lib\vc_lib\mswd,$(WXWIN)\include,.,$(WXWIN)\samples"566 AdditionalIncludeDirectories=""$(WXWIN)\lib\vc_lib\mswd";"$(WXWIN)\include";.;"$(WXWIN)\samples";"$(WXWIN)\include\msvc"" 567 567 PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH" 568 568 BasicRuntimeChecks="3"
Note: See TracChangeset
for help on using the changeset viewer.