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
5a0aca0e
Commit
5a0aca0e
authored
Jan 18, 2010
by
jerryjacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Mac OS X work, see CHANGELOG.txt
parent
e3894962
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
406 additions
and
147 deletions
+406
-147
CHANGELOG.txt
CHANGELOG.txt
+11
-0
TODO.txt
TODO.txt
+7
-1
drawpanel.cpp
common/drawpanel.cpp
+1
-1
cvframe.cpp
cvpcb/cvframe.cpp
+1
-1
cvpcb.cpp
cvpcb/cvpcb.cpp
+21
-13
menucfg.cpp
cvpcb/menucfg.cpp
+31
-9
CMakeLists.txt
eeschema/CMakeLists.txt
+4
-13
eeschema.cpp
eeschema/eeschema.cpp
+11
-11
hotkeys.cpp
eeschema/hotkeys.cpp
+33
-5
menubar.cpp
eeschema/menubar.cpp
+175
-60
schframe.cpp
eeschema/schframe.cpp
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+2
-0
buildmnu.cpp
kicad/buildmnu.cpp
+15
-5
kicad.cpp
kicad/kicad.cpp
+9
-0
Makefile
packaging/mac-osx/dmg-generator/Makefile
+2
-2
edit.cpp
pcbnew/edit.cpp
+1
-4
menubar_pcbframe.cpp
pcbnew/menubar_pcbframe.cpp
+67
-20
pcbframe.cpp
pcbnew/pcbframe.cpp
+5
-1
pcbnew.cpp
pcbnew/pcbnew.cpp
+9
-0
No files found.
CHANGELOG.txt
View file @
5a0aca0e
...
...
@@ -5,6 +5,17 @@ Please add newer entries at the top, list the date and your name with
email address.
2010-Jan-17 UPDATE Jerry Jacobs <xor.gate.engineering[at]gmail[dot]com>
================================================================================
More work to make kicad more Mac OS X compliant.
* Workaround for wxAboutDialog bug.
* WXMAC needs wxID_EXIT to make closing the application function properly.
* Workaround for hotkeys, on Mac OS X we can't use Fx keys.
This needs to be further implemented and is a work in progress.
We need to modify the hotkey code to display Mac OS X the
special modifier keys in the hotkey list.
2010-Jan-18 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++any
...
...
TODO.txt
View file @
5a0aca0e
...
...
@@ -3,10 +3,16 @@ KiCad TODO List
CMAKE
-----
* Add install targets for binaries and resources on Mac.
* Add Python.
WXMAC Platform
--------------
* Fix hotkey list to match CMD key
* Fix AddHotkeyName to let wxWidgets handle Ctrl to CMD key
* Fix About dialog crash, or trash wxAboutDialog and create our own
About dialog to match all platforms. (wxAboutDialog different on platforms)
* Fix toolbar button tooltips.
Common
------
...
...
common/drawpanel.cpp
View file @
5a0aca0e
...
...
@@ -799,7 +799,7 @@ void WinEDA_DrawPanel::DrawGrid( wxDC* DC )
// Under linux, to be tested (could be depend on linux versions
// so perhaps could be necessary to set this option at run time.
#if
0
#if
defined( __WXMAC__ )
// Use a pixel based draw to display grid
// There is a lot of calls, so the cost is hight
...
...
cvpcb/cvframe.cpp
View file @
5a0aca0e
...
...
@@ -35,7 +35,7 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
WinEDA_CvpcbFrame
::
LoadNetList
)
EVT_MENU
(
ID_SAVE_PROJECT
,
WinEDA_CvpcbFrame
::
SaveQuitCvpcb
)
EVT_MENU
(
ID_CVPCB_QU
IT
,
EVT_MENU
(
wxID_EX
IT
,
WinEDA_CvpcbFrame
::
OnQuit
)
EVT_MENU
(
ID_GENERAL_HELP
,
WinEDA_CvpcbFrame
::
GetKicadHelp
)
...
...
cvpcb/cvpcb.cpp
View file @
5a0aca0e
...
...
@@ -36,7 +36,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
* http://wiki.wxwidgets.org/WxMac-specific_topics
*/
void
WinEDA_App
::
MacOpenFile
(
const
wxString
&
fileName
)
{
wxFileName
f
n
=
fileName
;
wxFileName
f
ilename
=
fileName
;
wxString
oldPath
;
WinEDA_CvpcbFrame
*
frame
=
((
WinEDA_CvpcbFrame
*
)
GetTopWindow
());
...
...
@@ -46,16 +46,16 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
/* Update the library search path list. */
if
(
wxGetApp
().
GetLibraryPathList
().
Index
(
oldPath
)
!=
wxNOT_FOUND
)
wxGetApp
().
GetLibraryPathList
().
Remove
(
oldPath
);
wxGetApp
().
GetLibraryPathList
().
Insert
(
f
n
.
GetPath
(),
0
);
wxGetApp
().
GetLibraryPathList
().
Insert
(
f
ilename
.
GetPath
(),
0
);
frame
->
m_NetlistFileName
=
f
n
;
frame
->
m_NetlistFileName
=
f
ilename
;
if
(
frame
->
ReadNetList
()
)
{
frame
->
SetLastProject
(
f
n
.
GetFullPath
()
);
frame
->
SetLastProject
(
f
ilename
.
GetFullPath
()
);
frame
->
SetTitle
(
wxGetApp
().
GetTitle
()
+
wxT
(
" "
)
+
GetBuildVersion
()
+
wxT
(
" "
)
+
f
n
.
GetFullPath
()
);
wxT
(
" "
)
+
f
ilename
.
GetFullPath
()
);
}
else
{
...
...
@@ -75,8 +75,16 @@ IMPLEMENT_APP( WinEDA_App )
bool
WinEDA_App
::
OnInit
()
{
wxFileName
fn
;
wxString
msg
;
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
// wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
filename
;
wxString
message
;
WinEDA_CvpcbFrame
*
frame
=
NULL
;
InitEDA_Appl
(
wxT
(
"CvPCB"
),
APP_TYPE_CVPCB
);
...
...
@@ -89,8 +97,8 @@ bool WinEDA_App::OnInit()
if
(
argc
>
1
)
{
f
n
=
argv
[
1
];
wxSetWorkingDirectory
(
f
n
.
GetPath
()
);
f
ilename
=
argv
[
1
];
wxSetWorkingDirectory
(
f
ilename
.
GetPath
()
);
}
// read current setup and reopen last directory if no filename to open in command line
...
...
@@ -105,17 +113,17 @@ bool WinEDA_App::OnInit()
// Show the frame
SetTopWindow
(
frame
);
frame
->
LoadProjectFile
(
f
n
.
GetFullPath
()
);
frame
->
LoadProjectFile
(
f
ilename
.
GetFullPath
()
);
frame
->
Show
(
TRUE
);
frame
->
BuildFOOTPRINTS_LISTBOX
();
if
(
f
n
.
IsOk
()
&&
fn
.
FileExists
()
)
if
(
f
ilename
.
IsOk
()
&&
filename
.
FileExists
()
)
{
frame
->
m_NetlistFileName
=
f
n
;
frame
->
m_NetlistFileName
=
f
ilename
;
if
(
frame
->
ReadNetList
()
)
{
frame
->
m_NetlistFileExtension
=
f
n
.
GetExt
();
frame
->
m_NetlistFileExtension
=
f
ilename
.
GetExt
();
return
true
;
}
}
...
...
cvpcb/menucfg.cpp
View file @
5a0aca0e
/**
*************************************/
/* menucfg : build the cvpcb main menu */
/***************************************/
/**
* @file menubar.cpp
* (Re)Create the CvPCB main MenuBar
*/
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
...
...
@@ -28,6 +28,16 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
/* Open Recent submenu */
wxMenu
*
openRecentMenu
=
new
wxMenu
();
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
openRecentMenu
,
-
1
,
_
(
"Open &Recent"
),
_
(
"Open a recent opened netlist document"
),
open_project_xpm
);
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save As..."
),
...
...
@@ -35,13 +45,15 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/* Quit on all platforms except WXMAC */
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_CVPCB_QUIT
,
_
(
"E&xit"
),
_
(
"Quit Cvpcb"
)
);
item
->
SetBitmap
(
exit_xpm
);
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit CvPCB"
)
);
filesMenu
->
Append
(
item
);
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
filesMenu
);
#endif
/* !defined( __WXMAC__) */
// Menu Configuration:
wxMenu
*
configmenu
=
new
wxMenu
;
...
...
@@ -70,12 +82,21 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
_
(
"Open the cvpcb manual"
)
);
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About
cvpcb
"
),
_
(
"&About"
),
_
(
"About cvpcb schematic to pcb converter"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Create the menubar and append all submenus
*/
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
...
...
@@ -84,3 +105,4 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
* rebuilt. This allows language changes of the menu text on the fly. */
SetMenuBar
(
menuBar
);
}
eeschema/CMakeLists.txt
View file @
5a0aca0e
...
...
@@ -4,15 +4,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${
CMAKE_SOURCE_DIR
}
/common
${
Boost_INCLUDE_DIR
}
)
##
# Name of target on OSX is also the title of the application
# on other targets this should be as normal
##
if
(
APPLE
)
set
(
EESCHEMA_NAME EESchema
)
else
(
APPLE
)
set
(
EESCHEMA_NAME eeschema
)
endif
(
APPLE
)
set
(
EESCHEMA_SRCS
annotate.cpp
...
...
@@ -157,15 +148,15 @@ if(APPLE)
set
(
MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema
)
endif
(
APPLE
)
add_executable
(
${
EESCHEMA_NAME
}
WIN32 MACOSX_BUNDLE
${
EESCHEMA_SRCS
}
${
EESCHEMA_EXTRA_SRCS
}
${
EESCHEMA_RESOURCES
}
)
add_executable
(
eeschema
WIN32 MACOSX_BUNDLE
${
EESCHEMA_SRCS
}
${
EESCHEMA_EXTRA_SRCS
}
${
EESCHEMA_RESOURCES
}
)
if
(
APPLE
)
set_target_properties
(
${
EESCHEMA_NAME
}
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
set_target_properties
(
eeschema
PROPERTIES MACOSX_BUNDLE_INFO_PLIST
${
CMAKE_CURRENT_SOURCE_DIR
}
/Info.plist
)
endif
(
APPLE
)
target_link_libraries
(
${
EESCHEMA_NAME
}
common bitmaps
${
wxWidgets_LIBRARIES
}
)
target_link_libraries
(
eeschema
common bitmaps
${
wxWidgets_LIBRARIES
}
)
install
(
TARGETS
${
EESCHEMA_NAME
}
install
(
TARGETS
eeschema
DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
...
...
eeschema/eeschema.cpp
View file @
5a0aca0e
...
...
@@ -111,15 +111,15 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool
WinEDA_App
::
OnInit
()
{
/* WXMAC application specific */
#ifdef __WXMAC__
wxApp
::
SetExitOnFrameDelete
(
false
);
wxApp
::
s_macAboutMenuItemId
=
ID_KICAD_ABOUT
;
wxApp
::
s_macPreferencesMenuItemId
=
ID_
CONFIG_REQ
;
//
wxApp::SetExitOnFrameDelete(false);
//
wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_
OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
fn
;
wxFileName
filename
;
WinEDA_SchematicFrame
*
frame
=
NULL
;
g_DebugLevel
=
0
;
// Debug level */
...
...
@@ -133,7 +133,7 @@ bool WinEDA_App::OnInit()
}
if
(
argc
>
1
)
f
n
=
argv
[
1
];
f
ilename
=
argv
[
1
];
/* init EESCHEMA */
SeedLayers
();
...
...
@@ -166,13 +166,13 @@ bool WinEDA_App::OnInit()
frame
->
Zoom_Automatique
(
TRUE
);
/* Load file specified in the command line. */
if
(
f
n
.
IsOk
()
)
if
(
f
ilename
.
IsOk
()
)
{
if
(
f
n
.
GetExt
()
!=
SchematicFileExtension
)
f
n
.
SetExt
(
SchematicFileExtension
);
wxSetWorkingDirectory
(
f
n
.
GetPath
()
);
if
(
f
ilename
.
GetExt
()
!=
SchematicFileExtension
)
f
ilename
.
SetExt
(
SchematicFileExtension
);
wxSetWorkingDirectory
(
f
ilename
.
GetPath
()
);
if
(
frame
->
DrawPanel
&&
frame
->
LoadOneEEProject
(
f
n
.
GetFullPath
(),
false
)
<=
0
)
&&
frame
->
LoadOneEEProject
(
f
ilename
.
GetFullPath
(),
false
)
<=
0
)
frame
->
DrawPanel
->
Refresh
(
true
);
}
else
...
...
eeschema/hotkeys.cpp
View file @
5a0aca0e
...
...
@@ -47,22 +47,50 @@
/* local variables */
/* Hotkey list: */
// Common commands
static
Ki_HotkeyInfo
HkZoomAuto
(
wxT
(
"Zoom Auto"
),
HK_ZOOM_AUTO
,
/**
* Common commands
*/
/* Fit on Screen */
static
Ki_HotkeyInfo
HkZoomAuto
(
wxT
(
"Fit on Screen"
),
HK_ZOOM_AUTO
,
WXK_HOME
);
static
Ki_HotkeyInfo
HkZoomCenter
(
wxT
(
"Zoom Center"
),
HK_ZOOM_CENTER
,
WXK_F4
);
static
Ki_HotkeyInfo
HkZoomRedraw
(
wxT
(
"Zoom Redraw"
),
HK_ZOOM_REDRAW
,
WXK_F3
);
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
/* Zoom In */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
WXK_F1
);
#else
static
Ki_HotkeyInfo
HkZoomIn
(
wxT
(
"Zoom In"
),
HK_ZOOM_IN
,
GR_KB_CTRL
+
'+'
);
#endif
/* Zoom Out */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
WXK_F2
);
#else
static
Ki_HotkeyInfo
HkZoomOut
(
wxT
(
"Zoom Out"
),
HK_ZOOM_OUT
,
GR_KB_CTRL
+
'-'
);
#endif
static
Ki_HotkeyInfo
HkHelp
(
wxT
(
"Help: this message"
),
HK_HELP
,
'?'
);
static
Ki_HotkeyInfo
HkResetLocalCoord
(
wxT
(
"Reset local coord."
),
HK_RESET_LOCAL_COORD
,
' '
);
/* Undo */
static
Ki_HotkeyInfo
HkUndo
(
wxT
(
"Undo"
),
HK_UNDO
,
GR_KB_CTRL
+
'Z'
,
(
int
)
ID_SCHEMATIC_UNDO
);
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
,
/* Redo */
#if !defined( __WXMAC__ )
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_CTRL
+
'Y'
,
(
int
)
ID_SCHEMATIC_REDO
);
#else
static
Ki_HotkeyInfo
HkRedo
(
wxT
(
"Redo"
),
HK_REDO
,
GR_KB_SHIFT
+
GR_KB_CTRL
+
'Z'
,
(
int
)
ID_SCHEMATIC_REDO
);
#endif
// Schematic editor
static
Ki_HotkeyInfo
HkBeginWire
(
wxT
(
"begin Wire"
),
HK_BEGIN_WIRE
,
'W'
);
...
...
eeschema/menubar.cpp
View file @
5a0aca0e
/**
***********************************************************/
/* menubar.cpp - create the menubar for the schematic frame */
/*************************************************************/
/**
* @file menubar.cpp
* @brief Create the main menubar for the schematic frame
*/
#ifdef __GNUG__
#pragma implementation
#endif
...
...
@@ -17,34 +17,38 @@
#include "eeschema_id.h"
#include "hotkeys.h"
/************************************************/
void
WinEDA_SchematicFrame
::
ReCreateMenuBar
()
/************************************************/
/* create or update the menubar for the schematic frame
/**
* @brief Create or update the menubar for the schematic frame
*/
void
WinEDA_SchematicFrame
::
ReCreateMenuBar
()
{
wxString
msg
;
wxString
text
;
wxMenuItem
*
item
;
wxMenuBar
*
menuBar
=
GetMenuBar
();
/* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly. */
/**
* Destroy the existing menu bar so it can be rebuilt. This allows
* language changes of the menu text on the fly.
*/
if
(
menuBar
)
SetMenuBar
(
NULL
);
menuBar
=
new
wxMenuBar
();
/**
* File menu
*/
wxMenu
*
filesMenu
=
new
wxMenu
;
/
/ Menu File:
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_PROJECT
,
_
(
"&New"
),
/
* New */
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_PROJECT
,
_
(
"&New
\t
Ctrl+N
"
),
_
(
"New schematic project"
)
);
item
->
SetBitmap
(
new_xpm
);
filesMenu
->
Append
(
item
);
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open"
),
/* Open */
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_PROJECT
,
_
(
"&Open
\t
Ctrl+O"
),
_
(
"Open an existing schematic project"
)
);
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
...
...
@@ -54,38 +58,41 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
openRecentMenu
);
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
openRecentMenu
,
-
1
,
_
(
"Open &Recent"
),
_
(
"Open a recent opened schematic project"
),
open_project_xpm
);
_
(
"Open a recent opened schematic project"
),
open_project_xpm
);
/
/ Save menus:
/
* Separator */
filesMenu
->
AppendSeparator
();
// Normal save command:
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Whole Schematic Project"
),
_
(
"Save all sheets in the schematic project"
)
);
item
->
SetBitmap
(
save_project_xpm
);
filesMenu
->
Append
(
item
);
// Save current sheet only
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET
,
_
(
"&Save Current Sheet Only"
),
/* Save */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET
,
_
(
"&Save
\t
Ctrl+S"
),
_
(
"Save only current schematic sheet"
)
);
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
// Save current sheet only and ask for a new name
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET_AS
,
_
(
"Save Current Sheet &as..."
),
/* Save as... */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_ONE_SHEET_AS
,
_
(
"Save &as...
\t
Shift+Ctrl+S"
),
_
(
"Save current schematic sheet as..."
)
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
/* Save Project */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_PROJECT
,
_
(
"&Save Project"
),
_
(
"Save all sheets in the schematic project"
)
);
item
->
SetBitmap
(
save_project_xpm
);
filesMenu
->
Append
(
item
);
/* Separator */
filesMenu
->
AppendSeparator
();
/
/ Print and Plot section:
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"P&rint"
),
/
* Print */
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"P&rint
\t
Ctrl+P
"
),
_
(
"Print schematic sheet"
)
);
item
->
SetBitmap
(
print_button
);
filesMenu
->
Append
(
item
);
/* Plot
S
ubmenu */
/* Plot
s
ubmenu */
wxMenu
*
choice_plot_fmt
=
new
wxMenu
;
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_PS
,
_
(
"Plot PostScript"
),
...
...
@@ -93,169 +100,245 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
plot_PS_xpm
);
choice_plot_fmt
->
Append
(
item
);
/* Plot HPGL */
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_HPGL
,
_
(
"Plot HPGL"
),
_
(
"Plot schematic sheet in HPGL format"
)
);
item
->
SetBitmap
(
plot_HPG_xpm
);
choice_plot_fmt
->
Append
(
item
);
/* Plot SVG */
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_SVG
,
_
(
"Plot SVG"
),
_
(
"Plot schematic sheet in SVG format"
)
);
item
->
SetBitmap
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
/* Plot DXF */
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_PLOT_DXF
,
_
(
"Plot DXF"
),
_
(
"Plot schematic sheet in DXF format"
)
);
item
->
SetBitmap
(
plot_xpm
);
choice_plot_fmt
->
Append
(
item
);
#ifdef __WINDOWS__
/* Under windows, one can draw to the clipboard */
#ifdef __WINDOWS__
item
=
new
wxMenuItem
(
choice_plot_fmt
,
ID_GEN_COPY_SHEET_TO_CLIPBOARD
,
_
(
"Plot to Clipboard"
),
_
(
"Export drawings to clipboard"
)
);
item
->
SetBitmap
(
copy_button
);
choice_plot_fmt
->
Append
(
item
);
#endif
ADD_MENUITEM_WITH_HELP_AND_SUBMENU
(
filesMenu
,
choice_plot_fmt
,
ID_GEN_PLOT
,
_
(
"&Plot"
),
_
(
"Plot schematic sheet in HPGL, PostScript or SVG format"
),
plot_xpm
);
/* Quit on all platforms except WXMAC */
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_EXIT
,
_
(
"E&xit"
),
_
(
"Quit Eeschema"
)
);
item
->
SetBitmap
(
exit_xpm
);
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit EESchema"
)
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__) */
// Menu Edit:
/**
* Edit menu
*/
wxMenu
*
editMenu
=
new
wxMenu
;
msg
=
AddHotkeyName
(
_
(
"&Undo
\t
"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_UNDO
,
msg
,
/* Undo */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Schematic_Hokeys_Descr
,
HK_UNDO
);
#else
text
=
_
(
"Undo
\t
Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_UNDO
,
text
,
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
editMenu
->
Append
(
item
);
msg
=
AddHotkeyName
(
_
(
"&Redo
\t
"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_REDO
,
msg
,
/* Redo */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Schematic_Hokeys_Descr
,
HK_REDO
);
#else
text
=
_
(
"Redo
\t
Shift+Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_REDO
,
text
,
_
(
"Redo the last undo command"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
editMenu
->
AppendSeparator
();
/* Delete */
item
=
new
wxMenuItem
(
editMenu
,
ID_SCHEMATIC_DELETE_ITEM_BUTT
,
_
(
"Delete"
),
_
(
"Delete items"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
delete_body_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
editMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
_
(
"Find"
),
/* Find */
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
_
(
"&Find
\t
Ctrl+F"
),
_
(
"Find components and texts"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
find_xpm
);
editMenu
->
Append
(
item
);
/* Separator */
editMenu
->
AppendSeparator
();
/* Backannotate */
item
=
new
wxMenuItem
(
editMenu
,
ID_BACKANNO_ITEMS
,
_
(
"Backannotate"
),
_
(
"Back annotated footprint fields"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
backanno_xpm
);
editMenu
->
Append
(
item
);
// Menu View:
/**
* View menu
*/
wxMenu
*
viewMenu
=
new
wxMenu
;
msg
=
AddHotkeyName
(
_
(
"Zoom in"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_IN
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
msg
,
_
(
"Zoom in"
),
/* Zoom in */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom In"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_IN
);
#else
text
=
_
(
"Zoom In
\t
Ctrl++"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
_
(
"Zoom In"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
msg
=
AddHotkeyName
(
_
(
"Zoom out"
),
s_Schematic_Hokeys_Descr
,
/* Zoom out */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom Out
\t
"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_OUT
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
msg
,
_
(
"Zoom out"
),
#else
text
=
_
(
"Zoom out
\t
Ctrl+-"
);
#endif
/* !defined( __WXMAC__) */
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
_
(
"Zoom Out"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
msg
=
AddHotkeyName
(
_
(
"Zoom auto"
),
s_Schematic_Hokeys_Descr
,
/* Fit on screen */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Fit on Screen"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_AUTO
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
msg
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Fit on Screen
\t
Ctrl+0"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
_
(
"Fit the schematic sheet on the screen"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_auto_xpm
);
viewMenu
->
Append
(
item
);
viewMenu
->
AppendSeparator
();
msg
=
AddHotkeyName
(
_
(
"Redraw view"
),
s_Schematic_Hokeys_Descr
,
/* Redraw view */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redraw"
),
s_Schematic_Hokeys_Descr
,
HK_ZOOM_REDRAW
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
msg
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Redraw
\t
Ctrl+R"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
_
(
"Redraw the schematic view"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
// Place Menu
//TODO: Unify the ID names!
/**
* Place menu
* TODO: Unify the ID names!
*/
wxMenu
*
placeMenu
=
new
wxMenu
;
/* Component */
item
=
new
wxMenuItem
(
placeMenu
,
ID_COMPONENT_BUTT
,
_
(
"&Component"
),
_
(
"Place the component"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_component_xpm
);
placeMenu
->
Append
(
item
);
/* Power port */
item
=
new
wxMenuItem
(
placeMenu
,
ID_PLACE_POWER_BUTT
,
_
(
"&Power port"
),
_
(
"Place the power port"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_power_xpm
);
placeMenu
->
Append
(
item
);
/* Wire */
item
=
new
wxMenuItem
(
placeMenu
,
ID_WIRE_BUTT
,
_
(
"&Wire"
),
_
(
"Place the wire"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line_xpm
);
placeMenu
->
Append
(
item
);
/* Bus */
item
=
new
wxMenuItem
(
placeMenu
,
ID_BUS_BUTT
,
_
(
"&Bus"
),
_
(
"Place bus"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_bus_xpm
);
placeMenu
->
Append
(
item
);
/* Wire to Bus */
item
=
new
wxMenuItem
(
placeMenu
,
ID_WIRETOBUS_ENTRY_BUTT
,
_
(
"W&ire to bus entry"
),
_
(
"Place a wire to bus entry"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line2bus_xpm
);
placeMenu
->
Append
(
item
);
/* Bus to Bus */
item
=
new
wxMenuItem
(
placeMenu
,
ID_BUSTOBUS_ENTRY_BUTT
,
_
(
"B&us to bus entry"
),
_
(
"Place a bus to bus entry"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_bus2bus_xpm
);
placeMenu
->
Append
(
item
);
/* No connect flag */
item
=
new
wxMenuItem
(
placeMenu
,
ID_NOCONN_BUTT
,
_
(
"No connect flag"
),
_
(
"Place a no connect flag"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
noconn_button
);
placeMenu
->
Append
(
item
);
/* Net name */
item
=
new
wxMenuItem
(
placeMenu
,
ID_LABEL_BUTT
,
_
(
"Net name"
),
_
(
"Place net name"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_line_label_xpm
);
placeMenu
->
Append
(
item
);
/* Global label */
item
=
new
wxMenuItem
(
placeMenu
,
ID_GLABEL_BUTT
,
_
(
"Global label"
),
_
(
"Place a global label. Warning: all global labels with the same name are connected in whole hierarchy"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_glabel_xpm
);
placeMenu
->
Append
(
item
);
/* Junction */
item
=
new
wxMenuItem
(
placeMenu
,
ID_JUNCTION_BUTT
,
_
(
"Junction"
),
_
(
"Place junction"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_junction_xpm
);
placeMenu
->
Append
(
item
);
/* Separator */
placeMenu
->
AppendSeparator
();
/* Hierarchical label */
item
=
new
wxMenuItem
(
placeMenu
,
ID_HIERLABEL_BUTT
,
_
(
"Hierarchical label"
),
_
(
"Place a hierarchical label. This label will be seen as a pin sheet in the sheet symbol"
),
...
...
@@ -263,12 +346,14 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
add_hierarchical_label_xpm
);
placeMenu
->
Append
(
item
);
/* Hierarchical sheet */
item
=
new
wxMenuItem
(
placeMenu
,
ID_SHEET_SYMBOL_BUTT
,
_
(
"Hierarchical sheet"
),
_
(
"Create a hierarchical sheet"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_hierarchical_subsheet_xpm
);
placeMenu
->
Append
(
item
);
/* Import hierarchical sheet */
item
=
new
wxMenuItem
(
placeMenu
,
ID_IMPORT_HLABEL_BUTT
,
_
(
"Import Hierarchical Label"
),
_
(
"Place a pin sheet created by importing a hierarchical label from sheet"
),
...
...
@@ -276,6 +361,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
import_hierarchical_label_xpm
);
placeMenu
->
Append
(
item
);
/* Add hierarchical Pin to Sheet */
item
=
new
wxMenuItem
(
placeMenu
,
ID_SHEET_LABEL_BUTT
,
_
(
"Add Hierarchical Pin to Sheet"
),
_
(
"Place a hierarchical pin to sheet"
),
...
...
@@ -283,8 +369,10 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
add_hierar_pin_xpm
);
placeMenu
->
Append
(
item
);
/* Separator */
placeMenu
->
AppendSeparator
();
/* Graphic line or polygon */
item
=
new
wxMenuItem
(
placeMenu
,
ID_LINE_COMMENT_BUTT
,
_
(
"Graphic line or polygon"
),
_
(
"Place graphic lines or polygons"
),
...
...
@@ -292,59 +380,85 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item
->
SetBitmap
(
add_dashed_line_xpm
);
placeMenu
->
Append
(
item
);
/* Graphic text */
item
=
new
wxMenuItem
(
placeMenu
,
ID_TEXT_COMMENT_BUTT
,
_
(
"Graphic text
(comment)
"
),
_
(
"Place graphic text
(comment)
"
),
_
(
"Graphic text"
),
_
(
"Place graphic text
for comment
"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
add_text_xpm
);
placeMenu
->
Append
(
item
);
/* Preferences Menu */
/**
* Preferences Menu
*/
wxMenu
*
configmenu
=
new
wxMenu
;
/* Library */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_REQ
,
_
(
"&Library"
),
_
(
"Library preferences"
)
);
item
->
SetBitmap
(
library_xpm
);
configmenu
->
Append
(
item
);
/* Colors */
item
=
new
wxMenuItem
(
configmenu
,
ID_COLORS_SETUP
,
_
(
"&Colors"
),
_
(
"Color preferences"
)
);
item
->
SetBitmap
(
palette_xpm
);
configmenu
->
Append
(
item
);
/
/ Options
/
* Options */
item
=
new
wxMenuItem
(
configmenu
,
ID_OPTIONS_SETUP
,
_
(
"&Options"
),
_
(
"Eeschema general options and preferences"
)
);
item
->
SetBitmap
(
preference_xpm
);
configmenu
->
Append
(
item
);
/* Language submenu */
wxGetApp
().
AddMenuLanguageList
(
configmenu
);
/* Hotkey submenu */
AddHotkeyConfigMenu
(
configmenu
);
/* Separator */
configmenu
->
AppendSeparator
();
/* Save preferences */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_SAVE
,
_
(
"&Save preferences"
),
_
(
"Save application preferences"
)
);
item
->
SetBitmap
(
save_setup_xpm
);
configmenu
->
Append
(
item
);
/* Read preferences */
item
=
new
wxMenuItem
(
configmenu
,
ID_CONFIG_READ
,
_
(
"&Read preferences"
),
_
(
"Read application preferences"
)
);
item
->
SetBitmap
(
read_setup_xpm
);
configmenu
->
Append
(
item
);
/* Help Menu*/
/**
* Help Menu
*/
wxMenu
*
helpMenu
=
new
wxMenu
;
item
=
new
wxMenuItem
(
helpMenu
,
ID_GENERAL_HELP
,
_
(
"&Contents"
),
_
(
"Open the eeschema manual"
)
);
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About eeschema schematic designer"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Create the menubar and append all submenus
*/
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
editMenu
,
_
(
"&Edit"
)
);
menuBar
->
Append
(
viewMenu
,
_
(
"&View"
)
);
...
...
@@ -352,6 +466,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
menuBar
->
Append
(
configmenu
,
_
(
"&Preferences"
)
);
menuBar
->
Append
(
helpMenu
,
_
(
"&Help"
)
);
/
/ Associate the menu bar with the frame
/
* Associate the menu bar with the frame */
SetMenuBar
(
menuBar
);
}
eeschema/schframe.cpp
View file @
5a0aca0e
...
...
@@ -56,7 +56,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
EVT_MENU
(
ID_GEN_PLOT_DXF
,
WinEDA_SchematicFrame
::
ToPlot_DXF
)
EVT_MENU
(
ID_GEN_COPY_SHEET_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_GEN_COPY_BLOCK_TO_CLIPBOARD
,
WinEDA_DrawFrame
::
CopyToClipboard
)
EVT_MENU
(
ID_EXIT
,
WinEDA_SchematicFrame
::
OnExit
)
EVT_MENU
(
wx
ID_EXIT
,
WinEDA_SchematicFrame
::
OnExit
)
EVT_MENU
(
ID_POPUP_SCH_COPY_ITEM
,
WinEDA_SchematicFrame
::
OnCopySchematicItemRequest
)
...
...
include/wxPcbStruct.h
View file @
5a0aca0e
...
...
@@ -87,6 +87,8 @@ public:
~
WinEDA_PcbFrame
();
void
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
);
/** Function ToPlotter
* Open a dialog frame to create plot and drill files
* relative to the current board
...
...
kicad/buildmnu.cpp
View file @
5a0aca0e
...
...
@@ -29,7 +29,7 @@ BEGIN_EVENT_TABLE( WinEDA_MainFrame, WinEDA_BasicFrame )
/* Menu events */
EVT_MENU
(
ID_SAVE_PROJECT
,
WinEDA_MainFrame
::
OnSaveProject
)
EVT_MENU
(
ID_EXIT
,
WinEDA_MainFrame
::
OnExit
)
EVT_MENU
(
wx
ID_EXIT
,
WinEDA_MainFrame
::
OnExit
)
EVT_MENU
(
ID_TO_EDITOR
,
WinEDA_MainFrame
::
OnOpenTextEditor
)
EVT_MENU
(
ID_BROWSE_AN_SELECT_FILE
,
WinEDA_MainFrame
::
OnOpenFileInTextEditor
)
...
...
@@ -127,12 +127,17 @@ void WinEDA_MainFrame::ReCreateMenuBar()
// Separator
filesMenu
->
AppendSeparator
();
// Exit
item
=
new
wxMenuItem
(
filesMenu
,
ID_EXIT
,
_
(
"E&xit"
),
_
(
"Quit kicad"
)
);
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit KiCad"
)
);
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/* Add the file history */
wxGetApp
().
m_fileHistory
.
AddFilesToMenu
(
filesMenu
);
...
...
@@ -222,12 +227,17 @@ void WinEDA_MainFrame::ReCreateMenuBar()
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
// About Kicad
// About on all platforms except WXMAC */
#if !defined( __WXMAC__ )
helpMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About kicad project manager"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
// Append menus to menuBar
menuBar
->
Append
(
filesMenu
,
_
(
"&File"
)
);
menuBar
->
Append
(
browseMenu
,
_
(
"&Browse"
)
);
...
...
kicad/kicad.cpp
View file @
5a0aca0e
...
...
@@ -85,6 +85,15 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool
WinEDA_App
::
OnInit
()
/*****************************************************************************/
{
/* WXMAC application specific */
/* TODO fix about dialog issue */
/* TODO fix SetExitOnFrameDelete */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
// wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
WinEDA_MainFrame
*
frame
;
InitEDA_Appl
(
wxT
(
"KiCad"
),
APP_TYPE_KICAD
);
...
...
packaging/mac-osx/dmg-generator/Makefile
View file @
5a0aca0e
...
...
@@ -7,13 +7,13 @@
# Original credits by Adium developers !
# http://www.adium.im
###########
VERSION
=
2010011
6
VERSION
=
2010011
8
###########
# Variables
###########
BUILD_DIR
=
build
APP_DIR
=
bin
APP_DIR
=
release
KICAD_DIR
=
$(BUILD_DIR)
RELEASE_NAME
=
kicad-
$(VERSION)
...
...
pcbnew/edit.cpp
View file @
5a0aca0e
...
...
@@ -27,6 +27,7 @@ static void Process_Move_Item( WinEDA_PcbFrame* frame,
EDA_BaseStruct
*
DrawStruct
,
wxDC
*
DC
);
/* Handles the selection of command events. */
void
WinEDA_PcbFrame
::
Process_Special_Functions
(
wxCommandEvent
&
event
)
{
...
...
@@ -151,10 +152,6 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case
0
:
break
;
case
ID_EXIT
:
Close
(
true
);
break
;
case
ID_OPEN_MODULE_EDITOR
:
if
(
m_ModuleEditFrame
==
NULL
)
{
...
...
pcbnew/menubar_pcbframe.cpp
View file @
5a0aca0e
...
...
@@ -36,13 +36,13 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
filesMenu
=
new
wxMenu
;
/* New Board */
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_BOARD
,
_
(
"&New"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_NEW_BOARD
,
_
(
"&New
\t
Ctrl+N
"
),
_
(
"Clear current board and initialize a new one"
)
);
item
->
SetBitmap
(
new_xpm
);
filesMenu
->
Append
(
item
);
/* Load Board */
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_FILE
,
_
(
"&Open"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_LOAD_FILE
,
_
(
"&Open
\t
Ctrl+O
"
),
_
(
"Delete current board and load new board"
)
);
item
->
SetBitmap
(
open_xpm
);
filesMenu
->
Append
(
item
);
...
...
@@ -66,14 +66,14 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
/* Save */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD
,
_
(
"&Save"
),
_
(
"&Save
\t
Ctrl+S
"
),
_
(
"Save current board"
)
);
item
->
SetBitmap
(
save_xpm
);
filesMenu
->
Append
(
item
);
/* Save As */
item
=
new
wxMenuItem
(
filesMenu
,
ID_SAVE_BOARD_AS
,
_
(
"Save as..."
),
_
(
"Save as...
\t
Shift+Ctrl+S
"
),
_
(
"Save the current board as.."
)
);
item
->
SetBitmap
(
save_as_xpm
);
filesMenu
->
Append
(
item
);
...
...
@@ -185,7 +185,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
filesMenu
->
AppendSeparator
();
/* Print */
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"
P&rint
"
),
item
=
new
wxMenuItem
(
filesMenu
,
ID_GEN_PRINT
,
_
(
"
&Print
\t
Ctrl+P
"
),
_
(
"Print pcb board"
)
);
item
->
SetBitmap
(
print_button
);
filesMenu
->
Append
(
item
);
...
...
@@ -222,13 +222,17 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
_
(
"Archive or add footprints in a library file"
),
library_xpm
);
/* Exit */
/* Quit on all platforms except WXMAC */
#if !defined( __WXMAC__ )
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
ID_EXIT
,
_
(
"&Quit"
),
item
=
new
wxMenuItem
(
filesMenu
,
wx
ID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit PCBNew"
)
);
item
->
SetBitmap
(
exit_xpm
);
filesMenu
->
Append
(
item
);
#endif
/* !defined( __WXMAC__ ) */
/**
* Edit menu
...
...
@@ -236,15 +240,25 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
editMenu
=
new
wxMenu
;
/* Undo */
/* TODO add Undo hotkey */
item
=
new
wxMenuItem
(
editMenu
,
ID_UNDO_BUTT
,
_
(
"Undo"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Undo"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_UNDO
);
#else
text
=
_
(
"Undo
\t
Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_UNDO_BUTT
,
text
,
_
(
"Undo last edition"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
undo_xpm
);
editMenu
->
Append
(
item
);
/* Redo */
/* TODO add Redo hotkey */
item
=
new
wxMenuItem
(
editMenu
,
ID_REDO_BUTT
,
_
(
"Redo"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redo"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_REDO
);
#else
text
=
_
(
"Redo
\t
Shift+Ctrl+Z"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_REDO_BUTT
,
text
,
_
(
"Redo the last undo command"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
redo_xpm
);
editMenu
->
Append
(
item
);
...
...
@@ -253,7 +267,12 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
editMenu
->
AppendSeparator
();
/* Find */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"&Find..."
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_FIND_ITEM
);
#else
text
=
_
(
"Find
\t
Ctrl+F"
);
#endif
item
=
new
wxMenuItem
(
editMenu
,
ID_FIND_ITEMS
,
text
,
_
(
"Find components and text in current loaded board"
)
);
item
->
SetBitmap
(
find_xpm
);
...
...
@@ -291,24 +310,41 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
wxMenu
*
viewMenu
=
new
wxMenu
;
/* Zoom in */
text
=
AddHotkeyName
(
_
(
"Zoom in"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_IN
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
_
(
"Zoom in"
),
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom In"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_IN
);
#else
text
=
_
(
"Zoom In
\t
Ctrl++"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_IN
,
text
,
_
(
"Zoom In"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_in_xpm
);
viewMenu
->
Append
(
item
);
/* Zoom out */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Zoom out"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_OUT
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
_
(
"Zoom out"
),
#else
text
=
_
(
"Zoom Out
\t
Ctrl+-"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_OUT
,
text
,
_
(
"Zoom Out"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_out_xpm
);
viewMenu
->
Append
(
item
);
/* Zoom auto */
text
=
AddHotkeyName
(
_
(
"Zoom auto"
),
s_Pcbnew_Editor_Hokeys_Descr
,
/* Fit on Screen */
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Fit on Screen"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_AUTO
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Fit on Screen
\t
Ctrl+0"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_PAGE
,
text
,
_
(
"Zoom to fit the board on the screen"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_auto_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -316,9 +352,15 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
viewMenu
->
AppendSeparator
();
/* Redraw view */
text
=
AddHotkeyName
(
_
(
"Redraw view"
),
s_Pcbnew_Editor_Hokeys_Descr
,
#if !defined( __WXMAC__)
text
=
AddHotkeyName
(
_
(
"Redraw"
),
s_Pcbnew_Editor_Hokeys_Descr
,
HK_ZOOM_REDRAW
);
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
_
(
"Zoom auto"
),
#else
text
=
_
(
"Redraw
\t
Ctrl+R"
);
#endif
item
=
new
wxMenuItem
(
viewMenu
,
ID_ZOOM_REDRAW
,
text
,
_
(
"Redraw the screen of the board"
),
wxITEM_NORMAL
);
item
->
SetBitmap
(
zoom_redraw_xpm
);
viewMenu
->
Append
(
item
);
...
...
@@ -464,11 +506,16 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item
->
SetBitmap
(
help_xpm
);
helpMenu
->
Append
(
item
);
/* About on all platforms except WXMAC */
#if !defined(__WXMAC__)
item
=
new
wxMenuItem
(
helpMenu
,
ID_KICAD_ABOUT
,
_
(
"&About"
),
_
(
"About PCBnew printed circuit board designer"
)
);
item
->
SetBitmap
(
info_xpm
);
helpMenu
->
Append
(
item
);
#endif
/* !defined(__WXMAC__) */
/**
* Append all menus to the menuBar
...
...
pcbnew/pcbframe.cpp
View file @
5a0aca0e
...
...
@@ -72,7 +72,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_MENU
(
ID_MENU_ARCHIVE_ALL_MODULES
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_MENU
(
ID_EXIT
,
WinEDA_PcbFrame
::
Process_Special_Functions
)
EVT_MENU
(
wxID_EXIT
,
WinEDA_PcbFrame
::
OnQuit
)
// menu Config
EVT_MENU_RANGE
(
ID_CONFIG_AND_PREFERENCES_START
,
...
...
@@ -319,6 +319,10 @@ WinEDA_PcbFrame::~WinEDA_PcbFrame()
delete
m_drc
;
}
void
WinEDA_PcbFrame
::
OnQuit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
Close
(
true
);
}
void
WinEDA_PcbFrame
::
OnCloseWindow
(
wxCloseEvent
&
Event
)
{
...
...
pcbnew/pcbnew.cpp
View file @
5a0aca0e
...
...
@@ -21,6 +21,7 @@
#include "zones.h"
#include "drag.h"
#include "eda_dde.h"
#include "id.h"
#include "build_version.h"
...
...
@@ -79,6 +80,14 @@ void WinEDA_App::MacOpenFile(const wxString &fileName) {
bool
WinEDA_App
::
OnInit
()
/****************************/
{
/* WXMAC application specific */
#ifdef __WXMAC__
// wxApp::SetExitOnFrameDelete(false);
// wxApp::s_macAboutMenuItemId = ID_KICAD_ABOUT;
wxApp
::
s_macPreferencesMenuItemId
=
ID_OPTIONS_SETUP
;
#endif
/* __WXMAC__ */
wxFileName
fn
;
WinEDA_PcbFrame
*
frame
=
NULL
;
...
...
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