OpenASIP  2.0
ProximMainFrame.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2017 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file ProximMainFrame.cc
26  *
27  * Implementation of ProximMainFrame class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <wx/progdlg.h>
34 #include <boost/format.hpp>
35 
36 #include "ProximMainFrame.hh"
37 #include "ProximConstants.hh"
38 #include "ErrorDialog.hh"
39 #include "WarningDialog.hh"
40 #include "GUICommand.hh"
41 #include "Proxim.hh"
42 #include "WxConversion.hh"
43 #include "ContainerTools.hh"
44 #include "Exception.hh"
45 #include "ProximToolbox.hh"
46 #include "Environment.hh"
47 #include "FileSystem.hh"
48 #include "GUIOptions.hh"
49 
50 #include "ProximOpenMachineCmd.hh"
51 #include "ProximOpenProgramCmd.hh"
52 #include "ProximCDCmd.hh"
53 #include "ProximRunCmd.hh"
54 #include "ProximStepICmd.hh"
55 #include "ProximNextICmd.hh"
56 #include "ProximResumeCmd.hh"
57 #include "ProximKillCmd.hh"
58 #include "ProximQuitCmd.hh"
59 #include "ProximClearConsoleCmd.hh"
60 #include "ProximAboutCmd.hh"
64 #include "ProximOptionsCmd.hh"
65 #include "ProximExecuteFileCmd.hh"
69 #include "UserManualCmd.hh"
70 #include "ProximFindCmd.hh"
71 
72 #include "ConsoleWindow.hh"
74 #include "ProximMemoryWindow.hh"
75 #include "ProximRegisterWindow.hh"
76 #include "ProximControlWindow.hh"
77 #include "ProximPortWindow.hh"
80 #include "ProximSimulatorWindow.hh"
83 #include "ProximStopDialog.hh"
85 #include "MemorySystem.hh"
86 #include "ProximDebuggerWindow.hh"
87 
88 BEGIN_EVENT_TABLE(ProximMainFrame, wxFrame)
89  EVT_KEY_DOWN(ProximMainFrame::onKeyEvent)
90  EVT_CLOSE(ProximMainFrame::onClose)
92  ProximConstants::COMMAND_LAST,
93  ProximMainFrame::onCommandEvent)
94  EVT_MENU_RANGE(ProximConstants::COMMAND_TOGGLE_CONSOLE_WIN,
95  ProximConstants::COMMAND_TOGGLE_BREAKPOINT_WIN,
96  ProximMainFrame::onToggleWindow)
97  EVT_MENU(UserManualCmd::COMMAND_ID, ProximMainFrame::onCommandEvent)
98  EVT_COMMAND_RANGE(ProximConstants::COMMAND_FIRST,
99  ProximConstants::COMMAND_LAST,
100  wxEVT_COMMAND_BUTTON_CLICKED,
101  ProximMainFrame::onCommandEvent)
102  EVT_UPDATE_UI_RANGE(ProximConstants::COMMAND_FIRST,
103  ProximConstants::COMMAND_LAST,
104  ProximMainFrame::updateCommand)
105 
106  EVT_UPDATE_UI_RANGE(ProximConstants::COMMAND_TOGGLE_CONSOLE_WIN,
107  ProximConstants::COMMAND_TOGGLE_BREAKPOINT_WIN,
108  ProximMainFrame::updateToggleItem)
109 
110  EVT_SIMULATOR_START(0, ProximMainFrame::onSimulatorEvent)
111  EVT_SIMULATOR_STOP(0, ProximMainFrame::onSimulatorEvent)
112  EVT_SIMULATOR_RUN(0, ProximMainFrame::onSimulatorEvent)
113  EVT_SIMULATOR_OUTPUT(0, ProximMainFrame::onSimulatorEvent)
114  EVT_SIMULATOR_ERROR(0, ProximMainFrame::onSimulatorEvent)
115  EVT_SIMULATOR_COMMAND(0, ProximMainFrame::onSimulatorEvent)
116  EVT_SIMULATOR_COMMAND_DONE(0, ProximMainFrame::onSimulatorEvent)
117  EVT_SIMULATOR_LOADING_PROGRAM(0, ProximMainFrame::onSimulatorEvent)
118  EVT_SIMULATOR_PROGRAM_LOADED(0, ProximMainFrame::onSimulatorEvent)
119  EVT_SIMULATOR_LOADING_MACHINE(0, ProximMainFrame::onSimulatorEvent)
120  EVT_SIMULATOR_MACHINE_LOADED(0, ProximMainFrame::onSimulatorEvent)
121  EVT_SIMULATOR_RUNTIME_ERROR(0, ProximMainFrame::onSimulatorEvent)
122  EVT_SIMULATOR_RUNTIME_WARNING(0, ProximMainFrame::onSimulatorEvent)
123  EVT_SIMULATOR_TERMINATED(0, ProximMainFrame::onSimulatorTerminated)
126 
127 /**
128  * The constructor.
129  *
130  * @param title Frame title.
131  * @param pos Frame position on screen.
132  * @param size Frame size.
133  */
135  const wxString& title,
136  const wxPoint& pos,
137  const wxSize& size):
138  wxFrame((wxFrame*)NULL, -1, title, pos, size),
139  topSplitter_(NULL), toolbar_(NULL), stopDialogInstantiated_(false),
140  isReset_(false) {
141 
142  CommandRegistry& cmdRegistry = wxGetApp().commandRegistry();
143  cmdRegistry.addCommand(new ProximOpenMachineCmd());
144  cmdRegistry.addCommand(new ProximOpenProgramCmd());
145  cmdRegistry.addCommand(new ProximCDCmd());
146  cmdRegistry.addCommand(new ProximRunCmd());
147  cmdRegistry.addCommand(new ProximStepICmd());
148  cmdRegistry.addCommand(new ProximNextICmd());
149  cmdRegistry.addCommand(new ProximResumeCmd());
150  cmdRegistry.addCommand(new ProximKillCmd());
151  cmdRegistry.addCommand(new ProximQuitCmd());
152  cmdRegistry.addCommand(new ProximClearConsoleCmd());
153  cmdRegistry.addCommand(new ProximAboutCmd());
154  cmdRegistry.addCommand(new ProximNewPortWindowCmd());
155  cmdRegistry.addCommand(new ProximNewRegisterWindowCmd());
156  cmdRegistry.addCommand(new ProximSimulatorSettingsCmd());
157  cmdRegistry.addCommand(new ProximOptionsCmd());
158  cmdRegistry.addCommand(new ProximExecuteFileCmd());
159  cmdRegistry.addCommand(new HighlightTopExecCountsCmd());
160  cmdRegistry.addCommand(new HighlightExecPercentageCmd());
161  cmdRegistry.addCommand(new ClearDisassemblyHighlightCmd());
162  cmdRegistry.addCommand(new UserManualCmd());
163  cmdRegistry.addCommand(new ProximFindCmd());
164 
165  resetMutex_ = new wxMutex();
166  resetCondition_ = new wxCondition(*resetMutex_);
167 
168  initialize();
169 
170 }
171 
172 
173 /**
174  * The destructor.
175  */
177  delete resetCondition_;
178 }
179 
180 
181 /**
182  * Initializes the frame instance.
183  *
184  * Creates the sizer managing the window layout, and creates an instance
185  * of the default windows.
186  */
187 void
189 
190  createMenubar();
191 
192  wxStatusBar* statusbar = CreateStatusBar();
193  int widths[3] = {-1, 200, 200};
194  statusbar->SetFieldsCount(3, widths);
195 
196  sizer_ = new wxBoxSizer(wxVERTICAL);
197 
200 
201  dockWindow(disasmWindow);
203  SetSizer(sizer_);
204 
205  createToolbar();
206 
207  SetSizeHints(400, 300);
208 }
209 
210 /**
211  * Closes the GUI when the simulator engine is terminated.
212  */
213 void
215  Destroy();
216 }
217 
218 
219 /**
220  * Creates the proxim main frame menubar.
221  */
222 void
224 
225  wxMenu* fileMenu = new wxMenu();
226  wxMenu* viewMenu = new wxMenu();
227  wxMenu* editMenu = new wxMenu();
228  wxMenu* commandMenu = new wxMenu();
229  wxMenu* sourceMenu = new wxMenu();
230  wxMenu* programMenu = new wxMenu();
231  wxMenu* dataMenu = new wxMenu();
232  wxMenu* helpMenu = new wxMenu();
233  wxMenu* highlightMenu = new wxMenu();
234 
235  // File menu
236  fileMenu->Append(
239  _T("Open &Machine...")));
240 
241  fileMenu->Append(
244  _T("Open &Program...")));
245 
246  fileMenu->Append(
249  _T("&Change Directory...")));
250 
251  fileMenu->AppendSeparator();
252 
253  fileMenu->Append(
256  _T("&Quit")));
257 
258  wxMenuBar* menuBar = new wxMenuBar;
259  menuBar->Append(fileMenu, _T("&File"));
260 
261  // View menu
262  viewMenu->AppendCheckItem(
264  _T("&Simulator Console"));
265 
266  viewMenu->AppendCheckItem(
268  _T("Program &Disassembly"));
269 
270  viewMenu->AppendCheckItem(
272  _T("&Memory Window"));
273 
274  viewMenu->AppendCheckItem(
276  _T("Simulator &Control"));
277 
278  viewMenu->AppendCheckItem(
280  _T("&Machine Window"));
281 
282  viewMenu->AppendCheckItem(
284  _T("&Breakpoint Window"));
285 
286  viewMenu->AppendCheckItem(
288  _T("&Debugger Window"));
289 
290  viewMenu->AppendSeparator();
291  viewMenu->Append(
294  _T("New &Register Window")));
295 
296  viewMenu->Append(
299  _T("New &Port Window")));
300 
301  viewMenu->Check(ProximConstants::COMMAND_TOGGLE_CONSOLE_WIN, true);
302  viewMenu->Check(ProximConstants::COMMAND_TOGGLE_DISASM_WIN, true);
303  viewMenu->Enable(ProximConstants::COMMAND_TOGGLE_CONSOLE_WIN, false);
304  viewMenu->Enable(ProximConstants::COMMAND_TOGGLE_DISASM_WIN, false);
305 
306  menuBar->Append(viewMenu, _T("&View"));
307 
308  editMenu->Append(
311  _T("Simulator Settings...")));
312 
313  editMenu->Append(
316  _T("Options...")));
317 
318  // Edit menu
319  menuBar->Append(editMenu, _T("&Edit"));
320 
321  // Command menu
322  commandMenu->Append(
325  _T("&Clear Console")));
326 
327  commandMenu->Append(
330  _T("&Execute File...")));
331 
332  commandMenu->Append(
335  _T("&Find in disassembly...")));
336 
337  commandMenu->AppendSeparator();
338  commandMenu->AppendCheckItem(
340  _T("Command &History Window"));
341 
342  menuBar->Append(commandMenu, _T("&Command"));
343 
344  // Source menu
345  menuBar->Append(sourceMenu, _T("&Source"));
346  sourceMenu->Append(17000, _T("&Profile Data"), highlightMenu);
347 
348  highlightMenu->Append(
352  _T("None")));
353 
354  highlightMenu->Append(
358  _T("Highlight Top Execution Counts")));
359 
360  highlightMenu->Append(
364  _T("Highlight Move Executions")));
365 
366  // Program menu
367  programMenu->Append(
369  menuAccelerator(ProximConstants::COMMAND_RUN).Prepend(_T("&Run")));
370 
371  programMenu->AppendSeparator();
372 
373  programMenu->Append(
376  _T("&Step Instruction")));
377 
378  programMenu->Append(
381  _T("&Next Instruction")));
382 
383  programMenu->Append(
386  _T("R&esume")));
387 
388  programMenu->AppendSeparator();
389  programMenu->Append(
391  menuAccelerator(ProximConstants::COMMAND_KILL).Prepend(_T("&Kill")));
392 
393  menuBar->Append(programMenu, _T("&Program"));
394 
395  // Data menu
396  menuBar->Append(dataMenu, _T("&Data"));
397 
398  // Help menu
399  helpMenu->Append(
402  _T("&User Manual...")));
403 
404  helpMenu->Append(
407  _T("&About...")));
408 
409  menuBar->Append(helpMenu, _T("&Help"));
410 
411  SetMenuBar(menuBar);
412 
414 }
415 
416 /**
417  * Creates the main frame toolbar.
418  */
419 void
421 
422  if (toolbar_ != NULL) {
423  delete toolbar_;
424  toolbar_ = NULL;
425  }
426 
427  CommandRegistry& registry = wxGetApp().commandRegistry();
428  GUIOptions& options = wxGetApp().options();
429  wxString iconPath = WxConversion::toWxString(Environment::iconDirPath());
430 
431  toolbar_ = options.createToolbar(this, registry, iconPath);
432 
433  SetToolBar(toolbar_);
434  toolbar_->Show(options.toolbarVisibility());
435 }
436 
437 
438 /**
439  * Returns a menu accelerator string for a command.
440  *
441  * The returned string can be appended to the menu item text to set the
442  * keyboard shortcut defined in the options for the command.
443  *
444  * @param id Command ID.
445  * @return Accelerator string.
446  */
447 wxString
449 
450  const CommandRegistry& reg = wxGetApp().commandRegistry();
451  const GUIOptions& options = wxGetApp().options();
452  std::string cmdName = reg.commandName(id);
453  const KeyboardShortcut* sc = options.keyboardShortcut(cmdName);
454 
455  if (sc != NULL) {
456  wxString accel = _T("\t");
457  if (sc->ctrl()) {
458  accel.Append(_T("Ctrl-"));
459  accel.Append(WxConversion::toWxString(sc->key()));
460  return accel;
461  } else if (sc->alt()) {
462  accel.Append(_T("Alt-"));
463  accel.Append(WxConversion::toWxString(sc->key()));
464  return accel;
465  } else if (sc->fKey() > 0) {
466  accel.Append(_T("F"));
467  accel.Append(WxConversion::toWxString(sc->fKey()));
468  return accel;
469  } else {
470  // Invalid shortcut.
471  return _T("");
472  }
473  }
474 
475  return _T("");
476 }
477 
478 
479 /**
480  * Handles command events from the menubar.
481  *
482  * Commands are handled using Proxim command registry. A command is
483  * requested from the registry with the command event ID. If a command
484  * is found in the registry, the command will be executed. Otherwise
485  * an errordialog is displayed.
486  *
487  * @param event Command event to handle.
488  */
489 void
490 ProximMainFrame::onCommandEvent(wxCommandEvent& event) {
491 
492  GUICommand* command =
493  wxGetApp().commandRegistry().createCommand(event.GetId());
494 
495  if (command == NULL) {
496  ErrorDialog dialog(
497  this, _T("No handler found for the command event"));
498  dialog.ShowModal();
499  return;
500  }
501 
502  command->setParentWindow(this);
503  command->Do();
504  delete command;
505 }
506 
507 
508 /**
509  * Docks a simulation subwindow to the mainframe.
510  *
511  * @param window Sub window to add.
512  */
513 void
514 ProximMainFrame::dockWindow(wxWindow* window) {
515 
516  // If the frame is empty, the window is added directly to the sizer
517  // w/o a splitterwindow.
518  if (topSplitter_ == NULL) {
519  topSplitter_ = window;
520  sizer_->Add(window);
521  return;
522  }
523 
524  // The frame already contained window(s). A new splitter window is created,
525  // and the old contents of the frame is set as the top half of the
526  // splitter window, and the new window as the bottom half of the
527  // splitter. Finally, the old contents of the frame is replaced with the
528  // new splitter window.
529  sizer_->Detach(topSplitter_);
530  wxSplitterWindow* newSplitter = new wxSplitterWindow(this, wxHORIZONTAL);
531  newSplitter->SetMinimumPaneSize(25);
532  window->Reparent(newSplitter);
533  topSplitter_->Reparent(newSplitter);
534  newSplitter->SplitHorizontally(topSplitter_, window);
535  topSplitter_ = newSplitter;
536  sizer_->Add(newSplitter, 1, wxGROW);
537  sizer_->Layout();
538  newSplitter->SetSashPosition(topSplitter_->GetSize().GetHeight() / 2);
539 }
540 
541 
542 
543 /**
544  * Handles simulator events.
545  *
546  * The events are passed to all subwindows registered as simulator listeners.
547  *
548  * @param event Simulator event to handle.
549  */
550 void
552 
554 
555  WXTYPE eventType = event.GetEventType();
556 
557  if (eventType == SimulatorEvent::EVT_SIMULATOR_COMMAND) {
558  wxSetCursor(*wxHOURGLASS_CURSOR);
559  wxString status = _T("Executing command '");
560  status.Append(WxConversion::toWxString(event.data()));
561  status.Append(_T("'."));
562  GetStatusBar()->SetStatusText(status);
563  GetMenuBar()->Disable();
564 
565  // If a toolbar button is disabled and re-enabled when a mouse cursor
566  // is over the button, the button can't be clicked until the cursor
567  // is moved away from the button and back over it. This prevents
568  // stepi button to work when clicked repeatedly. Stepi
569  // commands do not disable toolbar buttons when executed to avoid
570  // this problem.
571  std::string command = event.data();
572  if (command != ProximConstants::SCL_STEP_INSTRUCTION) {
573  GetToolBar()->Disable();
574  }
575  }
576 
578  wxSetCursor(*wxSTANDARD_CURSOR);
579  GetStatusBar()->SetStatusText(_T(""));
580  GetMenuBar()->Enable();
581 
582  std::string command = event.data();
583  // Kludge to make stepi button to work better. See comment
584  // in the previous if-clause.
585  if (command != ProximConstants::SCL_STEP_INSTRUCTION) {
586  GetToolBar()->Enable();
587  }
588  }
589 
591  wxString message = WxConversion::toWxString(event.data());
592  ErrorDialog dialog(this, message);
593  dialog.ShowModal();
594  }
595 
597  wxString message = WxConversion::toWxString(event.data());
598  WarningDialog dialog(this, message);
599  dialog.ShowModal();
600  }
601 
602  // Loading program.
604  wxString message = _T("Loading program... ");
605  message.Append(WxConversion::toWxString(event.data()));
606  GetStatusBar()->SetStatusText(message);
607  }
608 
609  // Program loaded
611  wxString message = _T("Program loaded.");
612  GetStatusBar()->SetStatusText(message);
614  }
615 
616  // Loading machine.
618  wxString message = _T("Loading machine... ");
619  message.Append(WxConversion::toWxString(event.data()));
620  GetStatusBar()->SetStatusText(message);
621  }
622 
623  // Machine loaded
625  wxString message = _T("Machine loaded.");
626  GetStatusBar()->SetStatusText(message);
627  }
628 
629  // Program is being simulated.
630  if (eventType == SimulatorEvent::EVT_SIMULATOR_RUN) {
631  // If an instance of stop dialog is already visible, do not create
632  // a new one.
635  wxString message = _T("Running simulation... ");
636  message.Append(WxConversion::toWxString(event.data()));
637  GetStatusBar()->SetStatusText(message);
638  ProximStopDialog dialog(this, -1, *ProximToolbox::frontend());
639  dialog.ShowModal();
640  stopDialogInstantiated_ = false;
641 
642  // Another workaround for a gtk-bug where button goes out of focus.
643  GetToolBar()->Show(false);
644  GetToolBar()->Show(true);
645  }
646  }
647 
648  for (unsigned i = 0; i < subwindows.size(); i++) {
649  wxWindow * window = subwindows[i];
650  wxPostEvent(window, event);
651  }
652 
653  // Update menus.
654  wxMenuBar* menubar = GetMenuBar();
655  for (unsigned i = 0; i < menubar->GetMenuCount(); i++) {
656  menubar->GetMenu(i)->UpdateUI();
657  }
658 }
659 
660 /**
661  * Adds a window to the list of subwindows to send the simulator events to.
662  *
663  * @param window Window to be added.
664  */
665 void
668  subwindows.push_back(window);
669  }
670 }
671 
672 /**
673  * Removes window from the list of subwindows to send the simulator events to.
674  *
675  * @param window Window to be removed.
676  */
677 void
680  std::string procName = "ProximMainFrame::removeSubWindow";
681  throw InstanceNotFound(__FILE__, __LINE__, procName);
682  }
683 }
684 
685 /**
686  * Event handler for View menu check items.
687  *
688  * @param event View menu event to handle.
689  */
690 void
691 ProximMainFrame::onToggleWindow(wxCommandEvent& event) {
692 
693  int id = event.GetId();
694 
695  switch (id) {
696 
698  // Toggle memory window.
699  wxWindow* memoryWindow = FindWindowById(ProximConstants::ID_MEMORY_WINDOW);
700  if (memoryWindow == NULL) {
701  memoryWindow = new ProximMemoryWindow(
704  memoryWindow, _T("Memory"), false, wxSize(620, 400));
705  } else {
706  memoryWindow->GetParent()->Destroy();
707  memoryWindow = NULL;
708  }
709  return;
710 
711  }
712 
714  // Toggle control window.
715  wxWindow* controlWindow =
716  FindWindowById(ProximConstants::ID_CONTROL_WINDOW);
717  if (controlWindow == NULL) {
718  controlWindow = new ProximControlWindow(
721  controlWindow, _T("Simulator control"), false);
722  } else {
723  controlWindow->GetParent()->Destroy();
724  controlWindow = NULL;
725  }
726  return;
727 
728  }
729 
731  // Toggle machine window.
732  wxWindow* machineWindow = FindWindowById(
734  if (machineWindow == NULL) {
735  machineWindow = new ProximMachineStateWindow(
738  machineWindow, _T("Simulated Machine"), false, wxSize(600,400));
739  } else {
740  machineWindow->GetParent()->Destroy();
741  machineWindow = NULL;
742  }
743  return;
744 
745  }
746 
748  // Toggle breakpoitn window.
749  wxWindow* breakpointWindow = FindWindowById(
751  if (breakpointWindow == NULL) {
752  breakpointWindow = new ProximBreakpointWindow(
755  breakpointWindow, _T("Breakpoints"), false);
756  } else {
757  breakpointWindow->GetParent()->Close();
758  breakpointWindow = NULL;
759  }
760  return;
761 
762  }
763 
765  // Toggle command history window.
766  wxWindow* historyWindow = FindWindowById(
768  if (historyWindow == NULL) {
769  historyWindow = new ProximCmdHistoryWindow(
773  historyWindow, _T("Command History"), false);
774  } else {
775  historyWindow->GetParent()->Close();
776  historyWindow = NULL;
777  }
778  return;
779 
780  }
781 
783  // Toggle command history window.
784  wxWindow* debuggerWindow = FindWindowById(
786  if (debuggerWindow == NULL) {
787  debuggerWindow = new ProximDebuggerWindow(
790  debuggerWindow, _T("Source code debugger"), false);
791  } else {
792  debuggerWindow->GetParent()->Close();
793  debuggerWindow = NULL;
794  }
795  return;
796 
797  }
798  }
799  event.Skip();
800 }
801 
802 
803 /**
804  * Event handler for wxUpdateUIEvents.
805  *
806  * Proxim updates buttons and menu items for command registry commands using
807  * wxUpdateUIEvents. When a wxUpdateUIEvent is received, command registry
808  * is searched for corresponding command ID. If a command is found, the
809  * UI element enabled or disabled according to the command's isEnabled()
810  * return value.
811  *
812  * @param event Upadate event to handle.
813  */
814 void
815 ProximMainFrame::updateCommand(wxUpdateUIEvent& event) {
816 
817  if (wxGetApp().simulation() == NULL) {
818  return;
819  }
820 
821  GUICommand* command =
822  wxGetApp().commandRegistry().createCommand(event.GetId());
823 
824  if (command != NULL) {
825  event.Enable(command->isEnabled());
826  delete command;
827  } else {
828  event.Enable(false);
829  }
830 }
831 
832 
833 /**
834  * Event handler which updates view-menu check item check-marks.
835  *
836  * When a wxUpdateUIEvent is received for view-menu check item, the
837  * main frame checks if corresponding subwindow exists and updates the
838  * menu item.
839  */
840 void
841 ProximMainFrame::updateToggleItem(wxUpdateUIEvent& event) {
842 
843  // memory window check-item
844  if (event.GetId() == ProximConstants::COMMAND_TOGGLE_MEMORY_WIN) {
845  bool exists = FindWindowById(ProximConstants::ID_MEMORY_WINDOW);
846  if (exists) {
847  event.Check(true);
848  } else {
849  event.Check(false);
850  }
851  }
852 
853  // simulator control window check-item
854  if (event.GetId() == ProximConstants::COMMAND_TOGGLE_CONTROL_WIN) {
855  bool exists = FindWindowById(ProximConstants::ID_CONTROL_WINDOW);
856  if (exists) {
857  event.Check(true);
858  } else {
859  event.Check(false);
860  }
861  }
862 
863  // machine window check-item
864  if (event.GetId() == ProximConstants::COMMAND_TOGGLE_MACHINE_WIN) {
865  bool exists = FindWindowById(ProximConstants::ID_MACHINE_STATE_WINDOW);
866  if (exists) {
867  event.Check(true);
868  } else {
869  event.Check(false);
870  }
871  }
872 
873  // breakpoint window check-item
874  if (event.GetId() == ProximConstants::COMMAND_TOGGLE_BREAKPOINT_WIN) {
875  bool exists = FindWindowById(ProximConstants::ID_BREAKPOINT_WINDOW);
876  if (exists) {
877  event.Check(true);
878  } else {
879  event.Check(false);
880  }
881  }
882 
883  // command history window check-item
885  bool exists = FindWindowById(ProximConstants::ID_CMD_HISTORY_WINDOW);
886  if (exists) {
887  event.Check(true);
888  } else {
889  event.Check(false);
890  }
891  }
892 
893  // debugger window check-item
894  if (event.GetId() == ProximConstants::COMMAND_TOGGLE_DEBUGGER_WIN) {
895  bool exists = FindWindowById(ProximConstants::ID_DEBUGGER_WINDOW);
896  if (exists) {
897  event.Check(true);
898  } else {
899  event.Check(false);
900  }
901  }
902 }
903 
904 /**
905  * Handles key events.
906  *
907  * @param event Key event to handle.
908  */
909 void
910 ProximMainFrame::onKeyEvent(wxKeyEvent& event) {
911  event.Skip();
912 }
913 
914 
915 /**
916  * Handles system close events.
917  *
918  * This event handler is called for example when the window is being closed
919  * using the frame close button X.
920  *
921  * @param event Close event to handle;
922  */
923 void
924 ProximMainFrame::onClose(wxCloseEvent& event) {
925  if (event.CanVeto()) {
926  // Execute quit-command.
927  GUICommand* quitCommand = wxGetApp().commandRegistry().createCommand(
929  if (quitCommand->isEnabled()) {
930  quitCommand->setParentWindow(this);
931  if (!quitCommand->Do()) {
932  event.Veto();
933  }
934  }
935  event.Veto();
936  delete quitCommand;
937  return;
938  }
939 }
940 
941 
942 /**
943  * Updates simulation status and cycle count in the statusbar.
944  */
945 void
947  const SimulatorFrontend* simulation = ProximToolbox::frontend();
948  wxString status;
949  ClockCycleCount cycles = 0;
950  if (simulation == NULL) {
951  status = _T("Not initialzed");
952  } else if (simulation->isSimulationInitialized()) {
953  cycles = simulation->cycleCount();
954  status = _T("Initialized");
955  } else if (simulation->isSimulationRunning()) {
956  cycles = simulation->cycleCount();
957  status = _T("Running");
958  } else if (simulation->isSimulationStopped()) {
959  cycles = simulation->cycleCount();
960  status = _T("Stopped");
961  } else if (simulation->hasSimulationEnded()) {
962  cycles = simulation->cycleCount();
963  status = _T("Finished");
964  }
965 
966  wxStatusBar* statusBar = GetStatusBar();
967  statusBar->SetStatusText(status, 1);
968 
969  wxString cyclesStr = WxConversion::toWxString((boost::format("%.0f") %
970  cycles).str());
971  cyclesStr.Prepend(_T("Cycles: "));
972  statusBar->SetStatusText(cyclesStr, 2);
973 }
974 
975 
976 /**
977  * Updates "Memory Window" menu item depending on if memory is available
978  */
979 void
981  if (!wxGetApp().simulation() ||
982  !wxGetApp().simulation()->frontend() ||
983  !wxGetApp().simulation()->frontend()->isSimulationInitialized() ||
984  wxGetApp().simulation()->frontend()->memorySystem().
985  memoryCount() == 0) {
986  GetMenuBar()->Enable(ProximConstants::COMMAND_TOGGLE_MEMORY_WIN, false);
987  wxWindow* memoryWindow = FindWindowById(ProximConstants::ID_MEMORY_WINDOW);
988  if (memoryWindow != NULL) {
989  memoryWindow->Destroy();
990  memoryWindow = NULL;
991  }
992  } else {
993  GetMenuBar()->Enable(ProximConstants::COMMAND_TOGGLE_MEMORY_WIN, true);
994  }
995 }
996 
997 
998 /**
999  * Event handler for the simulator reset event.
1000  */
1001 void
1003  reset();
1004 }
1005 
1006 
1007 /**
1008  * Resets all subwidnows, which acess simulator data directly.
1009  *
1010  * If this fucntion is from another thread than the GUI thread,
1011  * a reset event is passed to the GUI thread, which will reset
1012  * the windows in the GUI thread. The caller thread is blocked and
1013  * wont return from this function until the reset is complete.
1014  */
1015 void
1017  if (wxThread::IsMain()) {
1018  for (int i = subwindows.size() - 1; i >= 0; i--) {
1019  subwindows[i]->reset();
1020  }
1021  isReset_ = true;
1022  resetCondition_->Signal();
1023  } else {
1025  wxPostEvent(this, event);
1026  while (!isReset_) {
1027  resetCondition_->WaitTimeout(100);
1028  }
1029  isReset_ = false;
1030  }
1031 }
ProximMainFrame
Definition: ProximMainFrame.hh:58
ProximMainFrame::topSplitter_
wxWindow * topSplitter_
Top level splitter window of the splitted subwindow hierarchy.
Definition: ProximMainFrame.hh:91
GUICommand::setParentWindow
void setParentWindow(wxWindow *view)
Definition: GUICommand.cc:64
ProximPortWindow.hh
WarningDialog
Definition: WarningDialog.hh:42
ProximMemoryWindow.hh
ProximQuitCmd
Definition: ProximQuitCmd.hh:43
ProximExecuteFileCmd.hh
ProximConstants::COMMAND_EDIT_OPTIONS
@ COMMAND_EDIT_OPTIONS
Definition: ProximConstants.hh:69
ProximConstants::ID_MACHINE_STATE_WINDOW
@ ID_MACHINE_STATE_WINDOW
Definition: ProximConstants.hh:92
ProximMainFrame::subwindows
std::vector< ProximSimulatorWindow * > subwindows
List of subwindows where to send the simulator events.
Definition: ProximMainFrame.hh:93
CommandRegistry::commandName
std::string commandName(int id) const
Definition: CommandRegistry.cc:173
ProximToolbox::frontend
static TracedSimulatorFrontend * frontend()
Definition: ProximToolbox.cc:223
ProximOpenMachineCmd
Definition: ProximOpenMachineCmd.hh:43
FileSystem.hh
ProximConstants::COMMAND_TOGGLE_MACHINE_WIN
@ COMMAND_TOGGLE_MACHINE_WIN
Definition: ProximConstants.hh:82
WxConversion::toWxString
static wxString toWxString(const std::string &source)
ProximSimulatorWindow.hh
GUICommand::isEnabled
virtual bool isEnabled()=0
EVT_SIMULATOR_RUNTIME_ERROR
#define EVT_SIMULATOR_RUNTIME_ERROR(id, fn)
Definition: SimulatorEvent.hh:169
ProximConstants::COMMAND_CLEAR_DISASSEMBLY_HIGHLIGHT
@ COMMAND_CLEAR_DISASSEMBLY_HIGHLIGHT
Definition: ProximConstants.hh:74
ProximConstants::ID_DISASSEMBLY_WINDOW
@ ID_DISASSEMBLY_WINDOW
Definition: ProximConstants.hh:91
ProximNextICmd.hh
Exception.hh
ProximFindCmd.hh
ProximCDCmd
Definition: ProximCDCmd.hh:44
ProximConstants::ID_CONSOLE_WINDOW
@ ID_CONSOLE_WINDOW
Definition: ProximConstants.hh:90
ProximMachineStateWindow.hh
ProximMainFrame::onClose
void onClose(wxCloseEvent &event)
Definition: ProximMainFrame.cc:924
ProximClearConsoleCmd
Definition: ProximClearConsoleCmd.hh:41
ProximConstants::COMMAND_OPEN_PROGRAM
@ COMMAND_OPEN_PROGRAM
Definition: ProximConstants.hh:52
EVT_SIMULATOR_COMMAND_DONE
EVT_SIMULATOR_COMMAND_DONE(0, ProximDisassemblyWindow::onSimulatorCommand) EVT_MENU_RANGE(MENU_ID_FIRST_MAPPED
SimulatorFrontend::isSimulationStopped
bool isSimulationStopped() const
Definition: SimulatorFrontend.cc:1271
ClearDisassemblyHighlightCmd.hh
HighlightTopExecCountsCmd
Definition: HighlightTopExecCountsCmd.hh:42
GUIOptions.hh
SimulatorEvent::EVT_SIMULATOR_RUNTIME_WARNING
static const wxEventType EVT_SIMULATOR_RUNTIME_WARNING
Runtime warning event.
Definition: SimulatorEvent.hh:66
HighlightExecPercentageCmd.hh
ProximBreakpointWindow
Definition: ProximBreakpointWindow.hh:47
ProximSimulatorSettingsCmd
Definition: ProximSimulatorSettingsCmd.hh:41
EVT_SIMULATOR_START
#define EVT_SIMULATOR_START(id, fn)
Definition: SimulatorEvent.hh:100
ProximExecuteFileCmd
Definition: ProximExecuteFileCmd.hh:43
ProximMachineStateWindow
Definition: ProximMachineStateWindow.hh:56
ProximStepICmd
Definition: ProximStepICmd.hh:43
ProximMemoryWindow
Definition: ProximMemoryWindow.hh:54
ProximMainFrame::toolbar_
wxToolBar * toolbar_
Mainframe toolbar.
Definition: ProximMainFrame.hh:96
KeyboardShortcut::key
char key() const
Definition: KeyboardShortcut.cc:190
ProximSimulationThread.hh
ProximConstants::ID_CMD_HISTORY_WINDOW
@ ID_CMD_HISTORY_WINDOW
Definition: ProximConstants.hh:95
Proxim.hh
ProximMainFrame::onReset
void onReset(const SimulatorEvent &event)
Definition: ProximMainFrame.cc:1002
ProximMainFrame::onToggleWindow
void onToggleWindow(wxCommandEvent &event)
Definition: ProximMainFrame.cc:691
ProximConstants::COMMAND_NEW_REGISTER_WINDOW
@ COMMAND_NEW_REGISTER_WINDOW
Definition: ProximConstants.hh:66
MemorySystem.hh
ProximDisassemblyWindow.hh
ProximConstants::COMMAND_TOGGLE_MEMORY_WIN
@ COMMAND_TOGGLE_MEMORY_WIN
Definition: ProximConstants.hh:80
ProximConstants::COMMAND_NAME_QUIT
static const std::string COMMAND_NAME_QUIT
Name of the quit command.
Definition: ProximConstants.hh:114
ProximConstants::COMMAND_TOGGLE_CONSOLE_WIN
@ COMMAND_TOGGLE_CONSOLE_WIN
Definition: ProximConstants.hh:78
ProximMainFrame::reset
void reset()
Definition: ProximMainFrame.cc:1016
GUICommand::Do
virtual bool Do()=0
ProximConstants::COMMAND_TOGGLE_CMD_HISTORY_WIN
@ COMMAND_TOGGLE_CMD_HISTORY_WIN
Definition: ProximConstants.hh:84
ProximMainFrame::updateMemoryWindowMenuItem
void updateMemoryWindowMenuItem()
Definition: ProximMainFrame.cc:980
ProximConstants::COMMAND_TOGGLE_DISASM_WIN
@ COMMAND_TOGGLE_DISASM_WIN
Definition: ProximConstants.hh:79
ProximCmdHistoryWindow.hh
GUICommand.hh
ProximKillCmd.hh
ProximMainFrame::onSimulatorTerminated
void onSimulatorTerminated(SimulatorEvent &event)
Definition: ProximMainFrame.cc:214
ProximSimulatorWindow
Definition: ProximSimulatorWindow.hh:47
ProximConstants::COMMAND_TOGGLE_BREAKPOINT_WIN
@ COMMAND_TOGGLE_BREAKPOINT_WIN
Definition: ProximConstants.hh:85
ProximToolbox.hh
ProximConstants::SCL_STEP_INSTRUCTION
static const std::string SCL_STEP_INSTRUCTION
Command for stepping an instruction.
Definition: ProximConstants.hh:165
EVT_SIMULATOR_COMMAND
#define EVT_SIMULATOR_COMMAND(id, fn)
Definition: SimulatorEvent.hh:120
EVT_SIMULATOR_TERMINATED
#define EVT_SIMULATOR_TERMINATED(id, fn)
Definition: SimulatorEvent.hh:94
EVT_SIMULATOR_OUTPUT
#define EVT_SIMULATOR_OUTPUT(id, fn)
Definition: SimulatorEvent.hh:113
ProximRunCmd.hh
ProximResumeCmd
Definition: ProximResumeCmd.hh:44
GUICommand
Definition: GUICommand.hh:43
ProximConstants::COMMAND_EXECUTE_FILE
@ COMMAND_EXECUTE_FILE
Definition: ProximConstants.hh:70
HighlightTopExecCountsCmd.hh
ErrorDialog
Definition: ErrorDialog.hh:42
ProximConstants::COMMAND_STEPI
@ COMMAND_STEPI
Definition: ProximConstants.hh:61
SimulatorEvent::EVT_SIMULATOR_LOADING_MACHINE
static const wxEventType EVT_SIMULATOR_LOADING_MACHINE
Machine loading started.
Definition: SimulatorEvent.hh:77
WarningDialog.hh
SimulatorEvent::EVT_SIMULATOR_RESET
static const wxEventType EVT_SIMULATOR_RESET
Sent before program,machine or memory model is destroyed.
Definition: SimulatorEvent.hh:85
ProximOptionsCmd.hh
ProximConstants::COMMAND_NEW_PORT_WINDOW
@ COMMAND_NEW_PORT_WINDOW
Definition: ProximConstants.hh:67
ProximMainFrame::updateSimulationStatus
void updateSimulationStatus()
Definition: ProximMainFrame.cc:946
ProximConstants::COMMAND_TOGGLE_CONTROL_WIN
@ COMMAND_TOGGLE_CONTROL_WIN
Definition: ProximConstants.hh:81
ErrorDialog.hh
ContainerTools::removeValueIfExists
static bool removeValueIfExists(ContainerType &aContainer, const ElementType &aKey)
ProximNextICmd
Definition: ProximNextICmd.hh:44
EVT_MENU_RANGE
EVT_MENU_RANGE(ProximConstants::COMMAND_FIRST, ProximConstants::COMMAND_LAST, ProximMainFrame::onCommandEvent) EVT_MENU_RANGE(ProximConstants
Definition: ProximMainFrame.cc:91
ProximNewRegisterWindowCmd.hh
ProximMainFrame::resetCondition_
wxCondition * resetCondition_
Condition which is signalled when the subwindow reset is complete.
Definition: ProximMainFrame.hh:103
ConsoleWindow.hh
ProximConstants::COMMAND_CLEAR_CONSOLE
@ COMMAND_CLEAR_CONSOLE
Definition: ProximConstants.hh:55
EVT_SIMULATOR_MACHINE_LOADED
#define EVT_SIMULATOR_MACHINE_LOADED(id, fn)
Definition: SimulatorEvent.hh:163
EVT_SIMULATOR_LOADING_PROGRAM
#define EVT_SIMULATOR_LOADING_PROGRAM(id, fn)
Definition: SimulatorEvent.hh:145
SimulatorEvent::EVT_SIMULATOR_RUNTIME_ERROR
static const wxEventType EVT_SIMULATOR_RUNTIME_ERROR
Runtime error event.
Definition: SimulatorEvent.hh:64
ProximConstants::ID_MEMORY_WINDOW
@ ID_MEMORY_WINDOW
Definition: ProximConstants.hh:93
ProximToolbox::addFramedWindow
static void addFramedWindow(wxWindow *window, const wxString &title, bool stayOnTop=false, const wxSize &minSize=wxSize(100, 100))
Definition: ProximToolbox.cc:176
EVT_SIMULATOR_RESET
#define EVT_SIMULATOR_RESET(id, fn)
Definition: SimulatorEvent.hh:190
CommandRegistry
Definition: CommandRegistry.hh:47
ProximMainFrame::createMenubar
void createMenubar()
Definition: ProximMainFrame.cc:223
EVT_SIMULATOR_ERROR
#define EVT_SIMULATOR_ERROR(id, fn)
Definition: SimulatorEvent.hh:134
SimulatorEvent::EVT_SIMULATOR_LOADING_PROGRAM
static const wxEventType EVT_SIMULATOR_LOADING_PROGRAM
Program loading started.
Definition: SimulatorEvent.hh:81
ProximConstants::COMMAND_HIGHLIGHT_TOP_EXEC_COUNTS
@ COMMAND_HIGHLIGHT_TOP_EXEC_COUNTS
Definition: ProximConstants.hh:72
EVT_SIMULATOR_RUN
#define EVT_SIMULATOR_RUN(id, fn)
Definition: SimulatorEvent.hh:183
ProximNewPortWindowCmd.hh
ProximNewPortWindowCmd
Definition: ProximNewPortWindowCmd.hh:41
ProximConstants::COMMAND_RESUME
@ COMMAND_RESUME
Definition: ProximConstants.hh:65
ProximMainFrame::updateCommand
void updateCommand(wxUpdateUIEvent &event)
Definition: ProximMainFrame.cc:815
ProximMainFrame::onKeyEvent
void onKeyEvent(wxKeyEvent &event)
Definition: ProximMainFrame.cc:910
UserManualCmd
Definition: UserManualCmd.hh:40
Environment.hh
ProximMainFrame::initialize
void initialize()
Definition: ProximMainFrame.cc:188
ProximMainFrame::onCommandEvent
void onCommandEvent(wxCommandEvent &event)
Definition: ProximMainFrame.cc:490
SimulatorEvent::EVT_SIMULATOR_PROGRAM_LOADED
static const wxEventType EVT_SIMULATOR_PROGRAM_LOADED
Program loaded event.
Definition: SimulatorEvent.hh:83
ProximConstants::ID_DEBUGGER_WINDOW
@ ID_DEBUGGER_WINDOW
Definition: ProximConstants.hh:97
ProximStopDialog
Definition: ProximStopDialog.hh:47
ProximMainFrame::addSubWindow
void addSubWindow(ProximSimulatorWindow *window)
Definition: ProximMainFrame.cc:666
ProximMainFrame::dockWindow
void dockWindow(wxWindow *window)
Definition: ProximMainFrame.cc:514
ProximConstants::COMMAND_QUIT
@ COMMAND_QUIT
Definition: ProximConstants.hh:57
ProximControlWindow.hh
ProximMainFrame::~ProximMainFrame
virtual ~ProximMainFrame()
Definition: ProximMainFrame.cc:176
ProximConstants::ID_BREAKPOINT_WINDOW
@ ID_BREAKPOINT_WINDOW
Definition: ProximConstants.hh:94
SimulatorFrontend::isSimulationRunning
bool isSimulationRunning() const
Definition: SimulatorFrontend.cc:1260
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
ProximNewRegisterWindowCmd
Definition: ProximNewRegisterWindowCmd.hh:41
KeyboardShortcut
Definition: KeyboardShortcut.hh:50
GUIOptions
Definition: GUIOptions.hh:58
KeyboardShortcut::fKey
int fKey() const
Definition: KeyboardShortcut.cc:149
ProximClearConsoleCmd.hh
TracedSimulatorFrontend.hh
SimulatorFrontend::cycleCount
ClockCycleCount cycleCount() const
Definition: SimulatorFrontend.cc:1194
ProximAboutCmd.hh
ProximConstants
Definition: ProximConstants.hh:46
ProximConstants::ID_CONTROL_WINDOW
@ ID_CONTROL_WINDOW
Definition: ProximConstants.hh:96
ProximMainFrame::createToolbar
void createToolbar()
Definition: ProximMainFrame.cc:420
HighlightExecPercentageCmd
Definition: HighlightExecPercentageCmd.hh:41
ProximKillCmd
Definition: ProximKillCmd.hh:43
ProximConstants.hh
Environment::iconDirPath
static std::string iconDirPath()
Definition: Environment.cc:225
ProximOpenMachineCmd.hh
false
find Finds info of the inner loops in the false
Definition: InnerLoopFinder.cc:81
UserManualCmd::COMMAND_ID
static const int COMMAND_ID
Command ID.
Definition: UserManualCmd.hh:58
ProximControlWindow
Definition: ProximControlWindow.hh:52
ProximDebuggerWindow.hh
ProximMainFrame::onSimulatorEvent
void onSimulatorEvent(SimulatorEvent &event)
Definition: ProximMainFrame.cc:551
ProximConstants::COMMAND_RUN
@ COMMAND_RUN
Definition: ProximConstants.hh:60
EVT_SIMULATOR_RUNTIME_WARNING
#define EVT_SIMULATOR_RUNTIME_WARNING(id, fn)
Definition: SimulatorEvent.hh:176
ProximMainFrame.hh
ProximConstants::COMMAND_NEXTI
@ COMMAND_NEXTI
Definition: ProximConstants.hh:62
EVT_SIMULATOR_LOADING_MACHINE
#define EVT_SIMULATOR_LOADING_MACHINE(id, fn)
Definition: SimulatorEvent.hh:157
ProximMainFrame::isReset_
bool isReset_
True if the subwindow reset is complete.
Definition: ProximMainFrame.hh:106
ProximConstants::COMMAND_FIND
@ COMMAND_FIND
Definition: ProximConstants.hh:71
SimulatorEvent::data
std::string data() const
Definition: SimulatorEvent.cc:85
ProximMainFrame::sizer_
wxBoxSizer * sizer_
Toplevel sizer of the window managing the basic layout.
Definition: ProximMainFrame.hh:89
ProximCmdHistoryWindow
Definition: ProximCmdHistoryWindow.hh:47
ClockCycleCount
CycleCount ClockCycleCount
Alias for ClockCycleCount.
Definition: SimulatorConstants.hh:57
ContainerTools::containsValue
static bool containsValue(const ContainerType &aContainer, const ElementType &aKey)
ProximStepICmd.hh
WxConversion.hh
ProximConstants::COMMAND_HIGHLIGHT_EXEC_PERCENTAGE
@ COMMAND_HIGHLIGHT_EXEC_PERCENTAGE
Definition: ProximConstants.hh:73
ClearDisassemblyHighlightCmd
Definition: ClearDisassemblyHighlightCmd.hh:41
ProximRunCmd
Definition: ProximRunCmd.hh:43
EVT_SIMULATOR_PROGRAM_LOADED
#define EVT_SIMULATOR_PROGRAM_LOADED(id, fn)
Definition: SimulatorEvent.hh:151
SimulatorFrontend::hasSimulationEnded
bool hasSimulationEnded() const
Definition: SimulatorFrontend.cc:1283
SimulatorEvent
Definition: SimulatorEvent.hh:42
ProximRegisterWindow.hh
ProximMainFrame::menuAccelerator
wxString menuAccelerator(int id)
Definition: ProximMainFrame.cc:448
ProximMainFrame::removeSubWindow
void removeSubWindow(ProximSimulatorWindow *window)
Definition: ProximMainFrame.cc:678
ProximConstants::COMMAND_TOGGLE_DEBUGGER_WIN
@ COMMAND_TOGGLE_DEBUGGER_WIN
Definition: ProximConstants.hh:83
ProximCDCmd.hh
ProximStopDialog.hh
ProximDisassemblyWindow
Definition: ProximDisassemblyWindow.hh:58
ProximConstants::COMMAND_ABOUT
@ COMMAND_ABOUT
Definition: ProximConstants.hh:58
ProximConstants::COMMAND_CD
@ COMMAND_CD
Definition: ProximConstants.hh:54
ProximConstants::COMMAND_KILL
@ COMMAND_KILL
Definition: ProximConstants.hh:64
SimulatorEvent::EVT_SIMULATOR_COMMAND
static const wxEventType EVT_SIMULATOR_COMMAND
Command received from the GUI.
Definition: SimulatorEvent.hh:53
ProximToolbox::lineReader
static ProximLineReader & lineReader()
Definition: ProximToolbox.cc:238
ProximMainFrame::stopDialogInstantiated_
bool stopDialogInstantiated_
True, if an instance of the stop dialog is currently visible.
Definition: ProximMainFrame.hh:98
SimulatorFrontend
Definition: SimulatorFrontend.hh:89
ProximAboutCmd
Definition: ProximAboutCmd.hh:42
ProximQuitCmd.hh
UserManualCmd.hh
ProximOpenProgramCmd
Definition: ProximOpenProgramCmd.hh:43
EVT_SIMULATOR_STOP
#define EVT_SIMULATOR_STOP(id, fn)
Definition: SimulatorEvent.hh:106
KeyboardShortcut::ctrl
bool ctrl() const
Definition: KeyboardShortcut.cc:165
SimulatorEvent::EVT_SIMULATOR_RUN
static const wxEventType EVT_SIMULATOR_RUN
Simulation ran/resumed.
Definition: SimulatorEvent.hh:73
SimulatorEvent::EVT_SIMULATOR_MACHINE_LOADED
static const wxEventType EVT_SIMULATOR_MACHINE_LOADED
Machine loaded event.
Definition: SimulatorEvent.hh:79
SimulatorFrontend::isSimulationInitialized
bool isSimulationInitialized() const
Definition: SimulatorFrontend.cc:1228
CommandRegistry::addCommand
void addCommand(GUICommand *command)
KeyboardShortcut::alt
bool alt() const
Definition: KeyboardShortcut.cc:177
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
ProximBreakpointWindow.hh
InstanceNotFound
Definition: Exception.hh:304
ProximDebuggerWindow
Definition: ProximDebuggerWindow.hh:54
ProximOpenProgramCmd.hh
ProximConstants::COMMAND_OPEN_MACHINE
@ COMMAND_OPEN_MACHINE
Definition: ProximConstants.hh:53
ProximSimulatorSettingsCmd.hh
SimulatorEvent::EVT_SIMULATOR_COMMAND_DONE
static const wxEventType EVT_SIMULATOR_COMMAND_DONE
Command execution completed.
Definition: SimulatorEvent.hh:55
ProximMainFrame::updateToggleItem
void updateToggleItem(wxUpdateUIEvent &event)
Definition: ProximMainFrame.cc:841
ProximFindCmd
Definition: ProximFindCmd.hh:42
ProximOptionsCmd
Definition: ProximOptionsCmd.hh:43
ContainerTools.hh
ProximResumeCmd.hh
ConsoleWindow
Definition: ConsoleWindow.hh:51
ProximConstants::COMMAND_SIMULATOR_SETTINGS
@ COMMAND_SIMULATOR_SETTINGS
Definition: ProximConstants.hh:68