Sync with main branch r6620
This commit is contained in:
commit
968a18a859
|
@ -256,7 +256,9 @@ the following commands:
|
|||
mingw-w64-x86_64-glew \
|
||||
mingw-w64-x86_64-curl \
|
||||
mingw-w64-x86_64-wxPython \
|
||||
mingw-w64-x86_64-wxWidgets
|
||||
mingw-w64-x86_64-wxWidgets \
|
||||
mingw-w64-x86_64-toolchain \
|
||||
mingw-w64-x86_64-glm
|
||||
cd kicad-source
|
||||
mkdir -p build/release
|
||||
mkdir build/debug # Optional for debug build.
|
||||
|
|
|
@ -28,26 +28,17 @@
|
|||
* @brief EDA_BASE_FRAME class implementation.
|
||||
*/
|
||||
|
||||
#include <wx/aboutdlg.h>
|
||||
#include <wx/fontdlg.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/platinfo.h>
|
||||
|
||||
#include <wx/stdpaths.h>
|
||||
#include <wx/string.h>
|
||||
|
||||
#include <build_version.h>
|
||||
#include <fctsys.h>
|
||||
#include <pgm_base.h>
|
||||
#include <kiface_i.h>
|
||||
#include <id.h>
|
||||
#include <eda_doc.h>
|
||||
#include <wxstruct.h>
|
||||
#include <macros.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <dialog_shim.h>
|
||||
#include <eda_doc.h>
|
||||
#include <id.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pgm_base.h>
|
||||
#include <wxstruct.h>
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <typeinfo>
|
||||
|
||||
/// The default auto save interval is 10 minutes.
|
||||
#define DEFAULT_AUTO_SAVE_INTERVAL 600
|
||||
|
@ -94,10 +85,6 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType,
|
|||
|
||||
m_FramePos.x = m_FramePos.y = 0;
|
||||
|
||||
Connect( ID_HELP_COPY_VERSION_STRING,
|
||||
wxEVT_COMMAND_MENU_SELECTED,
|
||||
wxCommandEventHandler( EDA_BASE_FRAME::CopyVersionInfoToClipboard ) );
|
||||
|
||||
Connect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER,
|
||||
wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) );
|
||||
|
||||
|
@ -484,145 +471,6 @@ void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::AddHelpVersionInfoMenuEntry( wxMenu* aMenu )
|
||||
{
|
||||
wxASSERT( aMenu != NULL );
|
||||
|
||||
// Copy version string to clipboard for bug report purposes.
|
||||
AddMenuItem( aMenu, ID_HELP_COPY_VERSION_STRING,
|
||||
_( "Copy &Version Information" ),
|
||||
_( "Copy the version string to clipboard to send with bug reports" ),
|
||||
KiBitmap( copy_button_xpm ) );
|
||||
}
|
||||
|
||||
|
||||
// This is an enhanced version of the compiler build macro provided by wxWidgets
|
||||
// in <wx/build.h>. Please do not make any of these strings translatable. They
|
||||
// are used for conveying troubleshooting information to developers.
|
||||
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
#define __ABI_VERSION ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
|
||||
#else
|
||||
#define __ABI_VERSION ",compiler without C++ ABI "
|
||||
#endif
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
#define __BO_COMPILER ",Intel C++"
|
||||
#elif defined(__GNUG__)
|
||||
#define __BO_COMPILER ",GCC " \
|
||||
__WX_BO_STRINGIZE(__GNUC__) "." \
|
||||
__WX_BO_STRINGIZE(__GNUC_MINOR__) "." \
|
||||
__WX_BO_STRINGIZE(__GNUC_PATCHLEVEL__)
|
||||
#elif defined(__VISUALC__)
|
||||
#define __BO_COMPILER ",Visual C++"
|
||||
#elif defined(__BORLANDC__)
|
||||
#define __BO_COMPILER ",Borland C++"
|
||||
#elif defined(__DIGITALMARS__)
|
||||
#define __BO_COMPILER ",DigitalMars"
|
||||
#elif defined(__WATCOMC__)
|
||||
#define __BO_COMPILER ",Watcom C++"
|
||||
#else
|
||||
#define __BO_COMPILER ",unknown"
|
||||
#endif
|
||||
|
||||
|
||||
static inline const char* KICAD_BUILD_OPTIONS_SIGNATURE()
|
||||
{
|
||||
return
|
||||
#ifdef __WXDEBUG__
|
||||
" (debug,"
|
||||
#else
|
||||
" (release,"
|
||||
#endif
|
||||
__WX_BO_UNICODE __ABI_VERSION __BO_COMPILER __WX_BO_STL
|
||||
__WX_BO_WXWIN_COMPAT_2_8 ")"
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event )
|
||||
{
|
||||
if( !wxTheClipboard->Open() )
|
||||
{
|
||||
wxMessageBox( _( "Could not open clipboard to write version information." ),
|
||||
_( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
|
||||
return;
|
||||
}
|
||||
|
||||
wxString msg_version;
|
||||
wxPlatformInfo info;
|
||||
|
||||
msg_version = wxT( "Application: " ) + Pgm().App().GetAppName() + wxT( "\n" );
|
||||
msg_version << wxT( "Version: " ) << GetBuildVersion()
|
||||
#ifdef DEBUG
|
||||
<< wxT( " debug" )
|
||||
#else
|
||||
<< wxT( " release" )
|
||||
#endif
|
||||
<< wxT( " build\n" );
|
||||
msg_version << wxT( "wxWidgets: Version " ) << FROM_UTF8( wxVERSION_NUM_DOT_STRING )
|
||||
<< FROM_UTF8( KICAD_BUILD_OPTIONS_SIGNATURE() ) << wxT( "\n" )
|
||||
<< wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
|
||||
<< info.GetArchName() << wxT( ", " ) << info.GetEndiannessName()
|
||||
<< wxT( ", " ) << info.GetPortIdName() << wxT( "\n" );
|
||||
|
||||
// Just in case someone builds KiCad with the platform native of Boost instead of
|
||||
// the version included with the KiCad source.
|
||||
msg_version << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION % 100 ) << wxT( "\n" );
|
||||
|
||||
msg_version << wxT( " USE_WX_GRAPHICS_CONTEXT=" );
|
||||
#ifdef USE_WX_GRAPHICS_CONTEXT
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
msg_version << wxT( " USE_WX_OVERLAY=" );
|
||||
#ifdef USE_WX_OVERLAY
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
msg_version << wxT( " KICAD_SCRIPTING=" );
|
||||
#ifdef KICAD_SCRIPTING
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
msg_version << wxT( " KICAD_SCRIPTING_MODULES=" );
|
||||
#ifdef KICAD_SCRIPTING_MODULES
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
msg_version << wxT( " KICAD_SCRIPTING_WXPYTHON=" );
|
||||
#ifdef KICAD_SCRIPTING_WXPYTHON
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
msg_version << wxT( " USE_FP_LIB_TABLE=HARD_CODED_ON\n" );
|
||||
|
||||
msg_version << wxT( " BUILD_GITHUB_PLUGIN=" );
|
||||
#ifdef BUILD_GITHUB_PLUGIN
|
||||
msg_version << wxT( "ON\n" );
|
||||
#else
|
||||
msg_version << wxT( "OFF\n" );
|
||||
#endif
|
||||
|
||||
wxTheClipboard->SetData( new wxTextDataObject( msg_version ) );
|
||||
wxTheClipboard->Close();
|
||||
|
||||
wxMessageBox( msg_version, _( "Version Information (copied to the clipboard)" ) );
|
||||
}
|
||||
|
||||
|
||||
bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -734,4 +582,3 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName,
|
|||
wxRemoveFile( autoSaveFileName.GetFullPath() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,12 +22,11 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <dialog_about.h>
|
||||
#include <aboutinfo.h>
|
||||
#include <wx/aboutdlg.h>
|
||||
#include <wx/textctrl.h>
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#include <wx/aboutdlg.h>
|
||||
#include <wx/arrimpl.cpp>
|
||||
#include <wx/textctrl.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
/* Used icons:
|
||||
* lang_xx_xpm[]; // Icons of various national flags
|
||||
|
@ -36,13 +35,15 @@
|
|||
* icon_kicad_xpm[]; // Icon of the application
|
||||
*/
|
||||
#include <bitmaps.h>
|
||||
#include <wxstruct.h>
|
||||
#include <build_version.h>
|
||||
#include <common.h>
|
||||
#include <pgm_base.h>
|
||||
#include <build_version.h>
|
||||
#include <wxstruct.h>
|
||||
|
||||
#include "aboutinfo.h"
|
||||
#include "dialog_about.h"
|
||||
|
||||
|
||||
#include <wx/arrimpl.cpp>
|
||||
WX_DEFINE_OBJARRAY( Contributors )
|
||||
|
||||
// Helper functions:
|
||||
|
@ -74,14 +75,14 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
|||
}
|
||||
|
||||
/* Set title */
|
||||
info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) );
|
||||
info.SetAppName( Pgm().App().GetAppName() );
|
||||
|
||||
/* Copyright information */
|
||||
info.SetCopyright( wxT( "(C) 1992-2015 KiCad Developers Team" ) );
|
||||
info.SetCopyright( wxT( "(C) 1992-2016 KiCad Developers Team" ) );
|
||||
|
||||
/* KiCad build version */
|
||||
wxString version;
|
||||
version << wxT( "Version: " ) << GetBuildVersion()
|
||||
version << GetBuildVersion()
|
||||
#ifdef DEBUG
|
||||
<< wxT( ", debug" )
|
||||
#else
|
||||
|
@ -93,16 +94,13 @@ static void InitKiCadAboutNew( AboutAppInfo& info )
|
|||
|
||||
/* wxWidgets version */
|
||||
wxString libVersion;
|
||||
libVersion << wxT( "wxWidgets " )
|
||||
<< wxMAJOR_VERSION << wxT( "." )
|
||||
<< wxMINOR_VERSION << wxT( "." )
|
||||
<< wxRELEASE_NUMBER
|
||||
libVersion << wxGetLibraryVersionInfo().GetVersionString();
|
||||
|
||||
/* Unicode or ANSI version */
|
||||
#if wxUSE_UNICODE
|
||||
<< wxT( " Unicode " );
|
||||
libVersion << wxT( " Unicode " );
|
||||
#else
|
||||
<< wxT( " ANSI " );
|
||||
libVersion << wxT( " ANSI " );
|
||||
#endif
|
||||
|
||||
// Just in case someone builds KiCad with the platform native of Boost instead of
|
||||
|
|
|
@ -22,7 +22,36 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <dialog_about.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
// kicad_curl.h must be included before wx headers, to avoid
|
||||
// conflicts for some defines, at least on Windows
|
||||
#ifdef BUILD_GITHUB_PLUGIN
|
||||
#include <curl/curlver.h>
|
||||
#include <kicad_curl/kicad_curl.h>
|
||||
#endif
|
||||
|
||||
#include <boost/version.hpp>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
/* Pixel information of icons in XPM format.
|
||||
* All KiCad icons are linked into shared library 'libbitmaps.a'.
|
||||
* Icons:
|
||||
* preference_xpm[]; // Icon for 'Developers' tab
|
||||
* editor_xpm[]; // Icon for 'Doc Writers' tab
|
||||
* palette_xpm[]; // Icon for 'Artists' tab
|
||||
* language_xpm[]; // Icon for 'Translators' tab
|
||||
* right_xpm[]; // Right arrow icon for list items
|
||||
* info_xpm[]; // Bulb for description tab
|
||||
* tools_xpm[]; // Sheet of paper icon for license info tab
|
||||
*/
|
||||
#include <bitmaps.h>
|
||||
#include <build_version.h>
|
||||
|
||||
#include "dialog_about.h"
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Class dialog_about methods
|
||||
|
@ -43,7 +72,7 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
|
|||
|
||||
m_staticTextAppTitle->SetLabel( info.GetAppName() );
|
||||
m_staticTextCopyright->SetLabel( info.GetCopyright() );
|
||||
m_staticTextBuildVersion->SetLabel( info.GetBuildVersion() );
|
||||
m_staticTextBuildVersion->SetLabel( "Version: " + info.GetBuildVersion() );
|
||||
m_staticTextLibVersion->SetLabel( info.GetLibVersion() );
|
||||
|
||||
DeleteNotebooks();
|
||||
|
@ -53,6 +82,8 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
|
|||
m_auiNotebook->Update();
|
||||
SetFocus();
|
||||
Centre();
|
||||
|
||||
Connect( wxID_COPY, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_about::OnCopyVersionInfo ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -397,3 +428,112 @@ void dialog_about::OnHtmlLinkClicked( wxHtmlLinkEvent& event )
|
|||
{
|
||||
::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
|
||||
}
|
||||
|
||||
void dialog_about::OnCopyVersionInfo( wxCommandEvent& event )
|
||||
{
|
||||
if( !wxTheClipboard->Open() )
|
||||
{
|
||||
wxMessageBox( _( "Could not open clipboard to write version information." ),
|
||||
_( "Clipboard Error" ), wxOK | wxICON_EXCLAMATION, this );
|
||||
return;
|
||||
}
|
||||
|
||||
wxPlatformInfo platform;
|
||||
|
||||
// DO NOT translate information in the msg_version string
|
||||
wxString msg_version;
|
||||
msg_version << "Application: " << info.GetAppName() << "\n";
|
||||
msg_version << "Version: " << info.GetBuildVersion() << "\n";
|
||||
msg_version << "Libraries: " << wxGetLibraryVersionInfo().GetVersionString() << "\n";
|
||||
#ifdef BUILD_GITHUB_PLUGIN
|
||||
msg_version << " " << KICAD_CURL::GetVersion() << "\n";
|
||||
#endif
|
||||
msg_version << "Platform: " << wxGetOsDescription() << ", "
|
||||
<< platform.GetArchName() << ", "
|
||||
<< platform.GetEndiannessName() << ", "
|
||||
<< platform.GetPortIdName() << "\n";
|
||||
|
||||
msg_version << "- Build Info -\n";
|
||||
msg_version << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " (";
|
||||
msg_version << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")\n";
|
||||
|
||||
msg_version << "Boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION % 100 ) << wxT( "\n" );
|
||||
|
||||
#ifdef BUILD_GITHUB_PLUGIN
|
||||
msg_version << "Curl: " << LIBCURL_VERSION << "\n";
|
||||
#endif
|
||||
|
||||
msg_version << "KiCad - Compiler: ";
|
||||
#if defined(__clang__)
|
||||
msg_version << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
|
||||
#elif defined(__GNUG__)
|
||||
msg_version << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
|
||||
#elif defined(_MSC_VER)
|
||||
msg_version << "Visual C++ " << _MSC_VER;
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
msg_version << "Intel C++ " << __INTEL_COMPILER;
|
||||
#else
|
||||
msg_version << "Other Compiler ";
|
||||
#endif
|
||||
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
msg_version << " with C++ ABI " << __GXX_ABI_VERSION << "\n";
|
||||
#else
|
||||
msg_version << " without C++ ABI\n";
|
||||
#endif
|
||||
|
||||
msg_version << " Settings: ";
|
||||
|
||||
#define ON "ON\n"
|
||||
#define OFF "OFF\n"
|
||||
|
||||
msg_version << "USE_WX_GRAPHICS_CONTEXT=";
|
||||
#ifdef USE_WX_GRAPHICS_CONTEXT
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
msg_version << " USE_WX_OVERLAY=";
|
||||
#ifdef USE_WX_OVERLAY
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
msg_version << " KICAD_SCRIPTING=";
|
||||
#ifdef KICAD_SCRIPTING
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
msg_version << " KICAD_SCRIPTING_MODULES=";
|
||||
#ifdef KICAD_SCRIPTING_MODULES
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
msg_version << " KICAD_SCRIPTING_WXPYTHON=";
|
||||
#ifdef KICAD_SCRIPTING_WXPYTHON
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
msg_version << " USE_FP_LIB_TABLE=HARD_CODED_ON\n";
|
||||
|
||||
msg_version << " BUILD_GITHUB_PLUGIN=";
|
||||
#ifdef BUILD_GITHUB_PLUGIN
|
||||
msg_version << ON;
|
||||
#else
|
||||
msg_version << OFF;
|
||||
#endif
|
||||
|
||||
wxTheClipboard->SetData( new wxTextDataObject( msg_version ) );
|
||||
wxTheClipboard->Close();
|
||||
copyVersionInfo->SetLabel( _( "Copied..." ) );
|
||||
}
|
||||
|
|
|
@ -30,21 +30,8 @@
|
|||
#include <wx/stattext.h>
|
||||
#include <wx/hyperlink.h>
|
||||
|
||||
#include <aboutinfo.h>
|
||||
#include <dialog_about_base.h>
|
||||
|
||||
/* Pixel information of icons in XPM format.
|
||||
* All KiCad icons are linked into shared library 'libbitmaps.a'.
|
||||
* Icons:
|
||||
* preference_xpm[]; // Icon for 'Developers' tab
|
||||
* editor_xpm[]; // Icon for 'Doc Writers' tab
|
||||
* palette_xpm[]; // Icon for 'Artists' tab
|
||||
* language_xpm[]; // Icon for 'Translators' tab
|
||||
* right_xpm[]; // Right arrow icon for list items
|
||||
* info_xpm[]; // Bulb for description tab
|
||||
* tools_xpm[]; // Sheet of paper icon for license info tab
|
||||
*/
|
||||
#include <bitmaps.h>
|
||||
#include "aboutinfo.h"
|
||||
#include "dialog_about_base.h"
|
||||
|
||||
/**
|
||||
* About dialog to show application specific information.
|
||||
|
@ -74,6 +61,7 @@ private:
|
|||
virtual void OnClose( wxCloseEvent& event );
|
||||
virtual void OnOkClick( wxCommandEvent& event );
|
||||
virtual void OnHtmlLinkClicked( wxHtmlLinkEvent& event );
|
||||
virtual void OnCopyVersionInfo( wxCommandEvent &event );
|
||||
|
||||
// Notebook pages
|
||||
wxFlexGridSizer* CreateFlexGridSizer();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// C++ code generated with wxFormBuilder (version Aug 23 2015)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -44,10 +44,10 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS
|
|||
|
||||
m_staticTextLibVersion = new wxStaticText( this, wxID_ANY, _("Lib Version Info"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
|
||||
m_staticTextLibVersion->Wrap( -1 );
|
||||
b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
b_apptitleSizer->Add( m_staticTextLibVersion, 0, wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||
|
||||
|
||||
bSizer3->Add( b_apptitleSizer, 10, wxEXPAND, 5 );
|
||||
bSizer3->Add( b_apptitleSizer, 10, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizer3->Add( 0, 0, 2, wxEXPAND, 5 );
|
||||
|
@ -55,22 +55,27 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS
|
|||
|
||||
bSizer1->Add( bSizer3, 0, wxEXPAND, 5 );
|
||||
|
||||
wxStaticLine* m_staticline1;
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
bSizer1->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
||||
|
||||
m_auiNotebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH );
|
||||
m_auiNotebook->SetMinSize( wxSize( 750,350 ) );
|
||||
|
||||
|
||||
bSizer1->Add( m_auiNotebook, 2, wxEXPAND | wxALL, 5 );
|
||||
bSizer1->Add( m_auiNotebook, 2, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizer->Realize();
|
||||
wxBoxSizer* bSizer4;
|
||||
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
bSizer1->Add( m_sdbSizer, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
copyVersionInfo = new wxButton( this, wxID_COPY, _("Copy Version Info"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer4->Add( copyVersionInfo, 0, wxALL, 5 );
|
||||
|
||||
ok = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
ok->SetDefault();
|
||||
bSizer4->Add( ok, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizer1->Add( bSizer4, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizer1 );
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="name">dialog_about_base</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">750,437</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP</property>
|
||||
<property name="size">750,471</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title">About...</property>
|
||||
<property name="title">About</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
|
@ -93,11 +93,11 @@
|
|||
<property name="name">bSizer1</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
|
@ -193,11 +193,11 @@
|
|||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">10</property>
|
||||
<object class="wxBoxSizer" expanded="0">
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">b_apptitleSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
|
@ -453,7 +453,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -550,88 +550,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">none</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND | wxALL</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">2</property>
|
||||
<object class="wxAuiNotebook" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
|
@ -722,28 +641,199 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
|
||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||
<property name="Apply">0</property>
|
||||
<property name="Cancel">0</property>
|
||||
<property name="ContextHelp">0</property>
|
||||
<property name="Help">0</property>
|
||||
<property name="No">0</property>
|
||||
<property name="OK">1</property>
|
||||
<property name="Save">0</property>
|
||||
<property name="Yes">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_sdbSizer</property>
|
||||
<property name="name">bSizer4</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="spacer" expanded="1">
|
||||
<property name="height">0</property>
|
||||
<property name="permission">protected</property>
|
||||
<event name="OnApplyButtonClick"></event>
|
||||
<event name="OnCancelButtonClick"></event>
|
||||
<event name="OnContextHelpButtonClick"></event>
|
||||
<event name="OnHelpButtonClick"></event>
|
||||
<event name="OnNoButtonClick"></event>
|
||||
<event name="OnOKButtonClick"></event>
|
||||
<event name="OnSaveButtonClick"></event>
|
||||
<event name="OnYesButtonClick"></event>
|
||||
<property name="width">0</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_COPY</property>
|
||||
<property name="label">Copy Version Info</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">copyVersionInfo</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_OK</property>
|
||||
<property name="label">OK</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">ok</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||
// C++ code generated with wxFormBuilder (version Aug 23 2015)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -22,7 +22,6 @@
|
|||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/aui/auibook.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -43,12 +42,12 @@ class dialog_about_base : public wxDialog
|
|||
wxStaticText* m_staticTextBuildVersion;
|
||||
wxStaticText* m_staticTextLibVersion;
|
||||
wxAuiNotebook* m_auiNotebook;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* copyVersionInfo;
|
||||
wxButton* ok;
|
||||
|
||||
public:
|
||||
|
||||
dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,437 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP );
|
||||
dialog_about_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 750,471 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~dialog_about_base();
|
||||
|
||||
};
|
||||
|
|
|
@ -39,24 +39,29 @@
|
|||
#include <class_drawpanel.h>
|
||||
#include <class_base_screen.h>
|
||||
|
||||
#include <gal/stroke_font.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)
|
||||
* Its value is choosen in order to have letters like M, P .. vertical size
|
||||
* equal to the vertical char size parameter
|
||||
* Of course some shapes can be bigger or smaller than the vertical char size
|
||||
* parameter
|
||||
*/
|
||||
#define HERSHEY_SCALE_FACTOR 1 / 21.0
|
||||
double s_HersheyScaleFactor = HERSHEY_SCALE_FACTOR;
|
||||
using namespace KIGFX;
|
||||
|
||||
|
||||
// A ugly hack to avoid UTF8::uni_iter method not found at link stage
|
||||
// in gerbview and pl_editor.
|
||||
// Hoping I (JPC) can remove that soon.
|
||||
void dummy()
|
||||
{
|
||||
UTF8 text = "x";
|
||||
for( UTF8::uni_iter it = text.ubegin(), end = text.uend(); it < end; ++it )
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
int OverbarPositionY( int size_v )
|
||||
{
|
||||
return KiROUND( size_v * 1.22 );
|
||||
return KiROUND( size_v * STROKE_FONT::OVERBAR_HEIGHT );
|
||||
}
|
||||
|
||||
|
||||
|
@ -184,13 +189,13 @@ int GraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWid
|
|||
// Get metrics
|
||||
int xsta = *shape_ptr++ - 'R';
|
||||
int xsto = *shape_ptr++ - 'R';
|
||||
tally += KiROUND( aXSize * (xsto - xsta) * s_HersheyScaleFactor );
|
||||
tally += KiROUND( aXSize * (xsto - xsta) * STROKE_FONT::STROKE_FONT_SCALE );
|
||||
}
|
||||
|
||||
// For italic correction, add 1/8 size
|
||||
if( aItalic )
|
||||
{
|
||||
tally += KiROUND( aXSize * 0.125 );
|
||||
tally += KiROUND( aXSize * STROKE_FONT::ITALIC_TILT );
|
||||
}
|
||||
|
||||
return tally;
|
||||
|
@ -415,7 +420,7 @@ void DrawGraphicText( EDA_RECT* aClipBox,
|
|||
|
||||
if( aItalic )
|
||||
{
|
||||
overbar_italic_comp = OverbarPositionY( size_v ) / 8;
|
||||
overbar_italic_comp = KiROUND( OverbarPositionY( size_v ) * STROKE_FONT::ITALIC_TILT );
|
||||
|
||||
if( italic_reverse )
|
||||
{
|
||||
|
@ -519,13 +524,14 @@ void DrawGraphicText( EDA_RECT* aClipBox,
|
|||
{
|
||||
wxPoint currpoint;
|
||||
hc1 -= xsta; hc2 -= 10; // Align the midpoint
|
||||
hc1 = KiROUND( hc1 * size_h * s_HersheyScaleFactor );
|
||||
hc2 = KiROUND( hc2 * size_v * s_HersheyScaleFactor );
|
||||
hc1 = KiROUND( hc1 * size_h * STROKE_FONT::STROKE_FONT_SCALE );
|
||||
hc2 = KiROUND( hc2 * size_v * STROKE_FONT::STROKE_FONT_SCALE );
|
||||
|
||||
// To simulate an italic font,
|
||||
// add a x offset depending on the y offset
|
||||
if( aItalic )
|
||||
hc1 -= KiROUND( italic_reverse ? -hc2 / 8.0 : hc2 / 8.0 );
|
||||
hc1 -= KiROUND( italic_reverse ? -hc2 * STROKE_FONT::ITALIC_TILT
|
||||
: hc2 * STROKE_FONT::ITALIC_TILT );
|
||||
|
||||
currpoint.x = hc1 + current_char_pos.x;
|
||||
currpoint.y = hc2 + current_char_pos.y;
|
||||
|
@ -541,7 +547,7 @@ void DrawGraphicText( EDA_RECT* aClipBox,
|
|||
ptr++;
|
||||
|
||||
// Apply the advance width
|
||||
current_char_pos.x += KiROUND( size_h * (xsto - xsta) * s_HersheyScaleFactor );
|
||||
current_char_pos.x += KiROUND( size_h * (xsto - xsta) * STROKE_FONT::STROKE_FONT_SCALE );
|
||||
}
|
||||
|
||||
if( overbars % 2 )
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -46,6 +46,8 @@
|
|||
#error "Cannot resolve units formatting due to no definition of EESCHEMA or PCBNEW."
|
||||
#endif
|
||||
|
||||
#include <gal/stroke_font.h>
|
||||
|
||||
#include <convert_to_biu.h>
|
||||
|
||||
EDA_TEXT::EDA_TEXT( const wxString& text )
|
||||
|
@ -106,15 +108,16 @@ wxString EDA_TEXT::ShortenedShownText() const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function GetInterline
|
||||
* return the distance between 2 text lines
|
||||
* has meaning only for multiline texts
|
||||
/*
|
||||
* calculate the distance (pitch) between 2 text lines
|
||||
* the distance includes the interline + room for chars like j { and [
|
||||
* Is used for multiline texts, but also for single line texts, to calculate
|
||||
* the text bounding box
|
||||
*/
|
||||
int EDA_TEXT::GetInterline( int aTextThickness ) const
|
||||
{
|
||||
int thickness = aTextThickness <= 0 ? m_Thickness : aTextThickness;
|
||||
return (( m_Size.y * 14 ) / 10) + thickness;
|
||||
return KiROUND( m_Size.y * KIGFX::STROKE_FONT::INTERLINE_PITCH_RATIO ) + thickness;
|
||||
}
|
||||
|
||||
EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
|
||||
|
@ -130,7 +133,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
|
|||
{
|
||||
wxStringSplit( text, strings, '\n' );
|
||||
|
||||
if ( strings.GetCount() ) // GetCount() == 0 for void strings
|
||||
if( strings.GetCount() ) // GetCount() == 0 for void strings
|
||||
{
|
||||
if( aLine >= 0 && (aLine < (int)strings.GetCount()) )
|
||||
text = strings.Item( aLine );
|
||||
|
@ -153,11 +156,15 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
|
|||
else
|
||||
rect.SetOrigin( m_Pos );
|
||||
|
||||
// extra dy interval for letters like j and y and ]
|
||||
int extra_dy = dy - m_Size.y;
|
||||
rect.Move( wxPoint( 0, -extra_dy / 2 ) ); // move origin by the half extra interval
|
||||
// The bbox vertical size returned by GetInterline( aThickness )
|
||||
// includes letters like j and y and ] + interval between lines.
|
||||
// The interval below the last line is not usefull, and we can use its half value
|
||||
// as vertical margin above the text
|
||||
// the full interval is roughly m_Size.y * 0.4 - aThickness/2
|
||||
rect.Move( wxPoint( 0, aThickness/4 - KiROUND( m_Size.y * 0.2 ) ) );
|
||||
|
||||
// for multiline texts and aLine < 0, merge all rectangles
|
||||
// ( if aLine < 0, we want the full text bounding box )
|
||||
if( m_MultilineAllowed && aLine < 0 )
|
||||
{
|
||||
for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
|
||||
|
@ -232,7 +239,6 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
|
|||
}
|
||||
}
|
||||
|
||||
rect.Inflate( thickness / 2 );
|
||||
rect.Normalize(); // Make h and v sizes always >= 0
|
||||
|
||||
return rect;
|
||||
|
|
|
@ -32,9 +32,11 @@
|
|||
|
||||
using namespace KIGFX;
|
||||
|
||||
const double STROKE_FONT::INTERLINE_PITCH_RATIO = 1.5;
|
||||
const double STROKE_FONT::OVERBAR_HEIGHT = 1.22;
|
||||
const double STROKE_FONT::BOLD_FACTOR = 1.3;
|
||||
const double STROKE_FONT::HERSHEY_SCALE = 1.0 / 21.0;
|
||||
const double STROKE_FONT::STROKE_FONT_SCALE = 1.0 / 21.0;
|
||||
const double STROKE_FONT::ITALIC_TILT = 1.0 / 8;
|
||||
|
||||
STROKE_FONT::STROKE_FONT( GAL* aGal ) :
|
||||
m_gal( aGal ),
|
||||
|
@ -81,8 +83,8 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
|||
if( i < 2 )
|
||||
{
|
||||
// The first two values contain the width of the char
|
||||
glyphStartX = ( coordinate[0] - 'R' ) * HERSHEY_SCALE;
|
||||
glyphEndX = ( coordinate[1] - 'R' ) * HERSHEY_SCALE;
|
||||
glyphStartX = ( coordinate[0] - 'R' ) * STROKE_FONT_SCALE;
|
||||
glyphEndX = ( coordinate[1] - 'R' ) * STROKE_FONT_SCALE;
|
||||
glyphBoundingX = VECTOR2D( 0, glyphEndX - glyphStartX );
|
||||
}
|
||||
else if( ( coordinate[0] == ' ' ) && ( coordinate[1] == 'R' ) )
|
||||
|
@ -97,9 +99,9 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
|||
{
|
||||
// Every coordinate description of the Hershey format has an offset,
|
||||
// it has to be subtracted
|
||||
point.x = (double) ( coordinate[0] - 'R' ) * HERSHEY_SCALE - glyphStartX;
|
||||
point.x = (double) ( coordinate[0] - 'R' ) * STROKE_FONT_SCALE - glyphStartX;
|
||||
// -10 is here to keep GAL rendering consistent with the legacy gfx stuff
|
||||
point.y = (double) ( coordinate[1] - 'R' - 10) * HERSHEY_SCALE;
|
||||
point.y = (double) ( coordinate[1] - 'R' - 10) * STROKE_FONT_SCALE;
|
||||
pointList.push_back( point );
|
||||
}
|
||||
|
||||
|
@ -121,7 +123,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe
|
|||
|
||||
int STROKE_FONT::getInterline() const
|
||||
{
|
||||
return ( m_glyphSize.y * 14 ) / 10 + m_gal->GetLineWidth();
|
||||
return KiROUND( m_glyphSize.y * INTERLINE_PITCH_RATIO ) + m_gal->GetLineWidth();
|
||||
}
|
||||
|
||||
|
||||
|
@ -307,11 +309,11 @@ void STROKE_FONT::drawSingleLineText( const UTF8& aText )
|
|||
{
|
||||
if( m_mirrored )
|
||||
{
|
||||
overbar_italic_comp = (-m_glyphSize.y * OVERBAR_HEIGHT) / 8;
|
||||
overbar_italic_comp = (-m_glyphSize.y * OVERBAR_HEIGHT) / ITALIC_TILT;
|
||||
}
|
||||
else
|
||||
{
|
||||
overbar_italic_comp = (m_glyphSize.y * OVERBAR_HEIGHT) / 8;
|
||||
overbar_italic_comp = (m_glyphSize.y * OVERBAR_HEIGHT) / ITALIC_TILT;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
// kicad_curl.h must be included before xw headers, to avoid
|
||||
// kicad_curl.h must be included before wx headers, to avoid
|
||||
// conflicts for some defines, at least on Windows
|
||||
#include <kicad_curl/kicad_curl.h>
|
||||
|
||||
|
|
|
@ -26,16 +26,15 @@
|
|||
* @file cvpcb/menubar.cpp
|
||||
* @brief (Re)Create the menubar for CvPcb
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
#include <pgm_base.h>
|
||||
#include <kiface_i.h>
|
||||
#include <menus_helpers.h>
|
||||
|
||||
#include <cvpcb.h>
|
||||
#include <cvpcb_mainframe.h>
|
||||
#include <cvpcb_id.h>
|
||||
|
||||
#include <common_help_msg.h>
|
||||
#include <kiface_i.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_id.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -111,9 +110,6 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
|
|||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Manual Contents
|
||||
AddMenuItem( helpMenu, wxID_HELP, _( "CvPcb &Manual" ),
|
||||
_( "Open CvPcb Manual" ),
|
||||
|
|
|
@ -254,6 +254,7 @@ target_link_libraries( eeschema_kiface
|
|||
common
|
||||
bitmaps
|
||||
polygon
|
||||
gal
|
||||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -567,6 +567,11 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
|
|||
// Display new markers:
|
||||
m_parent->GetCanvas()->Refresh();
|
||||
|
||||
// Display message
|
||||
wxString msg = _( "Finished" );
|
||||
msg += wxT( "\n" );
|
||||
aMessagesList->Add( msg );
|
||||
|
||||
if( m_writeErcFile )
|
||||
{
|
||||
fn = g_RootSheet->GetScreen()->GetFileName();
|
||||
|
|
|
@ -28,18 +28,16 @@
|
|||
* @brief (Re)Create the main menubar for the schematic frame
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
|
||||
#include <kiface_i.h>
|
||||
#include <pgm_base.h>
|
||||
#include <schframe.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <eeschema_id.h>
|
||||
#include <hotkeys.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <help_common_strings.h>
|
||||
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "schframe.h"
|
||||
|
||||
void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||
{
|
||||
|
@ -497,9 +495,6 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
|||
// Help Menu:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
AddMenuItem( helpMenu,
|
||||
wxID_HELP,
|
||||
_( "Eeschema &Manual" ),
|
||||
|
|
|
@ -27,16 +27,16 @@
|
|||
* @file eeschema/menubar_libedit.cpp
|
||||
* @brief (Re)Create the main menubar for the component editor frame (LibEdit)
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <libeditframe.h>
|
||||
#include <eeschema_id.h>
|
||||
#include <hotkeys.h>
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "libeditframe.h"
|
||||
|
||||
#include <help_common_strings.h>
|
||||
#include <menus_helpers.h>
|
||||
|
||||
/**
|
||||
* @brief (Re)Create the menubar for the component editor frame
|
||||
|
@ -247,9 +247,6 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
|||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu,
|
||||
wxID_HELP,
|
||||
|
|
|
@ -28,17 +28,17 @@
|
|||
* @brief Build the toolbars for the library browser.
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <macros.h>
|
||||
#include <eeschema_id.h>
|
||||
|
||||
#include <general.h>
|
||||
#include <hotkeys.h>
|
||||
#include <class_library.h>
|
||||
#include <viewlib_frame.h>
|
||||
#include <dialog_helpers.h>
|
||||
#include <macros.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <help_common_strings.h>
|
||||
|
||||
#include "class_library.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "general.h"
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "viewlib_frame.h"
|
||||
|
||||
|
||||
void LIB_VIEW_FRAME::ReCreateHToolbar()
|
||||
|
@ -242,9 +242,6 @@ void LIB_VIEW_FRAME::ReCreateMenuBar( void )
|
|||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu, wxID_HELP,
|
||||
_( "Eeschema &Manual" ),
|
||||
|
|
|
@ -125,6 +125,7 @@ target_link_libraries( gerbview_kiface
|
|||
common
|
||||
polygon
|
||||
bitmaps
|
||||
gal
|
||||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -27,15 +27,16 @@
|
|||
* @file gerbview/menubar.cpp
|
||||
* @brief (Re)Create the main menubar for GerbView
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <kiface_i.h>
|
||||
#include <gerbview.h>
|
||||
#include <gerbview_frame.h>
|
||||
#include <gerbview_id.h>
|
||||
#include <hotkeys.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include "gerbview.h"
|
||||
#include "gerbview_frame.h"
|
||||
#include "gerbview_id.h"
|
||||
#include "hotkeys.h"
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::ReCreateMenuBar()
|
||||
|
@ -215,9 +216,6 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
|
|||
// Menu Help
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu,
|
||||
wxID_HELP,
|
||||
|
|
|
@ -198,6 +198,16 @@ private:
|
|||
return std::count( aText.begin(), aText.end() - 1, '\n' ) + 1;
|
||||
}
|
||||
|
||||
public:
|
||||
// These members are declared public only to be (temporary, I am expecting)
|
||||
// used in legacy canvas, to avoid multiple declarations of the same constants,
|
||||
// having multiple declarations of the same constants is really a thing to avoid.
|
||||
//
|
||||
// They will be private later, when the legacy canvas is removed.
|
||||
|
||||
///> Factor that determines the pitch between 2 lines.
|
||||
static const double INTERLINE_PITCH_RATIO;
|
||||
|
||||
///> Factor that determines relative height of overbar.
|
||||
static const double OVERBAR_HEIGHT;
|
||||
|
||||
|
@ -205,7 +215,11 @@ private:
|
|||
static const double BOLD_FACTOR;
|
||||
|
||||
///> Scale factor for a glyph
|
||||
static const double HERSHEY_SCALE;
|
||||
static const double STROKE_FONT_SCALE;
|
||||
|
||||
///> Tilt factor for italic style (the is is the scaling factor
|
||||
///> on dY relative coordinates to give a tilst shape
|
||||
static const double ITALIC_TILT;
|
||||
};
|
||||
} // namespace KIGFX
|
||||
|
||||
|
|
|
@ -118,8 +118,6 @@ enum main_id
|
|||
ID_OPT_TOOLBAR,
|
||||
ID_AUX_TOOLBAR,
|
||||
|
||||
ID_HELP_COPY_VERSION_STRING,
|
||||
|
||||
ID_EDIT,
|
||||
ID_NO_TOOL_SELECTED,
|
||||
ID_SEL_BG_COLOR,
|
||||
|
|
|
@ -31,4 +31,5 @@
|
|||
*/
|
||||
extern const char* const newstroke_font[]; //The font
|
||||
extern const int newstroke_font_bufsize; //font buffer size
|
||||
|
||||
#endif /* __NEWSTROKE_FONT_H__ */
|
||||
|
|
|
@ -219,21 +219,8 @@ public:
|
|||
|
||||
void GetKicadAbout( wxCommandEvent& event );
|
||||
|
||||
/**
|
||||
* Function CopyVersionInfoToClipboard
|
||||
* copies the version information to the clipboard for bug reporting purposes.
|
||||
*/
|
||||
void CopyVersionInfoToClipboard( wxCommandEvent& event );
|
||||
|
||||
void PrintMsg( const wxString& text );
|
||||
|
||||
/**
|
||||
* Append the copy version information to clipboard help menu entry to \a aMenu.
|
||||
*
|
||||
* @param aMenu - The menu to append.
|
||||
*/
|
||||
void AddHelpVersionInfoMenuEntry( wxMenu* aMenu );
|
||||
|
||||
/**
|
||||
* Function LoadSettings
|
||||
* loads common frame parameters from a configuration file.
|
||||
|
|
|
@ -402,9 +402,6 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
|
|||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu, wxID_HELP,
|
||||
_( "KiCad &Manual" ),
|
||||
|
|
|
@ -94,6 +94,7 @@ target_link_libraries( pl_editor_kiface
|
|||
common
|
||||
polygon
|
||||
bitmaps
|
||||
gal
|
||||
${wxWidgets_LIBRARIES}
|
||||
${GDI_PLUS_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
/**
|
||||
* @file pagelayout_editor/menubar.cpp
|
||||
* @brief (Re)Create the main menubar for Pl_Editor
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -27,14 +22,19 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
/**
|
||||
* @file pagelayout_editor/menubar.cpp
|
||||
* @brief (Re)Create the main menubar for Pl_Editor
|
||||
*/
|
||||
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pl_editor_frame.h>
|
||||
#include <pl_editor_id.h>
|
||||
#include <hotkeys.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include "hotkeys.h"
|
||||
#include "pl_editor_frame.h"
|
||||
#include "pl_editor_id.h"
|
||||
|
||||
|
||||
void PL_EDITOR_FRAME::ReCreateMenuBar()
|
||||
|
@ -142,9 +142,6 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
|
|||
// Menu Help
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu,
|
||||
wxID_HELP,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2015 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
|
||||
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -900,6 +900,10 @@ void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
|
||||
switch( m_Layer )
|
||||
{
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Illegal layer" ); // do you really have modules placed on other layers?
|
||||
// pass through
|
||||
case F_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_FR_VISIBLE );
|
||||
break;
|
||||
|
@ -907,10 +911,6 @@ void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
case B_Cu:
|
||||
aLayers[1] = ITEM_GAL_LAYER( MOD_BK_VISIBLE );
|
||||
break;
|
||||
|
||||
default:
|
||||
assert( false ); // do you really have modules placed on inner layers?
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ void DIALOG_CREATE_ARRAY::OnOkClick( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
else
|
||||
wxMessageBox( _(" Bad parameters" ) );
|
||||
wxMessageBox( _("Bad parameters" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,17 +29,17 @@
|
|||
* @file pcbnew/menubar_modedit.cpp
|
||||
* @brief (Re)Create the main menubar for the module editor
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <wxPcbStruct.h>
|
||||
#include <module_editor_frame.h>
|
||||
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
#include <wxPcbStruct.h>
|
||||
|
||||
#include <pcbnew_id.h>
|
||||
#include <hotkeys.h>
|
||||
#include <help_common_strings.h>
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "module_editor_frame.h"
|
||||
#include "pcbnew.h"
|
||||
#include "pcbnew_id.h"
|
||||
|
||||
|
||||
void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
||||
|
@ -333,9 +333,6 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
//----- Help menu --------------------
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu, wxID_HELP,
|
||||
_( "Pcbnew &Manual" ),
|
||||
|
|
|
@ -28,16 +28,18 @@
|
|||
* @file menubar_pcbframe.cpp
|
||||
* Pcbnew editor menu bar
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
#include <pgm_base.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pcbnew.h>
|
||||
#include <wxPcbStruct.h>
|
||||
#include <hotkeys.h>
|
||||
#include <pcbnew_id.h>
|
||||
|
||||
#include <help_common_strings.h>
|
||||
|
||||
#include <menus_helpers.h>
|
||||
#include <kiface_i.h>
|
||||
#include <pgm_base.h>
|
||||
#include <wxPcbStruct.h>
|
||||
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "pcbnew.h"
|
||||
#include "pcbnew_id.h"
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::ReCreateMenuBar()
|
||||
{
|
||||
|
@ -652,8 +654,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
AddMenuItem( helpMenu, wxID_HELP,
|
||||
_( "Pcbnew &Manual" ),
|
||||
_( "Open the Pcbnew Manual" ),
|
||||
|
|
|
@ -195,8 +195,6 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
|
||||
D_PAD* pad = new D_PAD( aModule );
|
||||
|
||||
aModule->Pads().PushBack( pad );
|
||||
|
||||
if( !m_isHolePlated && m_hole )
|
||||
{
|
||||
// mechanical hole
|
||||
|
@ -237,13 +235,16 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
}
|
||||
}
|
||||
|
||||
if( width == 0 || height == 0 )
|
||||
{
|
||||
delete pad;
|
||||
return;
|
||||
}
|
||||
|
||||
if( padType == PAD_ATTRIB_STANDARD )
|
||||
// actually this is a thru-hole pad
|
||||
pad->SetLayerSet( LSET::AllCuMask() | LSET( 2, B_Mask, F_Mask ) );
|
||||
|
||||
if( width == 0 || height == 0 )
|
||||
THROW_IO_ERROR( wxT( "pad with zero size" ) );
|
||||
|
||||
pad->SetPadName( m_name.text );
|
||||
|
||||
if( padShapeName == wxT( "Oval" )
|
||||
|
@ -292,6 +293,8 @@ void PCB_PAD::AddToModule( MODULE* aModule, int aRotation, bool aEncapsulatedPad
|
|||
RotatePoint( &padpos, aModule->GetOrientation() );
|
||||
pad->SetPosition( padpos + aModule->GetPosition() );
|
||||
}
|
||||
|
||||
aModule->Pads().PushBack( pad );
|
||||
}
|
||||
|
||||
|
||||
|
@ -323,7 +326,7 @@ void PCB_PAD::AddToBoard()
|
|||
}
|
||||
|
||||
if( width == 0 || height == 0 )
|
||||
THROW_IO_ERROR( wxT( "pad or via with zero size" ) );
|
||||
return;
|
||||
|
||||
if( IsCopperLayer( m_KiCadLayer ) )
|
||||
{
|
||||
|
|
|
@ -1692,7 +1692,13 @@ MODULE* PCB_PARSER::parseMODULE( wxArrayString* aInitialComments ) throw( IO_ERR
|
|||
break;
|
||||
|
||||
case T_layer:
|
||||
module->SetLayer( parseBoardItemLayer() );
|
||||
{
|
||||
// Footprints can be only on the front side or the back side.
|
||||
// but because we can find some stupid layer in file, ensure a
|
||||
// acceptable layer is set for the footprint
|
||||
LAYER_ID layer = parseBoardItemLayer();
|
||||
module->SetLayer( layer == B_Cu ? B_Cu : F_Cu );
|
||||
}
|
||||
NeedRIGHT();
|
||||
break;
|
||||
|
||||
|
|
|
@ -29,17 +29,17 @@
|
|||
* @brief Build the toolbars for the library browser.
|
||||
*/
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <macros.h>
|
||||
#include <pcbnew_id.h>
|
||||
|
||||
#include <pcbnew.h>
|
||||
#include <wxPcbStruct.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <hotkeys.h>
|
||||
#include <dialog_helpers.h>
|
||||
#include <modview_frame.h>
|
||||
#include <help_common_strings.h>
|
||||
#include <macros.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <wxPcbStruct.h>
|
||||
|
||||
#include "help_common_strings.h"
|
||||
#include "hotkeys.h"
|
||||
#include "modview_frame.h"
|
||||
#include "pcbnew.h"
|
||||
#include "pcbnew_id.h"
|
||||
|
||||
|
||||
void FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar()
|
||||
|
@ -181,9 +181,6 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar( void )
|
|||
// Menu Help:
|
||||
wxMenu* helpMenu = new wxMenu;
|
||||
|
||||
// Version info
|
||||
AddHelpVersionInfoMenuEntry( helpMenu );
|
||||
|
||||
// Contents
|
||||
AddMenuItem( helpMenu, wxID_HELP,
|
||||
_( "Pcbnew &Manual" ),
|
||||
|
|
Loading…
Reference in New Issue