diff --git a/bitmaps/Web_support.xpm b/bitmaps/Web_support.xpm new file mode 100644 index 0000000000..d84923e15d --- /dev/null +++ b/bitmaps/Web_support.xpm @@ -0,0 +1,166 @@ +/* XPM */ +#ifndef XPMMAIN +extern const char *web_support_xpm[]; + +#else +const char * web_support_xpm[] = { +"16 16 140 2", +" c None", +". c #22345B", +"+ c #273C68", +"@ c #263C68", +"# c #253A64", +"$ c #233760", +"% c #000000", +"& c #F1EDED", +"* c #FAF4F2", +"= c #E1DFE6", +"- c #B5C2D9", +"; c #D9D3DD", +"> c #89A9CA", +", c #22355D", +"' c #243962", +") c #E5E5EB", +"! c #BDD1E7", +"~ c #83ADD7", +"{ c #8BB6DB", +"] c #BBD1E4", +"^ c #8FA8CE", +"/ c #3E76BA", +"( c #325DA1", +"_ c #304975", +": c #1F3054", +"< c #273D6A", +"[ c #8EBAD8", +"} c #B1D5EA", +"| c #D3E6F1", +"1 c #C5D9EA", +"2 c #E8F0F5", +"3 c #D0DFEC", +"4 c #86ABD2", +"5 c #8CADD1", +"6 c #96B2D2", +"7 c #5378A5", +"8 c #1D2D4E", +"9 c #85ABBF", +"0 c #7EB6DD", +"a c #9DC8E5", +"b c #DAE8F2", +"c c #E9F1F6", +"d c #F0F4F7", +"e c #DDE8F0", +"f c #B9D2E4", +"g c #587CB0", +"h c #436BA6", +"i c #4A6F9E", +"j c #324E82", +"k c #15213A", +"l c #87B6D1", +"m c #C7DEED", +"n c #9AC1E0", +"o c #8999A7", +"p c #497299", +"q c #2D3A49", +"r c #0C0C0C", +"s c #5C9AC6", +"t c #9FC6E4", +"u c #82ADD5", +"v c #8A8993", +"w c #52667A", +"x c #767371", +"y c #D8D5D1", +"z c #F2F1ED", +"A c #F2F1EB", +"B c #E7E4DE", +"C c #BAB7B5", +"D c #646361", +"E c #83B1CF", +"F c #8ABCDF", +"G c #87888C", +"H c #E8A291", +"I c #F0D2C7", +"J c #E8E5E1", +"K c #E4E3DF", +"L c #ECEBE7", +"M c #EDEAE6", +"N c #E38C74", +"O c #C4D2D8", +"P c #BBD6EA", +"Q c #C9DBE9", +"R c #6D84A1", +"S c #E8B1A5", +"T c #F0AA97", +"U c #D67D69", +"V c #C9BBB4", +"W c #B4B3AD", +"X c #C0BEB7", +"Y c #E1E0DA", +"Z c #E8C9BF", +"` c #E4512F", +" . c #678493", +".. c #DDEAF2", +"+. c #BCD6E7", +"@. c #65696D", +"#. c #51504E", +"$. c #F1A998", +"%. c #D76348", +"&. c #943019", +"*. c #645551", +"=. c #1F1E1E", +"-. c #903F2D", +";. c #EA7B61", +">. c #374D79", +",. c #89AEC3", +"'. c #C0D1E0", +"). c #42484F", +"!. c #E6E2E1", +"~. c #DEA191", +"{. c #BA4429", +"]. c #3B3938", +"^. c #141E2E", +"/. c #263B61", +"(. c #1C2C4B", +"_. c #C4624B", +":. c #3D527C", +"<. c #92B2C6", +"[. c #D0CFCB", +"}. c #A68E85", +"|. c #45597D", +"1. c #355580", +"2. c #243961", +"3. c #21355B", +"4. c #394C75", +"5. c #6377A2", +"6. c #F3F0EA", +"7. c #D4D1CF", +"8. c #B1AEA8", +"9. c #3E597E", +"0. c #192948", +"a. c #1D2E50", +"b. c #E7E2DE", +"c. c #DDDBD8", +"d. c #CBCAC6", +"e. c #263554", +"f. c #EAE6E3", +"g. c #E3BAAE", +"h. c #9B5B4C", +"i. c #D39382", +" ", +" . + + + @ # ", +" $ % & * = - ; > , ' ", +" + ) ! ~ { ] ^ / ( _ : ", +" < [ } | 1 2 3 4 5 6 7 8 ", +"% 9 0 a b c d e f g h i j k ", +"% l m n o % % p q % % % % % r ", +"% s t u % v w % x y z A B C D ", +"% E F 1 % G % H I J K J L M N ", +"% O P Q R % S T U V W X Y Z ` ", +"% ...+.@.#.$.%.&.*.=.% #.-.;. ", +" >.,.'.).!.~.{.].^./., (.% _. ", +" :. <.% z [.}.].|.1.2.3. ]. ", +" 4.5.% 6.7.8.% 9.0.a. % ", +" % b.c.d.].e. ]. ", +" % C f.g.h.% % i. " +}; + +#endif diff --git a/bitmaps/tools.xpm b/bitmaps/tools.xpm index d0cc9dcc9a..589dd85649 100644 --- a/bitmaps/tools.xpm +++ b/bitmaps/tools.xpm @@ -5,27 +5,27 @@ extern const char *tools_xpm[]; #else const char *tools_xpm[] = { /* columns rows colors const chars-per-pixel */ -"16 15 3 1", -"- c Blue", -"X c Gray100", -" c None", - -/* pixels */ -"XXXXXXX XXXXXXX", -"XXXXXXX XXXXXXX", -"X-----X XXXXXXX", -"X-----X X-----X", -"XXXXXXX X-----X", -"XXXXXXX XXXXXXX", -"X-----X XXXXXXX", -"X-----X XXXXXXX", -"XXXXXXX XXXXXXX", -"XXXXXXX X-----X", -"XXXXXXX X-----X", -"X-----X XXXXXXX", -"X-----X XXXXXXX", -"XXXXXXX X-----X", -"XXXXXXX XXXXXXX" -}; +"16 16 5 1", +" c None", +". c #000000", +"+ c #FFFFFF", +"@ c #BFE5FF", +"# c #696969", +"............... ", +".+++++++++++++. ", +".@#@..@....@#@. ", +".+++++++++++++. ", +".@#@..@..@@@#@. ", +".+++++++++++++. ", +".@#@..@....@#@. ", +".+++++++++++++. ", +".@#@..@...@@#@. ", +".+++++++++++++. ", +".@#@..@....@#@. ", +".+++++++++++++. ", +".@#@..@..@..#@. ", +".+++++++++++++. ", +"............... ", +" "}; #endif diff --git a/change_log.txt b/change_log.txt index b6581c289b..d7438500ef 100644 --- a/change_log.txt +++ b/change_log.txt @@ -5,6 +5,12 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. +2008-Mar-14 UPDATE Jean-Pierre Charras +================================================================================ ++pcbnew + Added a tool to the upper toolbar which gives and easy access to freeroute + + 2008-Mar-13 UPDATE Jean-Pierre Charras ================================================================================ +pcbnew diff --git a/include/bitmaps.h b/include/bitmaps.h index 018aa5b78e..bc360ae5ec 100644 --- a/include/bitmaps.h +++ b/include/bitmaps.h @@ -11,6 +11,7 @@ #include "../bitmaps/new_txt.xpm" #include "../bitmaps/directory.xpm" #include "../bitmaps/icon_python_small.xpm" + #include "../bitmaps/Web_support.xpm" #include "../bitmaps/Fonts.xpm" diff --git a/include/id.h b/include/id.h index 80a6f5a420..bb0da1b231 100644 --- a/include/id.h +++ b/include/id.h @@ -729,7 +729,7 @@ enum main_id { ID_TOOLBARH_PCB_SELECT_LAYER, ID_TOOLBARH_PCB_AUTOPLACE, ID_TOOLBARH_PCB_AUTOROUTE, - ID_TOOLBARH_PCB_UNUSED, + ID_TOOLBARH_PCB_FREEROUTE_ACCESS, ID_AUX_TOOLBAR_PCB_VIA_SIZE, ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 73c6f456a5..10a399fa95 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -413,7 +413,13 @@ public: */ void ImportSpecctraDesign( wxCommandEvent& event ); - /* Fonctions specifiques */ + /** + * Function Access_to_External_Tool + * Run an external tool (like freeroute ) + */ + void Access_to_External_Tool( wxCommandEvent& event ); + + /* Fonctions specifiques */ MODULE* ListAndSelectModuleName(); void Liste_Equipot( wxCommandEvent& event ); void Swap_Layers( wxCommandEvent& event ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 53efd82f36..7574e1bf29 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -47,6 +47,7 @@ set(PCBNEW_SRCS # dialog_drc.cpp dialog_edit_mod_text.cpp # dialog_edit_module.cpp + dialog_freeroute_exchange.cpp # dialog_gendrill.cpp dialog_general_options.cpp # dialog_graphic_items_options.cpp diff --git a/pcbnew/dialog_freeroute_exchange-autosave.pjd b/pcbnew/dialog_freeroute_exchange-autosave.pjd new file mode 100644 index 0000000000..d2719566a3 --- /dev/null +++ b/pcbnew/dialog_freeroute_exchange-autosave.pjd @@ -0,0 +1,1017 @@ + + +
+ 0 + "" + "" + "" + "" + "" + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + "jean-pierre Charras" + "kicad team" + "" + 0 + 0 + "<All platforms>" + "2.8.3" + "///////////////////////////////////////////////////////////////////////////// +// Name: %HEADER-FILENAME% +// Purpose: +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + +" + "///////////////////////////////////////////////////////////////////////////// +// Name: %SOURCE-FILENAME% +// Purpose: +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + +" + "///////////////////////////////////////////////////////////////////////////// +// Name: %SYMBOLS-FILENAME% +// Purpose: Symbols file +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + +" + "" + "// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +" + " /// %BODY% +" + " +/*! + * %BODY% + */ + +" + "app_resources.h" + "app_resources.cpp" + "AppResources" + "app.h" + "app.cpp" + "Application" + 0 + "" + "<None>" + "iso-8859-1" + "utf-8" + "utf-8" + "" + 0 + 0 + 4 + " " + "" + 0 + 0 + 1 + 0 + 1 + 1 + 0 + 1 + 0 +
+ + + "" + "data-document" + "" + "" + 0 + 1 + 0 + 0 + + "Configurations" + "config-data-document" + "" + "" + 0 + 1 + 0 + 0 + "" + 1 + "" + "Debug" + "ANSI" + "Static" + "Modular" + "GUI" + "wxMSW" + "Dynamic" + "Yes" + "No" + "No" + "%WXVERSION%" + "%EXECUTABLE%" + "" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + "%AUTO%" + + + + + + + "Projects" + "root-document" + "" + "project" + 1 + 1 + 0 + 1 + + "Windows" + "html-document" + "" + "dialogsfolder" + 1 + 1 + 0 + 1 + + "dialog_freeroute_exchange" + "dialog-document" + "" + "dialog" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbDialogProxy" + 10000 + 0 + "" + 0 + "" + 0 + 0 + "ID_DIALOG_FREEROUTE_EXCHANGE" + 10000 + "dialog_freeroute_exchange" + "wxDialog" + "wxDialog" + "dialog_freeroute_exchange.cpp" + "dialog_freeroute_exchange.h" + "" + "dialog_freeroute_exchange" + 1 + "" + 0 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + "" + "" + "" + "" + "Tiled" + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 1 + 0 + "" + 0 + 1 + -1 + -1 + 400 + 300 + 0 + "" + + "wxBoxSizer H" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "wbBoxSizerProxy" + "Horizontal" + "" + 0 + 0 + 0 + "<Any platform>" + + "wxBoxSizer V" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbBoxSizerProxy" + "Vertical" + "" + "Centre" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "<Any platform>" + + "wxButton: ID_CREATE_EXPORT_DSN_FILE" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnCreateExportDsnFileClick|NONE||dialog_freeroute_exchange" + "ID_CREATE_EXPORT_DSN_FILE" + 10001 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Create Export Dsn File" + 0 + "Create an export DNS file to freeroute" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: ID_RUN_FREEROUTE" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnRunFreerouteClick|NONE||dialog_freeroute_exchange" + "ID_RUN_FREEROUTE" + 10002 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Connect to FreeROUTE" + 0 + "Run the WEb Based Freeroute Router" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: ID_IMPORT_FREEROUTE_DSN_FILE" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnImportFreerouteDsnFileClick|NONE||dialog_freeroute_exchange" + "ID_IMPORT_FREEROUTE_DSN_FILE" + 10003 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Read Import Design File" + 0 + "Create an export DNS file to freeroute" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxButton: wxID_CLOSE" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbButtonProxy" + "wxID_CLOSE" + 5001 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "&Close" + 0 + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + + "wxBoxSizer V" + "dialog-control-document" + "" + "sizer" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbBoxSizerProxy" + "Vertical" + "" + "Centre" + "Expand" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "<Any platform>" + + "wxButton: ID_BUTTON" + "dialog-control-document" + "" + "dialogcontrol" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbButtonProxy" + "wxEVT_COMMAND_BUTTON_CLICKED|OnButtonClick|NONE||dialog_freeroute_exchange" + "ID_BUTTON" + 10004 + "" + "wxButton" + "wxButton" + 1 + 0 + "" + "" + "" + "Access to FreeROUTE Web Site" + 0 + "Run the WEb Based Freeroute Router" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + "" + "" + + + "wxStaticText: wxID_STATIC" + "dialog-control-document" + "" + "statictext" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbStaticTextProxy" + "wxID_STATIC" + 5105 + "" + "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" + "" + "FreeRoute URL" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + "" + "" + "" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + "" + "" + + + "wxTextCtrl: ID_TEXTCTRL1" + "dialog-control-document" + "" + "textctrl" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbTextCtrlProxy" + "ID_TEXTCTRL1" + 10005 + "" + "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" + "m_FreerouteURLName" + "" + 0 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + "" + "" + "" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + "" + "" + + + "wxStaticText: wxID_STATIC" + "dialog-control-document" + "" + "statictext" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbStaticTextProxy" + "wxID_STATIC" + 5105 + "" + "wxStaticText" + "wxStaticText" + 1 + 0 + "" + "" + "" + "FreeRoute Command" + -1 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + "" + "" + "" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + "" + "" + + + "wxTextCtrl: ID_TEXTCTRL" + "dialog-control-document" + "" + "textctrl" + 0 + 1 + 0 + 0 + "14/3/2008" + "wbTextCtrlProxy" + "ID_TEXTCTRL" + 10006 + "" + "wxTextCtrl" + "wxTextCtrl" + 1 + 0 + "" + "" + "m_FreerouteURLCommandString" + "" + 0 + "" + "" + "" + "" + "" + 0 + 1 + "<Any platform>" + "" + "" + "" + "" + "" + "" + "" + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + "" + -1 + -1 + -1 + -1 + "Expand" + "Centre" + 0 + 5 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + "" + "" + + + + + + + "Sources" + "html-document" + "" + "sourcesfolder" + 1 + 1 + 0 + 1 + + "dialog_freeroute_exchange.rc" + "source-editor-document" + "dialog_freeroute_exchange.rc" + "source-editor" + 0 + 0 + 1 + 0 + "14/3/2008" + "" + + + + "Images" + "html-document" + "" + "bitmapsfolder" + 1 + 1 + 0 + 1 + + + + +
diff --git a/pcbnew/dialog_freeroute_exchange.cpp b/pcbnew/dialog_freeroute_exchange.cpp new file mode 100644 index 0000000000..9091027f15 --- /dev/null +++ b/pcbnew/dialog_freeroute_exchange.cpp @@ -0,0 +1,292 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: dialog_freeroute_exchange.cpp +// Purpose: +// Author: jean-pierre Charras +// Modified by: +// Created: 14/03/2008 09:19:27 +// RCS-ID: +// Copyright: kicad team +// Licence: +///////////////////////////////////////////////////////////////////////////// + +// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27 + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include "fctsys.h" +#include "common.h" +#include "pcbnew.h" + +#include "dialog_freeroute_exchange.h" + +////@begin XPM images +////@end XPM images + + + +/**********************************************************************/ +void WinEDA_PcbFrame::Access_to_External_Tool( wxCommandEvent& event ) +/**********************************************************************/ +/* Run an external tool (currently, only freeroute) +*/ +{ + dialog_freeroute_exchange dialog( this ) ; + dialog.ShowModal(); +} + +/*! + * dialog_freeroute_exchange type definition + */ + +IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog ) + + +/*! + * dialog_freeroute_exchange event table definition + */ + +BEGIN_EVENT_TABLE( dialog_freeroute_exchange, wxDialog ) + +////@begin dialog_freeroute_exchange event table entries + EVT_BUTTON( ID_CREATE_EXPORT_DSN_FILE, dialog_freeroute_exchange::OnCreateExportDsnFileClick ) + + EVT_BUTTON( ID_RUN_FREEROUTE, dialog_freeroute_exchange::OnRunFreerouteClick ) + + EVT_BUTTON( ID_IMPORT_FREEROUTE_DSN_FILE, dialog_freeroute_exchange::OnImportFreerouteDsnFileClick ) + + EVT_BUTTON( wxID_CLOSE, dialog_freeroute_exchange::OnCloseClick ) + + EVT_BUTTON( ID_GOTO_FREEROUTE_WEB_SITE, dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick ) + +////@end dialog_freeroute_exchange event table entries + +END_EVENT_TABLE() + + +/*! + * dialog_freeroute_exchange constructors + */ + +dialog_freeroute_exchange::dialog_freeroute_exchange() +{ + Init(); +} + +dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ + m_Parent = parent; + Init(); + Create(parent, id, caption, pos, size, style); +} + + +/*! + * dialog_freeroute_exchange creator + */ + +bool dialog_freeroute_exchange::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ +////@begin dialog_freeroute_exchange creation + SetExtraStyle(wxWS_EX_BLOCK_EVENTS); + wxDialog::Create( parent, id, caption, pos, size, style ); + + CreateControls(); + if (GetSizer()) + { + GetSizer()->SetSizeHints(this); + } + Centre(); +////@end dialog_freeroute_exchange creation + return true; +} + + +/*! + * dialog_freeroute_exchange destructor + */ + +dialog_freeroute_exchange::~dialog_freeroute_exchange() +{ +////@begin dialog_freeroute_exchange destruction +////@end dialog_freeroute_exchange destruction +} + + +/*! + * Member initialisation + */ + +void dialog_freeroute_exchange::Init() +{ +////@begin dialog_freeroute_exchange member initialisation + m_FreerouteURLName = NULL; + m_FreerouteURLCommandString = NULL; +////@end dialog_freeroute_exchange member initialisation +} + + +/*! + * Control creation for dialog_freeroute_exchange + */ + +void dialog_freeroute_exchange::CreateControls() +{ +////@begin dialog_freeroute_exchange content construction + // Generated by DialogBlocks, 14/03/2008 10:20:02 (unregistered) + + dialog_freeroute_exchange* itemDialog1 = this; + + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); + itemDialog1->SetSizer(itemBoxSizer2); + + wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton4 = new wxButton( itemDialog1, ID_CREATE_EXPORT_DSN_FILE, _("Create Export Dsn File"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton4->SetHelpText(_("Create an export DNS file to freeroute")); + if (dialog_freeroute_exchange::ShowToolTips()) + itemButton4->SetToolTip(_("Create an export DNS file to freeroute")); + itemBoxSizer3->Add(itemButton4, 0, wxGROW|wxALL, 5); + + wxButton* itemButton5 = new wxButton( itemDialog1, ID_RUN_FREEROUTE, _("Connect to FreeROUTE"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton5->SetHelpText(_("Run the WEb Based Freeroute Router")); + if (dialog_freeroute_exchange::ShowToolTips()) + itemButton5->SetToolTip(_("Run the WEb Based Freeroute Router")); + itemBoxSizer3->Add(itemButton5, 0, wxGROW|wxALL, 5); + + wxButton* itemButton6 = new wxButton( itemDialog1, ID_IMPORT_FREEROUTE_DSN_FILE, _("Read Design File"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton6->SetHelpText(_("Read the design file created by freeroute")); + if (dialog_freeroute_exchange::ShowToolTips()) + itemButton6->SetToolTip(_("Read the design file created by freeroute")); + itemBoxSizer3->Add(itemButton6, 0, wxGROW|wxALL, 5); + + wxButton* itemButton7 = new wxButton( itemDialog1, wxID_CLOSE, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer3->Add(itemButton7, 0, wxGROW|wxALL, 5); + + wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer2->Add(itemBoxSizer8, 0, wxGROW|wxALL, 5); + + wxButton* itemButton9 = new wxButton( itemDialog1, ID_GOTO_FREEROUTE_WEB_SITE, _("Access to FreeROUTE Web Site"), wxDefaultPosition, wxDefaultSize, 0 ); + itemButton9->SetHelpText(_("Run the WEb Based Freeroute Router")); + if (dialog_freeroute_exchange::ShowToolTips()) + itemButton9->SetToolTip(_("Run the WEb Based Freeroute Router")); + itemBoxSizer8->Add(itemButton9, 0, wxGROW|wxALL, 5); + + wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRoute URL"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(itemStaticText10, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); + + m_FreerouteURLName = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(m_FreerouteURLName, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); + + wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("FreeRoute Command"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(itemStaticText12, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); + + m_FreerouteURLCommandString = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(m_FreerouteURLCommandString, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5); + +////@end dialog_freeroute_exchange content construction + + m_FreerouteURLName->SetValue(wxT("http://www.freerouting.net/")); + m_FreerouteURLCommandString->SetValue(wxT("http://www.freerouting.net/java/freeroute.jnlp")); +} + + +/*! + * Should we show tooltips? + */ + +bool dialog_freeroute_exchange::ShowToolTips() +{ + return true; +} + +/*! + * Get bitmap resources + */ + +wxBitmap dialog_freeroute_exchange::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin dialog_freeroute_exchange bitmap retrieval + wxUnusedVar(name); + return wxNullBitmap; +////@end dialog_freeroute_exchange bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin dialog_freeroute_exchange icon retrieval + wxUnusedVar(name); + return wxNullIcon; +////@end dialog_freeroute_exchange icon retrieval +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE + */ + +void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& event ) +{ + m_Parent->ExportToSpecctra( event ); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_IMPORT_FREEROUTE_DSN_FILE + */ + +void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& event ) +{ + m_Parent->ImportSpecctraSession( event ); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE + */ + +void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event ) +{ + wxString command = m_FreerouteURLCommandString->GetValue(); + wxLaunchDefaultBrowser(command); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BUTTON + */ + +void dialog_freeroute_exchange::OnGotoFreerouteWebSiteClick( wxCommandEvent& event ) +{ + wxString command = m_FreerouteURLName->GetValue(); + wxLaunchDefaultBrowser(command); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE + */ + +void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event ) +{ + Close(); +} + diff --git a/pcbnew/dialog_freeroute_exchange.h b/pcbnew/dialog_freeroute_exchange.h new file mode 100644 index 0000000000..115ad37f6e --- /dev/null +++ b/pcbnew/dialog_freeroute_exchange.h @@ -0,0 +1,118 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: dialog_freeroute_exchange.h +// Purpose: +// Author: jean-pierre Charras +// Modified by: +// Created: 14/03/2008 09:19:27 +// RCS-ID: +// Copyright: kicad team +// Licence: +///////////////////////////////////////////////////////////////////////////// + +// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27 + +#ifndef _DIALOG_FREEROUTE_EXCHANGE_H_ +#define _DIALOG_FREEROUTE_EXCHANGE_H_ + + +/*! + * Includes + */ + +////@begin includes +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@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_TEXTCTRL1 10005 +#define ID_TEXTCTRL 10006 +#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL +#define SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE _("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_POSITION wxDefaultPosition +////@end control identifiers + + +/*! + * dialog_freeroute_exchange class declaration + */ + +class dialog_freeroute_exchange: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( dialog_freeroute_exchange ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + dialog_freeroute_exchange(); + dialog_freeroute_exchange( WinEDA_PcbFrame* parent, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_IDNAME, const wxString& caption = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_TITLE, const wxPoint& pos = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_POSITION, const wxSize& size = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_SIZE, long style = SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE ); + + /// Destructor + ~dialog_freeroute_exchange(); + + /// Initialises member variables + void Init(); + + /// Creates the controls and sizers + void CreateControls(); + +////@begin dialog_freeroute_exchange event handler declarations + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CREATE_EXPORT_DSN_FILE + void OnCreateExportDsnFileClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RUN_FREEROUTE + void OnRunFreerouteClick( 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 wxID_CLOSE + void OnCloseClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_GOTO_FREEROUTE_WEB_SITE + void OnGotoFreerouteWebSiteClick( wxCommandEvent& event ); + +////@end dialog_freeroute_exchange event handler declarations + +////@begin dialog_freeroute_exchange member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end dialog_freeroute_exchange member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin dialog_freeroute_exchange member variables + wxTextCtrl* m_FreerouteURLName; + wxTextCtrl* m_FreerouteURLCommandString; +////@end dialog_freeroute_exchange member variables + + WinEDA_PcbFrame* m_Parent; +}; + +#endif + // _DIALOG_FREEROUTE_EXCHANGE_H_ diff --git a/pcbnew/makefile.include b/pcbnew/makefile.include index e6292f1cb0..89866ef2c3 100644 --- a/pcbnew/makefile.include +++ b/pcbnew/makefile.include @@ -16,6 +16,7 @@ OBJECTS= $(TARGET).o classpcb.o\ $(ZONE_FILES)\ $(SPECCTRA_TOOLS)\ lay2plot.o\ + dialog_freeroute_exchange.o\ modedit_undo_redo.o\ block_module_editor.o\ onrightclick.o\ diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 4889600e70..4b41eca1f7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -126,6 +126,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_TOOLBARH_PCB_AUTOPLACE, WinEDA_PcbFrame::AutoPlace ) EVT_TOOL( ID_TOOLBARH_PCB_AUTOROUTE, WinEDA_PcbFrame::AutoPlace ) + EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, WinEDA_PcbFrame::Access_to_External_Tool ) // Option toolbar EVT_TOOL_RANGE( ID_TB_OPTIONS_START, ID_TB_OPTIONS_END, diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index a8cdd1f61e..fc88aee44b 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -307,7 +307,12 @@ void WinEDA_PcbFrame::ReCreateHToolbar() m_HToolBar->AddTool( ID_TOOLBARH_PCB_AUTOROUTE, wxEmptyString, BITMAP( mode_track_xpm ), _( "Mode Track and Autorouting" ), wxITEM_CHECK ); - // after adding the buttons to the toolbar, must call Realize() to reflect + // Fast call to FreeROUTE Web Bases router + m_HToolBar->AddSeparator(); + m_HToolBar->AddTool( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, wxEmptyString, BITMAP( web_support_xpm ), + _( "Fast access to theWeb Based FreeROUTE advanced routed" )); + + // after adding the buttons to the toolbar, must call Realize() to reflect // the changes m_HToolBar->Realize();