OpenASIP  2.0
MainFrame.cc
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 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 MainFrame.cc
26  *
27  * Definition of MainFrame class.
28  *
29  * @author Veli-Pekka Jääskeläinen (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #include <wx/sizer.h>
34 #include <wx/statusbr.h>
35 
36 #include "MainFrame.hh"
37 #include "Environment.hh"
38 #include "ChildFrame.hh"
39 #include "CommandRegistry.hh"
40 #include "ProDe.hh"
41 #include "AddFUCmd.hh"
42 #include "AddSocketCmd.hh"
43 #include "AddBridgeCmd.hh"
44 #include "AddBusCmd.hh"
45 #include "AddASCmd.hh"
46 #include "AddGCUCmd.hh"
47 #include "AddIUCmd.hh"
48 #include "AddRFCmd.hh"
49 #include "CopyComponentCmd.hh"
50 #include "CutComponentCmd.hh"
51 #include "PasteComponentCmd.hh"
52 #include "DeleteComponentCmd.hh"
53 #include "ModifyComponentCmd.hh"
54 #include "EditOptionsCmd.hh"
55 #include "SaveOptionsCmd.hh"
56 #include "EditConnectionsCmd.hh"
57 #include "EditAddressSpacesCmd.hh"
58 #include "EditTemplatesCmd.hh"
59 #include "EditOTAFormatsCmd.hh"
60 #include "ZoomInCmd.hh"
61 #include "ZoomOutCmd.hh"
62 #include "FitWindowCmd.hh"
63 #include "FitHeightCmd.hh"
64 #include "FitWidthCmd.hh"
65 #include "VerifyMachineCmd.hh"
66 #include "ImplementMachineCmd.hh"
67 #include "CallExplorerPluginCmd.hh"
68 #include "UserManualCmd.hh"
69 #include "AboutCmd.hh"
70 #include "NewDocumentCmd.hh"
71 #include "OpenDocumentCmd.hh"
72 #include "CloseDocumentCmd.hh"
73 #include "SaveDocumentCmd.hh"
74 #include "SaveDocumentAsCmd.hh"
75 #include "QuitCmd.hh"
76 #include "PrintCmd.hh"
77 #include "PrintPreviewCmd.hh"
78 #include "SelectCmd.hh"
79 #include "UndoCmd.hh"
80 #include "RedoCmd.hh"
81 #include "EditImmediateSlotsCmd.hh"
82 #include "ProDeExportCmd.hh"
83 #include "EditBusOrderCmd.hh"
84 #include "FullyConnectBussesCmd.hh"
85 #include "AddRFFromHDBCmd.hh"
86 #include "AddIUFromHDBCmd.hh"
87 #include "AddFUFromHDBCmd.hh"
88 #include "ToggleUnitDetailsCmd.hh"
89 #include "EditMachineCmd.hh"
90 #include "VLIWConnectICCmd.hh"
91 #include "BlocksConnectICCmd.hh"
92 
93 #include "KeyboardShortcut.hh"
94 #include "ProDeOptions.hh"
95 #include "WxConversion.hh"
96 #include "ProDeConstants.hh"
97 #include "ErrorDialog.hh"
98 
99 
100 BEGIN_EVENT_TABLE(MainFrame, wxDocMDIParentFrame)
101  EVT_KEY_DOWN(MainFrame::onKeyEvent)
102  EVT_MENU(-1, MainFrame::onCommandEvent)
103  EVT_TOOL(-1, MainFrame::onCommandEvent)
104  EVT_UPDATE_UI(-1, MainFrame::onUpdateUI)
106 
107 
108 /**
109  * The Constructor.
110  *
111  * @param manager Pointer to the editor's document manager.
112  * @param parent Parent frame of the MainFrame.
113  * @param title Title of the MainFrame.
114  * @param position Position of the MainFrame on the screen.
115  * @param size Size of the MainFrame on the screen.
116  * @param style Style of the MainFrame.
117  */
119  wxDocManager* manager,
120  wxFrame* parent,
121  const wxString& title,
122  const wxPoint& position,
123  const wxSize& size,
124  long style):
125  wxDocMDIParentFrame(manager, parent, -1, title,
126  position, size, style, _T("MainFrame")) {
127 
128  commandRegistry_ = wxGetApp().commandRegistry();
129  assert(commandRegistry_ != NULL);
130  commandRegistry_->addCommand(new NewDocumentCmd());
131  commandRegistry_->addCommand(new OpenDocumentCmd());
132  commandRegistry_->addCommand(new CloseDocumentCmd());
133  commandRegistry_->addCommand(new SaveDocumentCmd());
134  commandRegistry_->addCommand(new SaveDocumentAsCmd());
135  commandRegistry_->addCommand(new PrintCmd());
136  commandRegistry_->addCommand(new PrintPreviewCmd());
137  commandRegistry_->addCommand(new ProDeExportCmd());
138  commandRegistry_->addCommand(new QuitCmd());
139  commandRegistry_->addCommand(new UndoCmd());
140  commandRegistry_->addCommand(new RedoCmd());
141  commandRegistry_->addCommand(new AddFUCmd());
142  commandRegistry_->addCommand(new AddRFCmd());
143  commandRegistry_->addCommand(new AddBusCmd());
144  commandRegistry_->addCommand(new AddSocketCmd());
145  commandRegistry_->addCommand(new AddBridgeCmd());
146  commandRegistry_->addCommand(new AddIUCmd());
147  commandRegistry_->addCommand(new AddGCUCmd());
148  commandRegistry_->addCommand(new AddASCmd());
149  commandRegistry_->addCommand(new AddRFFromHDBCmd());
150  commandRegistry_->addCommand(new AddIUFromHDBCmd());
151  commandRegistry_->addCommand(new AddFUFromHDBCmd());
152  commandRegistry_->addCommand(new CopyComponentCmd());
153  commandRegistry_->addCommand(new CutComponentCmd());
154  commandRegistry_->addCommand(new PasteComponentCmd());
155  commandRegistry_->addCommand(new DeleteComponentCmd());
156  commandRegistry_->addCommand(new ModifyComponentCmd());
157  commandRegistry_->addCommand(new EditConnectionsCmd());
158  commandRegistry_->addCommand(new EditAddressSpacesCmd());
159  commandRegistry_->addCommand(new EditBusOrderCmd());
160  commandRegistry_->addCommand(new EditTemplatesCmd());
161  commandRegistry_->addCommand(new EditOTAFormatsCmd());
162  commandRegistry_->addCommand(new EditMachineCmd());
163  commandRegistry_->addCommand(new EditImmediateSlotsCmd());
164  commandRegistry_->addCommand(new SelectCmd());
165  commandRegistry_->addCommand(new FullyConnectBussesCmd());
166  commandRegistry_->addCommand(new ZoomInCmd());
167  commandRegistry_->addCommand(new ZoomOutCmd());
168  commandRegistry_->addCommand(new FitWindowCmd());
169  commandRegistry_->addCommand(new FitHeightCmd());
170  commandRegistry_->addCommand(new FitWidthCmd());
171  commandRegistry_->addCommand(new ToggleUnitDetailsCmd());
172  commandRegistry_->addCommand(new VerifyMachineCmd());
173  commandRegistry_->addCommand(new ImplementMachineCmd());
174  commandRegistry_->addCommand(new CallExplorerPluginCmd());
175  commandRegistry_->addCommand(new EditOptionsCmd());
176  commandRegistry_->addCommand(new SaveOptionsCmd());
177  commandRegistry_->addCommand(new UserManualCmd());
178  commandRegistry_->addCommand(new AboutCmd());
179  commandRegistry_->addCommand(new VLIWConnectICCmd());
180  commandRegistry_->addCommand(new BlocksConnectICCmd());
181 
182  toolbar_ = NULL;
183  CreateStatusBar(2);
184  int widths[2] = {-2, -1};
185  SetStatusWidths(2, widths);
186 
187  createMenubar();
188  createToolbar();
189 }
190 
191 
192 /**
193  * Toggles visibility of the toolbar.
194  */
195 void
197  ProDeOptions* options = wxGetApp().options();
198  if (toolbar_ != NULL) {
199  options->setToolbarVisibility(false);
200  SetToolBar(NULL);
201  delete toolbar_;
202  toolbar_ = NULL;
203  } else {
204  options->setToolbarVisibility(true);
205  createToolbar();
206  }
207  Layout();
208 }
209 
210 
211 /**
212  * Toggles visibility of the statusbar.
213  */
214 void
216  wxStatusBar* statusbar = GetStatusBar();
217  if (statusbar != NULL) {
218  SetStatusBar(NULL);
219  delete statusbar;
220  statusbar = NULL;
221  } else {
222  CreateStatusBar(2);
223  int widths[2] = {-4, -1};
224  SetStatusWidths(2, widths);
225  }
226  Layout();
227  Fit();
228 }
229 
230 
231 /**
232  * Creates and returns a new options menu.
233  *
234  * @return Options menu.
235  */
236 wxMenu*
238  wxMenu* optionsMenu = new wxMenu;
239  optionsMenu->Append(
242  _T("&Edit...")));
243 
244  optionsMenu->AppendSeparator();
245  optionsMenu->Append(
248  _T("&Save")));
249 
250  return optionsMenu;
251 }
252 
253 
254 /**
255  * Creates and returns a new help menu.
256  *
257  * @return Help menu.
258  */
259 wxMenu*
261  wxMenu* helpMenu = new wxMenu;
262  helpMenu->Append(
265  _T("&User Manual...")));
266 
267  helpMenu->Append(
270  _T("&About...")));
271 
272  return helpMenu;
273 }
274 
275 
276 
277 /**
278  * Handles menu and toolbar events.
279  *
280  * @param event Event to handle.
281  */
282 void
283 MainFrame::onCommandEvent(wxCommandEvent& event) {
284 
285  if (event.GetId() == ID_VIEW_TOOLBAR) {
286  onToggleToolbar();
287  return;
288  }
289 
290  if (event.GetId() == ID_VIEW_STATUSBAR) {
292  return;
293  }
294 
295  GUICommand* command = wxGetApp().commandRegistry()
296  ->createCommand(event.GetId());
297 
298  if (command == NULL) {
299  ErrorDialog dialog(this,
300  _T("No handler found for the command event!"));
301  dialog.ShowModal();
302  return;
303  }
304 
305  if (!command->isEnabled()) {
306  delete command;
307  return;
308  }
309 
310  wxView* view = wxGetApp().docManager()->GetCurrentView();
311  if (view != NULL) {
312  command->setParentWindow(this);
313  EditorCommand* editorCmd = dynamic_cast<EditorCommand*>(command);
314  if (editorCmd != NULL) {
315  editorCmd->setView(view);
316  }
317  command->Do();
318  updateUI();
319  delete command;
320  return;
321  }
322 
323  // set command parent window and view
324  command->setParentWindow(this);
325  // execute the command
326  command->Do();
327  updateUI();
328  delete command;
329 }
330 
331 
332 /**
333  * Updates toolbar and menubar item enabled/disabled states.
334  *
335  * @param event Update event for the menu or toolbar item to be updated.
336  */
337 void
338 MainFrame::onUpdateUI(wxUpdateUIEvent& event) {
339 
340  CommandRegistry* registry = wxGetApp().commandRegistry();
341  GUICommand* command = registry->createCommand(event.GetId());
342 
343  if (command == NULL) {
344  event.Skip();
345  return;
346  }
347 
348  wxView* view = wxGetApp().docManager()->GetCurrentView();
349  if (view != NULL) {
350  EditorCommand* editorCmd = dynamic_cast<EditorCommand*>(command);
351  if (editorCmd != NULL) {
352  editorCmd->setView(view);
353  }
354  }
355 
356  if (command->isEnabled()) {
357  event.Enable(true);
358  } else {
359  event.Enable(false);
360  }
361 
362  if (command->isChecked()) {
363  event.Check(command->isChecked());
364  }
365 
366  delete command;
367 }
368 
369 /**
370  * Updates enabled/disabled states of toolbar buttons and menu items.
371  */
372 void
374 
375  wxMenuBar* menubar = GetMenuBar();
376  for (unsigned i = 0; i < menubar->GetMenuCount(); i++) {
377  menubar->GetMenu(i)->UpdateUI();
378  }
379 
380  if (toolbar_ == NULL) {
381  return;
382  }
383 
384  CommandRegistry* registry = wxGetApp().commandRegistry();
385  ProDeOptions* options = wxGetApp().options();
386  ToolbarButton* tool = options->firstToolbarButton();
387 
388  while (tool != NULL) {
389  int id = registry->commandId(tool->action());
390  if (!registry->isEnabled(tool->action())) {
391  toolbar_->EnableTool(id, false);
392  } else {
393  toolbar_->EnableTool(id, true);
394  }
395  tool = options->nextToolbarButton();
396  }
397 
398 }
399 
400 /**
401  * Handles key events on the canvas.
402  *
403  * @param event Key event to handle.
404  */
405 void
406 MainFrame::onKeyEvent(wxKeyEvent&) {
407 }
408 
409 
410 /**
411  * Creates the default menubar.
412  */
413 void
415  // File menu
416  wxMenu* fileMenu = new wxMenu;
417 
418  fileMenu->Append(
421 
422  fileMenu->Append(
425  ProDeConstants::COMMAND_OPEN_DOC).Prepend(_T("Open...")));
426 
427  fileMenu->Append(
430  ProDeConstants::COMMAND_SAVE_DOC).Prepend(_T("&Save")));
431 
432  fileMenu->Append(
435  ProDeConstants::COMMAND_SAVEAS_DOC).Prepend(_T("Save &As...")));
436 
437  fileMenu->Append(
440  ProDeConstants::COMMAND_CLOSE_DOC).Prepend(_T("&Close")));
441 
442  fileMenu->AppendSeparator();
443 
444  fileMenu->Append(
447  ProDeConstants::COMMAND_PRINT).Prepend(_T("&Print...")));
448 
449  fileMenu->Append(
452  _T("Print Pre&view...")));
453 
454  fileMenu->Append(
457  _T("Export...")));
458 
459  fileMenu->AppendSeparator();
460 
461  fileMenu->Append(
463  menuAccelerator(ProDeConstants::COMMAND_QUIT).Prepend(_T("&Quit")));
464 
465  // Edit menu
466  wxMenu* editMenu = new wxMenu;
467  wxMenu* addSubMenu = new wxMenu;
468  wxMenu* addFromHDBSubMenu = new wxMenu;
469 
470  editMenu->Append(
473  _T("&Undo")));
474 
475  editMenu->Append(
478  _T("&Redo")));
479 
480  editMenu->AppendSeparator();
481  editMenu->Append(
484  _T("Cu&t")));
485 
486  editMenu->Append(
489  _T("&Copy")));
490 
491  editMenu->Append(
494  _T("&Paste")));
495 
496  editMenu->AppendSeparator();
497 
498  addSubMenu->Append(
501  _T("&Function Unit...")));
502 
503  addSubMenu->Append(
506  _T("&Register File...")));
507 
508  addSubMenu->Append(
511  _T("&Transport Bus...")));
512 
513  addSubMenu->Append(
516  _T("&Socket...")));
517 
518  addSubMenu->Append(
521  _T("&Bridge...")));
522 
523  addSubMenu->Append(
526  _T("&Immediate Unit...")));
527 
528  addSubMenu->Append(
531  _T("&Global Control Unit...")));
532 
533  addSubMenu->Append(
536  _T("&Address Space...")));
537 
538  editMenu->Append(ID_ADD_SUBMENU, _T("&Add"), addSubMenu);
539 
540  addFromHDBSubMenu->Append(
543  _T("&Function Unit...")));
544 
545  addFromHDBSubMenu->Append(
548  _T("&Immediate Unit...")));
549 
550  addFromHDBSubMenu->Append(
553  _T("&Register File...")));
554 
555  editMenu->Append(
557  _T("Add From &HDB"), addFromHDBSubMenu);
558 
559  editMenu->Append(
562  _T("&Delete")));
563 
564  editMenu->Append(
567  _T("&Modify...")));
568 
569  editMenu->AppendSeparator();
570  editMenu->Append(
573  _T("Address &Spaces...")));
574 
575  editMenu->Append(
578  _T("Instruction &Templates...")));
579 
580  editMenu->Append(
583  .Prepend(_T("OTA Formats...")));
584 
585  editMenu->Append(
588  _T("&Immediate Slots...")));
589 
590  editMenu->Append(
593  _T("Transport Bus &Order...")));
594 
595  editMenu->Append(
598  _T("Architecture Features...")));
599 
600  // View menu
601  wxMenu* viewMenu = new wxMenu;
602  wxMenu* zoomSubMenu = new wxMenu;
603  zoomSubMenu->Append(
606  _T("Zoom &In")));
607 
608  zoomSubMenu->Append(
611  _T("Zoom &Out")));
612 
613  zoomSubMenu->AppendSeparator();
614  zoomSubMenu->Append(
617  _T("&Fit Window")));
618 
619  zoomSubMenu->Append(
622  _T("Fit &Height")));
623 
624  zoomSubMenu->Append(
627  _T("Fit &Width")));
628 
629  viewMenu->Append(ID_ZOOM_SUBMENU, _T("&Zoom"), zoomSubMenu);
630  viewMenu->AppendSeparator();
631  viewMenu->AppendCheckItem(
634  _T("Unit &Details")));
635 
636  viewMenu->AppendSeparator();
637  viewMenu->AppendCheckItem(ID_VIEW_TOOLBAR, _T("&Toolbar"));
638  viewMenu->AppendCheckItem(ID_VIEW_STATUSBAR, _T("&Statusbar"));
639  viewMenu->Check(ID_VIEW_STATUSBAR, true);
640  viewMenu->Check(ID_VIEW_TOOLBAR, true);
641 
642  // Tool menu
643  wxMenu* toolMenu = new wxMenu;
644  toolMenu->Append(
647  _T("&Select")));
648 
649  toolMenu->Append(
652  _T("&Edit Connections")));
653 
654  toolMenu->AppendSeparator();
655  toolMenu->Append(
658  _T("&Fully Connect IC")));
659 
660  toolMenu->Append(
663  _T("&VLIW Connect IC")));
664 
665  toolMenu->Append(
668  .Prepend(_T("&Blocks Connect IC")));
669 
670  toolMenu->Append(
673  _T("&Verify...")));
674 
675  toolMenu->Append(
678  _T("&Processor Implementation...")));
679 
680  toolMenu->Append(
683  _T("&Call Explorer Plugin...")));
684 
685  // Options menu
686  wxMenu* optionsMenu = createOptionsMenu();
687 
688  // Help menu
689  wxMenu* helpMenu = createHelpMenu();
690 
691  // add menus to the menubar
692  wxMenuBar* menuBar = new wxMenuBar;
693  menuBar->Append(fileMenu, _T("&File"));
694  menuBar->Append(editMenu, _T("&Edit"));
695  menuBar->Append(viewMenu, _T("&View"));
696  menuBar->Append(toolMenu, _T("&Tools"));
697  menuBar->Append(optionsMenu, _T("&Options"));
698  menuBar->Append(helpMenu, _T("&Help"));
699 
700  SetMenuBar(menuBar);
701 }
702 
703 /**
704  * Returns a menu accelerator string for a command.
705  *
706  * The returned string can be appended to the menu item text to set the
707  * keyboard shortcut defined in the options for the command.
708  *
709  * @param id Command ID.
710  * @return Accelerator string.
711  */
712 wxString
714 
715  const CommandRegistry* reg = wxGetApp().commandRegistry();
716  const GUIOptions* options = wxGetApp().options();
717  std::string cmdName = reg->commandName(id);
718  const KeyboardShortcut* sc = options->keyboardShortcut(cmdName);
719 
720  if (sc != NULL) {
721  wxString accel = _T("\t");
722  if (sc->ctrl()) {
723  accel.Append(_T("Ctrl-"));
724  accel.Append(WxConversion::toWxString(sc->key()));
725  return accel;
726  } else if (sc->alt()) {
727  accel.Append(_T("Alt-"));
728  accel.Append(WxConversion::toWxString(sc->key()));
729  return accel;
730  } else if (sc->fKey() > 0) {
731  accel.Append(_T("F"));
732  accel.Append(WxConversion::toWxString(sc->fKey()));
733  return accel;
734  } else {
735  // Invalid shortcut.
736  return _T("");
737  }
738  }
739  return _T("");
740 }
741 
742 /**
743  * Creates the toolbar.
744  */
745 void
747 
748  // delete old toolbar
749  if (toolbar_ != NULL) {
750  delete toolbar_;
751  toolbar_ = NULL;
752  }
753 
754  CommandRegistry* registry = wxGetApp().commandRegistry();
755  ProDeOptions* options = wxGetApp().options();
756  wxString iconPath = WxConversion::toWxString(Environment::iconDirPath());
757 
758  toolbar_ = options->createToolbar(this, *registry, iconPath);
759 
760  // set new toolbar as the MainFrame toolbar
761  SetToolBar(toolbar_);
762  toolbar_->Show(true);
763 }
764 
765 /**
766  * Performs routines before exiting a program
767  *
768  * @param event Command event to handle.
769  */
770 void
771 MainFrame::OnExit(wxCommandEvent& WXUNUSED(event)) {
772  Close();
773 }
SaveOptionsCmd.hh
AddRFCmd.hh
ZoomInCmd.hh
CutComponentCmd
Definition: CutComponentCmd.hh:43
AddBusCmd
Definition: AddBusCmd.hh:43
NewDocumentCmd
Definition: NewDocumentCmd.hh:41
SelectCmd.hh
GUICommand::setParentWindow
void setParentWindow(wxWindow *view)
Definition: GUICommand.cc:64
EditImmediateSlotsCmd
Definition: EditImmediateSlotsCmd.hh:41
PasteComponentCmd.hh
ProDeConstants::COMMAND_NEW_DOC
@ COMMAND_NEW_DOC
Definition: ProDeConstants.hh:407
PrintCmd.hh
EditTemplatesCmd.hh
EditOptionsCmd
Definition: EditOptionsCmd.hh:42
ProDe.hh
CommandRegistry::commandName
std::string commandName(int id) const
Definition: CommandRegistry.cc:173
MainFrame::createMenubar
void createMenubar()
Definition: MainFrame.cc:414
ProDeConstants::COMMAND_ADD_FU_FROM_HDB
@ COMMAND_ADD_FU_FROM_HDB
Definition: ProDeConstants.hh:428
ProDeOptions
Definition: ProDeOptions.hh:44
ProDeConstants::COMMAND_EDIT_OTA_FORMATS
@ COMMAND_EDIT_OTA_FORMATS
Definition: ProDeConstants.hh:442
BlocksConnectICCmd.hh
ProDeConstants::COMMAND_SAVE_OPTIONS
@ COMMAND_SAVE_OPTIONS
Definition: ProDeConstants.hh:464
ProDeConstants::COMMAND_UNDO
@ COMMAND_UNDO
Definition: ProDeConstants.hh:433
AddSocketCmd
Definition: AddSocketCmd.hh:43
ProDeConstants::COMMAND_ADD_IU
@ COMMAND_ADD_IU
Definition: ProDeConstants.hh:422
WxConversion::toWxString
static wxString toWxString(const std::string &source)
QuitCmd
Definition: QuitCmd.hh:41
ToolbarButton::action
std::string action() const
Definition: ToolbarButton.cc:90
CommandRegistry::isEnabled
bool isEnabled(const std::string command)
Definition: CommandRegistry.cc:210
GUICommand::isEnabled
virtual bool isEnabled()=0
ChildFrame.hh
ProDeConstants::COMMAND_MODIFY_COMP
@ COMMAND_MODIFY_COMP
Definition: ProDeConstants.hh:431
EditTemplatesCmd
Definition: EditTemplatesCmd.hh:43
CommandRegistry.hh
ProDeConstants::COMMAND_EDIT_CONNECTIONS
@ COMMAND_EDIT_CONNECTIONS
Definition: ProDeConstants.hh:439
AddASCmd.hh
SaveDocumentAsCmd
Definition: SaveDocumentAsCmd.hh:41
MainFrame
Definition: MainFrame.hh:50
AddBridgeCmd
Definition: AddBridgeCmd.hh:43
EditConnectionsCmd
Definition: EditConnectionsCmd.hh:42
ProDeConstants::COMMAND_QUIT
@ COMMAND_QUIT
Definition: ProDeConstants.hh:415
ProDeConstants::COMMAND_PRINT
@ COMMAND_PRINT
Definition: ProDeConstants.hh:412
FitHeightCmd.hh
ProDeConstants::COMMAND_ABOUT
@ COMMAND_ABOUT
Definition: ProDeConstants.hh:467
GUICommand::isChecked
virtual bool isChecked() const
Definition: GUICommand.cc:112
PrintCmd
Definition: PrintCmd.hh:41
ProDeConstants::COMMAND_ADD_GCU
@ COMMAND_ADD_GCU
Definition: ProDeConstants.hh:423
ProDeConstants::COMMAND_EDIT_ADDRESS_SPACES
@ COMMAND_EDIT_ADDRESS_SPACES
Definition: ProDeConstants.hh:440
SelectCmd
Definition: SelectCmd.hh:41
AddRFFromHDBCmd.hh
ProDeConstants::COMMAND_ZOOM_FIT_HEI
@ COMMAND_ZOOM_FIT_HEI
Definition: ProDeConstants.hh:450
EditMachineCmd
Definition: EditMachineCmd.hh:39
ToolbarButton
Definition: ToolbarButton.hh:48
ProDeConstants::COMMAND_ZOOM_FIT_WID
@ COMMAND_ZOOM_FIT_WID
Definition: ProDeConstants.hh:451
ProDeConstants::COMMAND_ADD_FU
@ COMMAND_ADD_FU
Definition: ProDeConstants.hh:417
PrintPreviewCmd.hh
AddFUFromHDBCmd
Definition: AddFUFromHDBCmd.hh:41
ProDeConstants::COMMAND_DELETE_COMP
@ COMMAND_DELETE_COMP
Definition: ProDeConstants.hh:430
KeyboardShortcut::key
char key() const
Definition: KeyboardShortcut.cc:190
FitWidthCmd.hh
ModifyComponentCmd
Definition: ModifyComponentCmd.hh:43
EditBusOrderCmd.hh
MainFrame::ID_ADD_SUBMENU
@ ID_ADD_SUBMENU
Definition: MainFrame.hh:79
CallExplorerPluginCmd.hh
ProDeConstants::COMMAND_ZOOM_FIT_WIN
@ COMMAND_ZOOM_FIT_WIN
Definition: ProDeConstants.hh:449
QuitCmd.hh
AddSocketCmd.hh
ProDeConstants::COMMAND_ADD_AS
@ COMMAND_ADD_AS
Definition: ProDeConstants.hh:424
GUICommand::Do
virtual bool Do()=0
EditorCommand::setView
void setView(wxView *view)
Definition: EditorCommand.cc:65
OpenDocumentCmd
Definition: OpenDocumentCmd.hh:41
DeleteComponentCmd.hh
ProDeConstants::COMMAND_COPY
@ COMMAND_COPY
Definition: ProDeConstants.hh:436
CommandRegistry::createCommand
GUICommand * createCommand(const int id)
Definition: CommandRegistry.cc:69
SaveDocumentCmd
Definition: SaveDocumentCmd.hh:41
ProDeConstants::COMMAND_OPEN_DOC
@ COMMAND_OPEN_DOC
Definition: ProDeConstants.hh:408
RedoCmd
Definition: RedoCmd.hh:41
ProDeConstants::COMMAND_ZOOM_IN
@ COMMAND_ZOOM_IN
Definition: ProDeConstants.hh:447
ZoomOutCmd
Definition: ZoomOutCmd.hh:40
VLIWConnectICCmd.hh
EditImmediateSlotsCmd.hh
CloseDocumentCmd
Definition: CloseDocumentCmd.hh:41
AddASCmd
Definition: AddASCmd.hh:43
assert
#define assert(condition)
Definition: Application.hh:86
ProDeConstants::COMMAND_CUT
@ COMMAND_CUT
Definition: ProDeConstants.hh:435
SaveOptionsCmd
Definition: SaveOptionsCmd.hh:42
ToggleUnitDetailsCmd.hh
CloseDocumentCmd.hh
ImplementMachineCmd.hh
GUICommand
Definition: GUICommand.hh:43
EditAddressSpacesCmd
Definition: EditAddressSpacesCmd.hh:40
KeyboardShortcut.hh
AddIUCmd.hh
AddFUCmd.hh
ErrorDialog
Definition: ErrorDialog.hh:42
ProDeConstants::COMMAND_EDIT_MACHINE
@ COMMAND_EDIT_MACHINE
Definition: ProDeConstants.hh:445
EditConnectionsCmd.hh
ProDeExportCmd.hh
AboutCmd.hh
ProDeConstants::COMMAND_SAVE_DOC
@ COMMAND_SAVE_DOC
Definition: ProDeConstants.hh:410
ProDeConstants::COMMAND_SELECT
@ COMMAND_SELECT
Definition: ProDeConstants.hh:460
ErrorDialog.hh
MainFrame::ID_VIEW_TOOLBAR
@ ID_VIEW_TOOLBAR
Definition: MainFrame.hh:82
AddGCUCmd.hh
CutComponentCmd.hh
ProDeConstants::COMMAND_EDIT_OPTIONS
@ COMMAND_EDIT_OPTIONS
Definition: ProDeConstants.hh:462
AddBridgeCmd.hh
MainFrame::ID_ZOOM_SUBMENU
@ ID_ZOOM_SUBMENU
Definition: MainFrame.hh:81
ProDeConstants::COMMAND_SAVEAS_DOC
@ COMMAND_SAVEAS_DOC
Definition: ProDeConstants.hh:411
ProDeConstants::COMMAND_ZOOM_OUT
@ COMMAND_ZOOM_OUT
Definition: ProDeConstants.hh:448
UndoCmd.hh
AddGCUCmd
Definition: AddGCUCmd.hh:44
EditOTAFormatsCmd
Definition: EditOTAFormatsCmd.hh:43
CommandRegistry
Definition: CommandRegistry.hh:47
ProDeConstants::COMMAND_ADD_BUS
@ COMMAND_ADD_BUS
Definition: ProDeConstants.hh:419
ProDeConstants::COMMAND_CALL_EXPLORER_PLUGIN
@ COMMAND_CALL_EXPLORER_PLUGIN
Definition: ProDeConstants.hh:459
ProDeConstants::COMMAND_IMPLEMENTATION
@ COMMAND_IMPLEMENTATION
Definition: ProDeConstants.hh:458
MainFrame::ID_ADD_FROM_HDB_SUBMENU
@ ID_ADD_FROM_HDB_SUBMENU
Definition: MainFrame.hh:80
MainFrame::onKeyEvent
void onKeyEvent(wxKeyEvent &event)
Definition: MainFrame.cc:406
UserManualCmd
Definition: UserManualCmd.hh:40
Environment.hh
EditOptionsCmd.hh
EditAddressSpacesCmd.hh
MainFrame::updateUI
void updateUI()
Definition: MainFrame.cc:373
ProDeConstants::COMMAND_FULLY_CONNECT_BUSSES
@ COMMAND_FULLY_CONNECT_BUSSES
Definition: ProDeConstants.hh:454
FitWindowCmd
Definition: FitWindowCmd.hh:40
AboutCmd
Definition: AboutCmd.hh:40
ProDeConstants::COMMAND_TOGGLE_UNIT_DETAILS
@ COMMAND_TOGGLE_UNIT_DETAILS
Definition: ProDeConstants.hh:452
ProDeConstants::COMMAND_ADD_RF
@ COMMAND_ADD_RF
Definition: ProDeConstants.hh:418
ProDeConstants::COMMAND_PRINT_PREVIEW
@ COMMAND_PRINT_PREVIEW
Definition: ProDeConstants.hh:413
ProDeConstants::COMMAND_REDO
@ COMMAND_REDO
Definition: ProDeConstants.hh:434
ProDeConstants::COMMAND_EDIT_IMMEDIATE_SLOTS
@ COMMAND_EDIT_IMMEDIATE_SLOTS
Definition: ProDeConstants.hh:443
UndoCmd
Definition: UndoCmd.hh:41
FullyConnectBussesCmd
Definition: FullyConnectBussesCmd.hh:49
PrintPreviewCmd
Definition: PrintPreviewCmd.hh:42
AddRFFromHDBCmd
Definition: AddRFFromHDBCmd.hh:41
PasteComponentCmd
Definition: PasteComponentCmd.hh:49
CommandRegistry::commandId
int commandId(const std::string name) const
Definition: CommandRegistry.cc:137
EditBusOrderCmd
Definition: EditBusOrderCmd.hh:41
NewDocumentCmd.hh
ProDeConstants::COMMAND_EDIT_BUS_ORDER
@ COMMAND_EDIT_BUS_ORDER
Definition: ProDeConstants.hh:444
ZoomOutCmd.hh
MainFrame::onUpdateUI
void onUpdateUI(wxUpdateUIEvent &event)
Definition: MainFrame.cc:338
ProDeConstants::COMMAND_CLOSE_DOC
@ COMMAND_CLOSE_DOC
Definition: ProDeConstants.hh:409
ProDeConstants.hh
CopyComponentCmd
Definition: CopyComponentCmd.hh:43
ImplementMachineCmd
Definition: ImplementMachineCmd.hh:43
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
KeyboardShortcut
Definition: KeyboardShortcut.hh:50
GUIOptions
Definition: GUIOptions.hh:58
MainFrame.hh
AddIUCmd
Definition: AddIUCmd.hh:43
EditOTAFormatsCmd.hh
KeyboardShortcut::fKey
int fKey() const
Definition: KeyboardShortcut.cc:149
MainFrame::ID_VIEW_STATUSBAR
@ ID_VIEW_STATUSBAR
Definition: MainFrame.hh:83
ProDeConstants::COMMAND_EDIT_TEMPLATES
@ COMMAND_EDIT_TEMPLATES
Definition: ProDeConstants.hh:441
ZoomInCmd
Definition: ZoomInCmd.hh:40
CopyComponentCmd.hh
ProDeOptions.hh
FitWindowCmd.hh
Environment::iconDirPath
static std::string iconDirPath()
Definition: Environment.cc:225
FitWidthCmd
Definition: FitWidthCmd.hh:40
ProDeConstants::COMMAND_VLIW_CONNECT_IC
@ COMMAND_VLIW_CONNECT_IC
Definition: ProDeConstants.hh:455
UserManualCmd::COMMAND_ID
static const int COMMAND_ID
Command ID.
Definition: UserManualCmd.hh:58
MainFrame::toolbar_
wxToolBar * toolbar_
Toolbar.
Definition: MainFrame.hh:75
MainFrame::onCommandEvent
void onCommandEvent(wxCommandEvent &event)
Definition: MainFrame.cc:283
ProDeConstants::COMMAND_ADD_SOCKET
@ COMMAND_ADD_SOCKET
Definition: ProDeConstants.hh:420
MainFrame::onToggleToolbar
void onToggleToolbar()
Definition: MainFrame.cc:196
AddIUFromHDBCmd.hh
VerifyMachineCmd.hh
EditorCommand
Definition: EditorCommand.hh:46
VerifyMachineCmd
Definition: VerifyMachineCmd.hh:42
WxConversion.hh
ModifyComponentCmd.hh
VLIWConnectICCmd
Definition: VLIWConnectICCmd.hh:42
FullyConnectBussesCmd.hh
BlocksConnectICCmd
Definition: BlocksConnectICCmd.hh:41
MainFrame::createHelpMenu
wxMenu * createHelpMenu()
Definition: MainFrame.cc:260
EditMachineCmd.hh
AddRFCmd
Definition: AddRFCmd.hh:43
ProDeConstants::COMMAND_ADD_IU_FROM_HDB
@ COMMAND_ADD_IU_FROM_HDB
Definition: ProDeConstants.hh:427
ProDeConstants::COMMAND_EXPORT
@ COMMAND_EXPORT
Definition: ProDeConstants.hh:414
RedoCmd.hh
ProDeConstants::COMMAND_ADD_RF_FROM_HDB
@ COMMAND_ADD_RF_FROM_HDB
Definition: ProDeConstants.hh:426
MainFrame::onToggleStatusbar
void onToggleStatusbar()
Definition: MainFrame.cc:215
AddBusCmd.hh
OpenDocumentCmd.hh
ProDeConstants::COMMAND_PASTE
@ COMMAND_PASTE
Definition: ProDeConstants.hh:437
AddFUCmd
Definition: AddFUCmd.hh:43
SaveDocumentCmd.hh
AddFUFromHDBCmd.hh
FitHeightCmd
Definition: FitHeightCmd.hh:40
ProDeConstants::COMMAND_ADD_BRIDGE
@ COMMAND_ADD_BRIDGE
Definition: ProDeConstants.hh:421
UserManualCmd.hh
SaveDocumentAsCmd.hh
KeyboardShortcut::ctrl
bool ctrl() const
Definition: KeyboardShortcut.cc:165
ProDeExportCmd
Definition: ProDeExportCmd.hh:43
MainFrame::createToolbar
void createToolbar()
Definition: MainFrame.cc:746
MainFrame::menuAccelerator
wxString menuAccelerator(int id)
Definition: MainFrame.cc:713
DeleteComponentCmd
Definition: DeleteComponentCmd.hh:43
KeyboardShortcut::alt
bool alt() const
Definition: KeyboardShortcut.cc:177
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
MainFrame::OnExit
void OnExit(wxCommandEvent &WXUNUSED(event))
Definition: MainFrame.cc:771
MainFrame::createOptionsMenu
wxMenu * createOptionsMenu()
Definition: MainFrame.cc:237
ProDeConstants::COMMAND_VERIFY_MACHINE
@ COMMAND_VERIFY_MACHINE
Definition: ProDeConstants.hh:457
ProDeConstants::COMMAND_BLOCKS_CONNECT_IC
@ COMMAND_BLOCKS_CONNECT_IC
Definition: ProDeConstants.hh:456
AddIUFromHDBCmd
Definition: AddIUFromHDBCmd.hh:41
CallExplorerPluginCmd
Definition: CallExplorerPluginCmd.hh:43
ToggleUnitDetailsCmd
Definition: ToggleUnitDetailsCmd.hh:41