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
2a5676b2
Commit
2a5676b2
authored
Oct 26, 2007
by
CHARRAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add class_marker.cpp and class_marker.h. Some other minor changes
parent
2728aa59
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
329 additions
and
221 deletions
+329
-221
change_log.txt
change_log.txt
+8
-0
eda_doc.cpp
common/eda_doc.cpp
+3
-3
gestfich.cpp
common/gestfich.cpp
+18
-18
projet_config.cpp
common/projet_config.cpp
+7
-7
cfg.cpp
cvpcb/cfg.cpp
+2
-2
cvpcb.cpp
cvpcb/cvpcb.cpp
+1
-1
dialog_cvpcb_config.cpp
cvpcb/dialog_cvpcb_config.cpp
+1
-1
menucfg.cpp
cvpcb/menucfg.cpp
+2
-2
block.cpp
eeschema/block.cpp
+3
-3
cleanup.cpp
eeschema/cleanup.cpp
+1
-1
cross-probing.cpp
eeschema/cross-probing.cpp
+1
-1
delsheet.cpp
eeschema/delsheet.cpp
+1
-1
dialog_eeschema_config.cpp
eeschema/dialog_eeschema_config.cpp
+1
-1
eeconfig.cpp
eeschema/eeconfig.cpp
+6
-6
eeschema.cpp
eeschema/eeschema.cpp
+1
-1
netlist_control.cpp
eeschema/netlist_control.cpp
+1
-1
symbdraw.cpp
eeschema/symbdraw.cpp
+1
-1
gerbview.cpp
gerbview/gerbview.cpp
+1
-1
gerbview_config.cpp
gerbview/gerbview_config.cpp
+2
-2
makefile.include
gerbview/makefile.include
+2
-2
reglage.cpp
gerbview/reglage.cpp
+1
-1
appl_wxstruct.h
include/appl_wxstruct.h
+0
-2
common.h
include/common.h
+3
-0
hotkeys_basic.h
include/hotkeys_basic.h
+1
-1
pcbstruct.h
include/pcbstruct.h
+9
-45
wxstruct.h
include/wxstruct.h
+3
-0
buildmnu.cpp
kicad/buildmnu.cpp
+2
-2
files-io.cpp
kicad/files-io.cpp
+1
-1
kicad.cpp
kicad/kicad.cpp
+1
-1
preferences.cpp
kicad/preferences.cpp
+16
-16
prjconfig.cpp
kicad/prjconfig.cpp
+1
-1
block_module_editor.cpp
pcbnew/block_module_editor.cpp
+1
-1
class_marker.cpp
pcbnew/class_marker.cpp
+164
-0
class_marker.h
pcbnew/class_marker.h
+46
-0
classpcb.cpp
pcbnew/classpcb.cpp
+0
-81
cross-probing.cpp
pcbnew/cross-probing.cpp
+1
-1
dialog_setup_libs.cpp
pcbnew/dialog_setup_libs.cpp
+3
-3
edit.cpp
pcbnew/edit.cpp
+1
-1
makefile.include
pcbnew/makefile.include
+1
-1
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+2
-2
pcbnew.cpp
pcbnew/pcbnew.cpp
+1
-1
drawframe.cpp
share/drawframe.cpp
+8
-0
todo.txt
todo.txt
+0
-5
No files found.
change_log.txt
View file @
2a5676b2
...
...
@@ -4,6 +4,14 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2007-Oct-26 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+ pcbnew:
Add class_marker.cpp and class_marker.h and move MARQUEUR functions in class_marker.cpp
Change MARQUEUR::HitTest to take in account the zoom level.
change global var EDA_Appl to g_EDA_Appl
2007-Oct-25 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
+ cvpcb
...
...
common/eda_doc.cpp
View file @
2a5676b2
...
...
@@ -147,8 +147,8 @@ bool success = FALSE;
}
/* Try to launch some browser (usefull under linux) */
EDA_Appl
->
ReadPdfBrowserInfos
();
if
(
EDA_Appl
->
m_PdfBrowserIsDefault
)
g_
EDA_Appl
->
ReadPdfBrowserInfos
();
if
(
g_
EDA_Appl
->
m_PdfBrowserIsDefault
)
{
wxFileType
*
filetype
;
wxFileName
CurrentFileName
(
fullfilename
);
...
...
@@ -205,7 +205,7 @@ bool success = FALSE;
else
{
command
=
EDA_Appl
->
m_PdfBrowser
;
command
=
g_
EDA_Appl
->
m_PdfBrowser
;
if
(
wxFileExists
(
command
)
)
{
success
=
TRUE
;
...
...
common/gestfich.cpp
View file @
2a5676b2
...
...
@@ -76,7 +76,7 @@ static wxString s_KicadBinaryPathList[] = {
#endif
wxT
(
"end_list"
)
// End of list symbol, do not change
};
extern
WinEDA_App
*
EDA_Appl
;
extern
WinEDA_App
*
g_
EDA_Appl
;
/***************************************************************************/
...
...
@@ -339,12 +339,12 @@ wxString FindKicadHelpPath()
bool
PathFound
=
FALSE
;
/* find kicad/help/ */
tmp
=
EDA_Appl
->
m_BinDir
;
tmp
=
g_
EDA_Appl
->
m_BinDir
;
if
(
tmp
.
Last
()
==
'/'
)
tmp
.
RemoveLast
();
FullPath
=
tmp
.
BeforeLast
(
'/'
);
// Idem cd ..
FullPath
+=
wxT
(
"/help/"
);
LocaleString
=
EDA_Appl
->
m_Locale
->
GetCanonicalName
();
LocaleString
=
g_
EDA_Appl
->
m_Locale
->
GetCanonicalName
();
wxString
path_tmp
=
FullPath
;
#ifdef __WINDOWS__
...
...
@@ -357,9 +357,9 @@ wxString FindKicadHelpPath()
}
/* find kicad/help/ from environment variable KICAD */
if
(
!
PathFound
&&
EDA_Appl
->
m_Env_Defined
)
if
(
!
PathFound
&&
g_
EDA_Appl
->
m_Env_Defined
)
{
FullPath
=
EDA_Appl
->
m_KicadEnv
+
wxT
(
"/help/"
);
FullPath
=
g_
EDA_Appl
->
m_KicadEnv
+
wxT
(
"/help/"
);
if
(
wxDirExists
(
FullPath
)
)
PathFound
=
TRUE
;
}
...
...
@@ -424,15 +424,15 @@ wxString FindKicadFile( const wxString& shortname )
/* test de la presence du fichier shortname dans le repertoire de
* des binaires de kicad */
FullFileName
=
EDA_Appl
->
m_BinDir
+
shortname
;
FullFileName
=
g_
EDA_Appl
->
m_BinDir
+
shortname
;
if
(
wxFileExists
(
FullFileName
)
)
return
FullFileName
;
/* test de la presence du fichier shortname dans le repertoire
* defini par la variable d'environnement KICAD */
if
(
EDA_Appl
->
m_Env_Defined
)
if
(
g_
EDA_Appl
->
m_Env_Defined
)
{
FullFileName
=
EDA_Appl
->
m_KicadEnv
+
shortname
;
FullFileName
=
g_
EDA_Appl
->
m_KicadEnv
+
shortname
;
if
(
wxFileExists
(
FullFileName
)
)
return
FullFileName
;
}
...
...
@@ -519,7 +519,7 @@ void SetRealLibraryPath( const wxString& shortlibname )
else
{
g_RealLibDirBuffer
=
ReturnKicadDatasPath
();
if
(
EDA_Appl
->
m_Env_Defined
)
// Chemin impose par la variable d'environnement
if
(
g_
EDA_Appl
->
m_Env_Defined
)
// Chemin impose par la variable d'environnement
{
PathFound
=
TRUE
;
}
...
...
@@ -552,22 +552,22 @@ wxString ReturnKicadDatasPath()
bool
PathFound
=
FALSE
;
wxString
data_path
;
if
(
EDA_Appl
->
m_Env_Defined
)
// Chemin impose par la variable d'environnement
if
(
g_
EDA_Appl
->
m_Env_Defined
)
// Chemin impose par la variable d'environnement
{
data_path
=
EDA_Appl
->
m_KicadEnv
;
data_path
=
g_
EDA_Appl
->
m_KicadEnv
;
PathFound
=
TRUE
;
}
else
// Chemin cherche par le chemin des executables
{
// le chemin est bindir../
wxString
tmp
=
EDA_Appl
->
m_BinDir
;
wxString
tmp
=
g_
EDA_Appl
->
m_BinDir
;
#ifdef __WINDOWS__
tmp
.
MakeLower
();
#endif
if
(
tmp
.
Contains
(
wxT
(
"kicad"
)
)
)
{
#ifdef __WINDOWS__
tmp
=
EDA_Appl
->
m_BinDir
;
tmp
=
g_
EDA_Appl
->
m_BinDir
;
#endif
if
(
tmp
.
Last
()
==
'/'
)
tmp
.
RemoveLast
();
...
...
@@ -636,10 +636,10 @@ wxString GetEditorName()
);
}
if
(
(
!
editorname
.
IsEmpty
()
)
&&
EDA_Appl
->
m_EDA_CommonConfig
)
if
(
(
!
editorname
.
IsEmpty
()
)
&&
g_
EDA_Appl
->
m_EDA_CommonConfig
)
{
g_EditorName
=
editorname
;
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"Editor"
),
g_EditorName
);
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"Editor"
),
g_EditorName
);
}
return
g_EditorName
;
}
...
...
@@ -651,11 +651,11 @@ void OpenPDF( const wxString& file )
wxString
filename
=
file
;
wxString
type
;
EDA_Appl
->
ReadPdfBrowserInfos
();
if
(
!
EDA_Appl
->
m_PdfBrowserIsDefault
)
g_
EDA_Appl
->
ReadPdfBrowserInfos
();
if
(
!
g_
EDA_Appl
->
m_PdfBrowserIsDefault
)
{
AddDelimiterString
(
filename
);
command
=
EDA_Appl
->
m_PdfBrowser
+
filename
;
command
=
g_
EDA_Appl
->
m_PdfBrowser
+
filename
;
}
else
{
...
...
common/projet_config.cpp
View file @
2a5676b2
...
...
@@ -207,8 +207,8 @@ bool WinEDA_App::ReadProjectConfig(const wxString & local_config_filename,
return:
TRUE si lue.
Met a jour en plus:
EDA_Appl->m_CurrentOptionFileDateAndTime
EDA_Appl->m_CurrentOptionFile
g_
EDA_Appl->m_CurrentOptionFileDateAndTime
g_
EDA_Appl->m_CurrentOptionFile
*/
{
const
PARAM_CFG_BASE
*
pt_cfg
;
...
...
@@ -221,22 +221,22 @@ wxString timestamp;
g_Prj_Config
->
SetPath
(
UNIX_STRING_DIR_SEP
);
timestamp
=
g_Prj_Config
->
Read
(
wxT
(
"update"
)
);
if
(
Load_Only_if_New
&&
(
!
timestamp
.
IsEmpty
()
)
&&
(
timestamp
==
EDA_Appl
->
m_CurrentOptionFileDateAndTime
)
)
(
timestamp
==
g_
EDA_Appl
->
m_CurrentOptionFileDateAndTime
)
)
{
return
FALSE
;
}
EDA_Appl
->
m_CurrentOptionFileDateAndTime
=
timestamp
;
g_
EDA_Appl
->
m_CurrentOptionFileDateAndTime
=
timestamp
;
if
(
!
g_Prj_Default_Config_FullFilename
.
IsEmpty
()
)
EDA_Appl
->
m_CurrentOptionFile
=
g_Prj_Default_Config_FullFilename
;
g_
EDA_Appl
->
m_CurrentOptionFile
=
g_Prj_Default_Config_FullFilename
;
else
{
if
(
wxPathOnly
(
g_Prj_Config_LocalFilename
).
IsEmpty
()
)
EDA_Appl
->
m_CurrentOptionFile
=
g_
EDA_Appl
->
m_CurrentOptionFile
=
wxGetCwd
()
+
STRING_DIR_SEP
+
g_Prj_Config_LocalFilename
;
else
EDA_Appl
->
m_CurrentOptionFile
=
g_Prj_Config_LocalFilename
;
g_
EDA_Appl
->
m_CurrentOptionFile
=
g_Prj_Config_LocalFilename
;
}
for
(
;
*
List
!=
NULL
;
List
++
)
...
...
cvpcb/cfg.cpp
View file @
2a5676b2
...
...
@@ -35,7 +35,7 @@ wxString FullFileName = FileName ;
g_LibName_List
.
Clear
();
g_ListName_Equ
.
Clear
();
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
g_
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
,
FALSE
);
if
(
PkgInExtBuffer
.
IsEmpty
()
)
PkgInExtBuffer
=
wxT
(
".pkg"
);
...
...
@@ -80,6 +80,6 @@ wxString mask( wxT("*"));
if
(
FullFileName
.
IsEmpty
())
return
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
g_
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
}
cvpcb/cvpcb.cpp
View file @
2a5676b2
...
...
@@ -33,7 +33,7 @@ bool WinEDA_App::OnInit()
wxString
msg
;
wxString
currCWD
=
wxGetCwd
();
EDA_Appl
=
this
;
g_
EDA_Appl
=
this
;
InitEDA_Appl
(
wxT
(
"cvpcb"
)
);
if
(
m_Checker
&&
m_Checker
->
IsAnotherRunning
()
)
...
...
cvpcb/dialog_cvpcb_config.cpp
View file @
2a5676b2
...
...
@@ -73,7 +73,7 @@ wxString title;
m_Parent
=
parent
;
m_DoUpdate
=
TRUE
;
title
=
_
(
"from "
)
+
EDA_Appl
->
m_CurrentOptionFile
;
title
=
_
(
"from "
)
+
g_
EDA_Appl
->
m_CurrentOptionFile
;
SetTitle
(
title
);
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
}
...
...
cvpcb/menucfg.cpp
View file @
2a5676b2
...
...
@@ -86,7 +86,7 @@ void KiConfigCvpcbFrame::SetDialogDatas()
m_PkgExtBoxSizer
,
wxDefaultSize
);
wxString
DocModuleFileName
=
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
wxT
(
"pcbnew/footprints.pdf"
));
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
wxT
(
"pcbnew/footprints.pdf"
));
m_TextHelpModulesFileName
=
new
WinEDA_EnterText
(
this
,
_
(
"Module Doc File:"
),
DocModuleFileName
,
m_RightBoxSizer
,
wxDefaultSize
);
...
...
@@ -132,7 +132,7 @@ wxString msg;
if
(
!
m_DoUpdate
)
return
;
NetInExtBuffer
=
m_NetInputExtCtrl
->
GetValue
();
PkgInExtBuffer
=
m_PkgExtCtrl
->
GetValue
();
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"module_doc_file"
),
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"module_doc_file"
),
m_TextHelpModulesFileName
->
GetValue
());
msg
=
m_LibDirCtrl
->
GetValue
();
...
...
eeschema/block.cpp
View file @
2a5676b2
...
...
@@ -681,7 +681,7 @@ void MirrorOneStruct( EDA_BaseStruct* DrawStruct, wxPoint& Center )
MirrorYPoint
(
px
,
Center
);
px
.
x
-=
dx
;
EDA_Appl
->
m_SchematicFrame
->
PutOnGrid
(
&
px
);
g_
EDA_Appl
->
m_SchematicFrame
->
PutOnGrid
(
&
px
);
DrawText
->
m_Pos
.
x
=
px
.
x
;
break
;
...
...
@@ -696,14 +696,14 @@ void MirrorOneStruct( EDA_BaseStruct* DrawStruct, wxPoint& Center )
px
=
DrawText
->
m_Pos
;
MirrorYPoint
(
px
,
Center
);
EDA_Appl
->
m_SchematicFrame
->
PutOnGrid
(
&
px
);
g_
EDA_Appl
->
m_SchematicFrame
->
PutOnGrid
(
&
px
);
DrawText
->
m_Pos
.
x
=
px
.
x
;
break
;
case
DRAW_LIB_ITEM_STRUCT_TYPE
:
DrawLibItem
=
(
EDA_SchComponentStruct
*
)
DrawStruct
;
dx
=
DrawLibItem
->
m_Pos
.
x
;
EDA_Appl
->
m_SchematicFrame
->
CmpRotationMiroir
(
DrawLibItem
,
g_
EDA_Appl
->
m_SchematicFrame
->
CmpRotationMiroir
(
DrawLibItem
,
NULL
,
CMP_MIROIR_Y
);
MirrorYPoint
(
DrawLibItem
->
m_Pos
,
Center
);
dx
-=
DrawLibItem
->
m_Pos
.
x
;
...
...
eeschema/cleanup.cpp
View file @
2a5676b2
...
...
@@ -63,7 +63,7 @@ bool SCH_SCREEN::SchematicCleanUp( wxDC* DC )
}
}
EDA_Appl
->
m_SchematicFrame
->
TestDanglingEnds
(
EEDrawList
,
DC
);
g_
EDA_Appl
->
m_SchematicFrame
->
TestDanglingEnds
(
EEDrawList
,
DC
);
return
Modify
;
}
...
...
eeschema/cross-probing.cpp
View file @
2a5676b2
...
...
@@ -36,7 +36,7 @@ void RemoteCommand( const char* cmdline )
char
line
[
1024
];
char
*
idcmd
;
char
*
text
;
WinEDA_SchematicFrame
*
frame
=
EDA_Appl
->
m_SchematicFrame
;
WinEDA_SchematicFrame
*
frame
=
g_
EDA_Appl
->
m_SchematicFrame
;
wxString
part_ref
,
msg
;
strncpy
(
line
,
cmdline
,
sizeof
(
line
)
-
1
);
...
...
eeschema/delsheet.cpp
View file @
2a5676b2
...
...
@@ -24,7 +24,7 @@ void DeleteSubHierarchy(DrawSheetStruct * FirstSheet, bool confirm_deletion)
{
EDA_BaseStruct
*
DrawStruct
;
EDA_BaseStruct
*
EEDrawList
;
WinEDA_SchematicFrame
*
frame
=
EDA_Appl
->
m_SchematicFrame
;
WinEDA_SchematicFrame
*
frame
=
g_
EDA_Appl
->
m_SchematicFrame
;
wxString
msg
;
if
(
FirstSheet
==
NULL
)
return
;
...
...
eeschema/dialog_eeschema_config.cpp
View file @
2a5676b2
...
...
@@ -102,7 +102,7 @@ wxString msg;
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
msg
=
_
(
"from "
)
+
EDA_Appl
->
m_CurrentOptionFile
;
msg
=
_
(
"from "
)
+
g_
EDA_Appl
->
m_CurrentOptionFile
;
SetTitle
(
msg
);
SetFormatsNetListes
();
m_ListLibr
->
InsertItems
(
g_LibName_List
,
0
);
...
...
eeschema/eeconfig.cpp
View file @
2a5676b2
...
...
@@ -142,7 +142,7 @@ wxArrayString liblist_tmp = g_LibName_List;
else
FullFileName
=
CfgFileName
;
g_LibName_List
.
Clear
();
if
(
!
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
if
(
!
g_
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
,
ForceRereadConfig
?
FALSE
:
TRUE
)
)
// Config non lue
{
g_LibName_List
=
liblist_tmp
;
...
...
@@ -159,13 +159,13 @@ wxArrayString liblist_tmp = g_LibName_List;
g_LibName_List
.
Add
(
wxT
(
"device"
)
);
}
if
(
EDA_Appl
->
m_SchematicFrame
)
if
(
g_
EDA_Appl
->
m_SchematicFrame
)
{
EDA_Appl
->
m_SchematicFrame
->
SetDrawBgColor
(
g_DrawBgColor
);
EDA_Appl
->
m_SchematicFrame
->
m_Draw_Grid
=
g_ShowGrid
;
g_
EDA_Appl
->
m_SchematicFrame
->
SetDrawBgColor
(
g_DrawBgColor
);
g_
EDA_Appl
->
m_SchematicFrame
->
m_Draw_Grid
=
g_ShowGrid
;
}
LoadLibraries
(
EDA_Appl
->
m_SchematicFrame
);
LoadLibraries
(
g_
EDA_Appl
->
m_SchematicFrame
);
return
IsRead
;
}
...
...
@@ -197,6 +197,6 @@ wxString mask( wxT("*") );
if
(
FullFileName
.
IsEmpty
()
)
return
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
g_
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
}
eeschema/eeschema.cpp
View file @
2a5676b2
...
...
@@ -46,7 +46,7 @@ bool WinEDA_App::OnInit()
{
wxString
FFileName
;
EDA_Appl
=
this
;
g_
EDA_Appl
=
this
;
g_DebugLevel
=
0
;
// Debug level */
...
...
eeschema/netlist_control.cpp
View file @
2a5676b2
...
...
@@ -329,7 +329,7 @@ void WinEDA_NetlistFrame::SetupPlugin(wxCommandEvent& event)
{
wxString
FullFileName
,
Mask
,
Path
;
Mask
=
wxT
(
"*"
);
Path
=
EDA_Appl
->
m_BinDir
;
Path
=
g_
EDA_Appl
->
m_BinDir
;
FullFileName
=
EDA_FileSelector
(
_
(
"Plugin files:"
),
Path
,
/* Chemin par defaut */
FullFileName
,
/* nom fichier par defaut */
...
...
eeschema/symbdraw.cpp
View file @
2a5676b2
...
...
@@ -793,7 +793,7 @@ static void ComputeArc( LibDrawArc* DrawItem, wxPoint ArcCentre )
wxString
msg
;
angle
=
DrawItem
->
t2
-
DrawItem
->
t1
;
msg
.
Printf
(
_
(
"Arc %.1f deg"
),
(
float
)
angle
/
10
);
EDA_Appl
->
m_LibeditFrame
->
PrintMsg
(
msg
);
g_
EDA_Appl
->
m_LibeditFrame
->
PrintMsg
(
msg
);
while
(
(
DrawItem
->
t2
-
DrawItem
->
t1
)
>=
1800
)
{
...
...
gerbview/gerbview.cpp
View file @
2a5676b2
...
...
@@ -26,7 +26,7 @@ bool WinEDA_App::OnInit()
{
wxString
FFileName
;
EDA_Appl
=
this
;
g_
EDA_Appl
=
this
;
InitEDA_Appl
(
wxT
(
"gerbview"
)
);
if
(
argc
>
1
)
FFileName
=
MakeFileName
(
wxEmptyString
,
argv
[
1
],
g_PhotoFilenameExt
);
...
...
gerbview/gerbview_config.cpp
View file @
2a5676b2
...
...
@@ -91,7 +91,7 @@ bool Read_Config()
*/
{
g_Prj_Config_Filename_ext
=
wxT
(
".cnf"
);
EDA_Appl
->
ReadProjectConfig
(
wxT
(
"gerbview"
),
GROUP
,
ParamCfgList
,
FALSE
);
g_
EDA_Appl
->
ReadProjectConfig
(
wxT
(
"gerbview"
),
GROUP
,
ParamCfgList
,
FALSE
);
/* Inits autres variables */
if
(
ScreenPcb
)
...
...
@@ -137,7 +137,7 @@ void WinEDA_GerberFrame::Update_config()
return
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
g_
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
);
}
...
...
gerbview/makefile.include
View file @
2a5676b2
...
...
@@ -22,7 +22,7 @@ OBJECTS= \
drawpanel.o
\
set_color.o
\
gerbview_config.o
\
c
ursors
.o
\
c
lass_marker
.o
\
affiche.o
\
tracepcb.o
\
class_pcb_text.o
\
...
...
@@ -65,7 +65,7 @@ set_color.o: set_color.cpp set_color.h $(COMMON)
files.o
:
files.cpp $(COMMON)
c
ursors.o
:
../pcbnew/cursors.cpp
$(COMMON)
c
lass_marker.o
:
../pcbnew/class_marker.cpp ../pcbnew/class_marker.h
$(COMMON)
$(CC)
-c
$(EDACPPFLAGS)
-o
$@
../pcbnew/
$*
.cpp
sel_layer.o
:
../pcbnew/sel_layer.cpp $(COMMON)
...
...
gerbview/reglage.cpp
View file @
2a5676b2
...
...
@@ -95,7 +95,7 @@ wxString title;
m_Parent
=
parent
;
SetFont
(
*
g_DialogFont
);
title
=
_
(
"from "
)
+
EDA_Appl
->
m_CurrentOptionFile
;
title
=
_
(
"from "
)
+
g_
EDA_Appl
->
m_CurrentOptionFile
;
SetTitle
(
title
);
LibModified
=
FALSE
;
...
...
include/appl_wxstruct.h
View file @
2a5676b2
...
...
@@ -18,8 +18,6 @@
/**********************************************/
/* Class representing the entire Application */
/**********************************************/
eda_global
WinEDA_App
*
EDA_Appl
;
/* application representant le programme */
class
WinEDA_App
:
public
wxApp
{
...
...
include/common.h
View file @
2a5676b2
...
...
@@ -264,6 +264,9 @@ COMMON_GLOBL wxString g_ProductName
#endif
;
COMMON_GLOBL
WinEDA_App
*
g_EDA_Appl
;
/* this is the main application */
/* Gestion des librairies */
COMMON_GLOBL
wxString
g_RealLibDirBuffer
;
// Chemin reel des librairies de module
// = UserLibDirBuffer si non vide
...
...
include/hotkeys_basic.h
View file @
2a5676b2
...
...
@@ -16,7 +16,7 @@
/* define default path for config key file */
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_HOME wxGetHomeDir() + wxT( "/" )
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD EDA_Appl->m_BinDir + wxT( "../template/" )
#define DEFAULT_HOTKEY_FILENAME_PATH_IS_KICAD
g_
EDA_Appl->m_BinDir + wxT( "../template/" )
/* keyword idetifier in kicad config use ti store/retrieve path option */
#define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
...
...
include/pcbstruct.h
View file @
2a5676b2
...
...
@@ -339,14 +339,14 @@ public:
BOARD_ITEM
*
GetCurItem
()
const
{
return
(
BOARD_ITEM
*
)
BASE_SCREEN
::
GetCurItem
();
}
};
/***************************/
/*
Description des Modules
*/
/***************************/
#include "class_pad.h"
/
* Description des Pastilles :*/
#include "class_edge_mod.h"
#include "class_text_mod.h"
#include "class_module.h"
/***************************
*******
/
/*
Module (Footprint) description
*/
/***************************
*******
/
#include "class_pad.h" /
/ class for pads
#include "class_edge_mod.h"
// Class for footprint graphic elements
#include "class_text_mod.h"
// Class for footprint fields
#include "class_module.h"
// Class for the footprint
#include "class_equipot.h"
...
...
@@ -413,6 +413,7 @@ public:
#include "class_cotation.h"
#include "class_mire.h"
#include "class_track.h"
#include "class_marker.h"
/*******************/
/* class EDGE_ZONE */
...
...
@@ -427,43 +428,6 @@ public:
};
/***************************************/
/* Markers: used to show a drc problem */
/***************************************/
class
MARQUEUR
:
public
BOARD_ITEM
{
public
:
wxPoint
m_Pos
;
char
*
m_Bitmap
;
/* Shape (bitmap) */
int
m_Type
;
int
m_Color
;
/* color */
wxString
m_Diag
;
/* Associated text (comment) */
public
:
MARQUEUR
(
BOARD_ITEM
*
StructFather
);
~
MARQUEUR
();
void
UnLink
();
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
);
/**
* Function Display_Infos
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
void
Display_Infos
(
WinEDA_DrawFrame
*
frame
);
/**
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param ref_pos A wxPoint to test
* @return bool - true if a hit, else false
*/
bool
HitTest
(
const
wxPoint
&
ref_pos
);
};
class
DISPLAY_OPTIONS
{
...
...
include/wxstruct.h
View file @
2a5676b2
...
...
@@ -286,6 +286,9 @@ public:
/* Return the zoom level which displays the full page on screen */
virtual
int
BestZoom
()
=
0
;
/* Return the current zoom level */
int
GetZoom
(
void
);
void
ToPrinter
(
wxCommandEvent
&
event
);
void
SVG_Print
(
wxCommandEvent
&
event
);
...
...
kicad/buildmnu.cpp
View file @
2a5676b2
...
...
@@ -170,7 +170,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
SETBITMAPS
(
datasheet_xpm
);
SubMenuPdfBrowserChoice
->
Append
(
item
);
SubMenuPdfBrowserChoice
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
EDA_Appl
->
m_PdfBrowserIsDefault
);
g_
EDA_Appl
->
m_PdfBrowserIsDefault
);
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_PREFERED_PDF_BROWSER
,
_
(
"Favourite Pdf Viewer"
),
_
(
"Use your favourite PDF viewer used to browse datasheets"
),
wxITEM_CHECK
);
...
...
@@ -178,7 +178,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
SubMenuPdfBrowserChoice
->
Append
(
item
);
SubMenuPdfBrowserChoice
->
AppendSeparator
();
SubMenuPdfBrowserChoice
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
!
EDA_Appl
->
m_PdfBrowserIsDefault
);
!
g_
EDA_Appl
->
m_PdfBrowserIsDefault
);
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_PREFERED_PDF_BROWSER_NAME
,
_
(
"Select Pdf Viewer"
),
_
(
"Select your favourite PDF viewer used to browse datasheets"
));
item
->
SetBitmap
(
datasheet_xpm
);
...
...
kicad/files-io.cpp
View file @
2a5676b2
...
...
@@ -144,7 +144,7 @@ static void Create_NewPrj_Config( const wxString PrjFullFileName )
g_BoardFileName
=
wxFileNameFromPath
(
PrjFullFileName
);
ChangeFileNameExt
(
g_BoardFileName
,
g_BoardExtBuffer
);
EDA_Appl
->
WriteProjectConfig
(
PrjFullFileName
,
wxT
(
"/general"
),
CfgParamList
);
g_
EDA_Appl
->
WriteProjectConfig
(
PrjFullFileName
,
wxT
(
"/general"
),
CfgParamList
);
}
...
...
kicad/kicad.cpp
View file @
2a5676b2
...
...
@@ -195,7 +195,7 @@ static void py_common_init()
bool
WinEDA_App
::
OnInit
()
{
EDA_Appl
=
this
;
g_
EDA_Appl
=
this
;
InitEDA_Appl
(
wxT
(
"kicad"
));
/* init kicad */
...
...
kicad/preferences.cpp
View file @
2a5676b2
...
...
@@ -28,8 +28,8 @@ wxString mask(wxT("*"));
mask
+=
wxT
(
".exe"
);
#endif
EDA_Appl
->
ReadPdfBrowserInfos
();
wxString
FullFileName
=
EDA_Appl
->
m_PdfBrowser
;
g_
EDA_Appl
->
ReadPdfBrowserInfos
();
wxString
FullFileName
=
g_
EDA_Appl
->
m_PdfBrowser
;
FullFileName
=
EDA_FileSelector
(
_
(
"Prefered Pdf Browser:"
),
wxPathOnly
(
FullFileName
),
/* Default path */
FullFileName
,
/* default filename */
...
...
@@ -39,10 +39,10 @@ mask += wxT(".exe");
wxFD_OPEN
,
/* wxFD_SAVE, wxFD_OPEN ..*/
TRUE
/* true = keep the current path */
);
if
(
!
FullFileName
.
IsEmpty
()
&&
(
EDA_Appl
->
m_PdfBrowser
!=
FullFileName
)
)
if
(
!
FullFileName
.
IsEmpty
()
&&
(
g_
EDA_Appl
->
m_PdfBrowser
!=
FullFileName
)
)
{
EDA_Appl
->
m_PdfBrowser
=
FullFileName
;
EDA_Appl
->
WritePdfBrowserInfos
();
g_
EDA_Appl
->
m_PdfBrowser
=
FullFileName
;
g_
EDA_Appl
->
WritePdfBrowserInfos
();
return
TRUE
;
}
return
FALSE
;
...
...
@@ -62,31 +62,31 @@ mask += wxT(".exe");
switch
(
id
)
{
case
ID_SELECT_DEFAULT_PDF_BROWSER
:
EDA_Appl
->
m_PdfBrowserIsDefault
=
TRUE
;
GetMenuBar
()
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
EDA_Appl
->
m_PdfBrowserIsDefault
);
GetMenuBar
()
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
!
EDA_Appl
->
m_PdfBrowserIsDefault
);
EDA_Appl
->
WritePdfBrowserInfos
();
g_
EDA_Appl
->
m_PdfBrowserIsDefault
=
TRUE
;
GetMenuBar
()
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
g_
EDA_Appl
->
m_PdfBrowserIsDefault
);
GetMenuBar
()
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
!
g_
EDA_Appl
->
m_PdfBrowserIsDefault
);
g_
EDA_Appl
->
WritePdfBrowserInfos
();
break
;
case
ID_SELECT_PREFERED_PDF_BROWSER
:
if
(
EDA_Appl
->
m_PdfBrowser
.
IsEmpty
()
)
if
(
g_
EDA_Appl
->
m_PdfBrowser
.
IsEmpty
()
)
{
DisplayError
(
this
,
_
(
"You must choose a PDF viewer before use this option"
));
ChoosePdfBrowser
(
this
);
}
if
(
EDA_Appl
->
m_PdfBrowser
.
IsEmpty
()
)
if
(
g_
EDA_Appl
->
m_PdfBrowser
.
IsEmpty
()
)
{
EDA_Appl
->
m_PdfBrowserIsDefault
=
TRUE
;
g_
EDA_Appl
->
m_PdfBrowserIsDefault
=
TRUE
;
GetMenuBar
()
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
TRUE
);
GetMenuBar
()
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
FALSE
);
}
else
{
EDA_Appl
->
m_PdfBrowserIsDefault
=
FALSE
;
g_
EDA_Appl
->
m_PdfBrowserIsDefault
=
FALSE
;
GetMenuBar
()
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
FALSE
);
GetMenuBar
()
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
TRUE
);
}
EDA_Appl
->
WritePdfBrowserInfos
();
g_
EDA_Appl
->
WritePdfBrowserInfos
();
break
;
case
ID_SELECT_PREFERED_PDF_BROWSER_NAME
:
...
...
@@ -103,10 +103,10 @@ mask += wxT(".exe");
wxFD_OPEN
,
/* wxFD_SAVE, wxFD_OPEN ..*/
TRUE
/* true = keep the current path */
);
if
(
(
!
FullFileName
.
IsEmpty
()
)
&&
EDA_Appl
->
m_EDA_CommonConfig
)
if
(
(
!
FullFileName
.
IsEmpty
()
)
&&
g_
EDA_Appl
->
m_EDA_CommonConfig
)
{
g_EditorName
=
FullFileName
;
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"Editor"
),
g_EditorName
);
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"Editor"
),
g_EditorName
);
}
break
;
...
...
kicad/prjconfig.cpp
View file @
2a5676b2
...
...
@@ -66,7 +66,7 @@ wxString mask( wxT("*"));
if
(
FullFileName
.
IsEmpty
()
)
return
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
wxT
(
"/general"
),
CfgParamList
);
g_
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
wxT
(
"/general"
),
CfgParamList
);
}
// vim: set tabstop=4 : noexpandtab :
pcbnew/block_module_editor.cpp
View file @
2a5676b2
...
...
@@ -295,7 +295,7 @@ static void DrawMovingBlockOutlines( WinEDA_DrawPanel* panel, wxDC* DC,
BASE_SCREEN
*
screen
=
panel
->
m_Parent
->
GetScreen
();
EDA_BaseStruct
*
item
;
wxPoint
move_offset
;
MODULE
*
Currentmodule
=
EDA_Appl
->
m_ModuleEditFrame
->
m_Pcb
->
m_Modules
;
MODULE
*
Currentmodule
=
g_
EDA_Appl
->
m_ModuleEditFrame
->
m_Pcb
->
m_Modules
;
PtBlock
=
&
panel
->
GetScreen
()
->
BlockLocate
;
GRSetDrawMode
(
DC
,
g_XorMode
);
...
...
pcbnew/c
ursors
.cpp
→
pcbnew/c
lass_marker
.cpp
View file @
2a5676b2
/****************************************************************/
/*
Routines generales d'affichage des curseurs et des marqueurs
*/
/****************************************************************/
/****************************************************************
*************
/
/*
Functions to handle markers used to show somthing (usually a drc problem)
*/
/****************************************************************
*************
/
/* fi
chier curseurs
.cpp */
/* fi
le class_marker
.cpp */
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
#include "class_marker.h"
/* Routines Locales : */
/*
Forme (bit_map) du marqueur
*/
/*
Default bitmap shape for markers
*/
static
char
Default_MarkerBitmap
[]
=
{
12
,
12
,
/*
Dimensions x et y du dessin de marqueurs
*/
12
,
12
,
/*
x and y sise of the bitmap
*/
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
/* bitmap: 1 = color, 0 = notrace */
1
,
1
,
1
,
0
,
1
,
0
,
1
,
1
,
0
,
0
,
0
,
0
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
...
...
@@ -33,6 +34,96 @@ static char Default_MarkerBitmap[] =
};
/*******************/
/* Classe MARQUEUR */
/*******************/
MARQUEUR
::
MARQUEUR
(
BOARD_ITEM
*
StructFather
)
:
BOARD_ITEM
(
StructFather
,
TYPEMARQUEUR
)
{
m_Bitmap
=
NULL
;
m_Type
=
0
;
m_Color
=
RED
;
m_Bitmap
=
Default_MarkerBitmap
;
m_Size
.
x
=
Default_MarkerBitmap
[
0
];
m_Size
.
y
=
Default_MarkerBitmap
[
1
];
}
/* Effacement memoire de la structure */
MARQUEUR
::
~
MARQUEUR
()
{
}
/* supprime du chainage la structure Struct
* les structures arrieres et avant sont chainees directement
*/
void
MARQUEUR
::
UnLink
()
{
/* Modification du chainage arriere */
if
(
Pback
)
{
if
(
Pback
->
Type
()
!=
TYPEPCB
)
{
Pback
->
Pnext
=
Pnext
;
}
else
/* Le chainage arriere pointe sur la structure "Pere" */
{
(
(
BOARD
*
)
Pback
)
->
m_Drawings
=
(
BOARD_ITEM
*
)
Pnext
;
}
}
/* Modification du chainage avant */
if
(
Pnext
)
Pnext
->
Pback
=
Pback
;
Pnext
=
Pback
=
NULL
;
}
void
MARQUEUR
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
{
int
text_pos
;
frame
->
MsgPanel
->
EraseMsgBox
();
text_pos
=
1
;
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Type"
),
_
(
"Marker"
),
DARKCYAN
);
text_pos
=
12
;
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Marker Error Text"
),
m_Diag
,
RED
);
}
/**********************************************/
bool
MARQUEUR
::
HitTest
(
const
wxPoint
&
refPos
)
/**********************************************/
{
// the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
// as zoom changes, the effective real size (in user units) of the MARKER changes.
wxSize
TrueSize
=
m_Size
;
if
(
ActiveScreen
)
{
TrueSize
.
x
*=
ActiveScreen
->
GetZoom
();
TrueSize
.
y
*=
ActiveScreen
->
GetZoom
();
}
int
dx
=
refPos
.
x
-
m_Pos
.
x
;
int
dy
=
refPos
.
y
-
m_Pos
.
y
;
/* is refPos in the box: Marker size to right an bottom,
or size/2 to left or top */
if
(
dx
<=
TrueSize
.
x
&&
dy
<=
TrueSize
.
y
&&
dx
>=
-
TrueSize
.
x
/
2
&&
dy
>=
-
TrueSize
.
y
/
2
)
return
true
;
else
return
false
;
}
/**********************************************************************/
void
MARQUEUR
::
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
)
/**********************************************************************/
...
...
@@ -46,25 +137,24 @@ void MARQUEUR::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int DrawMode )
*/
{
int
px
,
py
;
int
ii
,
ii_max
,
jj
,
jj_max
;
int
ii
,
jj
;
char
*
pt_bitmap
=
m_Bitmap
;
if
(
pt_bitmap
==
NULL
)
pt_bitmap
=
Default_MarkerBitmap
;
if
(
pt_bitmap
==
NULL
)
return
;
GRSetDrawMode
(
DC
,
DrawMode
);
px
=
GRMapX
(
m_Pos
.
x
);
py
=
GRMapY
(
m_Pos
.
y
);
/*
Lecture des dimensions
*/
ii_ma
x
=
*
(
pt_bitmap
++
);
jj_max
=
*
(
pt_bitmap
++
);
/*
Get the bitmap size
*/
m_Size
.
x
=
*
(
pt_bitmap
++
);
m_Size
.
y
=
*
(
pt_bitmap
++
);
/*
Trace du
bitmap */
for
(
ii
=
0
;
ii
<
ii_ma
x
;
ii
++
)
/*
Draw the
bitmap */
for
(
ii
=
0
;
ii
<
m_Size
.
x
;
ii
++
)
{
for
(
jj
=
0
;
jj
<
jj_max
;
jj
++
,
pt_bitmap
++
)
for
(
jj
=
0
;
jj
<
m_Size
.
y
;
jj
++
,
pt_bitmap
++
)
{
if
(
*
pt_bitmap
)
GRSPutPixel
(
&
panel
->
m_ClipBox
,
DC
,
...
...
pcbnew/class_marker.h
0 → 100644
View file @
2a5676b2
/***************************************/
/* Markers: used to show a drc problem */
/***************************************/
#ifndef CLASS_MARKER_H
#define CLASS_MARKER_H
#include "base_struct.h"
class
MARQUEUR
:
public
BOARD_ITEM
{
public
:
wxPoint
m_Pos
;
char
*
m_Bitmap
;
/* Shape (bitmap) */
int
m_Type
;
int
m_Color
;
/* color */
wxString
m_Diag
;
/* Associated text (comment) */
wxSize
m_Size
;
/* Size of the graphic symbol */
public
:
MARQUEUR
(
BOARD_ITEM
*
StructFather
);
~
MARQUEUR
();
void
UnLink
();
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
int
DrawMode
);
/**
* Function Display_Infos
* has knowledge about the frame and how and where to put status information
* about this object into the frame's message panel.
* @param frame A WinEDA_DrawFrame in which to print status information.
*/
void
Display_Infos
(
WinEDA_DrawFrame
*
frame
);
/**
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param ref_pos A wxPoint to test
* @return bool - true if a hit, else false
*/
bool
HitTest
(
const
wxPoint
&
ref_pos
);
};
#endif // end #ifndef CLASS_MARKER_H
pcbnew/classpcb.cpp
View file @
2a5676b2
...
...
@@ -258,87 +258,6 @@ bool DRAWSEGMENT::HitTest( const wxPoint& ref_pos )
/*******************/
/* Classe MARQUEUR */
/*******************/
MARQUEUR
::
MARQUEUR
(
BOARD_ITEM
*
StructFather
)
:
BOARD_ITEM
(
StructFather
,
TYPEMARQUEUR
)
{
m_Bitmap
=
NULL
;
m_Type
=
0
;
m_Color
=
RED
;
}
/* Effacement memoire de la structure */
MARQUEUR
::
~
MARQUEUR
()
{
}
/* supprime du chainage la structure Struct
* les structures arrieres et avant sont chainees directement
*/
void
MARQUEUR
::
UnLink
()
{
/* Modification du chainage arriere */
if
(
Pback
)
{
if
(
Pback
->
Type
()
!=
TYPEPCB
)
{
Pback
->
Pnext
=
Pnext
;
}
else
/* Le chainage arriere pointe sur la structure "Pere" */
{
(
(
BOARD
*
)
Pback
)
->
m_Drawings
=
(
BOARD_ITEM
*
)
Pnext
;
}
}
/* Modification du chainage avant */
if
(
Pnext
)
Pnext
->
Pback
=
Pback
;
Pnext
=
Pback
=
NULL
;
}
void
MARQUEUR
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
{
int
text_pos
;
frame
->
MsgPanel
->
EraseMsgBox
();
text_pos
=
1
;
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Type"
),
_
(
"Marker"
),
DARKCYAN
);
text_pos
=
12
;
Affiche_1_Parametre
(
frame
,
text_pos
,
_
(
"Marker Error Text"
),
m_Diag
,
RED
);
}
bool
MARQUEUR
::
HitTest
(
const
wxPoint
&
refPos
)
{
// the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
// as zoom changes, the effective real size of the MARKER changes.
// @todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
const
int
halfSize
=
6
;
int
xCenter
=
m_Pos
.
x
+
halfSize
;
int
yCenter
=
m_Pos
.
y
+
halfSize
;
int
dx
=
refPos
.
x
-
xCenter
;
int
dy
=
refPos
.
y
-
yCenter
;
if
(
ABS
(
dx
)
<=
halfSize
&&
ABS
(
dy
)
<=
halfSize
)
return
true
;
else
return
false
;
}
/**************************************************/
/* Class SCREEN: classe de gestion d'un affichage */
/***************************************************/
...
...
pcbnew/cross-probing.cpp
View file @
2a5676b2
...
...
@@ -33,7 +33,7 @@ void RemoteCommand( const char* cmdline )
char
*
idcmd
;
char
*
text
;
MODULE
*
module
=
0
;
WinEDA_PcbFrame
*
frame
=
EDA_Appl
->
m_PcbFrame
;
WinEDA_PcbFrame
*
frame
=
g_
EDA_Appl
->
m_PcbFrame
;
strncpy
(
line
,
cmdline
,
sizeof
(
line
)
-
1
);
...
...
pcbnew/dialog_setup_libs.cpp
View file @
2a5676b2
...
...
@@ -94,11 +94,11 @@ wxString title;
Create
(
parent
,
id
,
caption
,
pos
,
size
,
style
);
title
=
_
(
"from "
)
+
EDA_Appl
->
m_CurrentOptionFile
;
title
=
_
(
"from "
)
+
g_
EDA_Appl
->
m_CurrentOptionFile
;
SetTitle
(
title
);
m_ListLibr
->
InsertItems
(
g_LibName_List
,
0
);
wxString
DocModuleFileName
=
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
wxT
(
"pcbnew/footprints.pdf"
));
m_TextHelpModulesFileName
->
SetValue
(
DocModuleFileName
);
}
...
...
@@ -318,7 +318,7 @@ void KiConfigPcbnewFrame::SetNewOptions()
/********************************************/
{
g_UserLibDirBuffer
=
m_TextLibDir
->
GetValue
();
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"module_doc_file"
),
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Write
(
wxT
(
"module_doc_file"
),
m_TextHelpModulesFileName
->
GetValue
());
SetRealLibraryPath
(
wxT
(
"modules"
)
);
}
...
...
pcbnew/edit.cpp
View file @
2a5676b2
...
...
@@ -864,7 +864,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_DISPLAY_FOOTPRINT_DOC
:
{
wxString
msg
=
FindKicadHelpPath
();
msg
+=
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
msg
+=
g_
EDA_Appl
->
m_EDA_CommonConfig
->
Read
(
wxT
(
"module_doc_file"
),
wxT
(
"pcbnew/footprints.pdf"
)
);
GetAssociatedDocument
(
this
,
wxEmptyString
,
msg
);
}
...
...
pcbnew/makefile.include
View file @
2a5676b2
...
...
@@ -16,7 +16,7 @@ OBJECTS= $(TARGET).o classpcb.o\
cross-probing.o
\
via_edit.o
\
wxprint.o
\
c
ursors
.o
\
c
lass_marker
.o
\
menubarpcb.o
\
menubarmodedit.o
\
tool_onrightclick.o
\
...
...
pcbnew/pcbcfg.cpp
View file @
2a5676b2
...
...
@@ -152,7 +152,7 @@ int ii;
/* Init des valeurs par defaut */
g_LibName_List
.
Clear
();
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
g_
EDA_Appl
->
ReadProjectConfig
(
FullFileName
,
GROUP
,
ParamCfgList
,
FALSE
);
/* Traitement des variables particulieres: */
...
...
@@ -203,7 +203,7 @@ wxString mask;
Pcbdiv_grille
=
GetScreen
()
->
m_Diviseur_Grille
;
/* ecriture de la configuration */
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
wxT
(
"/pcbnew"
),
ParamCfgList
);
g_
EDA_Appl
->
WriteProjectConfig
(
FullFileName
,
wxT
(
"/pcbnew"
),
ParamCfgList
);
}
pcbnew/pcbnew.cpp
View file @
2a5676b2
...
...
@@ -34,7 +34,7 @@ bool WinEDA_App::OnInit()
{
wxString
FFileName
;
EDA_Appl
=
this
;
g_
EDA_Appl
=
this
;
InitEDA_Appl
(
wxT
(
"pcbnew"
)
);
if
(
m_Checker
&&
m_Checker
->
IsAnotherRunning
()
)
...
...
share/drawframe.cpp
View file @
2a5676b2
...
...
@@ -328,6 +328,14 @@ void WinEDA_DrawFrame::OnSelectZoom( wxCommandEvent& event ) // fonction virtue
}
}
/***********************************/
int
WinEDA_DrawFrame
::
GetZoom
(
void
)
/***********************************/
/* Return the current zoom level */
{
return
m_CurrentScreen
->
GetZoom
();
}
/********************************************************/
void
WinEDA_DrawFrame
::
OnMouseEvent
(
wxMouseEvent
&
event
)
...
...
todo.txt
View file @
2a5676b2
...
...
@@ -57,11 +57,6 @@ can now identify a marker. To see where the user gets a menu to delete a marker
void WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
*** fix MARQUEUR::HitTest():
the MARKER is 12 pixels by 12 pixels, but is not resized with zoom, so
as zoom changes, the effective real size of the MARKER changes.
@todo: compensate for the zoom. right now it is difficult to select marker when zoomed out.
*** Add tooltip text to all non-obvious controls in every dialog window.
Need to do this using DialogBlocks.
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