Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
8a71b1ae
Commit
8a71b1ae
authored
Mar 14, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes
parent
a6006ef3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
252 additions
and
116 deletions
+252
-116
dialog_freeroute_exchange.cpp
pcbnew/dialog_freeroute_exchange.cpp
+179
-78
dialog_freeroute_exchange.h
pcbnew/dialog_freeroute_exchange.h
+62
-32
dialog_freeroute_exchange.pjd
pcbnew/dialog_freeroute_exchange.pjd
+11
-6
No files found.
pcbnew/dialog_freeroute_exchange.cpp
View file @
8a71b1ae
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_freeroute_exchange.cpp
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 14/03/2008 09:19:27
// RCS-ID:
// RCS-ID:
// Copyright: kicad team
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
...
...
@@ -34,18 +35,23 @@
////@begin XPM images
////@end XPM images
#define FREEROUTE_URL_KEY wxT( "freeroute_url" )
#define FREEROUTE_RUN_KEY wxT( "freeroute_command" )
/**********************************************************************/
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
dialog
(
this
);
dialog
.
ShowModal
();
}
/*!
* dialog_freeroute_exchange type definition
*/
...
...
@@ -60,15 +66,21 @@ IMPLEMENT_DYNAMIC_CLASS( dialog_freeroute_exchange, wxDialog )
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_CLOSE
(
dialog_freeroute_exchange
::
OnCloseWindow
)
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
::
OnRunFreerout
eClick
)
EVT_BUTTON
(
ID_IMPORT_FREEROUTE_DSN_FILE
,
dialog_freeroute_exchange
::
OnImportFreerouteDsnFil
eClick
)
EVT_BUTTON
(
ID_IMPORT_FREEROUTE_DSN_FILE
,
dialog_freeroute_exchange
::
OnImportFreerouteDsnFil
eClick
)
EVT_BUTTON
(
wxID_CLOSE
,
dialog_freeroute_exchange
::
OnClos
eClick
)
EVT_BUTTON
(
wxID_CLOSE
,
dialog_freeroute_exchange
::
OnClos
eClick
)
EVT_BUTTON
(
ID_GOTO_FREEROUTE_WEB_SITE
,
dialog_freeroute_exchange
::
OnGotoFreerouteWebSit
eClick
)
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
...
...
@@ -84,11 +96,17 @@ 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
)
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
;
m_Parent
=
parent
;
Init
();
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
}
...
...
@@ -96,18 +114,24 @@ dialog_freeroute_exchange::dialog_freeroute_exchange( WinEDA_PcbFrame* parent, w
* dialog_freeroute_exchange creator
*/
bool
dialog_freeroute_exchange
::
Create
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
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
);
SetExtraStyle
(
wxWS_EX_BLOCK_EVENTS
);
wxDialog
::
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
CreateControls
();
if
(
GetSizer
()
)
if
(
GetSizer
()
)
{
GetSizer
()
->
SetSizeHints
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
}
Centre
();
////@end dialog_freeroute_exchange creation
return
true
;
}
...
...
@@ -131,8 +155,10 @@ dialog_freeroute_exchange::~dialog_freeroute_exchange()
void
dialog_freeroute_exchange
::
Init
()
{
////@begin dialog_freeroute_exchange member initialisation
m_FreeRouteSetupChanged
=
false
;
m_FreerouteURLName
=
NULL
;
m_FreerouteURLCommandString
=
NULL
;
////@end dialog_freeroute_exchange member initialisation
}
...
...
@@ -142,64 +168,96 @@ void dialog_freeroute_exchange::Init()
*/
void
dialog_freeroute_exchange
::
CreateControls
()
{
{
////@begin dialog_freeroute_exchange content construction
// Generated by DialogBlocks, 14/03/2008 1
0:20:02
(unregistered)
// Generated by DialogBlocks, 14/03/2008 1
6:00:48
(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
);
wxBoxSizer
*
itemBoxSizer2
=
new
wxBoxSizer
(
wxHORIZONTAL
);
itemDialog1
->
SetSizer
(
itemBoxSizer2
);
wxBoxSizer
*
itemBoxSizer3
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer2
->
Add
(
itemBoxSizer3
,
0
,
wxGROW
|
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
,
1
,
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_TEXT_EDIT_FR_URL
,
_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_TEXT_EDIT_FR_CMD
,
_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"
));
wxString
msg
;
m_Parent
->
m_Parent
->
m_EDA_Config
->
Read
(
FREEROUTE_URL_KEY
,
&
msg
);
if
(
msg
.
IsEmpty
()
)
m_FreerouteURLName
->
SetValue
(
wxT
(
"http://www.freerouting.net/"
)
);
else
m_FreerouteURLName
->
SetValue
(
msg
);
msg
.
Empty
();
m_Parent
->
m_Parent
->
m_EDA_Config
->
Read
(
FREEROUTE_RUN_KEY
,
&
msg
);
if
(
msg
.
IsEmpty
()
)
m_FreerouteURLCommandString
->
SetValue
(
wxT
(
"http://www.freerouting.net/java/freeroute.jnlp"
)
);
else
m_FreerouteURLCommandString
->
SetValue
(
msg
);
}
...
...
@@ -212,6 +270,7 @@ bool dialog_freeroute_exchange::ShowToolTips()
return
true
;
}
/*!
* Get bitmap resources
*/
...
...
@@ -220,11 +279,13 @@ wxBitmap dialog_freeroute_exchange::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin dialog_freeroute_exchange bitmap retrieval
wxUnusedVar
(
name
);
wxUnusedVar
(
name
);
return
wxNullBitmap
;
////@end dialog_freeroute_exchange bitmap retrieval
}
/*!
* Get icon resources
*/
...
...
@@ -233,8 +294,9 @@ wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin dialog_freeroute_exchange icon retrieval
wxUnusedVar
(
name
);
wxUnusedVar
(
name
);
return
wxNullIcon
;
////@end dialog_freeroute_exchange icon retrieval
}
...
...
@@ -245,7 +307,7 @@ wxIcon dialog_freeroute_exchange::GetIconResource( const wxString& name )
void
dialog_freeroute_exchange
::
OnCreateExportDsnFileClick
(
wxCommandEvent
&
event
)
{
m_Parent
->
ExportToSpecctra
(
event
);
m_Parent
->
ExportToSpecctra
(
event
);
}
...
...
@@ -255,7 +317,7 @@ void dialog_freeroute_exchange::OnCreateExportDsnFileClick( wxCommandEvent& even
void
dialog_freeroute_exchange
::
OnImportFreerouteDsnFileClick
(
wxCommandEvent
&
event
)
{
m_Parent
->
ImportSpecctraSession
(
event
);
m_Parent
->
ImportSpecctraSession
(
event
);
}
...
...
@@ -265,8 +327,9 @@ void dialog_freeroute_exchange::OnImportFreerouteDsnFileClick( wxCommandEvent& e
void
dialog_freeroute_exchange
::
OnRunFreerouteClick
(
wxCommandEvent
&
event
)
{
wxString
command
=
m_FreerouteURLCommandString
->
GetValue
();
wxLaunchDefaultBrowser
(
command
);
wxString
command
=
m_FreerouteURLCommandString
->
GetValue
();
wxLaunchDefaultBrowser
(
command
);
}
...
...
@@ -276,8 +339,9 @@ void dialog_freeroute_exchange::OnRunFreerouteClick( wxCommandEvent& event )
void
dialog_freeroute_exchange
::
OnGotoFreerouteWebSiteClick
(
wxCommandEvent
&
event
)
{
wxString
command
=
m_FreerouteURLName
->
GetValue
();
wxLaunchDefaultBrowser
(
command
);
wxString
command
=
m_FreerouteURLName
->
GetValue
();
wxLaunchDefaultBrowser
(
command
);
}
...
...
@@ -290,3 +354,40 @@ void dialog_freeroute_exchange::OnCloseClick( wxCommandEvent& event )
Close
();
}
/*!
* wxEVT_CLOSE_WINDOW event handler for ID_DIALOG_FREEROUTE_EXCHANGE
*/
void
dialog_freeroute_exchange
::
OnCloseWindow
(
wxCloseEvent
&
event
)
{
if
(
m_FreeRouteSetupChanged
)
// Save new config
{
m_Parent
->
m_Parent
->
m_EDA_Config
->
Write
(
FREEROUTE_URL_KEY
,
m_FreerouteURLName
->
GetValue
()
);
m_Parent
->
m_Parent
->
m_EDA_Config
->
Write
(
FREEROUTE_RUN_KEY
,
m_FreerouteURLCommandString
->
GetValue
()
);
}
event
.
Skip
();
}
/*!
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_URL
*/
void
dialog_freeroute_exchange
::
OnTextEditFrUrlUpdated
(
wxCommandEvent
&
event
)
{
m_FreeRouteSetupChanged
=
true
;
}
/*!
* wxEVT_COMMAND_TEXT_UPDATED event handler for ID_TEXT_EDIT_FR_CMD
*/
void
dialog_freeroute_exchange
::
OnTextEditFrCmdUpdated
(
wxCommandEvent
&
event
)
{
m_FreeRouteSetupChanged
=
true
;
}
pcbnew/dialog_freeroute_exchange.h
View file @
8a71b1ae
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_freeroute_exchange.h
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 14/03/2008 09:19:27
// RCS-ID:
// RCS-ID:
// Copyright: kicad team
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 14/03/2008 09:19:27
...
...
@@ -34,18 +35,20 @@
*/
////@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 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 SYMBOL_DIALOG_FREEROUTE_EXCHANGE_STYLE wxCAPTION | wxRESIZE_BORDER | wxTHICK_FRAME |\
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
...
...
@@ -53,66 +56,93 @@
* dialog_freeroute_exchange class declaration
*/
class
dialog_freeroute_exchange
:
public
wxDialog
{
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
);
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
);
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
();
void
Init
();
/// Creates the controls and sizers
void
CreateControls
();
void
CreateControls
();
////@begin dialog_freeroute_exchange event handler declarations
/// 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
);
void
OnCreateExportDsnFileClick
(
wxCommandEvent
&
event
);
/// 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
void
OnImportFreerouteDsnFileClick
(
wxCommandEvent
&
event
);
void
OnImportFreerouteDsnFileClick
(
wxCommandEvent
&
event
);
/// 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
void
OnGotoFreerouteWebSiteClick
(
wxCommandEvent
&
event
);
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
bool
GetFreeRouteSetupChanged
()
const
{
return
m_FreeRouteSetupChanged
;
}
void
SetFreeRouteSetupChanged
(
bool
value
)
{
m_FreeRouteSetupChanged
=
value
;
}
/// Retrieves bitmap resources
wxBitmap
GetBitmapResource
(
const
wxString
&
name
);
wxBitmap
GetBitmapResource
(
const
wxString
&
name
);
/// Retrieves icon resources
wxIcon
GetIconResource
(
const
wxString
&
name
);
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
;
wxTextCtrl
*
m_FreerouteURLName
;
wxTextCtrl
*
m_FreerouteURLCommandString
;
private
:
bool
m_FreeRouteSetupChanged
;
// Flag set to true if Freeroute config changed
////@end dialog_freeroute_exchange member variables
WinEDA_PcbFrame
*
m_Parent
;
WinEDA_PcbFrame
*
m_Parent
;
};
#endif
// _DIALOG_FREEROUTE_EXCHANGE_H_
// _DIALOG_FREEROUTE_EXCHANGE_H_
pcbnew/dialog_freeroute_exchange.pjd
View file @
8a71b1ae
...
...
@@ -210,6 +210,8 @@
<string
name=
"id-suffix"
>
""
</string>
<long
name=
"use-xrc"
>
0
</long>
<long
name=
"working-mode"
>
0
</long>
<string
name=
"variable-0"
>
"m_FreeRouteSetupChanged|bool|FreeRouteSetupChanged|false|2|0|Flag set to true if Freeroute config changed"
</string>
<string
name=
"event-handler-0"
>
"wxEVT_CLOSE_WINDOW|OnCloseWindow|NONE||"
</string>
<string
name=
"proxy-Id name"
>
"ID_DIALOG_FREEROUTE_EXCHANGE"
</string>
<long
name=
"proxy-Id value"
>
10000
</long>
<string
name=
"proxy-Class"
>
"dialog_freeroute_exchange"
</string>
...
...
@@ -240,6 +242,7 @@
<bool
name=
"proxy-wxDEFAULT_DIALOG_STYLE"
>
0
</bool>
<bool
name=
"proxy-wxCAPTION"
>
1
</bool>
<bool
name=
"proxy-wxRESIZE_BORDER"
>
1
</bool>
<bool
name=
"proxy-wxTHICK_FRAME"
>
1
</bool>
<bool
name=
"proxy-wxSYSTEM_MENU"
>
1
</bool>
<bool
name=
"proxy-wxSTAY_ON_TOP"
>
0
</bool>
<bool
name=
"proxy-wxDIALOG_NO_PARENT"
>
0
</bool>
...
...
@@ -300,7 +303,7 @@
<string
name=
"proxy-Orientation"
>
"Vertical"
</string>
<string
name=
"proxy-Member variable name"
>
""
</string>
<string
name=
"proxy-AlignH"
>
"Centre"
</string>
<string
name=
"proxy-AlignV"
>
"
Centre
"
</string>
<string
name=
"proxy-AlignV"
>
"
Expand
"
</string>
<long
name=
"proxy-Stretch factor"
>
0
</long>
<long
name=
"proxy-Border"
>
5
</long>
<bool
name=
"proxy-wxLEFT"
>
1
</bool>
...
...
@@ -595,7 +598,7 @@
<string
name=
"proxy-Member variable name"
>
""
</string>
<string
name=
"proxy-AlignH"
>
"Centre"
</string>
<string
name=
"proxy-AlignV"
>
"Expand"
</string>
<long
name=
"proxy-Stretch factor"
>
0
</long>
<long
name=
"proxy-Stretch factor"
>
1
</long>
<long
name=
"proxy-Border"
>
5
</long>
<bool
name=
"proxy-wxLEFT"
>
1
</bool>
<bool
name=
"proxy-wxRIGHT"
>
1
</bool>
...
...
@@ -743,7 +746,7 @@
<string
name=
"proxy-Custom ctor arguments"
>
""
</string>
</document>
<document>
<string
name=
"title"
>
"wxTextCtrl: ID_TEXT
CTRL1
"
</string>
<string
name=
"title"
>
"wxTextCtrl: ID_TEXT
_EDIT_FR_URL
"
</string>
<string
name=
"type"
>
"dialog-control-document"
</string>
<string
name=
"filename"
>
""
</string>
<string
name=
"icon-name"
>
"textctrl"
</string>
...
...
@@ -753,7 +756,8 @@
<long
name=
"locked"
>
0
</long>
<string
name=
"created"
>
"14/3/2008"
</string>
<string
name=
"proxy-type"
>
"wbTextCtrlProxy"
</string>
<string
name=
"proxy-Id name"
>
"ID_TEXTCTRL1"
</string>
<string
name=
"event-handler-0"
>
"wxEVT_COMMAND_TEXT_UPDATED|OnTextEditFrUrlUpdated|NONE||dialog_freeroute_exchange"
</string>
<string
name=
"proxy-Id name"
>
"ID_TEXT_EDIT_FR_URL"
</string>
<long
name=
"proxy-Id value"
>
10005
</long>
<string
name=
"proxy-Name"
>
""
</string>
<string
name=
"proxy-Class"
>
"wxTextCtrl"
</string>
...
...
@@ -895,7 +899,7 @@
<string
name=
"proxy-Custom ctor arguments"
>
""
</string>
</document>
<document>
<string
name=
"title"
>
"wxTextCtrl: ID_TEXT
CTRL
"
</string>
<string
name=
"title"
>
"wxTextCtrl: ID_TEXT
_EDIT_FR_CMD
"
</string>
<string
name=
"type"
>
"dialog-control-document"
</string>
<string
name=
"filename"
>
""
</string>
<string
name=
"icon-name"
>
"textctrl"
</string>
...
...
@@ -905,7 +909,8 @@
<long
name=
"locked"
>
0
</long>
<string
name=
"created"
>
"14/3/2008"
</string>
<string
name=
"proxy-type"
>
"wbTextCtrlProxy"
</string>
<string
name=
"proxy-Id name"
>
"ID_TEXTCTRL"
</string>
<string
name=
"event-handler-0"
>
"wxEVT_COMMAND_TEXT_UPDATED|OnTextEditFrCmdUpdated|NONE||dialog_freeroute_exchange"
</string>
<string
name=
"proxy-Id name"
>
"ID_TEXT_EDIT_FR_CMD"
</string>
<long
name=
"proxy-Id value"
>
10006
</long>
<string
name=
"proxy-Name"
>
""
</string>
<string
name=
"proxy-Class"
>
"wxTextCtrl"
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment