void frmCANALSession::CreateControls() { ////@begin frmCANALSession content construction frmCANALSession* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; wxMenu* itemMenu35 = new wxMenu; itemMenu35->Append(ID_MENUITEM_CANAL_LOAD_MSG_LIST, _("Load CAN message list from file..."), _T(""), wxITEM_NORMAL); itemMenu35->Append(ID_MENUITEM_CANAL_SAVE_MSG_LIST, _("Save CAN message list to file..."), _T(""), wxITEM_NORMAL); itemMenu35->AppendSeparator(); itemMenu35->Append(ID_MENUITEM_CANAL_LOAD_TRANSMISSION_SET, _("Load transmission set from file..."), _T(""), wxITEM_NORMAL); itemMenu35->Append(ID_MENUITEM_CANAL_SAVE_TRANSMISSION_SET, _("Save transmission set to file..."), _T(""), wxITEM_NORMAL); itemMenu35->AppendSeparator(); itemMenu35->Append(ID_MENUITEM_CANAL_EXIT, _("Exit"), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu35, _("File")); wxMenu* itemMenu43 = new wxMenu; itemMenu43->Append(ID_MENUITEM_CANAL_CUT, _("Cut"), _T(""), wxITEM_NORMAL); itemMenu43->Append(ID_MENUITEM_CANAL_COPY, _("Copy"), _T(""), wxITEM_NORMAL); itemMenu43->Append(ID_MENUITEM_CANAL_PASTE, _("Paste"), _T(""), wxITEM_NORMAL); itemMenu43->AppendSeparator(); menuBar->Append(itemMenu43, _("Edit")); wxMenu* itemMenu48 = new wxMenu; itemMenu48->Append(ID_MENUITEM_CANAL_LOG, _("Message Log"), _T(""), wxITEM_RADIO); itemMenu48->Check(ID_MENUITEM_CANAL_LOG, true); itemMenu48->Append(ID_MENUITEM_CANAL_COUNT, _("Message Count"), _T(""), wxITEM_RADIO); menuBar->Append(itemMenu48, _("View")); wxMenu* itemMenu51 = new wxMenu; itemMenu51->Append(ID_MENUITEM_CANAL_AUTO_REPLY, _("Auto Reply Settings..."), _T(""), wxITEM_NORMAL); itemMenu51->Append(ID_MENUITEM_CANAL_BURST_COUNT, _("Set Burst Count..."), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu51, _("Tools")); wxMenu* itemMenu54 = new wxMenu; itemMenu54->Append(ID_MENUITEM_CANAL_HELP, _("VSCP-Works Help"), _T(""), wxITEM_RADIO); itemMenu54->Append(ID_MENUITEM_CANAL_FAQ, _("Frequently Asked Questions"), _T(""), wxITEM_NORMAL); itemMenu54->Append(ID_MENUITEM_CANAL_SHORTCUTS, _("Keyboard shortcuts"), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_THANKS, _("Thanks..."), _T(""), wxITEM_NORMAL); itemMenu54->Append(ID_MENUITEM_CANAL_CREDITS, _("Credits..."), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_VSCP_SITE, _("Go to VSCP site"), _T(""), wxITEM_NORMAL); itemMenu54->AppendSeparator(); itemMenu54->Append(ID_MENUITEM_CANAL_ABOUT, _("About"), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu54, _("Help")); itemFrame1->SetMenuBar(menuBar); wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); itemFrame1->SetSizer(itemBoxSizer2); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 2); m_ctrlGridReceive = new wxGrid( itemFrame1, ID_GRID_RECEIVE, wxDefaultPosition, wxSize(800, 300), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL ); m_ctrlGridReceive->SetBackgroundColour(wxColour(251, 252, 170)); m_ctrlGridReceive->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD, false, wxT(""))); m_ctrlGridReceive->SetDefaultColSize(100); m_ctrlGridReceive->SetDefaultRowSize(22); m_ctrlGridReceive->SetColLabelSize(22); m_ctrlGridReceive->SetRowLabelSize(30); m_ctrlGridReceive->CreateGrid(1, 8, wxGrid::wxGridSelectRows); itemBoxSizer3->Add(m_ctrlGridReceive, 0, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); itemBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxHORIZONTAL); itemBoxSizer5->Add(itemBoxSizer6, 0, wxGROW|wxALL, 0); wxBoxSizer* itemBoxSizer7 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer7, 0, wxGROW|wxALL, 5); m_btnEdit = new wxBitmapButton; m_btnEdit->Create( itemFrame1, ID_BITMAPBUTTON_CANAL_EDIT, itemFrame1->GetBitmapResource(wxT("open.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnEdit->SetToolTip(_("Edit selected line")); itemBoxSizer7->Add(m_btnEdit, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnDelete = new wxBitmapButton; m_btnDelete->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_DELETE, itemFrame1->GetBitmapResource(wxT("cut.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnDelete->SetToolTip(_("Delete selected line")); itemBoxSizer7->Add(m_btnDelete, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); itemBoxSizer7->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2); m_btnLoadSet = new wxBitmapButton; m_btnLoadSet->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_LOAD, itemFrame1->GetBitmapResource(wxT("copy.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnLoadSet->SetToolTip(_("Load transmission set from file...")); itemBoxSizer7->Add(m_btnLoadSet, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnSaveSet = new wxBitmapButton; m_btnSaveSet->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_SAVE, itemFrame1->GetBitmapResource(wxT("filesaveas.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnSaveSet->SetToolTip(_("Save transmission set to file...")); itemBoxSizer7->Add(m_btnSaveSet, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer13, 0, wxGROW|wxALL, 5); m_ctrlGridTransmission = new wxGrid( itemFrame1, ID_GRID_TRANSMISSION, wxDefaultPosition, wxSize(750, 100), wxHSCROLL|wxVSCROLL ); m_ctrlGridTransmission->SetFont(wxFont(8, wxDEFAULT, wxNORMAL, wxBOLD, false, wxT(""))); m_ctrlGridTransmission->SetDefaultColSize(100); m_ctrlGridTransmission->SetDefaultRowSize(22); m_ctrlGridTransmission->SetColLabelSize(22); m_ctrlGridTransmission->SetRowLabelSize(30); m_ctrlGridTransmission->CreateGrid(100, 5, wxGrid::wxGridSelectRows); itemBoxSizer13->Add(m_ctrlGridTransmission, 400, wxGROW|wxALL, 2); wxBoxSizer* itemBoxSizer15 = new wxBoxSizer(wxVERTICAL); itemBoxSizer6->Add(itemBoxSizer15, 0, wxGROW|wxALL, 5); m_btnSend = new wxBitmapButton; m_btnSend->Create( itemFrame1, ID_BITMAPBUTTONID_MENUITEM_CANAL_SEND, itemFrame1->GetBitmapResource(wxT("copy.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); if (frmCANALSession::ShowToolTips()) m_btnSend->SetToolTip(_("Send message from selected row(s)")); itemBoxSizer15->Add(m_btnSend, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); itemBoxSizer15->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 2); m_btnActivate = new wxBitmapButton; m_btnActivate->Create( itemFrame1, ID_BITMAPBUTTON12, itemFrame1->GetBitmapResource(wxT("Print.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); m_btnActivate->Show(false); itemBoxSizer15->Add(m_btnActivate, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); m_btnClear = new wxBitmapButton; m_btnClear->Create( itemFrame1, ID_BITMAPBUTTON13, itemFrame1->GetBitmapResource(wxT("open.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); m_btnClear->Show(false); itemBoxSizer15->Add(m_btnClear, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 0); wxToolBar* itemToolBar20 = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL, ID_TOOLBAR_CANAL ); wxBitmap itemtool21Bitmap(itemFrame1->GetBitmapResource(wxT("open.xpm"))); wxBitmap itemtool21BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_OPEN, _T(""), itemtool21Bitmap, itemtool21BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool22Bitmap(itemFrame1->GetBitmapResource(wxT("save.xpm"))); wxBitmap itemtool22BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_SAVE, _T(""), itemtool22Bitmap, itemtool22BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxBitmap itemtool24Bitmap(itemFrame1->GetBitmapResource(wxT("cut.xpm"))); wxBitmap itemtool24BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_CUT, _T(""), itemtool24Bitmap, itemtool24BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool25Bitmap(itemFrame1->GetBitmapResource(wxT("copy.xpm"))); wxBitmap itemtool25BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_COPY, _T(""), itemtool25Bitmap, itemtool25BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool26Bitmap(itemFrame1->GetBitmapResource(wxT("paste.xpm"))); wxBitmap itemtool26BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PASTE, _T(""), itemtool26Bitmap, itemtool26BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxBitmap itemtool28Bitmap(itemFrame1->GetBitmapResource(wxT("Preview.xpm"))); wxBitmap itemtool28BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PREVIEW, _T(""), itemtool28Bitmap, itemtool28BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); wxBitmap itemtool29Bitmap(itemFrame1->GetBitmapResource(wxT("Print.xpm"))); wxBitmap itemtool29BitmapDisabled; itemToolBar20->AddTool(ID_TOOL_CANAL_PRINT, _T(""), itemtool29Bitmap, itemtool29BitmapDisabled, wxITEM_NORMAL, _T(""), wxEmptyString); itemToolBar20->AddSeparator(); wxArrayString m_comboSelectViewStrings; m_comboSelectViewStrings.Add(_("Message Log")); m_comboSelectViewStrings.Add(_("Message Count")); m_comboSelectView = new wxComboBox; m_comboSelectView->Create( itemToolBar20, ID_COMBOBOX, _("Message Log"), wxDefaultPosition, wxDefaultSize, m_comboSelectViewStrings, wxCB_DROPDOWN ); m_comboSelectView->SetStringSelection(_("Message Log")); if (frmCANALSession::ShowToolTips()) m_comboSelectView->SetToolTip(_("Select the way messages are shown")); m_comboSelectView->SetBackgroundColour(wxColour(255, 255, 185)); itemToolBar20->AddControl(m_comboSelectView); itemToolBar20->AddSeparator(); m_ctrlBtnActivateInterface = new wxBitmapButton; m_ctrlBtnActivateInterface->Create( itemToolBar20, ID_BITMAPBUTTON, itemFrame1->GetBitmapResource(wxT("New1.xpm")), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); itemToolBar20->AddControl(m_ctrlBtnActivateInterface); itemToolBar20->Realize(); itemFrame1->SetToolBar(itemToolBar20); ////@end frmCANALSession content construction // Receive Grid m_ctrlGridReceive->SetCellBackgroundColour( g_Config.m_CanalRcvFrameBgColour ); m_ctrlGridReceive->SetGridLineColour( g_Config.m_CanalRcvFrameLineColour ); m_ctrlGridReceive->SetCellTextColour( g_Config.m_CanalRcvFrameTextColour ); m_ctrlGridReceive->SetRowLabelSize( 50 ); m_ctrlGridReceive->SetColSize( 0, g_Config.m_CanalRcvFieldWidth[0] ); m_ctrlGridReceive->SetColLabelValue( 0, g_Config.m_CanalRcvFieldText[0] ); m_ctrlGridReceive->SetColSize( 1, g_Config.m_CanalRcvFieldWidth[1] ); m_ctrlGridReceive->SetColLabelValue( 1, g_Config.m_CanalRcvFieldText[1] ); m_ctrlGridReceive->SetColSize( 2, g_Config.m_CanalRcvFieldWidth[2] ); m_ctrlGridReceive->SetColLabelValue( 2, g_Config.m_CanalRcvFieldText[2] ); m_ctrlGridReceive->SetColSize( 3, g_Config.m_CanalRcvFieldWidth[3] ); m_ctrlGridReceive->SetColLabelValue( 3, g_Config.m_CanalRcvFieldText[3] ); m_ctrlGridReceive->SetColSize( 4,g_Config.m_CanalRcvFieldWidth[4] ); m_ctrlGridReceive->SetColLabelValue( 4, g_Config.m_CanalRcvFieldText[4] ); m_ctrlGridReceive->SetColSize( 5, g_Config.m_CanalRcvFieldWidth[5] ); m_ctrlGridReceive->SetColLabelValue( 5, g_Config.m_CanalRcvFieldText[5] ); m_ctrlGridReceive->SetColSize( 6, g_Config.m_CanalRcvFieldWidth[6] ); m_ctrlGridReceive->SetColLabelValue( 6, g_Config.m_CanalRcvFieldText[6] ); m_ctrlGridReceive->SetColSize( 7, g_Config.m_CanalRcvFieldWidth[7] ); m_ctrlGridReceive->SetColLabelValue( 7, g_Config.m_CanalRcvFieldText[7] ); // Transmit Grid m_ctrlGridTransmission->SetCellBackgroundColour( g_Config.m_CanalTrmitFrameBgColour ); m_ctrlGridTransmission->SetGridLineColour( g_Config.m_CanalTrmitFrameLineColour ); m_ctrlGridTransmission->SetCellTextColour( g_Config.m_CanalTrmitFrameTextColour ); m_ctrlGridTransmission->SetRowLabelSize( 50 ); m_ctrlGridTransmission->SetColSize( 0, g_Config.m_CanalTrmitFieldWidth[0] ); m_ctrlGridTransmission->SetColLabelValue( 0, g_Config.m_CanalTrmitFieldText[0] ); m_ctrlGridTransmission->SetColSize( 1, g_Config.m_CanalTrmitFieldWidth[1] ); m_ctrlGridTransmission->SetColLabelValue( 1, g_Config.m_CanalTrmitFieldText[1] ); m_ctrlGridTransmission->SetColSize( 2, g_Config.m_CanalTrmitFieldWidth[2] ); m_ctrlGridTransmission->SetColLabelValue( 2, g_Config.m_CanalTrmitFieldText[2] ); m_ctrlGridTransmission->SetColSize( 3, g_Config.m_CanalTrmitFieldWidth[3] ); m_ctrlGridTransmission->SetColLabelValue( 3, g_Config.m_CanalTrmitFieldText[3] ); m_ctrlGridTransmission->SetColSize( 4, g_Config.m_CanalTrmitFieldWidth[4] ); m_ctrlGridTransmission->SetColLabelValue( 4, g_Config.m_CanalTrmitFieldText[4] ); }
void GamessQFrame::CreateControls() { ////@begin GamessQFrame content construction GamessQFrame* itemFrame1 = this; wxMenuBar* menuBar = new wxMenuBar; AppMenu = new wxMenu; AppMenu->Append(wxID_PREFERENCES, _("&Preferences"), _("Change the way GamessQ behaves"), wxITEM_NORMAL); AppMenu->Append(ID_PAUSEALL, _("&Pause All"), _("Pause Everything"), wxITEM_CHECK); AppMenu->AppendSeparator(); AppMenu->Append(wxID_EXIT, _("E&xit"), _("Exit GamessQ"), wxITEM_NORMAL); menuBar->Append(AppMenu, _("&Queue")); jobsMenu = new wxMenu; { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_ADD, _("&Add Jobs\tCtrl+A"), _("Add new GAMESS jobs to the end of the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/add-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_REMOVE, _("Remove Jobs"), _("Remove the selected GAMESS jobs from the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/remove-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_CANCEL, _("&Cancel Jobs"), _("Cancel the selected GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/cancel-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_PAUSE, _("&Pause Jobs\tCtrl+P"), _("Pause the selected GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/pause-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_RESUME, _("&Resume Jobs\tCtrl+R"), _("Resume the selected paused GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/resume-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_SAVEFOLDER, _("Save Output to Folder\tCtrl+S"), _("Save GAMESS output for selected jobs to a folder"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("menu/wxSave"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_SAVEAS, _("Save Output As..."), _("Save GAMESS output for this job"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("menu/wxSaveAs"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->Append(ID_MACMOLPLT, _("Open in wxMacMolPlt\tCtrl+O"), _T(""), wxITEM_NORMAL); jobsMenu->Append(ID_VIEWLOGS, _("View &Logs"), _("View the GAMESS log files for the selected jobs"), wxITEM_NORMAL); jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_REFRESH, _("Refresh\tAlt-R"), _("Refresh the display of the queue status"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/refresh-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_CLEAR, _("Clean Up"), _("Clear all finished GAMESS jobs from the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/clear-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } menuBar->Append(jobsMenu, _("&Jobs")); //Yes this is a complete copy of the menu that was just added to the Menubar. At least in //wx 3.0 wx throws an assertion saying that a popupmenu is not supposed to be attached to //another menu or menubar. So after attaching the previous copy recreate it. The copy //attached to the menu is now "owned" by the Menu/window. jobsMenu = new wxMenu; { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_ADD, _("&Add Jobs\tCtrl+A"), _("Add new GAMESS jobs to the end of the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/add-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_REMOVE, _("Remove Jobs"), _("Remove the selected GAMESS jobs from the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/remove-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_CANCEL, _("&Cancel Jobs"), _("Cancel the selected GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/cancel-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_PAUSE, _("&Pause Jobs\tCtrl+P"), _("Pause the selected GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/pause-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_RESUME, _("&Resume Jobs\tCtrl+R"), _("Resume the selected paused GAMESS jobs"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/resume-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_SAVEFOLDER, _("Save Output to Folder\tCtrl+S"), _("Save GAMESS output for selected jobs to a folder"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("menu/wxSave"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_SAVEAS, _("Save Output As..."), _("Save GAMESS output for this job"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("menu/wxSaveAs"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->Append(ID_MACMOLPLT, _("Open in wxMacMolPlt\tCtrl+O"), _T(""), wxITEM_NORMAL); jobsMenu->Append(ID_VIEWLOGS, _("View &Logs"), _("View the GAMESS log files for the selected jobs"), wxITEM_NORMAL); jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, ID_REFRESH, _("Refresh\tAlt-R"), _("Refresh the display of the queue status"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/refresh-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } jobsMenu->AppendSeparator(); { wxMenuItem* menuItem = new wxMenuItem(jobsMenu, wxID_CLEAR, _("Clean Up"), _("Clear all finished GAMESS jobs from the queue"), wxITEM_NORMAL); wxBitmap bitmap(itemFrame1->GetBitmapResource(wxT("icons/clear-16.png"))); menuItem->SetBitmap(bitmap); jobsMenu->Append(menuItem); } wxMenu* itemMenu24 = new wxMenu; itemMenu24->Append(wxID_ABOUT, _("&About"), _T(""), wxITEM_NORMAL); menuBar->Append(itemMenu24, _("&Help")); itemFrame1->SetMenuBar(menuBar); jobsToolbar = CreateToolBar( wxTB_FLAT|wxTB_HORIZONTAL|wxTB_TEXT|wxTB_NODIVIDER, ID_TOOLBAR1 ); jobsToolbar->SetToolBitmapSize(wxSize(24, 24)); wxBitmap itemtool27Bitmap(itemFrame1->GetBitmapResource(wxT("icons/add-24.png"))); wxBitmap itemtool27BitmapDisabled; jobsToolbar->AddTool(wxID_ADD, _("Add"), itemtool27Bitmap, itemtool27BitmapDisabled, wxITEM_NORMAL, _T(""), _("Add a new GAMESS jobs to the end of the queue")); wxBitmap itemtool28Bitmap(itemFrame1->GetBitmapResource(wxT("icons/remove-24.png"))); wxBitmap itemtool28BitmapDisabled; jobsToolbar->AddTool(wxID_REMOVE, _("Remove"), itemtool28Bitmap, itemtool28BitmapDisabled, wxITEM_NORMAL, _T(""), _("Remove the selected GAMESS jobs from the queue")); jobsToolbar->AddSeparator(); wxBitmap itemtool30Bitmap(itemFrame1->GetBitmapResource(wxT("icons/cancel-24.png"))); wxBitmap itemtool30BitmapDisabled; jobsToolbar->AddTool(wxID_CANCEL, _("Cancel"), itemtool30Bitmap, itemtool30BitmapDisabled, wxITEM_NORMAL, _T(""), _("Cancel the selected GAMESS jobs")); wxBitmap itemtool31Bitmap(itemFrame1->GetBitmapResource(wxT("icons/pause-24.png"))); wxBitmap itemtool31BitmapDisabled; jobsToolbar->AddTool(ID_PAUSE, _("Pause"), itemtool31Bitmap, itemtool31BitmapDisabled, wxITEM_NORMAL, _T(""), _("Pause the selected GAMESS jobs")); wxBitmap itemtool32Bitmap(itemFrame1->GetBitmapResource(wxT("icons/resume-24.png"))); wxBitmap itemtool32BitmapDisabled; jobsToolbar->AddTool(ID_RESUME, _("Resume"), itemtool32Bitmap, itemtool32BitmapDisabled, wxITEM_NORMAL, _T(""), _("Resume the selected paused GAMESS jobs")); jobsToolbar->AddSeparator(); wxBitmap itemtool34Bitmap(itemFrame1->GetBitmapResource(wxT("icons/refresh-24.png"))); wxBitmap itemtool34BitmapDisabled; jobsToolbar->AddTool(ID_REFRESH, _("Refresh"), itemtool34Bitmap, itemtool34BitmapDisabled, wxITEM_NORMAL, _T(""), _("Refresh the display of the queue status")); jobsToolbar->AddSeparator(); wxBitmap itemtool36Bitmap(itemFrame1->GetBitmapResource(wxT("icons/clear-24.png"))); wxBitmap itemtool36BitmapDisabled; jobsToolbar->AddTool(wxID_CLEAR, _("Clean Up"), itemtool36Bitmap, itemtool36BitmapDisabled, wxITEM_NORMAL, _T(""), _("Clear all finished GAMESS jobs from the queue")); jobsToolbar->Realize(); itemFrame1->SetToolBar(jobsToolbar); wxBoxSizer* itemBoxSizer37 = new wxBoxSizer(wxVERTICAL); itemFrame1->SetSizer(itemBoxSizer37); jobListCtrl = new wxListCtrl( itemFrame1, ID_JOBLISTCTRL, wxDefaultPosition, wxSize(590, 300), wxLC_REPORT|wxLC_EDIT_LABELS|wxLC_HRULES|wxLC_VRULES|wxSUNKEN_BORDER ); itemBoxSizer37->Add(jobListCtrl, 1, wxGROW|wxALL, 0); wxStatusBar* itemStatusBar39 = new wxStatusBar( itemFrame1, ID_STATUSBAR1, wxNO_BORDER ); itemStatusBar39->SetFieldsCount(1); itemFrame1->SetStatusBar(itemStatusBar39); ////@end GamessQFrame content construction // create the dialog objects mConfigDialog = new ConfigurationDialog(this); mJobOptionsDialog = new JobOptionsDialog(this); // initiate the queue manager, if this fails, we're toast if (! mQueueManager.Init()) { wxLogFatalError(wxT("Failed to start the backend!")); } mActive = mQueueManager.IsActive(); AppMenu->Check(ID_PAUSEALL, ! mActive); // load settings mConfig = new wxConfig(WX_CONFIG_APPNAME); wxString stringFreq; long freq; if (mConfig->Read(wxT("Refresh Frequency"), &freq)) { mRefreshFrequency = freq; } else { mConfigDialog->SetRefreshFrequency(mRefreshFrequency / 1000); mConfigDialog->SetGamessPath(mQueueManager.GetGamessDir()); mConfigDialog->SetSpoolDir(mQueueManager.GetSpoolDir()); mConfigDialog->Show(); } // start the timer mRefreshTimer = new wxTimer(this, ID_TIMER); mRefreshTimer->Start(mRefreshFrequency, wxTIMER_ONE_SHOT); // set up the queue list jobListCtrl->InsertColumn(0, wxT("Name")); jobListCtrl->InsertColumn(1, wxT("Processors")); jobListCtrl->InsertColumn(2, wxT("Status")); jobListCtrl->SetColumnWidth(0, 400); jobListCtrl->SetColumnWidth(1, wxLIST_AUTOSIZE_USEHEADER); jobListCtrl->SetColumnWidth(2, 80); RefreshList(); RefreshButtons(); SetDropTarget(new DropTarget(this)); }