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
5ae97bb3
Commit
5ae97bb3
authored
Jul 23, 2010
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Kicad-developers] Add close shortcut to Library Editor -- from Yuri
parent
0191ee9a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
18 deletions
+45
-18
libeditframe.cpp
eeschema/libeditframe.cpp
+4
-9
libeditframe.h
eeschema/libeditframe.h
+24
-5
menubar_libedit.cpp
eeschema/menubar_libedit.cpp
+11
-0
wxstruct.h
include/wxstruct.h
+6
-4
No files found.
eeschema/libeditframe.cpp
View file @
5ae97bb3
...
@@ -116,6 +116,8 @@ EVT_TOOL_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_EXPORT_BODY_BUTT,
...
@@ -116,6 +116,8 @@ EVT_TOOL_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_EXPORT_BODY_BUTT,
WinEDA_LibeditFrame
::
Process_Special_Functions
)
WinEDA_LibeditFrame
::
Process_Special_Functions
)
/* menubar commands */
/* menubar commands */
EVT_MENU
(
wxID_EXIT
,
WinEDA_LibeditFrame
::
CloseWindow
)
EVT_MENU
(
ID_LIBEDIT_SAVE_CURRENT_LIB_AS
,
EVT_MENU
(
ID_LIBEDIT_SAVE_CURRENT_LIB_AS
,
WinEDA_LibeditFrame
::
SaveActiveLibrary
)
WinEDA_LibeditFrame
::
SaveActiveLibrary
)
EVT_MENU
(
ID_LIBEDIT_GEN_PNG_FILE
,
EVT_MENU
(
ID_LIBEDIT_GEN_PNG_FILE
,
...
@@ -339,7 +341,8 @@ void WinEDA_LibeditFrame::OnCloseWindow( wxCloseEvent& Event )
...
@@ -339,7 +341,8 @@ void WinEDA_LibeditFrame::OnCloseWindow( wxCloseEvent& Event )
GetScreen
()
->
ClrModify
();
GetScreen
()
->
ClrModify
();
}
}
BOOST_FOREACH
(
const
CMP_LIBRARY
&
lib
,
CMP_LIBRARY
::
GetLibraryList
()
)
{
BOOST_FOREACH
(
const
CMP_LIBRARY
&
lib
,
CMP_LIBRARY
::
GetLibraryList
()
)
{
if
(
lib
.
IsModified
()
)
if
(
lib
.
IsModified
()
)
{
{
wxString
msg
;
wxString
msg
;
...
@@ -965,11 +968,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -965,11 +968,6 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
}
}
/** Called on activate the frame.
* Test if the current library exists
* the library list can be changed by the schematic editor after reloading a new schematic
* and the current m_library can point a non existent lib.
*/
void
WinEDA_LibeditFrame
::
OnActivate
(
wxActivateEvent
&
event
)
void
WinEDA_LibeditFrame
::
OnActivate
(
wxActivateEvent
&
event
)
{
{
WinEDA_DrawFrame
::
OnActivate
(
event
);
WinEDA_DrawFrame
::
OnActivate
(
event
);
...
@@ -992,9 +990,6 @@ void WinEDA_LibeditFrame::EnsureActiveLibExists()
...
@@ -992,9 +990,6 @@ void WinEDA_LibeditFrame::EnsureActiveLibExists()
m_library
=
NULL
;
m_library
=
NULL
;
}
}
/** function SetLanguage
* called on a language menu selection
*/
void
WinEDA_LibeditFrame
::
SetLanguage
(
wxCommandEvent
&
event
)
void
WinEDA_LibeditFrame
::
SetLanguage
(
wxCommandEvent
&
event
)
{
{
WinEDA_BasicFrame
::
SetLanguage
(
event
);
WinEDA_BasicFrame
::
SetLanguage
(
event
);
...
...
eeschema/libeditframe.h
View file @
5ae97bb3
...
@@ -36,14 +36,16 @@ public:
...
@@ -36,14 +36,16 @@ public:
void
ReCreateMenuBar
();
void
ReCreateMenuBar
();
/** Function EnsureActiveLibExists
/**
* Must be called after the libraries are reloaded
* Function EnsureActiveLibExists
* must be called after the libraries are reloaded
* (for instance after loading a schematic project)
* (for instance after loading a schematic project)
*/
*/
static
void
EnsureActiveLibExists
();
static
void
EnsureActiveLibExists
();
/** function SetLanguage
/**
* called on a language menu selection
* Function SetLanguage
* is called on a language menu selection
*/
*/
void
SetLanguage
(
wxCommandEvent
&
event
);
void
SetLanguage
(
wxCommandEvent
&
event
);
...
@@ -101,6 +103,19 @@ public:
...
@@ -101,6 +103,19 @@ public:
void
LoadSettings
();
void
LoadSettings
();
void
SaveSettings
();
void
SaveSettings
();
/**
* Function CloseWindow()
* triggers the wxCloseEvent, which is handled by the function given
* to EVT_CLOSE() macro:
* <p>
* EVT_CLOSE( WinEDA_LibeditFrame::OnCloseWindow )
*/
void
CloseWindow
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
// Generate a wxCloseEvent
Close
(
false
);
}
/** Function OnModify()
/** Function OnModify()
* Must be called after a schematic change
* Must be called after a schematic change
* in order to set the "modify" flag of the current screen
* in order to set the "modify" flag of the current screen
...
@@ -154,7 +169,11 @@ public:
...
@@ -154,7 +169,11 @@ public:
private
:
private
:
/** OnActivate event funtion( virtual )
/**
* Function OnActivate
* is called when the frame is activated. Tests if the current library exists.
* The library list can be changed by the schematic editor after reloading a new schematic
* and the current m_library can point a non existent lib.
*/
*/
virtual
void
OnActivate
(
wxActivateEvent
&
event
);
virtual
void
OnActivate
(
wxActivateEvent
&
event
);
...
...
eeschema/menubar_libedit.cpp
View file @
5ae97bb3
...
@@ -68,6 +68,17 @@ void WinEDA_LibeditFrame::ReCreateMenuBar()
...
@@ -68,6 +68,17 @@ void WinEDA_LibeditFrame::ReCreateMenuBar()
item
->
SetBitmap
(
plot_xpm
);
item
->
SetBitmap
(
plot_xpm
);
filesMenu
->
Append
(
item
);
filesMenu
->
Append
(
item
);
/* Quit on all platforms except WXMAC, because else this "breaks" the mac
UI compliance. The Quit item is in a different menu on a mac than
windows or unix machine.
*/
#if !defined(__WXMAC__)
filesMenu
->
AppendSeparator
();
item
=
new
wxMenuItem
(
filesMenu
,
wxID_EXIT
,
_
(
"&Quit"
),
_
(
"Quit Library Editor"
)
);
filesMenu
->
Append
(
item
);
#endif
/**
/**
* Edit menu
* Edit menu
*/
*/
...
...
include/wxstruct.h
View file @
5ae97bb3
...
@@ -341,12 +341,14 @@ public:
...
@@ -341,12 +341,14 @@ public:
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
virtual
void
ToolOnRightClick
(
wxCommandEvent
&
event
);
void
AdjustScrollBars
();
void
AdjustScrollBars
();
/** OnActivate event function (virtual)
/**
* called when activating the frame.
* Function OnActivate (virtual)
* in derived classes with a virtual OnActivate function,
* is called when activating the frame.
* do not forget to call the WinEDA_DrawFrame::OnActivate( event ) basic function
* In derived classes with a overriding OnActivate function,
* do not forget to call this WinEDA_DrawFrame::OnActivate( event ) basic function.
*/
*/
virtual
void
OnActivate
(
wxActivateEvent
&
event
);
virtual
void
OnActivate
(
wxActivateEvent
&
event
);
/**
/**
* Function UpdateStatusBar
* Function UpdateStatusBar
* updates the status bar information.
* updates the status bar information.
...
...
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