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
1b1be195
Commit
1b1be195
authored
May 23, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes in modedit for MacOSX compatibility
parent
8bf79111
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
138 additions
and
119 deletions
+138
-119
wxPcbStruct.h
include/wxPcbStruct.h
+8
-9
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+4
-4
dialog_edit_module.cpp
pcbnew/dialog_edit_module.cpp
+3
-4
dialog_edit_module.h
pcbnew/dialog_edit_module.h
+1
-1
edgemod.cpp
pcbnew/edgemod.cpp
+6
-8
edit.cpp
pcbnew/edit.cpp
+2
-2
editmod.cpp
pcbnew/editmod.cpp
+16
-24
edtxtmod.cpp
pcbnew/edtxtmod.cpp
+1
-2
modedit.cpp
pcbnew/modedit.cpp
+91
-55
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+4
-5
onleftclick.cpp
pcbnew/onleftclick.cpp
+2
-5
No files found.
include/wxPcbStruct.h
View file @
1b1be195
...
...
@@ -188,8 +188,7 @@ public:
int
DrawMode
,
int
color
,
int
type
);
// Gestion des modules
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
void
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
);
MODULE
*
Copie_Module
(
MODULE
*
module
);
MODULE
*
Exchange_Module
(
wxWindow
*
winaff
,
MODULE
*
old_module
,
...
...
@@ -228,7 +227,7 @@ public:
// module texts
void
RotateTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
DeleteTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
DeleteTextModule
(
TEXTE_MODULE
*
Text
);
void
PlaceTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
void
StartMoveTexteModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
);
TEXTE_MODULE
*
CreateTextModule
(
MODULE
*
Module
,
wxDC
*
DC
);
...
...
@@ -1000,9 +999,9 @@ private:
public
:
// Footprint edition
void
Place_Ancre
(
MODULE
*
module
,
wxDC
*
DC
);
void
RemoveStruct
(
EDA_BaseStruct
*
Item
,
wxDC
*
DC
);
void
Transform
(
MODULE
*
module
,
wxDC
*
DC
,
int
transform
);
void
Place_Ancre
(
MODULE
*
module
);
void
RemoveStruct
(
EDA_BaseStruct
*
Item
);
void
Transform
(
MODULE
*
module
,
int
transform
);
// loading Footprint
MODULE
*
Import_Module
(
wxDC
*
DC
);
...
...
@@ -1010,9 +1009,9 @@ public:
void
Load_Module_Module_From_BOARD
(
MODULE
*
Module
);
// functions to edit footprint edges
void
Edit_Edge_Width
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
);
void
Edit_Edge_Layer
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
);
void
Delete_Edge_Module
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
);
void
Edit_Edge_Width
(
EDGE_MODULE
*
Edge
);
void
Edit_Edge_Layer
(
EDGE_MODULE
*
Edge
);
void
Delete_Edge_Module
(
EDGE_MODULE
*
Edge
);
EDGE_MODULE
*
Begin_Edge_Module
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
,
int
type_edge
);
void
End_Edge_Module
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
);
void
Enter_Edge_Width
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
);
...
...
internat/fr/kicad.mo
View file @
1b1be195
No preview for this file type
internat/fr/kicad.po
View file @
1b1be195
...
...
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-05-21 17:31+0100\n"
"PO-Revision-Date: 2009-05-21 1
7:37
+0100\n"
"PO-Revision-Date: 2009-05-21 1
8:16
+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
...
...
@@ -290,11 +290,11 @@ msgstr "Nettoyage segments nulls"
#: pcbnew/clean.cpp:506
msgid "Merging Segments:"
msgstr "Fusion
ner
Segments:"
msgstr "Fusion
des
Segments:"
#: pcbnew/clean.cpp:508
msgid "Merge"
msgstr "Fusion
ner
"
msgstr "Fusion"
#: pcbnew/clean.cpp:508
msgid "0"
...
...
@@ -374,7 +374,7 @@ msgstr "Erreur en Chargement de librairie"
#: pcbnew/loadcmp.cpp:221
#, c-format
msgid "Could not open PCB footprint library file <%s>."
msgstr "Ne peu ouvrir le fichier librairie de modules PCB <%s>."
msgstr "Ne peu
t
ouvrir le fichier librairie de modules PCB <%s>."
#: pcbnew/loadcmp.cpp:228
#, c-format
...
...
pcbnew/dialog_edit_module.cpp
View file @
1b1be195
...
...
@@ -37,9 +37,8 @@ END_EVENT_TABLE()
/**************************************************************************************/
WinEDA_ModulePropertiesFrame
::
WinEDA_ModulePropertiesFrame
(
WinEDA_BasePcbFrame
*
parent
,
MODULE
*
Module
,
wxDC
*
DC
,
const
wxPoint
&
framepos
)
:
wxDialog
(
parent
,
-
1
,
_
(
"Module properties"
),
framepos
,
wxDefaultSize
,
DIALOG_STYLE
)
MODULE
*
Module
,
wxDC
*
DC
)
:
wxDialog
(
parent
,
-
1
,
_
(
"Module properties"
),
wxDefaultPosition
,
wxDefaultSize
,
DIALOG_STYLE
)
/**************************************************************************************/
{
wxString
number
;
...
...
@@ -813,7 +812,7 @@ void WinEDA_ModulePropertiesFrame::EditOrDelTextModule( wxCommandEvent& event )
Line
.
Printf
(
_
(
"Delete [%s]"
),
Text
->
m_Text
.
GetData
()
);
if
(
!
IsOK
(
this
,
Line
)
)
goto
out
;
m_Parent
->
DeleteTextModule
(
Text
,
m_DC
);
m_Parent
->
DeleteTextModule
(
Text
);
ReCreateFieldListBox
();
m_TextListBox
->
SetSelection
(
0
);
}
...
...
pcbnew/dialog_edit_module.h
View file @
1b1be195
...
...
@@ -54,7 +54,7 @@ private:
public
:
// Constructor and destructor
WinEDA_ModulePropertiesFrame
(
WinEDA_BasePcbFrame
*
parent
,
MODULE
*
Module
,
wxDC
*
DC
,
const
wxPoint
&
pos
);
MODULE
*
Module
,
wxDC
*
DC
);
~
WinEDA_ModulePropertiesFrame
()
{
}
...
...
pcbnew/edgemod.cpp
View file @
1b1be195
...
...
@@ -144,7 +144,7 @@ static void ShowEdgeModule( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
/***************************************************************************/
void
WinEDA_ModuleEditFrame
::
Edit_Edge_Width
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
)
void
WinEDA_ModuleEditFrame
::
Edit_Edge_Width
(
EDGE_MODULE
*
Edge
)
/***************************************************************************/
/* Change the EDGE_MODULE Edge width,
...
...
@@ -179,7 +179,7 @@ void WinEDA_ModuleEditFrame::Edit_Edge_Width( EDGE_MODULE* Edge, wxDC* DC )
/***************************************************************************/
void
WinEDA_ModuleEditFrame
::
Edit_Edge_Layer
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
)
void
WinEDA_ModuleEditFrame
::
Edit_Edge_Layer
(
EDGE_MODULE
*
Edge
)
/***************************************************************************/
/* Change the EDGE_MODULE Edge layer, (The new layer will be asked)
...
...
@@ -267,12 +267,11 @@ void WinEDA_ModuleEditFrame::Enter_Edge_Width( EDGE_MODULE* Edge, wxDC* DC )
/****************************************************************************/
void
WinEDA_ModuleEditFrame
::
Delete_Edge_Module
(
EDGE_MODULE
*
Edge
,
wxDC
*
DC
)
void
WinEDA_ModuleEditFrame
::
Delete_Edge_Module
(
EDGE_MODULE
*
Edge
)
/****************************************************************************/
/* Edition of the edge items width
* delete EDGE_MODULE Edge if Edge != NULL
* @param Edge = edge to edit, or NULL
* @param DC = current Device Context
/** Function Delete_Edge_Module
* delete EDGE_MODULE Edge
* @param Edge = edge to delete
*/
{
if
(
Edge
==
NULL
)
...
...
@@ -284,7 +283,6 @@ void WinEDA_ModuleEditFrame::Delete_Edge_Module( EDGE_MODULE* Edge, wxDC* DC )
}
MODULE
*
Module
=
(
MODULE
*
)
Edge
->
GetParent
();
Edge
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
);
/* suppression d'un segment */
Edge
->
DeleteStructure
();
...
...
pcbnew/edit.cpp
View file @
1b1be195
...
...
@@ -697,7 +697,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem
(
GetCurItem
()
->
GetParent
()
);
if
(
!
GetCurItem
()
||
GetCurItem
()
->
Type
()
!=
TYPE_MODULE
)
break
;
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetCurItem
(),
&
dc
,
pos
);
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetCurItem
(),
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
break
;
...
...
@@ -756,7 +756,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_PCB_DELETE_TEXTMODULE
:
DeleteTextModule
(
(
TEXTE_MODULE
*
)
GetCurItem
()
,
&
dc
);
DeleteTextModule
(
(
TEXTE_MODULE
*
)
GetCurItem
()
);
SetCurItem
(
NULL
);
DrawPanel
->
MouseToCursorSchema
();
break
;
...
...
pcbnew/editmod.cpp
View file @
1b1be195
...
...
@@ -19,23 +19,19 @@
/* Variables locales: */
bool
GoToEditor
=
FALSE
;
/**************************************/
/* class WinEDA_ModulePropertiesFrame */
/**************************************/
/* class WinEDA_ModulePropertiesFrame */
#include "dialog_edit_module.cpp"
/*******************************************************************/
void
WinEDA_BasePcbFrame
::
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
,
const
wxPoint
&
pos
)
void
WinEDA_BasePcbFrame
::
InstallModuleOptionsFrame
(
MODULE
*
Module
,
wxDC
*
DC
)
/*******************************************************************/
/* Fonction relai d'installation de la frame d'dition des proprietes
* du module*/
{
WinEDA_ModulePropertiesFrame
*
frame
=
new
WinEDA_ModulePropertiesFrame
(
this
,
Module
,
DC
,
pos
);
new
WinEDA_ModulePropertiesFrame
(
this
,
Module
,
DC
);
frame
->
ShowModal
();
frame
->
Destroy
();
...
...
@@ -61,7 +57,7 @@ void WinEDA_BasePcbFrame::InstallModuleOptionsFrame( MODULE* Module,
/*******************************************************************/
void
WinEDA_ModuleEditFrame
::
Place_Ancre
(
MODULE
*
pt_mod
,
wxDC
*
DC
)
void
WinEDA_ModuleEditFrame
::
Place_Ancre
(
MODULE
*
pt_mod
)
/*******************************************************************/
/*
...
...
@@ -69,32 +65,27 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
* Le module doit etre d'abort selectionne
*/
{
int
deltaX
,
deltaY
;
wxPoint
delta
;
EDA_BaseStruct
*
PtStruct
;
D_PAD
*
pt_pad
;
if
(
pt_mod
==
NULL
)
return
;
pt_mod
->
DrawAncre
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
DIM_ANCRE_MODULE
,
GR_XOR
);
deltaX
=
pt_mod
->
m_Pos
.
x
-
GetScreen
()
->
m_Curseur
.
x
;
deltaY
=
pt_mod
->
m_Pos
.
y
-
GetScreen
()
->
m_Curseur
.
y
;
delta
=
pt_mod
->
m_Pos
-
GetScreen
()
->
m_Curseur
;
pt_mod
->
m_Pos
=
GetScreen
()
->
m_Curseur
;
/* Mise a jour des coord relatives des elements:
* les coordonnees relatives sont relatives a l'ancre, pour orient 0.
* il faut donc recalculer deltaX et deltaY en orientation 0 */
RotatePoint
(
&
delta
X
,
&
deltaY
,
-
pt_mod
->
m_Orient
);
RotatePoint
(
&
delta
,
-
pt_mod
->
m_Orient
);
/* Mise a jour des coord relatives des pads */
pt_pad
=
(
D_PAD
*
)
pt_mod
->
m_Pads
;
for
(
;
pt_pad
!=
NULL
;
pt_pad
=
pt_pad
->
Next
()
)
{
pt_pad
->
m_Pos0
.
x
+=
deltaX
;
pt_pad
->
m_Pos0
.
y
+=
deltaY
;
pt_pad
->
m_Pos0
+=
delta
;
}
/* Mise a jour des coord relatives contours .. */
...
...
@@ -106,14 +97,14 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
case
TYPE_EDGE_MODULE
:
#undef STRUCT
#define STRUCT ( (EDGE_MODULE*) PtStruct )
STRUCT
->
m_Start0
.
x
+=
deltaX
;
STRUCT
->
m_Start0
.
y
+=
deltaY
;
STRUCT
->
m_End0
.
x
+=
deltaX
;
STRUCT
->
m_End0
.
y
+=
deltaY
;
STRUCT
->
m_Start0
+=
delta
;
STRUCT
->
m_End0
+=
delta
;
break
;
case
TYPE_TEXTE_MODULE
:
#undef STRUCT
#define STRUCT ( (TEXTE_MODULE*) PtStruct )
STRUCT
->
m_Pos0
.
x
+=
deltaX
;
STRUCT
->
m_Pos0
.
y
+=
deltaY
;
STRUCT
->
m_Pos0
+=
delta
;
break
;
default
:
...
...
@@ -122,12 +113,12 @@ void WinEDA_ModuleEditFrame::Place_Ancre( MODULE* pt_mod, wxDC* DC )
}
pt_mod
->
Set_Rectangle_Encadrement
();
pt_mod
->
DrawAncre
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
DIM_ANCRE_MODULE
,
GR_OR
);
DrawPanel
->
Refresh
(
);
}
/**********************************************************************/
void
WinEDA_ModuleEditFrame
::
RemoveStruct
(
EDA_BaseStruct
*
Item
,
wxDC
*
DC
)
void
WinEDA_ModuleEditFrame
::
RemoveStruct
(
EDA_BaseStruct
*
Item
)
/**********************************************************************/
{
if
(
Item
==
NULL
)
...
...
@@ -152,12 +143,13 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item, wxDC* DC )
DisplayError
(
this
,
_
(
"Text is VALUE!"
)
);
break
;
}
DeleteTextModule
(
text
,
DC
);
DeleteTextModule
(
text
);
}
break
;
case
TYPE_EDGE_MODULE
:
Delete_Edge_Module
(
(
EDGE_MODULE
*
)
Item
,
DC
);
Delete_Edge_Module
(
(
EDGE_MODULE
*
)
Item
);
DrawPanel
->
Refresh
();
break
;
case
TYPE_MODULE
:
...
...
pcbnew/edtxtmod.cpp
View file @
1b1be195
...
...
@@ -88,7 +88,7 @@ void WinEDA_BasePcbFrame::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
/**************************************************************************/
void
WinEDA_BasePcbFrame
::
DeleteTextModule
(
TEXTE_MODULE
*
Text
,
wxDC
*
DC
)
void
WinEDA_BasePcbFrame
::
DeleteTextModule
(
TEXTE_MODULE
*
Text
)
/**************************************************************************/
/*
...
...
@@ -104,7 +104,6 @@ void WinEDA_BasePcbFrame::DeleteTextModule( TEXTE_MODULE* Text, wxDC* DC )
if
(
Text
->
m_Type
==
TEXT_is_DIVERS
)
{
// Text->Draw( DrawPanel, DC, GR_XOR );
DrawPanel
->
PostDirtyRect
(
Text
->
GetBoundingBox
()
);
/* liberation de la memoire : */
...
...
pcbnew/modedit.cpp
View file @
1b1be195
This diff is collapsed.
Click to expand it.
pcbnew/modedit_onclick.cpp
View file @
1b1be195
...
...
@@ -52,7 +52,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
wxString
msg
;
msg
.
Printf
(
wxT
(
"WinEDA_ModEditFrame::
ProcessCommand
err: m_Flags != 0
\n
Struct @%p, type %d m_Flag %X"
),
"WinEDA_ModEditFrame::
OnLeftClick
err: m_Flags != 0
\n
Struct @%p, type %d m_Flag %X"
),
DrawStruct
,
DrawStruct
->
Type
(),
DrawStruct
->
m_Flags
);
DisplayError
(
this
,
msg
);
DrawStruct
->
m_Flags
=
0
;
...
...
@@ -122,7 +122,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
==
0
)
)
{
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
);
RemoveStruct
(
DrawStruct
,
DC
);
RemoveStruct
(
DrawStruct
);
SetCurItem
(
DrawStruct
=
NULL
);
}
}
...
...
@@ -130,7 +130,7 @@ void WinEDA_ModuleEditFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
case
ID_MODEDIT_PLACE_ANCHOR
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
);
Place_Ancre
(
GetBoard
()
->
m_Modules
,
DC
);
Place_Ancre
(
GetBoard
()
->
m_Modules
);
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
Recadre_Trace
(
TRUE
);
...
...
@@ -401,8 +401,7 @@ void WinEDA_ModuleEditFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break
;
case
TYPE_MODULE
:
InstallModuleOptionsFrame
(
(
MODULE
*
)
DrawStruct
,
&
dc
,
pos
);
InstallModuleOptionsFrame
(
(
MODULE
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
break
;
...
...
pcbnew/onleftclick.cpp
View file @
1b1be195
...
...
@@ -214,10 +214,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
)
DrawPanel
->
m_AutoPAN_Request
=
TRUE
;
}
else
if
(
DrawStruct
&&
// (DrawStruct->Type() == TYPE_TRACK) &&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
else
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
TRACK
*
track
=
Begin_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
if
(
track
)
// c'est a dire si OK
...
...
@@ -391,7 +388,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
break
;
case
TYPE_MODULE
:
InstallModuleOptionsFrame
(
(
MODULE
*
)
DrawStruct
,
&
dc
,
pos
);
InstallModuleOptionsFrame
(
(
MODULE
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
break
;
...
...
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