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
e8bfd5fa
Commit
e8bfd5fa
authored
Oct 31, 2014
by
Garth Corral
Browse files
Options
Browse Files
Download
Plain Diff
Merge in trunk
parents
efafe11f
30497943
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
66 deletions
+47
-66
wxPcbStruct.h
include/wxPcbStruct.h
+18
-7
wxstruct.h
include/wxstruct.h
+0
-15
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+2
-2
menubar_modedit.cpp
pcbnew/menubar_modedit.cpp
+1
-1
muonde.cpp
pcbnew/muonde.cpp
+2
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+20
-36
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+4
-3
No files found.
include/wxPcbStruct.h
View file @
e8bfd5fa
...
@@ -100,13 +100,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME
...
@@ -100,13 +100,6 @@ class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME
throw
(
IO_ERROR
,
PARSE_ERROR
);
throw
(
IO_ERROR
,
PARSE_ERROR
);
protected
:
protected
:
#ifdef KICAD_SCRIPTING_WXPYTHON
// Panel used to let user talk with internal scripting
wxWindow
*
m_pythonPanel
;
bool
m_pythonPanelShow
;
///< Visibility flag for Python Console
#endif
PCB_LAYER_WIDGET
*
m_Layers
;
PCB_LAYER_WIDGET
*
m_Layers
;
DRC
*
m_drc
;
///< the DRC controller, see drc.cpp
DRC
*
m_drc
;
///< the DRC controller, see drc.cpp
...
@@ -130,6 +123,24 @@ protected:
...
@@ -130,6 +123,24 @@ protected:
void
createPopUpBlockMenu
(
wxMenu
*
menu
);
void
createPopUpBlockMenu
(
wxMenu
*
menu
);
void
createPopUpMenuForMarkers
(
MARKER_PCB
*
aMarker
,
wxMenu
*
aPopMenu
);
void
createPopUpMenuForMarkers
(
MARKER_PCB
*
aMarker
,
wxMenu
*
aPopMenu
);
// Has meaning only if DKICAD_SCRIPTING_WXPYTHON option is on
/**
* @return the frame name identifier for the python console frame
*/
static
const
wxChar
*
pythonConsoleNameId
()
{
return
wxT
(
"PythonConsole"
);
}
/**
* @return a pointer to the python console frame, or NULL if not exist
*/
static
wxWindow
*
findPythonConsole
()
{
return
FindWindowByName
(
pythonConsoleNameId
()
);
}
/**
/**
* Function syncLayerWidgetLayer
* Function syncLayerWidgetLayer
* updates the currently layer "selection" within the PCB_LAYER_WIDGET.
* updates the currently layer "selection" within the PCB_LAYER_WIDGET.
...
...
include/wxstruct.h
View file @
e8bfd5fa
...
@@ -484,21 +484,6 @@ public:
...
@@ -484,21 +484,6 @@ public:
CaptionVisible
(
false
);
CaptionVisible
(
false
);
return
*
this
;
return
*
this
;
}
}
/**
* Function ScriptingConsolePane
* Change *this to a python scripting console pane for KiCad.
* Used in Pcbnew
*/
EDA_PANEINFO
&
ScriptingConsolePane
()
{
CloseButton
(
false
);
Floatable
(
true
);
Resizable
(
true
);
return
*
this
;
}
};
};
#endif // WXSTRUCT_H_
#endif // WXSTRUCT_H_
pcbnew/class_pcb_layer_widget.cpp
View file @
e8bfd5fa
...
@@ -73,8 +73,8 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
...
@@ -73,8 +73,8 @@ const LAYER_WIDGET::ROW PCB_LAYER_WIDGET::s_render_rows[] = {
RR
(
_
(
"Anchors"
),
ANCHOR_VISIBLE
,
WHITE
,
_
(
"Show footprint and text origins as a cross"
)
),
RR
(
_
(
"Anchors"
),
ANCHOR_VISIBLE
,
WHITE
,
_
(
"Show footprint and text origins as a cross"
)
),
RR
(
_
(
"Grid"
),
GRID_VISIBLE
,
WHITE
,
_
(
"Show the (x,y) grid dots"
)
),
RR
(
_
(
"Grid"
),
GRID_VISIBLE
,
WHITE
,
_
(
"Show the (x,y) grid dots"
)
),
RR
(
_
(
"No-Connects"
),
NO_CONNECTS_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show a marker on pads which have no net connected"
)
),
RR
(
_
(
"No-Connects"
),
NO_CONNECTS_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show a marker on pads which have no net connected"
)
),
RR
(
_
(
"
Module
s Front"
),
MOD_FR_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprints that are on board's front"
)
),
RR
(
_
(
"
Footprint
s Front"
),
MOD_FR_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprints that are on board's front"
)
),
RR
(
_
(
"
Module
s Back"
),
MOD_BK_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprints that are on board's back"
)
),
RR
(
_
(
"
Footprint
s Back"
),
MOD_BK_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprints that are on board's back"
)
),
RR
(
_
(
"Values"
),
MOD_VALUES_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprint's values"
)
),
RR
(
_
(
"Values"
),
MOD_VALUES_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprint's values"
)
),
RR
(
_
(
"References"
),
MOD_REFERENCES_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprint's references"
)
),
RR
(
_
(
"References"
),
MOD_REFERENCES_VISIBLE
,
UNSPECIFIED_COLOR
,
_
(
"Show footprint's references"
)
),
};
};
...
...
pcbnew/menubar_modedit.cpp
View file @
e8bfd5fa
...
@@ -273,7 +273,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
...
@@ -273,7 +273,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
// Anchor
// Anchor
AddMenuItem
(
placeMenu
,
ID_MODEDIT_ANCHOR_TOOL
,
AddMenuItem
(
placeMenu
,
ID_MODEDIT_ANCHOR_TOOL
,
_
(
"A&nchor"
),
_
(
"A&nchor"
),
_
(
"Place footprint
module
reference anchor"
),
_
(
"Place footprint reference anchor"
),
KiBitmap
(
anchor_xpm
)
);
KiBitmap
(
anchor_xpm
)
);
// Menu Help:
// Menu Help:
...
...
pcbnew/muonde.cpp
View file @
e8bfd5fa
...
@@ -1075,7 +1075,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule )
...
@@ -1075,7 +1075,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule )
if
(
pad
==
NULL
)
if
(
pad
==
NULL
)
{
{
DisplayError
(
this
,
_
(
"No pad for this
module
"
)
);
DisplayError
(
this
,
_
(
"No pad for this
footprint
"
)
);
return
;
return
;
}
}
...
@@ -1083,7 +1083,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule )
...
@@ -1083,7 +1083,7 @@ void PCB_EDIT_FRAME::Edit_Gap( wxDC* DC, MODULE* aModule )
if
(
next_pad
==
NULL
)
if
(
next_pad
==
NULL
)
{
{
DisplayError
(
this
,
_
(
"Only one pad for this
module
"
)
);
DisplayError
(
this
,
_
(
"Only one pad for this
footprint
"
)
);
return
;
return
;
}
}
...
...
pcbnew/pcbframe.cpp
View file @
e8bfd5fa
...
@@ -82,8 +82,6 @@
...
@@ -82,8 +82,6 @@
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON)
#include <python_scripting.h>
#include <python_scripting.h>
// The name of the pane info handling the python console:
#define PYTHONCONSOLE_STRID wxT( "PythonPanel" )
#endif
#endif
#include <pcb_draw_panel_gal.h>
#include <pcb_draw_panel_gal.h>
...
@@ -330,10 +328,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
...
@@ -330,10 +328,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_RecordingMacros
=
-
1
;
m_RecordingMacros
=
-
1
;
m_microWaveToolBar
=
NULL
;
m_microWaveToolBar
=
NULL
;
m_useCmpFileForFpNames
=
true
;
m_useCmpFileForFpNames
=
true
;
#if defined(KICAD_SCRIPTING_WXPYTHON)
m_pythonPanel
=
NULL
;
m_pythonPanelShow
=
false
;
#endif
m_rotationAngle
=
900
;
m_rotationAngle
=
900
;
...
@@ -1001,39 +995,29 @@ void PCB_EDIT_FRAME::UpdateTitle()
...
@@ -1001,39 +995,29 @@ void PCB_EDIT_FRAME::UpdateTitle()
#if defined(KICAD_SCRIPTING_WXPYTHON)
#if defined(KICAD_SCRIPTING_WXPYTHON)
void
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
(
wxCommandEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
ScriptingConsoleEnableDisable
(
wxCommandEvent
&
aEvent
)
{
{
if
(
m_pythonPanel
==
NULL
)
wxMiniFrame
*
pythonPanelFrame
=
(
wxMiniFrame
*
)
findPythonConsole
();
bool
pythonPanelShown
=
false
;
if
(
pythonPanelFrame
==
NULL
)
{
{
// Add the scripting panel
long
style
=
wxCAPTION
|
wxCLOSE_BOX
|
wxMINIMIZE_BOX
|
wxMAXIMIZE_BOX
|
wxRESIZE_BORDER
|
wxFRAME_FLOAT_ON_PARENT
;
EDA_PANEINFO
pythonAuiPane
;
pythonPanelFrame
=
new
wxMiniFrame
(
this
,
wxID_ANY
,
wxT
(
"Python console"
),
wxDefaultPosition
,
wxDefaultSize
,
pythonAuiPane
.
ScriptingConsolePane
();
style
,
pythonConsoleNameId
()
);
pythonAuiPane
.
Caption
(
wxT
(
"Python Scripting"
)
);
wxBoxSizer
*
sizer
=
new
wxBoxSizer
(
wxVERTICAL
);
pythonAuiPane
.
MinSize
(
300
,
150
);
wxWindow
*
pythonPanel
=
CreatePythonShellWindow
(
pythonPanelFrame
);
#if 1 // Set to 0 to make the Python console dockable
sizer
->
Add
(
pythonPanel
,
1
,
wxEXPAND
|
wxALL
,
5
);
// Currently the console is not dockable. Reasons:
pythonPanelFrame
->
SetSizer
(
sizer
);
// * When docked there is an issue with accelerator keys used in the main menu:
pythonPanelFrame
->
SetSize
(
wxSize
(
600
,
300
)
);
// these keys are not sent to the console, even if it has the focus
pythonPanelFrame
->
Layout
();
// * The console is more easy to move if it is not dockable
pythonPanelFrame
->
Centre
();
pythonAuiPane
.
Dockable
(
false
).
Float
();
// Gives a reasonnable position to the console
wxPoint
pos
=
m_canvas
->
GetScreenPosition
();
pythonAuiPane
.
FloatingPosition
(
pos
.
x
+
10
,
pos
.
y
+
10
);
pythonAuiPane
.
FloatingSize
(
600
,
200
);
#else
pythonAuiPane
.
BestSize
(
600
,
200
);
pythonAuiPane
.
LeftDockable
(
false
).
RightDockable
(
false
);
#endif
m_pythonPanel
=
CreatePythonShellWindow
(
this
);
m_auimgr
.
AddPane
(
m_pythonPanel
,
pythonAuiPane
.
Name
(
PYTHONCONSOLE_STRID
).
Bottom
().
Layer
(
9
)
);
}
}
else
pythonPanelShown
=
pythonPanelFrame
->
IsShown
();
m_pythonPanelShow
=
!
m_pythonPanelShow
;
pythonPanelShown
=
!
pythonPanelShown
;
m_auimgr
.
GetPane
(
PYTHONCONSOLE_STRID
).
Show
(
m_pythonPanelShow
);
pythonPanelFrame
->
Show
(
pythonPanelShown
);
m_auimgr
.
Update
();
}
}
#endif
#endif
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
e8bfd5fa
...
@@ -106,12 +106,13 @@ void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent )
...
@@ -106,12 +106,13 @@ void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent )
m_SelLayerBox
->
SetLayerSelection
(
GetActiveLayer
()
);
m_SelLayerBox
->
SetLayerSelection
(
GetActiveLayer
()
);
}
}
#ifdef KICAD_SCRIPTING_WXPYTHON
// Used only when the DKICAD_SCRIPTING_WXPYTHON option is on
void
PCB_EDIT_FRAME
::
OnUpdateScriptingConsoleState
(
wxUpdateUIEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
OnUpdateScriptingConsoleState
(
wxUpdateUIEvent
&
aEvent
)
{
{
aEvent
.
Check
(
m_pythonPanelShow
);
wxMiniFrame
*
pythonPanelFrame
=
(
wxMiniFrame
*
)
findPythonConsole
();
bool
pythonPanelShown
=
pythonPanelFrame
?
pythonPanelFrame
->
IsShown
()
:
false
;
aEvent
.
Check
(
pythonPanelShown
);
}
}
#endif
void
PCB_EDIT_FRAME
::
OnUpdateZoneDisplayStyle
(
wxUpdateUIEvent
&
aEvent
)
void
PCB_EDIT_FRAME
::
OnUpdateZoneDisplayStyle
(
wxUpdateUIEvent
&
aEvent
)
{
{
...
...
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