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
Show 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
...
...
@@ -139,14 +139,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
/* Traite les selections d'outils et les commandes appelees du menu POPUP
*/
#define SET_DC wxClientDC dc( DrawPanel ); DrawPanel->PrepareGraphicContext( &dc );
{
int
id
=
event
.
GetId
();
wxPoint
pos
;
bool
redraw
=
false
;
wxClientDC
dc
(
DrawPanel
);
DrawPanel
->
CursorOff
(
&
dc
);
DrawPanel
->
PrepareGraphicContext
(
&
dc
);
wxGetMousePosition
(
&
pos
.
x
,
&
pos
.
y
);
...
...
@@ -185,19 +184,14 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_CANCEL_CURRENT_COMMAND
:
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
{
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
}
break
;
default
:
// Arret dea commande de d�placement en cours
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
default
:
if
(
DrawPanel
->
ManageCurseur
&&
DrawPanel
->
ForceCloseManageCurseur
)
{
// for all other commands: stop the move in progress
SET_DC
;
DrawPanel
->
ForceCloseManageCurseur
(
DrawPanel
,
&
dc
);
}
if
(
id
!=
ID_POPUP_CANCEL_CURRENT_COMMAND
)
SetToolID
(
0
,
wxCURSOR_ARROW
,
wxEmptyString
);
break
;
}
...
...
@@ -229,9 +223,10 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem
(
NULL
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
MODULE
*
module
=
Create_1_Module
(
&
dc
,
wxEmptyString
);
MODULE
*
module
=
Create_1_Module
(
NULL
,
wxEmptyString
);
if
(
module
)
// i.e. if create module command not aborted
{
redraw
=
true
;
module
->
SetPosition
(
wxPoint
(
0
,
0
)
);
if
(
GetBoard
()
->
m_Modules
)
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
...
...
@@ -326,7 +321,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
SetCurItem
(
NULL
);
Clear_Pcb
(
true
);
GetScreen
()
->
m_Curseur
=
wxPoint
(
0
,
0
);
Import_Module
(
&
dc
);
Import_Module
(
NULL
);
redraw
=
true
;
if
(
GetBoard
()
->
m_Modules
)
GetBoard
()
->
m_Modules
->
m_Flags
=
0
;
GetScreen
()
->
ClrModify
();
...
...
@@ -400,9 +396,9 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_EDIT_MODULE_PROPERTIES
:
if
(
GetBoard
()
->
m_Modules
)
{
SET_DC
;
SetCurItem
(
GetBoard
()
->
m_Modules
);
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
pos
);
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
GetScreen
()
->
GetCurItem
()
->
m_Flags
=
0
;
}
break
;
...
...
@@ -446,29 +442,39 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE
:
DrawPanel
->
MouseToCursorSchema
();
Rotate_Module
(
NULL
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
900
,
true
);
redraw
=
true
;
break
;
case
ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE
:
DrawPanel
->
MouseToCursorSchema
();
Rotate_Module
(
&
dc
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
-
900
,
true
);
Rotate_Module
(
NULL
,
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
-
900
,
true
);
redraw
=
true
;
break
;
case
ID_POPUP_PCB_EDIT_MODULE
:
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
pos
);
{
SET_DC
;
InstallModuleOptionsFrame
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
GetScreen
()
->
GetCurItem
()
->
m_Flags
=
0
;
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_MOVE_PAD_REQUEST
:
{
SET_DC
;
DrawPanel
->
MouseToCursorSchema
();
StartMovePad
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
}
break
;
case
ID_POPUP_PCB_EDIT_PAD
:
{
SET_DC
;
InstallPadOptionsFrame
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
pos
);
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_DELETE_PAD
:
...
...
@@ -496,40 +502,52 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
break
;
case
ID_POPUP_PCB_EDIT_TEXTMODULE
:
{
SET_DC
;
InstallTextModOptionsFrame
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
pos
);
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST
:
{
SET_DC
;
DrawPanel
->
MouseToCursorSchema
();
StartMoveTexteModule
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
StartMoveTexteModule
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
}
break
;
case
ID_POPUP_PCB_ROTATE_TEXTMODULE
:
{
SET_DC
;
RotateTextModule
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_DELETE_TEXTMODULE
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
);
DeleteTextModule
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
DeleteTextModule
(
(
TEXTE_MODULE
*
)
GetScreen
()
->
GetCurItem
()
);
SetCurItem
(
NULL
);
DrawPanel
->
MouseToCursorSchema
();
break
;
case
ID_POPUP_PCB_MOVE_EDGE
:
{
SET_DC
;
Start_Move_EdgeMod
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
}
break
;
case
ID_POPUP_PCB_STOP_CURRENT_DRAWING
:
DrawPanel
->
MouseToCursorSchema
();
if
(
(
GetScreen
()
->
GetCurItem
()
->
m_Flags
&
IS_NEW
)
)
{
SET_DC
;
End_Edge_Module
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
SetCurItem
(
NULL
);
}
...
...
@@ -544,6 +562,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
{
edge
=
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
();
}
SET_DC
;
Enter_Edge_Width
(
edge
,
&
dc
);
DrawPanel
->
MouseToCursorSchema
();
}
...
...
@@ -551,28 +570,28 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_EDIT_WIDTH_CURRENT_EDGE
:
DrawPanel
->
MouseToCursorSchema
();
Edit_Edge_Width
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
()
,
&
dc
);
Edit_Edge_Width
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
()
);
break
;
case
ID_POPUP_PCB_EDIT_WIDTH_ALL_EDGE
:
DrawPanel
->
MouseToCursorSchema
();
Edit_Edge_Width
(
NULL
,
&
dc
);
Edit_Edge_Width
(
NULL
);
break
;
case
ID_POPUP_PCB_EDIT_LAYER_CURRENT_EDGE
:
DrawPanel
->
MouseToCursorSchema
();
Edit_Edge_Layer
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
()
,
&
dc
);
Edit_Edge_Layer
(
(
EDGE_MODULE
*
)
GetScreen
()
->
GetCurItem
()
);
break
;
case
ID_POPUP_PCB_EDIT_LAYER_ALL_EDGE
:
DrawPanel
->
MouseToCursorSchema
();
Edit_Edge_Layer
(
NULL
,
&
dc
);
Edit_Edge_Layer
(
NULL
);
break
;
case
ID_POPUP_PCB_DELETE_EDGE
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
);
DrawPanel
->
MouseToCursorSchema
();
RemoveStruct
(
GetScreen
()
->
GetCurItem
()
,
&
dc
);
RemoveStruct
(
GetScreen
()
->
GetCurItem
()
);
SetCurItem
(
NULL
);
break
;
...
...
@@ -582,7 +601,8 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_MODULE_SCALEX
:
case
ID_MODEDIT_MODULE_SCALEY
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
);
Transform
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
id
);
Transform
(
(
MODULE
*
)
GetScreen
()
->
GetCurItem
(),
id
);
redraw
=
true
;
break
;
case
ID_PCB_DRAWINGS_WIDTHS_SETUP
:
...
...
@@ -597,6 +617,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
if
(
item
->
Type
()
!=
TYPE_PAD
)
item
=
NULL
;
}
SET_DC
;
InstallPadOptionsFrame
(
(
D_PAD
*
)
item
,
&
dc
,
pos
);
}
break
;
...
...
@@ -607,44 +628,58 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_MODEDIT_UNDO
:
GetComponentFromUndoList
();
DrawPanel
->
Refresh
(
true
)
;
redraw
=
true
;
break
;
case
ID_MODEDIT_REDO
:
GetComponentFromRedoList
();
DrawPanel
->
Refresh
(
true
)
;
redraw
=
true
;
break
;
case
ID_POPUP_PLACE_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_MOVE
;
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
{
SET_DC
;
HandleBlockPlace
(
&
dc
);
}
break
;
case
ID_POPUP_COPY_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_COPY
;
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
{
SET_DC
;
HandleBlockPlace
(
&
dc
);
}
break
;
case
ID_POPUP_ZOOM_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_ZOOM
;
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
{
SET_DC
;
HandleBlockEnd
(
&
dc
);
}
break
;
case
ID_POPUP_DELETE_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_DELETE
;
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
{
SET_DC
;
HandleBlockEnd
(
&
dc
);
}
break
;
case
ID_POPUP_ROTATE_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_ROTATE
;
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
{
SET_DC
;
HandleBlockEnd
(
&
dc
);
}
break
;
case
ID_POPUP_MIRROR_X_BLOCK
:
...
...
@@ -652,7 +687,10 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_INVERT_BLOCK
:
GetScreen
()
->
BlockLocate
.
m_Command
=
BLOCK_INVERT
;
GetScreen
()
->
BlockLocate
.
SetMessageBlock
(
this
);
{
SET_DC
;
HandleBlockEnd
(
&
dc
);
}
break
;
default
:
...
...
@@ -662,14 +700,13 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
}
SetToolbars
();
DrawPanel
->
CursorOn
(
&
dc
);
if
(
redraw
)
if
(
redraw
)
DrawPanel
->
Refresh
();
}
/******************************************************************************/
void
WinEDA_ModuleEditFrame
::
Transform
(
MODULE
*
module
,
wxDC
*
DC
,
int
transform
)
void
WinEDA_ModuleEditFrame
::
Transform
(
MODULE
*
module
,
int
transform
)
/******************************************************************************/
/* Execute les transformations de la repr�sentation des modules.
...
...
@@ -792,5 +829,4 @@ void WinEDA_ModuleEditFrame::Transform( MODULE* module, wxDC* DC, int transform
}
module
->
Set_Rectangle_Encadrement
();
DrawPanel
->
ReDraw
(
DC
);
}
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