ESC finally works

This commit is contained in:
dickelbeck 2008-03-19 14:38:06 +00:00
parent 7f9af0fdad
commit 00d253de20
3 changed files with 789 additions and 657 deletions

View File

@ -69,20 +69,20 @@ BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )
EVT_INIT_DIALOG( dialog_freeroute_exchange::OnInitDialog )
EVT_CLOSE( dialog_freeroute_exchange::OnCloseWindow )
EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick )
EVT_BUTTON( ID_BUTTON4, dialog_freeroute_exchange::OnButton4Click )
EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick )
EVT_BUTTON( ID_BUTTON5, dialog_freeroute_exchange::OnButton5Click )
EVT_BUTTON( ID_IMPORT_FREEROUTE_DSN_FILE, dialog_freeroute_exchange::OnImportFreerouteDsnFileClick )
EVT_BUTTON( ID_BUTTON6, dialog_freeroute_exchange::OnButton6Click )
EVT_BUTTON( ID_BUTTON7, dialog_freeroute_exchange::OnButton7Click )
EVT_TEXT( ID_TEXTCTRL2, dialog_freeroute_exchange::OnTextEditFrUrlUpdated )
EVT_TEXT( ID_TEXTCTRL3, dialog_freeroute_exchange::OnTextEditFrCmdUpdated )
EVT_BUTTON( wxID_CANCEL, dialog_freeroute_exchange::OnCancelClick )
EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick )
EVT_TEXT( ID_TEXT_EDIT_FR_URL, dialog_freeroute_exchange::OnTextEditFrUrlUpdated )
EVT_TEXT( ID_TEXT_EDIT_FR_CMD, dialog_freeroute_exchange::OnTextEditFrCmdUpdated )
////@end dialog_freeroute_exchange event table entries
END_EVENT_TABLE()
@ -156,6 +156,7 @@ void dialog_freeroute_exchange::Init()
{
////@begin dialog_freeroute_exchange member initialisation
m_FreeRouteSetupChanged = false;
m_ExportDSN = NULL;
m_FreerouteURLName = NULL;
m_FreerouteURLCommandString = NULL;
////@end dialog_freeroute_exchange member initialisation
@ -169,63 +170,70 @@ void dialog_freeroute_exchange::Init()
void dialog_freeroute_exchange::CreateControls()
{
////@begin dialog_freeroute_exchange content construction
// Generated by DialogBlocks, Wed 19 Mar 2008 00:26:30 CDT (unregistered)
// Generated by DialogBlocks, Wed 19 Mar 2008 09:36:35 CDT (unregistered)
dialog_freeroute_exchange* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
wxPanel* itemPanel3 = new wxPanel( itemDialog1, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL );
itemBoxSizer2->Add(itemPanel3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
wxButton* itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE, _("Export a Specctra Design (*.dsn) File"), wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxHORIZONTAL);
itemPanel3->SetSizer(itemBoxSizer4);
wxStaticBox* itemStaticBoxSizer5Static = new wxStaticBox(itemPanel3, wxID_ANY, _T(""));
wxStaticBoxSizer* itemStaticBoxSizer5 = new wxStaticBoxSizer(itemStaticBoxSizer5Static, wxVERTICAL);
itemBoxSizer4->Add(itemStaticBoxSizer5, 0, wxGROW|wxALL, 5);
m_ExportDSN = new wxButton( itemPanel3, ID_BUTTON4, _("Export a Specctra Design (*.dsn) File"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton4->SetToolTip(_("Export a Specctra DSN file (to FreeRouter)"));
itemBoxSizer3->Add(itemButton4, 0, wxGROW|wxALL, 5);
m_ExportDSN->SetToolTip(_("Export a Specctra DSN file (to FreeRouter)"));
itemStaticBoxSizer5->Add(m_ExportDSN, 0, wxGROW|wxALL, 5);
wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _("Launch FreeRouter via Browser"), wxDefaultPosition, wxDefaultSize, 0 );
wxButton* itemButton7 = new wxButton( itemPanel3, ID_BUTTON5, _("Launch FreeRouter via Browser"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton5->SetToolTip(_("User your browser's Java Web Start function to run FreeRouter via Internet"));
itemBoxSizer3->Add(itemButton5, 0, wxGROW|wxALL, 5);
itemButton7->SetToolTip(_("User your browser's Java Web Start function to run FreeRouter via Internet"));
itemStaticBoxSizer5->Add(itemButton7, 0, wxGROW|wxALL, 5);
wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE, _("Back Import the Specctra Session (*.ses) File"), wxDefaultPosition, wxDefaultSize, 0 );
wxButton* itemButton8 = new wxButton( itemPanel3, ID_BUTTON6, _("Back Import the Specctra Session (*.ses) File"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton6->SetToolTip(_("Merge a session file created by FreeRouter with the current board."));
itemBoxSizer3->Add(itemButton6, 0, wxGROW|wxALL, 5);
itemButton8->SetToolTip(_("Merge a session file created by FreeRouter with the current board."));
itemStaticBoxSizer5->Add(itemButton8, 0, wxGROW|wxALL, 5);
wxStdDialogButtonSizer* itemStdDialogButtonSizer7 = new wxStdDialogButtonSizer;
wxStaticBox* itemStaticBoxSizer9Static = new wxStaticBox(itemPanel3, wxID_ANY, _T(""));
wxStaticBoxSizer* itemStaticBoxSizer9 = new wxStaticBoxSizer(itemStaticBoxSizer9Static, wxVERTICAL);
itemBoxSizer4->Add(itemStaticBoxSizer9, 1, wxGROW|wxALL, 5);
itemBoxSizer3->Add(itemStdDialogButtonSizer7, 0, wxGROW|wxALL, 5);
wxButton* itemButton8 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton8->SetDefault();
itemStdDialogButtonSizer7->AddButton(itemButton8);
itemStdDialogButtonSizer7->Realize();
wxBoxSizer* itemBoxSizer9 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer9, 1, wxGROW|wxALL, 5);
wxButton* itemButton10 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, _("Visit the FreeRouting.net Website with your Browser"), wxDefaultPosition, wxDefaultSize, 0 );
wxButton* itemButton10 = new wxButton( itemPanel3, ID_BUTTON7, _("Visit the FreeRouting.net Website with your Browser"), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
itemButton10->SetToolTip(_("Launch your browser and go to the FreeRouting.net website"));
itemBoxSizer9->Add(itemButton10, 0, wxGROW|wxALL, 5);
itemStaticBoxSizer9->Add(itemButton10, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText11 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net URL"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemStaticText11, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxStaticText* itemStaticText11 = new wxStaticText( itemPanel3, wxID_STATIC, _("FreeRouting.net URL"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer9->Add(itemStaticText11, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_URL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_FreerouteURLName = new wxTextCtrl( itemPanel3, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
m_FreerouteURLName->SetToolTip(_("The URL of the FreeRouting.net website"));
itemBoxSizer9->Add(m_FreerouteURLName, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
itemStaticBoxSizer9->Add(m_FreerouteURLName, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticText* itemStaticText13 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRouting.net Command"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer9->Add(itemStaticText13, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
wxStaticText* itemStaticText13 = new wxStaticText( itemPanel3, wxID_STATIC, _("FreeRouting.net Command"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer9->Add(itemStaticText13, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_CMD, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_FreerouteURLCommandString = new wxTextCtrl( itemPanel3, ID_TEXTCTRL3, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
if (dialog_freeroute_exchange::ShowToolTips())
m_FreerouteURLCommandString->SetToolTip(_("The URL of the JNLP file which Java Web Start uses to launch the FreeRouter"));
itemBoxSizer9->Add(m_FreerouteURLCommandString, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
itemStaticBoxSizer9->Add(m_FreerouteURLCommandString, 1, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStdDialogButtonSizer* itemStdDialogButtonSizer15 = new wxStdDialogButtonSizer;
itemBoxSizer2->Add(itemStdDialogButtonSizer15, 0, wxGROW|wxALL, 5);
wxButton* itemButton16 = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
itemStdDialogButtonSizer15->AddButton(itemButton16);
itemStdDialogButtonSizer15->Realize();
////@end dialog_freeroute_exchange content construction
@ -287,7 +295,7 @@ wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
*/
void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnButton4Click( wxCommandEvent& event )
{
m_Parent->ExportToSpecctra( event );
}
@ -297,7 +305,7 @@ void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& even
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
*/
void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnButton6Click( wxCommandEvent& event )
{
m_Parent->ImportSpecctraSession( event );
}
@ -307,7 +315,7 @@ void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& e
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
*/
void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnButton5Click( wxCommandEvent& event )
{
wxString command = m_FreerouteURLCommandString->GetValue();
@ -324,7 +332,7 @@ void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
*/
void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event )
void dialog_freeroute_exchange::OnButton7Click( wxCommandEvent& event )
{
wxString command = m_FreerouteURLName->GetValue();
@ -389,6 +397,9 @@ void dialog_freeroute_exchange::OnTextEditFrCmdUpdated( wxCommandEvent& event )
void dialog_freeroute_exchange::OnInitDialog( wxInitDialogEvent& event )
{
m_ExportDSN->SetFocus();
////@begin wxEVT_INIT_DIALOG event handler for ID_DIALOG_FREEROUTE_EXCHANGE in dialog_freeroute_exchange.
// Before editing this code, remove the block markers.
event.Skip();

View File

@ -36,12 +36,13 @@
////@begin control identifiers
#define ID_DIALOG_FREEROUTE_EXCHANGE 10000
#define ID_CREATE_EXPORT_DSN_FILE 10001
#define ID_RUN_FREEROUTE 10002
#define ID_IMPORT_FREEROUTE_DSN_FILE 10003
#define ID_GOTO_FREEROUTE_WEB_SITE 10004
#define ID_TEXT_EDIT_FR_URL 10005
#define ID_TEXT_EDIT_FR_CMD 10006
#define ID_PANEL1 10001
#define ID_BUTTON4 10002
#define ID_BUTTON5 10003
#define ID_BUTTON6 10004
#define ID_BUTTON7 10005
#define ID_TEXTCTRL2 10006
#define ID_TEXTCTRL3 10013
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxCLOSE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE _("dialog_freeroute_exchange")
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME ID_DIALOG_FREEROUTE_EXCHANGE
@ -84,27 +85,27 @@ public:
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
void OnCloseWindow( wxCloseEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
void OnCreateExportDsnFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON4
void OnButton4Click( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
void OnRunFreerouteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON5
void OnButton5Click( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
void OnImportFreerouteDsnFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON6
void OnButton6Click( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON7
void OnButton7Click( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL2
void OnTextEditFrUrlUpdated( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXTCTRL3
void OnTextEditFrCmdUpdated( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE
void OnGotoFreerouteWebSiteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
void OnTextEditFrUrlUpdated( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
void OnTextEditFrCmdUpdated( wxCommandEvent& event );
////@end dialog_freeroute_exchange event handler declarations
////@begin dialog_freeroute_exchange member function declarations
@ -123,6 +124,7 @@ public:
static bool ShowToolTips();
////@begin dialog_freeroute_exchange member variables
wxButton* m_ExportDSN;
wxTextCtrl* m_FreerouteURLName;
wxTextCtrl* m_FreerouteURLCommandString;
private:

File diff suppressed because it is too large Load Diff