Loading eeschema/libeditframe.cpp +4 −9 Original line number Original line Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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 ); Loading @@ -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 ); Loading eeschema/libeditframe.h +24 −5 Original line number Original line Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 Loading Loading @@ -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 ); Loading eeschema/menubar_libedit.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -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 */ */ Loading include/wxstruct.h +6 −4 Original line number Original line Diff line number Diff line Loading @@ -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. Loading Loading
eeschema/libeditframe.cpp +4 −9 Original line number Original line Diff line number Diff line Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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 ); Loading @@ -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 ); Loading
eeschema/libeditframe.h +24 −5 Original line number Original line Diff line number Diff line Loading @@ -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 ); Loading Loading @@ -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 Loading Loading @@ -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 ); Loading
eeschema/menubar_libedit.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -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 */ */ Loading
include/wxstruct.h +6 −4 Original line number Original line Diff line number Diff line Loading @@ -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. Loading