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
72357970
Commit
72357970
authored
Mar 22, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Netlist dialog redesigned, netlist.cpp code modified
parent
154be142
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1274 additions
and
602 deletions
+1274
-602
change_log.txt
change_log.txt
+8
-0
onrightclick.cpp
eeschema/onrightclick.cpp
+3
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
dialog_netlist.cpp
pcbnew/dialog_netlist.cpp
+150
-54
dialog_netlist.h
pcbnew/dialog_netlist.h
+32
-32
dialog_netlist.pjd
pcbnew/dialog_netlist.pjd
+521
-212
edit.cpp
pcbnew/edit.cpp
+2
-2
modules.cpp
pcbnew/modules.cpp
+16
-12
netlist.cpp
pcbnew/netlist.cpp
+271
-199
pcbnew.h
pcbnew/pcbnew.h
+1
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+27
-22
xchgmod.cpp
pcbnew/xchgmod.cpp
+3
-9
dialog_print.cpp
share/dialog_print.cpp
+32
-33
dialog_print.h
share/dialog_print.h
+3
-2
dialog_print.pjd
share/dialog_print.pjd
+204
-21
No files found.
change_log.txt
View file @
72357970
...
...
@@ -5,6 +5,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Mar-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew
Netlist dialog redesigned, netlist.cpp code modified
and added an option to remove not locked footprints
when not found in netlist
2008-Mar-21 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+pcbnew
...
...
eeschema/onrightclick.cpp
View file @
72357970
...
...
@@ -298,7 +298,9 @@ void AddMenusForComponent( wxMenu* PopMenu, SCH_COMPONENT* Component )
if
(
!
Component
->
m_Flags
)
{
msg
=
AddHotkeyName
(
_
(
"Move Component"
),
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT
);
msg
=
_
(
"Move Component"
);
msg
<<
wxT
(
" "
)
<<
Component
->
GetFieldValue
(
REFERENCE
);
msg
=
AddHotkeyName
(
msg
,
s_Schematic_Hokeys_Descr
,
HK_MOVE_COMPONENT
);
ADD_MENUITEM
(
PopMenu
,
ID_POPUP_SCH_MOVE_CMP_REQUEST
,
msg
,
move_xpm
);
msg
=
AddHotkeyName
(
_
(
"Drag Component"
),
s_Schematic_Hokeys_Descr
,
HK_DRAG_COMPONENT
);
...
...
include/wxPcbStruct.h
View file @
72357970
...
...
@@ -441,7 +441,7 @@ public:
// Footprint edition (see also WinEDA_BasePcbFrame)
void
StartMove_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
);
bool
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
);
// loading modules: see WinEDA_BasePcbFrame
...
...
pcbnew/dialog_netlist.cpp
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/dialog_netlist.h
View file @
72357970
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_netlist.h
// Purpose:
// Author: jean-pierre Charras
...
...
@@ -14,7 +15,6 @@
#ifndef _DIALOG_NETLIST_H_
#define _DIALOG_NETLIST_H_
/*!
* Includes
*/
...
...
@@ -38,18 +38,20 @@ class wxStdDialogButtonSizer;
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_RADIOBOX 10005
#define ID_RADIOBOX1 10006
#define ID_RADIOBOX2 10007
#define ID_CHECKBOX 10008
#define ID_SELECTION_FOOTPRINT_MODE 10005
#define ID_KEEP_OR_CHANGE_FOOTPRINTS 10007
#define ID_DELETE_TRACKS_OPTION 10006
#define ID_DISPLAY_WARNINGS_OPT 10008
#define ID_REMOVE_EXTRA_FOOTPRINTS_OPT 10011
#define ID_OPEN_NELIST 10001
#define ID_READ_NETLIST_FILE 10002
#define ID_TEST_NETLIST 10003
#define ID_COMPILE_RATSNEST 10004
#define ID_TEXT_NETLIST_FILENAME 10012
#define ID_TEXTCTRL 10009
#define ID_STATICLINE 10010
#define SYMBOL_WINEDA_NETLISTFRAME_STYLE wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist
:
")
#define SYMBOL_WINEDA_NETLISTFRAME_TITLE _("Netlist
Dialog
")
#define SYMBOL_WINEDA_NETLISTFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_NETLISTFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_NETLISTFRAME_POSITION wxDefaultPosition
...
...
@@ -63,6 +65,7 @@ class wxStdDialogButtonSizer;
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_NetlistFrame class declaration
*/
...
...
@@ -74,13 +77,21 @@ class WinEDA_NetlistFrame: public wxDialog
public
:
/// Constructors
WinEDA_NetlistFrame
(
);
WinEDA_NetlistFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
DC
,
WinEDA_NetlistFrame
();
WinEDA_NetlistFrame
(
WinEDA_PcbFrame
*
parent
,
wxDC
*
DC
,
const
wxString
&
aNetlistFilename
,
wxWindowID
id
=
SYMBOL_WINEDA_NETLISTFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_NETLISTFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_NETLISTFRAME_POSITION
,
const
wxSize
&
size
=
SYMBOL_WINEDA_NETLISTFRAME_SIZE
,
long
style
=
SYMBOL_WINEDA_NETLISTFRAME_STYLE
);
/// Creation
bool
Create
(
wxWindow
*
parent
,
wxWindowID
id
=
SYMBOL_WINEDA_NETLISTFRAME_IDNAME
,
const
wxString
&
caption
=
SYMBOL_WINEDA_NETLISTFRAME_TITLE
,
const
wxPoint
&
pos
=
SYMBOL_WINEDA_NETLISTFRAME_POSITION
,
const
wxSize
&
size
=
SYMBOL_WINEDA_NETLISTFRAME_SIZE
,
long
style
=
SYMBOL_WINEDA_NETLISTFRAME_STYLE
);
/// Destructor
~
WinEDA_NetlistFrame
();
/// Initialises member variables
void
Init
();
/// Creates the controls and sizers
void
CreateControls
();
...
...
@@ -115,31 +126,20 @@ public:
/// Should we show tooltips?
static
bool
ShowToolTips
();
void
ReadPcbNetlist
(
wxCommandEvent
&
event
);
void
Set_NetlisteName
(
wxCommandEvent
&
event
);
bool
OpenNetlistFile
(
wxCommandEvent
&
event
);
int
BuildListeNetModules
(
wxCommandEvent
&
event
,
wxArrayString
&
BufName
);
void
ModulesControle
(
wxCommandEvent
&
event
);
int
ReadListeModules
(
const
wxString
*
RefCmp
,
long
TimeStamp
,
wxString
&
NameModule
);
int
SetPadNetName
(
char
*
Line
,
MODULE
*
Module
);
MODULE
*
ReadNetModule
(
char
*
Text
,
int
*
UseFichCmp
,
int
TstOnly
);
void
AddToList
(
const
wxString
&
NameLibCmp
,
const
wxString
&
NameCmp
,
int
TimeStamp
,
const
wxString
&
path
);
void
LoadListeModules
(
wxDC
*
DC
);
////@begin WinEDA_NetlistFrame member variables
wxRadioBox
*
m_Select_By_Timestamp
;
wxRadioBox
*
m_ChangeExistingFootprintCtrl
;
wxRadioBox
*
m_DeleteBadTracks
;
wxRadioBox
*
m_ChangeExistantModuleCtrl
;
wxCheckBox
*
m_DisplayWarningCtrl
;
wxCheckBox
*
m_RemoveExtraFootprintsCtrl
;
wxTextCtrl
*
m_NetlistFilenameCtrl
;
wxTextCtrl
*
m_MessageWindow
;
wxStdDialogButtonSizer
*
StdDialogButtonSizer
;
////@end WinEDA_NetlistFrame member variables
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
WinEDA_PcbFrame
*
m_Parent
;
wxDC
*
m_DC
;
};
#endif
// _DIALOG_NETLIST_H_
// _DIALOG_NETLIST_H_
pcbnew/dialog_netlist.pjd
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/edit.cpp
View file @
72357970
...
...
@@ -592,7 +592,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
if
(
!
GetCurItem
()
||
GetCurItem
()
->
Type
()
!=
TYPEMODULE
)
break
;
if
(
Delete_Module
(
(
MODULE
*
)
GetCurItem
(),
&
dc
)
)
if
(
Delete_Module
(
(
MODULE
*
)
GetCurItem
(),
&
dc
,
true
)
)
{
SetCurItem
(
NULL
);
}
...
...
@@ -1023,7 +1023,7 @@ void WinEDA_PcbFrame::RemoveStruct( BOARD_ITEM* Item, wxDC* DC )
switch
(
Item
->
Type
()
)
{
case
TYPEMODULE
:
Delete_Module
(
(
MODULE
*
)
Item
,
DC
);
Delete_Module
(
(
MODULE
*
)
Item
,
DC
,
true
);
break
;
case
TYPECOTATION
:
...
...
pcbnew/modules.cpp
View file @
72357970
...
...
@@ -263,9 +263,9 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
}
/**************************************************************/
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
)
/**************************************************************/
/**************************************************************
***************************
/
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
,
bool
aAskBeforeDeleting
)
/**************************************************************
****************************
/
/**
* Function Delete Module
...
...
@@ -273,6 +273,7 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
* The net rastenes and pad list are recalcualed
* @param module = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnets and dirty rectange
* @param aPromptBeforeDeleting : if true: ask for confirmation before deleting
*/
{
EDA_BaseStruct
*
PtBack
,
*
PtNext
;
...
...
@@ -285,6 +286,8 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
/* Confirmation de l'effacement */
module
->
Display_Infos
(
this
);
if
(
aAskBeforeDeleting
)
{
msg
<<
_
(
"Delete Module"
)
<<
wxT
(
" "
)
<<
module
->
m_Reference
->
m_Text
<<
wxT
(
" ("
)
<<
_
(
"Value "
)
<<
module
->
m_Value
->
m_Text
<<
wxT
(
") ?"
);
...
...
@@ -292,6 +295,7 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
{
return
FALSE
;
}
}
m_CurrentScreen
->
SetModify
();
...
...
pcbnew/netlist.cpp
View file @
72357970
This diff is collapsed.
Click to expand it.
pcbnew/pcbnew.h
View file @
72357970
...
...
@@ -169,8 +169,7 @@ eda_global wxString g_SaveFileName // File Name for periodic saving
(
wxT
(
"$savepcb"
)
)
#endif
;
eda_global
wxString
NetNameBuffer
;
// Netlist file extension
eda_global
wxString
NetExtBuffer
eda_global
wxString
NetExtBuffer
// Netlist file extension
#ifdef MAIN
(
wxT
(
".net"
)
)
#endif
...
...
pcbnew/ratsnest.cpp
View file @
72357970
...
...
@@ -389,7 +389,7 @@ static int gen_rats_pad_to_pad( WinEDA_DrawPanel* DrawPanel, wxDC* DC,
g_pt_chevelu
->
pad_start
=
ref_pad
;
g_pt_chevelu
->
pad_end
=
pad
;
if
(
DisplayRastnestInProgress
)
if
(
DisplayRastnestInProgress
&&
DC
)
{
GRLine
(
&
DrawPanel
->
m_ClipBox
,
DC
,
g_pt_chevelu
->
pad_start
->
m_Pos
.
x
,
g_pt_chevelu
->
pad_start
->
m_Pos
.
y
,
...
...
@@ -566,7 +566,7 @@ void WinEDA_BasePcbFrame::Build_Board_Ratsnest( wxDC* DC )
// erase the ratsnest displayed on screen if needed
CHEVELU
*
Chevelu
=
(
CHEVELU
*
)
m_Pcb
->
m_Ratsnest
;
GRSetDrawMode
(
DC
,
GR_XOR
);
if
(
DC
)
GRSetDrawMode
(
DC
,
GR_XOR
);
for
(
ii
=
m_Pcb
->
GetNumRatsnests
();
ii
>
0
;
ii
--
,
Chevelu
++
)
{
...
...
@@ -1302,6 +1302,8 @@ void WinEDA_BasePcbFrame::trace_ratsnest_module( wxDC* DC )
CHEVELU
*
local_chevelu
;
int
ii
;
if
(
DC
==
NULL
)
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
CHEVELU_LOCAL_OK
)
==
0
)
return
;
...
...
@@ -1479,6 +1481,9 @@ void WinEDA_BasePcbFrame::trace_ratsnest_pad( wxDC* DC )
int
ii
;
int
refX
,
refY
;
if
(
DC
==
NULL
)
return
;
if
(
(
m_Pcb
->
m_Status_Pcb
&
LISTE_CHEVELU_OK
)
==
0
)
return
;
...
...
pcbnew/xchgmod.cpp
View file @
72357970
...
...
@@ -211,10 +211,7 @@ int WinEDA_ExchangeModuleFrame::Maj_ListeCmp(
return
0
;
/* pas de changement de nom */
/* Calcul nom fichier CMP par changement de l'extension du nom netliste */
if
(
NetNameBuffer
==
wxEmptyString
)
FileNameCmp
=
m_Parent
->
m_CurrentScreen
->
m_FileName
;
else
FileNameCmp
=
NetNameBuffer
;
ChangeFileNameExt
(
FileNameCmp
,
NetCmpExtBuffer
);
// Modification du fichier .cmp correcpondant
...
...
@@ -617,10 +614,7 @@ bool WinEDA_PcbFrame::RecreateCmpFileFromBoard()
}
/* Calcul nom fichier CMP par changement de l'extension du nom netliste */
if
(
NetNameBuffer
==
wxEmptyString
)
FullFileNameCmp
=
m_CurrentScreen
->
m_FileName
;
else
FullFileNameCmp
=
NetNameBuffer
;
ChangeFileNameExt
(
FullFileNameCmp
,
NetCmpExtBuffer
);
mask
=
wxT
(
"*"
)
+
NetCmpExtBuffer
;
...
...
share/dialog_print.cpp
View file @
72357970
...
...
@@ -42,7 +42,7 @@ BEGIN_EVENT_TABLE( WinEDA_PrintFrame, wxDialog )
EVT_BUTTON
(
ID_PRINT_EXECUTE
,
WinEDA_PrintFrame
::
OnPrintExecuteClick
)
EVT_BUTTON
(
wxID_C
LOSE
,
WinEDA_PrintFrame
::
OnClose
Click
)
EVT_BUTTON
(
wxID_C
ANCEL
,
WinEDA_PrintFrame
::
OnCancel
Click
)
////@end WinEDA_PrintFrame event table entries
...
...
@@ -91,10 +91,11 @@ bool WinEDA_PrintFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
m_ColorOption
=
NULL
;
m_PagesOptionPcb
=
NULL
;
m_PagesOptionEeschema
=
NULL
;
m_CloseButton
=
NULL
;
////@end WinEDA_PrintFrame member initialisation
////@begin WinEDA_PrintFrame creation
SetExtraStyle
(
GetExtraStyle
()
|
wxWS_EX_BLOCK_EVENTS
);
SetExtraStyle
(
wxWS_EX_BLOCK_EVENTS
);
wxDialog
::
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
CreateControls
();
...
...
@@ -116,7 +117,7 @@ void WinEDA_PrintFrame::CreateControls()
SetFont
(
*
g_DialogFont
);
////@begin WinEDA_PrintFrame content construction
// Generated by DialogBlocks, 2
4/01/2007 16:36:31
(unregistered)
// Generated by DialogBlocks, 2
2/03/2008 08:33:38
(unregistered)
WinEDA_PrintFrame
*
itemDialog1
=
this
;
...
...
@@ -132,18 +133,17 @@ void WinEDA_PrintFrame::CreateControls()
wxBoxSizer
*
itemBoxSizer5
=
new
wxBoxSizer
(
wxVERTICAL
);
itemBoxSizer2
->
Add
(
itemBoxSizer5
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_ScaleOptionStrings
[]
=
{
_
(
"fit in page"
),
_
(
"Scale 0.5"
),
_
(
"Scale 0.7"
),
_
(
"Approx. Scale 1"
),
_
(
"Accurate Scale 1"
),
_
(
"Scale 1.4"
),
_
(
"Scale 2"
),
_
(
"Scale 3"
),
_
(
"Scale 4"
)
};
m_ScaleOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_PRINT_SCALE
,
_
(
"Approx. Scale:"
),
wxDefaultPosition
,
wxDefaultSize
,
9
,
m_ScaleOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_ScaleOptionStrings
;
m_ScaleOptionStrings
.
Add
(
_
(
"fit in page"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 0.5"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 0.7"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Approx. Scale 1"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Accurate Scale 1"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 1.4"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 2"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 3"
));
m_ScaleOptionStrings
.
Add
(
_
(
"Scale 4"
));
m_ScaleOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_PRINT_SCALE
,
_
(
"Approx. Scale:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_ScaleOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_ScaleOption
->
SetSelection
(
0
);
itemBoxSizer5
->
Add
(
m_ScaleOption
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
...
...
@@ -179,27 +179,24 @@ void WinEDA_PrintFrame::CreateControls()
m_Print_Mirror
->
SetValue
(
false
);
itemStaticBoxSizer13
->
Add
(
m_Print_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_ColorOptionStrings
[]
=
{
_
(
"Color"
),
_
(
"Black"
)
};
m_ColorOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_BW
,
_
(
"Color Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_ColorOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_ColorOptionStrings
;
m_ColorOptionStrings
.
Add
(
_
(
"Color"
));
m_ColorOptionStrings
.
Add
(
_
(
"Black"
));
m_ColorOption
=
new
wxRadioBox
(
itemDialog1
,
ID_SET_BW
,
_
(
"Color Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_ColorOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_ColorOption
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_ColorOption
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_PagesOptionPcbStrings
[]
=
{
_
(
"1 page per layer"
),
_
(
"Single Page"
)
};
m_PagesOptionPcb
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL_IN_ONE
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_PagesOptionPcbStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_PagesOptionPcbStrings
;
m_PagesOptionPcbStrings
.
Add
(
_
(
"1 Page per Layer"
));
m_PagesOptionPcbStrings
.
Add
(
_
(
"Single Page"
));
m_PagesOptionPcb
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL_IN_ONE
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PagesOptionPcbStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PagesOptionPcb
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_PagesOptionPcb
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
m_PagesOptionEeschemaStrings
[]
=
{
_
(
"Current"
),
_
(
"All"
)
};
m_PagesOptionEeschema
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
2
,
m_PagesOptionEeschemaStrings
,
1
,
wxRA_SPECIFY_COLS
);
wxArrayString
m_PagesOptionEeschemaStrings
;
m_PagesOptionEeschemaStrings
.
Add
(
_
(
"Current"
));
m_PagesOptionEeschemaStrings
.
Add
(
_
(
"All"
));
m_PagesOptionEeschema
=
new
wxRadioBox
(
itemDialog1
,
ID_PRINT_ALL
,
_
(
"Page Print:"
),
wxDefaultPosition
,
wxDefaultSize
,
m_PagesOptionEeschemaStrings
,
1
,
wxRA_SPECIFY_COLS
);
m_PagesOptionEeschema
->
SetSelection
(
0
);
itemBoxSizer12
->
Add
(
m_PagesOptionEeschema
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -222,8 +219,9 @@ void WinEDA_PrintFrame::CreateControls()
itemButton25
->
SetForegroundColour
(
wxColour
(
0
,
128
,
64
));
itemBoxSizer21
->
Add
(
itemButton25
,
0
,
wxGROW
|
wxALL
,
5
);
wxButton
*
itemButton26
=
new
wxButton
(
itemDialog1
,
wxID_CLOSE
,
_
(
"&Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemBoxSizer21
->
Add
(
itemButton26
,
0
,
wxGROW
|
wxALL
,
5
);
m_CloseButton
=
new
wxButton
(
itemDialog1
,
wxID_CANCEL
,
_
(
"&Close"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_CloseButton
->
SetDefault
();
itemBoxSizer21
->
Add
(
m_CloseButton
,
0
,
wxGROW
|
wxALL
,
5
);
// Set validators
m_ScaleOption
->
SetValidator
(
wxGenericValidator
(
&
s_Scale_Select
)
);
...
...
@@ -233,6 +231,7 @@ void WinEDA_PrintFrame::CreateControls()
m_PagesOptionEeschema
->
SetValidator
(
wxGenericValidator
(
&
s_OptionPrintPage
)
);
////@end WinEDA_PrintFrame content construction
m_CloseButton
->
SetFocus
(
);
// add this line to close dialog by the escape key
m_DialogPenWidth
=
new
WinEDA_ValueCtrl
(
this
,
_
(
"Pen width mini"
),
s_PrintPenMinWidth
,
g_UnitMetric
,
m_DialogPenWidthSizer
,
m_Parent
->
m_InternalUnits
);
...
...
@@ -304,7 +303,7 @@ void WinEDA_PrintFrame::OnPrintExecuteClick( wxCommandEvent& event )
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CLOSE
*/
void
WinEDA_PrintFrame
::
OnC
lose
Click
(
wxCommandEvent
&
event
)
void
WinEDA_PrintFrame
::
OnC
ancel
Click
(
wxCommandEvent
&
event
)
{
OnClosePrintDialog
();
}
...
...
share/dialog_print.h
View file @
72357970
...
...
@@ -99,8 +99,8 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_PRINT_EXECUTE
void
OnPrintExecuteClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_C
LOSE
void
OnC
lose
Click
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_C
ANCEL
void
OnC
ancel
Click
(
wxCommandEvent
&
event
);
////@end WinEDA_PrintFrame event handler declarations
...
...
@@ -142,6 +142,7 @@ public:
wxRadioBox
*
m_ColorOption
;
wxRadioBox
*
m_PagesOptionPcb
;
wxRadioBox
*
m_PagesOptionEeschema
;
wxButton
*
m_CloseButton
;
////@end WinEDA_PrintFrame member variables
WinEDA_DrawFrame
*
m_Parent
;
...
...
share/dialog_print.pjd
View file @
72357970
This diff is collapsed.
Click to expand it.
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