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
a61b48ec
Commit
a61b48ec
authored
Feb 01, 2010
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleaning. Use new font.
parent
d84087c0
Changes
39
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
12056 additions
and
636 deletions
+12056
-636
common.cpp
common/common.cpp
+0
-1
drawframe.cpp
common/drawframe.cpp
+15
-7
drawpanel.cpp
common/drawpanel.cpp
+3
-3
drawtxt.cpp
common/drawtxt.cpp
+5
-3
CMakeLists.txt
cvpcb/CMakeLists.txt
+1
-1
class_DisplayFootprintsFrame.cpp
cvpcb/class_DisplayFootprintsFrame.cpp
+46
-18
class_DisplayFootprintsFrame.h
cvpcb/class_DisplayFootprintsFrame.h
+82
-0
cvframe.cpp
cvpcb/cvframe.cpp
+1
-0
cvstruct.h
cvpcb/cvstruct.h
+2
-65
dialog_display_options.cpp
cvpcb/dialog_display_options.cpp
+2
-1
loadcmp.cpp
cvpcb/loadcmp.cpp
+2
-1
setvisu.cpp
cvpcb/setvisu.cpp
+3
-2
eelayer.cpp
eeschema/eelayer.cpp
+5
-32
eelayer.h
eeschema/eelayer.h
+2
-11
eeschema_config.cpp
eeschema/eeschema_config.cpp
+2
-5
libframe.cpp
eeschema/libframe.cpp
+0
-1
protos.h
eeschema/protos.h
+1
-1
schframe.cpp
eeschema/schframe.cpp
+2
-2
tool_sch.cpp
eeschema/tool_sch.cpp
+1
-1
gerberframe.cpp
gerbview/gerberframe.cpp
+1
-1
gerbview_config.h
gerbview/gerbview_config.h
+0
-10
options.cpp
gerbview/options.cpp
+1
-1
set_color.cpp
gerbview/set_color.cpp
+7
-4
set_color.h
gerbview/set_color.h
+1
-1
HersheySimplexRoman_sans_normal.h.unused
include/HersheySimplexRoman_sans_normal.h.unused
+0
-0
common.h
include/common.h
+0
-3
newstroke_font.h
include/newstroke_font.h
+11330
-0
wxEeschemaStruct.h
include/wxEeschemaStruct.h
+0
-1
wxPcbStruct.h
include/wxPcbStruct.h
+22
-0
wxstruct.h
include/wxstruct.h
+42
-2
kicad.mo
internat/fr/kicad.mo
+0
-0
kicad.po
internat/fr/kicad.po
+435
-423
class_board.cpp
pcbnew/class_board.cpp
+2
-16
modeditoptions.cpp
pcbnew/modeditoptions.cpp
+1
-1
moduleframe.cpp
pcbnew/moduleframe.cpp
+2
-2
pcbframe.cpp
pcbnew/pcbframe.cpp
+34
-4
pcbnew_config.h
pcbnew/pcbnew_config.h
+0
-9
tool_modedit.cpp
pcbnew/tool_modedit.cpp
+1
-1
toolbars_update_user_interface.cpp
pcbnew/toolbars_update_user_interface.cpp
+2
-2
No files found.
common/common.cpp
View file @
a61b48ec
...
...
@@ -68,7 +68,6 @@ const wxString AllFilesWildcard( _( "All files (*)|*" ) );
wxString
g_ProductName
=
wxT
(
"KiCad E.D.A. "
);
bool
g_ShowPageLimits
=
true
;
int
g_GridColor
=
DARKGRAY
;
wxString
g_UserLibDirBuffer
;
int
g_DebugLevel
;
int
g_MouseOldButtons
;
...
...
common/drawframe.cpp
View file @
a61b48ec
...
...
@@ -22,8 +22,9 @@
/* Configuration entry names. */
static
const
wxString
CursorShapeEntry
(
wxT
(
"CuShape"
)
);
static
const
wxString
ShowGridEntry
(
wxT
(
"ShGrid"
)
);
static
const
wxString
CursorShapeEntryKeyword
(
wxT
(
"CursorShape"
)
);
static
const
wxString
ShowGridEntryKeyword
(
wxT
(
"ShowGrid"
)
);
static
const
wxString
GridColorEntryKeyword
(
wxT
(
"GridColor"
)
);
static
const
wxString
LastGridSizeId
(
wxT
(
"_LastGridSize"
)
);
...
...
@@ -60,13 +61,14 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
m_ID_last_state
=
0
;
m_HTOOL_current_state
=
0
;
m_Draw_Axis
=
FALSE
;
// TRUE to draw axis.
m_Draw_Grid
=
FALSE
;
// TRUE to show grid.
m_Draw_Sheet_Ref
=
FALSE
;
// TRUE to display reference sheet.
m_Print_Sheet_Ref
=
TRUE
;
// TRUE to print reference sheet.
m_Draw_Auxiliary_Axis
=
FALSE
;
// TRUE draw auxilary axis.
m_UnitType
=
INTERNAL_UNIT_TYPE
;
// Internal unit = inch
m_CursorShape
=
0
;
m_LastGridSizeId
=
0
;
m_DrawGrid
=
true
;
// hide/Show grid. default = show
m_GridColor
=
DARKGRAY
;
// Grid color
// Internal units per inch: = 1000 for schema, = 10000 for PCB
m_InternalUnits
=
EESCHEMA_INTERNAL_UNIT
;
...
...
@@ -720,8 +722,13 @@ void WinEDA_DrawFrame::LoadSettings()
wxConfig
*
cfg
=
wxGetApp
().
m_EDA_Config
;
WinEDA_BasicFrame
::
LoadSettings
();
cfg
->
Read
(
m_FrameName
+
CursorShapeEntry
,
&
m_CursorShape
,
(
long
)
0
);
cfg
->
Read
(
m_FrameName
+
ShowGridEntry
,
&
m_Draw_Grid
,
true
);
cfg
->
Read
(
m_FrameName
+
CursorShapeEntryKeyword
,
&
m_CursorShape
,
(
long
)
0
);
bool
btmp
;
if
(
cfg
->
Read
(
m_FrameName
+
ShowGridEntryKeyword
,
&
btmp
)
)
SetGridVisibility
(
btmp
);
int
itmp
;
if
(
cfg
->
Read
(
m_FrameName
+
GridColorEntryKeyword
,
&
itmp
)
)
SetGridColor
(
itmp
);
cfg
->
Read
(
m_FrameName
+
LastGridSizeId
,
&
m_LastGridSizeId
,
0L
);
}
...
...
@@ -739,8 +746,9 @@ void WinEDA_DrawFrame::SaveSettings()
wxConfig
*
cfg
=
wxGetApp
().
m_EDA_Config
;
WinEDA_BasicFrame
::
SaveSettings
();
cfg
->
Write
(
m_FrameName
+
CursorShapeEntry
,
m_CursorShape
);
cfg
->
Write
(
m_FrameName
+
ShowGridEntry
,
m_Draw_Grid
);
cfg
->
Write
(
m_FrameName
+
CursorShapeEntryKeyword
,
m_CursorShape
);
cfg
->
Write
(
m_FrameName
+
ShowGridEntryKeyword
,
IsGridVisible
()
);
cfg
->
Write
(
m_FrameName
+
GridColorEntryKeyword
,
GetGridColor
()
);
cfg
->
Write
(
m_FrameName
+
LastGridSizeId
,
(
long
)
m_LastGridSizeId
);
}
...
...
common/drawpanel.cpp
View file @
a61b48ec
...
...
@@ -703,7 +703,7 @@ void WinEDA_DrawPanel::DrawBackGround( wxDC* DC )
GRSetDrawMode
(
DC
,
GR_COPY
);
if
(
m_Parent
->
m_Draw_Grid
)
if
(
m_Parent
->
IsGridVisible
()
)
DrawGrid
(
DC
);
/* Draw axis */
...
...
@@ -789,7 +789,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
#endif
m_Parent
->
PutOnGrid
(
&
org
);
GRSetColorPen
(
DC
,
g_GridColor
);
GRSetColorPen
(
DC
,
m_Parent
->
GetGridColor
()
);
int
xpos
,
ypos
;
...
...
@@ -842,7 +842,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
tmpDC
.
SelectObject
(
tmpBM
);
GRSetColorPen
(
&
tmpDC
,
g_DrawBgColor
);
tmpDC
.
DrawLine
(
0
,
0
,
0
,
screenSize
.
y
-
1
);
// init background
GRSetColorPen
(
&
tmpDC
,
g_GridColor
);
GRSetColorPen
(
&
tmpDC
,
m_Parent
->
GetGridColor
()
);
for
(
jj
=
0
;
;
jj
++
)
// draw grid points
{
yg
=
wxRound
(
jj
*
screen_grid_size
.
y
);
...
...
common/drawtxt.cpp
View file @
a61b48ec
...
...
@@ -18,7 +18,7 @@
#endif
#define EDA_DRAWBASE
#include "
hershey_fonts
.h"
#include "
newstroke_font
.h"
#include "plot_common.h"
/* factor used to calculate actual size of shapes from hershey fonts (could be adjusted depending on the font name)
...
...
@@ -122,13 +122,15 @@ static const char* GetHersheyShapeDescription( int AsciiCode )
}
#endif
if
(
AsciiCode
>
0x7F
)
/* calculate font length */
int
font_length_max
=
sizeof
(
newstroke_font
)
/
sizeof
(
*
newstroke_font
);
if
(
AsciiCode
>=
(
32
+
font_length_max
)
)
AsciiCode
=
'?'
;
if
(
AsciiCode
<
32
)
AsciiCode
=
32
;
/* Clamp control chars */
AsciiCode
-=
32
;
return
hershey_simplex
[
AsciiCode
];
return
newstroke_font
[
AsciiCode
];
}
...
...
cvpcb/CMakeLists.txt
View file @
a61b48ec
...
...
@@ -21,13 +21,13 @@ set(CVPCB_SRCS
cfg.cpp
class_cvpcb.cpp
class_components_listbox.cpp
class_DisplayFootprintsFrame.cpp
class_footprints_listbox.cpp
cvframe.cpp
cvpcb.cpp
dialog_cvpcb_config.cpp
dialog_cvpcb_config_fbp.cpp
dialog_display_options.cpp
displayframe.cpp
dummy_functions.cpp
genequiv.cpp
init.cpp
...
...
cvpcb/
displayf
rame.cpp
→
cvpcb/
class_DisplayFootprintsF
rame.cpp
View file @
a61b48ec
...
...
@@ -13,6 +13,7 @@
#include "bitmaps.h"
#include "protos.h"
#include "cvstruct.h"
#include "class_DisplayFootprintsFrame.h"
/*
* NOTE: There is something in 3d_viewer.h that causes a compiler error in
...
...
@@ -23,20 +24,20 @@
BEGIN_EVENT_TABLE
(
WinEDA_DisplayFrame
,
WinEDA_BasePcbFrame
)
EVT_CLOSE
(
WinEDA_DisplayFrame
::
OnCloseWindow
)
EVT_SIZE
(
WinEDA_DisplayFrame
::
OnSize
)
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
WinEDA_DisplayFrame
::
OnZoom
)
EVT_TOOL
(
ID_OPTIONS_SETUP
,
WinEDA_DisplayFrame
::
InstallOptionsDisplay
)
EVT_TOOL
(
ID_CVPCB_SHOW3D_FRAME
,
WinEDA_DisplayFrame
::
Show3D_Frame
)
BEGIN_EVENT_TABLE
(
DISPLAY_FOOTPRINTS_FRAME
,
WinEDA_BasePcbFrame
)
EVT_CLOSE
(
DISPLAY_FOOTPRINTS_FRAME
::
OnCloseWindow
)
EVT_SIZE
(
DISPLAY_FOOTPRINTS_FRAME
::
OnSize
)
EVT_TOOL_RANGE
(
ID_ZOOM_IN
,
ID_ZOOM_PAGE
,
DISPLAY_FOOTPRINTS_FRAME
::
OnZoom
)
EVT_TOOL
(
ID_OPTIONS_SETUP
,
DISPLAY_FOOTPRINTS_FRAME
::
InstallOptionsDisplay
)
EVT_TOOL
(
ID_CVPCB_SHOW3D_FRAME
,
DISPLAY_FOOTPRINTS_FRAME
::
Show3D_Frame
)
END_EVENT_TABLE
()
/***************************************************************************/
/*
WinEDA_DisplayFrame
: the frame to display the current focused footprint */
/*
DISPLAY_FOOTPRINTS_FRAME
: the frame to display the current focused footprint */
/***************************************************************************/
WinEDA_DisplayFrame
::
WinEDA_DisplayFrame
(
WinEDA_CvpcbFrame
*
father
,
DISPLAY_FOOTPRINTS_FRAME
::
DISPLAY_FOOTPRINTS_FRAME
(
WinEDA_CvpcbFrame
*
father
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
)
:
...
...
@@ -109,7 +110,7 @@ WinEDA_DisplayFrame::WinEDA_DisplayFrame( WinEDA_CvpcbFrame* father,
}
WinEDA_DisplayFrame
::~
WinEDA_DisplayFrame
()
DISPLAY_FOOTPRINTS_FRAME
::~
DISPLAY_FOOTPRINTS_FRAME
()
{
delete
GetBoard
();
...
...
@@ -122,7 +123,7 @@ WinEDA_DisplayFrame::~WinEDA_DisplayFrame()
/* Called when the frame is closed
* Save current settings (frame position and size
*/
void
WinEDA_DisplayFrame
::
OnCloseWindow
(
wxCloseEvent
&
event
)
void
DISPLAY_FOOTPRINTS_FRAME
::
OnCloseWindow
(
wxCloseEvent
&
event
)
{
wxPoint
pos
;
wxSize
size
;
...
...
@@ -135,14 +136,14 @@ void WinEDA_DisplayFrame::OnCloseWindow( wxCloseEvent& event )
}
void
WinEDA_DisplayFrame
::
ReCreateVToolbar
()
void
DISPLAY_FOOTPRINTS_FRAME
::
ReCreateVToolbar
()
{
// Currently, no vertical right toolbar.
// So do nothing
}
void
WinEDA_DisplayFrame
::
ReCreateHToolbar
()
void
DISPLAY_FOOTPRINTS_FRAME
::
ReCreateHToolbar
()
{
if
(
m_HToolBar
!=
NULL
)
return
;
...
...
@@ -184,29 +185,29 @@ void WinEDA_DisplayFrame::ReCreateHToolbar()
}
void
WinEDA_DisplayFrame
::
SetToolbars
()
void
DISPLAY_FOOTPRINTS_FRAME
::
SetToolbars
()
{
}
void
WinEDA_DisplayFrame
::
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
void
DISPLAY_FOOTPRINTS_FRAME
::
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
{
}
void
WinEDA_DisplayFrame
::
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
void
DISPLAY_FOOTPRINTS_FRAME
::
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
)
{
}
bool
WinEDA_DisplayFrame
::
OnRightClick
(
const
wxPoint
&
MousePos
,
bool
DISPLAY_FOOTPRINTS_FRAME
::
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
)
{
return
true
;
}
void
WinEDA_DisplayFrame
::
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
)
void
DISPLAY_FOOTPRINTS_FRAME
::
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
)
{
wxRealPoint
delta
;
int
flagcurseur
=
0
;
...
...
@@ -325,7 +326,7 @@ void WinEDA_DisplayFrame::GeneralControle( wxDC* DC, wxPoint Mouse )
/**
* Display 3D frame of current footprint selection.
*/
void
WinEDA_DisplayFrame
::
Show3D_Frame
(
wxCommandEvent
&
event
)
void
DISPLAY_FOOTPRINTS_FRAME
::
Show3D_Frame
(
wxCommandEvent
&
event
)
{
if
(
m_Draw3DFrame
)
{
...
...
@@ -347,3 +348,30 @@ void WinEDA_DisplayFrame::Show3D_Frame( wxCommandEvent& event )
void
PCB_SCREEN
::
ClearUndoORRedoList
(
UNDO_REDO_CONTAINER
&
,
int
)
{
}
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
bool
DISPLAY_FOOTPRINTS_FRAME
::
IsGridVisible
()
{
return
true
;
}
/** Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* if you want to store/retrieve the grid visiblity in configuration.
* @param aVisible = true if the grid must be shown
*/
void
DISPLAY_FOOTPRINTS_FRAME
::
SetGridVisibility
(
bool
aVisible
)
{
// Currently do nothing because there is no option to hide/show grid
}
/** Function GetGridColor() , virtual
* @return the color of the grid
*/
int
DISPLAY_FOOTPRINTS_FRAME
::
GetGridColor
()
{
return
DARKGRAY
;
}
cvpcb/class_DisplayFootprintsFrame.h
0 → 100644
View file @
a61b48ec
/* class_DisplayFootprintsFrame.h */
/*******************************************************/
/* class DISPLAY_FOOTPRINTS_FRAME: used to display footprints */
/*******************************************************/
class
DISPLAY_FOOTPRINTS_FRAME
:
public
WinEDA_BasePcbFrame
{
public
:
public
:
DISPLAY_FOOTPRINTS_FRAME
(
WinEDA_CvpcbFrame
*
father
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
=
KICAD_DEFAULT_DRAWFRAME_STYLE
);
~
DISPLAY_FOOTPRINTS_FRAME
();
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
);
void
ReCreateHToolbar
();
void
ReCreateVToolbar
();
void
RecreateMenuBar
();
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual
bool
IsGridVisible
();
/** Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* 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
);
/** Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual
int
GetGridColor
();
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
void
SetToolbars
();
void
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
);
void
InstallOptionsDisplay
(
wxCommandEvent
&
event
);
MODULE
*
Get_Module
(
const
wxString
&
CmpName
);
void
Process_Settings
(
wxCommandEvent
&
event
);
void
Show3D_Frame
(
wxCommandEvent
&
event
);
/* SaveCopyInUndoList() virtual
* currently: do nothing in cvpcb.
* but but be defined because it is a pure virtual in WinEDA_BasePcbFrame
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
=
UR_UNSPECIFIED
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
}
/** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
// currently: do nothing in cvpcb.
}
DECLARE_EVENT_TABLE
()
};
cvpcb/cvframe.cpp
View file @
a61b48ec
...
...
@@ -15,6 +15,7 @@
#include "protos.h"
#include "cvstruct.h"
#include "dialog_cvpcb_config.h"
#include "class_DisplayFootprintsFrame.h"
#include "build_version.h"
...
...
cvpcb/cvstruct.h
View file @
a61b48ec
...
...
@@ -13,7 +13,7 @@
/* Forward declarations of all top-level window classes. */
class
FOOTPRINTS_LISTBOX
;
class
COMPONENTS_LISTBOX
;
class
WinEDA_DisplayFrame
;
class
DISPLAY_FOOTPRINTS_FRAME
;
#include "id.h"
...
...
@@ -57,7 +57,7 @@ public:
bool
m_KeepCvpcbOpen
;
FOOTPRINTS_LISTBOX
*
m_FootprintList
;
COMPONENTS_LISTBOX
*
m_ListCmp
;
WinEDA_DisplayFrame
*
DrawFrame
;
DISPLAY_FOOTPRINTS_FRAME
*
DrawFrame
;
WinEDA_Toolbar
*
m_HToolBar
;
wxFileName
m_NetlistFileName
;
wxArrayString
m_ModuleLibNames
;
...
...
@@ -219,67 +219,4 @@ public:
};
/*******************************************************/
/* class WinEDA_DisplayFrame: used to display footprints */
/*******************************************************/
class
WinEDA_DisplayFrame
:
public
WinEDA_BasePcbFrame
{
public
:
public
:
WinEDA_DisplayFrame
(
WinEDA_CvpcbFrame
*
father
,
const
wxString
&
title
,
const
wxPoint
&
pos
,
const
wxSize
&
size
,
long
style
=
KICAD_DEFAULT_DRAWFRAME_STYLE
);
~
WinEDA_DisplayFrame
();
void
OnCloseWindow
(
wxCloseEvent
&
Event
);
void
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
);
void
ReCreateHToolbar
();
void
ReCreateVToolbar
();
void
RecreateMenuBar
();
void
OnLeftClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
void
OnLeftDClick
(
wxDC
*
DC
,
const
wxPoint
&
MousePos
);
bool
OnRightClick
(
const
wxPoint
&
MousePos
,
wxMenu
*
PopMenu
);
void
SetToolbars
();
void
GeneralControle
(
wxDC
*
DC
,
wxPoint
Mouse
);
void
InstallOptionsDisplay
(
wxCommandEvent
&
event
);
MODULE
*
Get_Module
(
const
wxString
&
CmpName
);
void
Process_Settings
(
wxCommandEvent
&
event
);
void
Show3D_Frame
(
wxCommandEvent
&
event
);
/* SaveCopyInUndoList() virtual
* currently: do nothing in cvpcb.
* but but be defined because it is a pure virtual in WinEDA_BasePcbFrame
*/
virtual
void
SaveCopyInUndoList
(
BOARD_ITEM
*
aItemToCopy
,
UndoRedoOpType
aTypeCommand
=
UR_UNSPECIFIED
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
}
/** Function SaveCopyInUndoList (overloaded).
* Creates a new entry in undo list of commands.
* add a list of pickers to handle a list of items
* @param aItemsList = the list of items modified by the command to undo
* @param aTypeCommand = command type (see enum UndoRedoOpType)
* @param aTransformPoint = the reference point of the transformation,
* for commands like move
*/
virtual
void
SaveCopyInUndoList
(
PICKED_ITEMS_LIST
&
aItemsList
,
UndoRedoOpType
aTypeCommand
,
const
wxPoint
&
aTransformPoint
=
wxPoint
(
0
,
0
)
)
{
// currently: do nothing in cvpcb.
}
DECLARE_EVENT_TABLE
()
};
#endif //#ifndef CVSTRUCT_H
cvpcb/dialog_display_options.cpp
View file @
a61b48ec
...
...
@@ -26,6 +26,7 @@
#include "protos.h"
#include "class_drawpanel.h"
#include "cvstruct.h"
#include "class_DisplayFootprintsFrame.h"
#include "dialog_display_options.h"
...
...
@@ -33,7 +34,7 @@
////@end XPM images
void
WinEDA_DisplayFrame
::
InstallOptionsDisplay
(
wxCommandEvent
&
event
)
void
DISPLAY_FOOTPRINTS_FRAME
::
InstallOptionsDisplay
(
wxCommandEvent
&
event
)
{
WinEDA_FootprintDisplayOptionsFrame
*
OptionWindow
=
new
WinEDA_FootprintDisplayOptionsFrame
(
this
);
...
...
cvpcb/loadcmp.cpp
View file @
a61b48ec
...
...
@@ -14,6 +14,7 @@
#include "cvpcb.h"
#include "protos.h"
#include "cvstruct.h"
#include "class_DisplayFootprintsFrame.h"
/**
...
...
@@ -24,7 +25,7 @@
* @param CmpName - Module name
* @return - Module if found otherwise NULL.
*/
MODULE
*
WinEDA_DisplayFrame
::
Get_Module
(
const
wxString
&
CmpName
)
MODULE
*
DISPLAY_FOOTPRINTS_FRAME
::
Get_Module
(
const
wxString
&
CmpName
)
{
int
LineNum
,
Found
=
0
;
unsigned
ii
;
...
...
cvpcb/setvisu.cpp
View file @
a61b48ec
...
...
@@ -10,6 +10,7 @@
#include "cvpcb.h"
#include "protos.h"
#include "cvstruct.h"
#include "class_DisplayFootprintsFrame.h"
/*
* NOTE: There is something in 3d_viewer.h that causes a compiler error in
...
...
@@ -33,7 +34,7 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
if
(
DrawFrame
==
NULL
)
{
DrawFrame
=
new
WinEDA_DisplayFrame
(
this
,
_
(
"Module"
),
DrawFrame
=
new
DISPLAY_FOOTPRINTS_FRAME
(
this
,
_
(
"Module"
),
wxPoint
(
0
,
0
),
wxSize
(
600
,
400
),
KICAD_DEFAULT_DRAWFRAME_STYLE
|
...
...
@@ -85,7 +86,7 @@ void WinEDA_CvpcbFrame::CreateScreenCmp()
/*
* Draws the current highlighted footprint.
*/
void
WinEDA_DisplayFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
void
DISPLAY_FOOTPRINTS_FRAME
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
{
if
(
!
GetBoard
()
)
return
;
...
...
eeschema/eelayer.cpp
View file @
a61b48ec
...
...
@@ -18,8 +18,7 @@
#include "eelayer.h" // Header file associated with this file
// Local variables:
int
CurrentColor
[
NB_BUTT
];
// Holds color for each layer while dialog box open
static
int
CurrentColor
[
NB_BUTT
];
// Holds color for each layer while dialog box open
IMPLEMENT_DYNAMIC_CLASS
(
WinEDA_SetColorsFrame
,
wxDialog
)
...
...
@@ -35,7 +34,7 @@ END_EVENT_TABLE()
/**************************************************************/
void
DisplayColorSetupFrame
(
WinEDA_
Draw
Frame
*
parent
,
void
DisplayColorSetupFrame
(
WinEDA_
Schematic
Frame
*
parent
,
const
wxPoint
&
framepos
)
{
/**************************************************************/
...
...
@@ -56,7 +55,7 @@ WinEDA_SetColorsFrame::WinEDA_SetColorsFrame()
// Standard Constructor
WinEDA_SetColorsFrame
::
WinEDA_SetColorsFrame
(
WinEDA_
Draw
Frame
*
parent
,
WinEDA_SetColorsFrame
::
WinEDA_SetColorsFrame
(
WinEDA_
Schematic
Frame
*
parent
,
const
wxPoint
&
framepos
)
{
m_Parent
=
parent
;
...
...
@@ -224,7 +223,7 @@ void WinEDA_SetColorsFrame::CreateControls()
m_ShowGrid
=
new
wxCheckBox
(
this
,
ID_CHECKBOX_SHOW_GRID
,
_
(
"Grid"
),
wxDefaultPosition
,
wxDefaultSize
,
0
);
m_ShowGrid
->
SetValue
(
m_Parent
->
m_Draw_Grid
);
m_ShowGrid
->
SetValue
(
m_Parent
->
IsGridVisible
()
);
RowBoxSizer
->
Add
(
m_ShowGrid
,
1
,
wxALIGN_CENTER_VERTICAL
|
wxBOTTOM
,
...
...
@@ -283,32 +282,6 @@ void WinEDA_SetColorsFrame::CreateControls()
}
/**********************************************************/
bool
WinEDA_SetColorsFrame
::
ShowToolTips
()
{
/**********************************************************/
return
true
;
}
/**********************************************************/
wxBitmap
WinEDA_SetColorsFrame
::
GetBitmapResource
(
const
wxString
&
name
)
{
/**********************************************************/
wxUnusedVar
(
name
);
return
wxNullBitmap
;
}
/**********************************************************/
wxIcon
WinEDA_SetColorsFrame
::
GetIconResource
(
const
wxString
&
name
)
{
/**********************************************************/
wxUnusedVar
(
name
);
return
wxNullIcon
;
}
/**********************************************************/
void
WinEDA_SetColorsFrame
::
SetColor
(
wxCommandEvent
&
event
)
{
...
...
@@ -367,7 +340,7 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
// The previous command compiles OK, but to prevent a warning
// from being generated when the Linux version is being compiled,
// the next two commands are provided instead.
m_Parent
->
m_Draw_Grid
=
m_ShowGrid
->
GetValue
(
);
m_Parent
->
SetGridVisibility
(
m_ShowGrid
->
GetValue
()
);
// Update color of background
if
(
m_SelBgColor
->
GetSelection
()
==
0
)
...
...
eeschema/eelayer.h
View file @
a61b48ec
...
...
@@ -205,13 +205,6 @@ static ColorButton Layer_Erc_Error_Item =
};
static
ColorButton
Layer_Grid_Item
=
{
_
(
"Grid"
),
// Title
&
g_GridColor
// Adr of optional parameter
};
static
ColorButton
*
laytool_list
[
NB_BUTT
]
=
{
&
Layer_Wire_Item
,
&
Layer_Bus_Item
,
...
...
@@ -239,8 +232,6 @@ static ColorButton* laytool_list[NB_BUTT] = {
&
Layer_Erc_Warning_Item
,
&
Layer_Erc_Error_Item
,
&
Layer_Grid_Item
};
...
...
@@ -294,7 +285,7 @@ private:
DECLARE_DYNAMIC_CLASS
(
WinEDA_SetColorsFrame
)
DECLARE_EVENT_TABLE
()
WinEDA_
DrawFrame
*
m_Parent
;
WinEDA_
SchematicFrame
*
m_Parent
;
wxBoxSizer
*
OuterBoxSizer
;
wxBoxSizer
*
MainBoxSizer
;
wxBoxSizer
*
ColumnBoxSizer
;
...
...
@@ -334,7 +325,7 @@ private:
public
:
// Constructors and destructor
WinEDA_SetColorsFrame
();
WinEDA_SetColorsFrame
(
WinEDA_
Draw
Frame
*
parent
,
const
wxPoint
&
framepos
);
WinEDA_SetColorsFrame
(
WinEDA_
Schematic
Frame
*
parent
,
const
wxPoint
&
framepos
);
~
WinEDA_SetColorsFrame
();
};
...
...
eeschema/eeschema_config.cpp
View file @
a61b48ec
...
...
@@ -120,7 +120,7 @@ void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
dlg
.
SetRepeatHorizontal
(
g_RepeatStep
.
x
);
dlg
.
SetRepeatVertical
(
g_RepeatStep
.
y
);
dlg
.
SetRepeatLabel
(
g_RepeatDeltaLabel
);
dlg
.
SetShowGrid
(
m_Draw_Grid
);
dlg
.
SetShowGrid
(
IsGridVisible
()
);
dlg
.
SetShowHiddenPins
(
m_ShowAllPins
);
dlg
.
SetEnableAutoPan
(
DrawPanel
->
m_AutoPAN_Enable
);
dlg
.
SetEnableAnyBusOrientation
(
g_HVLines
);
...
...
@@ -140,7 +140,7 @@ void WinEDA_SchematicFrame::OnSetOptions( wxCommandEvent& event )
g_RepeatStep
.
x
=
dlg
.
GetRepeatHorizontal
();
g_RepeatStep
.
y
=
dlg
.
GetRepeatVertical
();
g_RepeatDeltaLabel
=
dlg
.
GetRepeatLabel
();
m_Draw_Grid
=
dlg
.
GetShowGrid
(
);
SetGridVisibility
(
dlg
.
GetShowGrid
()
);
m_ShowAllPins
=
dlg
.
GetShowHiddenPins
();
DrawPanel
->
m_AutoPAN_Enable
=
dlg
.
GetEnableAutoPan
();
g_HVLines
=
dlg
.
GetEnableAnyBusOrientation
();
...
...
@@ -437,9 +437,6 @@ PARAM_CFG_ARRAY& WinEDA_SchematicFrame::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_GridColor
,
DARKDARKGRAY
)
);
return
m_configSettings
;
}
...
...
eeschema/libframe.cpp
View file @
a61b48ec
...
...
@@ -163,7 +163,6 @@ WinEDA_LibeditFrame::WinEDA_LibeditFrame( wxWindow* father,
{
m_FrameName
=
wxT
(
"LibeditFrame"
);
m_Draw_Axis
=
true
;
// true to draw axis
m_Draw_Grid
=
true
;
// true to draw grid
m_ConfigPath
=
wxT
(
"LibraryEditor"
);
SetShowDeMorgan
(
false
);
m_drawSpecificConvert
=
true
;
...
...
eeschema/protos.h
View file @
a61b48ec
...
...
@@ -158,7 +158,7 @@ void RedrawOneStruct( WinEDA_DrawPanel* panel,
/**************/
void
SeedLayers
();
EDA_Colors
ReturnLayerColor
(
int
Layer
);
void
DisplayColorSetupFrame
(
WinEDA_
Draw
Frame
*
parent
,
void
DisplayColorSetupFrame
(
WinEDA_
Schematic
Frame
*
parent
,
const
wxPoint
&
pos
);
/*************/
...
...
eeschema/schframe.cpp
View file @
a61b48ec
...
...
@@ -519,9 +519,9 @@ void WinEDA_SchematicFrame::OnUpdateUnits( wxUpdateUIEvent& event )
void
WinEDA_SchematicFrame
::
OnUpdateGrid
(
wxUpdateUIEvent
&
event
)
{
wxString
tool_tip
=
m_Draw_Grid
?
_
(
"Hide grid"
)
:
_
(
"Show grid"
);
wxString
tool_tip
=
IsGridVisible
()
?
_
(
"Hide grid"
)
:
_
(
"Show grid"
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
m_Draw_Grid
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
IsGridVisible
()
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_GRID
,
tool_tip
);
}
...
...
eeschema/tool_sch.cpp
View file @
a61b48ec
...
...
@@ -291,7 +291,7 @@ void WinEDA_SchematicFrame::OnSelectOptionToolbar( wxCommandEvent& event )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_GRID
:
m_Draw_Grid
=
m_OptionsToolBar
->
GetToolState
(
id
);
SetGridVisibility
(
m_OptionsToolBar
->
GetToolState
(
id
)
);
DrawPanel
->
Refresh
();
break
;
...
...
gerbview/gerberframe.cpp
View file @
a61b48ec
...
...
@@ -292,7 +292,7 @@ void WinEDA_GerberFrame::SetToolbars()
DisplayOpt
.
DisplayPolarCood
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
m_Draw_Grid
);
IsGridVisible
()
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SELECT_CURSOR
,
m_CursorShape
);
...
...
gerbview/gerbview_config.h
View file @
a61b48ec
...
...
@@ -337,15 +337,6 @@ static PARAM_CFG_SETCOLOR ColorLayer31Cfg
7
);
static
PARAM_CFG_SETCOLOR
ColorpcbGrilleCfg
(
INSETUP
,
wxT
(
"CoPcbGr"
),
&
g_GridColor
,
DARKGRAY
);
static
PARAM_CFG_SETCOLOR
ColorDCodesCfg
(
INSETUP
,
...
...
@@ -421,7 +412,6 @@ PARAM_CFG_BASE * ParamCfgList[] =
&
ColorLayer29Cfg
,
&
ColorLayer30Cfg
,
&
ColorLayer31Cfg
,
&
ColorpcbGrilleCfg
,
&
ColorDCodesCfg
,
&
GERBERSpotMiniCfg
,
&
TimeOutCfg
,
...
...
gerbview/options.cpp
View file @
a61b48ec
...
...
@@ -29,7 +29,7 @@ void WinEDA_GerberFrame::OnSelectOptionToolbar( wxCommandEvent& event )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_GRID
:
m_Draw_Grid
=
m_OptionsToolBar
->
GetToolState
(
id
);
SetGridVisibility
(
m_OptionsToolBar
->
GetToolState
(
id
)
);
DrawPanel
->
Refresh
(
TRUE
);
break
;
...
...
gerbview/set_color.cpp
View file @
a61b48ec
...
...
@@ -18,6 +18,7 @@
// variable used to handle grid visibility:
bool
s_showGrid
;
int
s_gridColor
;
#include "set_color.h" // Header file associated with this file
...
...
@@ -132,7 +133,8 @@ 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
;
s_showGrid
=
m_Parent
->
IsGridVisible
();
s_gridColor
=
m_Parent
->
GetGridColor
();
for
(
lyr
=
0
,
cln
=
0
;
lyr
<
NB_BUTT
;
lyr
++
)
{
// Look for the first set of controls within each column.
...
...
@@ -435,14 +437,15 @@ void WinEDA_SetColorsFrame::UpdateLayerSettings()
// actually has been provided for each of those layers.)
g_GridColor
=
CurrentColor
[
32
];
s_showGrid
=
laytool_list
[
32
]
->
m_CheckBox
->
GetValue
();
s_gridColor
=
CurrentColor
[
32
];
s_showGrid
=
laytool_list
[
32
]
->
m_CheckBox
->
GetValue
();
g_ColorsSettings
.
SetItemColor
(
DCODES_VISIBLE
,
CurrentColor
[
33
]
);
DisplayOpt
.
DisplayPadNum
=
laytool_list
[
33
]
->
m_CheckBox
->
GetValue
();
// Additional command required for updating visibility of grid.
m_Parent
->
m_Draw_Grid
=
s_showGrid
;
m_Parent
->
SetGridVisibility
(
s_showGrid
);
m_Parent
->
SetGridColor
(
s_gridColor
);
}
...
...
gerbview/set_color.h
View file @
a61b48ec
...
...
@@ -319,7 +319,7 @@ static ButtonIndex Msg_Others_Items =
static
ColorButton
Grid_Butt
=
{
_
(
"Grid"
),
// Title
&
g_G
ridColor
,
// Address of optional parameter
&
s_g
ridColor
,
// Address of optional parameter
FALSE
,
&
s_showGrid
// Address of boolean display control parameter to toggle
};
...
...
include/HersheySimplexRoman_sans_normal.h
→
include/HersheySimplexRoman_sans_normal.h
.unused
View file @
a61b48ec
File moved
include/common.h
View file @
a61b48ec
...
...
@@ -182,9 +182,6 @@ extern int g_UnitMetric; // display units mm = 1, inches = 0, cm = 2
/* Draw color for moving objects: */
extern
int
g_GhostColor
;
/* Draw color for grid: */
extern
int
g_GridColor
;
/* Current used screen: (not used in eeshema)*/
extern
BASE_SCREEN
*
ActiveScreen
;
...
...
include/newstroke_font.h
0 → 100644
View file @
a61b48ec
This diff is collapsed.
Click to expand it.
include/wxEeschemaStruct.h
View file @
a61b48ec
...
...
@@ -73,7 +73,6 @@ private:
PARAM_CFG_ARRAY
m_projectFileParams
;
PARAM_CFG_ARRAY
m_configSettings
;
public
:
WinEDA_SchematicFrame
(
wxWindow
*
father
,
const
wxString
&
title
,
...
...
include/wxPcbStruct.h
View file @
a61b48ec
...
...
@@ -148,6 +148,28 @@ public:
void
GetKicadAbout
(
wxCommandEvent
&
event
);
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual
bool
IsGridVisible
();
/** Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* 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
);
/** Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual
int
GetGridColor
();
/** Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual
void
SetGridColor
(
int
aColor
);
// Configurations:
void
InstallConfigFrame
(
const
wxPoint
&
pos
);
void
Process_Config
(
wxCommandEvent
&
event
);
...
...
include/wxstruct.h
View file @
a61b48ec
...
...
@@ -18,6 +18,7 @@
#include <wx/aui/aui.h>
#endif
#include "colors.h"
//C++ guarantees that operator delete checks its argument for null-ness
#ifndef SAFE_DELETE
...
...
@@ -175,7 +176,6 @@ public:
int
m_UnitType
;
// Internal Unit type (0 = inch)
bool
m_Draw_Axis
;
// TRUE to show X and Y axis
bool
m_Draw_Grid
;
// TRUE to show the grid
bool
m_Draw_Sheet_Ref
;
// TRUE to show frame references
bool
m_Print_Sheet_Ref
;
// TRUE to print frame references
...
...
@@ -189,6 +189,8 @@ public:
protected
:
int
m_LastGridSizeId
;
bool
m_DrawGrid
;
// hide/Show grid
int
m_GridColor
;
// Grid color
private
:
BASE_SCREEN
*
m_CurrentScreen
;
///< current used SCREEN
...
...
@@ -233,6 +235,44 @@ public:
virtual
void
SetToolID
(
int
id
,
int
new_cursor_id
,
const
wxString
&
title
);
/* Thes 4 functions provide a basic way to sho/hide grid
* and /get/set grid color.
* thes parameters are saved in kicad config for each main frame
*/
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
virtual
bool
IsGridVisible
()
{
return
m_DrawGrid
;
}
/** Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* @param aVisible = true if the grid must be shown
*/
virtual
void
SetGridVisibility
(
bool
aVisible
)
{
m_DrawGrid
=
aVisible
;
}
/** Function GetGridColor() , virtual
* @return the color of the grid
*/
virtual
int
GetGridColor
()
{
return
m_GridColor
;
}
/** Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
virtual
void
SetGridColor
(
int
aColor
)
{
m_GridColor
=
aColor
;
}
/**
* Command event handler for selecting grid sizes.
*
...
...
@@ -682,7 +722,7 @@ public:
void
SetToolNormalBitmap
(
int
id
,
const
wxBitmap
&
bitmap
)
{};
void
SetRows
(
int
nRows
)
{};
#endif
/** Function GetDimension
* @return the dimension of this toolbar (Height if horizontal, Width if vertical.
*/
...
...
internat/fr/kicad.mo
View file @
a61b48ec
No preview for this file type
internat/fr/kicad.po
View file @
a61b48ec
This diff is collapsed.
Click to expand it.
pcbnew/class_board.cpp
View file @
a61b48ec
...
...
@@ -432,12 +432,6 @@ void BOARD::SetElementVisibility( int aPCB_VISIBLE, bool isEnabled )
{
switch
(
aPCB_VISIBLE
)
{
case
GRID_VISIBLE
:
m_PcbFrame
->
m_Draw_Grid
=
isEnabled
;
GetBoardDesignSettings
()
->
SetElementVisibility
(
aPCB_VISIBLE
,
isEnabled
);
break
;
case
RATSNEST_VISIBLE
:
GetBoardDesignSettings
()
->
SetElementVisibility
(
aPCB_VISIBLE
,
isEnabled
);
// we must clear or set the CH_VISIBLE flags to hide/show ratsnet
...
...
@@ -478,10 +472,8 @@ int BOARD::GetVisibleElementColor( int aPCB_VISIBLE )
case
PAD_FR_VISIBLE
:
case
PAD_BK_VISIBLE
:
case
RATSNEST_VISIBLE
:
color
=
GetColorsSettings
()
->
GetItemColor
(
aPCB_VISIBLE
);
break
;
case
GRID_VISIBLE
:
color
=
g_GridColor
;
color
=
GetColorsSettings
()
->
GetItemColor
(
aPCB_VISIBLE
)
;
break
;
default
:
...
...
@@ -505,15 +497,9 @@ void BOARD::SetVisibleElementColor( int aPCB_VISIBLE, int aColor )
case
ANCHOR_VISIBLE
:
case
PAD_FR_VISIBLE
:
case
PAD_BK_VISIBLE
:
case
GRID_VISIBLE
:
GetColorsSettings
()
->
SetItemColor
(
aPCB_VISIBLE
,
aColor
);
break
;
case
RATSNEST_VISIBLE
:
GetColorsSettings
()
->
SetItemColor
(
aPCB_VISIBLE
,
aColor
);
break
;
case
GRID_VISIBLE
:
g_GridColor
=
aColor
;
break
;
default
:
wxLogDebug
(
wxT
(
"BOARD::SetVisibleElementColor(): bad arg %d"
),
aPCB_VISIBLE
);
...
...
pcbnew/modeditoptions.cpp
View file @
a61b48ec
...
...
@@ -22,7 +22,7 @@ void WinEDA_ModuleEditFrame::OnSelectOptionToolbar( wxCommandEvent& event )
switch
(
id
)
{
case
ID_TB_OPTIONS_SHOW_GRID
:
m_Draw_Grid
=
m_OptionsToolBar
->
GetToolState
(
id
);
SetGridVisibility
(
m_OptionsToolBar
->
GetToolState
(
id
)
);
DrawPanel
->
Refresh
(
);
break
;
...
...
pcbnew/moduleframe.cpp
View file @
a61b48ec
...
...
@@ -363,9 +363,9 @@ void WinEDA_ModuleEditFrame::SetToolbars()
_
(
"Display polar coordinates"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
m_Draw_Grid
);
IsGridVisible
(
)
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_GRID
,
m_Draw_Grid
?
IsGridVisible
(
)
?
_
(
"Hide grid"
)
:
_
(
"Show grid"
)
);
...
...
pcbnew/pcbframe.cpp
View file @
a61b48ec
...
...
@@ -844,10 +844,6 @@ void WinEDA_PcbFrame::LoadSettings()
config
->
Read
(
PCB_MAGNETIC_TRACKS_OPT
,
&
g_MagneticTrackOption
);
config
->
Read
(
SHOW_MICROWAVE_TOOLS
,
&
m_show_microwave_tools
);
config
->
Read
(
SHOW_LAYER_MANAGER_TOOLS
,
&
m_show_layer_manager_tools
);
// Copy grid visibility (set by LoadSetting() in visibility items list:
GetBoard
()
->
SetElementVisibility
(
GRID_VISIBLE
,
m_Draw_Grid
);
}
...
...
@@ -872,6 +868,40 @@ void WinEDA_PcbFrame::SaveSettings()
}
/** Function IsGridVisible() , virtual
* @return true if the grid must be shown
*/
bool
WinEDA_PcbFrame
::
IsGridVisible
()
{
return
IsElementVisible
(
GRID_VISIBLE
);
}
/** Function SetGridVisibility() , virtual
* It may be overloaded by derived classes
* if you want to store/retrieve the grid visiblity in configuration.
* @param aVisible = true if the grid must be shown
*/
void
WinEDA_PcbFrame
::
SetGridVisibility
(
bool
aVisible
)
{
SetElementVisibility
(
GRID_VISIBLE
,
aVisible
);
}
/** Function GetGridColor() , virtual
* @return the color of the grid
*/
int
WinEDA_PcbFrame
::
GetGridColor
()
{
return
GetBoard
()
->
GetVisibleElementColor
(
GRID_VISIBLE
);
}
/** Function SetGridColor() , virtual
* @param aColor = the new color of the grid
*/
void
WinEDA_PcbFrame
::
SetGridColor
(
int
aColor
)
{
GetBoard
()
->
SetVisibleElementColor
(
GRID_VISIBLE
,
aColor
);
}
/* Return true if a microvia can be put on board
* A microvia ia a small via restricted to 2 near neighbour layers
* because its is hole is made by laser which can penetrate only one layer
...
...
pcbnew/pcbnew_config.h
View file @
a61b48ec
...
...
@@ -579,14 +579,6 @@ static PARAM_CFG_SETCOLOR ColorViaMicroViaCfg // Buried Via Color
CYAN
);
static
PARAM_CFG_SETCOLOR
ColorpcbGrilleCfg
(
INSETUP
,
wxT
(
"CoPcbGr"
),
&
g_GridColor
,
DARKGRAY
);
static
PARAM_CFG_SETCOLOR
ColorCheveluCfg
(
INSETUP
,
...
...
@@ -795,7 +787,6 @@ PARAM_CFG_BASE* ParamCfgList[] =
&
ColorViaThroughCfg
,
&
ColorViaBlindBuriedCfg
,
&
ColorViaMicroViaCfg
,
&
ColorpcbGrilleCfg
,
&
ColorCheveluCfg
,
&
HPGLpenNumCfg
,
&
HPGLdiamCfg
,
...
...
pcbnew/tool_modedit.cpp
View file @
a61b48ec
...
...
@@ -201,7 +201,7 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
m_OptionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_GRID
,
wxEmptyString
,
wxBitmap
(
grid_xpm
),
_
(
"Hide grid"
),
wxITEM_CHECK
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
m_Draw_Grid
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
IsGridVisible
()
);
m_OptionsToolBar
->
AddTool
(
ID_TB_OPTIONS_SHOW_POLAR_COORD
,
wxEmptyString
,
wxBitmap
(
polar_coord_xpm
),
...
...
pcbnew/toolbars_update_user_interface.cpp
View file @
a61b48ec
...
...
@@ -203,9 +203,9 @@ void WinEDA_PcbFrame::SetToolbars()
_
(
"Display rectangular coordinates"
)
:
_
(
"Display polar coordinates"
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
GetBoard
()
->
IsElementVisible
(
GRID_VISIBLE
)
);
m_OptionsToolBar
->
ToggleTool
(
ID_TB_OPTIONS_SHOW_GRID
,
IsGridVisible
(
)
);
m_OptionsToolBar
->
SetToolShortHelp
(
ID_TB_OPTIONS_SHOW_GRID
,
GetBoard
()
->
IsElementVisible
(
GRID_VISIBLE
)
?
IsGridVisible
(
)
?
_
(
"Hide grid"
)
:
_
(
"Show grid"
)
);
...
...
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