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
e8e6f1a7
Commit
e8e6f1a7
authored
Jun 04, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleaning and very minor bugs fixed
parent
6f631976
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
59 additions
and
30 deletions
+59
-30
base_struct.cpp
common/base_struct.cpp
+8
-8
pcbcommon.cpp
common/pcbcommon.cpp
+0
-1
options.cpp
gerbview/options.cpp
+1
-1
set_color.cpp
gerbview/set_color.cpp
+6
-2
set_color.h
gerbview/set_color.h
+1
-1
base_struct.h
include/base_struct.h
+4
-4
pcbcommon.h
include/pcbcommon.h
+0
-1
dialog_general_options.cpp
pcbnew/dialog_general_options.cpp
+1
-1
pcbcfg.cpp
pcbnew/pcbcfg.cpp
+21
-1
pcbcfg.h
pcbnew/pcbcfg.h
+8
-8
set_color.cpp
pcbnew/set_color.cpp
+6
-1
set_color.h
pcbnew/set_color.h
+3
-1
No files found.
common/base_struct.cpp
View file @
e8e6f1a7
...
...
@@ -328,7 +328,7 @@ bool EDA_TextStruct::HitTest( EDA_Rect& refArea )
void
EDA_TextStruct
::
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
int
aDrawMode
,
GRFillMode
a
Display
Mode
,
EDA_Colors
aAnchor_color
)
GRFillMode
a
Fill
Mode
,
EDA_Colors
aAnchor_color
)
/***************************************************************/
/** Function Draw
...
...
@@ -338,7 +338,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
* @param aOffset = draw offset (usually (0,0))
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param a
Display
Mode = FILAIRE, FILLED or SKETCH
* @param a
Fill
Mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
*/
...
...
@@ -360,7 +360,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
aOffset
,
aColor
,
aDrawMode
,
a
Display
Mode
,
a
Fill
Mode
,
aAnchor_color
,
txt
,
pos
);
...
...
@@ -375,7 +375,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
aOffset
,
aColor
,
aDrawMode
,
a
Display
Mode
,
a
Fill
Mode
,
aAnchor_color
,
m_Text
,
m_Pos
);
...
...
@@ -390,7 +390,7 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
* @param aOffset = draw offset (usually (0,0))
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param a
Display
Mode = FILAIRE, FILLED or SKETCH
* @param a
Fill
Mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
* @param EDA_Colors aText = the single line of text to draw.
* @param EDA_Colors aPos = the position of this line ).
...
...
@@ -398,12 +398,12 @@ void EDA_TextStruct::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC,
void
EDA_TextStruct
::
DrawOneLineOfText
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
int
aDrawMode
,
GRFillMode
a
Display
Mode
,
EDA_Colors
aAnchor_color
,
GRFillMode
a
Fill
Mode
,
EDA_Colors
aAnchor_color
,
wxString
&
aText
,
wxPoint
aPos
)
{
int
width
=
m_Width
;
if
(
a
Display
Mode
==
FILAIRE
)
if
(
a
Fill
Mode
==
FILAIRE
)
width
=
0
;
if
(
aDrawMode
!=
-
1
)
...
...
@@ -425,7 +425,7 @@ void EDA_TextStruct::DrawOneLineOfText( WinEDA_DrawPanel* aPanel, wxDC* aDC,
cX
,
cY
+
anchor_size
,
0
,
aAnchor_color
);
}
if
(
a
Display
Mode
==
SKETCH
)
if
(
a
Fill
Mode
==
SKETCH
)
width
=
-
width
;
wxSize
size
=
m_Size
;
...
...
common/pcbcommon.cpp
View file @
e8e6f1a7
...
...
@@ -69,7 +69,6 @@ wxArrayString g_LibName_List; // library list to load
BOARD_ITEM
*
g_UnDeleteStack
[
UNDELETE_STACK_SIZE
];
// Linked list of deleted items
int
g_UnDeleteStackPtr
;
bool
g_ShowGrid
=
true
;
DISPLAY_OPTIONS
DisplayOpt
;
/* Display options for board items */
...
...
gerbview/options.cpp
View file @
e8e6f1a7
...
...
@@ -36,7 +36,7 @@ void WinEDA_GerberFrame::OnSelectOptionToolbar( wxCommandEvent& event )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_GRID
:
m_Draw_Grid
=
g_ShowGrid
=
m_OptionsToolBar
->
GetToolState
(
id
);
m_Draw_Grid
=
m_OptionsToolBar
->
GetToolState
(
id
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
...
...
gerbview/set_color.cpp
View file @
e8e6f1a7
...
...
@@ -19,6 +19,9 @@
#include "protos.h"
// variable used to handle grid visibility:
bool
s_showGrid
;
#include "set_color.h" // Header file associated with this file
// Local variables:
...
...
@@ -132,6 +135,7 @@ void WinEDA_SetColorsFrame::CreateControls()
// Add various items to the dialog box, as determined by the
// details of each element contained within laytool_list[]
s_showGrid
=
m_Parent
->
m_Draw_Grid
;
for
(
lyr
=
0
,
cln
=
0
;
lyr
<
NB_BUTT
;
lyr
++
)
{
// Look for the first set of controls within each column.
...
...
@@ -441,8 +445,8 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
*
laytool_list
[
lyr
]
->
m_NoDisplay
=
laytool_list
[
lyr
]
->
m_CheckBox
->
GetValue
();
}
}
// Additional command required for updating visibility of grid.
m_Parent
->
m_Draw_Grid
=
g_S
howGrid
;
// Additional command required for updating visibility of grid.
m_Parent
->
m_Draw_Grid
=
s_s
howGrid
;
}
...
...
gerbview/set_color.h
View file @
e8e6f1a7
...
...
@@ -324,7 +324,7 @@ static ColorButton Grid_Butt=
_
(
"Grid"
),
// Title
&
g_GridColor
,
// Address of optional parameter
FALSE
,
&
g_S
howGrid
// Address of boolean display control parameter to toggle
&
s_s
howGrid
// Address of boolean display control parameter to toggle
};
static
ColorButton
Show_DCodes_Butt
=
...
...
include/base_struct.h
View file @
e8e6f1a7
...
...
@@ -513,13 +513,13 @@ public:
* @param aDC = the current Device Context
* @param aOffset = draw offset (usually (0,0))
* @param EDA_Colors aColor = text color
* @param aDraw
_m
ode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param aDraw
M
ode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param GRFillMode aDisplay_mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
*/
void
Draw
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
int
aD
isplay
Mode
,
GRFillMode
aDisplay_mode
=
FILAIRE
,
int
aD
raw
Mode
,
GRFillMode
aDisplay_mode
=
FILAIRE
,
EDA_Colors
aAnchor_color
=
UNSPECIFIED_COLOR
);
private
:
...
...
@@ -531,14 +531,14 @@ private:
* @param aOffset = draw offset (usually (0,0))
* @param EDA_Colors aColor = text color
* @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode.
* @param a
Display
Mode = FILAIRE, FILLED or SKETCH
* @param a
Fill
Mode = FILAIRE, FILLED or SKETCH
* @param EDA_Colors aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ).
* @param EDA_Colors aText = the single line of text to draw.
* @param EDA_Colors aPos = the position of this line ).
*/
void
DrawOneLineOfText
(
WinEDA_DrawPanel
*
aPanel
,
wxDC
*
aDC
,
const
wxPoint
&
aOffset
,
EDA_Colors
aColor
,
int
aD
isplayMode
,
GRFillMode
aDisplay_m
ode
,
int
aD
rawMode
,
GRFillMode
aFillM
ode
,
EDA_Colors
aAnchor_color
,
wxString
&
aText
,
wxPoint
aPos
);
public
:
...
...
include/pcbcommon.h
View file @
e8e6f1a7
...
...
@@ -23,7 +23,6 @@ extern int g_TabAllCopperLayerMask[NB_COPPER_LAYERS];
extern
wxArrayString
g_LibName_List
;
// library list to load
extern
bool
g_ShowGrid
;
extern
BOARD_ITEM
*
g_UnDeleteStack
[
UNDELETE_STACK_SIZE
];
extern
int
g_UnDeleteStackPtr
;
extern
DISPLAY_OPTIONS
DisplayOpt
;
...
...
pcbnew/dialog_general_options.cpp
View file @
e8e6f1a7
...
...
@@ -320,7 +320,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
break
;
case
ID_TB_OPTIONS_SHOW_GRID
:
m_Draw_Grid
=
g_ShowGrid
=
m_OptionsToolBar
->
GetToolState
(
id
);
m_Draw_Grid
=
m_OptionsToolBar
->
GetToolState
(
id
);
DrawPanel
->
Refresh
(
);
break
;
...
...
pcbnew/pcbcfg.cpp
View file @
e8e6f1a7
...
...
@@ -182,7 +182,7 @@ file extension to a Kicad project file extension (.pro)." ),
/* User library path takes precedent over default library search paths. */
wxGetApp
().
InsertLibraryPath
(
g_UserLibDirBuffer
,
1
);
/*
Traitement des variables particulieres
: */
/*
Some parameters must be reinitialize after loading a new board or config
: */
g_DesignSettings
.
m_TrackWidthHistory
[
0
]
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_DesignSettings
.
m_ViaSizeHistory
[
0
]
=
g_DesignSettings
.
m_CurrentViaSize
;
...
...
@@ -192,6 +192,26 @@ file extension to a Kicad project file extension (.pro)." ),
g_DesignSettings
.
m_ViaSizeHistory
[
ii
]
=
0
;
}
/* Reset the ITEM_NOT_SHOW flag when loading a new config
* Because it could creates SERIOUS mistakes for the user,
* if some items are not visible after loading a board...
*/
for
(
ii
=
0
;
ii
<
LAYER_COUNT
;
ii
++
)
g_DesignSettings
.
m_LayerColor
[
ii
]
&=
~
ITEM_NOT_SHOW
;
DisplayOpt
.
Show_Modules_Cmp
=
true
;
DisplayOpt
.
Show_Modules_Cu
=
true
;
g_ModuleTextNOVColor
&=
~
ITEM_NOT_SHOW
;
g_ModuleTextCMPColor
&=
~
ITEM_NOT_SHOW
;
g_ModuleTextCUColor
&=
~
ITEM_NOT_SHOW
;
g_PadCMPColor
&=
~
ITEM_NOT_SHOW
;
g_PadCUColor
&=
~
ITEM_NOT_SHOW
;
g_DesignSettings
.
m_ViaColor
[
VIA_THROUGH
]
&=
~
ITEM_NOT_SHOW
;
g_DesignSettings
.
m_ViaColor
[
VIA_BLIND_BURIED
]
&=
~
ITEM_NOT_SHOW
;
g_DesignSettings
.
m_ViaColor
[
VIA_MICROVIA
]
&=
~
ITEM_NOT_SHOW
;
// These parameters could be left in their previous state, or resetted
// Comment or uncomment to keep or reset this option after loading a board
g_AnchorColor
&=
~
ITEM_NOT_SHOW
;
DisplayOpt
.
DisplayPadNoConn
=
true
;
return
TRUE
;
}
...
...
pcbnew/pcbcfg.h
View file @
e8e6f1a7
...
...
@@ -210,11 +210,11 @@ static PARAM_CFG_BOOL TrackAfficheGardeCfg
FALSE
/* Default value */
);
static
PARAM_CFG_
INT
PadFillCfg
static
PARAM_CFG_
BOOL
PadFillCfg
(
INSETUP
,
wxT
(
"PadFill"
),
/* Keyword */
(
int
*
)
&
DisplayOpt
.
DisplayPadFill
,
/* Parameter address */
&
DisplayOpt
.
DisplayPadFill
,
/* Parameter address */
TRUE
/* Default value */
);
...
...
@@ -252,7 +252,7 @@ static PARAM_CFG_INT AfficheTexteModuleCfg // Module Texts: fill/line/sketch
0
,
2
/* Min and max values*/
);
static
PARAM_CFG_INT
Affiche
TextePcb
Cfg
// PCB Texts: fill/line/sketch
static
PARAM_CFG_INT
Affiche
PcbText
Cfg
// PCB Texts: fill/line/sketch
(
INSETUP
,
wxT
(
"PcbAffT"
),
/* Keyword */
...
...
@@ -268,7 +268,7 @@ static PARAM_CFG_BOOL SegmPcb45Cfg // Force 45 degrees for segments
TRUE
/* Default value */
);
static
PARAM_CFG_INT
TextePcb
DimVCfg
static
PARAM_CFG_INT
PcbText
DimVCfg
(
wxT
(
"TxtPcbV"
),
/* Keyword */
&
g_DesignSettings
.
m_PcbTextSize
.
y
,
/* Parameter address */
...
...
@@ -276,7 +276,7 @@ static PARAM_CFG_INT TextePcbDimVCfg
TEXTS_MIN_SIZE
,
TEXTS_MAX_SIZE
/* Min and max values*/
);
static
PARAM_CFG_INT
TextePcb
DimHCfg
static
PARAM_CFG_INT
PcbText
DimHCfg
(
wxT
(
"TxtPcbH"
),
/* Keyword */
&
g_DesignSettings
.
m_PcbTextSize
.
x
,
/* Parameter address */
...
...
@@ -823,10 +823,10 @@ PARAM_CFG_BASE* ParamCfgList[] =
&
PadShowNumCfg
,
&
AfficheContourModuleCfg
,
&
AfficheTexteModuleCfg
,
&
Affiche
TextePcb
Cfg
,
&
Affiche
PcbText
Cfg
,
&
SegmPcb45Cfg
,
&
TextePcb
DimVCfg
,
&
TextePcb
DimHCfg
,
&
PcbText
DimVCfg
,
&
PcbText
DimHCfg
,
&
ColorLayer0Cfg
,
&
ColorLayer1Cfg
,
&
ColorLayer2Cfg
,
...
...
pcbnew/set_color.cpp
View file @
e8e6f1a7
...
...
@@ -17,6 +17,9 @@
#include "pcbnew.h"
#include "protos.h"
// temporary variable used to handle grid visibility:
bool
s_showGrid
;
#include "set_color.h" // Header file associated with this file
// Local variables:
...
...
@@ -129,6 +132,8 @@ void WinEDA_SetColorsFrame::CreateControls()
MainBoxSizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
OuterBoxSizer
->
Add
(
MainBoxSizer
,
1
,
wxGROW
|
wxLEFT
|
wxRIGHT
,
5
);
s_showGrid
=
m_Parent
->
m_Draw_Grid
;
// Add various items to the dialog box, as determined by the
// details of each element contained within laytool_list[]
for
(
lyr
=
0
,
cln
=
0
;
lyr
<
NB_BUTT
;
lyr
++
)
...
...
@@ -470,7 +475,7 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
}
}
// Additional command required for updating visibility of grid.
m_Parent
->
m_Draw_Grid
=
g_S
howGrid
;
m_Parent
->
m_Draw_Grid
=
s_s
howGrid
;
}
...
...
pcbnew/set_color.h
View file @
e8e6f1a7
...
...
@@ -16,6 +16,8 @@ class wxFlexGridSizer;
class
wxStaticLine
;
class
wxStdDialogButtonSizer
;
// variable used to handle grid visibility:
extern
bool
s_showGrid
;
// Specify how many elements are contained within laytool_list[]
const
int
NB_BUTT
=
43
;
...
...
@@ -415,7 +417,7 @@ static ColorButton Grid_Butt =
-
1
,
&
g_GridColor
,
// Address of optional parameter
FALSE
,
&
g_S
howGrid
// Address of boolean display control parameter to toggle
&
s_s
howGrid
// Address of boolean display control parameter to toggle
};
static
ColorButton
Show_Pads_Noconnect_Butt
=
...
...
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