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
d5f2f586
Commit
d5f2f586
authored
Dec 20, 2010
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
325a13a7
597f6775
Changes
54
Show whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
1377 additions
and
587 deletions
+1377
-587
CHANGELOG.txt
CHANGELOG.txt
+7
-0
basicframe.cpp
common/basicframe.cpp
+3
-5
build_version.cpp
common/build_version.cpp
+1
-1
common_plot_functions.cpp
common/common_plot_functions.cpp
+7
-6
drawpanel.cpp
common/drawpanel.cpp
+10
-2
edaappl.cpp
common/edaappl.cpp
+8
-10
zoom.cpp
common/zoom.cpp
+1
-1
CMakeLists.txt
cvpcb/CMakeLists.txt
+1
-1
menubar.cpp
cvpcb/menubar.cpp
+21
-10
dialog_color_config.cpp
eeschema/dialogs/dialog_color_config.cpp
+2
-0
eeschema_config.cpp
eeschema/eeschema_config.cpp
+13
-10
libeditframe.cpp
eeschema/libeditframe.cpp
+3
-0
menubar.cpp
eeschema/menubar.cpp
+38
-50
menubar_libedit.cpp
eeschema/menubar_libedit.cpp
+46
-65
sch_items.cpp
eeschema/sch_items.cpp
+3
-3
CMakeLists.txt
gerbview/CMakeLists.txt
+1
-0
class_DCodeSelectionbox.cpp
gerbview/class_DCodeSelectionbox.cpp
+64
-0
class_DCodeSelectionbox.h
gerbview/class_DCodeSelectionbox.h
+34
-0
class_aperture_macro.h
gerbview/class_aperture_macro.h
+1
-0
class_gerber_draw_item.cpp
gerbview/class_gerber_draw_item.cpp
+9
-9
class_gerber_draw_item.h
gerbview/class_gerber_draw_item.h
+5
-5
class_gerbview_layer_widget.cpp
gerbview/class_gerbview_layer_widget.cpp
+1
-1
class_gerbview_layer_widget.h
gerbview/class_gerbview_layer_widget.h
+2
-0
dcode.cpp
gerbview/dcode.cpp
+3
-3
dcode.h
gerbview/dcode.h
+2
-2
dialog_gerber_config.cpp
gerbview/dialogs/dialog_gerber_config.cpp
+2
-2
gerbview_dialog_display_options_frame.cpp
gerbview/dialogs/gerbview_dialog_display_options_frame.cpp
+1
-1
draw_gerber_screen.cpp
gerbview/draw_gerber_screen.cpp
+5
-2
edit.cpp
gerbview/edit.cpp
+8
-9
files.cpp
gerbview/files.cpp
+9
-15
gerberframe.cpp
gerbview/gerberframe.cpp
+140
-129
gerbview.cpp
gerbview/gerbview.cpp
+0
-1
menubar.cpp
gerbview/menubar.cpp
+15
-11
rs274d.cpp
gerbview/rs274d.cpp
+14
-13
rs274x.cpp
gerbview/rs274x.cpp
+1
-1
toolbars_gerber.cpp
gerbview/toolbars_gerber.cpp
+21
-34
wxGerberFrame.h
gerbview/wxGerberFrame.h
+117
-107
vms.hpp
include/boost/config/platform/vms.hpp
+25
-0
add_lvalue_reference.hpp
include/boost/type_traits/add_lvalue_reference.hpp
+26
-0
add_rvalue_reference.hpp
include/boost/type_traits/add_rvalue_reference.hpp
+67
-0
common_type.hpp
include/boost/type_traits/common_type.hpp
+153
-0
conditional.hpp
include/boost/type_traits/conditional.hpp
+25
-0
common_type_imp.hpp
include/boost/type_traits/detail/common_type_imp.hpp
+302
-0
unsupported.hpp
include/boost/typeof/unsupported.hpp
+29
-0
declval.hpp
include/boost/utility/declval.hpp
+44
-0
class_drawpanel.h
include/class_drawpanel.h
+3
-0
kicad.cpp
kicad/kicad.cpp
+0
-2
menubar.cpp
kicad/menubar.cpp
+36
-48
preferences.cpp
kicad/preferences.cpp
+1
-7
install.nsi
packaging/windows/nsis/install.nsi
+1
-1
menubar_modedit.cpp
pcbnew/menubar_modedit.cpp
+16
-5
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+17
-10
printout_controler.cpp
pcbnew/printout_controler.cpp
+11
-3
version.txt
version.txt
+2
-2
No files found.
CHANGELOG.txt
View file @
d5f2f586
...
...
@@ -4,6 +4,13 @@ KiCad ChangeLog 2010
Please add newer entries at the top, list the date and your name with
email address.
2010-Dec-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++new:
Completed a good portion of /new class DIR_LIB_SOURCE.
Added an autonomous CMakeLists.txt file to /new, with new-docs target and
test program target.
2010-dec-15, UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
Gerbview:
...
...
common/basicframe.cpp
View file @
d5f2f586
...
...
@@ -93,11 +93,9 @@ void WinEDA_BasicFrame::SetLanguage( wxCommandEvent& event )
int
id
=
event
.
GetId
();
wxGetApp
().
SetLanguageIdentifier
(
id
);
if
(
wxGetApp
().
SetLanguage
()
)
{
wxGetApp
().
SetLanguage
();
ReCreateMenuBar
();
Refresh
();
}
GetMenuBar
()
->
Refresh
();
}
...
...
common/build_version.cpp
View file @
d5f2f586
...
...
@@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2010-12-1
0
BZR 26xx)"
#define KICAD_BUILD_VERSION "(2010-12-1
8
BZR 26xx)"
#endif
//#define VERSION_STABILITY "stable"
...
...
common/common_plot_functions.cpp
View file @
d5f2f586
...
...
@@ -22,7 +22,7 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
{
#define WSTEXTSIZE 50 // Text size in mils
Ki_PageDescr
*
Sheet
=
screen
->
m_CurrentSheetDesc
;
int
xg
,
yg
,
ipas
,
gxpas
,
gypas
;
int
xg
,
yg
;
wxSize
PageSize
;
wxPoint
pos
,
ref
;
EDA_Colors
color
;
...
...
@@ -36,10 +36,11 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
wxSize
text_size2
;
wxSize
text_size3
;
wxSize
text_size1_5
;
#e
ndif
#e
lse
int
UpperLimit
=
VARIABLE_BLOCK_START_POSITION
;
bool
italic
=
false
;
bool
bold
=
false
;
#endif
bool
italic
=
false
;
bool
thickness
=
0
;
//@todo : use current pen
color
=
BLACK
;
...
...
@@ -150,8 +151,8 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
#else
/* Plot legend along the X axis. */
ipas
=
(
xg
-
ref
.
x
)
/
PAS_REF
;
gxpas
=
(
xg
-
ref
.
x
)
/
ipas
;
i
nt
i
pas
=
(
xg
-
ref
.
x
)
/
PAS_REF
;
int
gxpas
=
(
xg
-
ref
.
x
)
/
ipas
;
for
(
int
ii
=
ref
.
x
+
gxpas
,
jj
=
1
;
ipas
>
0
;
ii
+=
gxpas
,
jj
++
,
ipas
--
)
{
msg
.
Empty
();
...
...
@@ -193,7 +194,7 @@ void WinEDA_DrawFrame::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
/* Plot legend along the Y axis. */
ipas
=
(
yg
-
ref
.
y
)
/
PAS_REF
;
gypas
=
(
yg
-
ref
.
y
)
/
ipas
;
int
gypas
=
(
yg
-
ref
.
y
)
/
ipas
;
for
(
int
ii
=
ref
.
y
+
gypas
,
jj
=
0
;
ipas
>
0
;
ii
+=
gypas
,
jj
++
,
ipas
--
)
{
if
(
jj
<
26
)
...
...
common/drawpanel.cpp
View file @
d5f2f586
...
...
@@ -79,6 +79,7 @@ WinEDA_DrawPanel::WinEDA_DrawPanel( WinEDA_DrawFrame* parent, int id,
m_AbortEnable
=
m_AbortRequest
=
false
;
m_AutoPAN_Enable
=
TRUE
;
m_IgnoreMouseEvents
=
0
;
m_DisableEraseBG
=
false
;
ManageCurseur
=
NULL
;
ForceCloseManageCurseur
=
NULL
;
...
...
@@ -673,7 +674,7 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event )
// call ~wxDCClipper() before ~wxPaintDC()
{
wxDCClipper
dcclip
(
paintDC
,
PaintClipBox
);
ReDraw
(
&
paintDC
,
true
);
ReDraw
(
&
paintDC
,
m_DisableEraseBG
?
false
:
true
);
}
m_ClipBox
=
tmp
;
...
...
@@ -914,6 +915,13 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
tmpDC
.
DrawPoint
(
0
,
ypos
);
}
// Use the layer bitmap itself as a mask when blitting.
// The bitmap cannot be referenced by a device context
// when setting the mask.
tmpDC
.
SelectObject
(
wxNullBitmap
);
tmpBM
.
SetMask
(
new
wxMask
(
tmpBM
,
MakeColour
(
g_DrawBgColor
)
)
);
tmpDC
.
SelectObject
(
tmpBM
);
ypos
=
GRMapY
(
org
.
y
);
for
(
ii
=
0
;
;
ii
+=
increment
)
{
...
...
@@ -925,7 +933,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
continue
;
if
(
xpos
>
m_ClipBox
.
GetEnd
().
x
)
// end of active area reached.
break
;
DC
->
Blit
(
xpos
,
ypos
,
1
,
screenSize
.
y
,
&
tmpDC
,
0
,
0
);
DC
->
Blit
(
xpos
,
ypos
,
1
,
screenSize
.
y
,
&
tmpDC
,
0
,
0
,
wxCOPY
,
true
);
}
#endif
...
...
common/edaappl.cpp
View file @
d5f2f586
...
...
@@ -872,7 +872,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
}
/*
*
/*
GetHelpFile
* Get the help file path.
*
* Return the Kicad help file with path. The base paths defined in
...
...
@@ -880,8 +880,8 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
* be relative depending on the paths added to m_searchPaths. See the
* documentation for wxPathList for more information. If the help file
* for the current locale is not found, an attempt to find the English
* version of the help file is made.
wxEmptyString is returned if the
*
help file is
not found.
* version of the help file is made.
*
wxEmptyString is returned if help file
not found.
* Help file is searched in directories in this order:
* help/<canonical name> like help/en_GB
* help/<short name> like help/en
...
...
@@ -1070,13 +1070,12 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF
}
/*
*
FindLibraryPath
/* FindLibraryPath
* Kicad saves user defined library files that are not in the standard
* library search path list with the full file path. Calling the library
* search path list with a user library file will fail. This helper method
* solves that problem.
* @param fileName
* @return a wxEmptyString if library file is not found.
* return a wxEmptyString if library file is not found.
*/
wxString
WinEDA_App
::
FindLibraryPath
(
const
wxString
&
aFileName
)
{
...
...
@@ -1087,10 +1086,9 @@ wxString WinEDA_App::FindLibraryPath( const wxString& aFileName )
}
/**
* Function RemoveLibraryPath
/* Function RemoveLibraryPath
* Removes the given path(s) from the library path list
*
@param
aPaths = path or path list to remove. paths must be separated by ";"
* aPaths = path or path list to remove. paths must be separated by ";"
*/
void
WinEDA_App
::
RemoveLibraryPath
(
const
wxString
&
aPaths
)
{
...
...
common/zoom.cpp
View file @
d5f2f586
...
...
@@ -37,7 +37,7 @@ void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
* use Refresh() and update() do not change problems
*/
INSTALL_DC
(
dc
,
DrawPanel
);
DrawPanel
->
ReDraw
(
&
dc
);
DrawPanel
->
ReDraw
(
&
dc
,
DrawPanel
->
m_DisableEraseBG
?
false
:
true
);
/* Move the mouse cursor to the on grid graphic cursor position */
if
(
ToMouse
==
TRUE
)
...
...
cvpcb/CMakeLists.txt
View file @
d5f2f586
...
...
@@ -36,7 +36,7 @@ set(CVPCB_SRCS
listboxes.cpp
listlib.cpp
loadcmp.cpp
menu
cfg
.cpp
menu
bar
.cpp
readschematicnetlist.cpp
savecmp.cpp
setvisu.cpp
...
...
cvpcb/menu
cfg
.cpp
→
cvpcb/menu
bar
.cpp
View file @
d5f2f586
/**
* @file
./
menucfg.cpp
* @file menucfg.cpp
* (Re)Create the CvPCB main MenuBar
*/
#include "fctsys.h"
...
...
@@ -18,10 +18,19 @@
void
WinEDA_CvpcbFrame
::
ReCreateMenuBar
()
{
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
;
wxMenuBar
*
menuBar
=
GetMenuBar
()
;
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
wxMenu
*
filesMenu
=
new
wxMenu
;
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open"
),
...
...
@@ -96,14 +105,16 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
#endif
/* !defined(__WXMAC__) */
/**
* Create the menubar and append all submenus
*/
// Create the menubar and append all submenus
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Calling SetMenuBar() will Destroy the existing menu bar so it can be
* rebuilt. This allows language changes of the menu text on the fly. */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
eeschema/dialogs/dialog_color_config.cpp
View file @
d5f2f586
...
...
@@ -45,6 +45,7 @@ static ColorButton SheetColorButtons[] = {
{
_
(
"Sheet"
),
LAYER_SHEET
},
{
_
(
"Sheet file name"
),
LAYER_SHEETFILENAME
},
{
_
(
"Sheet name"
),
LAYER_SHEETNAME
},
{
_
(
"Sheet label"
),
LAYER_SHEETLABEL
},
{
_
(
"Hierarchical label"
),
LAYER_HIERLABEL
},
{
wxT
(
""
),
-
1
}
// Sentinel marking end of list.
};
...
...
@@ -291,6 +292,7 @@ void DIALOG_COLOR_CONFIG::UpdateLayerSettings()
else
g_DrawBgColor
=
BLACK
;
m_Parent
->
SetGridColor
(
g_LayerDescr
.
LayerColor
[
LAYER_GRID
]
);
m_Parent
->
Refresh
();
}
...
...
eeschema/eeschema_config.cpp
View file @
d5f2f586
...
...
@@ -409,8 +409,7 @@ void SCH_EDIT_FRAME::SaveProjectFile( wxWindow* displayframe, bool askoverwrite
if
(
dlg
.
ShowModal
()
==
wxID_CANCEL
)
return
;
wxGetApp
().
WriteProjectConfig
(
dlg
.
GetPath
(),
GROUP
,
GetProjectFileParameters
()
);
wxGetApp
().
WriteProjectConfig
(
dlg
.
GetPath
(),
GROUP
,
GetProjectFileParameters
()
);
}
...
...
@@ -534,6 +533,9 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings( void )
m_configSettings
.
push_back
(
new
PARAM_CFG_SETCOLOR
(
true
,
wxT
(
"ColorErcE"
),
&
g_LayerDescr
.
LayerColor
[
LAYER_ERC_ERR
],
RED
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_SETCOLOR
(
true
,
wxT
(
"ColorGrid"
),
&
g_LayerDescr
.
LayerColor
[
LAYER_GRID
],
DARKGRAY
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PrintMonochrome"
),
&
m_printMonochrome
,
true
)
);
m_configSettings
.
push_back
(
new
PARAM_CFG_BOOL
(
true
,
wxT
(
"PrintSheetReferenceAndTitleBlock"
),
...
...
@@ -558,8 +560,10 @@ void SCH_EDIT_FRAME::LoadSettings()
wxGetApp
().
ReadCurrentSetupValues
(
GetConfigurationSettings
()
);
g_DrawDefaultLineThickness
=
cfg
->
Read
(
DefaultDrawLineWidthEntry
,
(
long
)
6
);
// This is eqired until someone gets rid of the global variable g_LayerDescription().
m_GridColor
=
g_LayerDescr
.
LayerColor
[
LAYER_GRID
];
g_DrawDefaultLineThickness
=
cfg
->
Read
(
DefaultDrawLineWidthEntry
,(
long
)
6
);
cfg
->
Read
(
ShowHiddenPinsEntry
,
&
m_ShowAllPins
,
false
);
cfg
->
Read
(
HorzVertLinesOnlyEntry
,
&
g_HVLines
,
true
);
...
...
@@ -633,8 +637,8 @@ void SCH_EDIT_FRAME::LoadSettings()
catch
(
IO_ERROR
e
)
{
// @todo show error msg
D
(
printf
(
"templatefieldnames parsing error: '%s'
\n
"
,
CONV_TO_UTF8
(
e
.
errorText
)
);
)
D
(
printf
(
"templatefieldnames parsing error: '%s'
\n
"
,
CONV_TO_UTF8
(
e
.
errorText
)
);
)
}
}
...
...
@@ -711,7 +715,6 @@ void SCH_EDIT_FRAME::SaveSettings()
record
.
Replace
(
wxT
(
"
\n
"
),
wxT
(
""
),
true
);
// strip all newlines
record
.
Replace
(
wxT
(
" "
),
wxT
(
" "
),
true
);
// double space to single
cfg
->
Write
(
FieldNamesEntry
,
record
);
}
eeschema/libeditframe.cpp
View file @
d5f2f586
...
...
@@ -958,6 +958,9 @@ void LIB_EDIT_FRAME::SetLanguage( wxCommandEvent& event )
{
WinEDA_BasicFrame
::
SetLanguage
(
event
);
SCH_EDIT_FRAME
*
parent
=
(
SCH_EDIT_FRAME
*
)
GetParent
();
// Call parent->WinEDA_BasicFrame::SetLanguage and NOT
// parent->SetLanguage because parent->SetLanguage call
// LIB_EDIT_FRAME::SetLanguage
parent
->
WinEDA_BasicFrame
::
SetLanguage
(
event
);
}
...
...
eeschema/menubar.cpp
View file @
d5f2f586
...
...
@@ -28,34 +28,34 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
/**
* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly.
*/
if
(
menuBar
)
SetMenuBar
(
NULL
);
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
/**
* File menu
*/
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
// File menu
wxMenu
*
filesMenu
=
new
wxMenu
;
/
* New */
/
/ New
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_PROJECT
,
_
(
"&New
\t
Ctrl+N"
),
_
(
"New schematic project"
)
);
item
->
SetBitmap
(
new_xpm
);
filesMenu
->
Append
(
item
);
/
* Open */
/
/ Open
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open
\t
Ctrl+O"
),
_
(
"Open an existing schematic project"
)
);
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
/
* Open Recent submenu */
/
/ Open Recent submenu
wxMenu
*
openRecentMenu
=
new
wxMenu
();
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
openRecentMenu
,
...
...
@@ -63,11 +63,9 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_
(
"Open a recent opened schematic project"
),
open_project_xpm
);
/* Separator */
filesMenu
->
AppendSeparator
();
/
* Save */
/* Save Project */
/
/ Save schematic
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Whole Schematic Project
\t
Ctrl+S"
),
_
(
"Save all sheets in the schematic project"
)
);
...
...
@@ -79,22 +77,21 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/
* Save as... */
/
/ Save as...
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET_AS
,
_
(
"Save Current Sheet &as"
),
_
(
"Save current schematic sheet as..."
)
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
/* Separator */
filesMenu
->
AppendSeparator
();
/* Print */
// Print
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_PRINT
,
_
(
"P&rint"
),
_
(
"Print schematic"
)
);
item
->
SetBitmap
(
print_button
);
filesMenu
->
Append
(
item
);
/
* Plot submenu */
/
/ Plot submenu
wxMenu
*
choice_plot_fmt
=
new
wxMenu
;
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_PS
,
_
(
"Plot PostScript"
),
...
...
@@ -108,19 +105,19 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
plot_HPG_xpm
);
choice_plot_fmt
->
Append
(
item
);
/
* Plot SVG */
/
/ Plot SVG
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_SVG
,
_
(
"Plot SVG"
),
_
(
"Plot schematic sheet in SVG format"
)
);
item
->
SetBitmap
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
/
* Plot DXF */
/
/ Plot DXF
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_DXF
,
_
(
"Plot DXF"
),
_
(
"Plot schematic sheet in DXF format"
)
);
item
->
SetBitmap
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
/
* Under windows, one can draw to the clipboard */
/
/ Under windows, one can draw to the clipboard
#ifdef __WINDOWS__
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_COPY_SHEET_TO_CLIPBOARD
,
...
...
@@ -128,7 +125,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_
(
"Export drawings to clipboard"
)
);
item
->
SetBitmap
(
copy_button
);
choice_plot_fmt
->
Append
(
item
);
#endif
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
choice_plot_fmt
,
...
...
@@ -136,7 +132,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_
(
"Plot schematic sheet in HPGL, PostScript or SVG format"
),
plot_xpm
);
/
* Quit on all platforms except WXMAC */
/
/ Quit on all platforms except WXMAC
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
...
...
@@ -144,15 +140,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__) */
#endif // !defined( __WXMAC__)
/**
* Edit menu
*/
// Edit menu
wxMenu
*
editMenu
=
new
wxMenu
;
/
* Undo */
/
/ Undo
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
HELP_UNDO
,
wxITEM_NORMAL
);
...
...
@@ -166,10 +159,8 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
editMenu
->
AppendSeparator
();
/* Delete */
editMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_DELETE_ITEM_BUTT
,
_
(
"Delete"
),
HELP_DELETE_ITEMS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
delete_body_xpm
);
...
...
@@ -195,9 +186,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
editMenu
->
Append
(
item
);
/**
* View menu
*/
// View menu
wxMenu
*
viewMenu
=
new
wxMenu
;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
...
...
@@ -378,9 +367,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
placeMenu
->
Append
(
item
);
/**
* Preferences Menu
*/
// Preferences Menu
wxMenu
*
configmenu
=
new
wxMenu
;
/* Library */
...
...
@@ -423,9 +410,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
configmenu
->
Append
(
item
);
/**
* Help Menu
*/
// Help Menu
wxMenu
*
helpMenu
=
new
wxMenu
;
AddHelpVersionInfoMenuEntry
(
helpMenu
);
...
...
@@ -446,9 +431,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
#endif
/* !defined(__WXMAC__) */
/**
* Create the menubar and append all submenus
*/
// Create the menubar and append all submenus
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
editMenu
,
_
(
"&Edit"
)
);
menuBar
->
Append
(
viewMenu
,
_
(
"&View"
)
);
...
...
@@ -456,6 +439,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Associate the menu bar with the frame */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
eeschema/menubar_libedit.cpp
View file @
d5f2f586
...
...
@@ -23,44 +23,44 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
/**
* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly.
*/
if
(
menuBar
)
SetMenuBar
(
NULL
);
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
/**
* File menu
*/
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
// File menu
wxMenu
*
filesMenu
=
new
wxMenu
;
/
* Save current lib */
/
/ Save current lib
item
=
new
wxMenuItem
(
filesMenu
,
ID_LIBEDIT_SAVE_CURRENT_LIB
,
_
(
"&Save Current Library
\t
Ctrl+S"
),
_
(
"Save the current active library"
)
);
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/
* Save as... */
/
/ Save as...
item
=
new
wxMenuItem
(
filesMenu
,
ID_LIBEDIT_SAVE_CURRENT_LIB_AS
,
_
(
"Save Current Library &as"
),
_
(
"Save current active library as..."
)
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
/
* Separator */
/
/ Separator
filesMenu
->
AppendSeparator
();
/
* Export as png file */
/
/ Export as png file
item
=
new
wxMenuItem
(
filesMenu
,
ID_LIBEDIT_GEN_PNG_FILE
,
_
(
"&Create PNG File from Screen"
),
_
(
"Create a PNG file from the component displayed on screen"
)
);
item
->
SetBitmap
(
plot_xpm
);
filesMenu
->
Append
(
item
);
/
* Export as SVG file */
/
/ Export as SVG file
item
=
new
wxMenuItem
(
filesMenu
,
ID_LIBEDIT_GEN_SVG_FILE
,
_
(
"&Create SVG File"
),
_
(
"Create a SVG file from the current loaded component"
)
);
item
->
SetBitmap
(
plot_xpm
);
...
...
@@ -77,19 +77,17 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
filesMenu
->
Append
(
item
);
#endif
/**
* Edit menu
*/
// Edit menu
wxMenu
*
editMenu
=
new
wxMenu
;
/
* Undo */
/
/ Undo
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Libedit_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_UNDO
,
text
,
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
editMenu
->
Append
(
item
);
/
* Redo */
/
/ Redo
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Libedit_Hokeys_Descr
,
HK_REDO
);
item
=
new
wxMenuItem
(
editMenu
,
wxID_REDO
,
text
,
...
...
@@ -97,18 +95,14 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
/
* Separator */
/
/ Delete
editMenu
->
AppendSeparator
();
/* Delete */
item
=
new
wxMenuItem
(
editMenu
,
ID_LIBEDIT_DELETE_ITEM_BUTT
,
_
(
"Delete"
),
HELP_DELETE_ITEMS
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
delete_body_xpm
);
editMenu
->
Append
(
item
);
/**
* View menu
*/
// View menu
wxMenu
*
viewMenu
=
new
wxMenu
;
/* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
...
...
@@ -128,13 +122,13 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
/
* Zoom out */
/
/ Zoom out
text
=
_
(
"Zoom Out"
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
HELP_ZOOM_OUT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
/
* Fit on screen */
/
/ Fit on screen
text
=
AddHotkeyName
(
_
(
"Fit on Screen"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_AUTO
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
HELP_ZOOM_FIT
,
wxITEM_NORMAL
);
...
...
@@ -143,40 +137,37 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
viewMenu
->
AppendSeparator
();
/
* Redraw view */
/
/ Redraw view
text
=
AddHotkeyName
(
_
(
"Redraw"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_REDRAW
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
HELP_ZOOM_REDRAW
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
/**
* Place menu
* TODO: Unify the ID names!
*/
// Place menu
wxMenu
*
placeMenu
=
new
wxMenu
;
/
* Pin */
/
/ place Pin
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_PIN_BUTT
,
_
(
"&Pin"
),
HELP_ADD_PIN
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
pin_xpm
);
placeMenu
->
Append
(
item
);
/
* Graphic text */
/
/ Graphic text
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_BODY_TEXT_BUTT
,
_
(
"Graphic text"
),
HELP_ADD_BODYTEXT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_text_xpm
);
placeMenu
->
Append
(
item
);
/
* Graphic rectangle */
/
/ Graphic rectangle
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_BODY_RECT_BUTT
,
_
(
"Rectangle"
),
HELP_ADD_BODYRECT
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_rectangle_xpm
);
placeMenu
->
Append
(
item
);
/
* Graphic Circle */
/
/ Graphic Circle
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_BODY_CIRCLE_BUTT
,
_
(
"Circle"
),
HELP_ADD_BODYCIRCLE
,
...
...
@@ -184,68 +175,55 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
add_circle_xpm
);
placeMenu
->
Append
(
item
);
/
* Graphic Arc */
/
/ Graphic Arc
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_BODY_ARC_BUTT
,
_
(
"Arc"
),
HELP_ADD_BODYARC
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_arc_xpm
);
placeMenu
->
Append
(
item
);
/
* Graphic line or polygon */
/
/ Graphic line or polygon
item
=
new
wxMenuItem
(
placeMenu
,
ID_LIBEDIT_BODY_LINE_BUTT
,
_
(
"Line or Polygon"
),
HELP_ADD_BODYPOLYGON
,
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_polygon_xpm
);
placeMenu
->
Append
(
item
);
/**
* Preferences Menu
*/
// Preferences Menu
wxMenu
*
configmenu
=
new
wxMenu
;
/
* Library */
/
/ Library
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_REQ
,
_
(
"&Library"
),
_
(
"Library preferences"
)
);
item
->
SetBitmap
(
library_xpm
);
configmenu
->
Append
(
item
);
/
* Colors */
/
/ Colors
item
=
new
wxMenuItem
(
configmenu
,
ID_COLORS_SETUP
,
_
(
"&Colors"
),
_
(
"Color preferences"
)
);
item
->
SetBitmap
(
palette_xpm
);
configmenu
->
Append
(
item
);
#if 0 // work in progress. activated when finished
/* Dimension */
item = new wxMenuItem( configmenu, ID_LIBEDIT_DIMENSIONS, _( "&Dimensions" ),
_( "Thickness of graphic lines, texts sizes and others" ) );
item->SetBitmap( add_dimension_xpm );
configmenu->Append( item );
#endif
/* Language submenu */
// Language submenu
wxGetApp
().
AddMenuLanguageList
(
configmenu
);
/
* Hotkey submenu */
/
/ Hotkey submenu
AddHotkeyConfigMenu
(
configmenu
);
/
* Separator */
/
/ Save preferences
configmenu
->
AppendSeparator
();
/* Save preferences */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save preferences"
),
_
(
"Save application preferences"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
/
* Read preferences */
/
/ Read preferences
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_READ
,
_
(
"&Read preferences"
),
_
(
"Read application preferences"
)
);
item
->
SetBitmap
(
read_setup_xpm
);
configmenu
->
Append
(
item
);
/**
* Help Menu
*/
// Help Menu
wxMenu
*
helpMenu
=
new
wxMenu
;
AddHelpVersionInfoMenuEntry
(
helpMenu
);
...
...
@@ -255,9 +233,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
item
->
SetBitmap
(
online_help_xpm
);
helpMenu
->
Append
(
item
);
/**
* Create the menubar and append all submenus
*/
// Create the menubar and append all submenus
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
editMenu
,
_
(
"&Edit"
)
);
menuBar
->
Append
(
viewMenu
,
_
(
"&View"
)
);
...
...
@@ -265,6 +241,11 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Associate the menu bar with the frame */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
eeschema/sch_items.cpp
View file @
d5f2f586
...
...
@@ -1031,9 +1031,9 @@ bool SCH_LINE::DoHitTest( const wxPoint& aPoint, int aAccuracy, SCH_FILTER_T aFi
||
(
(
aFilter
&
WIRE_T
)
&&
(
m_Layer
==
LAYER_WIRE
)
)
||
(
(
aFilter
&
BUS_T
)
&&
(
m_Layer
==
LAYER_BUS
)
)
)
{
if
(
aFilter
&
EXCLUDE_WIRE_BUS_ENDPOINTS
&&
IsEndPoint
(
aPoint
)
||
aFilter
&
WIRE_BUS_ENDPOINTS_ONLY
&&
!
IsEndPoint
(
aPoint
)
||
TestSegmentHit
(
aPoint
,
m_Start
,
m_End
,
aAccuracy
)
)
if
(
(
aFilter
&
EXCLUDE_WIRE_BUS_ENDPOINTS
&&
IsEndPoint
(
aPoint
)
)
||
(
aFilter
&
WIRE_BUS_ENDPOINTS_ONLY
&&
!
IsEndPoint
(
aPoint
)
)
||
(
TestSegmentHit
(
aPoint
,
m_Start
,
m_End
,
aAccuracy
)
)
)
return
true
;
}
...
...
gerbview/CMakeLists.txt
View file @
d5f2f586
...
...
@@ -25,6 +25,7 @@ set(GERBVIEW_SRCS
block.cpp
class_am_param.cpp
class_aperture_macro.cpp
class_DCodeSelectionbox.cpp
class_GERBER.cpp
class_gerber_draw_item.cpp
class_gerbview_layer_widget.cpp
...
...
gerbview/class_DCodeSelectionbox.cpp
0 → 100644
View file @
d5f2f586
/*****************************************************************/
/* class_DCodeSelectionbox.cpp: class for displaying DCodes list */
/*****************************************************************/
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "wxstruct.h"
#include "common.h"
#include "class_drawpanel.h"
#include "gerbview.h"
#include "class_DCodeSelectionbox.h"
/*******************************************/
/* Helper class for displaying DCodes list */
/*******************************************/
DCODE_SELECTION_BOX
::
DCODE_SELECTION_BOX
(
WinEDA_Toolbar
*
aParent
,
wxWindowID
aId
,
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
,
const
wxArrayString
&
aChoices
)
:
wxComboBox
(
aParent
,
aId
,
wxEmptyString
,
aLocation
,
aSize
,
0
,
NULL
,
wxCB_READONLY
)
{
m_dcodeList
=
&
aChoices
;
// Append aChoices here is by far faster than use aChoices inside
// the wxComboBox constructor
Append
(
aChoices
);
}
DCODE_SELECTION_BOX
::~
DCODE_SELECTION_BOX
()
{
}
int
DCODE_SELECTION_BOX
::
GetSelectedDCodeId
()
{
int
ii
=
GetSelection
();
if
(
ii
>
0
)
{
wxString
msg
=
(
*
m_dcodeList
)[
ii
].
AfterFirst
(
wxChar
(
' '
)
);
long
id
;
msg
.
ToLong
(
&
id
);
return
id
;
}
return
-
1
;
}
/* SetDCodeSelection
* aDCodeId = the DCode Id to select or -1 to select "no dcode"
*/
void
DCODE_SELECTION_BOX
::
SetDCodeSelection
(
int
aDCodeId
)
{
if
(
aDCodeId
>
LAST_DCODE
)
aDCodeId
=
LAST_DCODE
;
int
index
=
0
;
if
(
aDCodeId
>=
FIRST_DCODE
)
index
=
aDCodeId
-
FIRST_DCODE
+
1
;
SetSelection
(
index
);
}
gerbview/class_DCodeSelectionbox.h
0 → 100644
View file @
d5f2f586
// file class_DCodeSelectionbox.h
#ifndef CLASS_DCODESELECTIONBOX_H
#define CLASS_DCODESELECTIONBOX_H
/* helper class to display a DCode list and select a DCode id.
*/
// Define event type for DCODE_SELECTION_BOX
#define EVT_SELECT_DCODE EVT_COMBOBOX
class
DCODE_SELECTION_BOX
:
public
wxComboBox
{
private
:
const
wxArrayString
*
m_dcodeList
;
public
:
DCODE_SELECTION_BOX
(
WinEDA_Toolbar
*
aParent
,
wxWindowID
aId
,
const
wxPoint
&
aLocation
,
const
wxSize
&
aSize
,
const
wxArrayString
&
aChoices
);
~
DCODE_SELECTION_BOX
();
/**
* Function GetSelectedDCodeId
* @return the current selected DCode Id or -1 if no dcode
*/
int
GetSelectedDCodeId
();
/**
* Function SetDCodeSelection
* @param aDCodeId = the DCode Id to select or -1 to select "no dcode"
*/
void
SetDCodeSelection
(
int
aDCodeId
);
};
#endif //CLASS_DCODESELECTIONBOX_H
gerbview/class_aperture_macro.h
View file @
d5f2f586
...
...
@@ -189,6 +189,7 @@ struct APERTURE_MACRO
* But some parameters are defined outside the aperture primitive
* and are local to the aperture macro
* @return the value of a defered parameter defined inside the aperture macro
* @param aDcode = the D_CODE that uses this apertur macro and define defered parameters
* @param aParamId = the param id (defined by $3 or $5 ..) to evaluate
*/
double
GetLocalParam
(
const
D_CODE
*
aDcode
,
unsigned
aParamId
)
const
;
...
...
gerbview/class_gerber_draw_item.cpp
View file @
d5f2f586
...
...
@@ -271,7 +271,7 @@ EDA_Rect GERBER_DRAW_ITEM::GetBoundingBox() const
/**
* Function MoveAB
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object, in AB plotter axis.
* @param aMoveVector - the move vector for this object, in AB plotter axis.
*/
void
GERBER_DRAW_ITEM
::
MoveAB
(
const
wxPoint
&
aMoveVector
)
{
...
...
@@ -288,7 +288,7 @@ void GERBER_DRAW_ITEM::MoveAB( const wxPoint& aMoveVector )
/**
* Function MoveXY
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object, in XY gerber axis.
* @param aMoveVector - the move vector for this object, in XY gerber axis.
*/
void
GERBER_DRAW_ITEM
::
MoveXY
(
const
wxPoint
&
aMoveVector
)
{
...
...
@@ -552,7 +552,7 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
}
/*
*
/*
* Function DrawGbrPoly
* a helper function used id ::Draw to draw the polygon stored in m_PolyCorners
* Draw filled polygons
...
...
@@ -661,17 +661,17 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos )
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* For now, an ending point must be inside this rect.
* @param
r
efArea : the given EDA_Rect in AB plotter axis
* @param
aR
efArea : the given EDA_Rect in AB plotter axis
* @return bool - true if a hit, else false
*/
bool
GERBER_DRAW_ITEM
::
HitTest
(
EDA_Rect
&
r
efArea
)
bool
GERBER_DRAW_ITEM
::
HitTest
(
EDA_Rect
&
aR
efArea
)
{
wxPoint
pos
=
GetABPosition
(
m_Start
);
if
(
r
efArea
.
Inside
(
pos
)
)
if
(
aR
efArea
.
Inside
(
pos
)
)
return
true
;
pos
=
GetABPosition
(
m_End
);
if
(
r
efArea
.
Inside
(
pos
)
)
if
(
aR
efArea
.
Inside
(
pos
)
)
return
true
;
return
false
;
}
...
...
gerbview/class_gerber_draw_item.h
View file @
d5f2f586
...
...
@@ -147,14 +147,14 @@ public:
/**
* Function MoveAB
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object.
* @param aMoveVector - the move vector for this object.
*/
void
MoveAB
(
const
wxPoint
&
aMoveVector
);
/**
* Function MoveXY
* move this object.
* @param
const wxPoint&
aMoveVector - the move vector for this object, in XY gerber axis.
* @param aMoveVector - the move vector for this object, in XY gerber axis.
*/
void
MoveXY
(
const
wxPoint
&
aMoveVector
);
...
...
@@ -238,7 +238,7 @@ public:
/**
* Function HitTest
* tests if the given wxPoint is within the bounds of this object.
* @param aRefPos
A
wxPoint to test
* @param aRefPos
a
wxPoint to test
* @return bool - true if a hit, else false
*/
bool
HitTest
(
const
wxPoint
&
aRefPos
);
...
...
@@ -247,7 +247,7 @@ public:
* Function HitTest (overlayed)
* tests if the given wxRect intersect this object.
* For now, an ending point must be inside this rect.
* @param aRef
Pos A
wxPoint to test
* @param aRef
Area a
wxPoint to test
* @return bool - true if a hit, else false
*/
bool
HitTest
(
EDA_Rect
&
aRefArea
);
...
...
gerbview/class_gerbview_layer_widget.cpp
View file @
d5f2f586
...
...
@@ -38,7 +38,7 @@
#include "class_gerbview_layer_widget.h"
/*
*
/*
* Class GERBER_LAYER_WIDGET
* is here to implement the abtract functions of LAYER_WIDGET so they
* may be tied into the WinEDA_GerberFrame's data and so we can add a popup
...
...
gerbview/class_gerbview_layer_widget.h
View file @
d5f2f586
...
...
@@ -63,6 +63,8 @@ public:
/**
* Constructor
* @param aParent : the parent frame
* @param aFocusOwner : the window that has the keyboard focus.
* @param aPointSize is the font point size to use within the widget. This
* effectively sets the overal size of the widget via the row height and bitmap
* button sizes.
...
...
gerbview/dcode.cpp
View file @
d5f2f586
...
...
@@ -136,7 +136,7 @@ int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
}
/*
*
/*
* Function Read_D_Code_File
* Can be useful only with old RS274D Gerber file format.
* Is not needed with RS274X files format.
...
...
@@ -326,7 +326,7 @@ void WinEDA_GerberFrame::CopyDCodesSizeToItems()
}
/*
*
/*
* Function DrawFlashedShape
* Draw the dcode shape for flashed items.
* When an item is flashed, the DCode shape is the shape of the item
...
...
@@ -442,7 +442,7 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
}
/*
*
/*
* Function DrawFlashedPolygon
* a helper function used id ::Draw to draw the polygon stored ion m_PolyCorners
* Draw some Apertures shapes when they are defined as filled polygons.
...
...
gerbview/dcode.h
View file @
d5f2f586
...
...
@@ -164,8 +164,8 @@ public:
* @param aDC = device context
* @param aColor = the normal color to use
* @param aAltColor = the color used to draw with "reverse" exposure mode (used in aperture macros only)
* @param a
Filled = true to draw in filled mode, false to draw in skecth mode
* @param a
Position = the actual shape position
* @param a
ShapePos = the actual shape position
* @param a
FilledShape = true to draw in filled mode, false to draw in skecth mode
*/
void
DrawFlashedShape
(
GERBER_DRAW_ITEM
*
aParent
,
EDA_Rect
*
aClipBox
,
wxDC
*
aDC
,
int
aColor
,
int
aAltColor
,
...
...
gerbview/dialogs/dialog_gerber_config.cpp
View file @
d5f2f586
...
...
@@ -124,7 +124,7 @@ WinEDA_ConfigFrame::WinEDA_ConfigFrame( WinEDA_GerberFrame* parent,
}
void
WinEDA_ConfigFrame
::
OnOkClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_ConfigFrame
::
OnOkClick
(
wxCommandEvent
&
event
)
{
g_DrillFilenameExt
=
TextDrillExt
->
GetValue
();
g_PhotoFilenameExt
=
TextPhotoExt
->
GetValue
();
...
...
@@ -134,7 +134,7 @@ void WinEDA_ConfigFrame::OnOkClick( wxCommandEvent& WXUNUSED (event) )
}
void
WinEDA_ConfigFrame
::
OnCancelClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
WinEDA_ConfigFrame
::
OnCancelClick
(
wxCommandEvent
&
event
)
{
EndModal
(
-
1
);
}
...
...
gerbview/dialogs/gerbview_dialog_display_options_frame.cpp
View file @
d5f2f586
...
...
@@ -54,7 +54,7 @@ DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( WinEDA_GerberFrame *parent) :
}
void
DIALOG_DISPLAY_OPTIONS
::
OnCancelButtonClick
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
DIALOG_DISPLAY_OPTIONS
::
OnCancelButtonClick
(
wxCommandEvent
&
event
)
{
EndModal
(
0
);
}
...
...
gerbview/draw_gerber_screen.cpp
View file @
d5f2f586
...
...
@@ -80,6 +80,8 @@ void WinEDA_GerberFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
if
(
!
GetBoard
()
)
return
;
wxBusyCursor
dummy
;
ActiveScreen
=
screen
;
GRSetDrawMode
(
DC
,
GR_COPY
);
...
...
@@ -124,9 +126,10 @@ void WinEDA_GerberFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
}
/********************************************************************/
/*
* Redraw All gerbview layers, using a buffered mode or not
*/
void
BOARD
::
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
int
aDrawMode
,
const
wxPoint
&
aOffset
)
/********************************************************************/
{
// Because Images can be negative (i.e with background filled in color) items are drawn
// graphic layer per graphic layer, after the background is filled
...
...
gerbview/edit.cpp
View file @
d5f2f586
...
...
@@ -15,7 +15,7 @@
#include "gerbview_id.h"
#include "class_GERBER.h"
#include "dialog_helpers.h"
#include "class_DCodeSelectionbox.h"
/* Process the command triggered by the left button of the mouse when a tool
* is already selected.
...
...
@@ -145,19 +145,18 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_TOOLBARH_GERBVIEW_SELECT_LAYER
:
setActiveLayer
(
m_SelLayerBox
->
GetChoice
());
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
();
break
;
case
ID_TOOLBARH_GERBER_SELECT_TOOL
:
if
(
gerber_layer
)
{
int
tool
=
m_SelLayerTool
->
GetChoice
();
if
(
tool
>
0
)
tool
=
tool
-
1
+
FIRST_DCODE
;
else
tool
=
0
;
int
tool
=
m_DCodeSelector
->
GetSelectedDCodeId
();
if
(
tool
!=
gerber_layer
->
m_Selected_Tool
)
{
gerber_layer
->
m_Selected_Tool
=
tool
;
DrawPanel
->
Refresh
(
TRUE
);
DrawPanel
->
Refresh
();
}
}
break
;
...
...
gerbview/files.cpp
View file @
d5f2f586
...
...
@@ -9,8 +9,6 @@
#include "gestfich.h"
#include "gerbview.h"
#include "pcbplot.h"
static
void
LoadDCodeFile
(
WinEDA_GerberFrame
*
frame
,
const
wxString
&
FullFileName
);
...
...
@@ -159,7 +157,7 @@ bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName )
}
// Read gerber files: each file is loaded on a new gerbview layer
int
layer
=
getActiveLayer
()
-
1
;
int
layer
=
getActiveLayer
();
for
(
unsigned
ii
=
0
;
ii
<
filenamesList
.
GetCount
();
ii
++
)
{
wxFileName
filename
=
filenamesList
[
ii
];
...
...
@@ -167,21 +165,13 @@ bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName )
GetScreen
()
->
m_FileName
=
filename
.
GetFullPath
();
filename
.
SetExt
(
g_PenFilenameExt
);
layer
++
;
if
(
layer
>=
NB_LAYERS
)
layer
=
0
;
setActiveLayer
(
layer
);
setActiveLayer
(
layer
,
false
);
if
(
Read_GERBER_File
(
GetScreen
()
->
m_FileName
,
filename
.
GetFullPath
()
)
)
{
SetLastProject
(
GetScreen
()
->
m_FileName
);
}
else
{
layer
--
;
if
(
layer
>=
0
)
setActiveLayer
(
layer
);
else
setActiveLayer
(
0
);
layer
++
;
if
(
layer
>=
NB_LAYERS
)
layer
=
0
;
}
}
...
...
@@ -189,6 +179,10 @@ bool WinEDA_GerberFrame::LoadGerberFiles( const wxString& aFullFileName )
GetScreen
()
->
SetRefreshReq
();
g_SaveTime
=
time
(
NULL
);
// Synchronize layers tools with actual active layer:
setActiveLayer
(
getActiveLayer
());
syncLayerBox
();
return
true
;
}
...
...
gerbview/gerberframe.cpp
View file @
d5f2f586
...
...
@@ -2,10 +2,6 @@
/* gerberframe.cpp */
/*******************/
#ifdef __GNUG__
#pragma implementation
#endif
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "wxstruct.h"
...
...
@@ -20,6 +16,7 @@
#include "hotkeys.h"
#include "class_GERBER.h"
#include "dialog_helpers.h"
#include "class_DCodeSelectionbox.h"
#include "build_version.h"
...
...
@@ -29,106 +26,105 @@
/****************************************/
BEGIN_EVENT_TABLE
(
WinEDA_GerberFrame
,
WinEDA_BasePcbFrame
)
EVT_CLOSE
(
WinEDA_GerberFrame
::
OnCloseWindow
)
EVT_SIZE
(
WinEDA_GerberFrame
::
OnSize
)
EVT_CLOSE
(
WinEDA_GerberFrame
::
OnCloseWindow
)
EVT_SIZE
(
WinEDA_GerberFrame
::
OnSize
)
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
WinEDA_GerberFrame
::
OnZoom
)
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
WinEDA_GerberFrame
::
OnZoom
)
EVT_TOOL
(
wxID_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_GERBVIEW_LOAD_DRILL_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_GERBVIEW_LOAD_DCODE_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_NEW_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
wxID_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_GERBVIEW_LOAD_DRILL_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_GERBVIEW_LOAD_DCODE_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_TOOL
(
ID_NEW_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
// Menu Files:
EVT_MENU
(
wxID_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_MENU_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_NEW_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_GEN_PLOT
,
WinEDA_GerberFrame
::
ToPlotter
)
EVT_MENU
(
ID_GERBVIEW_EXPORT_TO_PCBNEW
,
EVT_MENU
(
wxID_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_MENU_INC_LAYER_AND_APPEND_FILE
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_NEW_BOARD
,
WinEDA_GerberFrame
::
Files_io
)
EVT_MENU
(
ID_GEN_PLOT
,
WinEDA_GerberFrame
::
ToPlotter
)
EVT_MENU
(
ID_GERBVIEW_EXPORT_TO_PCBNEW
,
WinEDA_GerberFrame
::
ExportDataInPcbnewFormat
)
EVT_MENU_RANGE
(
wxID_FILE1
,
wxID_FILE9
,
WinEDA_GerberFrame
::
OnFileHistory
)
EVT_MENU_RANGE
(
wxID_FILE1
,
wxID_FILE9
,
WinEDA_GerberFrame
::
OnFileHistory
)
EVT_MENU
(
ID_EXIT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// menu Preferences
EVT_MENU
(
ID_CONFIG_REQ
,
EVT_MENU
(
ID_CONFIG_REQ
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_CONFIG_SAVE
,
EVT_MENU
(
ID_CONFIG_SAVE
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
EVT_MENU_RANGE
(
ID_PREFERENCES_HOTKEY_START
,
ID_PREFERENCES_HOTKEY_END
,
WinEDA_GerberFrame
::
Process_Config
)
EVT_MENU
(
ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_MENU
(
ID_GERBVIEW_OPTIONS_SETUP
,
WinEDA_GerberFrame
::
InstallGerberOptionsDialog
)
EVT_MENU
(
ID_MENU_GERBVIEW_SHOW_HIDE_LAYERS_MANAGER_DIALOG
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_MENU
(
ID_GERBVIEW_OPTIONS_SETUP
,
WinEDA_GerberFrame
::
InstallGerberOptionsDialog
)
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
EVT_MENU_RANGE
(
ID_LANGUAGE_CHOICE
,
ID_LANGUAGE_CHOICE_END
,
WinEDA_DrawFrame
::
SetLanguage
)
// menu Postprocess
EVT_MENU
(
ID_GERBVIEW_SHOW_LIST_DCODES
,
EVT_MENU
(
ID_GERBVIEW_SHOW_LIST_DCODES
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS
,
EVT_MENU
(
ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_GERBVIEW_SHOW_SOURCE
,
EVT_MENU
(
ID_GERBVIEW_SHOW_SOURCE
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// menu Miscellaneous
EVT_MENU
(
ID_GERBVIEW_GLOBAL_DELETE
,
EVT_MENU
(
ID_GERBVIEW_GLOBAL_DELETE
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// Menu Help
EVT_MENU
(
ID_GENERAL_HELP
,
WinEDA_DrawFrame
::
GetKicadHelp
)
EVT_MENU
(
ID_KICAD_ABOUT
,
WinEDA_DrawFrame
::
GetKicadAbout
)
EVT_TOOL
(
wxID_CUT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_COPY
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_PASTE
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_UNDO
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_PRINT
,
WinEDA_GerberFrame
::
ToPrinter
)
EVT_TOOL
(
ID_FIND_ITEMS
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_TOOLBARH_GERBVIEW_SELECT_LAYER
,
EVT_MENU
(
ID_GENERAL_HELP
,
WinEDA_DrawFrame
::
GetKicadHelp
)
EVT_MENU
(
ID_KICAD_ABOUT
,
WinEDA_DrawFrame
::
GetKicadAbout
)
EVT_TOOL
(
wxID_CUT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_COPY
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_PASTE
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_UNDO
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
wxID_PRINT
,
WinEDA_GerberFrame
::
ToPrinter
)
EVT_TOOL
(
ID_FIND_ITEMS
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_TOOLBARH_GERBVIEW_SELECT_LAYER
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_KICAD_CHOICEBOX
(
ID_TOOLBARH_GERBER_SELECT_TOOL
,
EVT_SELECT_DCODE
(
ID_TOOLBARH_GERBER_SELECT_TOOL
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// Vertical toolbar:
EVT_TOOL
(
ID_NO_SELECT_BUTT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_GERBVIEW_DELETE_ITEM_BUTT
,
EVT_TOOL
(
ID_NO_SELECT_BUTT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_TOOL
(
ID_GERBVIEW_DELETE_ITEM_BUTT
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
EVT_MENU_RANGE
(
ID_POPUP_GENERAL_START_RANGE
,
ID_POPUP_GENERAL_END_RANGE
,
EVT_MENU_RANGE
(
ID_POPUP_GENERAL_START_RANGE
,
ID_POPUP_GENERAL_END_RANGE
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// Pop up menu
EVT_MENU
(
ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS
,
EVT_MENU
(
ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS
,
WinEDA_GerberFrame
::
Process_Special_Functions
)
// Option toolbar
EVT_TOOL_RANGE
(
ID_TB_OPTIONS_START
,
ID_TB_OPTIONS_END
,
EVT_TOOL_RANGE
(
ID_TB_OPTIONS_START
,
ID_TB_OPTIONS_END
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_FLASHED_ITEMS_SKETCH
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_LINES_SKETCH
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_LINES_SKETCH
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_DCODES
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_DCODES
,
WinEDA_GerberFrame
::
OnSelectOptionToolbar
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_0
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_0
,
WinEDA_GerberFrame
::
OnSelectDisplayMode
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_1
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_1
,
WinEDA_GerberFrame
::
OnSelectDisplayMode
)
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_2
,
EVT_TOOL
(
ID_TB_OPTIONS_SHOW_GBR_MODE_2
,
WinEDA_GerberFrame
::
OnSelectDisplayMode
)
END_EVENT_TABLE
()
WinEDA_GerberFrame
::
WinEDA_GerberFrame
(
wxWindow
*
father
,
END_EVENT_TABLE
()
WinEDA_GerberFrame
::
WinEDA_GerberFrame
(
wxWindow
*
father
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
...
...
@@ -142,7 +138,7 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
m_Draw_Sheet_Ref
=
false
;
// true for reference drawings.
m_HotkeysZoomAndGridList
=
s_Gerbview_Hokeys_Descr
;
m_SelLayerBox
=
NULL
;
m_
SelLayerTool
=
NULL
;
m_
DCodeSelector
=
NULL
;
m_displayMode
=
0
;
if
(
DrawPanel
)
...
...
@@ -176,9 +172,12 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
LoadSettings
();
SetSize
(
m_FramePos
.
x
,
m_FramePos
.
y
,
m_FrameSize
.
x
,
m_FrameSize
.
y
);
GetScreen
()
->
SetGrid
(
ID_POPUP_GRID_LEVEL_1000
+
m_LastGridSizeId
);
if
(
GetDisplayMode
()
==
1
||
GetDisplayMode
()
==
2
)
DrawPanel
->
m_DisableEraseBG
=
true
;
ReCreateMenuBar
();
ReCreateHToolbar
();
// ReCreateVToolbar(); // Currently: no right vertical toolbar
ReCreateOptToolbar
();
...
...
@@ -230,7 +229,6 @@ WinEDA_GerberFrame::WinEDA_GerberFrame( wxWindow* father,
SetToolbars
();
m_auimgr
.
Update
();
}
...
...
@@ -253,7 +251,7 @@ int WinEDA_GerberFrame::BestZoom()
{
// gives a minimal value to zoom, if no item in list
if
(
GetBoard
()
->
m_Drawings
==
NULL
)
return
(
16
*
GetScreen
()
->
m_ZoomScalar
)
;
return
16
*
GetScreen
()
->
m_ZoomScalar
;
double
x
,
y
;
EDA_Rect
bbox
;
...
...
@@ -273,7 +271,7 @@ int WinEDA_GerberFrame::BestZoom()
y
=
bbox
.
GetHeight
()
/
(
double
)
size
.
y
;
GetScreen
()
->
m_Curseur
=
bbox
.
Centre
();
int
best_zoom
=
wxRound
(
MAX
(
x
,
y
)
*
(
double
)
GetScreen
()
->
m_ZoomScalar
)
;
int
best_zoom
=
wxRound
(
MAX
(
x
,
y
)
*
(
double
)
GetScreen
()
->
m_ZoomScalar
);
return
best_zoom
;
}
...
...
@@ -291,14 +289,15 @@ void WinEDA_GerberFrame::LoadSettings()
config
->
Read
(
GerbviewShowPageSizeOption
,
&
pageSize_opt
,
0l
);
int
imax
=
0
;
for
(
;
g_GerberPageSizeList
[
imax
]
!=
NULL
;
imax
++
);
for
(
;
g_GerberPageSizeList
[
imax
]
!=
NULL
;
imax
++
)
;
if
(
pageSize_opt
<
0
||
pageSize_opt
>=
imax
)
pageSize_opt
=
0
;
GetScreen
()
->
m_CurrentSheetDesc
=
g_GerberPageSizeList
[
pageSize_opt
];
if
(
pageSize_opt
>
0
)
if
(
pageSize_opt
>
0
)
{
m_Draw_Sheet_Ref
=
true
;
}
...
...
@@ -397,7 +396,7 @@ int WinEDA_GerberFrame::GetGridColor()
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
void
WinEDA_GerberFrame
::
SetGridColor
(
int
aColor
)
void
WinEDA_GerberFrame
::
SetGridColor
(
int
aColor
)
{
GetBoard
()
->
SetVisibleElementColor
(
GERBER_GRID_VISIBLE
,
aColor
);
}
...
...
@@ -417,12 +416,13 @@ void WinEDA_GerberFrame::SetElementVisibility( int aGERBER_VISIBLE, bool aNewSta
}
void
WinEDA_GerberFrame
::
syncLayerWidget
(
)
void
WinEDA_GerberFrame
::
syncLayerWidget
()
{
m_LayersManager
->
SelectLayer
(
getActiveLayer
()
);
UpdateTitleAndInfo
();
}
/**
* Function syncLayerBox
* updates the currently "selected" layer within m_SelLayerBox
...
...
@@ -432,6 +432,15 @@ void WinEDA_GerberFrame::syncLayerWidget( )
void
WinEDA_GerberFrame
::
syncLayerBox
()
{
m_SelLayerBox
->
SetSelection
(
getActiveLayer
()
);
int
dcodeSelected
=
-
1
;
GERBER_IMAGE
*
gerber
=
g_GERBER_List
[
getActiveLayer
()];
if
(
gerber
)
dcodeSelected
=
gerber
->
m_Selected_Tool
;
if
(
m_DCodeSelector
)
{
m_DCodeSelector
->
SetDCodeSelection
(
dcodeSelected
);
m_DCodeSelector
->
Enable
(
gerber
!=
NULL
);
}
UpdateTitleAndInfo
();
}
...
...
@@ -453,7 +462,7 @@ void WinEDA_GerberFrame::SetLanguage( wxCommandEvent& event )
}
void
WinEDA_GerberFrame
::
Liste_D_Codes
(
)
void
WinEDA_GerberFrame
::
Liste_D_Codes
()
{
int
ii
,
jj
;
D_CODE
*
pt_D_code
;
...
...
@@ -518,7 +527,7 @@ void WinEDA_GerberFrame::Liste_D_Codes( )
}
/*
*
/*
* Function UpdateTitleAndInfo
* displays the short filename (if exists) of the selected layer
* on the caption of the main gerbview window
...
...
@@ -538,7 +547,7 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
text
=
wxGetApp
().
GetAppName
()
+
wxT
(
" "
)
+
GetBuildVersion
();
SetTitle
(
text
);
SetStatusText
(
wxEmptyString
,
0
);
text
.
Printf
(
_
(
"Layer %d not used"
),
GetScreen
()
->
m_Active_Layer
+
1
);
text
.
Printf
(
_
(
"Layer %d not in use"
),
GetScreen
()
->
m_Active_Layer
+
1
);
m_TextInfo
->
SetValue
(
text
);
ClearMsgPanel
();
return
;
...
...
@@ -557,7 +566,7 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
SetStatusText
(
text
,
0
);
// Display data format like fmt in X3.4Y3.4 no LZ or fmt mm X2.3 Y3.5 no TZ in main toolbar
text
.
Printf
(
wxT
(
"fmt: %s X%d.%d Y%d.%d no %cZ"
),
text
.
Printf
(
wxT
(
"fmt: %s X%d.%d Y%d.%d no %cZ"
),
gerber
->
m_GerbMetric
?
wxT
(
"mm"
)
:
wxT
(
"in"
),
gerber
->
m_FmtLen
.
x
-
gerber
->
m_FmtScale
.
x
,
gerber
->
m_FmtScale
.
x
,
gerber
->
m_FmtLen
.
y
-
gerber
->
m_FmtScale
.
y
,
gerber
->
m_FmtScale
.
y
,
...
...
@@ -573,18 +582,22 @@ void WinEDA_GerberFrame::UpdateTitleAndInfo()
void
WinEDA_GerberFrame
::
OnSelectDisplayMode
(
wxCommandEvent
&
event
)
{
int
oldMode
=
GetDisplayMode
();
switch
(
event
.
GetId
()
)
{
case
ID_TB_OPTIONS_SHOW_GBR_MODE_0
:
SetDisplayMode
(
0
);
DrawPanel
->
m_DisableEraseBG
=
false
;
break
;
case
ID_TB_OPTIONS_SHOW_GBR_MODE_1
:
SetDisplayMode
(
1
);
DrawPanel
->
m_DisableEraseBG
=
true
;
break
;
case
ID_TB_OPTIONS_SHOW_GBR_MODE_2
:
SetDisplayMode
(
2
);
DrawPanel
->
m_DisableEraseBG
=
true
;
break
;
}
...
...
@@ -592,5 +605,3 @@ void WinEDA_GerberFrame::OnSelectDisplayMode( wxCommandEvent& event )
if
(
GetDisplayMode
()
!=
oldMode
)
DrawPanel
->
Refresh
();
}
gerbview/gerbview.cpp
View file @
d5f2f586
...
...
@@ -87,7 +87,6 @@ bool WinEDA_App::OnInit()
}
ScreenPcb
=
new
PCB_SCREEN
();
ScreenPcb
->
m_CurrentSheetDesc
=
&
g_Sheet_GERBER
;
ActiveScreen
=
ScreenPcb
;
// read current setup and reopen last directory if no filename to open in
...
...
gerbview/menubar.cpp
View file @
d5f2f586
...
...
@@ -3,7 +3,6 @@
/*************************************/
#include "fctsys.h"
#include "wx/wupdlock.h"
#include "appl_wxstruct.h"
#include "common.h"
...
...
@@ -16,17 +15,18 @@
void
WinEDA_GerberFrame
::
ReCreateMenuBar
(
void
)
{
wxWindowUpdateLocker
dummy
(
this
);
wxMenuBar
*
menuBar
=
GetMenuBar
();
/* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly. */
if
(
menuBar
)
SetMenuBar
(
NULL
);
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
wxMenu
*
filesMenu
=
new
wxMenu
;
filesMenu
->
Append
(
wxID_FILE
,
_
(
"Load Gerber File"
),
_
(
"Load a new Gerber file on the current layer. Previous data will be deleted"
),
...
...
@@ -111,9 +111,13 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
miscellaneous_menu
,
_
(
"&Miscellaneous"
)
);
//TODO: one day... menuBar->Append(drill_menu, _("&Drill"));
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
// Associate the menu bar with the frame
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
gerbview/rs274d.cpp
View file @
d5f2f586
...
...
@@ -86,7 +86,6 @@ static wxPoint LastPosition;
* @param aPos The center point of the flash
* @param aSize The diameter of the round flash
* @param aLayerNegative = true if the current layer is negative
* @param aImageNegative = true if the current image is negative
*/
static
void
fillFlashedGBRITEM
(
GERBER_DRAW_ITEM
*
aGbrItem
,
APERTURE_T
aAperture
,
...
...
@@ -177,17 +176,19 @@ static void fillLineGBRITEM( GERBER_DRAW_ITEM* aGbrItem,
* <li> absolute angle 180 to 270 (quadrant 3) or
* <li> absolute angle 270 to 0 (quadrant 4)
* </ul><p>
* @param
GERBER_DRAW_ITEM
is the GBRITEM to fill in.
* @param
aGbrItem
is the GBRITEM to fill in.
* @param Dcode_index is the DCODE value, like D14
* @param aLayer is the layer index to set into the GBRITEM
* @param aStart is the starting point
* @param aEnd is the ending point
* @param
rel_c
enter is the center coordinate relative to start point,
* @param
aRelC
enter is the center coordinate relative to start point,
* given in ABSOLUTE VALUE and the sign of values x et y de rel_center
* must be calculated from the previously given constraint: arc only in the
* same quadrant.
* @param a
Diameter The diameter of the round flash
* @param a
Clockwise true if arc must be created clockwise
* @param aPenSize The size of the flash. Note rectangular shapes are legal.
* @param aMultiquadrant = true to create arcs upto 360 deg,
* false when arc is inside one quadrant
* @param aLayerNegative = true if the current layer is negative
*/
static
void
fillArcGBRITEM
(
GERBER_DRAW_ITEM
*
aGbrItem
,
int
Dcode_index
,
int
aLayer
,
...
...
@@ -212,7 +213,7 @@ static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, int aL
// So we must recalculate the actual sign of aRelCenter.x and aRelCenter.y
center
=
aRelCenter
;
// calculate arc end coordinate relative to the staring point,
// calculate arc end coordinate relative to the star
t
ing point,
// because center is relative to the center point
delta
=
aEnd
-
aStart
;
...
...
@@ -305,22 +306,22 @@ static void fillArcGBRITEM( GERBER_DRAW_ITEM* aGbrItem, int Dcode_index, int aL
* <li> absolute angle 270 to 0 (quadrant 4)
* </ul><p>
* @param aPcb is the board.
* @param a
Layer is the layer index to set into the GBRITEM
* @param a
GbrItem is the GBRITEM to fill in.
* @param aStart is the starting point
* @param aEnd is the ending point
* @param rel_center is the center coordinate relative to start point,
* given in ABSOLUTE VALUE and the sign of values x et y de rel_center
* must be calculated from the previously given constraint: arc only in the
* same quadrant.
* @param aDiameter The diameter of the round flash
* @param aWidth is the pen width.
* @param aClockwise true if arc must be created clockwise
* @param aMultiquadrant = true to create arcs upto 360 deg,
* false when arc is inside one quadrant
* @param aLayerNegative = true if the current layer is negative
* @param aImageNegative = true if the current image is negative
*/
static
void
fillArcPOLY
(
BOARD
*
aPcb
,
GERBER_DRAW_ITEM
*
aGbrItem
,
const
wxPoint
&
aStart
,
const
wxPoint
&
aEnd
,
const
wxPoint
&
rel_center
,
bool
clockwise
,
bool
m
ultiquadrant
,
bool
aClockwise
,
bool
aM
ultiquadrant
,
bool
aLayerNegative
)
{
/* in order to calculate arc parameters, we use fillArcGBRITEM
...
...
@@ -332,7 +333,7 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem,
fillArcGBRITEM
(
&
dummyGbrItem
,
0
,
0
,
aStart
,
aEnd
,
rel_center
,
wxSize
(
0
,
0
),
clockwise
,
m
ultiquadrant
,
aLayerNegative
);
aClockwise
,
aM
ultiquadrant
,
aLayerNegative
);
wxPoint
center
;
center
=
dummyGbrItem
.
m_ArcCentre
;
...
...
@@ -370,7 +371,7 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem,
{
int
rot
;
wxPoint
end_arc
=
start
;
if
(
c
lockwise
)
if
(
aC
lockwise
)
rot
=
ii
*
increment_angle
;
// rot is in 0.1 deg
else
rot
=
(
count
-
ii
)
*
increment_angle
;
// rot is in 0.1 deg
...
...
@@ -378,7 +379,7 @@ static void fillArcPOLY( BOARD* aPcb, GERBER_DRAW_ITEM* aGbrItem,
if
(
ii
<
count
)
RotatePoint
(
&
end_arc
,
-
rot
);
else
// last point
end_arc
=
c
lockwise
?
end
:
start
;
end_arc
=
aC
lockwise
?
end
:
start
;
aGbrItem
->
m_PolyCorners
.
push_back
(
end_arc
+
center
);
...
...
gerbview/rs274x.cpp
View file @
d5f2f586
...
...
@@ -769,7 +769,7 @@ bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file )
* test for an end of line
* if an end of line is found:
* read a new line
* @param aBuff
[GERBER_BUFZ] = buffer
to fill with a new line
* @param aBuff
= buffer (size = GERBER_BUFZ)
to fill with a new line
* @param aText = pointer to the last useful char in aBuff
* on return: points the beginning of the next line.
* @param aFile = the opened GERBER file to read
...
...
gerbview/toolbars_gerber.cpp
View file @
d5f2f586
...
...
@@ -3,7 +3,6 @@
/*************************************/
#include "fctsys.h"
#include "wx/wupdlock.h"
//#include "appl_wxstruct.h"
#include "common.h"
...
...
@@ -14,6 +13,7 @@
#include "hotkeys.h"
#include "class_GERBER.h"
#include "class_layerchoicebox.h"
#include "class_DCodeSelectionbox.h"
#include "dialog_helpers.h"
void
WinEDA_GerberFrame
::
ReCreateHToolbar
(
void
)
...
...
@@ -27,10 +27,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
if
(
m_HToolBar
!=
NULL
)
return
;
// we create m_SelLayerTool that have a lot of items,
// so create a wxWindowUpdateLocker is a good idea
wxWindowUpdateLocker
dummy
(
this
);
if
(
GetScreen
()
)
{
layer
=
GetScreen
()
->
m_Active_Layer
;
...
...
@@ -89,7 +85,6 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
msg
=
_
(
"Layer "
);
msg
<<
ii
+
1
;
choices
.
Add
(
msg
);
}
m_SelLayerBox
=
new
WinEDALayerChoiceBox
(
m_HToolBar
,
ID_TOOLBARH_GERBVIEW_SELECT_LAYER
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
...
...
@@ -97,22 +92,23 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
m_HToolBar
->
AddControl
(
m_SelLayerBox
);
m_HToolBar
->
AddSeparator
();
choices
.
Clear
();
choices
.
Alloc
(
TOOLS_MAX_COUNT
+
1
);
choices
.
Add
(
_
(
"No tool"
)
);
m_DCodesList
.
Alloc
(
TOOLS_MAX_COUNT
+
1
);
m_DCodesList
.
Add
(
_
(
"No tool"
)
);
for
(
ii
=
0
;
ii
<
TOOLS_MAX_COUNT
;
ii
++
)
msg
=
_
(
"Tool "
);
wxString
text
;
for
(
ii
=
FIRST_DCODE
;
ii
<
TOOLS_MAX_COUNT
;
ii
++
)
{
wxString
msg
;
msg
=
_
(
"Tool "
);
msg
<<
ii
+
FIRST_DCODE
;
choices
.
Add
(
msg
);
text
=
msg
;
text
<<
ii
;
m_DCodesList
.
Add
(
text
);
}
m_
SelLayerTool
=
new
WinEDAChoiceBox
(
m_HToolBar
,
m_
DCodeSelector
=
new
DCODE_SELECTION_BOX
(
m_HToolBar
,
ID_TOOLBARH_GERBER_SELECT_TOOL
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
choices
);
m_HToolBar
->
AddControl
(
m_
SelLayerTool
);
m_DCodesList
);
m_HToolBar
->
AddControl
(
m_
DCodeSelector
);
m_TextInfo
=
new
wxTextCtrl
(
m_HToolBar
,
wxID_ANY
,
wxEmptyString
,
wxDefaultPosition
,
wxSize
(
150
,
-
1
),
...
...
@@ -133,8 +129,6 @@ void WinEDA_GerberFrame::ReCreateVToolbar( void )
if
(
m_VToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
m_VToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_TOOL
,
this
,
ID_V_TOOLBAR
,
FALSE
);
// Set up toolbar
...
...
@@ -157,8 +151,6 @@ void WinEDA_GerberFrame::ReCreateOptToolbar( void )
if
(
m_OptionsToolBar
)
return
;
wxWindowUpdateLocker
dummy
(
this
);
// creation of tool bar options
m_OptionsToolBar
=
new
WinEDA_Toolbar
(
TOOLBAR_OPTION
,
this
,
ID_OPT_TOOLBAR
,
FALSE
);
...
...
@@ -249,26 +241,21 @@ void WinEDA_GerberFrame::SetToolbars()
m_SelLayerBox
->
SetSelection
(
screen
->
m_Active_Layer
);
}
if
(
m_
SelLayerTool
)
if
(
m_
DCodeSelector
)
{
if
(
gerber
)
{
int
sel_index
;
m_SelLayerTool
->
Enable
(
true
);
if
(
gerber
->
m_Selected_Tool
<
FIRST_DCODE
)
// No tool selected
sel_index
=
0
;
else
sel_index
=
gerber
->
m_Selected_Tool
-
FIRST_DCODE
+
1
;
int
dcodeSelected
;
m_DCodeSelector
->
Enable
(
true
);
dcodeSelected
=
gerber
->
m_Selected_Tool
;
if
(
sel_index
!=
m_SelLayerTool
->
GetSelection
()
)
{
m_SelLayerTool
->
SetSelection
(
sel_index
);
}
if
(
dcodeSelected
!=
m_DCodeSelector
->
GetSelectedDCodeId
()
)
m_DCodeSelector
->
SetDCodeSelection
(
dcodeSelected
);
}
else
{
m_
SelLayerTool
->
Set
Selection
(
0
);
m_
SelLayerTool
->
Enable
(
false
);
m_
DCodeSelector
->
SetDCode
Selection
(
0
);
m_
DCodeSelector
->
Enable
(
false
);
}
}
...
...
gerbview/wxGerberFrame.h
View file @
d5f2f586
...
...
@@ -17,8 +17,7 @@
* global id.h file. This will prevent the entire project from being rebuilt
* when adding new command to the gerber file viewer.
*/
enum
id_gerbview_frm
{
enum
id_gerbview_frm
{
// A MenuItem ID of Zero does not work under Mac,first id = 1
ID_GERBVIEW_SHOW_LIST_DCODES
=
1
,
ID_GERBVIEW_LOAD_DRILL_FILE
,
...
...
@@ -32,8 +31,10 @@ enum id_gerbview_frm
};
class
DCODE_SELECTION_BOX
;
/******************************************************************
class WinEDA_GerberFrame: this is the main window used in gerbview
*
class WinEDA_GerberFrame: this is the main window used in gerbview
******************************************************************/
class
WinEDA_GerberFrame
:
public
WinEDA_BasePcbFrame
...
...
@@ -45,9 +46,10 @@ protected:
public
:
WinEDALayerChoiceBox
*
m_SelLayerBox
;
WinEDAChoiceBox
*
m_SelLayerTool
;
DCODE_SELECTION_BOX
*
m_DCodeSelector
;
// a list box to select the dcode Id to hightlight.
wxTextCtrl
*
m_TextInfo
;
// a wxTextCtrl used to display some info about
// gerber data (format..)
wxArrayString
m_DCodesList
;
// an array string containint all decodes Id (10 to 999)
private
:
int
m_displayMode
;
// Gerber images ("layers" in Gerbview) can be drawn:
...
...
@@ -62,8 +64,7 @@ private:
bool
m_show_layer_manager_tools
;
wxArrayString
m_Messages
;
// An array sting to store warning messages when reaging a gerber file
public
:
WinEDA_GerberFrame
(
wxWindow
*
father
,
const
wxString
&
title
,
public
:
WinEDA_GerberFrame
(
wxWindow
*
father
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
=
KICAD_DEFAULT_DRAWFRAME_STYLE
);
...
...
@@ -78,27 +79,30 @@ public:
* for instance when reading a Gerber file
* @param aMessage = the straing to add in list
*/
void
ReportMessage
(
const
wxString
aMessage
)
void
ReportMessage
(
const
wxString
aMessage
)
{
m_Messages
.
Add
(
aMessage
);
}
/**
* Function ClearMessageList
* Clear the message list
* Call it before reading a Gerber file
*/
void
ClearMessageList
(
)
void
ClearMessageList
()
{
m_Messages
.
Clear
(
);
m_Messages
.
Clear
();
}
/**
* Function GetDisplayMode
* @return 0 for fast mode (not fully compatible with negative objects)
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
int
GetDisplayMode
()
{
return
m_displayMode
;}
int
GetDisplayMode
()
{
return
m_displayMode
;
}
/**
* Function SetDisplayMode
...
...
@@ -106,7 +110,7 @@ public:
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
void
SetDisplayMode
(
int
aMode
)
{
m_displayMode
=
aMode
;}
void
SetDisplayMode
(
int
aMode
)
{
m_displayMode
=
aMode
;
}
/**
* Function IsGridVisible() , virtual
...
...
@@ -120,7 +124,7 @@ public:
* if you want to store/retrieve the grid visiblity in configuration.
* @param aVisible = true if the grid must be shown
*/
virtual
void
SetGridVisibility
(
bool
aVisible
);
virtual
void
SetGridVisibility
(
bool
aVisible
);
/**
* Function GetGridColor() , virtual
...
...
@@ -132,7 +136,7 @@ public:
* Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual
void
SetGridColor
(
int
aColor
);
virtual
void
SetGridColor
(
int
aColor
);
/**
* Function IsElementVisible
...
...
@@ -147,6 +151,7 @@ public:
return
GetBoard
()
->
IsElementVisible
(
aGERBER_VISIBLE
);
}
/**
* Function SetElementVisibility
* changes the visibility of an element category
...
...
@@ -160,7 +165,7 @@ public:
* Function SetVisibleAlls
* Set the status of all visible element categories and layers to VISIBLE
*/
void
SetVisibleAlls
(
);
void
SetVisibleAlls
();
/**
* Function ReFillLayerWidget
...
...
@@ -182,6 +187,7 @@ public:
syncLayerWidget
();
}
/**
* Function getActiveLayer
* returns the active layer
...
...
@@ -191,6 +197,7 @@ public:
return
(
(
PCB_SCREEN
*
)
GetScreen
()
)
->
m_Active_Layer
;
}
/**
* Function syncLayerWidget
* updates the currently "selected" layer within the PCB_LAYER_WIDGET.
...
...
@@ -199,7 +206,7 @@ public:
* This function cannot be inline without including layer_widget.h in
* here and we do not want to do that.
*/
void
syncLayerWidget
(
);
void
syncLayerWidget
(
);
/**
* Function syncLayerBox
...
...
@@ -259,6 +266,7 @@ public:
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
int
BestZoom
();
void
OnSelectOptionToolbar
(
wxCommandEvent
&
event
);
/**
* Function OnSelectDisplayMode
* called on a display mode selection
...
...
@@ -285,6 +293,7 @@ public:
virtual
bool
HandleBlockEnd
(
wxDC
*
DC
);
/* Block operations: */
/**
* Function Block_Delete
* deletes all tracks and segments within the selected block.
...
...
@@ -378,7 +387,7 @@ public:
* example: 0.012, 0.012, L , D10<br>
*
* Categorize all found dcodes into a table of D_CODE instantiations.
* @param D_CodeFullFileName The name of the file to read from.
* @param D_Code
_
FullFileName The name of the file to read from.
* @return int - <br>
* -1 = file not found<br>
* -2 = parsing problem<br>
...
...
@@ -389,7 +398,7 @@ public:
*/
int
Read_D_Code_File
(
const
wxString
&
D_Code_FullFileName
);
void
CopyDCodesSizeToItems
();
void
Liste_D_Codes
(
);
void
Liste_D_Codes
(
);
// PCB handling
bool
Clear_Pcb
(
bool
query
);
...
...
@@ -406,7 +415,7 @@ public:
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
=
UR_UNSPECIFIED
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
}
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
}
/**
* Function SaveCopyInUndoList (overloaded).
...
...
@@ -420,11 +429,12 @@ public:
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
// currently: do nothing in gerbview.
}
/** Virtual function PrintPage
* used to print a page
* @param aDC = wxDC given by the calling print function
...
...
@@ -435,7 +445,7 @@ public:
*/
virtual
void
PrintPage
(
wxDC
*
aDC
,
bool
aPrint_Sheet_Ref
,
int
aPrintMasklayer
,
bool
aPrintMirrorMode
,
void
*
aData
=
NULL
);
void
*
aData
=
NULL
);
/**
* Function InstallDialogLayerPairChoice
...
...
@@ -443,7 +453,7 @@ public:
* between gerber layers and pcbnew layers
* @return the "lookup table" if ok, or NULL
*/
int
*
InstallDialogLayerPairChoice
(
);
int
*
InstallDialogLayerPairChoice
(
);
/**
* Function DrawItemsDCodeID
...
...
include/boost/config/platform/vms.hpp
0 → 100644
View file @
d5f2f586
// (C) Copyright Artyom Beilis 2010.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP
#define BOOST_CONFIG_PLATFORM_VMS_HPP
#define BOOST_PLATFORM "OpenVMS"
#undef BOOST_HAS_STDINT_H
#define BOOST_HAS_UNISTD_H
#define BOOST_HAS_NL_TYPES_H
#define BOOST_HAS_GETTIMEOFDAY
#define BOOST_HAS_DIRENT_H
#define BOOST_HAS_PTHREADS
#define BOOST_HAS_NANOSLEEP
#define BOOST_HAS_CLOCK_GETTIME
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
#define BOOST_HAS_LOG1P
#define BOOST_HAS_EXPM1
#define BOOST_HAS_THREADS
#undef BOOST_HAS_SCHED_YIELD
#endif
include/boost/type_traits/add_lvalue_reference.hpp
0 → 100644
View file @
d5f2f586
// Copyright 2010 John Maddock
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
#define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
#include <boost/type_traits/add_reference.hpp>
// should be the last #include
#include <boost/type_traits/detail/type_trait_def.hpp>
namespace
boost
{
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
add_lvalue_reference
,
T
,
typename
boost
::
add_reference
<
T
>::
type
)
#ifndef BOOST_NO_RVALUE_REFERENCES
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1
(
typename
T
,
add_lvalue_reference
,
T
&&
,
T
&
)
#endif
}
#include <boost/type_traits/detail/type_trait_undef.hpp>
#endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP
include/boost/type_traits/add_rvalue_reference.hpp
0 → 100644
View file @
d5f2f586
// add_rvalue_reference.hpp ---------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
#include <boost/config.hpp>
//----------------------------------------------------------------------------//
#include <boost/type_traits/is_void.hpp>
#include <boost/type_traits/is_reference.hpp>
// should be the last #include
#include <boost/type_traits/detail/type_trait_def.hpp>
//----------------------------------------------------------------------------//
// //
// C++03 implementation of //
// 20.7.6.2 Reference modifications [meta.trans.ref] //
// Written by Vicente J. Botet Escriba //
// //
// If T names an object or function type then the member typedef type
// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects
// the semantics of reference collapsing. For example, when a type T names
// a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
// reference. end note ]
//----------------------------------------------------------------------------//
namespace
boost
{
namespace
type_traits_detail
{
template
<
typename
T
,
bool
b
>
struct
add_rvalue_reference_helper
{
typedef
T
type
;
};
template
<
typename
T
>
struct
add_rvalue_reference_helper
<
T
,
true
>
{
#if !defined(BOOST_NO_RVALUE_REFERENCES)
typedef
T
&&
type
;
#else
typedef
T
type
;
#endif
};
template
<
typename
T
>
struct
add_rvalue_reference_imp
{
typedef
typename
boost
::
type_traits_detail
::
add_rvalue_reference_helper
<
T
,
(
!
is_void
<
T
>::
value
&&
!
is_reference
<
T
>::
value
)
>::
type
type
;
};
}
BOOST_TT_AUX_TYPE_TRAIT_DEF1
(
add_rvalue_reference
,
T
,
typename
boost
::
type_traits_detail
::
add_rvalue_reference_imp
<
T
>::
type
)
}
// namespace boost
#include <boost/type_traits/detail/type_trait_undef.hpp>
#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
include/boost/type_traits/common_type.hpp
0 → 100644
View file @
d5f2f586
// common_type.hpp ---------------------------------------------------------//
// Copyright 2008 Howard Hinnant
// Copyright 2008 Beman Dawes
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
#define BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
#include <boost/config.hpp>
#ifdef __SUNPRO_CC
# define BOOST_COMMON_TYPE_DONT_USE_TYPEOF
#endif
#ifdef __IBMCPP__
# define BOOST_COMMON_TYPE_DONT_USE_TYPEOF
#endif
//----------------------------------------------------------------------------//
#if defined(BOOST_NO_VARIADIC_TEMPLATES)
#define BOOST_COMMON_TYPE_ARITY 3
#endif
//----------------------------------------------------------------------------//
#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
#define BOOST_TYPEOF_SILENT
#include <boost/typeof/typeof.hpp> // boost wonders never cease!
#endif
//----------------------------------------------------------------------------//
#ifndef BOOST_NO_STATIC_ASSERT
#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
#elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
#include <boost/mpl/assert.hpp>
#include <boost/mpl/bool.hpp>
#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) \
BOOST_MPL_ASSERT_MSG
(
boost
::
mpl
::
bool_
<
(
CND
)
>::
type
::
value
,
MSG
,
TYPES
)
#else
#include <boost/static_assert.hpp>
#define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
#endif
#if !defined(BOOST_NO_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT)
#define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type"
#endif
#if defined(BOOST_NO_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
#include <boost/type_traits/detail/common_type_imp.hpp>
#include <boost/type_traits/remove_cv.hpp>
#endif
#include <boost/mpl/if.hpp>
#include <boost/utility/declval.hpp>
#include <boost/type_traits/add_rvalue_reference.hpp>
//----------------------------------------------------------------------------//
// //
// C++03 implementation of //
// 20.6.7 Other transformations [meta.trans.other] //
// Written by Howard Hinnant //
// Adapted for Boost by Beman Dawes, Vicente Botet and Jeffrey Hellrung //
// //
//----------------------------------------------------------------------------//
namespace
boost
{
// prototype
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
template
<
typename
...
T
>
struct
common_type
;
#else // or no specialization
template
<
class
T
,
class
U
=
void
,
class
V
=
void
>
struct
common_type
{
public
:
typedef
typename
common_type
<
typename
common_type
<
T
,
U
>::
type
,
V
>::
type
type
;
};
#endif
// 1 arg
template
<
typename
T
>
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
struct
common_type
<
T
>
#else
struct
common_type
<
T
,
void
,
void
>
#endif
{
BOOST_COMMON_TYPE_STATIC_ASSERT
(
sizeof
(
T
)
>
0
,
BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE
,
(
T
));
public
:
typedef
T
type
;
};
// 2 args
namespace
type_traits_detail
{
template
<
class
T
,
class
U
>
struct
common_type_2
{
private
:
BOOST_COMMON_TYPE_STATIC_ASSERT
(
sizeof
(
T
)
>
0
,
BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE
,
(
T
));
BOOST_COMMON_TYPE_STATIC_ASSERT
(
sizeof
(
U
)
>
0
,
BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE
,
(
U
));
static
bool
declval_bool
();
// workaround gcc bug; not required by std
static
typename
add_rvalue_reference
<
T
>::
type
declval_T
();
// workaround gcc bug; not required by std
static
typename
add_rvalue_reference
<
U
>::
type
declval_U
();
// workaround gcc bug; not required by std
static
typename
add_rvalue_reference
<
bool
>::
type
declval_b
();
#if !defined(BOOST_NO_DECLTYPE)
public
:
typedef
decltype
(
declval
<
bool
>
()
?
declval
<
T
>
()
:
declval
<
U
>
())
type
;
#elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF)
public
:
typedef
typename
detail_type_traits_common_type
::
common_type_impl
<
typename
remove_cv
<
T
>::
type
,
typename
remove_cv
<
U
>::
type
>::
type
type
;
#else
public
:
typedef
BOOST_TYPEOF_TPL
(
declval_b
()
?
declval_T
()
:
declval_U
())
type
;
#endif
};
template
<
class
T
>
struct
common_type_2
<
T
,
T
>
{
typedef
T
type
;
};
}
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
template
<
class
T
,
class
U
>
struct
common_type
<
T
,
U
>
#else
template
<
class
T
,
class
U
>
struct
common_type
<
T
,
U
,
void
>
#endif
:
type_traits_detail
::
common_type_2
<
T
,
U
>
{
};
// 3 or more args
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
template
<
typename
T
,
typename
U
,
typename
...
V
>
struct
common_type
<
T
,
U
,
V
...
>
{
public
:
typedef
typename
common_type
<
typename
common_type
<
T
,
U
>::
type
,
V
...
>::
type
type
;
};
#endif
}
// namespace boost
#endif // BOOST_TYPE_TRAITS_COMMON_TYPE_HPP
include/boost/type_traits/conditional.hpp
0 → 100644
View file @
d5f2f586
// (C) Copyright John Maddock 2010.
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
#ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED
#define BOOST_TT_CONDITIONAL_HPP_INCLUDED
#include <boost/mpl/if.hpp>
namespace
boost
{
template
<
bool
b
,
class
T
,
class
U
>
struct
conditional
:
public
mpl
::
if_c
<
b
,
T
,
U
>
{
};
}
// namespace boost
#endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED
include/boost/type_traits/detail/common_type_imp.hpp
0 → 100644
View file @
d5f2f586
/*******************************************************************************
* boost/type_traits/detail/common_type_imp.hpp
*
* Copyright 2010, Jeffrey Hellrung.
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*
* struct boost::common_type<T,U>
*
* common_type<T,U>::type is the type of the expression
* b() ? x() : y()
* where b() returns a bool, x() has return type T, and y() has return type U.
* See
* http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm#common_type
*
* Note that this evaluates to void if one or both of T and U is void.
******************************************************************************/
#ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP
#define BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP
#include <cstddef>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/contains.hpp>
#include <boost/mpl/copy.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/inserter.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/push_back.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/vector/vector0.hpp>
#include <boost/mpl/vector/vector10.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/type_traits/is_enum.hpp>
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/make_signed.hpp>
#include <boost/type_traits/make_unsigned.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/utility/declval.hpp>
namespace
boost
{
namespace
detail_type_traits_common_type
{
/*******************************************************************************
* struct propagate_cv< From, To >
*
* This metafunction propagates cv-qualifiers on type From to type To.
******************************************************************************/
template
<
class
From
,
class
To
>
struct
propagate_cv
{
typedef
To
type
;
};
template
<
class
From
,
class
To
>
struct
propagate_cv
<
const
From
,
To
>
{
typedef
To
const
type
;
};
template
<
class
From
,
class
To
>
struct
propagate_cv
<
volatile
From
,
To
>
{
typedef
To
volatile
type
;
};
template
<
class
From
,
class
To
>
struct
propagate_cv
<
const
volatile
From
,
To
>
{
typedef
To
const
volatile
type
;
};
/*******************************************************************************
* struct is_signable_integral<T>
*
* This metafunction determines if T is an integral type which can be made
* signed or unsigned.
******************************************************************************/
template
<
class
T
>
struct
is_signable_integral
:
mpl
::
or_
<
is_integral
<
T
>
,
is_enum
<
T
>
>
{
};
template
<>
struct
is_signable_integral
<
bool
>
:
false_type
{
};
/*******************************************************************************
* struct sizeof_t<N>
* typedef ... yes_type
* typedef ... no_type
*
* These types are integral players in the use of the "sizeof trick", i.e., we
* can distinguish overload selection by inspecting the size of the return type
* of the overload.
******************************************************************************/
template
<
std
::
size_t
N
>
struct
sizeof_t
{
char
_dummy
[
N
];
};
typedef
sizeof_t
<
1
>
yes_type
;
typedef
sizeof_t
<
2
>
no_type
;
BOOST_MPL_ASSERT_RELATION
(
sizeof
(
yes_type
),
==
,
1
);
BOOST_MPL_ASSERT_RELATION
(
sizeof
(
no_type
),
==
,
2
);
/*******************************************************************************
* rvalue_test(T&) -> no_type
* rvalue_test(...) -> yes_type
*
* These overloads are used to determine the rvalue-ness of an expression.
******************************************************************************/
template
<
class
T
>
no_type
rvalue_test
(
T
&
);
yes_type
rvalue_test
(...);
/*******************************************************************************
* struct conversion_test_overloads< Sequence >
*
* This struct has multiple overloads of the static member function apply, each
* one taking a single parameter of a type within the Boost.MPL sequence
* Sequence. Each such apply overload has a return type with sizeof equal to
* one plus the index of the parameter type within Sequence. Thus, we can
* deduce the type T of an expression as long as we can generate a finite set of
* candidate types containing T via these apply overloads and the "sizeof
* trick".
******************************************************************************/
template
<
class
First
,
class
Last
,
std
::
size_t
Index
>
struct
conversion_test_overloads_iterate
:
conversion_test_overloads_iterate
<
typename
mpl
::
next
<
First
>::
type
,
Last
,
Index
+
1
>
{
using
conversion_test_overloads_iterate
<
typename
mpl
::
next
<
First
>::
type
,
Last
,
Index
+
1
>::
apply
;
static
sizeof_t
<
Index
+
1
>
apply
(
typename
mpl
::
deref
<
First
>::
type
);
};
template
<
class
Last
,
std
::
size_t
Index
>
struct
conversion_test_overloads_iterate
<
Last
,
Last
,
Index
>
{
static
sizeof_t
<
Index
+
1
>
apply
(...);
};
template
<
class
Sequence
>
struct
conversion_test_overloads
:
conversion_test_overloads_iterate
<
typename
mpl
::
begin
<
Sequence
>::
type
,
typename
mpl
::
end
<
Sequence
>::
type
,
0
>
{
};
/*******************************************************************************
* struct select< Sequence, Index >
*
* select is synonymous with mpl::at_c unless Index equals the size of the
* Boost.MPL Sequence, in which case this evaluates to void.
******************************************************************************/
template
<
class
Sequence
,
int
Index
,
int
N
=
mpl
::
size
<
Sequence
>::
value
>
struct
select
:
mpl
::
at_c
<
Sequence
,
Index
>
{
};
template
<
class
Sequence
,
int
N
>
struct
select
<
Sequence
,
N
,
N
>
{
typedef
void
type
;
};
/*******************************************************************************
* class deduce_common_type< T, U, NominalCandidates >
* struct nominal_candidates<T,U>
* struct common_type_dispatch_on_rvalueness<T,U>
* struct common_type_impl<T,U>
*
* These classes and structs implement the logic behind common_type, which goes
* roughly as follows. Let C be the type of the conditional expression
* declval< bool >() ? declval<T>() : declval<U>()
* if C is an rvalue, then:
* let T' and U' be T and U stripped of reference- and cv-qualifiers
* if T' and U' are pointer types, say, T' = V* and U' = W*, then:
* define the set of NominalCandidates to be
* { V*, W*, V'*, W'* }
* where V' is V with whatever cv-qualifiers are on W, and W' is W
* with whatever cv-qualifiers are on V
* else T' and U' are both "signable integral types" (integral and enum
* types excepting bool), then:
* define the set of NominalCandidates to be
* { unsigned(T'), unsigned(U'), signed(T'), signed(U') }
* where unsigned(X) is make_unsigned<X>::type and signed(X) is
* make_signed<X>::type
* else
* define the set of NominalCandidates to be
* { T', U' }
* else
* let V and W be T and U stripped of reference-qualifiers
* define the set of NominalCandidates to be
* { V&, W&, V'&, W'& }
* where V' is V with whatever cv-qualifiers are on W, and W' is W with
* whatever cv-qualifiers are on V
* define the set of Candidates to be equal to the set of NominalCandidates with
* duplicates removed, and use this set of Candidates to determine C using the
* conversion_test_overloads struct
******************************************************************************/
template
<
class
T
,
class
U
,
class
NominalCandidates
>
class
deduce_common_type
{
typedef
typename
mpl
::
copy
<
NominalCandidates
,
mpl
::
inserter
<
mpl
::
vector0
<>
,
mpl
::
if_
<
mpl
::
contains
<
mpl
::
_1
,
mpl
::
_2
>
,
mpl
::
_1
,
mpl
::
push_back
<
mpl
::
_1
,
mpl
::
_2
>
>
>
>::
type
candidate_types
;
static
const
int
best_candidate_index
=
sizeof
(
conversion_test_overloads
<
candidate_types
>::
apply
(
declval
<
bool
>
()
?
declval
<
T
>
()
:
declval
<
U
>
()
)
)
-
1
;
public
:
typedef
typename
select
<
candidate_types
,
best_candidate_index
>::
type
type
;
};
template
<
class
T
,
class
U
,
class
V
=
typename
remove_cv
<
typename
remove_reference
<
T
>::
type
>::
type
,
class
W
=
typename
remove_cv
<
typename
remove_reference
<
U
>::
type
>::
type
,
bool
=
is_signable_integral
<
V
>::
value
&&
is_signable_integral
<
W
>::
value
>
struct
nominal_candidates
;
template
<
class
T
,
class
U
,
class
V
,
class
W
>
struct
nominal_candidates
<
T
,
U
,
V
,
W
,
false
>
{
typedef
mpl
::
vector2
<
V
,
W
>
type
;
};
template
<
class
T
,
class
U
,
class
V
,
class
W
>
struct
nominal_candidates
<
T
,
U
,
V
,
W
,
true
>
{
typedef
mpl
::
vector4
<
typename
make_unsigned
<
V
>::
type
,
typename
make_unsigned
<
W
>::
type
,
typename
make_signed
<
V
>::
type
,
typename
make_signed
<
W
>::
type
>
type
;
};
template
<
class
T
,
class
U
,
class
V
,
class
W
>
struct
nominal_candidates
<
T
,
U
,
V
*
,
W
*
,
false
>
{
typedef
mpl
::
vector4
<
V
*
,
W
*
,
typename
propagate_cv
<
W
,
V
>::
type
*
,
typename
propagate_cv
<
V
,
W
>::
type
*
>
type
;
};
template
<
class
T
,
class
U
,
bool
b
>
struct
common_type_dispatch_on_rvalueness
:
deduce_common_type
<
T
,
U
,
typename
nominal_candidates
<
T
,
U
>::
type
>
{
};
template
<
class
T
,
class
U
>
struct
common_type_dispatch_on_rvalueness
<
T
,
U
,
false
>
{
private
:
typedef
typename
remove_reference
<
T
>::
type
unrefed_T_type
;
typedef
typename
remove_reference
<
U
>::
type
unrefed_U_type
;
public
:
typedef
typename
deduce_common_type
<
T
,
U
,
mpl
::
vector4
<
unrefed_T_type
&
,
unrefed_U_type
&
,
typename
propagate_cv
<
unrefed_U_type
,
unrefed_T_type
>::
type
&
,
typename
propagate_cv
<
unrefed_T_type
,
unrefed_U_type
>::
type
&
>
>::
type
type
;
};
template
<
class
T
,
class
U
>
struct
common_type_impl
:
common_type_dispatch_on_rvalueness
<
T
,
U
,
sizeof
(
::
boost
::
detail_type_traits_common_type
::
rvalue_test
(
declval
<
bool
>
()
?
declval
<
T
>
()
:
declval
<
U
>
()
)
)
==
sizeof
(
yes_type
)
>
{
};
template
<
class
T
>
struct
common_type_impl
<
T
,
void
>
{
typedef
void
type
;
};
template
<
class
T
>
struct
common_type_impl
<
void
,
T
>
{
typedef
void
type
;
};
template
<>
struct
common_type_impl
<
void
,
void
>
{
typedef
void
type
;
};
}
// namespace detail_type_traits_common_type
}
// namespace boost
#endif // BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_HPP
include/boost/typeof/unsupported.hpp
0 → 100644
View file @
d5f2f586
// Copyright (C) 2010 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_UNSUPPORTED_HPP_INCLUDED
#define BOOST_TYPEOF_UNSUPPORTED_HPP_INCLUDED
namespace
boost
{
namespace
type_of
{
struct
typeof_emulation_is_unsupported_on_this_compiler
{};
}}
#define BOOST_TYPEOF(expr) boost::type_of::typeof_emulation_is_unsupported_on_this_compiler
#define BOOST_TYPEOF_TPL BOOST_TYPEOF
#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct
name
{
\
typedef
BOOST_TYPEOF_TPL
(
expr
)
type
;
\
};
#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
struct
name
{
\
typedef
BOOST_TYPEOF
(
expr
)
type
;
\
};
#define BOOST_TYPEOF_REGISTER_TYPE(x)
#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
#endif
\ No newline at end of file
include/boost/utility/declval.hpp
0 → 100644
View file @
d5f2f586
// common_type.hpp ---------------------------------------------------------//
// Copyright 2010 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
#define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
#include <boost/config.hpp>
//----------------------------------------------------------------------------//
#include <boost/type_traits/add_rvalue_reference.hpp>
//----------------------------------------------------------------------------//
// //
// C++03 implementation of //
// Written by Vicente J. Botet Escriba //
//~ 20.3.4 Function template declval [declval]
//~ 1 The library provides the function template declval to simplify the definition of expressions which occur as
//~ unevaluated operands.
//~ 2 Remarks: If this function is used, the program is ill-formed.
//~ 3 Remarks: The template parameter T of declval may be an incomplete type.
//~ [ Example:
//~ template <class To, class From>
//~ decltype(static_cast<To>(declval<From>())) convert(From&&);
//~ declares a function template convert which only participats in overloading if the type From can be
//~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). —end
//~ example ]
// //
//----------------------------------------------------------------------------//
namespace
boost
{
template
<
typename
T
>
typename
add_rvalue_reference
<
T
>::
type
declval
();
//noexcept; // as unevaluated operand
}
// namespace boost
#endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP
include/class_drawpanel.h
View file @
d5f2f586
...
...
@@ -35,6 +35,9 @@ public:
bool
m_AbortEnable
;
// TRUE if abort button or menu to
// be displayed
bool
m_DisableEraseBG
;
// if true: do not allow background erasure
// (used to reduce flicker in Gerbview )
bool
m_AutoPAN_Enable
;
// TRUE to allow auto pan
bool
m_AutoPAN_Request
;
// TRUE to request an auto pan
...
...
kicad/kicad.cpp
View file @
d5f2f586
...
...
@@ -62,8 +62,6 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
frame
->
SetTitle
(
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
()
+
wxT
(
" "
)
+
frame
->
m_ProjectFileName
.
GetFullPath
()
);
frame
->
ReCreateMenuBar
();
frame
->
RecreateBaseHToolbar
();
frame
->
m_LeftWin
->
ReCreateTreePrj
();
...
...
kicad/menubar.cpp
View file @
d5f2f586
...
...
@@ -73,20 +73,21 @@ void WinEDA_MainFrame::ReCreateMenuBar()
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
/**
* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly.
*/
if
(
menuBar
)
SetMenuBar
(
NULL
);
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
/**
* Files menu
*/
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
// Files menu
wxMenu
*
filesMenu
=
new
wxMenu
;
/
* Open */
/
/ Open
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open
\t
Ctrl+O"
),
_
(
"Open an existing project"
)
);
...
...
@@ -96,7 +97,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
filesMenu
->
Append
(
item
);
/
* Open Recent submenu */
/
/ Open Recent submenu
wxMenu
*
openRecentMenu
=
new
wxMenu
();
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
openRecentMenu
,
...
...
@@ -104,7 +105,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_
(
"Open a recent opened schematic project"
),
open_project_xpm
);
/
* New */
/
/ New
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_PROJECT
,
_
(
"&New
\t
Ctrl+N"
),
_
(
"Start a new project"
)
);
...
...
@@ -124,10 +125,8 @@ void WinEDA_MainFrame::ReCreateMenuBar()
filesMenu
->
Append
(
item
);
/
* Separator */
/
/ Archive
filesMenu
->
AppendSeparator
();
/* Archive */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_AND_ZIP_FILES
,
_
(
"&Archive"
),
_
(
"Archive project files in zip archive"
)
);
...
...
@@ -137,7 +136,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
filesMenu
->
Append
(
item
);
/
* Unarchive */
/
/ Unarchive
item
=
new
wxMenuItem
(
filesMenu
,
ID_READ_ZIP_ARCHIVE
,
_
(
"&Unarchive"
),
_
(
"Unarchive project files from zip file"
)
);
...
...
@@ -160,12 +159,10 @@ void WinEDA_MainFrame::ReCreateMenuBar()
/**
* Browse menu
*/
// Browse menu
wxMenu
*
browseMenu
=
new
wxMenu
();
/
* Text editor */
/
/ Text editor
item
=
new
wxMenuItem
(
browseMenu
,
ID_TO_EDITOR
,
_
(
"Text E&ditor"
),
_
(
"Open preferred text editor"
)
);
#if !defined( __WXMAC__ )
...
...
@@ -186,12 +183,10 @@ void WinEDA_MainFrame::ReCreateMenuBar()
/**
* Preferences menu
*/
// Preferences menu
wxMenu
*
PreferencesMenu
=
new
wxMenu
;
/
* Text editor */
/
/ Text editor
item
=
new
wxMenuItem
(
PreferencesMenu
,
ID_SELECT_PREFERED_EDITOR
,
_
(
"&Text Editor"
),
_
(
"Select your preferred text editor"
)
);
...
...
@@ -201,13 +196,10 @@ void WinEDA_MainFrame::ReCreateMenuBar()
PreferencesMenu
->
Append
(
item
);
/**
* PDF Viewer submenu
* System browser or user defined checkbox
*/
// PDF Viewer submenu:System browser or user defined checkbox
wxMenu
*
SubMenuPdfBrowserChoice
=
new
wxMenu
;
/
* Default */
/
/ Default
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_DEFAULT_PDF_BROWSER
,
_
(
"Default"
),
...
...
@@ -222,7 +214,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
SubMenuPdfBrowserChoice
->
Check
(
ID_SELECT_DEFAULT_PDF_BROWSER
,
wxGetApp
().
m_PdfBrowserIsDefault
);
/
* Favourite */
/
/ Favourite viewer
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_PREFERED_PDF_BROWSER
,
_
(
"Favourite"
),
...
...
@@ -237,7 +229,7 @@ void WinEDA_MainFrame::ReCreateMenuBar()
SubMenuPdfBrowserChoice
->
Check
(
ID_SELECT_PREFERED_PDF_BROWSER
,
!
wxGetApp
().
m_PdfBrowserIsDefault
);
/
* Append PDF Viewer submenu to preferences */
/
/ Append PDF Viewer submenu to preferences
item
=
new
wxMenuItem
(
SubMenuPdfBrowserChoice
,
ID_SELECT_PREFERED_PDF_BROWSER_NAME
,
_
(
"PDF Viewer"
),
...
...
@@ -254,14 +246,11 @@ void WinEDA_MainFrame::ReCreateMenuBar()
_
(
"PDF viewer preferences"
),
datasheet_xpm
);
// Add languages list:
PreferencesMenu
->
AppendSeparator
();
wxGetApp
().
AddMenuLanguageList
(
PreferencesMenu
);
/**
* Help menu
*/
// Help menu
wxMenu
*
helpMenu
=
new
wxMenu
;
AddHelpVersionInfoMenuEntry
(
helpMenu
);
...
...
@@ -276,27 +265,26 @@ void WinEDA_MainFrame::ReCreateMenuBar()
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined( __WXMAC__ )
// About
helpMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About kicad project manager"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/**
* Create the menubar and append all submenus
*/
// Create the menubar and append all submenus
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
browseMenu
,
_
(
"&Browse"
)
);
menuBar
->
Append
(
PreferencesMenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Associate the menu bar with the frame */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
...
...
kicad/preferences.cpp
View file @
d5f2f586
...
...
@@ -98,11 +98,5 @@ void WinEDA_MainFrame::OnSelectPreferredEditor( wxCommandEvent& event )
void
WinEDA_MainFrame
::
SetLanguage
(
wxCommandEvent
&
event
)
{
wxGetApp
().
SetLanguageIdentifier
(
event
.
GetId
()
);
if
(
wxGetApp
().
SetLanguage
()
)
{
wxLogDebug
(
wxT
(
"Recreating menu bar due to language change."
)
);
ReCreateMenuBar
();
Refresh
();
}
WinEDA_BasicFrame
::
SetLanguage
(
event
);
}
packaging/windows/nsis/install.nsi
View file @
d5f2f586
...
...
@@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2010.12.
06
"
!define PRODUCT_VERSION "2010.12.
18
"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
...
...
pcbnew/menubar_modedit.cpp
View file @
d5f2f586
...
...
@@ -19,11 +19,17 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
wxMenuBar
*
menuBar
=
GetMenuBar
();
wxMenuItem
*
item
;
if
(
menuBar
)
return
;
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
// Recreate all menus:
/* File menu */
wxMenu
*
fileMenu
=
new
wxMenu
;
...
...
@@ -310,6 +316,11 @@ void WinEDA_ModuleEditFrame::ReCreateMenuBar()
menuBar
->
Append
(
placeMenu
,
_
(
"&Place"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Associate the menu bar with the frame */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
pcbnew/menubar_pcbframe.cpp
View file @
d5f2f586
...
...
@@ -23,16 +23,18 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
/**
* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly.
*/
if
(
menuBar
)
SetMenuBar
(
NULL
);
if
(
!
menuBar
)
menuBar
=
new
wxMenuBar
();
// Delete all existing menus so they can be rebuilt.
// This allows language changes of the menu text on the fly.
menuBar
->
Freeze
();
while
(
menuBar
->
GetMenuCount
()
)
delete
menuBar
->
Remove
(
0
);
/** Create File Menu */
// Recreate all menus:
// Create File Menu
wxMenu
*
filesMenu
=
new
wxMenu
;
// New
...
...
@@ -606,6 +608,11 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
menuBar
->
Append
(
designRulesMenu
,
_
(
"&Design Rules"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/* Associate the menu bar with the frame */
menuBar
->
Thaw
();
// Associate the menu bar with the frame, if no previous menubar
if
(
GetMenuBar
()
==
NULL
)
SetMenuBar
(
menuBar
);
else
menuBar
->
Refresh
();
}
pcbnew/printout_controler.cpp
View file @
d5f2f586
...
...
@@ -163,8 +163,7 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
if
(
(
m_PrintParams
.
m_PrintScale
>
1.0
)
// scale > 1 -> Recadrage
||
(
m_PrintParams
.
m_PrintScale
==
0
)
)
// fit in page
{
DrawOffset
.
x
+=
pcbframe
->
GetBoard
()
->
m_BoundaryBox
.
Centre
().
x
;
DrawOffset
.
y
+=
pcbframe
->
GetBoard
()
->
m_BoundaryBox
.
Centre
().
y
;
DrawOffset
+=
pcbframe
->
GetBoard
()
->
m_BoundaryBox
.
Centre
();
}
if
(
m_PrintParams
.
m_PageSetupData
)
...
...
@@ -258,6 +257,11 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
* the old draw area in the new draw area, because the draw origin has not moved
* (this is the upper left corner) but the Y axis is reversed, therefore the plotting area
* is the y coordinate values from - PlotAreaSize.y to 0 */
#ifdef USE_WX_ZOOM
int
y_dc_offset
=
PlotAreaSizeInPixels
.
y
;
y_dc_offset
=
(
int
)
y_dc_offset
*
userscale
;
dc
->
SetDeviceOrigin
(
0
,
y_dc_offset
);
#endif
int
ysize
=
(
int
)
(
PlotAreaSizeInPixels
.
y
/
sy
);
DrawOffset
.
y
+=
ysize
;
...
...
@@ -271,7 +275,11 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
wxPoint
pcb_centre
=
pcbframe
->
GetBoard
()
->
m_BoundaryBox
.
Centre
();
if
(
userscale
<=
1.0
)
DrawOffset
.
y
+=
pcb_centre
.
y
-
(
ysize
/
2
);
#ifdef USE_WX_ZOOM
dc
->
SetLogicalOrigin
(
ActiveScreen
->
m_DrawOrg
.
x
,
ActiveScreen
->
m_DrawOrg
.
y
);
#else
ActiveScreen
->
m_DrawOrg
=
DrawOffset
;
#endif
panel
->
m_ClipBox
.
SetOrigin
(
wxPoint
(
-
0x7FFFFF
,
-
0x7FFFFF
)
);
}
...
...
version.txt
View file @
d5f2f586
release version:
2010 dec 1
0
(BZR testing 26xx)
2010 dec 1
8
(BZR testing 26xx)
files (.zip,.tgz):
kicad-2010-12-1
0
-testing
kicad-2010-12-1
8
-testing
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