Commit a1edf838 authored by raburton's avatar raburton

set eol-style native on new files

parent 747a3fa6
/* XPM */ /* XPM */
#ifndef XPMMAIN #ifndef XPMMAIN
extern const char *web_support_xpm[]; extern const char *web_support_xpm[];
#else #else
const char * web_support_xpm[] = { const char * web_support_xpm[] = {
"16 16 140 2", "16 16 140 2",
" c None", " c None",
". c #22345B", ". c #22345B",
"+ c #273C68", "+ c #273C68",
"@ c #263C68", "@ c #263C68",
"# c #253A64", "# c #253A64",
"$ c #233760", "$ c #233760",
"% c #000000", "% c #000000",
"& c #F1EDED", "& c #F1EDED",
"* c #FAF4F2", "* c #FAF4F2",
"= c #E1DFE6", "= c #E1DFE6",
"- c #B5C2D9", "- c #B5C2D9",
"; c #D9D3DD", "; c #D9D3DD",
"> c #89A9CA", "> c #89A9CA",
", c #22355D", ", c #22355D",
"' c #243962", "' c #243962",
") c #E5E5EB", ") c #E5E5EB",
"! c #BDD1E7", "! c #BDD1E7",
"~ c #83ADD7", "~ c #83ADD7",
"{ c #8BB6DB", "{ c #8BB6DB",
"] c #BBD1E4", "] c #BBD1E4",
"^ c #8FA8CE", "^ c #8FA8CE",
"/ c #3E76BA", "/ c #3E76BA",
"( c #325DA1", "( c #325DA1",
"_ c #304975", "_ c #304975",
": c #1F3054", ": c #1F3054",
"< c #273D6A", "< c #273D6A",
"[ c #8EBAD8", "[ c #8EBAD8",
"} c #B1D5EA", "} c #B1D5EA",
"| c #D3E6F1", "| c #D3E6F1",
"1 c #C5D9EA", "1 c #C5D9EA",
"2 c #E8F0F5", "2 c #E8F0F5",
"3 c #D0DFEC", "3 c #D0DFEC",
"4 c #86ABD2", "4 c #86ABD2",
"5 c #8CADD1", "5 c #8CADD1",
"6 c #96B2D2", "6 c #96B2D2",
"7 c #5378A5", "7 c #5378A5",
"8 c #1D2D4E", "8 c #1D2D4E",
"9 c #85ABBF", "9 c #85ABBF",
"0 c #7EB6DD", "0 c #7EB6DD",
"a c #9DC8E5", "a c #9DC8E5",
"b c #DAE8F2", "b c #DAE8F2",
"c c #E9F1F6", "c c #E9F1F6",
"d c #F0F4F7", "d c #F0F4F7",
"e c #DDE8F0", "e c #DDE8F0",
"f c #B9D2E4", "f c #B9D2E4",
"g c #587CB0", "g c #587CB0",
"h c #436BA6", "h c #436BA6",
"i c #4A6F9E", "i c #4A6F9E",
"j c #324E82", "j c #324E82",
"k c #15213A", "k c #15213A",
"l c #87B6D1", "l c #87B6D1",
"m c #C7DEED", "m c #C7DEED",
"n c #9AC1E0", "n c #9AC1E0",
"o c #8999A7", "o c #8999A7",
"p c #497299", "p c #497299",
"q c #2D3A49", "q c #2D3A49",
"r c #0C0C0C", "r c #0C0C0C",
"s c #5C9AC6", "s c #5C9AC6",
"t c #9FC6E4", "t c #9FC6E4",
"u c #82ADD5", "u c #82ADD5",
"v c #8A8993", "v c #8A8993",
"w c #52667A", "w c #52667A",
"x c #767371", "x c #767371",
"y c #D8D5D1", "y c #D8D5D1",
"z c #F2F1ED", "z c #F2F1ED",
"A c #F2F1EB", "A c #F2F1EB",
"B c #E7E4DE", "B c #E7E4DE",
"C c #BAB7B5", "C c #BAB7B5",
"D c #646361", "D c #646361",
"E c #83B1CF", "E c #83B1CF",
"F c #8ABCDF", "F c #8ABCDF",
"G c #87888C", "G c #87888C",
"H c #E8A291", "H c #E8A291",
"I c #F0D2C7", "I c #F0D2C7",
"J c #E8E5E1", "J c #E8E5E1",
"K c #E4E3DF", "K c #E4E3DF",
"L c #ECEBE7", "L c #ECEBE7",
"M c #EDEAE6", "M c #EDEAE6",
"N c #E38C74", "N c #E38C74",
"O c #C4D2D8", "O c #C4D2D8",
"P c #BBD6EA", "P c #BBD6EA",
"Q c #C9DBE9", "Q c #C9DBE9",
"R c #6D84A1", "R c #6D84A1",
"S c #E8B1A5", "S c #E8B1A5",
"T c #F0AA97", "T c #F0AA97",
"U c #D67D69", "U c #D67D69",
"V c #C9BBB4", "V c #C9BBB4",
"W c #B4B3AD", "W c #B4B3AD",
"X c #C0BEB7", "X c #C0BEB7",
"Y c #E1E0DA", "Y c #E1E0DA",
"Z c #E8C9BF", "Z c #E8C9BF",
"` c #E4512F", "` c #E4512F",
" . c #678493", " . c #678493",
".. c #DDEAF2", ".. c #DDEAF2",
"+. c #BCD6E7", "+. c #BCD6E7",
"@. c #65696D", "@. c #65696D",
"#. c #51504E", "#. c #51504E",
"$. c #F1A998", "$. c #F1A998",
"%. c #D76348", "%. c #D76348",
"&. c #943019", "&. c #943019",
"*. c #645551", "*. c #645551",
"=. c #1F1E1E", "=. c #1F1E1E",
"-. c #903F2D", "-. c #903F2D",
";. c #EA7B61", ";. c #EA7B61",
">. c #374D79", ">. c #374D79",
",. c #89AEC3", ",. c #89AEC3",
"'. c #C0D1E0", "'. c #C0D1E0",
"). c #42484F", "). c #42484F",
"!. c #E6E2E1", "!. c #E6E2E1",
"~. c #DEA191", "~. c #DEA191",
"{. c #BA4429", "{. c #BA4429",
"]. c #3B3938", "]. c #3B3938",
"^. c #141E2E", "^. c #141E2E",
"/. c #263B61", "/. c #263B61",
"(. c #1C2C4B", "(. c #1C2C4B",
"_. c #C4624B", "_. c #C4624B",
":. c #3D527C", ":. c #3D527C",
"<. c #92B2C6", "<. c #92B2C6",
"[. c #D0CFCB", "[. c #D0CFCB",
"}. c #A68E85", "}. c #A68E85",
"|. c #45597D", "|. c #45597D",
"1. c #355580", "1. c #355580",
"2. c #243961", "2. c #243961",
"3. c #21355B", "3. c #21355B",
"4. c #394C75", "4. c #394C75",
"5. c #6377A2", "5. c #6377A2",
"6. c #F3F0EA", "6. c #F3F0EA",
"7. c #D4D1CF", "7. c #D4D1CF",
"8. c #B1AEA8", "8. c #B1AEA8",
"9. c #3E597E", "9. c #3E597E",
"0. c #192948", "0. c #192948",
"a. c #1D2E50", "a. c #1D2E50",
"b. c #E7E2DE", "b. c #E7E2DE",
"c. c #DDDBD8", "c. c #DDDBD8",
"d. c #CBCAC6", "d. c #CBCAC6",
"e. c #263554", "e. c #263554",
"f. c #EAE6E3", "f. c #EAE6E3",
"g. c #E3BAAE", "g. c #E3BAAE",
"h. c #9B5B4C", "h. c #9B5B4C",
"i. c #D39382", "i. c #D39382",
" ", " ",
" . + + + @ # ", " . + + + @ # ",
" $ % & * = - ; > , ' ", " $ % & * = - ; > , ' ",
" + ) ! ~ { ] ^ / ( _ : ", " + ) ! ~ { ] ^ / ( _ : ",
" < [ } | 1 2 3 4 5 6 7 8 ", " < [ } | 1 2 3 4 5 6 7 8 ",
"% 9 0 a b c d e f g h i j k ", "% 9 0 a b c d e f g h i j k ",
"% l m n o % % p q % % % % % r ", "% l m n o % % p q % % % % % r ",
"% s t u % v w % x y z A B C D ", "% s t u % v w % x y z A B C D ",
"% E F 1 % G % H I J K J L M N ", "% E F 1 % G % H I J K J L M N ",
"% O P Q R % S T U V W X Y Z ` ", "% O P Q R % S T U V W X Y Z ` ",
"% ...+.@.#.$.%.&.*.=.% #.-.;. ", "% ...+.@.#.$.%.&.*.=.% #.-.;. ",
" >.,.'.).!.~.{.].^./., (.% _. ", " >.,.'.).!.~.{.].^./., (.% _. ",
" :. <.% z [.}.].|.1.2.3. ]. ", " :. <.% z [.}.].|.1.2.3. ]. ",
" 4.5.% 6.7.8.% 9.0.a. % ", " 4.5.% 6.7.8.% 9.0.a. % ",
" % b.c.d.].e. ]. ", " % b.c.d.].e. ]. ",
" % C f.g.h.% % i. " " % C f.g.h.% % i. "
}; };
#endif #endif
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_freeroute_exchange.cpp // Name: dialog_freeroute_exchange.cpp
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 14/03/2008 09:19:27 // Created: 14/03/2008 09:19:27
// RCS-ID: // RCS-ID:
// Copyright: kicad team // Copyright: kicad team
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27 // Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
// For compilers that support precompilation, includes "wx/wx.h". // For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
////@begin includes ////@begin includes
////@end includes ////@end includes
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "pcbnew.h" #include "pcbnew.h"
#include "dialog_freeroute_exchange.h" #include "dialog_freeroute_exchange.h"
////@begin XPM images ////@begin XPM images
////@end XPM images ////@end XPM images
#define FREEROUTE_URL_KEY wxT( "freeroute_url" ) #define FREEROUTE_URL_KEY wxT( "freeroute_url" )
#define FREEROUTE_RUN_KEY wxT( "freeroute_command" ) #define FREEROUTE_RUN_KEY wxT( "freeroute_command" )
/**********************************************************************/ /**********************************************************************/
void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event ) void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event )
/**********************************************************************/ /**********************************************************************/
/* Run an external tool (currently, only freeroute) /* Run an external tool (currently, only freeroute)
*/ */
{ {
dialog_freeroute_exchange dialog( this ); dialog_freeroute_exchange dialog( this );
dialog.ShowModal(); dialog.ShowModal();
} }
/*! /*!
* dialog_freeroute_exchange type definition * dialog_freeroute_exchange type definition
*/ */
IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog ) IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog )
/*! /*!
* dialog_freeroute_exchange event table definition * dialog_freeroute_exchange event table definition
*/ */
BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog ) BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog )
////@begin dialog_freeroute_exchange event table entries ////@begin dialog_freeroute_exchange event table entries
EVT_CLOSE( dialog_freeroute_exchange::OnCloseWindow ) EVT_CLOSE( dialog_freeroute_exchange::OnCloseWindow )
EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick ) EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick )
EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick ) EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick )
EVT_BUTTON( ID_IMPORT_FREEROUTE_DSN_FILE, dialog_freeroute_exchange::OnImportFreerouteDsnFileClick ) EVT_BUTTON( ID_IMPORT_FREEROUTE_DSN_FILE, dialog_freeroute_exchange::OnImportFreerouteDsnFileClick )
EVT_BUTTON( wxID_CLOSE, dialog_freeroute_exchange::OnCloseClick ) EVT_BUTTON( wxID_CLOSE, dialog_freeroute_exchange::OnCloseClick )
EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick ) 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_URL, dialog_freeroute_exchange::OnTextEditFrUrlUpdated )
EVT_TEXT( ID_TEXT_EDIT_FR_CMD, dialog_freeroute_exchange::OnTextEditFrCmdUpdated ) EVT_TEXT( ID_TEXT_EDIT_FR_CMD, dialog_freeroute_exchange::OnTextEditFrCmdUpdated )
////@end dialog_freeroute_exchange event table entries ////@end dialog_freeroute_exchange event table entries
END_EVENT_TABLE() END_EVENT_TABLE()
/*! /*!
* dialog_freeroute_exchange constructors * dialog_freeroute_exchange constructors
*/ */
dialog_freeroute_exchange::dialog_freeroute_exchange() dialog_freeroute_exchange::dialog_freeroute_exchange()
{ {
Init(); Init();
} }
dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent, dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent,
wxWindowID id, wxWindowID id,
const wxString& caption, const wxString& caption,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style ) long style )
{ {
m_Parent = parent; m_Parent = parent;
Init(); Init();
Create( parent, id, caption, pos, size, style ); Create( parent, id, caption, pos, size, style );
} }
/*! /*!
* dialog_freeroute_exchange creator * dialog_freeroute_exchange creator
*/ */
bool dialog_freeroute_exchange::Create( wxWindow* parent, bool dialog_freeroute_exchange::Create( wxWindow* parent,
wxWindowID id, wxWindowID id,
const wxString& caption, const wxString& caption,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
long style ) long style )
{ {
////@begin dialog_freeroute_exchange creation ////@begin dialog_freeroute_exchange creation
SetExtraStyle( wxWS_EX_BLOCK_EVENTS ); SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
wxDialog::Create( parent, id, caption, pos, size, style ); wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls(); CreateControls();
if( GetSizer() ) if( GetSizer() )
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
Centre(); Centre();
////@end dialog_freeroute_exchange creation ////@end dialog_freeroute_exchange creation
return true; return true;
} }
/*! /*!
* dialog_freeroute_exchange destructor * dialog_freeroute_exchange destructor
*/ */
dialog_freeroute_exchange::~dialog_freeroute_exchange() dialog_freeroute_exchange::~dialog_freeroute_exchange()
{ {
////@begin dialog_freeroute_exchange destruction ////@begin dialog_freeroute_exchange destruction
////@end dialog_freeroute_exchange destruction ////@end dialog_freeroute_exchange destruction
} }
/*! /*!
* Member initialisation * Member initialisation
*/ */
void dialog_freeroute_exchange::Init() void dialog_freeroute_exchange::Init()
{ {
////@begin dialog_freeroute_exchange member initialisation ////@begin dialog_freeroute_exchange member initialisation
m_FreeRouteSetupChanged = false; m_FreeRouteSetupChanged = false;
m_FreerouteURLName = NULL; m_FreerouteURLName = NULL;
m_FreerouteURLCommandString = NULL; m_FreerouteURLCommandString = NULL;
////@end dialog_freeroute_exchange member initialisation ////@end dialog_freeroute_exchange member initialisation
} }
/*! /*!
* Control creation for dialog_freeroute_exchange * Control creation for dialog_freeroute_exchange
*/ */
void dialog_freeroute_exchange::CreateControls() void dialog_freeroute_exchange::CreateControls()
{ {
////@begin dialog_freeroute_exchange content construction ////@begin dialog_freeroute_exchange content construction
// Generated by DialogBlocks, 14/03/2008 16:00:48 (unregistered) // Generated by DialogBlocks, 14/03/2008 16:00:48 (unregistered)
dialog_freeroute_exchange* itemDialog1 = this; dialog_freeroute_exchange* itemDialog1 = this;
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxHORIZONTAL );
itemDialog1->SetSizer( itemBoxSizer2 ); itemDialog1->SetSizer( itemBoxSizer2 );
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxVERTICAL );
itemBoxSizer2->Add( itemBoxSizer3, 0, wxGROW | wxALL, 5 ); itemBoxSizer2->Add( itemBoxSizer3, 0, wxGROW | wxALL, 5 );
wxButton* itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE, wxButton* itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE,
_( _(
"Create Export Dsn File" ), wxDefaultPosition, "Create Export Dsn File" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
itemButton4->SetHelpText( _( "Create an export DNS file to freeroute" ) ); itemButton4->SetHelpText( _( "Create an export DNS file to freeroute" ) );
if( dialog_freeroute_exchange::ShowToolTips() ) if( dialog_freeroute_exchange::ShowToolTips() )
itemButton4->SetToolTip( _( "Create an export DNS file to freeroute" ) ); itemButton4->SetToolTip( _( "Create an export DNS file to freeroute" ) );
itemBoxSizer3->Add( itemButton4, 0, wxGROW | wxALL, 5 ); itemBoxSizer3->Add( itemButton4, 0, wxGROW | wxALL, 5 );
wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _( wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _(
"Connect to FreeROUTE" ), wxDefaultPosition, "Connect to FreeROUTE" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
itemButton5->SetHelpText( _( "Run the WEb Based Freeroute Router" ) ); itemButton5->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
if( dialog_freeroute_exchange::ShowToolTips() ) if( dialog_freeroute_exchange::ShowToolTips() )
itemButton5->SetToolTip( _( "Run the WEb Based Freeroute Router" ) ); itemButton5->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
itemBoxSizer3->Add( itemButton5, 0, wxGROW | wxALL, 5 ); itemBoxSizer3->Add( itemButton5, 0, wxGROW | wxALL, 5 );
wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE, wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE,
_( _(
"Read Design File" ), wxDefaultPosition, "Read Design File" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
itemButton6->SetHelpText( _( "Read the design file created by freeroute" ) ); itemButton6->SetHelpText( _( "Read the design file created by freeroute" ) );
if( dialog_freeroute_exchange::ShowToolTips() ) if( dialog_freeroute_exchange::ShowToolTips() )
itemButton6->SetToolTip( _( "Read the design file created by freeroute" ) ); itemButton6->SetToolTip( _( "Read the design file created by freeroute" ) );
itemBoxSizer3->Add( itemButton6, 0, wxGROW | wxALL, 5 ); itemBoxSizer3->Add( itemButton6, 0, wxGROW | wxALL, 5 );
wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _( wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _(
"&Close" ), wxDefaultPosition, wxDefaultSize, 0 ); "&Close" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer3->Add( itemButton7, 0, wxGROW | wxALL, 5 ); itemBoxSizer3->Add( itemButton7, 0, wxGROW | wxALL, 5 );
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* itemBoxSizer8 = new wxBoxSizer( wxVERTICAL );
itemBoxSizer2->Add( itemBoxSizer8, 1, wxGROW | wxALL, 5 ); itemBoxSizer2->Add( itemBoxSizer8, 1, wxGROW | wxALL, 5 );
wxButton* itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, wxButton* itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE,
_( _(
"Access to FreeROUTE Web Site" ), "Access to FreeROUTE Web Site" ),
wxDefaultPosition, wxDefaultSize, 0 ); wxDefaultPosition, wxDefaultSize, 0 );
itemButton9->SetHelpText( _( "Run the WEb Based Freeroute Router" ) ); itemButton9->SetHelpText( _( "Run the WEb Based Freeroute Router" ) );
if( dialog_freeroute_exchange::ShowToolTips() ) if( dialog_freeroute_exchange::ShowToolTips() )
itemButton9->SetToolTip( _( "Run the WEb Based Freeroute Router" ) ); itemButton9->SetToolTip( _( "Run the WEb Based Freeroute Router" ) );
itemBoxSizer8->Add( itemButton9, 0, wxGROW | wxALL, 5 ); itemBoxSizer8->Add( itemButton9, 0, wxGROW | wxALL, 5 );
wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC,
_( _(
"FreeRoute URL" ), wxDefaultPosition, "FreeRoute URL" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
itemBoxSizer8->Add( itemStaticText10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); itemBoxSizer8->Add( itemStaticText10, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_URL, _T( m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_URL, _T(
"" ), wxDefaultPosition, wxDefaultSize, 0 ); "" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add( m_FreerouteURLName, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer8->Add( m_FreerouteURLName, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC,
_( _(
"FreeRoute Command" ), "FreeRoute Command" ),
wxDefaultPosition, wxDefaultSize, 0 ); wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add( itemStaticText12, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); itemBoxSizer8->Add( itemStaticText12, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_CMD, _T( m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXT_EDIT_FR_CMD, _T(
"" ), wxDefaultPosition, wxDefaultSize, 0 ); "" ), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add( m_FreerouteURLCommandString, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); itemBoxSizer8->Add( m_FreerouteURLCommandString, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
////@end dialog_freeroute_exchange content construction ////@end dialog_freeroute_exchange content construction
wxString msg; wxString msg;
m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_URL_KEY, &msg ); m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_URL_KEY, &msg );
if( msg.IsEmpty() ) if( msg.IsEmpty() )
m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) ); m_FreerouteURLName->SetValue( wxT( "http://www.freerouting.net/" ) );
else else
m_FreerouteURLName->SetValue( msg ); m_FreerouteURLName->SetValue( msg );
msg.Empty(); msg.Empty();
m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_RUN_KEY, &msg ); m_Parent->m_Parent->m_EDA_Config->Read( FREEROUTE_RUN_KEY, &msg );
if( msg.IsEmpty() ) if( msg.IsEmpty() )
m_FreerouteURLCommandString->SetValue( wxT( m_FreerouteURLCommandString->SetValue( wxT(
"http://www.freerouting.net/java/freeroute.jnlp" ) ); "http://www.freerouting.net/java/freeroute.jnlp" ) );
else else
m_FreerouteURLCommandString->SetValue( msg ); m_FreerouteURLCommandString->SetValue( msg );
} }
/*! /*!
* Should we show tooltips? * Should we show tooltips?
*/ */
bool dialog_freeroute_exchange::ShowToolTips() bool dialog_freeroute_exchange::ShowToolTips()
{ {
return true; return true;
} }
/*! /*!
* Get bitmap resources * Get bitmap resources
*/ */
wxBitmap dialog_freeroute_exchange::GetBitmapResource( const wxString& name ) wxBitmap dialog_freeroute_exchange::GetBitmapResource( const wxString& name )
{ {
// Bitmap retrieval // Bitmap retrieval
////@begin dialog_freeroute_exchange bitmap retrieval ////@begin dialog_freeroute_exchange bitmap retrieval
wxUnusedVar( name ); wxUnusedVar( name );
return wxNullBitmap; return wxNullBitmap;
////@end dialog_freeroute_exchange bitmap retrieval ////@end dialog_freeroute_exchange bitmap retrieval
} }
/*! /*!
* Get icon resources * Get icon resources
*/ */
wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name ) wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name )
{ {
// Icon retrieval // Icon retrieval
////@begin dialog_freeroute_exchange icon retrieval ////@begin dialog_freeroute_exchange icon retrieval
wxUnusedVar( name ); wxUnusedVar( name );
return wxNullIcon; return wxNullIcon;
////@end dialog_freeroute_exchange icon retrieval ////@end dialog_freeroute_exchange icon retrieval
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
*/ */
void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& event ) void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& event )
{ {
m_Parent->ExportToSpecctra( event ); m_Parent->ExportToSpecctra( event );
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
*/ */
void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& event ) void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& event )
{ {
m_Parent->ImportSpecctraSession( event ); m_Parent->ImportSpecctraSession( event );
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
*/ */
void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event ) void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
{ {
wxString command = m_FreerouteURLCommandString->GetValue(); wxString command = m_FreerouteURLCommandString->GetValue();
wxLaunchDefaultBrowser( command ); wxLaunchDefaultBrowser( command );
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON
*/ */
void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event ) void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event )
{ {
wxString command = m_FreerouteURLName->GetValue(); wxString command = m_FreerouteURLName->GetValue();
wxLaunchDefaultBrowser( command ); wxLaunchDefaultBrowser( command );
} }
/*! /*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/ */
void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event ) void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event )
{ {
Close(); Close();
} }
/*! /*!
* wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE * wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
*/ */
void dialog_freeroute_exchange::OnCloseWindow( wxCloseEvent& event ) void dialog_freeroute_exchange::OnCloseWindow( wxCloseEvent& event )
{ {
if( m_FreeRouteSetupChanged ) // Save new config if( m_FreeRouteSetupChanged ) // Save new config
{ {
m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_URL_KEY, m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_URL_KEY,
m_FreerouteURLName->GetValue() ); m_FreerouteURLName->GetValue() );
m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_RUN_KEY, m_Parent->m_Parent->m_EDA_Config->Write( FREEROUTE_RUN_KEY,
m_FreerouteURLCommandString->GetValue() ); m_FreerouteURLCommandString->GetValue() );
} }
event.Skip(); event.Skip();
} }
/*! /*!
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
*/ */
void dialog_freeroute_exchange::OnTextEditFrUrlUpdated( wxCommandEvent& event ) void dialog_freeroute_exchange::OnTextEditFrUrlUpdated( wxCommandEvent& event )
{ {
m_FreeRouteSetupChanged = true; m_FreeRouteSetupChanged = true;
} }
/*! /*!
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
*/ */
void dialog_freeroute_exchange::OnTextEditFrCmdUpdated( wxCommandEvent& event ) void dialog_freeroute_exchange::OnTextEditFrCmdUpdated( wxCommandEvent& event )
{ {
m_FreeRouteSetupChanged = true; m_FreeRouteSetupChanged = true;
} }
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_freeroute_exchange.h // Name: dialog_freeroute_exchange.h
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 14/03/2008 09:19:27 // Created: 14/03/2008 09:19:27
// RCS-ID: // RCS-ID:
// Copyright: kicad team // Copyright: kicad team
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27 // Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
#ifndef _DIALOG_FREEROUTE_EXCHANGE_H_ #ifndef _DIALOG_FREEROUTE_EXCHANGE_H_
#define _DIALOG_FREEROUTE_EXCHANGE_H_ #define _DIALOG_FREEROUTE_EXCHANGE_H_
/*! /*!
* Includes * Includes
*/ */
////@begin includes ////@begin includes
////@end includes ////@end includes
/*! /*!
* Forward declarations * Forward declarations
*/ */
////@begin forward declarations ////@begin forward declarations
////@end forward declarations ////@end forward declarations
/*! /*!
* Control identifiers * Control identifiers
*/ */
////@begin control identifiers ////@begin control identifiers
#define ID_DIALOG_FREEROUTE_EXCHANGE 10000 #define ID_DIALOG_FREEROUTE_EXCHANGE 10000
#define ID_CREATE_EXPORT_DSN_FILE 10001 #define ID_CREATE_EXPORT_DSN_FILE 10001
#define ID_RUN_FREEROUTE 10002 #define ID_RUN_FREEROUTE 10002
#define ID_IMPORT_FREEROUTE_DSN_FILE 10003 #define ID_IMPORT_FREEROUTE_DSN_FILE 10003
#define ID_GOTO_FREEROUTE_WEB_SITE 10004 #define ID_GOTO_FREEROUTE_WEB_SITE 10004
#define ID_TEXT_EDIT_FR_URL 10005 #define ID_TEXT_EDIT_FR_URL 10005
#define ID_TEXT_EDIT_FR_CMD 10006 #define ID_TEXT_EDIT_FR_CMD 10006
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION | wxRESIZE_BORDER | wxTHICK_FRAME |\ #define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION | wxRESIZE_BORDER | wxTHICK_FRAME |\
wxSYSTEM_MENU | wxCLOSE_BOX | wxTAB_TRAVERSAL wxSYSTEM_MENU | wxCLOSE_BOX | wxTAB_TRAVERSAL
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE _( "dialog_freeroute_exchange" ) #define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE _( "dialog_freeroute_exchange" )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME ID_DIALOG_FREEROUTE_EXCHANGE #define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME ID_DIALOG_FREEROUTE_EXCHANGE
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE wxSize( 400, 300 ) #define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE wxSize( 400, 300 )
#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION wxDefaultPosition #define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION wxDefaultPosition
////@end control identifiers ////@end control identifiers
/*! /*!
* dialog_freeroute_exchange class declaration * dialog_freeroute_exchange class declaration
*/ */
class dialog_freeroute_exchange : public wxDialog class dialog_freeroute_exchange : public wxDialog
{ {
DECLARE_DYNAMIC_CLASS( dialog_freeroute_exchange ) DECLARE_DYNAMIC_CLASS( dialog_freeroute_exchange )
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
public: public:
/// Constructors /// Constructors
dialog_freeroute_exchange(); dialog_freeroute_exchange();
dialog_freeroute_exchange( WinEDA_PcbFrame* parent, dialog_freeroute_exchange( WinEDA_PcbFrame* parent,
wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME,
const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE,
const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION,
const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE,
long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE ); long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );
/// Creation /// Creation
bool Create( wxWindow* parent, bool Create( wxWindow* parent,
wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME,
const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE,
const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION,
const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE,
long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE ); long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE );
/// Destructor /// Destructor
~dialog_freeroute_exchange(); ~dialog_freeroute_exchange();
/// Initialises member variables /// Initialises member variables
void Init(); void Init();
/// Creates the controls and sizers /// Creates the controls and sizers
void CreateControls(); void CreateControls();
////@begin dialog_freeroute_exchange event handler declarations ////@begin dialog_freeroute_exchange event handler declarations
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE /// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
void OnCloseWindow( wxCloseEvent& event ); void OnCloseWindow( wxCloseEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE
void OnCreateExportDsnFileClick( wxCommandEvent& event ); void OnCreateExportDsnFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE
void OnRunFreerouteClick( wxCommandEvent& event ); void OnRunFreerouteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE
void OnImportFreerouteDsnFileClick( wxCommandEvent& event ); void OnImportFreerouteDsnFileClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
void OnCloseClick( wxCommandEvent& event ); void OnCloseClick( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE
void OnGotoFreerouteWebSiteClick( wxCommandEvent& event ); void OnGotoFreerouteWebSiteClick( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
void OnTextEditFrUrlUpdated( wxCommandEvent& event ); void OnTextEditFrUrlUpdated( wxCommandEvent& event );
/// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
void OnTextEditFrCmdUpdated( wxCommandEvent& event ); void OnTextEditFrCmdUpdated( wxCommandEvent& event );
////@end dialog_freeroute_exchange event handler declarations ////@end dialog_freeroute_exchange event handler declarations
////@begin dialog_freeroute_exchange member function declarations ////@begin dialog_freeroute_exchange member function declarations
bool GetFreeRouteSetupChanged() const { return m_FreeRouteSetupChanged; } bool GetFreeRouteSetupChanged() const { return m_FreeRouteSetupChanged; }
void SetFreeRouteSetupChanged( bool value ) { m_FreeRouteSetupChanged = value; } void SetFreeRouteSetupChanged( bool value ) { m_FreeRouteSetupChanged = value; }
/// Retrieves bitmap resources /// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name ); wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources /// Retrieves icon resources
wxIcon GetIconResource( const wxString& name ); wxIcon GetIconResource( const wxString& name );
////@end dialog_freeroute_exchange member function declarations ////@end dialog_freeroute_exchange member function declarations
/// Should we show tooltips? /// Should we show tooltips?
static bool ShowToolTips(); static bool ShowToolTips();
////@begin dialog_freeroute_exchange member variables ////@begin dialog_freeroute_exchange member variables
wxTextCtrl* m_FreerouteURLName; wxTextCtrl* m_FreerouteURLName;
wxTextCtrl* m_FreerouteURLCommandString; wxTextCtrl* m_FreerouteURLCommandString;
private: private:
bool m_FreeRouteSetupChanged; // Flag set to true if Freeroute config changed bool m_FreeRouteSetupChanged; // Flag set to true if Freeroute config changed
////@end dialog_freeroute_exchange member variables ////@end dialog_freeroute_exchange member variables
WinEDA_PcbFrame* m_Parent; WinEDA_PcbFrame* m_Parent;
}; };
#endif #endif
// _DIALOG_FREEROUTE_EXCHANGE_H_ // _DIALOG_FREEROUTE_EXCHANGE_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment