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
9e32b2ab
Commit
9e32b2ab
authored
Oct 07, 2007
by
g_harland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assorted changes; see change_log.txt
parent
ee68d20e
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
825 additions
and
576 deletions
+825
-576
change_log.txt
change_log.txt
+48
-1
displlst.cpp
common/displlst.cpp
+10
-12
dialog_display_options.cpp
cvpcb/dialog_display_options.cpp
+88
-47
dialog_display_options.h
cvpcb/dialog_display_options.h
+11
-11
editpart.cpp.notused
eeschema/editpart.cpp.notused
+1
-1
libedpart.cpp.notused
eeschema/libedpart.cpp.notused
+1
-1
sheetlab.cpp
eeschema/sheetlab.cpp
+10
-19
export_to_pcbnew.cpp
gerbview/export_to_pcbnew.cpp
+17
-0
options.cpp
gerbview/options.cpp
+4
-5
reglage.cpp
gerbview/reglage.cpp
+2
-3
select_layers_to_pcb.cpp
gerbview/select_layers_to_pcb.cpp
+153
-104
set_color.cpp
gerbview/set_color.cpp
+97
-67
set_color.h
gerbview/set_color.h
+100
-100
pcbstruct.h
include/pcbstruct.h
+1
-1
wxstruct.h
include/wxstruct.h
+13
-11
block.cpp
pcbnew/block.cpp
+2
-2
class_text_mod.cpp
pcbnew/class_text_mod.cpp
+1
-1
cotation.cpp
pcbnew/cotation.cpp
+16
-21
dialog_edit_module.cpp
pcbnew/dialog_edit_module.cpp
+8
-11
dialog_edit_module.h
pcbnew/dialog_edit_module.h
+3
-5
muonde.cpp
pcbnew/muonde.cpp
+13
-17
pcbplot.cpp
pcbnew/pcbplot.cpp
+1
-1
pcbtexte.cpp
pcbnew/pcbtexte.cpp
+15
-19
sel_layer.cpp
pcbnew/sel_layer.cpp
+142
-67
swap_layers.cpp
pcbnew/swap_layers.cpp
+67
-48
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+1
-1
No files found.
change_log.txt
View file @
9e32b2ab
...
...
@@ -4,6 +4,54 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Oct-07 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
+ all
* Various dialog boxes can now (otherwise) be cancelled by pressing the "Esc" key.
(Some dialog boxes still require attention in that regard though, so that task
is not yet complete.) And the captions of the "OK" button within various dialog
boxes have been fully capitalised (meaning that an icon is now provided within
each of those buttons within the Linux version of KiCad).
* DIALOG_STYLE (defined within include/wxstruct.h) now includes MAYBE_RESIZE_BORDER
field. (Refer to 2007-Oct-2 UPDATE notes for the relevance of this.)
* Beautification and house keeping.
+ eeschema
* The editpart.cpp and editpart.cpp files (which are no longer used) have been
removed, and replaced with editpart.cpp.notused and editpart.cpp.notused
+ cvpcb
* Additional "OK", "Cancel", and "Apply" buttons have now been provided for the
"Options" dialog box which lists various display options for footprints.
+ pcbnew
* Invoking the "Select Layer Pair:" dialog box is no longer possible whenever only
one (copper) layer is currently enabled. And it is no longer possible to select
the same layer to be both the Top Layer and Bottom Layer (for any Layer Pair).
* Deselecting layers during the "Swap layers" command is now more user-friendly,
due to the provision of an additional "(Deselect)" radiobutton within the (child)
"Select Layer:" dialog box (which is always invoked whenever a different
radiobutton within the "Swap Layers:" dialog box is clicked on). (It had
previously been necessary to cancel the "Select Layer:" dialog box before being
able to click on the "Deselect" button within the "Swap Layers:" dialog box.)
* Definition for NB_LAYERS changed from (EDGE_N + 1) to (LAST_NO_COPPER_LAYER + 1)
(Although EDGE_N is currently the "last" layer, that wouldn't necessarily still
be true if any additional layers are ever defined in the future.) And comparisons
to 29 (or 28) have been replaced with comparisons to NB_LAYERS (when appropriate).
+ gerbview
* The previously provided "Exit" button within the "GerbView Layer Colors" dialog
box has been replaced with "OK", "Cancel", and "Apply" buttons; and both the
visibility and color of the Grid layer can now be edited from the same dialog.
* Deselecting (Gerber) layers during the "Export to Pcbnew" command is now more
user-friendly, due to the provision of an additional "(Deselect)" radiobutton
within the (child) "Select Layer:" dialog box (which is always invoked whenever
a different radiobutton within the "Layer selection:" dialog box is clicked on).
(It had previously been necessary to cancel the "Select Layer:" dialog box before
being able to click on the "Deselect" button within the "Layer selection:" dialog
box.)
* The "Export to Pcbnew" command now requires at least one Gerber file to have been
already loaded. And Gerber files can now be loaded into any of the 32 (Gerber)
layers provided. (It had previously been necessary to avoid having any gaps within
the sequence of used Gerber layers.)
2007-Oct-6 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ pcbnew
...
...
@@ -11,7 +59,6 @@ email address.
move RemoteCommand() and SendMessageToEESCHEMA() to cross-probing.cpp
2007-Oct-3 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
...
...
common/displlst.cpp
View file @
9e32b2ab
...
...
@@ -16,14 +16,12 @@
/***********************/
enum
listbox
{
ID_LISTBOX_CANCEL
=
8000
,
ID_LISTBOX_LIST
,
ID_LISTBOX_OK
ID_LISTBOX_LIST
=
8000
};
BEGIN_EVENT_TABLE
(
WinEDAListBox
,
wxDialog
)
EVT_BUTTON
(
ID_LISTBOX_OK
,
WinEDAListBox
::
O
k
)
EVT_BUTTON
(
ID_LISTBOX_CANCEL
,
WinEDAListBox
::
Cancel
)
EVT_BUTTON
(
wxID_OK
,
WinEDAListBox
::
OnOkClic
k
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDAListBox
::
OnCancelClick
)
EVT_LISTBOX
(
ID_LISTBOX_LIST
,
WinEDAListBox
::
ClickOnList
)
EVT_LISTBOX_DCLICK
(
ID_LISTBOX_LIST
,
WinEDAListBox
::
D_ClickOnList
)
EVT_CHAR
(
WinEDAListBox
::
OnKeyEvent
)
...
...
@@ -98,11 +96,11 @@ int ii;
m_List
->
Append
(
*
names
);
}
wxButton
*
butt
=
new
wxButton
(
this
,
ID_LISTBOX_OK
,
_
(
"Ok
"
));
wxButton
*
butt
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK
"
));
RightBoxSizer
->
Add
(
butt
,
0
,
wxGROW
|
wxALL
,
5
);
butt
->
SetDefault
();
butt
=
new
wxButton
(
this
,
ID_LISTBOX
_CANCEL
,
_
(
"Cancel"
));
butt
=
new
wxButton
(
this
,
wxID
_CANCEL
,
_
(
"Cancel"
));
RightBoxSizer
->
Add
(
butt
,
0
,
wxGROW
|
wxALL
,
5
);
if
(
m_MoveFct
)
...
...
@@ -110,7 +108,7 @@ int ii;
size
.
x
=
-
1
;
size
.
y
=
60
;
m_WinMsg
=
new
wxTextCtrl
(
this
,
-
1
,
wxEmptyString
,
wxDefaultPosition
,
size
,
wxTE_READONLY
|
wxTE_MULTILINE
);
GeneralBoxSizer
->
Add
(
m_WinMsg
,
0
,
wxGROW
|
wxALL
,
5
);
GeneralBoxSizer
->
Add
(
m_WinMsg
,
0
,
wxGROW
|
wxALL
,
5
);
}
GetSizer
()
->
Fit
(
this
);
...
...
@@ -174,7 +172,7 @@ void WinEDAListBox::InsertItems(const wxArrayString & itemlist, int position)
}
/************************************************/
void
WinEDAListBox
::
Cancel
(
wxCommandEvent
&
event
)
void
WinEDAListBox
::
OnCancelClick
(
wxCommandEvent
&
event
)
/************************************************/
{
EndModal
(
-
1
);
...
...
@@ -205,7 +203,7 @@ int ii = m_List->GetSelection();
/***********************************************/
void
WinEDAListBox
::
Ok
(
wxCommandEvent
&
event
)
void
WinEDAListBox
::
O
nOkClic
k
(
wxCommandEvent
&
event
)
/***********************************************/
{
int
ii
=
m_List
->
GetSelection
();
...
...
@@ -224,8 +222,8 @@ void WinEDAListBox::OnClose(wxCloseEvent& event)
static
int
SortItems
(
const
wxString
**
ptr1
,
const
wxString
**
ptr2
)
/********************************************************************/
/* Routines de comparaison pour le tri tri alphabetique,
avec traitement des nombres en tant que valeur numerique
*/
*
avec traitement des nombres en tant que valeur numerique
*/
{
return
StrNumICmp
(
(
*
ptr1
)
->
GetData
(),
(
*
ptr2
)
->
GetData
()
);
}
...
...
cvpcb/dialog_display_options.cpp
View file @
9e32b2ab
...
...
@@ -47,7 +47,8 @@ void WinEDA_DisplayFrame::InstallOptionsDisplay(wxCommandEvent& event)
/* Creation de la fenetre d'options de la fenetre de visu */
{
KiDisplayOptionsFrame
*
OptionWindow
=
new
KiDisplayOptionsFrame
(
this
);
OptionWindow
->
ShowModal
();
OptionWindow
->
Destroy
();
OptionWindow
->
ShowModal
();
OptionWindow
->
Destroy
();
}
...
...
@@ -65,15 +66,13 @@ IMPLEMENT_DYNAMIC_CLASS( KiDisplayOptionsFrame, wxDialog )
BEGIN_EVENT_TABLE
(
KiDisplayOptionsFrame
,
wxDialog
)
////@begin KiDisplayOptionsFrame event table entries
EVT_CHECKBOX
(
PADNUM_OPT
,
KiDisplayOptionsFrame
::
OnPadnumOptClick
)
EVT_BUTTON
(
ID_SAVE_CONFIG
,
KiDisplayOptionsFrame
::
OnSaveConfigClick
)
EVT_
CHECKBOX
(
PADFILL_OPT
,
KiDisplayOptionsFrame
::
OnPadfillOpt
Click
)
EVT_
BUTTON
(
wxID_OK
,
KiDisplayOptionsFrame
::
OnOk
Click
)
EVT_
RADIOBOX
(
EDGE_SELECT
,
KiDisplayOptionsFrame
::
OnEdgeSelectSelected
)
EVT_
BUTTON
(
wxID_CANCEL
,
KiDisplayOptionsFrame
::
OnCancelClick
)
EVT_
RADIOBOX
(
TEXT_SELECT
,
KiDisplayOptionsFrame
::
OnTextSelectSelected
)
EVT_
BUTTON
(
wxID_APPLY
,
KiDisplayOptionsFrame
::
OnApplyClick
)
////@end KiDisplayOptionsFrame event table entries
...
...
@@ -101,10 +100,10 @@ KiDisplayOptionsFrame::KiDisplayOptionsFrame( WinEDA_BasePcbFrame* parent, wxWin
bool
KiDisplayOptionsFrame
::
Create
(
wxWindow
*
parent
,
wxWindowID
id
,
const
wxString
&
caption
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
{
////@begin KiDisplayOptionsFrame member initialisation
m_IsShowPadNum
=
NULL
;
m_IsShowPadFill
=
NULL
;
m_EdgesDisplayOption
=
NULL
;
m_TextDisplayOption
=
NULL
;
m_IsShowPadNum
=
NULL
;
m_IsShowPadFill
=
NULL
;
////@end KiDisplayOptionsFrame member initialisation
////@begin KiDisplayOptionsFrame creation
...
...
@@ -132,24 +131,16 @@ void KiDisplayOptionsFrame::CreateControls()
KiDisplayOptionsFrame
*
itemDialog1
=
this
;
wxBoxSizer
*
itemBoxSizer2
=
new
wxBoxSizer
(
wx
HORIZONT
AL
);
wxBoxSizer
*
itemBoxSizer2
=
new
wxBoxSizer
(
wx
VERTIC
AL
);
itemDialog1
->
SetSizer
(
itemBoxSizer2
);
wxFlexGridSizer
*
itemFlexGridSizer3
=
new
wxFlexGridSizer
(
3
,
2
,
0
,
0
);
itemBoxSizer2
->
Add
(
itemFlexGridSizer3
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
wxBoxSizer
*
itemBoxSizer3
=
new
wxBoxSizer
(
wxHORIZONTAL
);
// itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer2
->
Add
(
itemBoxSizer3
,
0
,
wxALIGN_TOP
|
wxALL
,
5
);
m_IsShowPadNum
=
new
wxCheckBox
(
itemDialog1
,
PADNUM_OPT
,
_
(
"Pad &Num"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_IsShowPadNum
->
SetValue
(
false
);
itemFlexGridSizer3
->
Add
(
m_IsShowPadNum
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
wxButton
*
itemButton5
=
new
wxButton
(
itemDialog1
,
ID_SAVE_CONFIG
,
_
(
"Save Cfg"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemFlexGridSizer3
->
Add
(
itemButton5
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
m_IsShowPadFill
=
new
wxCheckBox
(
itemDialog1
,
PADFILL_OPT
,
_
(
"&Pad Fill"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_IsShowPadFill
->
SetValue
(
false
);
itemFlexGridSizer3
->
Add
(
m_IsShowPadFill
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
itemFlexGridSizer3
->
Add
(
5
,
5
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALIGN_CENTER_VERTICAL
|
wxLEFT
|
wxTOP
|
wxBOTTOM
,
5
);
wxBoxSizer
*
itemBoxSizer4
=
new
wxBoxSizer
(
wxHORIZONTAL
);
// itemBoxSizer2->Add(itemBoxSizer4, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer2
->
Add
(
itemBoxSizer4
,
0
,
wxGROW
|
wxALIGN_TOP
|
wxALL
,
5
);
wxString
m_EdgesDisplayOptionStrings
[]
=
{
_
(
"&Filaire"
),
...
...
@@ -157,7 +148,8 @@ void KiDisplayOptionsFrame::CreateControls()
_
(
"&Sketch"
)
};
m_EdgesDisplayOption
=
new
wxRadioBox
(
itemDialog1
,
EDGE_SELECT
,
_
(
"Edges:"
),
wxDefaultPosition
,
wxDefaultSize
,
3
,
m_EdgesDisplayOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
itemFlexGridSizer3
->
Add
(
m_EdgesDisplayOption
,
0
,
wxALIGN_LEFT
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
// itemBoxSizer3->Add(m_EdgesDisplayOption, 0, wxGROW|wxALL, 5);
itemBoxSizer3
->
Add
(
m_EdgesDisplayOption
,
0
,
wxALIGN_LEFT
|
wxALL
,
5
);
wxString
m_TextDisplayOptionStrings
[]
=
{
_
(
"&Filaire"
),
...
...
@@ -165,13 +157,54 @@ void KiDisplayOptionsFrame::CreateControls()
_
(
"&Sketch"
)
};
m_TextDisplayOption
=
new
wxRadioBox
(
itemDialog1
,
TEXT_SELECT
,
_
(
"Texts:"
),
wxDefaultPosition
,
wxDefaultSize
,
3
,
m_TextDisplayOptionStrings
,
1
,
wxRA_SPECIFY_COLS
);
itemFlexGridSizer3
->
Add
(
m_TextDisplayOption
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
// itemBoxSizer3->Add(m_TextDisplayOption, 0, wxGROW|wxALL, 5);
itemBoxSizer3
->
Add
(
m_TextDisplayOption
,
0
,
wxALIGN_LEFT
|
wxALL
,
5
);
wxBoxSizer
*
itemBoxSizer5
=
new
wxBoxSizer
(
wxVERTICAL
);
// itemBoxSizer3->Add(itemBoxSizer5, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);
itemBoxSizer3
->
Add
(
itemBoxSizer5
,
0
,
wxGROW
|
wxALL
,
0
);
// Provide a spacer to improve appearance of dialog box
itemBoxSizer5
->
AddSpacer
(
5
);
m_IsShowPadNum
=
new
wxCheckBox
(
itemDialog1
,
PADNUM_OPT
,
_
(
"Pad &Num"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_IsShowPadNum
->
SetValue
(
false
);
// itemBoxSizer5->Add(m_IsShowPadNum, 0, wxGROW|wxALL, 5);
itemBoxSizer5
->
Add
(
m_IsShowPadNum
,
0
,
wxALIGN_TOP
|
wxALL
,
5
);
m_IsShowPadFill
=
new
wxCheckBox
(
itemDialog1
,
PADFILL_OPT
,
_
(
"&Pad Fill"
),
wxDefaultPosition
,
wxDefaultSize
,
wxCHK_2STATE
);
m_IsShowPadFill
->
SetValue
(
false
);
// itemBoxSizer5->Add(m_IsShowPadFill, 0, wxGROW|wxALL, 5);
itemBoxSizer5
->
Add
(
m_IsShowPadFill
,
0
,
wxALIGN_TOP
|
wxALL
,
5
);
// Provide a stretch spacer to improve appearance of dialog box
itemBoxSizer5
->
AddStretchSpacer
();
wxButton
*
itemButton6
=
new
wxButton
(
itemDialog1
,
ID_SAVE_CONFIG
,
_
(
"Save Cfg..."
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
// itemBoxSizer5->Add(itemButton6, 0, wxGROW|wxALL, 5);
itemBoxSizer5
->
Add
(
itemButton6
,
0
,
wxALIGN_BOTTOM
|
wxALL
,
5
);
// itemBoxSizer4->AddStretchSpacer();
wxButton
*
itemButton7
=
new
wxButton
(
itemDialog1
,
wxID_OK
,
_
(
"OK"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemButton7
->
SetForegroundColour
(
*
wxRED
);
// itemBoxSizer4->Add(itemButton7, 0, wxGROW|wxALL, 5);
itemBoxSizer4
->
Add
(
itemButton7
,
0
,
wxALIGN_RIGHT
|
wxALL
,
5
);
wxButton
*
itemButton8
=
new
wxButton
(
itemDialog1
,
wxID_CANCEL
,
_
(
"Cancel"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
itemButton8
->
SetForegroundColour
(
*
wxBLUE
);
// itemBoxSizer4->Add(itemButton8, 0, wxGROW|wxALL, 5);
itemBoxSizer4
->
Add
(
itemButton8
,
0
,
wxALIGN_RIGHT
|
wxALL
,
5
);
wxButton
*
itemButton9
=
new
wxButton
(
itemDialog1
,
wxID_APPLY
,
_
(
"Apply"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
// itemBoxSizer4->Add(itemButton9, 0, wxGROW|wxALL, 5);
itemBoxSizer4
->
Add
(
itemButton9
,
0
,
wxALIGN_RIGHT
|
wxALL
,
5
);
// Set validators
m_IsShowPadNum
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayPadNum
)
);
m_IsShowPadFill
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayPadFill
)
);
m_EdgesDisplayOption
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayModEdge
)
);
m_TextDisplayOption
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayModText
)
);
m_IsShowPadNum
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayPadNum
)
);
m_IsShowPadFill
->
SetValidator
(
wxGenericValidator
(
&
DisplayOpt
.
DisplayPadFill
)
);
////@end KiDisplayOptionsFrame content construction
}
...
...
@@ -210,57 +243,65 @@ wxIcon KiDisplayOptionsFrame::GetIconResource( const wxString& name )
////@end KiDisplayOptionsFrame icon retrieval
}
/*!
*
wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADFILL_OPT
*
Update settings related to edges, text strings, and pads
*/
void
KiDisplayOptionsFrame
::
OnPadfillOptClick
(
wxCommandEvent
&
event
)
void
KiDisplayOptionsFrame
::
UpdateObjectSettings
(
)
{
// Update settings
////@begin KiDisplayOptionsFrame update settings
DisplayOpt
.
DisplayModEdge
=
m_Parent
->
m_DisplayModEdge
=
m_EdgesDisplayOption
->
GetSelection
();
DisplayOpt
.
DisplayModText
=
m_Parent
->
m_DisplayModText
=
m_TextDisplayOption
->
GetSelection
();
DisplayOpt
.
DisplayPadNum
=
m_Parent
->
m_DisplayPadNum
=
m_IsShowPadNum
->
GetValue
();
DisplayOpt
.
DisplayPadFill
=
m_Parent
->
m_DisplayPadFill
=
m_IsShowPadFill
->
GetValue
();
m_Parent
->
ReDrawPanel
();
////@end KiDisplayOptionsFrame update settings
}
/*!
* wxEVT_COMMAND_
CHECKBOX_CLICKED event handler for PADNUM_OPT
* wxEVT_COMMAND_
BUTTON_CLICKED event handler for ID_SAVE_CONFIG
*/
void
KiDisplayOptionsFrame
::
On
PadnumOpt
Click
(
wxCommandEvent
&
event
)
void
KiDisplayOptionsFrame
::
On
SaveConfig
Click
(
wxCommandEvent
&
event
)
{
DisplayOpt
.
DisplayPadNum
=
m_Parent
->
m_DisplayPadNum
=
m_IsShowPadNum
->
GetValue
();
m_Parent
->
ReDrawPanel
();
Save_Config
(
this
);
}
/*!
* wxEVT_COMMAND_
RADIOBOX_SELECTED event handler for EDGE_SELECT
* wxEVT_COMMAND_
BUTTON_CLICKED event handler for wxID_OK
*/
void
KiDisplayOptionsFrame
::
On
EdgeSelectSelected
(
wxCommandEvent
&
event
)
void
KiDisplayOptionsFrame
::
On
OkClick
(
wxCommandEvent
&
event
)
{
DisplayOpt
.
DisplayModEdge
=
m_Parent
->
m_DisplayModEdge
=
m_EdgesDisplayOption
->
GetSelection
();
m_Parent
->
ReDrawPanel
();
UpdateObjectSettings
();
EndModal
(
1
);
}
/*!
* wxEVT_COMMAND_BUTTON_CLICKED event handler for
ID_SAVE_CONFIG
* wxEVT_COMMAND_BUTTON_CLICKED event handler for
wxID_CANCEL
*/
void
KiDisplayOptionsFrame
::
On
SaveConfig
Click
(
wxCommandEvent
&
event
)
void
KiDisplayOptionsFrame
::
On
Cancel
Click
(
wxCommandEvent
&
event
)
{
Save_Config
(
this
);
EndModal
(
-
1
);
}
/*!
* wxEVT_COMMAND_
RADIOBOX_SELECTED event handler for TEXT_SELECT
* wxEVT_COMMAND_
BUTTON_CLICKED event handler for wxID_APPLY
*/
void
KiDisplayOptionsFrame
::
On
TextSelectSelected
(
wxCommandEvent
&
event
)
void
KiDisplayOptionsFrame
::
On
ApplyClick
(
wxCommandEvent
&
event
)
{
DisplayOpt
.
DisplayModText
=
m_Parent
->
m_DisplayModText
=
m_TextDisplayOption
->
GetSelection
();
m_Parent
->
ReDrawPanel
();
UpdateObjectSettings
();
}
cvpcb/dialog_display_options.h
View file @
9e32b2ab
...
...
@@ -81,20 +81,17 @@ public:
////@begin KiDisplayOptionsFrame event handler declarations
/// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for PADNUM_OPT
void
OnPadnumOptClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SAVE_CONFIG
void
OnSaveConfigClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
CHECKBOX_CLICKED event handler for PADFILL_OPT
void
On
PadfillOpt
Click
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
BUTTON_CLICKED event handler for wxID_OK
void
On
Ok
Click
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
RADIOBOX_SELECTED event handler for EDGE_SELECT
void
On
EdgeSelectSelected
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
BUTTON_CLICKED event handler for wxID_CANCEL
void
On
CancelClick
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
RADIOBOX_SELECTED event handler for TEXT_SELECT
void
On
TextSelectSelected
(
wxCommandEvent
&
event
);
/// wxEVT_COMMAND_
BUTTON_CLICKED event handler for wxID_APPLY
void
On
ApplyClick
(
wxCommandEvent
&
event
);
////@end KiDisplayOptionsFrame event handler declarations
...
...
@@ -105,16 +102,19 @@ public:
/// Retrieves icon resources
wxIcon
GetIconResource
(
const
wxString
&
name
);
/// Updates settings related to edges, text strings, and pads
void
UpdateObjectSettings
();
////@end KiDisplayOptionsFrame member function declarations
/// Should we show tooltips?
static
bool
ShowToolTips
();
////@begin KiDisplayOptionsFrame member variables
wxCheckBox
*
m_IsShowPadNum
;
wxCheckBox
*
m_IsShowPadFill
;
wxRadioBox
*
m_EdgesDisplayOption
;
wxRadioBox
*
m_TextDisplayOption
;
wxCheckBox
*
m_IsShowPadNum
;
wxCheckBox
*
m_IsShowPadFill
;
////@end KiDisplayOptionsFrame member variables
WinEDA_BasePcbFrame
*
m_Parent
;
...
...
eeschema/editpart.cpp
→
eeschema/editpart.cpp
.notused
View file @
9e32b2ab
...
...
@@ -194,7 +194,7 @@ WinEDA_ComponentPropertiesFrame::WinEDA_ComponentPropertiesFrame(
pos.x += MButton->GetDefaultSize().x + 10;
wxButton* Button = new wxButton( this, ID_ACCEPT_CMP_PROPERTIES,
_
(
"O
k
"
),
pos
);
_( "O
K
" ), pos );
Button->SetForegroundColour( *wxBLUE );
c = new wxLayoutConstraints;
c->left.SameAs( MButton, wxRight, 20 );
...
...
eeschema/libedpart.cpp
→
eeschema/libedpart.cpp
.notused
View file @
9e32b2ab
...
...
@@ -232,7 +232,7 @@ WinEDA_PartPropertiesFrame::WinEDA_PartPropertiesFrame( WinEDA_LibeditFrame* par
pos.x += Button->GetDefaultSize().x + 70;
Button = new wxButton( this, ID_ACCEPT_PART_PROPERTIES,
_
(
"O
k
"
),
pos
);
_( "O
K
" ), pos );
Button->SetForegroundColour( *wxRED );
c = new wxLayoutConstraints;
...
...
eeschema/sheetlab.cpp
View file @
9e32b2ab
...
...
@@ -30,11 +30,6 @@ static wxString shape_list[NBSHAPES] =
wxT
(
"Input"
),
wxT
(
"Output"
),
wxT
(
"Bidi"
),
wxT
(
"TriState"
),
wxT
(
"Passive"
)
};
enum
id_Textdit
{
ID_ACCEPT_PINSHEET_PROPERTIES
=
1970
,
ID_CANCEL_PINSHEET_PROPERTIES
};
/*****************************************************/
class
WinEDA_PinSheetPropertiesFrame
:
public
wxDialog
...
...
@@ -57,16 +52,15 @@ public:
~
WinEDA_PinSheetPropertiesFrame
()
{
};
private
:
void
PinSheetPropertiesAccept
(
wxCommandEvent
&
event
);
void
On
Quit
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
On
CancelClick
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
()
};
BEGIN_EVENT_TABLE
(
WinEDA_PinSheetPropertiesFrame
,
wxDialog
)
EVT_BUTTON
(
ID_ACCEPT_PINSHEET_PROPERTIES
,
WinEDA_PinSheetPropertiesFrame
::
PinSheetPropertiesAccept
)
EVT_BUTTON
(
ID_CANCEL_PINSHEET_PROPERTIES
,
WinEDA_PinSheetPropertiesFrame
::
OnQuit
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_PinSheetPropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_PinSheetPropertiesFrame
::
OnCancelClick
)
END_EVENT_TABLE
()
...
...
@@ -96,13 +90,11 @@ WinEDA_PinSheetPropertiesFrame::WinEDA_PinSheetPropertiesFrame(
m_CurrentPinSheet
=
curr_pinsheet
;
/* Creation des boutons de commande */
Button
=
new
wxButton
(
this
,
ID_ACCEPT_PINSHEET_PROPERTIES
,
_
(
"Ok"
)
);
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK"
)
);
Button
->
SetForegroundColour
(
*
wxRED
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_CANCEL_PINSHEET_PROPERTIES
,
_
(
"Cancel"
)
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
)
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -123,23 +115,22 @@ WinEDA_PinSheetPropertiesFrame::WinEDA_PinSheetPropertiesFrame(
/************************************************************************/
void
WinEDA_PinSheetPropertiesFrame
::
On
Quit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_PinSheetPropertiesFrame
::
On
CancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/************************************************************************/
{
// true is to force the frame to close
Close
(
true
);
EndModal
(
-
1
);
}
/***********************************************************************************/
void
WinEDA_PinSheetPropertiesFrame
::
PinSheetPropertiesAccept
(
wxCommandEvent
&
event
)
void
WinEDA_PinSheetPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/***********************************************************************************/
{
m_CurrentPinSheet
->
m_Text
=
m_TextWin
->
GetText
();
m_CurrentPinSheet
->
m_Size
.
x
=
m_CurrentPinSheet
->
m_Size
.
y
=
m_TextWin
->
GetTextSize
();
m_CurrentPinSheet
->
m_Shape
=
m_PinSheetShape
->
GetSelection
();
Close
(
TRUE
);
EndModal
(
0
);
}
...
...
gerbview/export_to_pcbnew.cpp
View file @
9e32b2ab
...
...
@@ -25,6 +25,23 @@ void WinEDA_GerberFrame::ExportDataInPcbnewFormat( wxCommandEvent& event )
/* Export data in pcbnew format
*/
{
int
ii
=
0
;
bool
no_used_layers
=
true
;
// Changed to false if any used layer found
// Check whether any of the Gerber layers are actually currently used
while
(
no_used_layers
&&
ii
<
32
)
{
if
(
g_GERBER_Descr_List
[
ii
]
!=
NULL
)
no_used_layers
=
false
;
ii
++
;
}
if
(
no_used_layers
)
{
DisplayInfo
(
this
,
_
(
"None of the Gerber layers contain any data"
)
);
return
;
}
wxString
FullFileName
,
msg
;
wxString
PcbExt
(
wxT
(
".brd"
)
);
...
...
gerbview/options.cpp
View file @
9e32b2ab
...
...
@@ -211,7 +211,7 @@ wxString list_scales[2] = { _("format: 2.3"), _("format 3.4") };
void
WinEDA_GerberGeneralOptionsFrame
::
OnCancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
))
/************************************************************************/
{
EndModal
(
0
);
EndModal
(
-
1
);
}
...
...
@@ -227,7 +227,7 @@ void WinEDA_GerberGeneralOptionsFrame::OnOkClick(wxCommandEvent& event)
g_Default_GERBER_Format
=
(
m_GerberDefaultScale
->
GetSelection
()
==
0
)
?
23
:
34
;
EndModal
(
1
);
EndModal
(
1
);
}
...
...
@@ -334,7 +334,7 @@ wxString list_opt3[3] = { _("Sketch"), _("Filled"), _("Line") };
void
WinEDA_LookFrame
::
OnCancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
))
/**************************************************************/
{
EndModal
(
0
);
EndModal
(
-
1
);
}
...
...
@@ -363,7 +363,7 @@ void WinEDA_LookFrame::OnOkClick(wxCommandEvent& event)
m_Parent
->
GetScreen
()
->
SetRefreshReq
();
EndModal
(
1
);
EndModal
(
1
);
}
...
...
@@ -395,4 +395,3 @@ void WinEDA_GerberFrame::InstallPcbOptionsFrame(const wxPoint & pos, int id)
break
;
}
}
gerbview/reglage.cpp
View file @
9e32b2ab
...
...
@@ -154,7 +154,7 @@ void WinEDA_ConfigFrame::OnOkClick(wxCommandEvent& WXUNUSED(event))
g_PhotoFilenameExt
=
TextPhotoExt
->
GetValue
();
g_PenFilenameExt
=
TextPenExt
->
GetValue
();
EndModal
(
1
);
EndModal
(
1
);
}
...
...
@@ -162,7 +162,7 @@ void WinEDA_ConfigFrame::OnOkClick(wxCommandEvent& WXUNUSED(event))
void
WinEDA_ConfigFrame
::
OnCancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
))
/******************************************************************/
{
EndModal
(
0
);
EndModal
(
-
1
);
}
...
...
@@ -172,4 +172,3 @@ void WinEDA_ConfigFrame::SaveCfg(wxCommandEvent& event)
{
m_Parent
->
Update_config
();
}
gerbview/select_layers_to_pcb.cpp
View file @
9e32b2ab
This diff is collapsed.
Click to expand it.
gerbview/set_color.cpp
View file @
9e32b2ab
This diff is collapsed.
Click to expand it.
gerbview/set_color.h
View file @
9e32b2ab
This diff is collapsed.
Click to expand it.
include/pcbstruct.h
View file @
9e32b2ab
...
...
@@ -71,7 +71,7 @@
#define ECO2_N 27
#define EDGE_N 28
#define LAST_NO_COPPER_LAYER 28
#define NB_LAYERS (
EDGE_N
+ 1)
#define NB_LAYERS (
LAST_NO_COPPER_LAYER
+ 1)
#define LAYER_COUNT 32
...
...
include/wxstruct.h
View file @
9e32b2ab
...
...
@@ -30,8 +30,8 @@
#endif
// Option d'affichage des fenetres de dialogue
//#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT
//
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT|wxSTAY_ON_TOP
#define DIALOG_STYLE wxDEFAULT_DIALOG_STYLE | wxFRAME_FLOAT_ON_PARENT
| MAYBE_RESIZE_BORDER
#define EDA_DRAW_PANEL wxScrolledWindow
...
...
@@ -274,8 +274,8 @@ public:
void
OnPanning
(
int
direction
);
void
OnGrid
(
int
grid_type
);
void
Recadre_Trace
(
bool
ToMouse
);
void
PutOnGrid
(
wxPoint
*
coord
);
/* corrige la valeur de la coordonnee coord
* pour etre sur le point de grille le plus proche */
void
PutOnGrid
(
wxPoint
*
coord
);
/* corrige la valeur de la coordonnee coord
* pour etre sur le point de grille le plus proche */
void
Zoom_Automatique
(
bool
move_mouse_cursor
);
/* Affiche le schema au meilleur zoom au meilleur centrage pour le dessin
...
...
@@ -303,7 +303,7 @@ public:
virtual
void
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
=
0
;
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
void
AdjustScrollBars
();
void
Affiche_Status_Box
();
/* Affichage des coord curseur, zoom .. */
void
Affiche_Status_Box
();
/* Affichage des coord curseur, zoom .. */
void
DisplayUnitsMsg
();
/* Gestion generale des operations sur block */
...
...
@@ -494,7 +494,7 @@ public:
MODULE
*
Load_Module_From_Library
(
const
wxString
&
library
,
wxDC
*
DC
);
// Gestion des chevelus (ratsnest)
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
/* Recalcul complet du chevelu */
void
Compile_Ratsnest
(
wxDC
*
DC
,
bool
affiche
);
/* Recalcul complet du chevelu */
void
ReCompile_Ratsnest_After_Changes
(
wxDC
*
DC
);
int
Test_1_Net_Ratsnest
(
wxDC
*
DC
,
int
net_code
);
char
*
build_ratsnest_module
(
wxDC
*
DC
,
MODULE
*
Module
);
...
...
@@ -502,8 +502,8 @@ public:
void
Build_Board_Ratsnest
(
wxDC
*
DC
);
void
DrawGeneralRatsnest
(
wxDC
*
DC
,
int
net_code
=
0
);
void
trace_ratsnest_pad
(
wxDC
*
DC
);
void
recalcule_pad_net_code
();
/* Routine de
* calcul et de mise a jour des net_codes des PADS */
void
recalcule_pad_net_code
();
/* Routine de
* calcul et de mise a jour des net_codes des PADS */
void
build_liste_pads
();
int
*
build_ratsnest_pad
(
EDA_BaseStruct
*
ref
,
const
wxPoint
&
refpos
,
bool
init
);
...
...
@@ -539,7 +539,9 @@ public:
void
DelLimitesZone
(
wxDC
*
DC
,
bool
Redraw
);
// Gestion des layers:
int
SelectLayer
(
int
default_layer
,
int
min_layer
,
int
max_layer
);
// (See pcbnew/sel_layer.cpp for description of why null_layer parameter is provided)
int
SelectLayer
(
int
default_layer
,
int
min_layer
,
int
max_layer
,
bool
null_layer
=
false
);
void
SelectLayerPair
();
virtual
void
SwitchLayer
(
wxDC
*
DC
,
int
layer
);
...
...
@@ -1620,8 +1622,8 @@ public:
private
:
void
OnClose
(
wxCloseEvent
&
event
);
void
Cancel
(
wxCommandEvent
&
event
);
void
Ok
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
void
O
nOkClic
k
(
wxCommandEvent
&
event
);
void
ClickOnList
(
wxCommandEvent
&
event
);
void
D_ClickOnList
(
wxCommandEvent
&
event
);
void
OnKeyEvent
(
wxKeyEvent
&
event
);
...
...
pcbnew/block.cpp
View file @
9e32b2ab
...
...
@@ -153,7 +153,7 @@ WinEDA_ExecBlockCmdFrame::WinEDA_ExecBlockCmdFrame( WinEDA_BasePcbFrame* parent,
m_button2
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button2
->
SetForegroundColour
(
*
wxBLUE
);
fgSizer2
->
Add
(
m_button2
,
0
,
wxALL
,
5
);
m_button1
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"O
k
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button1
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"O
K
"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_button1
->
SetForegroundColour
(
*
wxRED
);
m_button1
->
SetDefault
();
fgSizer2
->
Add
(
m_button1
,
0
,
wxALL
,
5
);
...
...
@@ -169,7 +169,7 @@ WinEDA_ExecBlockCmdFrame::WinEDA_ExecBlockCmdFrame( WinEDA_BasePcbFrame* parent,
void
WinEDA_ExecBlockCmdFrame
::
Cancel
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/**********************************************************************/
{
EndModal
(
1
);
EndModal
(
-
1
);
}
...
...
pcbnew/class_text_mod.cpp
View file @
9e32b2ab
...
...
@@ -343,7 +343,7 @@ void TEXTE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
Affiche_1_Parametre
(
frame
,
-
1
,
wxEmptyString
,
_
(
"Yes"
),
DARKGREEN
);
ii
=
m_Layer
;
if
(
ii
<
=
28
)
if
(
ii
<
NB_LAYERS
)
Affiche_1_Parametre
(
frame
,
28
,
_
(
"Layer"
),
ReturnPcbLayerName
(
ii
),
DARKGREEN
);
else
{
...
...
pcbnew/cotation.cpp
View file @
9e32b2ab
...
...
@@ -36,9 +36,7 @@ static int status_cotation; /* = 0 : pas de cotation en cours
enum
id_Cotation_properties
{
ID_ACCEPT_COTATION_PROPERTIES
=
1900
,
ID_CLOSE_COTATION_PROPERTIES
,
ID_TEXTPCB_SELECT_LAYER
ID_TEXTPCB_SELECT_LAYER
=
1900
};
/************************************/
...
...
@@ -69,17 +67,15 @@ public:
private
:
void
On
Quit
(
wxCommandEvent
&
event
);
void
CotationPropertiesAccept
(
wxCommandEvent
&
event
);
void
On
CancelClick
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
()
};
BEGIN_EVENT_TABLE
(
WinEDA_CotationPropertiesFrame
,
wxDialog
)
EVT_BUTTON
(
ID_ACCEPT_COTATION_PROPERTIES
,
WinEDA_CotationPropertiesFrame
::
CotationPropertiesAccept
)
EVT_BUTTON
(
ID_CLOSE_COTATION_PROPERTIES
,
WinEDA_CotationPropertiesFrame
::
OnQuit
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_CotationPropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_CotationPropertiesFrame
::
OnCancelClick
)
END_EVENT_TABLE
()
...
...
@@ -106,13 +102,11 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
MainBoxSizer
->
Add
(
RightBoxSizer
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
/* Creation des boutons de commande */
Button
=
new
wxButton
(
this
,
ID_ACCEPT_COTATION_PROPERTIES
,
_
(
"Ok"
)
);
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK"
)
);
Button
->
SetForegroundColour
(
*
wxRED
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_CLOSE_COTATION_PROPERTIES
,
_
(
"Cancel"
)
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
)
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -142,7 +136,7 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
wxDefaultPosition
,
wxDefaultSize
);
LeftBoxSizer
->
Add
(
m_SelLayerBox
,
0
,
wxGROW
|
wxLEFT
|
wxRIGHT
|
wxBOTTOM
,
5
);
int
ii
;
for
(
ii
=
CMP_N
+
1
;
ii
<
29
;
ii
++
)
for
(
ii
=
CMP_N
+
1
;
ii
<
NB_LAYERS
;
ii
++
)
{
m_SelLayerBox
->
Append
(
ReturnPcbLayerName
(
ii
)
);
}
...
...
@@ -155,15 +149,15 @@ WinEDA_CotationPropertiesFrame::WinEDA_CotationPropertiesFrame( WinEDA_PcbFrame*
/**********************************************************************/
void
WinEDA_CotationPropertiesFrame
::
On
Quit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_CotationPropertiesFrame
::
On
CancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/**********************************************************************/
{
Close
(
true
);
// true is to force the frame to close
EndModal
(
-
1
);
}
/***********************************************************************************/
void
WinEDA_CotationPropertiesFrame
::
CotationPropertiesAccept
(
wxCommandEvent
&
event
)
void
WinEDA_CotationPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/***********************************************************************************/
{
if
(
m_DC
)
// Effacement ancien texte
...
...
@@ -193,7 +187,7 @@ void WinEDA_CotationPropertiesFrame::CotationPropertiesAccept( wxCommandEvent& e
}
m_Parent
->
m_CurrentScreen
->
SetModify
();
Close
(
TRUE
);
EndModal
(
1
);
}
...
...
@@ -208,7 +202,7 @@ static void Exit_EditCotation( WinEDA_DrawPanel* Panel, wxDC* DC )
if
(
Cotation
->
m_Flags
&
IS_NEW
)
{
Cotation
->
Draw
(
Panel
,
DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
Cotation
->
DeleteStructure
();
Cotation
->
DeleteStructure
();
}
else
{
...
...
@@ -365,7 +359,8 @@ void WinEDA_PcbFrame::Install_Edit_Cotation( COTATION* Cotation,
WinEDA_CotationPropertiesFrame
*
frame
=
new
WinEDA_CotationPropertiesFrame
(
this
,
Cotation
,
DC
,
pos
);
frame
->
ShowModal
();
frame
->
Destroy
();
frame
->
ShowModal
();
frame
->
Destroy
();
}
...
...
@@ -378,7 +373,7 @@ void WinEDA_PcbFrame::Delete_Cotation( COTATION* Cotation, wxDC* DC )
if
(
DC
)
Cotation
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
Cotation
->
DeleteStructure
();
Cotation
->
DeleteStructure
();
m_CurrentScreen
->
SetModify
();
}
...
...
pcbnew/dialog_edit_module.cpp
View file @
9e32b2ab
...
...
@@ -11,9 +11,8 @@
/**************************************/
BEGIN_EVENT_TABLE
(
WinEDA_ModulePropertiesFrame
,
wxDialog
)
EVT_BUTTON
(
ID_ACCEPT_MODULE_PROPERTIES
,
WinEDA_ModulePropertiesFrame
::
ModulePropertiesAccept
)
EVT_BUTTON
(
ID_CLOSE_MODULE_PROPERTIES
,
WinEDA_ModulePropertiesFrame
::
OnQuit
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_ModulePropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_ModulePropertiesFrame
::
OnCancelClick
)
EVT_BUTTON
(
ID_MODULE_EDIT_ADD_TEXT
,
WinEDA_ModulePropertiesFrame
::
CreateTextModule
)
EVT_BUTTON
(
ID_MODULE_EDIT_EDIT_TEXT
,
WinEDA_ModulePropertiesFrame
::
EditOrDelTextModule
)
EVT_BUTTON
(
ID_MODULE_EDIT_DELETE_TEXT
,
WinEDA_ModulePropertiesFrame
::
EditOrDelTextModule
)
...
...
@@ -115,13 +114,11 @@ void WinEDA_ModulePropertiesFrame::CreateControls()
wxBoxSizer
*
ButtonsBoxSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
m_GeneralBoxSizer
->
Add
(
ButtonsBoxSizer
,
0
,
wxALIGN_CENTER_HORIZONTAL
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_ACCEPT_MODULE_PROPERTIES
,
_
(
"Ok"
)
);
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK"
)
);
Button
->
SetForegroundColour
(
*
wxRED
);
ButtonsBoxSizer
->
Add
(
Button
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_CLOSE_MODULE_PROPERTIES
,
_
(
"Cancel"
)
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
)
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
ButtonsBoxSizer
->
Add
(
Button
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
}
...
...
@@ -486,15 +483,15 @@ void Panel3D_Ctrl::Browse3DLib( wxCommandEvent& event )
/**********************************************************************/
void
WinEDA_ModulePropertiesFrame
::
On
Quit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_ModulePropertiesFrame
::
On
CancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/**********************************************************************/
{
Close
(
true
);
// true is to force the frame to close
EndModal
(
-
1
);
}
/******************************************************************************/
void
WinEDA_ModulePropertiesFrame
::
ModulePropertiesAccept
(
wxCommandEvent
&
event
)
void
WinEDA_ModulePropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/******************************************************************************/
{
bool
change_layer
=
FALSE
;
...
...
@@ -590,7 +587,7 @@ void WinEDA_ModulePropertiesFrame::ModulePropertiesAccept( wxCommandEvent& event
m_Parent
->
GetScreen
()
->
SetModify
();
Close
(
TRUE
);
EndModal
(
1
);
if
(
m_DC
)
m_CurrentModule
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
wxPoint
(
0
,
0
),
GR_OR
);
...
...
pcbnew/dialog_edit_module.h
View file @
9e32b2ab
...
...
@@ -5,9 +5,7 @@
enum
id_Module_properties
{
ID_ACCEPT_MODULE_PROPERTIES
=
1900
,
ID_CLOSE_MODULE_PROPERTIES
,
ID_GOTO_MODULE_EDITOR
,
ID_GOTO_MODULE_EDITOR
=
1900
,
ID_MODULE_PROPERTIES_EXCHANGE
,
ID_MODULE_EDIT_ADD_TEXT
,
ID_MODULE_EDIT_EDIT_TEXT
,
...
...
@@ -59,8 +57,8 @@ public:
private
:
void
CreateControls
();
void
On
Quit
(
wxCommandEvent
&
event
);
void
ModulePropertiesAccept
(
wxCommandEvent
&
event
);
void
On
CancelClick
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
CreateTextModule
(
wxCommandEvent
&
event
);
void
EditOrDelTextModule
(
wxCommandEvent
&
event
);
void
SelectTextListBox
(
wxCommandEvent
&
event
);
...
...
pcbnew/muonde.cpp
View file @
9e32b2ab
...
...
@@ -284,10 +284,7 @@ MODULE* WinEDA_PcbFrame::Create_MuWaveComponent( wxDC* DC, int shape_type )
/**************** Polygon Shapes ***********************/
enum
id_mw_cmd
{
ID_ACCEPT_OPT
=
1000
,
ID_CANCEL_OPT
,
ID_READ_SHAPE_FILE
ID_READ_SHAPE_FILE
=
1000
};
/*************************************************/
...
...
@@ -309,8 +306,8 @@ public:
~
WinEDA_SetParamShapeFrame
()
{
};
private
:
void
On
CloseWindow
(
wxClose
Event
&
event
);
void
OnCancel
(
wxCommandEvent
&
event
);
void
On
OkClick
(
wxCommand
Event
&
event
);
void
OnCancel
Click
(
wxCommandEvent
&
event
);
void
ReadDataShapeDescr
(
wxCommandEvent
&
event
);
void
AcceptOptions
(
wxCommandEvent
&
event
);
...
...
@@ -318,8 +315,8 @@ private:
};
/* Construction de la table des evenements pour WinEDA_SetParamShapeFrame */
BEGIN_EVENT_TABLE
(
WinEDA_SetParamShapeFrame
,
wxDialog
)
EVT_BUTTON
(
ID_ACCEPT_OPT
,
WinEDA_SetParamShapeFrame
::
AcceptOptions
)
EVT_BUTTON
(
ID_CANCEL_OPT
,
WinEDA_SetParamShapeFrame
::
OnCancel
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_SetParamShapeFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_SetParamShapeFrame
::
OnCancelClick
)
EVT_BUTTON
(
ID_READ_SHAPE_FILE
,
WinEDA_SetParamShapeFrame
::
ReadDataShapeDescr
)
END_EVENT_TABLE
()
...
...
@@ -348,21 +345,21 @@ WinEDA_SetParamShapeFrame::WinEDA_SetParamShapeFrame( WinEDA_PcbFrame* parent,
MainBoxSizer
->
Add
(
LeftBoxSizer
,
0
,
wxGROW
|
wxALL
,
5
);
MainBoxSizer
->
Add
(
RightBoxSizer
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
wxButton
*
Button
=
new
wxButton
(
this
,
ID_ACCEPT_OPT
,
_
(
"Ok
"
)
);
wxButton
*
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK
"
)
);
Button
->
SetForegroundColour
(
*
wxRED
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_CANCEL_OPT
,
_
(
"Cancel"
)
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
)
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
Button
=
new
wxButton
(
this
,
ID_READ_SHAPE_FILE
,
_
(
"Read Shape Descr File"
)
);
Button
=
new
wxButton
(
this
,
ID_READ_SHAPE_FILE
,
_
(
"Read Shape Descr File
...
"
)
);
Button
->
SetForegroundColour
(
wxColor
(
0
,
100
,
0
)
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
wxString
shapelist
[
3
]
=
{
_
(
"Normal"
),
_
(
"Symmetrical"
),
_
(
"
m
irrored"
)
};
wxString
shapelist
[
3
]
=
{
_
(
"Normal"
),
_
(
"Symmetrical"
),
_
(
"
M
irrored"
)
};
m_ShapeOptionCtrl
=
new
wxRadioBox
(
this
,
-
1
,
_
(
"ShapeOption"
),
"Shape
Option"
),
wxDefaultPosition
,
wxDefaultSize
,
3
,
shapelist
,
1
,
wxRA_SPECIFY_COLS
);
LeftBoxSizer
->
Add
(
m_ShapeOptionCtrl
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -371,26 +368,25 @@ WinEDA_SetParamShapeFrame::WinEDA_SetParamShapeFrame( WinEDA_PcbFrame* parent,
ShapeSize
,
g_UnitMetric
,
LeftBoxSizer
,
PCB_INTERNAL_UNIT
);
GetSizer
()
->
Fit
(
this
);
GetSizer
()
->
SetSizeHints
(
this
);
}
/**********************************************************************/
void
WinEDA_SetParamShapeFrame
::
OnCancel
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_SetParamShapeFrame
::
OnCancel
Click
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/**********************************************************************/
{
if
(
PolyEdges
)
free
(
PolyEdges
);
PolyEdges
=
NULL
;
PolyEdgesCount
=
0
;
EndModal
(
0
);
EndModal
(
-
1
);
}
/*******************************************************************/
void
WinEDA_SetParamShapeFrame
::
AcceptOptions
(
wxCommandEvent
&
event
)
void
WinEDA_SetParamShapeFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/*******************************************************************/
{
ShapeSize
=
m_SizeCtrl
->
GetValue
();
...
...
pcbnew/pcbplot.cpp
View file @
9e32b2ab
...
...
@@ -577,7 +577,7 @@ wxString ext;
int
mask
=
1
;
s_SelectedLayers
=
0
;
for
(
layer_to_plot
=
0
;
layer_to_plot
<
29
;
layer_to_plot
++
,
mask
<<=
1
)
for
(
layer_to_plot
=
0
;
layer_to_plot
<
NB_LAYERS
;
layer_to_plot
++
,
mask
<<=
1
)
{
if
(
m_BoxSelecLayer
[
layer_to_plot
]
->
GetValue
()
)
{
...
...
pcbnew/pcbtexte.cpp
View file @
9e32b2ab
...
...
@@ -21,9 +21,7 @@ static wxPoint old_pos; // position originelle du texte selecte
enum
id_TextPCB_properties
{
ID_ACCEPT_TEXTE_PCB_PROPERTIES
=
1900
,
ID_CLOSE_TEXTE_PCB_PROPERTIES
,
ID_TEXTPCB_SELECT_LAYER
ID_TEXTPCB_SELECT_LAYER
=
1900
};
/************************************/
...
...
@@ -56,17 +54,15 @@ public:
private
:
void
TextPCBPropertiesAccept
(
wxCommandEvent
&
event
);
void
On
Quit
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
On
CancelClick
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
()
};
BEGIN_EVENT_TABLE
(
WinEDA_TextPCBPropertiesFrame
,
wxDialog
)
EVT_BUTTON
(
ID_ACCEPT_TEXTE_PCB_PROPERTIES
,
WinEDA_TextPCBPropertiesFrame
::
TextPCBPropertiesAccept
)
EVT_BUTTON
(
ID_CLOSE_TEXTE_PCB_PROPERTIES
,
WinEDA_TextPCBPropertiesFrame
::
OnQuit
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_TextPCBPropertiesFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_TextPCBPropertiesFrame
::
OnCancelClick
)
END_EVENT_TABLE
()
...
...
@@ -78,7 +74,8 @@ void WinEDA_PcbFrame::InstallTextPCBOptionsFrame( TEXTE_PCB* TextPCB,
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
WinEDA_TextPCBPropertiesFrame
*
frame
=
new
WinEDA_TextPCBPropertiesFrame
(
this
,
TextPCB
,
DC
,
pos
);
frame
->
ShowModal
();
frame
->
Destroy
();
frame
->
ShowModal
();
frame
->
Destroy
();
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
}
...
...
@@ -111,12 +108,12 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
MainBoxSizer
->
Add
(
RightBoxSizer
,
0
,
wxALIGN_CENTER_VERTICAL
|
wxALL
,
5
);
/* Creation des boutons de commande */
Button
=
new
wxButton
(
this
,
ID_ACCEPT_TEXTE_PCB_PROPERTIES
,
_
(
"Ok
"
)
);
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK
"
)
);
Button
->
SetForegroundColour
(
*
wxRED
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
Button
->
SetDefault
();
Button
=
new
wxButton
(
this
,
ID_CLOSE_TEXTE_PCB_PROPERTIES
,
_
(
"Cancel"
)
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
)
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
RightBoxSizer
->
Add
(
Button
,
0
,
wxGROW
|
wxALL
,
5
);
...
...
@@ -143,7 +140,7 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
MiddleBoxSizer
->
Add
(
m_SelLayerBox
,
0
,
wxGROW
|
wxALL
,
5
);
int
ii
;
for
(
ii
=
0
;
ii
<
29
;
ii
++
)
for
(
ii
=
0
;
ii
<
NB_LAYERS
;
ii
++
)
{
m_SelLayerBox
->
Append
(
ReturnPcbLayerName
(
ii
)
);
}
...
...
@@ -181,7 +178,7 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
wxDefaultPosition
,
wxSize
(
-
1
,
-
1
),
2
,
display_msg
,
1
,
wxRA_SPECIFY_COLS
);
if
(
!
TextPCB
->
m_Miroir
)
m_Mirror
->
SetSelection
(
1
);
;
m_Mirror
->
SetSelection
(
1
);
MiddleBoxSizer
->
Add
(
m_Mirror
,
0
,
wxGROW
|
wxALL
,
5
);
GetSizer
()
->
Fit
(
this
);
...
...
@@ -190,16 +187,15 @@ WinEDA_TextPCBPropertiesFrame::WinEDA_TextPCBPropertiesFrame( WinEDA_PcbFrame* p
/**********************************************************************/
void
WinEDA_TextPCBPropertiesFrame
::
On
Quit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_TextPCBPropertiesFrame
::
On
CancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
/**********************************************************************/
{
// true is to force the frame to close
Close
(
true
);
EndModal
(
-
1
);
}
/**************************************************************************************/
void
WinEDA_TextPCBPropertiesFrame
::
TextPCBPropertiesAccept
(
wxCommandEvent
&
event
)
void
WinEDA_TextPCBPropertiesFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/**************************************************************************************/
{
if
(
m_DC
)
// Effacement ancien texte
...
...
@@ -224,7 +220,7 @@ void WinEDA_TextPCBPropertiesFrame::TextPCBPropertiesAccept( wxCommandEvent& eve
CurrentTextPCB
->
Draw
(
m_Parent
->
DrawPanel
,
m_DC
,
wxPoint
(
0
,
0
),
GR_OR
);
}
m_Parent
->
m_CurrentScreen
->
SetModify
();
Close
(
TRUE
);
EndModal
(
1
);
}
...
...
pcbnew/sel_layer.cpp
View file @
9e32b2ab
This diff is collapsed.
Click to expand it.
pcbnew/swap_layers.cpp
View file @
9e32b2ab
...
...
@@ -11,12 +11,10 @@
#include "protos.h"
/* Variables locales */
static
int
New_Layer
[
32
];
static
int
New_Layer
[
NB_LAYERS
];
enum
swap_layer_id
{
ID_SWAP_LAYER_EXECUTE
=
1800
,
ID_SWAP_LAYER_CANCEL
,
ID_SWAP_LAYER_BUTTON_SELECT
,
ID_SWAP_LAYER_BUTTON_SELECT
=
1800
,
ID_SWAP_LAYER_DESELECT
,
ID_SWAP_LAYER_SELECT
};
...
...
@@ -40,15 +38,16 @@ public:
private
:
void
Sel_Layer
(
wxCommandEvent
&
event
);
void
Cancel
(
wxCommandEvent
&
event
);
void
Execute
(
wxCommandEvent
&
event
);
void
OnOkClick
(
wxCommandEvent
&
event
);
void
OnCancelClick
(
wxCommandEvent
&
event
);
DECLARE_EVENT_TABLE
()
};
/* Table des evenements pour WinEDA_SwapLayerFrame */
BEGIN_EVENT_TABLE
(
WinEDA_SwapLayerFrame
,
wxDialog
)
EVT_BUTTON
(
ID_SWAP_LAYER_EXECUTE
,
WinEDA_SwapLayerFrame
::
Execute
)
EVT_BUTTON
(
ID_SWAP_LAYER_CANCEL
,
WinEDA_SwapLayerFrame
::
Cancel
)
EVT_BUTTON
(
wxID_OK
,
WinEDA_SwapLayerFrame
::
OnOkClick
)
EVT_BUTTON
(
wxID_CANCEL
,
WinEDA_SwapLayerFrame
::
OnCancelClick
)
EVT_BUTTON
(
ID_SWAP_LAYER_DESELECT
,
WinEDA_SwapLayerFrame
::
Sel_Layer
)
EVT_BUTTON
(
ID_SWAP_LAYER_BUTTON_SELECT
,
WinEDA_SwapLayerFrame
::
Sel_Layer
)
EVT_RADIOBOX
(
ID_SWAP_LAYER_SELECT
,
WinEDA_SwapLayerFrame
::
Sel_Layer
)
...
...
@@ -65,7 +64,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_BasePcbFrame* parent ) :
wxButton
*
Button
;
int
ii
;
wxPoint
pos
;
wxString
g_Layer_Name_Pair
[
32
];
wxString
g_Layer_Name_Pair
[
NB_LAYERS
];
wxSize
winsize
;
m_Parent
=
parent
;
...
...
@@ -76,42 +75,38 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_BasePcbFrame* parent ) :
g_Layer_Name_Pair
[
ii
]
=
ReturnPcbLayerName
(
ii
)
+
wxT
(
" -> "
)
+
_
(
"No Change"
);
}
pos
.
x
=
5
;
pos
.
y
=
START_Y
;
pos
.
x
=
5
;
pos
.
y
=
START_Y
;
m_LayerList
=
new
wxRadioBox
(
this
,
ID_SWAP_LAYER_SELECT
,
_
(
"Layers"
),
pos
,
wxSize
(
-
1
,
-
1
),
29
,
g_Layer_Name_Pair
,
16
,
wxRA_SPECIFY_ROWS
);
pos
,
wxSize
(
-
1
,
-
1
),
NB_LAYERS
,
g_Layer_Name_Pair
,
16
,
wxRA_SPECIFY_ROWS
);
winsize
.
y
=
m_LayerList
->
GetRect
().
GetBottom
();
pos
.
x
=
m_LayerList
->
GetRect
().
GetRight
()
+
12
;
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_CANCEL
,
_
(
"Cancel"
),
pos
);
pos
.
x
=
m_LayerList
->
GetRect
().
GetRight
()
+
12
;
Button
->
SetForegroundColour
(
*
wxRED
);
winsize
.
x
=
MAX
(
winsize
.
x
,
Button
->
GetRect
().
GetRight
()
);
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_BUTTON_SELECT
,
_
(
"Select..."
),
pos
);
Button
->
SetForegroundColour
(
wxColour
(
0
,
100
,
100
)
);
pos
.
y
+=
Button
->
GetSize
().
y
+
5
;
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_EXECUTE
,
_
(
"OK"
),
pos
);
pos
.
y
+=
Button
->
GetSize
().
y
+
10
;
Button
->
SetForegroundColour
(
*
wxBLUE
);
winsize
.
x
=
MAX
(
winsize
.
x
,
Button
->
GetRect
().
GetRight
()
);
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_DESELECT
,
_
(
"Deselect"
),
pos
);
Button
->
SetForegroundColour
(
wxColour
(
0
,
100
,
0
)
);
pos
.
y
+=
Button
->
GetSize
().
y
+
15
;
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_DESELECT
,
_
(
"Deselect"
),
pos
);
pos
.
y
=
winsize
.
y
-
2
*
Button
->
GetSize
().
y
-
10
;
Button
->
SetForegroundColour
(
wxColour
(
0
,
100
,
0
)
);
winsize
.
x
=
MAX
(
winsize
.
x
,
Button
->
GetRect
().
GetRight
()
);
Button
=
new
wxButton
(
this
,
wxID_OK
,
_
(
"OK"
),
pos
);
Button
->
SetForegroundColour
(
*
wxRED
);
pos
.
y
+=
Button
->
GetSize
().
y
+
5
;
Button
=
new
wxButton
(
this
,
ID_SWAP_LAYER_BUTTON_SELECT
,
_
(
"Select"
),
pos
);
pos
.
y
+=
Button
->
GetSize
().
y
+
10
;
Button
->
SetForegroundColour
(
wxColour
(
0
,
100
,
100
)
);
winsize
.
x
=
MAX
(
winsize
.
x
,
Button
->
GetRect
().
GetRight
()
);
Button
=
new
wxButton
(
this
,
wxID_CANCEL
,
_
(
"Cancel"
),
pos
);
Button
->
SetForegroundColour
(
*
wxBLUE
);
winsize
.
x
+=
10
;
winsize
.
y
+=
10
;
winsize
.
x
=
MAX
(
winsize
.
x
,
Button
->
GetRect
().
GetRight
()
);
winsize
.
y
=
MAX
(
winsize
.
y
,
Button
->
GetRect
().
GetBottom
()
);
winsize
.
x
+=
10
;
winsize
.
y
+=
10
;
SetClientSize
(
winsize
);
}
...
...
@@ -127,26 +122,49 @@ void WinEDA_SwapLayerFrame::Sel_Layer( wxCommandEvent& event )
switch
(
event
.
GetId
()
)
{
case
ID_SWAP_LAYER_DESELECT
:
if
(
New_Layer
[
ii
]
!=
-
1
)
if
(
New_Layer
[
ii
]
!=
NB_LAYERS
)
{
New_Layer
[
ii
]
=
-
1
;
m_LayerList
->
SetString
(
ii
,
ReturnPcbLayerName
(
ii
)
+
New_Layer
[
ii
]
=
NB_LAYERS
;
m_LayerList
->
SetString
(
ii
,
ReturnPcbLayerName
(
ii
)
+
wxT
(
" -> "
)
+
_
(
"No Change"
)
);
}
break
;
case
ID_SWAP_LAYER_BUTTON_SELECT
:
case
ID_SWAP_LAYER_SELECT
:
jj
=
m_Parent
->
SelectLayer
(
ii
,
-
1
,
-
1
);
if
(
(
jj
<
0
)
||
(
jj
>=
29
)
)
jj
=
New_Layer
[
ii
];
if
(
(
jj
<
0
)
||
(
jj
>
NB_LAYERS
)
)
jj
=
NB_LAYERS
;
// (Defaults to "No Change".)
jj
=
m_Parent
->
SelectLayer
(
jj
,
-
1
,
-
1
,
true
);
if
(
(
jj
<
0
)
||
(
jj
>
NB_LAYERS
)
)
return
;
// No change if the selected layer matches the layer being edited.
// (Hence the only way to restore a layer to the "No Change"
// state is by specifically deselecting it; any attempt
// to select the same layer (instead) will be ignored.)
if
(
jj
==
ii
)
{
wxString
msg
;
msg
=
_
(
"Deselect this layer to restore its No Change state"
);
DisplayInfo
(
this
,
msg
);
return
;
}
if
(
ii
!=
jj
)
if
(
jj
!=
New_Layer
[
ii
]
)
{
New_Layer
[
ii
]
=
jj
;
m_LayerList
->
SetString
(
ii
,
ReturnPcbLayerName
(
ii
)
+
wxT
(
" -> "
)
+
ReturnPcbLayerName
(
jj
)
);
if
(
jj
==
NB_LAYERS
)
m_LayerList
->
SetString
(
ii
,
ReturnPcbLayerName
(
ii
)
+
wxT
(
" -> "
)
+
_
(
"No Change"
)
);
else
m_LayerList
->
SetString
(
ii
,
ReturnPcbLayerName
(
ii
)
+
wxT
(
" -> "
)
+
ReturnPcbLayerName
(
jj
)
);
}
break
;
}
...
...
@@ -154,7 +172,7 @@ void WinEDA_SwapLayerFrame::Sel_Layer( wxCommandEvent& event )
/*********************************************************/
void
WinEDA_SwapLayerFrame
::
Cancel
(
wxCommandEvent
&
event
)
void
WinEDA_SwapLayerFrame
::
OnCancelClick
(
wxCommandEvent
&
event
)
/*********************************************************/
{
EndModal
(
-
1
);
...
...
@@ -162,7 +180,7 @@ void WinEDA_SwapLayerFrame::Cancel( wxCommandEvent& event )
/*********************************************************/
void
WinEDA_SwapLayerFrame
::
Execute
(
wxCommandEvent
&
event
)
void
WinEDA_SwapLayerFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
/*********************************************************/
{
EndModal
(
1
);
...
...
@@ -181,15 +199,16 @@ void WinEDA_PcbFrame::Swap_Layers( wxCommandEvent& event )
/* Init default values */
for
(
ii
=
0
;
ii
<
32
;
ii
++
)
New_Layer
[
ii
]
=
-
1
;
for
(
ii
=
0
;
ii
<
NB_LAYERS
;
ii
++
)
New_Layer
[
ii
]
=
NB_LAYERS
;
WinEDA_SwapLayerFrame
*
frame
=
new
WinEDA_SwapLayerFrame
(
this
);
ii
=
frame
->
ShowModal
();
frame
->
Destroy
();
ii
=
frame
->
ShowModal
();
frame
->
Destroy
();
if
(
ii
!=
1
)
return
;
return
;
// (Cancelled dialog box returns -1 instead)
/* Modifications des pistes */
pt_segm
=
(
TRACK
*
)
m_Pcb
->
m_Track
;
...
...
pcbnew/tool_modedit.cpp
View file @
9e32b2ab
/*****************************************************************/
/*
too
_modeit.cpp: construction du menu de l'editeur de modules */
/*
tool
_modeit.cpp: construction du menu de l'editeur de modules */
/*****************************************************************/
#include "fctsys.h"
...
...
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