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
527de3e5
Commit
527de3e5
authored
Oct 30, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Minor enhancements, and minor code cleanup. Eeschema: added hotkey J to place junctions
parents
a6a75605
355fc48e
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
164 additions
and
90 deletions
+164
-90
3d_canvas.cpp
3d-viewer/3d_canvas.cpp
+32
-2
3d_draw.cpp
3d-viewer/3d_draw.cpp
+22
-39
CMakeLists.txt
bitmaps/CMakeLists.txt
+1
-0
import_cmp_from_lib.xpm
bitmaps/import_cmp_from_lib.xpm
+38
-0
drawframe.cpp
common/drawframe.cpp
+14
-8
hotkeys.cpp
eeschema/hotkeys.cpp
+37
-23
hotkeys.h
eeschema/hotkeys.h
+1
-0
tool_lib.cpp
eeschema/tool_lib.cpp
+3
-3
bitmaps.h
include/bitmaps.h
+1
-0
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+12
-12
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+3
-3
No files found.
3d-viewer/3d_canvas.cpp
View file @
527de3e5
...
...
@@ -24,6 +24,34 @@
#include "bitmaps.h"
// -----------------
// helper function (from wxWidgets, opengl/cube.cpp sample
// -----------------
void
CheckGLError
()
{
GLenum
errLast
=
GL_NO_ERROR
;
for
(
;;
)
{
GLenum
err
=
glGetError
();
if
(
err
==
GL_NO_ERROR
)
return
;
// normally the error is reset by the call to glGetError() but if
// glGetError() itself returns an error, we risk looping forever here
// so check that we get a different error than the last time
if
(
err
==
errLast
)
{
wxLogError
(
wxT
(
"OpenGL error state couldn't be reset."
));
return
;
}
errLast
=
err
;
wxLogError
(
wxT
(
"OpenGL error %d"
),
err
);
}
}
/*
* Pcb3D_GLCanvas implementation
*/
...
...
@@ -519,7 +547,7 @@ void Pcb3D_GLCanvas::InitGL()
{
// Ratio width / height of the window display
double
ratio_HV
=
(
double
)
size
.
x
/
size
.
y
;
// Initialize Projection Matrix for Perspective View
gluPerspective
(
45.0
*
g_Parm_3D_Visu
.
m_Zoom
,
ratio_HV
,
1
,
10
);
}
...
...
@@ -538,6 +566,8 @@ void Pcb3D_GLCanvas::InitGL()
// Setup light souces:
SetLights
();
CheckGLError
();
}
...
...
@@ -603,7 +633,7 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
GLint
x
;
GLint
y
;
}
viewport
;
// Build image from the 3D buffer
wxWindowUpdateLocker
noUpdates
(
this
);
glGetIntegerv
(
GL_VIEWPORT
,
(
GLint
*
)
&
viewport
);
...
...
3d-viewer/3d_draw.cpp
View file @
527de3e5
...
...
@@ -20,6 +20,8 @@
#error Please set wxUSE_GLCANVAS to 1 in setup.h.
#endif
extern
void
CheckGLError
();
static
void
Draw3D_FilledCircle
(
double
posx
,
double
posy
,
double
rayon
,
double
hole_rayon
,
double
zpos
);
static
void
Draw3D_FilledSegment
(
double
startx
,
double
starty
,
...
...
@@ -348,9 +350,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
glEndList
();
/* Test for errors */
GLenum
err
=
glGetError
();
if
(
err
!=
GL_NO_ERROR
)
DisplayError
(
this
,
wxT
(
"Error in GL commands"
)
);
CheckGLError
();
return
m_gllist
;
}
...
...
@@ -786,8 +787,6 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
delta_cx
,
delta_cy
,
xc
,
yc
;
int
angle
,
delta_angle
;
int
coord
[
4
][
2
];
double
fcoord
[
8
][
2
],
f_hole_coord
[
8
][
2
];
double
scale
;
double
zpos
;
wxPoint
shape_pos
;
...
...
@@ -917,33 +916,18 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
break
;
case
PAD_RECT
:
case
PAD_TRAPEZOID
:
{
int
ddx
,
ddy
;
ddx
=
m_DeltaSize
.
x
>>
1
;
ddy
=
m_DeltaSize
.
y
>>
1
;
coord
[
0
][
0
]
=
-
dx
-
ddy
;
coord
[
0
][
1
]
=
+
dy
+
ddx
;
coord
[
1
][
0
]
=
-
dx
+
ddy
;
coord
[
1
][
1
]
=
-
dy
-
ddx
;
coord
[
2
][
0
]
=
+
dx
-
ddy
;
coord
[
2
][
1
]
=
-
dy
+
ddx
;
coord
[
3
][
0
]
=
+
dx
+
ddy
;
coord
[
3
][
1
]
=
+
dy
-
ddx
;
wxPoint
coord
[
5
];
wxRealPoint
fcoord
[
8
],
f_hole_coord
[
8
];
BuildPadPolygon
(
coord
,
wxSize
(
0
,
0
),
angle
);
for
(
ii
=
0
;
ii
<
4
;
ii
++
)
{
RotatePoint
(
&
coord
[
ii
][
0
],
&
coord
[
ii
][
1
],
angle
);
coord
[
ii
][
0
]
+=
ux0
;
coord
[
ii
][
1
]
+=
uy0
;
coord
[
ii
].
x
+=
ux0
;
coord
[
ii
].
y
+=
uy0
;
ll
=
ii
*
2
;
fcoord
[
ll
]
[
0
]
=
coord
[
ii
][
0
]
*
scale
;
fcoord
[
ll
]
[
1
]
=
coord
[
ii
][
1
]
*
scale
;
fcoord
[
ll
]
.
x
=
coord
[
ii
].
x
*
scale
;
fcoord
[
ll
]
.
y
=
coord
[
ii
].
y
*
scale
;
}
for
(
ii
=
0
;
ii
<
7
;
ii
+=
2
)
...
...
@@ -951,18 +935,17 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
ll
=
ii
+
2
;
if
(
ll
>
7
)
ll
-=
8
;
fcoord
[
ii
+
1
]
[
0
]
=
(
fcoord
[
ii
][
0
]
+
fcoord
[
ll
][
0
]
)
/
2
;
fcoord
[
ii
+
1
]
[
1
]
=
(
fcoord
[
ii
][
1
]
+
fcoord
[
ll
][
1
]
)
/
2
;
fcoord
[
ii
+
1
]
.
x
=
(
fcoord
[
ii
].
x
+
fcoord
[
ll
].
x
)
/
2
;
fcoord
[
ii
+
1
]
.
y
=
(
fcoord
[
ii
].
y
+
fcoord
[
ll
].
y
)
/
2
;
}
for
(
ii
=
0
;
ii
<
8
;
ii
++
)
{
f_hole_coord
[
ii
][
0
]
=
-
hole
*
0.707
;
f_hole_coord
[
ii
][
1
]
=
hole
*
0.707
;
RotatePoint
(
&
f_hole_coord
[
ii
][
0
],
&
f_hole_coord
[
ii
][
1
],
angle
-
(
ii
*
450
)
);
f_hole_coord
[
ii
][
0
]
+=
drillx
;
f_hole_coord
[
ii
][
1
]
+=
drilly
;
f_hole_coord
[
ii
].
x
=
-
hole
*
0.707
;
f_hole_coord
[
ii
].
y
=
hole
*
0.707
;
RotatePoint
(
&
f_hole_coord
[
ii
].
x
,
&
f_hole_coord
[
ii
].
y
,
angle
-
(
ii
*
450
)
);
f_hole_coord
[
ii
].
x
+=
drillx
;
f_hole_coord
[
ii
].
y
+=
drilly
;
}
for
(
layer
=
FIRST_COPPER_LAYER
;
layer
<=
LAST_COPPER_LAYER
;
layer
++
)
...
...
@@ -991,12 +974,12 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
glBegin
(
GL_QUAD_STRIP
);
for
(
ii
=
0
;
ii
<
8
;
ii
++
)
{
glVertex3f
(
f_hole_coord
[
ii
]
[
0
],
-
f_hole_coord
[
ii
][
1
]
,
zpos
);
glVertex3f
(
fcoord
[
ii
]
[
0
],
-
fcoord
[
ii
][
1
]
,
zpos
);
glVertex3f
(
f_hole_coord
[
ii
]
.
x
,
-
f_hole_coord
[
ii
].
y
,
zpos
);
glVertex3f
(
fcoord
[
ii
]
.
x
,
-
fcoord
[
ii
].
y
,
zpos
);
}
glVertex3f
(
f_hole_coord
[
0
]
[
0
],
-
f_hole_coord
[
0
][
1
]
,
zpos
);
glVertex3f
(
fcoord
[
0
]
[
0
],
-
fcoord
[
0
][
1
]
,
zpos
);
glVertex3f
(
f_hole_coord
[
0
]
.
x
,
-
f_hole_coord
[
0
].
y
,
zpos
);
glVertex3f
(
fcoord
[
0
]
.
x
,
-
fcoord
[
0
].
y
,
zpos
);
glEnd
();
}
}
...
...
bitmaps/CMakeLists.txt
View file @
527de3e5
...
...
@@ -161,6 +161,7 @@ set(BITMAP_SRCS
icon_pcbnew.xpm
icon_txt.xpm
import3d.xpm
import_cmp_from_lib.xpm
import_hierarchical_label.xpm
Import_Module.xpm
import.xpm
...
...
bitmaps/import_cmp_from_lib.xpm
0 → 100644
View file @
527de3e5
/* XPM */
const char *import_cmp_from_lib_xpm[] = {
/* columns rows colors chars-per-pixel */
"16 16 16 1",
"O c #76787C",
"$ c #979A9C",
"= c #404440",
"; c #ACB1B5",
"# c #04BA04",
"+ c #CACCCC",
"o c #F5F6F7",
". c #2E3031",
" c None",
"* c #124912",
"@ c #049304",
"& c #505355",
"X c #0C290C",
"% c #046404",
"- c #DADBDB",
": c #83888C",
/* pixels */
" .X ",
" ooO ",
" +o++. ",
" @#X$++.$ ",
" %#@X$+X.& ",
" *##@%%%%=&.=.. ",
" OX######%Oooo-.",
" $&*@@##%Ooo-; ",
" :;+:&%@&ooo+: ",
" O;+$*=-oo-;X ",
" =:$+.oooo+O ",
" &O-+oooo; ",
" X&++--o+: ",
" .=O$$$ ",
" .XX ",
" "
};
common/drawframe.cpp
View file @
527de3e5
...
...
@@ -633,37 +633,43 @@ void WinEDA_DrawFrame::UpdateStatusBar()
}
/* The following sadly is an if eeschema/if pcbnew */
wxString
formatter
;
wxString
absformatter
;
wxString
locformatter
;
switch
(
g_UserUnit
)
{
case
INCHES
:
if
(
m_InternalUnits
==
EESCHEMA_INTERNAL_UNIT
)
{
formatter
=
wxT
(
"X %.3f Y %.3f"
);
absformatter
=
wxT
(
"X %.3f Y %.3f"
);
locformatter
=
wxT
(
"dx %.3f dy %.3f"
);
}
else
{
formatter
=
wxT
(
"X %.4f Y %.4f"
);
absformatter
=
wxT
(
"X %.4f Y %.4f"
);
locformatter
=
wxT
(
"dx %.4f dy %.4f"
);
}
break
;
case
MILLIMETRES
:
if
(
m_InternalUnits
==
EESCHEMA_INTERNAL_UNIT
)
{
formatter
=
wxT
(
"X %.2f Y %.2f"
);
absformatter
=
wxT
(
"X %.2f Y %.2f"
);
locformatter
=
wxT
(
"dx %.2f dy %.2f"
);
}
else
{
formatter
=
wxT
(
"X %.3f Y %.3f"
);
absformatter
=
wxT
(
"X %.3f Y %.3f"
);
locformatter
=
wxT
(
"dx %.3f dy %.3f"
);
}
break
;
case
UNSCALED_UNITS
:
formatter
=
wxT
(
"X %f Y %f"
);
absformatter
=
wxT
(
"X %f Y %f"
);
locformatter
=
wxT
(
"dx %f dy %f"
);
break
;
}
Line
.
Printf
(
formatter
,
dXpos
,
dYpos
);
Line
.
Printf
(
abs
formatter
,
dXpos
,
dYpos
);
SetStatusText
(
Line
,
2
);
/* Display relative coordinates: */
...
...
@@ -678,7 +684,7 @@ void WinEDA_DrawFrame::UpdateStatusBar()
}
/* We already decided the formatter above */
Line
.
Printf
(
formatter
,
dXpos
,
dYpos
);
Line
.
Printf
(
loc
formatter
,
dXpos
,
dYpos
);
SetStatusText
(
Line
,
3
);
}
...
...
eeschema/hotkeys.cpp
View file @
527de3e5
...
...
@@ -32,7 +32,7 @@
* s_LibEdit_Hotkey_List list or s_Common_Hotkey_List if the same command is
* added both in eeschema and libedit)
* Add the new code in the switch in OnHotKey() function.
* when the variable
I
temInEdit is true, an item is currently edited.
* when the variable
i
temInEdit is true, an item is currently edited.
* This can be useful if the new function cannot be executed while an item is
* currently being edited
* ( For example, one cannot start a new wire when a component is moving.)
...
...
@@ -100,6 +100,7 @@ static Ki_HotkeyInfo HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_SHIFT + GR_KB_CTRL +
// Schematic editor
static
Ki_HotkeyInfo
HkAddLabel
(
wxT
(
"add Label"
),
HK_ADD_LABEL
,
'L'
);
static
Ki_HotkeyInfo
HkAddJunction
(
wxT
(
"add Junction"
),
HK_ADD_JUNCTION
,
'J'
);
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
static
Ki_HotkeyInfo
HkAddComponent
(
wxT
(
"Add Component"
),
HK_ADD_NEW_COMPONENT
,
'A'
);
...
...
@@ -180,6 +181,7 @@ Ki_HotkeyInfo* s_Schematic_Hotkey_List[] =
&
HkEditComponentFootprint
,
&
HkBeginWire
,
&
HkAddLabel
,
&
HkAddJunction
,
&
HkAddNoConn
,
NULL
};
...
...
@@ -244,9 +246,13 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
cmd
.
SetEventObject
(
this
);
bool
ItemInEdit
=
GetScreen
()
->
GetCurItem
()
&&
GetScreen
()
->
GetCurItem
()
->
m_Flags
;
bool
RefreshToolBar
=
FALSE
;
SCH_SCREEN
*
screen
=
GetScreen
();
// itemInEdit == false means no item currently edited. We can ask for editing a new item
bool
itemInEdit
=
screen
->
GetCurItem
()
&&
screen
->
GetCurItem
()
->
m_Flags
;
// notBusy == true means no item currently edited and no other command in progress
// We can change active tool and ask for editing a new item
bool
notBusy
=
(
!
itemInEdit
)
&&
(
screen
->
m_BlockLocate
.
m_State
==
STATE_NO_BLOCK
);
bool
RefreshToolBar
=
FALSE
;
if
(
hotkey
==
0
)
return
;
...
...
@@ -306,7 +312,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
case
HK_UNDO
:
case
HK_REDO
:
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
wxCommandEvent
event
(
wxEVT_COMMAND_TOOL_CLICKED
,
HK_Descr
->
m_IdMenuEvent
);
wxPostEvent
(
this
,
event
);
...
...
@@ -318,7 +324,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_DELETE
:
if
(
!
ItemInEdit
&&
screen
->
m_BlockLocate
.
m_State
==
STATE_NO_BLOCK
)
if
(
notBusy
)
{
RefreshToolBar
=
LocateAndDeleteItem
(
this
,
DC
);
OnModify
();
...
...
@@ -328,12 +334,12 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_REPEAT_LAST
:
if
(
!
ItemInEdit
&&
g_ItemToRepeat
&&
(
g_ItemToRepeat
->
m_Flags
==
0
)
)
if
(
notBusy
&&
g_ItemToRepeat
&&
(
g_ItemToRepeat
->
m_Flags
==
0
)
)
RepeatDrawItem
(
DC
);
break
;
case
HK_FIND_ITEM
:
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
wxCommandEvent
evt
;
evt
.
SetId
(
ID_FIND_ITEMS
);
...
...
@@ -342,7 +348,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_FIND_NEXT_ITEM
:
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
wxFindDialogEvent
event
(
wxEVT_COMMAND_FIND
,
GetId
()
);
event
.
SetEventObject
(
this
);
...
...
@@ -353,7 +359,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_FIND_NEXT_DRC_MARKER
:
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
wxFindDialogEvent
event
(
EVT_COMMAND_FIND_DRC_MARKER
,
GetId
()
);
event
.
SetEventObject
(
this
);
...
...
@@ -364,7 +370,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_ADD_NEW_COMPONENT
:
// Add component
if
(
!
I
temInEdit
)
if
(
!
i
temInEdit
)
{
// switch to m_ID_current_state = ID_COMPONENT_BUTT;
if
(
m_ID_current_state
!=
ID_COMPONENT_BUTT
)
...
...
@@ -374,7 +380,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_ADD_LABEL
:
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
// switch to m_ID_current_state = ID_LABEL_BUTT;
if
(
m_ID_current_state
!=
ID_LABEL_BUTT
)
...
...
@@ -383,11 +389,19 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
}
break
;
case
HK_BEGIN_WIRE
:
case
HK_ADD_JUNCTION
:
if
(
notBusy
)
{
// switch to m_ID_current_state = ID_JUNCTION_BUTT;
if
(
m_ID_current_state
!=
ID_JUNCTION_BUTT
)
SetToolID
(
ID_JUNCTION_BUTT
,
wxCURSOR_PENCIL
,
_
(
"Add Junction"
)
);
OnLeftClick
(
DC
,
MousePos
);
}
break
;
/* An item is selected. If edited and not a wire, a new command is not
* possible */
if
(
!
ItemInEdit
&&
screen
->
m_BlockLocate
.
m_State
==
STATE_NO_BLOCK
)
case
HK_BEGIN_WIRE
:
// An item is selected. If not a wire, a new command is not possible
if
(
notBusy
)
{
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
{
...
...
@@ -409,7 +423,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_ADD_NOCONN_FLAG
:
// Add a no connected flag
if
(
!
ItemInEdit
)
if
(
notBusy
)
{
if
(
m_ID_current_state
!=
ID_NOCONN_BUTT
)
SetToolID
(
ID_NOCONN_BUTT
,
wxCURSOR_PENCIL
,
_
(
"Add
\"
NoNonnect
\"
Flags"
)
);
...
...
@@ -532,7 +546,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
case
HK_DRAG
:
// Start drag
case
HK_MOVE_COMPONENT_OR_ITEM
:
// Start move component or other schematic item
case
HK_COPY_COMPONENT_OR_LABEL
:
// Duplicate component or text/label
if
(
I
temInEdit
)
if
(
i
temInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
...
...
@@ -627,7 +641,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
case
HK_EDIT
:
if
(
I
temInEdit
)
if
(
i
temInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
{
...
...
@@ -671,7 +685,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_EDIT_COMPONENT_VALUE
:
if
(
I
temInEdit
)
if
(
i
temInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
...
...
@@ -682,7 +696,7 @@ void WinEDA_SchematicFrame::OnHotKey( wxDC* DC, int hotkey,
break
;
case
HK_EDIT_COMPONENT_FOOTPRINT
:
if
(
I
temInEdit
)
if
(
i
temInEdit
)
break
;
if
(
DrawStruct
==
NULL
)
DrawStruct
=
LocateSmallestComponent
(
GetScreen
()
);
...
...
@@ -711,7 +725,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawSt
cmd
.
SetEventObject
(
this
);
wxPoint
MousePos
=
GetScreen
()
->
m_MousePosition
;
bool
I
temInEdit
=
GetScreen
()
->
GetCurItem
()
&&
GetScreen
()
->
GetCurItem
()
->
m_Flags
;
bool
i
temInEdit
=
GetScreen
()
->
GetCurItem
()
&&
GetScreen
()
->
GetCurItem
()
->
m_Flags
;
if
(
hotkey
==
0
)
return
;
...
...
@@ -767,7 +781,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawSt
break
;
case
HK_UNDO
:
if
(
!
I
temInEdit
)
if
(
!
i
temInEdit
)
{
toolCmd
.
SetId
(
wxID_UNDO
);
GetEventHandler
()
->
ProcessEvent
(
toolCmd
);
...
...
@@ -775,7 +789,7 @@ void WinEDA_LibeditFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawSt
break
;
case
HK_REDO
:
if
(
!
I
temInEdit
)
if
(
!
i
temInEdit
)
{
toolCmd
.
SetId
(
wxID_REDO
);
GetEventHandler
()
->
ProcessEvent
(
toolCmd
);
...
...
eeschema/hotkeys.h
View file @
527de3e5
...
...
@@ -32,6 +32,7 @@ enum hotkey_id_commnand {
HK_ADD_NEW_COMPONENT
,
HK_BEGIN_WIRE
,
HK_ADD_LABEL
,
HK_ADD_JUNCTION
,
HK_ADD_NOCONN_FLAG
};
...
...
eeschema/tool_lib.cpp
View file @
527de3e5
...
...
@@ -113,11 +113,11 @@ void WinEDA_LibeditFrame::ReCreateHToolbar()
m_HToolBar
->
AddSeparator
();
m_HToolBar
->
AddTool
(
ID_LIBEDIT_NEW_PART
,
wxEmptyString
,
wxBitmap
(
new_component_xpm
),
_
(
"
N
ew component"
)
);
_
(
"
Create a n
ew component"
)
);
m_HToolBar
->
AddTool
(
ID_LIBEDIT_SELECT_PART
,
wxEmptyString
,
wxBitmap
(
add_component
_xpm
),
_
(
"
Select component to edit
"
)
);
wxBitmap
(
import_cmp_from_lib
_xpm
),
_
(
"
Load component to edit from the current lib
"
)
);
m_HToolBar
->
AddTool
(
ID_LIBEDIT_SAVE_CURRENT_PART
,
wxEmptyString
,
wxBitmap
(
save_part_in_mem_xpm
),
...
...
include/bitmaps.h
View file @
527de3e5
...
...
@@ -152,6 +152,7 @@ extern const char* icon_gerbview_xpm[];
extern
const
char
*
icon_modedit_xpm
[];
extern
const
char
*
icon_txt_xpm
[];
extern
const
char
*
icon_w3d_xpm
[];
extern
const
char
*
import_cmp_from_lib_xpm
[];
extern
const
char
*
import_hierarchical_label_xpm
[];
extern
const
char
*
import_module_xpm
[];
extern
const
char
*
import_xpm
[];
...
...
pcbnew/menubar_pcbframe.cpp
View file @
527de3e5
...
...
@@ -400,7 +400,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"Module"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ADD_MODULE
);
item
=
new
wxMenuItem
(
placeMenu
,
ID_COMPONENT_BUTT
,
text
,
_
(
"
Place a module
"
),
wxITEM_NORMAL
);
_
(
"
Add modules
"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
module_xpm
);
placeMenu
->
Append
(
item
);
...
...
@@ -409,7 +409,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
text
=
AddHotkeyName
(
_
(
"Track"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ADD_NEW_TRACK
);
item
=
new
wxMenuItem
(
placeMenu
,
ID_TRACK_BUTT
,
text
,
_
(
"
Place a track
"
),
wxITEM_NORMAL
);
_
(
"
Add tracks and vias
"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_tracks_xpm
);
placeMenu
->
Append
(
item
);
...
...
@@ -417,14 +417,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Zone */
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ZONES_BUTT
,
_
(
"Zone"
),
_
(
"
Place a filled zone
"
));
_
(
"
Add filled zones on copper layers or technical layers
"
));
item
->
SetBitmap
(
add_zone_xpm
);
placeMenu
->
Append
(
item
);
/* Text */
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_ADD_TEXT_BUTT
,
_
(
"Text"
),
_
(
"
Place
text"
)
);
_
(
"
Add text on copper layers or graphic
text"
)
);
item
->
SetBitmap
(
add_text_xpm
);
placeMenu
->
Append
(
item
);
...
...
@@ -434,28 +434,28 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Graphic Arc */
item
=
new
wxMenuItem
(
graphicsSubMenu
,
ID_PCB_ARC_BUTT
,
_
(
"Arc"
),
_
(
"
Place a
graphic arc"
)
);
_
(
"
Add
graphic arc"
)
);
item
->
SetBitmap
(
add_arc_xpm
);
graphicsSubMenu
->
Append
(
item
);
/* Graphic Circle */
item
=
new
wxMenuItem
(
graphicsSubMenu
,
ID_PCB_CIRCLE_BUTT
,
_
(
"Circle"
),
_
(
"
Place a
graphic circle"
));
_
(
"
Add
graphic circle"
));
item
->
SetBitmap
(
add_circle_xpm
);
graphicsSubMenu
->
Append
(
item
);
/* Dimension */
item
=
new
wxMenuItem
(
graphicsSubMenu
,
ID_PCB_DIMENSION_BUTT
,
_
(
"Dimension"
),
_
(
"
Place a
dimension"
)
);
_
(
"
Add
dimension"
)
);
item
->
SetBitmap
(
add_dimension_xpm
);
graphicsSubMenu
->
Append
(
item
);
/* Line or Polygon */
item
=
new
wxMenuItem
(
graphicsSubMenu
,
ID_PCB_ADD_LINE_BUTT
,
_
(
"Line or Polygon"
),
_
(
"
Place a
graphic line or polygon"
));
_
(
"
Add
graphic line or polygon"
));
item
->
SetBitmap
(
add_dashed_line_xpm
);
graphicsSubMenu
->
Append
(
item
);
...
...
@@ -467,15 +467,15 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Layer alignment target */
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_MIRE_BUTT
,
_
(
"Layer
alignment t
arget"
),
_
(
"
Place a
layer alignment target"
));
_
(
"Layer
Alignment T
arget"
),
_
(
"
Add
layer alignment target"
));
item
->
SetBitmap
(
add_mires_xpm
);
placeMenu
->
Append
(
item
);
/* Drill & Place Offset */
item
=
new
wxMenuItem
(
placeMenu
,
ID_PCB_PLACE_OFFSET_COORD_BUTT
,
_
(
"Drill and Place O
ffset
"
),
_
(
"Place the o
ffset adjus
t for drill and place files"
));
_
(
"Drill and Place O
rigin
"
),
_
(
"Place the o
rigin poin
t for drill and place files"
));
item
->
SetBitmap
(
pcb_offset_xpm
);
placeMenu
->
Append
(
item
);
...
...
pcbnew/tool_pcb.cpp
View file @
527de3e5
...
...
@@ -434,7 +434,7 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar
->
AddTool
(
ID_PCB_ZONES_BUTT
,
wxEmptyString
,
wxBitmap
(
add_zone_xpm
),
_
(
"Add zones"
),
wxITEM_CHECK
);
_
(
"Add
filled
zones"
),
wxITEM_CHECK
);
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddTool
(
ID_PCB_ADD_LINE_BUTT
,
wxEmptyString
,
...
...
@@ -451,7 +451,7 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar
->
AddTool
(
ID_PCB_ADD_TEXT_BUTT
,
wxEmptyString
,
wxBitmap
(
add_text_xpm
),
_
(
"Add text"
),
wxITEM_CHECK
);
_
(
"Add text
on copper layers or graphic text
"
),
wxITEM_CHECK
);
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddTool
(
ID_PCB_DIMENSION_BUTT
,
wxEmptyString
,
...
...
@@ -470,7 +470,7 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddTool
(
ID_PCB_PLACE_OFFSET_COORD_BUTT
,
wxEmptyString
,
wxBitmap
(
pcb_offset_xpm
),
_
(
"
Offset adjus
t for drill and place files"
),
_
(
"
Place the origin poin
t for drill and place files"
),
wxITEM_CHECK
);
m_VToolBar
->
AddTool
(
ID_PCB_PLACE_GRID_COORD_BUTT
,
wxEmptyString
,
...
...
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