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
d3afe95c
Commit
d3afe95c
authored
Jan 04, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove page size globals from eeschema
parent
697f9123
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
216 additions
and
203 deletions
+216
-203
CMakeLists.txt
CMakeLists.txt
+7
-2
common.cpp
common/common.cpp
+14
-15
class_DisplayFootprintsFrame.cpp
cvpcb/class_DisplayFootprintsFrame.cpp
+1
-1
class_footprints_listbox.cpp
cvpcb/class_footprints_listbox.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+3
-3
dialog_SVG_print.cpp
eeschema/dialogs/dialog_SVG_print.cpp
+4
-6
dialog_plot_schematic_DXF.cpp
eeschema/dialogs/dialog_plot_schematic_DXF.cpp
+20
-19
dialog_plot_schematic_HPGL.cpp
eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
+110
-103
dialog_plot_schematic_PS.cpp
eeschema/dialogs/dialog_plot_schematic_PS.cpp
+24
-22
sch_screen.cpp
eeschema/sch_screen.cpp
+1
-1
class_sch_screen.h
include/class_sch_screen.h
+2
-2
common.h
include/common.h
+20
-21
dialog_pad_properties.cpp
pcbnew/dialogs/dialog_pad_properties.cpp
+6
-5
files.cpp
pcbnew/files.cpp
+2
-1
loadcmp.cpp
pcbnew/loadcmp.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
d3afe95c
...
...
@@ -22,8 +22,8 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
option
(
USE_PNG_BITMAPS
"use PNG bitmaps instead of XPM (default ON)"
ON
)
option
(
USE_NEW_PCBNEW_LOAD
"use new plugin support for legacy file format (default O
FF)"
OFF
)
option
(
USE_NEW_PCBNEW_SAVE
"use new plugin support for legacy file format (default O
FF)"
OFF
)
option
(
USE_NEW_PCBNEW_LOAD
"use new plugin support for legacy file format (default O
N)"
ON
)
option
(
USE_NEW_PCBNEW_SAVE
"use new plugin support for legacy file format (default O
N)"
ON
)
# Russian GOST patch
option
(
wxUSE_UNICODE
"enable/disable building unicode (default OFF)"
)
...
...
@@ -265,6 +265,11 @@ add_subdirectory(bitmap2component)
add_subdirectory
(
pcb_calculator
)
#add_subdirectory(new)
add_executable
(
container_test EXCLUDE_FROM_ALL container_test.cpp
)
target_link_libraries
(
container_test common polygon bitmaps
${
wxWidgets_LIBRARIES
}
)
#############
# Resources #
#############
...
...
common/common.cpp
View file @
d3afe95c
...
...
@@ -178,24 +178,24 @@ bool EnsureTextCtrlWidth( wxTextCtrl* aCtrl, const wxString* aString )
// Standard page sizes in 1/1000 inch
#if defined(KICAD_GOST)
static
const
PAGE_INFO
pageA4
(
wxSize
(
8283
,
11700
),
wx
Point
(
0
,
0
),
wx
T
(
"A4"
)
);
static
const
PAGE_INFO
pageA4
(
wxSize
(
8283
,
11700
),
wxT
(
"A4"
)
);
#else
static
const
PAGE_INFO
pageA4
(
wxSize
(
11700
,
8267
),
wx
Point
(
0
,
0
),
wx
T
(
"A4"
)
);
static
const
PAGE_INFO
pageA4
(
wxSize
(
11700
,
8267
),
wxT
(
"A4"
)
);
#endif
static
const
PAGE_INFO
pageA3
(
wxSize
(
16535
,
11700
),
wx
Point
(
0
,
0
),
wx
T
(
"A3"
)
);
static
const
PAGE_INFO
pageA2
(
wxSize
(
23400
,
16535
),
wx
Point
(
0
,
0
),
wx
T
(
"A2"
)
);
static
const
PAGE_INFO
pageA1
(
wxSize
(
33070
,
23400
),
wx
Point
(
0
,
0
),
wx
T
(
"A1"
)
);
static
const
PAGE_INFO
pageA0
(
wxSize
(
46800
,
33070
),
wx
Point
(
0
,
0
),
wx
T
(
"A0"
)
);
static
const
PAGE_INFO
pageA
(
wxSize
(
11000
,
8500
),
wx
Point
(
0
,
0
),
wx
T
(
"A"
)
);
static
const
PAGE_INFO
pageB
(
wxSize
(
17000
,
11000
),
wx
Point
(
0
,
0
),
wx
T
(
"B"
)
);
static
const
PAGE_INFO
pageC
(
wxSize
(
22000
,
17000
),
wx
Point
(
0
,
0
),
wx
T
(
"C"
)
);
static
const
PAGE_INFO
pageD
(
wxSize
(
34000
,
22000
),
wx
Point
(
0
,
0
),
wx
T
(
"D"
)
);
static
const
PAGE_INFO
pageE
(
wxSize
(
44000
,
34000
),
wx
Point
(
0
,
0
),
wx
T
(
"E"
)
);
static
const
PAGE_INFO
pageGERBER
(
wxSize
(
32000
,
32000
),
wx
Point
(
0
,
0
),
wx
T
(
"GERBER"
)
);
static
const
PAGE_INFO
pageA3
(
wxSize
(
16535
,
11700
),
wxT
(
"A3"
)
);
static
const
PAGE_INFO
pageA2
(
wxSize
(
23400
,
16535
),
wxT
(
"A2"
)
);
static
const
PAGE_INFO
pageA1
(
wxSize
(
33070
,
23400
),
wxT
(
"A1"
)
);
static
const
PAGE_INFO
pageA0
(
wxSize
(
46800
,
33070
),
wxT
(
"A0"
)
);
static
const
PAGE_INFO
pageA
(
wxSize
(
11000
,
8500
),
wxT
(
"A"
)
);
static
const
PAGE_INFO
pageB
(
wxSize
(
17000
,
11000
),
wxT
(
"B"
)
);
static
const
PAGE_INFO
pageC
(
wxSize
(
22000
,
17000
),
wxT
(
"C"
)
);
static
const
PAGE_INFO
pageD
(
wxSize
(
34000
,
22000
),
wxT
(
"D"
)
);
static
const
PAGE_INFO
pageE
(
wxSize
(
44000
,
34000
),
wxT
(
"E"
)
);
static
const
PAGE_INFO
pageGERBER
(
wxSize
(
32000
,
32000
),
wxT
(
"GERBER"
)
);
double
PAGE_INFO
::
s_user_width
=
17.0
;
double
PAGE_INFO
::
s_user_height
=
11.0
;
static
const
PAGE_INFO
pageUser
(
wxSize
(
17000
,
11000
),
wx
Point
(
0
,
0
),
wx
T
(
"User"
)
);
static
const
PAGE_INFO
pageUser
(
wxSize
(
17000
,
11000
),
wxT
(
"User"
)
);
static
const
PAGE_INFO
*
stdPageSizes
[]
=
{
&
pageA4
,
...
...
@@ -263,13 +263,12 @@ bool PAGE_INFO::SetType( const wxString& aType )
}
PAGE_INFO
::
PAGE_INFO
(
const
wxSize
&
aSizeMils
,
const
wx
Point
&
aOffsetMils
,
const
wx
String
&
aType
)
PAGE_INFO
::
PAGE_INFO
(
const
wxSize
&
aSizeMils
,
const
wxString
&
aType
)
{
// aSizeMils is in 1/1000th of an inch
SetWidthInches
(
aSizeMils
.
x
/
1000.0
);
SetHeightInches
(
aSizeMils
.
y
/
1000.0
);
m_Offset
=
aOffsetMils
;
m_Type
=
aType
;
// Adjust the default value for margins to 400 mils (0,4 inch or 10 mm)
...
...
cvpcb/class_DisplayFootprintsFrame.cpp
View file @
d3afe95c
...
...
@@ -87,7 +87,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* father,
SetIcon
(
icon
);
SetBoard
(
new
BOARD
()
);
SetScreen
(
new
PCB_SCREEN
(
GetPageS
ettings
().
GetS
izeIU
()
)
);
SetScreen
(
new
PCB_SCREEN
(
GetPageSizeIU
()
)
);
LoadSettings
();
...
...
cvpcb/class_footprints_listbox.cpp
View file @
d3afe95c
...
...
@@ -119,7 +119,7 @@ void FOOTPRINTS_LISTBOX::SetFootprintFullList( FOOTPRINT_LIST& list )
for
(
unsigned
ii
=
0
;
ii
<
list
.
GetCount
();
ii
++
)
{
FOOTPRINT_INFO
&
footprint
=
list
.
GetItem
(
ii
);
msg
.
Printf
(
wxT
(
"%3d %s"
),
m_FullFootprintList
.
GetCount
()
+
1
,
msg
.
Printf
(
wxT
(
"%3d %s"
),
(
int
)
m_FullFootprintList
.
GetCount
()
+
1
,
GetChars
(
footprint
.
m_Module
)
);
m_FullFootprintList
.
Add
(
msg
);
}
...
...
cvpcb/cvframe.cpp
View file @
d3afe95c
...
...
@@ -605,7 +605,7 @@ void CVPCB_MAINFRAME::DisplayStatus()
{
wxString
msg
;
msg
.
Printf
(
_
(
"Components: %d (free: %d)"
),
m_components
.
size
(),
m_undefinedComponentCnt
);
msg
.
Printf
(
_
(
"Components: %d (free: %d)"
),
(
int
)
m_components
.
size
(),
m_undefinedComponentCnt
);
SetStatusText
(
msg
,
0
);
SetStatusText
(
wxEmptyString
,
1
);
...
...
@@ -614,10 +614,10 @@ void CVPCB_MAINFRAME::DisplayStatus()
{
if
(
m_FootprintList
->
m_UseFootprintFullList
)
msg
.
Printf
(
_
(
"Footprints (All): %d"
),
m_FootprintList
->
m_ActiveFootprintList
->
GetCount
()
);
(
int
)
m_FootprintList
->
m_ActiveFootprintList
->
GetCount
()
);
else
msg
.
Printf
(
_
(
"Footprints (filtered): %d"
),
m_FootprintList
->
m_ActiveFootprintList
->
GetCount
()
);
(
int
)
m_FootprintList
->
m_ActiveFootprintList
->
GetCount
()
);
}
else
{
...
...
eeschema/dialogs/dialog_SVG_print.cpp
View file @
d3afe95c
...
...
@@ -199,7 +199,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
{
int
tmpzoom
;
wxPoint
tmp_startvisu
;
wxSize
SheetSize
;
// Sheet size in internal units
wxSize
sheetSize
;
// Sheet size in internal units
wxPoint
old_org
;
bool
success
=
true
;
...
...
@@ -209,16 +209,15 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
screen
->
m_DrawOrg
.
x
=
screen
->
m_DrawOrg
.
y
=
0
;
screen
->
m_StartVisu
.
x
=
screen
->
m_StartVisu
.
y
=
0
;
SheetSize
=
screen
->
ReturnPageSize
();
// page size in 1/1000 inch, ie in internal units
sheetSize
=
screen
->
GetPageSettings
().
GetSizeIU
();
// page size in 1/1000 inch, ie in internal units
screen
->
SetScalingFactor
(
1.0
);
EDA_DRAW_PANEL
*
panel
=
frame
->
GetCanvas
();
SetLocaleTo_C_standard
();
// Switch the locale to standard C (needed
// to print floating point numbers like 1.3)
LOCALE_IO
toggle
;
float
dpi
=
(
float
)
frame
->
GetInternalUnits
();
wxSVGFileDC
dc
(
FullFileName
,
SheetSize
.
x
,
S
heetSize
.
y
,
dpi
);
wxSVGFileDC
dc
(
FullFileName
,
sheetSize
.
x
,
s
heetSize
.
y
,
dpi
);
EDA_RECT
tmp
=
panel
->
m_ClipBox
;
GRResetPenAndBrush
(
&
dc
);
...
...
@@ -236,7 +235,6 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
if
(
aPrint_Sheet_Ref
)
frame
->
TraceWorkSheet
(
&
dc
,
screen
,
g_DrawDefaultLineThickness
);
SetLocaleTo_Default
();
// revert to the current locale
screen
->
m_IsPrinting
=
false
;
panel
->
m_ClipBox
=
tmp
;
...
...
eeschema/dialogs/dialog_plot_schematic_DXF.cpp
View file @
d3afe95c
...
...
@@ -63,11 +63,11 @@ private:
void
initDlg
();
void
initOptVars
();
void
CreateDXFFile
();
void
PlotOneSheetDXF
(
const
wxString
&
FileName
,
SCH_SCREEN
*
screen
,
PAGE_INFO
*
sheet
,
void
PlotOneSheetDXF
(
const
wxString
&
FileName
,
SCH_SCREEN
*
screen
,
wxPoint
plot_offset
,
double
scale
);
};
/* static members (static to remember last state): */
// static members (static to remember last state):
bool
DIALOG_PLOT_SCHEMATIC_DXF
::
m_plotColorOpt
=
false
;
bool
DIALOG_PLOT_SCHEMATIC_DXF
::
m_plot_Sheet_Ref
=
true
;
...
...
@@ -147,8 +147,7 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
SCH_SCREEN
*
screen
=
schframe
->
GetScreen
();
SCH_SHEET_PATH
*
sheetpath
;
SCH_SHEET_PATH
oldsheetpath
=
schframe
->
GetCurrentSheet
();
wxString
PlotFileName
;
PAGE_INFO
*
PlotSheet
;
wxString
plotFileName
;
wxPoint
plot_offset
;
/* When printing all pages, the printed page is not the current page.
...
...
@@ -186,15 +185,14 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
sheetpath
=
SheetList
.
GetNext
();
}
PlotSheet
=
screen
->
m_CurrentSheetDesc
;
double
scale
=
10
;
plot_offset
.
x
=
0
;
plot_offset
.
y
=
0
;
P
lotFileName
=
schframe
->
GetUniqueFilenameForCurrentSheet
()
+
wxT
(
".dxf"
);
p
lotFileName
=
schframe
->
GetUniqueFilenameForCurrentSheet
()
+
wxT
(
".dxf"
);
PlotOneSheetDXF
(
PlotFileName
,
screen
,
PlotSheet
,
plot_offset
,
scale
);
PlotOneSheetDXF
(
plotFileName
,
screen
,
plot_offset
,
scale
);
if
(
!
m_select_PlotAll
)
break
;
...
...
@@ -208,12 +206,12 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
void
DIALOG_PLOT_SCHEMATIC_DXF
::
PlotOneSheetDXF
(
const
wxString
&
FileName
,
SCH_SCREEN
*
screen
,
PAGE_INFO
*
sheet
,
wxPoint
plot_offset
,
double
scale
)
{
wxString
msg
;
wxString
msg
;
FILE
*
output_file
=
wxFopen
(
FileName
,
wxT
(
"wt"
)
);
if
(
output_file
==
NULL
)
...
...
@@ -227,13 +225,17 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
msg
.
Printf
(
_
(
"Plot: %s "
),
GetChars
(
FileName
)
);
m_MsgBox
->
AppendText
(
msg
);
SetLocaleTo_C_standard
();
LOCALE_IO
toggle
;
DXF_PLOTTER
*
plotter
=
new
DXF_PLOTTER
();
plotter
->
set_paper_size
(
sheet
);
const
PAGE_INFO
&
pageInfo
=
screen
->
GetPageSettings
();
plotter
->
SetPageSettings
(
pageInfo
);
plotter
->
set_viewport
(
plot_offset
,
scale
,
0
);
plotter
->
set_color_mode
(
m_plotColorOpt
);
/
* Init : */
/
/ Init :
plotter
->
set_creator
(
wxT
(
"Eeschema-DXF"
)
);
plotter
->
set_filename
(
FileName
);
plotter
->
start_plot
(
output_file
);
...
...
@@ -246,10 +248,9 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
screen
->
Plot
(
plotter
);
/
* fin */
/
/ finish
plotter
->
end_plot
();
delete
plotter
;
SetLocaleTo_Default
();
m_MsgBox
->
AppendText
(
wxT
(
"Ok
\n
"
)
);
}
eeschema/dialogs/dialog_plot_schematic_HPGL.cpp
View file @
d3afe95c
This diff is collapsed.
Click to expand it.
eeschema/dialogs/dialog_plot_schematic_PS.cpp
View file @
d3afe95c
...
...
@@ -70,12 +70,13 @@ private:
void
initOptVars
();
void
createPSFile
();
void
plotOneSheetPS
(
const
wxString
&
FileName
,
SCH_SCREEN
*
screen
,
PAGE_INFO
*
sheet
,
SCH_SCREEN
*
screen
,
const
PAGE_INFO
&
pageInfo
,
wxPoint
plot_offset
,
double
scale
);
};
/* static members (static to remember last state): */
// static members (static to remember last state):
bool
DIALOG_PLOT_SCHEMATIC_PS
::
m_plotColorOpt
=
false
;
int
DIALOG_PLOT_SCHEMATIC_PS
::
m_pageSizeSelect
=
PAGE_SIZE_AUTO
;
int
DIALOG_PLOT_SCHEMATIC_PS
::
m_pageSizeSelect
=
PAGE_SIZE_AUTO
;
bool
DIALOG_PLOT_SCHEMATIC_PS
::
m_plot_Sheet_Ref
=
true
;
...
...
@@ -176,8 +177,8 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
SCH_SHEET_PATH
*
sheetpath
;
SCH_SHEET_PATH
oldsheetpath
=
m_Parent
->
GetCurrentSheet
();
// sheetpath is saved here
wxString
plotFileName
;
PAGE_INFO
*
actualPage
;
// page size selected in schematic
PAGE_INFO
*
plotPage
;
// page size selected to plot
PAGE_INFO
actualPage
;
// page size selected in schematic
PAGE_INFO
plotPage
;
// page size selected to plot
wxPoint
plot_offset
;
/* When printing all pages, the printed page is not the current page.
...
...
@@ -213,16 +214,16 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
sheetpath
=
SheetList
.
GetNext
();
}
actualPage
=
screen
->
m_CurrentSheetDesc
;
actualPage
=
screen
->
GetPageSettings
()
;
switch
(
m_pageSizeSelect
)
{
case
PAGE_SIZE_A
:
plotPage
=
&
g_Sheet_A
;
plotPage
.
SetType
(
wxT
(
"A"
)
)
;
break
;
case
PAGE_SIZE_A4
:
plotPage
=
&
g_Sheet_A4
;
plotPage
.
SetType
(
wxT
(
"A4"
)
)
;
break
;
case
PAGE_SIZE_AUTO
:
...
...
@@ -231,8 +232,9 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
break
;
}
double
scalex
=
(
double
)
plotPage
->
m_Size
.
x
/
actualPage
->
m_Size
.
x
;
double
scaley
=
(
double
)
plotPage
->
m_Size
.
y
/
actualPage
->
m_Size
.
y
;
double
scalex
=
(
double
)
plotPage
.
GetWidthMils
()
/
actualPage
.
GetWidthMils
();
double
scaley
=
(
double
)
plotPage
.
GetHeightMils
()
/
actualPage
.
GetHeightMils
();
double
scale
=
10
*
MIN
(
scalex
,
scaley
);
plot_offset
.
x
=
0
;
...
...
@@ -254,7 +256,7 @@ void DIALOG_PLOT_SCHEMATIC_PS::createPSFile()
void
DIALOG_PLOT_SCHEMATIC_PS
::
plotOneSheetPS
(
const
wxString
&
FileName
,
SCH_SCREEN
*
screen
,
PAGE_INFO
*
sheet
,
const
PAGE_INFO
&
pageInfo
,
wxPoint
plot_offset
,
double
scale
)
{
...
...
@@ -276,12 +278,12 @@ void DIALOG_PLOT_SCHEMATIC_PS::plotOneSheetPS( const wxString& FileName,
m_MsgBox
->
AppendText
(
msg
);
PS_PLOTTER
*
plotter
=
new
PS_PLOTTER
();
plotter
->
set_paper_size
(
sheet
);
plotter
->
SetPageSettings
(
pageInfo
);
plotter
->
set_viewport
(
plot_offset
,
scale
,
0
);
plotter
->
set_default_line_width
(
g_DrawDefaultLineThickness
);
plotter
->
set_color_mode
(
m_plotColorOpt
);
/
* Init : */
/
/ Init :
plotter
->
set_creator
(
wxT
(
"Eeschema-PS"
)
);
plotter
->
set_filename
(
FileName
);
plotter
->
start_plot
(
output_file
);
...
...
eeschema/sch_screen.cpp
View file @
d3afe95c
...
...
@@ -620,7 +620,7 @@ void SCH_SCREEN::Draw( EDA_DRAW_PANEL* aCanvas, wxDC* aDC, int aDrawMode, int aC
void
SCH_SCREEN
::
Plot
(
PLOTTER
*
aPlotter
)
{
for
(
SCH_ITEM
*
item
=
GetDrawItems
();
item
!=
NULL
;
item
=
item
->
Next
()
)
for
(
SCH_ITEM
*
item
=
GetDrawItems
();
item
;
item
=
item
->
Next
()
)
{
aPlotter
->
set_current_line_width
(
item
->
GetPenSize
()
);
item
->
Plot
(
aPlotter
);
...
...
include/class_sch_screen.h
View file @
d3afe95c
...
...
@@ -65,7 +65,7 @@ class SCH_SCREEN : public BASE_SCREEN
///< Delete when it goes to zero.
/// The size of the paper to print or plot on
PAGE_INFO
m_paper
;
// keep with the MVC
model
as this class gets split
PAGE_INFO
m_paper
;
// keep with the MVC
'model'
as this class gets split
SCH_ITEM
*
m_drawList
;
///< Object list for the screen.
/// @todo use DLIST<SCH_ITEM> or superior container
...
...
include/common.h
View file @
d3afe95c
...
...
@@ -44,13 +44,13 @@ class BASE_SCREEN;
class
EDA_DRAW_FRAME
;
class
EDA_DRAW_PANEL
;
/
* Flag for special keys */
/
/ Flag for special keys
#define GR_KB_RIGHTSHIFT 0x10000000
/* Keybd states: right
* shift key depressed */
#define GR_KB_LEFTSHIFT 0x20000000
/* left shift key depressed
*/
#define GR_KB_CTRL 0x40000000
/
* CTRL depressed */
#define GR_KB_ALT 0x80000000
/
* ALT depressed */
#define GR_KB_CTRL 0x40000000 /
/ CTRL depressed
#define GR_KB_ALT 0x80000000 /
/ ALT depressed
#define GR_KB_SHIFT (GR_KB_LEFTSHIFT | GR_KB_RIGHTSHIFT)
#define GR_KB_SHIFTCTRL (GR_KB_SHIFT | GR_KB_CTRL)
#define MOUSE_MIDDLE 0x08000000
/* Middle button mouse
...
...
@@ -74,7 +74,7 @@ enum pseudokeys {
#define ESC 27
/
* TODO Executable names TODO*/
/
/ TODO Executable names TODO
#ifdef __WINDOWS__
#define CVPCB_EXE wxT( "cvpcb.exe" )
#define PCBNEW_EXE wxT( "pcbnew.exe" )
...
...
@@ -101,7 +101,7 @@ enum pseudokeys {
#endif
/
* Graphic Texts Orientation in 0.1 degree*/
/
/ Graphic Texts Orientation in 0.1 degree
#define TEXT_ORIENT_HORIZ 0
#define TEXT_ORIENT_VERT 900
...
...
@@ -116,13 +116,13 @@ enum EDA_UNITS_T {
};
#if defined(KICAD_GOST)
#define GOST_LEFTMARGIN 800
/
* 20mm */
#define GOST_RIGHTMARGIN 200
/
* 5mm */
#define GOST_TOPMARGIN 200
/
* 5mm */
#define GOST_BOTTOMMARGIN 200
/
* 5mm */
#define GOST_LEFTMARGIN 800 /
/ 20mm
#define GOST_RIGHTMARGIN 200 /
/ 5mm
#define GOST_TOPMARGIN 200 /
/ 5mm
#define GOST_BOTTOMMARGIN 200 /
/ 5mm
#endif
/
* forward declarations: */
/
/ forward declarations:
class
LibNameList
;
...
...
@@ -131,9 +131,8 @@ class PAGE_INFO;
/**
* Class PAGE_INFO
* describes the page size and margins of a paper page on which to
* eventually print or plot. Since paper is often described in inches,
* (and due to legacy code), inches, mils, and internal units (IU) are supported
* in the accessors. Again, we are describing paper in this class.
* eventually print or plot. Here paper is described in inches, but
* accessors for mils, and internal units (IU) are supported.
*
* @author Dick Hollenbeck
*/
...
...
@@ -141,7 +140,7 @@ class PAGE_INFO
{
public
:
PAGE_INFO
(
const
wxString
&
aType
=
wxT
(
"A3"
)
);
PAGE_INFO
(
const
wxSize
&
aSizeMils
,
const
wx
Point
&
aOffsetMils
,
const
wx
String
&
aName
);
PAGE_INFO
(
const
wxSize
&
aSizeMils
,
const
wxString
&
aName
);
const
wxString
&
GetType
()
const
{
return
m_Type
;
}
...
...
@@ -187,7 +186,7 @@ public:
const
wxSize
GetSizeIU
()
const
{
return
wxSize
(
GetWidthIU
(),
GetHeightIU
()
);
}
#endif
wxPoint
GetOffsetMils
()
const
{
return
m_Offset
;
}
//
wxPoint GetOffsetMils() const { return m_Offset; }
int
GetLeftMarginMils
()
const
{
return
m_LeftMargin
;
}
int
GetRightMarginMils
()
const
{
return
m_RightMargin
;
}
...
...
@@ -218,7 +217,7 @@ private:
double
m_widthInches
;
double
m_heightInches
;
wxPoint
m_Offset
;
///< plot offset in 1/1000 inches
//
wxPoint m_Offset; ///< plot offset in 1/1000 inches
int
m_LeftMargin
;
int
m_RightMargin
;
...
...
@@ -232,10 +231,10 @@ private:
extern
wxString
g_ProductName
;
/
* Default user lib path can be left void, if the standard lib path is used */
/
// Default user lib path can be left void, if the standard lib path is used
extern
wxString
g_UserLibDirBuffer
;
extern
bool
g_ShowPageLimits
;
//
true to display the page limits
extern
bool
g_ShowPageLimits
;
///<
true to display the page limits
/**
* File extension definitions. Please do not changes these. If a different
...
...
@@ -263,10 +262,10 @@ extern const wxString MacrosFileWildcard;
extern
const
wxString
AllFilesWildcard
;
// Name of default configuration file. (kicad.pro)
//
/
Name of default configuration file. (kicad.pro)
extern
wxString
g_Prj_Default_Config_FullFilename
;
// Name of local configuration file. (<curr projet>.pro)
//
/
Name of local configuration file. (<curr projet>.pro)
extern
wxString
g_Prj_Config_LocalFilename
;
extern
EDA_UNITS_T
g_UserUnit
;
///< display units
...
...
@@ -275,7 +274,7 @@ extern EDA_UNITS_T g_UserUnit; ///< display units
extern
int
g_GhostColor
;
/
* COMMON.CPP */
/
/ COMMON.CPP
/**
* Function SetLocaleTo_C_standard
...
...
pcbnew/dialogs/dialog_pad_properties.cpp
View file @
d3afe95c
...
...
@@ -343,7 +343,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
break
;
}
msg
.
Printf
(
wxT
(
"%
d"
),
m_dummyPad
->
m_Orient
);
msg
.
Printf
(
wxT
(
"%
g"
),
m_dummyPad
->
GetOrientation
()
);
m_PadOrientCtrl
->
SetValue
(
msg
);
// Type of pad selection
...
...
@@ -493,7 +493,7 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
}
wxString
msg
;
msg
.
Printf
(
wxT
(
"%
d"
),
m_dummyPad
->
m_Orient
);
msg
.
Printf
(
wxT
(
"%
g"
),
m_dummyPad
->
GetOrientation
()
);
m_PadOrientCtrl
->
SetValue
(
msg
);
TransfertDataToPad
(
m_dummyPad
);
...
...
@@ -775,10 +775,11 @@ bool DIALOG_PAD_PROPERTIES::TransfertDataToPad( D_PAD* aPad, bool aPromptOnError
aPad
->
m_Offset
.
x
=
ReturnValueFromTextCtrl
(
*
m_ShapeOffset_X_Ctrl
,
internalUnits
);
aPad
->
m_Offset
.
y
=
ReturnValueFromTextCtrl
(
*
m_ShapeOffset_Y_Ctrl
,
internalUnits
);
long
orient_value
=
0
;
double
orient_value
=
0
;
msg
=
m_PadOrientCtrl
->
GetValue
();
msg
.
ToLong
(
&
orient_value
);
aPad
->
m_Orient
=
orient_value
;
msg
.
ToDouble
(
&
orient_value
);
aPad
->
SetOrientation
(
orient_value
);
msg
=
m_PadNumCtrl
->
GetValue
().
Left
(
4
);
aPad
->
SetPadName
(
msg
);
...
...
pcbnew/files.cpp
View file @
d3afe95c
...
...
@@ -299,9 +299,10 @@ this file again." ) );
}
}
catch
(
IO_ERROR
ioe
)
{
wxMessageBox
(
"catch"
);
{
wxString
msg
=
wxString
::
Format
(
_
(
"Error loading board.
\n
%s"
),
ioe
.
errorText
.
GetData
()
);
wxMessageBox
(
msg
,
_
(
"Open Board File"
),
wxOK
|
wxICON_ERROR
);
}
...
...
pcbnew/loadcmp.cpp
View file @
d3afe95c
...
...
@@ -367,7 +367,7 @@ wxString PCB_BASE_FRAME::Select_1_Module_From_List( EDA_DRAW_FRAME* aWindow,
if
(
footprint_names_list
.
GetCount
()
)
{
msg
.
Printf
(
_
(
"Modules [%d items]"
),
footprint_names_list
.
GetCount
()
);
msg
.
Printf
(
_
(
"Modules [%d items]"
),
(
int
)
footprint_names_list
.
GetCount
()
);
EDA_LIST_DIALOG
dlg
(
aWindow
,
msg
,
footprint_names_list
,
OldName
,
DisplayCmpDoc
,
GetComponentDialogPosition
()
);
...
...
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