33 #include <wx/statline.h>
34 #include <wx/spinctrl.h>
35 #include <wx/notebook.h>
36 #include <wx/listctrl.h>
83 breakpointList_(NULL),
86 createContents(
this,
true,
true);
88 breakpointList_->InsertColumn(0, _T(
"Handle"), wxLIST_FORMAT_LEFT, 100);
89 breakpointList_->InsertColumn(1, _T(
"Enabled"), wxLIST_FORMAT_CENTER, 80);
90 breakpointList_->InsertColumn(2, _T(
"Address"), wxLIST_FORMAT_LEFT, 300);
92 watchList_->InsertColumn(0, _T(
"Handle"), wxLIST_FORMAT_LEFT, 100);
93 watchList_->InsertColumn(1, _T(
"Enabled"), wxLIST_FORMAT_CENTER, 80);
94 watchList_->InsertColumn(2, _T(
"Expression"), wxLIST_FORMAT_LEFT, 300);
109 FindWindow(ID_BREAKPOINT_PROPERTIES)->Disable();
129 GetParent()->Close();
141 -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
148 wxGetApp().simulation()->frontend()->stopPointManager();
174 -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
181 wxGetApp().simulation()->frontend()->stopPointManager();
206 if (frontend == NULL ||
234 if (breakpoint != NULL) {
237 std::pair<unsigned, unsigned>(bpRow, handle));
254 const Watch* watch =
dynamic_cast<const Watch*
>(stoppoint);
259 std::pair<unsigned, unsigned>(watchRow, handle));
285 -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
292 wxGetApp().simulation()->frontend()->stopPointManager();
347 -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
354 wxGetApp().simulation()->frontend()->stopPointManager();
368 -1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
375 wxGetApp().simulation()->frontend()->stopPointManager();
380 unsigned address = breakpoint.
address();
399 wxString message = _T(
"Simulation not initialized.");
418 if (dialog.ShowModal() == wxID_OK) {
423 wxString message = _T(
"Simulation not initialized.");
435 wxWindow *parent,
bool call_fit,
bool set_sizer) {
437 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
439 wxNotebook *item2 =
new wxNotebook( parent,
ID_NOTEBOOK, wxDefaultPosition, wxSize(600,450), 0 );
440 #if !wxCHECK_VERSION(2,5,2)
441 wxNotebookSizer *item1 =
new wxNotebookSizer( item2 );
443 wxWindow *item1 = item2;
446 wxPanel *item3 =
new wxPanel( item2, -1 );
448 item2->AddPage( item3, wxT(
"Breakpoints") );
450 wxPanel *item4 =
new wxPanel( item2, -1 );
452 item2->AddPage( item4, wxT(
"Watches") );
454 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
456 wxStaticLine *item5 =
new wxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
457 item0->Add( item5, 0, wxGROW|wxALL, 5 );
459 wxGridSizer *item6 =
new wxGridSizer( 2, 0, 0 );
461 wxButton *item7 =
new wxButton( parent,
ID_HELP, wxT(
"&Help"), wxDefaultPosition, wxDefaultSize, 0 );
462 item6->Add( item7, 0, wxALL, 5 );
464 wxButton *item8 =
new wxButton( parent,
ID_CLOSE, wxT(
"&Close"), wxDefaultPosition, wxDefaultSize, 0 );
465 item6->Add( item8, 0, wxALIGN_RIGHT|wxALL, 5 );
467 item0->Add( item6, 0, wxGROW|wxALL, 5 );
471 parent->SetSizer( item0 );
473 item0->SetSizeHints( parent );
484 wxWindow *parent,
bool call_fit,
bool set_sizer) {
486 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
488 wxBoxSizer *item1 =
new wxBoxSizer( wxHORIZONTAL );
490 wxBoxSizer *item2 =
new wxBoxSizer( wxVERTICAL );
492 wxButton *item3 =
new wxButton( parent,
ID_BREAKPOINT_PROPERTIES, wxT(
"Properties..."), wxDefaultPosition, wxDefaultSize, 0 );
493 item2->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
495 wxButton *item4 =
new wxButton( parent,
ID_LOOKUP_BREAKPOINT, wxT(
"Lookup"), wxDefaultPosition, wxDefaultSize, 0 );
496 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
498 wxButton *item5 =
new wxButton( parent,
ID_DELETE_BREAKPOINT, wxT(
"Delete"), wxDefaultPosition, wxDefaultSize, 0 );
499 item2->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
501 wxCheckBox *item6 =
new wxCheckBox( parent,
ID_BREAKPOINT_ENABLED, wxT(
"Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
502 item2->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
504 item1->Add( item2, 0, wxALL, 5 );
509 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
511 wxButton *item8 =
new wxButton( parent,
ID_ADD_BREAKPOINT, wxT(
"Add breakpoint..."), wxDefaultPosition, wxDefaultSize, 0 );
512 item0->Add( item8, 0, wxALL, 5 );
516 parent->SetSizer( item0 );
518 item0->SetSizeHints( parent );
529 wxWindow *parent,
bool call_fit,
bool set_sizer) {
531 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
533 wxBoxSizer *item1 =
new wxBoxSizer( wxHORIZONTAL );
535 wxBoxSizer *item2 =
new wxBoxSizer( wxVERTICAL );
537 wxButton *item3 =
new wxButton( parent,
ID_WATCH_PROPERTIES, wxT(
"Properties..."), wxDefaultPosition, wxDefaultSize, 0 );
538 item2->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
540 wxButton *item4 =
new wxButton( parent,
ID_DELETE_WATCH, wxT(
"Delete"), wxDefaultPosition, wxDefaultSize, 0 );
541 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
543 wxCheckBox *item5 =
new wxCheckBox( parent,
ID_WATCH_ENABLED, wxT(
"Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
544 item2->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
546 item1->Add( item2, 0, wxALL, 5 );
548 watchList_ =
new wxListCtrl( parent,
ID_WATCH_LIST, wxDefaultPosition, wxSize(400,300), wxLC_REPORT|wxSUNKEN_BORDER );
549 item1->Add(
watchList_, 0, wxALIGN_CENTER|wxALL, 5 );
551 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
553 wxButton *item7 =
new wxButton( parent,
ID_ADD_WATCH, wxT(
"Add watch..."), wxDefaultPosition, wxDefaultSize, 0 );
554 item0->Add( item7, 0, wxALL, 5 );
558 parent->SetSizer( item0 );
560 item0->SetSizeHints( parent );