Rename WinEDA_App class to EDA_APP and remove redundant includes.
This commit is contained in:
parent
4467b911b0
commit
ebc7259a91
|
@ -24,7 +24,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
||||
|
@ -39,7 +38,6 @@
|
|||
|
||||
#include "bitmap2component.xpm"
|
||||
|
||||
#include "bitmaps.h"
|
||||
#include "colors_selection.h"
|
||||
#include "build_version.h"
|
||||
|
||||
|
@ -89,6 +87,7 @@ private:
|
|||
void ExportFile( FILE* aOutfile, int aFormat );
|
||||
};
|
||||
|
||||
|
||||
BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
|
||||
{
|
||||
m_Config = new wxConfig();
|
||||
|
@ -116,6 +115,7 @@ BM2CMP_FRAME::BM2CMP_FRAME() : BM2CMP_FRAME_BASE( NULL )
|
|||
Centre();
|
||||
}
|
||||
|
||||
|
||||
BM2CMP_FRAME::~BM2CMP_FRAME()
|
||||
{
|
||||
if( ( m_Config == NULL ) || IsIconized() )
|
||||
|
@ -133,7 +133,7 @@ BM2CMP_FRAME::~BM2CMP_FRAME()
|
|||
|
||||
delete m_Config;
|
||||
|
||||
/* This needed for OSX: avoids furter OnDraw processing after this
|
||||
/* This needed for OSX: avoids further OnDraw processing after this
|
||||
* destructor and before the native window is destroyed
|
||||
*/
|
||||
this->Freeze( );
|
||||
|
@ -156,7 +156,7 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
|
|||
m_InitialPicturePanel->PrepareDC( pict_dc );
|
||||
m_GreyscalePicturePanel->PrepareDC( greyscale_dc );
|
||||
m_BNPicturePanel->PrepareDC( nb_dc );
|
||||
|
||||
|
||||
// OSX crashes with empty bitmaps (on initial refreshes)
|
||||
if(m_Pict_Bitmap.IsOk() && m_Greyscale_Bitmap.IsOk() && m_BN_Bitmap.IsOk())
|
||||
{
|
||||
|
@ -166,12 +166,14 @@ void BM2CMP_FRAME::OnPaint( wxPaintEvent& event )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* Called to load a bitmap file
|
||||
*/
|
||||
void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
|
||||
{
|
||||
wxFileName fn(m_BitmapFileName);
|
||||
wxString path = fn.GetPath();
|
||||
|
||||
if( path.IsEmpty() || !wxDirExists(path) )
|
||||
path = wxGetCwd();
|
||||
|
||||
|
@ -182,7 +184,9 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
|
|||
|
||||
if( diag != wxID_OK )
|
||||
return;
|
||||
|
||||
wxString fullFilename = FileDlg.GetPath();
|
||||
|
||||
if( ! LoadFile( fullFilename ) )
|
||||
return;
|
||||
|
||||
|
@ -192,6 +196,7 @@ void BM2CMP_FRAME::OnLoadFile( wxCommandEvent& event )
|
|||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
|
||||
{
|
||||
m_BitmapFileName = aFullFileName;
|
||||
|
@ -232,6 +237,7 @@ bool BM2CMP_FRAME::LoadFile( wxString& aFullFileName )
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
void BM2CMP_FRAME::Binarize( double aThreshold )
|
||||
{
|
||||
unsigned int pixin;
|
||||
|
@ -244,10 +250,12 @@ void BM2CMP_FRAME::Binarize( double aThreshold )
|
|||
for( int x = 1; x < w; x++ )
|
||||
{
|
||||
pixin = m_Greyscale_Image.GetGreen( x, y );
|
||||
|
||||
if( pixin < threshold )
|
||||
pixout = 0;
|
||||
else
|
||||
pixout = 255;
|
||||
|
||||
m_NB_Image.SetRGB( x, y, pixout, pixout, pixout );
|
||||
}
|
||||
|
||||
|
@ -289,8 +297,10 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
|
|||
{
|
||||
wxFileName fn(m_ConvertedFileName);
|
||||
wxString path = fn.GetPath();
|
||||
|
||||
if( path.IsEmpty() || !wxDirExists(path) )
|
||||
path = ::wxGetCwd();
|
||||
|
||||
wxString msg = _( "Schematic lib file (*.lib)|*.lib" );
|
||||
wxFileDialog FileDlg( this, _( "Create a lib file for Eeschema" ), path, wxEmptyString,
|
||||
msg,
|
||||
|
@ -299,10 +309,12 @@ void BM2CMP_FRAME::OnExportEeschema( wxCommandEvent& event )
|
|||
|
||||
if( diag != wxID_OK )
|
||||
return;
|
||||
|
||||
m_ConvertedFileName = FileDlg.GetPath();
|
||||
|
||||
FILE* outfile;
|
||||
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
|
||||
|
||||
if( outfile == NULL )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -320,8 +332,10 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
|
|||
{
|
||||
wxFileName fn(m_ConvertedFileName);
|
||||
wxString path = fn.GetPath();
|
||||
|
||||
if( path.IsEmpty() || !wxDirExists(path) )
|
||||
path = ::wxGetCwd();
|
||||
|
||||
wxString msg = _( "Footprint file (*.mod)|*.mod" );
|
||||
wxFileDialog FileDlg( this, _( "Create a footprint file for PcbNew" ),
|
||||
path, wxEmptyString,
|
||||
|
@ -331,10 +345,13 @@ void BM2CMP_FRAME::OnExportPcbnew( wxCommandEvent& event )
|
|||
|
||||
if( diag != wxID_OK )
|
||||
return;
|
||||
|
||||
m_ConvertedFileName = FileDlg.GetPath();
|
||||
|
||||
|
||||
FILE* outfile;
|
||||
outfile = wxFopen( m_ConvertedFileName, wxT( "w" ) );
|
||||
|
||||
if( outfile == NULL )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -353,6 +370,7 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
|
|||
int h = m_NB_Image.GetHeight();
|
||||
int w = m_NB_Image.GetWidth();
|
||||
potrace_bitmap_t* potrace_bitmap = bm_new( w, h );
|
||||
|
||||
if( !potrace_bitmap )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -377,18 +395,18 @@ void BM2CMP_FRAME::ExportFile( FILE* aOutfile, int aFormat )
|
|||
|
||||
// BM_TO_CMP_APP
|
||||
|
||||
void WinEDA_App::MacOpenFile(const wxString &fileName)
|
||||
void EDA_APP::MacOpenFile(const wxString &fileName)
|
||||
{
|
||||
}
|
||||
|
||||
IMPLEMENT_APP( WinEDA_App )
|
||||
IMPLEMENT_APP( EDA_APP )
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
// BM_TO_CMP_APP
|
||||
// main program
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
bool WinEDA_App::OnInit()
|
||||
bool EDA_APP::OnInit()
|
||||
{
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
/* Read from Common config the Pdf browser choice
|
||||
*/
|
||||
void WinEDA_App::ReadPdfBrowserInfos()
|
||||
void EDA_APP::ReadPdfBrowserInfos()
|
||||
{
|
||||
wxASSERT( m_EDA_CommonConfig != NULL );
|
||||
|
||||
|
@ -32,7 +32,7 @@ void WinEDA_App::ReadPdfBrowserInfos()
|
|||
|
||||
/* Write into Common config the Pdf browser choice
|
||||
*/
|
||||
void WinEDA_App::WritePdfBrowserInfos()
|
||||
void EDA_APP::WritePdfBrowserInfos()
|
||||
{
|
||||
wxASSERT( m_EDA_CommonConfig != NULL );
|
||||
|
||||
|
|
|
@ -237,7 +237,7 @@ static struct LANGUAGE_DESCR s_Language_List[] =
|
|||
};
|
||||
|
||||
|
||||
WinEDA_App::WinEDA_App()
|
||||
EDA_APP::EDA_APP()
|
||||
{
|
||||
m_Checker = NULL;
|
||||
m_HtmlCtrl = NULL;
|
||||
|
@ -251,7 +251,7 @@ WinEDA_App::WinEDA_App()
|
|||
}
|
||||
|
||||
|
||||
WinEDA_App::~WinEDA_App()
|
||||
EDA_APP::~EDA_APP()
|
||||
{
|
||||
SaveSettings();
|
||||
|
||||
|
@ -271,7 +271,7 @@ WinEDA_App::~WinEDA_App()
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
|
||||
void EDA_APP::InitEDA_Appl( const wxString& aName, EDA_APP_T aId )
|
||||
{
|
||||
wxString EnvLang;
|
||||
|
||||
|
@ -349,7 +349,7 @@ void WinEDA_App::InitEDA_Appl( const wxString& aName, id_app_type aId )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::InitOnLineHelp()
|
||||
void EDA_APP::InitOnLineHelp()
|
||||
{
|
||||
wxString fullfilename = FindKicadHelpPath();
|
||||
|
||||
|
@ -376,7 +376,7 @@ void WinEDA_App::InitOnLineHelp()
|
|||
}
|
||||
|
||||
|
||||
bool WinEDA_App::SetBinDir()
|
||||
bool EDA_APP::SetBinDir()
|
||||
{
|
||||
/* Apple MacOSx */
|
||||
#ifdef __APPLE__
|
||||
|
@ -460,7 +460,7 @@ bool WinEDA_App::SetBinDir()
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::SetDefaultSearchPaths( void )
|
||||
void EDA_APP::SetDefaultSearchPaths( void )
|
||||
{
|
||||
size_t i;
|
||||
wxString path = m_BinDir;
|
||||
|
@ -554,7 +554,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
|
|||
/* Add schematic library file path to search path list.
|
||||
* we must add <kicad path>/library and <kicad path>/library/doc
|
||||
*/
|
||||
if( m_Id == APP_TYPE_EESCHEMA )
|
||||
if( m_Id == APP_EESCHEMA_T )
|
||||
{
|
||||
fn.AppendDir( wxT( "library" ) );
|
||||
|
||||
|
@ -576,7 +576,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
|
|||
}
|
||||
|
||||
/* Add PCB library file path to search path list. */
|
||||
if( ( m_Id == APP_TYPE_PCBNEW ) || ( m_Id == APP_TYPE_CVPCB ) )
|
||||
if( ( m_Id == APP_PCBNEW_T ) || ( m_Id == APP_CVPCB_T ) )
|
||||
{
|
||||
fn.AppendDir( wxT( "modules" ) );
|
||||
|
||||
|
@ -611,7 +611,7 @@ void WinEDA_App::SetDefaultSearchPaths( void )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory )
|
||||
void EDA_APP::GetSettings( bool aReopenLastUsedDirectory )
|
||||
{
|
||||
wxASSERT( m_EDA_Config != NULL && m_EDA_CommonConfig != NULL );
|
||||
|
||||
|
@ -669,7 +669,7 @@ void WinEDA_App::GetSettings( bool aReopenLastUsedDirectory )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::SaveSettings()
|
||||
void EDA_APP::SaveSettings()
|
||||
{
|
||||
wxASSERT( m_EDA_Config != NULL );
|
||||
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
|
||||
|
@ -681,7 +681,7 @@ void WinEDA_App::SaveSettings()
|
|||
}
|
||||
|
||||
|
||||
bool WinEDA_App::SetLanguage( bool first_time )
|
||||
bool EDA_APP::SetLanguage( bool first_time )
|
||||
{
|
||||
bool retv = true;
|
||||
|
||||
|
@ -757,7 +757,7 @@ bool WinEDA_App::SetLanguage( bool first_time )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::SetLanguageIdentifier( int menu_id )
|
||||
void EDA_APP::SetLanguageIdentifier( int menu_id )
|
||||
{
|
||||
wxLogDebug( wxT( "Select language ID %d from %d possible languages." ),
|
||||
menu_id, LANGUAGE_DESCR_COUNT );
|
||||
|
@ -773,7 +773,7 @@ void WinEDA_App::SetLanguageIdentifier( int menu_id )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::SetLanguagePath( void )
|
||||
void EDA_APP::SetLanguagePath( void )
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
@ -811,7 +811,7 @@ void WinEDA_App::SetLanguagePath( void )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
|
||||
void EDA_APP::AddMenuLanguageList( wxMenu* MasterMenu )
|
||||
{
|
||||
wxMenu* menu = NULL;
|
||||
wxMenuItem* item;
|
||||
|
@ -858,7 +858,7 @@ void WinEDA_App::AddMenuLanguageList( wxMenu* MasterMenu )
|
|||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
|
||||
wxString EDA_APP::FindFileInSearchPaths( const wxString& filename,
|
||||
const wxArrayString* subdirs )
|
||||
{
|
||||
size_t i, j;
|
||||
|
@ -885,7 +885,7 @@ wxString WinEDA_App::FindFileInSearchPaths( const wxString& filename,
|
|||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::GetHelpFile( void )
|
||||
wxString EDA_APP::GetHelpFile( void )
|
||||
{
|
||||
wxString fn;
|
||||
wxArrayString subdirs, altsubdirs;
|
||||
|
@ -963,7 +963,7 @@ wxString WinEDA_App::GetHelpFile( void )
|
|||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::GetLibraryFile( const wxString& filename )
|
||||
wxString EDA_APP::GetLibraryFile( const wxString& filename )
|
||||
{
|
||||
wxArrayString subdirs;
|
||||
|
||||
|
@ -978,7 +978,7 @@ wxString WinEDA_App::GetLibraryFile( const wxString& filename )
|
|||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch )
|
||||
wxString EDA_APP::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch )
|
||||
{
|
||||
if( !m_LastVisitedLibPath.IsEmpty() )
|
||||
return m_LastVisitedLibPath;
|
||||
|
@ -1021,13 +1021,13 @@ wxString WinEDA_App::ReturnLastVisitedLibraryPath( const wxString& aSubPathToSea
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::SaveLastVisitedLibraryPath( const wxString& aPath )
|
||||
void EDA_APP::SaveLastVisitedLibraryPath( const wxString& aPath )
|
||||
{
|
||||
m_LastVisitedLibPath = aPath;
|
||||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename )
|
||||
wxString EDA_APP::ReturnFilenameWithRelativePathInLibPath( const wxString& aFullFilename )
|
||||
{
|
||||
/* If the library path is already in the library search paths
|
||||
* list, just add the library name to the list. Otherwise, add
|
||||
|
@ -1065,7 +1065,7 @@ wxString WinEDA_App::ReturnFilenameWithRelativePathInLibPath( const wxString& aF
|
|||
}
|
||||
|
||||
|
||||
wxString WinEDA_App::FindLibraryPath( const wxString& aFileName )
|
||||
wxString EDA_APP::FindLibraryPath( const wxString& aFileName )
|
||||
{
|
||||
if( wxFileName::FileExists( aFileName ) )
|
||||
return aFileName;
|
||||
|
@ -1074,7 +1074,7 @@ wxString WinEDA_App::FindLibraryPath( const wxString& aFileName )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::RemoveLibraryPath( const wxString& aPaths )
|
||||
void EDA_APP::RemoveLibraryPath( const wxString& aPaths )
|
||||
{
|
||||
wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) );
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ void WinEDA_App::RemoveLibraryPath( const wxString& aPaths )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::InsertLibraryPath( const wxString& aPaths, size_t aIndex )
|
||||
void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex )
|
||||
{
|
||||
wxStringTokenizer Token( aPaths, wxT( ";\n\r" ) );
|
||||
|
||||
|
|
|
@ -520,20 +520,20 @@ wxString ReturnKicadDatasPath()
|
|||
if( PathFound )
|
||||
{
|
||||
data_path.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
|
||||
|
||||
if( data_path.Last() != '/' )
|
||||
data_path += UNIX_STRING_DIR_SEP;
|
||||
}
|
||||
else
|
||||
{
|
||||
data_path.Empty();
|
||||
}
|
||||
|
||||
return data_path;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the preferred editor name
|
||||
*/
|
||||
wxString& WinEDA_App::GetEditorName()
|
||||
wxString& EDA_APP::GetEditorName()
|
||||
{
|
||||
wxString editorname = m_EditorName;
|
||||
|
||||
|
|
|
@ -22,19 +22,9 @@
|
|||
#define FORCE_LOCAL_CONFIG true
|
||||
|
||||
|
||||
/**
|
||||
* Creates or recreates the kicad project file. (filename.pro)
|
||||
* Initialize:
|
||||
* G_Prj_Config
|
||||
* G_Prj_Config_LocalFilename
|
||||
* G_Prj_Default_Config_FullFilename
|
||||
* Return:
|
||||
* True if local config
|
||||
* False if default config
|
||||
*/
|
||||
bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
bool ForceUseLocalConfig )
|
||||
bool EDA_APP::ReCreatePrjConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
bool ForceUseLocalConfig )
|
||||
{
|
||||
wxFileName fn = fileName;
|
||||
wxString defaultFileName;
|
||||
|
@ -89,7 +79,9 @@ bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName,
|
|||
m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR );
|
||||
|
||||
if( version > 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete m_ProjectConfig; // Version incorrect
|
||||
|
@ -118,15 +110,9 @@ bool WinEDA_App::ReCreatePrjConfig( const wxString& fileName,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function WriteProjectConfig
|
||||
* Save the current "projet" parameters
|
||||
* saved parameters are parameters that have the .m_Setup member set to false
|
||||
* saving file is the .pro file project
|
||||
*/
|
||||
void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List )
|
||||
void EDA_APP::WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List )
|
||||
{
|
||||
PARAM_CFG_BASE* pt_cfg;
|
||||
wxString msg;
|
||||
|
@ -155,6 +141,7 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
|||
for( ; List != NULL && *List != NULL; List++ )
|
||||
{
|
||||
pt_cfg = *List;
|
||||
|
||||
if( pt_cfg->m_Group )
|
||||
m_ProjectConfig->SetPath( pt_cfg->m_Group );
|
||||
else
|
||||
|
@ -169,7 +156,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
|||
m_ProjectConfig->DeleteGroup( pt_cfg->m_Ident );
|
||||
}
|
||||
else
|
||||
{
|
||||
pt_cfg->SaveParam( m_ProjectConfig );
|
||||
}
|
||||
}
|
||||
|
||||
m_ProjectConfig->SetPath( UNIX_STRING_DIR_SEP );
|
||||
|
@ -178,9 +167,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params )
|
||||
void EDA_APP::WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params )
|
||||
{
|
||||
ReCreatePrjConfig( fileName, GroupName, FORCE_LOCAL_CONFIG );
|
||||
|
||||
|
@ -216,7 +205,9 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
|||
m_ProjectConfig->DeleteGroup( param.m_Ident );
|
||||
}
|
||||
else
|
||||
{
|
||||
param.SaveParam( m_ProjectConfig );
|
||||
}
|
||||
}
|
||||
|
||||
m_ProjectConfig->SetPath( UNIX_STRING_DIR_SEP );
|
||||
|
@ -231,7 +222,7 @@ void WinEDA_App::WriteProjectConfig( const wxString& fileName,
|
|||
* saved parameters are parameters that have the .m_Setup member set to true
|
||||
* @param aList = array of PARAM_CFG_BASE pointers
|
||||
*/
|
||||
void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList )
|
||||
void EDA_APP::SaveCurrentSetupValues( PARAM_CFG_BASE** aList )
|
||||
{
|
||||
PARAM_CFG_BASE* pt_cfg;
|
||||
|
||||
|
@ -250,12 +241,14 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList )
|
|||
m_EDA_Config->DeleteGroup( pt_cfg->m_Ident );
|
||||
}
|
||||
else
|
||||
{
|
||||
pt_cfg->SaveParam( m_EDA_Config );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List )
|
||||
void EDA_APP::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List )
|
||||
{
|
||||
if( m_EDA_Config == NULL )
|
||||
return;
|
||||
|
@ -276,24 +269,10 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_ARRAY& List )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function ReadProjectConfig
|
||||
* Read the current "projet" parameters
|
||||
* Parameters are parameters that have the .m_Setup member set to false
|
||||
* read file is the .pro file project
|
||||
*
|
||||
* if Load_Only_if_New == true, this file is read only if it differs from
|
||||
* the current config (different dates )
|
||||
*
|
||||
* @return true if read.
|
||||
* Also set:
|
||||
* wxGetApp().m_CurrentOptionFileDateAndTime
|
||||
* wxGetApp().m_CurrentOptionFile
|
||||
*/
|
||||
bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New )
|
||||
bool EDA_APP::ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New )
|
||||
{
|
||||
PARAM_CFG_BASE* pt_cfg;
|
||||
wxString timestamp;
|
||||
|
@ -302,6 +281,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
|
||||
m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR );
|
||||
timestamp = m_ProjectConfig->Read( wxT( "update" ) );
|
||||
|
||||
if( Load_Only_if_New && ( !timestamp.IsEmpty() )
|
||||
&& (timestamp == m_CurrentOptionFileDateAndTime) )
|
||||
{
|
||||
|
@ -311,12 +291,13 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
m_CurrentOptionFileDateAndTime = timestamp;
|
||||
|
||||
if( !g_Prj_Default_Config_FullFilename.IsEmpty() )
|
||||
{
|
||||
m_CurrentOptionFile = g_Prj_Default_Config_FullFilename;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( wxPathOnly( g_Prj_Config_LocalFilename ).IsEmpty() )
|
||||
m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP +
|
||||
g_Prj_Config_LocalFilename;
|
||||
m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + g_Prj_Config_LocalFilename;
|
||||
else
|
||||
m_CurrentOptionFile = g_Prj_Config_LocalFilename;
|
||||
}
|
||||
|
@ -324,6 +305,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
for( ; List != NULL && *List != NULL; List++ )
|
||||
{
|
||||
pt_cfg = *List;
|
||||
|
||||
if( pt_cfg->m_Group )
|
||||
m_ProjectConfig->SetPath( pt_cfg->m_Group );
|
||||
else
|
||||
|
@ -342,10 +324,10 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
}
|
||||
|
||||
|
||||
bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params,
|
||||
bool Load_Only_if_New )
|
||||
bool EDA_APP::ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params,
|
||||
bool Load_Only_if_New )
|
||||
{
|
||||
wxString timestamp;
|
||||
|
||||
|
@ -353,6 +335,7 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
|
||||
m_ProjectConfig->SetPath( wxCONFIG_PATH_SEPARATOR );
|
||||
timestamp = m_ProjectConfig->Read( wxT( "update" ) );
|
||||
|
||||
if( Load_Only_if_New && ( !timestamp.IsEmpty() )
|
||||
&& (timestamp == m_CurrentOptionFileDateAndTime) )
|
||||
{
|
||||
|
@ -362,12 +345,13 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
m_CurrentOptionFileDateAndTime = timestamp;
|
||||
|
||||
if( !g_Prj_Default_Config_FullFilename.IsEmpty() )
|
||||
{
|
||||
m_CurrentOptionFile = g_Prj_Default_Config_FullFilename;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( wxPathOnly( g_Prj_Config_LocalFilename ).IsEmpty() )
|
||||
m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP +
|
||||
g_Prj_Config_LocalFilename;
|
||||
m_CurrentOptionFile = wxGetCwd() + STRING_DIR_SEP + g_Prj_Config_LocalFilename;
|
||||
else
|
||||
m_CurrentOptionFile = g_Prj_Config_LocalFilename;
|
||||
}
|
||||
|
@ -392,19 +376,14 @@ bool WinEDA_App::ReadProjectConfig( const wxString& local_config_filename,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function ReadCurrentSetupValues
|
||||
* Raed the current setup values previously saved, from m_EDA_Config
|
||||
* saved parameters are parameters that have the .m_Setup member set to true
|
||||
* @param aList = array of PARAM_CFG_BASE pointers
|
||||
*/
|
||||
void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_BASE** aList )
|
||||
void EDA_APP::ReadCurrentSetupValues( PARAM_CFG_BASE** aList )
|
||||
{
|
||||
PARAM_CFG_BASE* pt_cfg;
|
||||
|
||||
for( ; *aList != NULL; aList++ )
|
||||
{
|
||||
pt_cfg = *aList;
|
||||
|
||||
if( pt_cfg->m_Setup == false )
|
||||
continue;
|
||||
|
||||
|
@ -413,7 +392,7 @@ void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_BASE** aList )
|
|||
}
|
||||
|
||||
|
||||
void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_ARRAY& List )
|
||||
void EDA_APP::ReadCurrentSetupValues( PARAM_CFG_ARRAY& List )
|
||||
{
|
||||
BOOST_FOREACH( PARAM_CFG_BASE& param, List )
|
||||
{
|
||||
|
@ -468,6 +447,7 @@ void PARAM_CFG_INT::ReadParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
int itmp = aConfig->Read( m_Ident, m_Default );
|
||||
|
||||
if( (itmp < m_Min) || (itmp > m_Max) )
|
||||
|
@ -485,6 +465,7 @@ void PARAM_CFG_INT::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
aConfig->Write( m_Ident, *m_Pt_param );
|
||||
}
|
||||
|
||||
|
@ -536,6 +517,7 @@ void PARAM_CFG_SETCOLOR::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
aConfig->Write( m_Ident, *m_Pt_param );
|
||||
}
|
||||
|
||||
|
@ -577,18 +559,23 @@ void PARAM_CFG_DOUBLE::ReadParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
double ftmp = 0;
|
||||
wxString msg;
|
||||
msg = aConfig->Read( m_Ident, wxT( "" ) );
|
||||
|
||||
if( msg.IsEmpty() )
|
||||
{
|
||||
ftmp = m_Default;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.ToDouble( &ftmp );
|
||||
|
||||
if( (ftmp < m_Min) || (ftmp > m_Max) )
|
||||
ftmp = m_Default;
|
||||
}
|
||||
|
||||
*m_Pt_param = ftmp;
|
||||
}
|
||||
|
||||
|
@ -601,6 +588,7 @@ void PARAM_CFG_DOUBLE::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
aConfig->Write( m_Ident, *m_Pt_param );
|
||||
}
|
||||
|
||||
|
@ -635,6 +623,7 @@ void PARAM_CFG_BOOL::ReadParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
int itmp = aConfig->Read( m_Ident, (int) m_Default );
|
||||
|
||||
*m_Pt_param = itmp ? true : false;
|
||||
|
@ -649,6 +638,7 @@ void PARAM_CFG_BOOL::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
aConfig->Write( m_Ident, *m_Pt_param );
|
||||
}
|
||||
|
||||
|
@ -694,6 +684,7 @@ void PARAM_CFG_WXSTRING::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
aConfig->Write( m_Ident, *m_Pt_param );
|
||||
}
|
||||
|
||||
|
@ -735,6 +726,7 @@ void PARAM_CFG_FILENAME::SaveParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
wxString prm = *m_Pt_param;
|
||||
// filenames are stored using Unix notation
|
||||
prm.Replace(wxT("\\"), wxT("/") );
|
||||
|
@ -759,10 +751,12 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig )
|
|||
{
|
||||
if( m_Pt_param == NULL || aConfig == NULL )
|
||||
return;
|
||||
|
||||
int indexlib = 1; // We start indexlib to 1 because first
|
||||
// lib name is LibName1
|
||||
wxString libname, id_lib;
|
||||
wxArrayString* libname_list = m_Pt_param;
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
id_lib = m_Ident;
|
||||
|
@ -795,6 +789,7 @@ void PARAM_CFG_LIBNAME_LIST::SaveParam( wxConfigBase* aConfig )
|
|||
unsigned indexlib = 0;
|
||||
wxString configkey;
|
||||
wxString libname;
|
||||
|
||||
for( ; indexlib < libname_list->GetCount(); indexlib++ )
|
||||
{
|
||||
configkey = m_Ident;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
|
|
@ -5,13 +5,11 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "zones.h"
|
||||
#include "bitmaps.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
#include "colors_selection.h"
|
||||
#include "cvpcb_id.h"
|
||||
|
@ -39,7 +37,7 @@ const wxString titleLibLoadError( _( "Library Load Error" ) );
|
|||
* MacOSX: Needed for file association
|
||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||
*/
|
||||
void WinEDA_App::MacOpenFile(const wxString &fileName)
|
||||
void EDA_APP::MacOpenFile(const wxString &fileName)
|
||||
{
|
||||
wxFileName filename = fileName;
|
||||
wxString oldPath;
|
||||
|
@ -62,20 +60,20 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
|
|||
}
|
||||
|
||||
// Create a new application object
|
||||
IMPLEMENT_APP( WinEDA_App )
|
||||
IMPLEMENT_APP( EDA_APP )
|
||||
|
||||
|
||||
/************************************/
|
||||
/* Called to initialize the program */
|
||||
/************************************/
|
||||
|
||||
bool WinEDA_App::OnInit()
|
||||
bool EDA_APP::OnInit()
|
||||
{
|
||||
wxFileName filename;
|
||||
wxString message;
|
||||
CVPCB_MAINFRAME* frame = NULL;
|
||||
|
||||
InitEDA_Appl( wxT( "CvPcb" ), APP_TYPE_CVPCB );
|
||||
InitEDA_Appl( wxT( "CvPcb" ), APP_CVPCB_T );
|
||||
|
||||
if( m_Checker && m_Checker->IsAnotherRunning() )
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "wxstruct.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "macros.h"
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "macros.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxstruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
****************************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "block_commande.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "kicad_string.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/*************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "kicad_string.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "kicad_string.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
|
|
|
@ -33,10 +33,8 @@
|
|||
#include <vector>
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "kicad_string.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "wxstruct.h"
|
||||
#include "netlist.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "sch_component.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "eda_dde.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "confirm.h"
|
||||
#include "eda_doc.h"
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "bitmaps.h"
|
||||
#include "common.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "kicad_string.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "wx/valgen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "general.h"
|
||||
#include "drawtxt.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
// License: GPL
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
#include "bitmaps.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* Handles the dialog so set current texts and pins sizes in LibEdit
|
||||
*/
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "plot_common.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "plot_common.h"
|
||||
#include "worksheet.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "worksheet.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "trigo.h"
|
||||
#include "common.h"
|
||||
#include "richio.h"
|
||||
#include "plot_common.h"
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "base_struct.h"
|
||||
#include "drawtxt.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "bitmaps.h"
|
||||
#include "eda_dde.h"
|
||||
#include "id.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
@ -80,12 +78,12 @@ TRANSFORM DefaultTransform = TRANSFORM( 1, 0, 0, -1 );
|
|||
// static object for many reasons) and also declares the accessor function
|
||||
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
|
||||
// not wxApp)
|
||||
IMPLEMENT_APP( WinEDA_App )
|
||||
IMPLEMENT_APP( EDA_APP )
|
||||
|
||||
/* MacOSX: Needed for file association
|
||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||
*/
|
||||
void WinEDA_App::MacOpenFile( const wxString &fileName )
|
||||
void EDA_APP::MacOpenFile( const wxString &fileName )
|
||||
{
|
||||
wxFileName filename = fileName;
|
||||
SCH_EDIT_FRAME* frame = ((SCH_EDIT_FRAME*) GetTopWindow());
|
||||
|
@ -100,12 +98,12 @@ void WinEDA_App::MacOpenFile( const wxString &fileName )
|
|||
}
|
||||
|
||||
|
||||
bool WinEDA_App::OnInit()
|
||||
bool EDA_APP::OnInit()
|
||||
{
|
||||
wxFileName filename;
|
||||
SCH_EDIT_FRAME* frame = NULL;
|
||||
|
||||
InitEDA_Appl( wxT( "EESchema" ), APP_TYPE_EESCHEMA );
|
||||
InitEDA_Appl( wxT( "EESchema" ), APP_EESCHEMA_T );
|
||||
|
||||
if( m_Checker && m_Checker->IsAnotherRunning() )
|
||||
{
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
/**************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "kicad_string.h"
|
||||
#include "bitmaps.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "general.h"
|
||||
#include "kicad_device_context.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/****************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
*/
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
/******************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "bitmaps.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/***************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "hotkeys.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "base_struct.h"
|
||||
#include "drawtxt.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "drawtxt.h"
|
||||
#include "plot_common.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
#include "bitmaps.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/* Module for generation of component archive files. */
|
||||
/*****************************************************/
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxstruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "eeschema_id.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
#include "libeditframe.h"
|
||||
|
|
|
@ -4,13 +4,11 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "general.h"
|
||||
//#include "protos.h"
|
||||
#include "sch_component.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_library.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "fctsys.h"
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "kicad_string.h"
|
||||
#include "gestfich.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/*****************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "gestfich.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/*******************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/***************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "gr_basic.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "trigo.h"
|
||||
#include "common.h"
|
||||
#include "richio.h"
|
||||
#include "plot_common.h"
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "trigo.h"
|
||||
#include "kicad_string.h"
|
||||
#include "richio.h"
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "base_struct.h"
|
||||
#include "gr_basic.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "common.h"
|
||||
#include "trigo.h"
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "kicad_string.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "appl_wxstruct.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "drawtxt.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "general.h"
|
||||
#include "dlist.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "drawtxt.h"
|
||||
#include "plot_common.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "trigo.h"
|
||||
#include "eeschema_id.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "eda_doc.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/************************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -8,11 +8,9 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "gr_basic.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "gestfich.h"
|
||||
#include "bitmaps.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "confirm.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "macros.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
/******************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "hotkeys.h"
|
||||
#include "bitmaps.h"
|
||||
#include "eeschema_id.h"
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -3,14 +3,10 @@
|
|||
/******************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
//#include "confirm.h"
|
||||
#include "bitmaps.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
#include "general.h"
|
||||
//#include "protos.h"
|
||||
#include "hotkeys.h"
|
||||
#include "eeschema_id.h"
|
||||
|
||||
|
|
|
@ -3,11 +3,8 @@
|
|||
/****************************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "bitmaps.h"
|
||||
#include "macros.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "wxstruct.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "protos.h"
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "eeschema_id.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "bitmaps.h"
|
||||
#include "class_sch_screen.h"
|
||||
#include "wxEeschemaStruct.h"
|
||||
|
||||
|
|
|
@ -4,12 +4,10 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "eda_doc.h"
|
||||
#include "wxstruct.h"
|
||||
#include "class_sch_screen.h"
|
||||
|
||||
#include "general.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "gerbview.h"
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
/************************************************/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
|
@ -12,7 +11,6 @@
|
|||
#include "gerbview.h"
|
||||
#include "gerbview_id.h"
|
||||
#include "pcbplot.h"
|
||||
#include "bitmaps.h"
|
||||
#include "zones.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "colors_selection.h"
|
||||
|
@ -42,12 +40,12 @@ Ki_PageDescr* g_GerberPageSizeList[] =
|
|||
};
|
||||
|
||||
|
||||
IMPLEMENT_APP( WinEDA_App )
|
||||
IMPLEMENT_APP( EDA_APP )
|
||||
|
||||
/* MacOSX: Needed for file association
|
||||
* http://wiki.wxwidgets.org/WxMac-specific_topics
|
||||
*/
|
||||
void WinEDA_App::MacOpenFile(const wxString &fileName)
|
||||
void EDA_APP::MacOpenFile(const wxString &fileName)
|
||||
{
|
||||
wxFileName filename = fileName;
|
||||
GERBVIEW_FRAME * frame = ((GERBVIEW_FRAME*)GetTopWindow());
|
||||
|
@ -59,18 +57,19 @@ void WinEDA_App::MacOpenFile(const wxString &fileName)
|
|||
}
|
||||
|
||||
|
||||
bool WinEDA_App::OnInit()
|
||||
bool EDA_APP::OnInit()
|
||||
{
|
||||
wxFileName fn;
|
||||
GERBVIEW_FRAME* frame = NULL;
|
||||
|
||||
InitEDA_Appl( wxT( "GerbView" ), APP_TYPE_GERBVIEW );
|
||||
InitEDA_Appl( wxT( "GerbView" ), APP_GERBVIEW_T );
|
||||
|
||||
if( m_Checker && m_Checker->IsAnotherRunning() )
|
||||
{
|
||||
if( !IsOK( NULL, _( "GerbView is already running. Continue?" ) ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
ScreenPcb = new PCB_SCREEN();
|
||||
ScreenPcb->m_CurrentSheetDesc = &g_Sheet_GERBER;
|
||||
|
||||
|
@ -85,9 +84,7 @@ bool WinEDA_App::OnInit()
|
|||
* display the real hotkeys in menus or tool tips */
|
||||
ReadHotkeyConfig( wxT("GerberFrame"), s_Gerbview_Hokeys_Descr );
|
||||
|
||||
frame = new GERBVIEW_FRAME( NULL, wxT( "GerbView" ),
|
||||
wxPoint( 0, 0 ),
|
||||
wxSize( 600, 400 ) );
|
||||
frame = new GERBVIEW_FRAME( NULL, wxT( "GerbView" ), wxPoint( 0, 0 ), wxSize( 600, 400 ) );
|
||||
|
||||
/* Gerbview mainframe title */
|
||||
frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() );
|
||||
|
@ -116,6 +113,7 @@ bool WinEDA_App::OnInit()
|
|||
|
||||
// Load all files specified on the command line.
|
||||
int jj = 0;
|
||||
|
||||
for( int ii = 1; ii < argc && ii <= LAYER_COUNT; ++ii )
|
||||
{
|
||||
fn = wxFileName( argv[ii] );
|
||||
|
|
|
@ -5,13 +5,11 @@
|
|||
#include "fctsys.h"
|
||||
#include "appl_wxstruct.h"
|
||||
#include "wxstruct.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
||||
#include "gerbview.h"
|
||||
#include "class_gerber_draw_item.h"
|
||||
#include "pcbplot.h"
|
||||
#include "bitmaps.h"
|
||||
#include "gerbview_id.h"
|
||||
#include "hotkeys.h"
|
||||
#include "class_GERBER.h"
|
||||
|
@ -31,10 +29,10 @@ const wxString GerbviewShowDCodes( wxT( "ShowDCodesOpt" ) );
|
|||
|
||||
|
||||
GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* father,
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style ) :
|
||||
const wxString& title,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style ) :
|
||||
PCB_BASE_FRAME( father, GERBER_FRAME, title, pos, size, style )
|
||||
{
|
||||
m_FrameName = wxT( "GerberFrame" );
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/******************************************/
|
||||
/* appl_wxstruct.h */
|
||||
/* Base application class implementation. */
|
||||
/******************************************/
|
||||
/**
|
||||
* @file appl_wxstruct.h
|
||||
* @brief Base class implementation for all Kicad applications.
|
||||
*/
|
||||
|
||||
#ifndef APPL_WXSTRUCT_H
|
||||
#define APPL_WXSTRUCT_H
|
||||
|
@ -13,13 +13,13 @@
|
|||
#include "param_config.h"
|
||||
|
||||
|
||||
enum id_app_type {
|
||||
APP_TYPE_UNKOWN,
|
||||
APP_TYPE_EESCHEMA,
|
||||
APP_TYPE_PCBNEW,
|
||||
APP_TYPE_CVPCB,
|
||||
APP_TYPE_GERBVIEW,
|
||||
APP_TYPE_KICAD
|
||||
enum EDA_APP_T {
|
||||
APP_UNKNOWN_T,
|
||||
APP_EESCHEMA_T,
|
||||
APP_PCBNEW_T,
|
||||
APP_CVPCB_T,
|
||||
APP_GERBVIEW_T,
|
||||
APP_KICAD_T
|
||||
};
|
||||
|
||||
class wxConfigBase;
|
||||
|
@ -28,18 +28,15 @@ class wxSingleInstanceChecker;
|
|||
class wxHtmlHelpController;
|
||||
|
||||
|
||||
/**********************************************/
|
||||
/* Class representing the entire Application */
|
||||
/**********************************************/
|
||||
|
||||
class WinEDA_App : public wxApp
|
||||
/**
|
||||
* Class EDA_APP
|
||||
* is the base class representing all of Kicad applications.
|
||||
*/
|
||||
class EDA_APP : public wxApp
|
||||
{
|
||||
public:
|
||||
id_app_type m_Id; /* Used mainly to handle
|
||||
* default paths libs
|
||||
* m_Id = APP_TYPE_EESCHEMA,
|
||||
* APP_TYPE_PCBNEW ...
|
||||
*/
|
||||
EDA_APP_T m_Id; /* Used mainly to handle default paths libs
|
||||
* m_Id = APP_EESCHEMA_T, APP_PCBNEW_T ... */
|
||||
wxString m_Project;
|
||||
wxSingleInstanceChecker* m_Checker;
|
||||
|
||||
|
@ -56,8 +53,7 @@ public:
|
|||
|
||||
wxString m_BinDir; /* Kicad executable path.*/
|
||||
wxString m_KicadEnv; /* environment variable KICAD */
|
||||
bool m_Env_Defined; // TRUE if environment KICAD is
|
||||
// defined.
|
||||
bool m_Env_Defined; // TRUE if environment KICAD is defined.
|
||||
|
||||
wxLocale* m_Locale; // The current locale.
|
||||
int m_LanguageId; // The current language setting.
|
||||
|
@ -74,29 +70,29 @@ protected:
|
|||
wxFileName m_projectFileName;
|
||||
wxString m_LastVisitedLibPath;
|
||||
|
||||
public: WinEDA_App();
|
||||
~WinEDA_App();
|
||||
public: EDA_APP();
|
||||
~EDA_APP();
|
||||
|
||||
/**
|
||||
* Function OnInit
|
||||
* this is the first executed function (like main() )
|
||||
* @return true if the application can be started.
|
||||
*/
|
||||
bool OnInit();
|
||||
bool OnInit();
|
||||
|
||||
/**
|
||||
* Function SetBinDir
|
||||
* finds the path to the executable and store it in WinEDA_App::m_BinDir
|
||||
* finds the path to the executable and store it in EDA_APP::m_BinDir
|
||||
*
|
||||
* @return TODO
|
||||
*/
|
||||
bool SetBinDir();
|
||||
bool SetBinDir();
|
||||
|
||||
/**
|
||||
* Function SetDefaultSearchPaths
|
||||
* sets search paths for libraries, modules, internationalization files, etc.
|
||||
*/
|
||||
void SetDefaultSearchPaths( void );
|
||||
void SetDefaultSearchPaths( void );
|
||||
|
||||
/**
|
||||
* Function MacOpenFile
|
||||
|
@ -116,8 +112,7 @@ public: WinEDA_App();
|
|||
* @param aId = flag : LIBRARY_TYPE_EESCHEMA or LIBRARY_TYPE_PCBNEW
|
||||
* used to choose what default library path must be used
|
||||
*/
|
||||
void InitEDA_Appl( const wxString& aName,
|
||||
id_app_type aId = APP_TYPE_UNKOWN );
|
||||
void InitEDA_Appl( const wxString& aName, EDA_APP_T aId = APP_UNKNOWN_T );
|
||||
|
||||
/**
|
||||
* Function SetLanguage
|
||||
|
@ -129,7 +124,7 @@ public: WinEDA_App();
|
|||
* called, false otherwise
|
||||
* @return true if the language can be set (i.e. if the locale is available)
|
||||
*/
|
||||
bool SetLanguage( bool first_time = false );
|
||||
bool SetLanguage( bool first_time = false );
|
||||
|
||||
/**
|
||||
* Function AddMenuLanguageList
|
||||
|
@ -138,7 +133,7 @@ public: WinEDA_App();
|
|||
* @param MasterMenu The main menu. The sub menu list will be accessible from the menu
|
||||
* item with id ID_LANGUAGE_CHOICE
|
||||
*/
|
||||
void AddMenuLanguageList( wxMenu* MasterMenu );
|
||||
void AddMenuLanguageList( wxMenu* MasterMenu );
|
||||
|
||||
/**
|
||||
* Function SetLanguageIdentifier
|
||||
|
@ -148,15 +143,15 @@ public: WinEDA_App();
|
|||
* @param menu_id The kicad menuitem id (returned by Menu Event, when
|
||||
* clicking on a menu item)
|
||||
*/
|
||||
void SetLanguageIdentifier( int menu_id );
|
||||
void SetLanguageIdentifier( int menu_id );
|
||||
|
||||
void SetLanguagePath( void );
|
||||
void SetLanguagePath( void );
|
||||
|
||||
/**
|
||||
* Function InitOnLineHelp
|
||||
* initializes Kicad's online help.
|
||||
*/
|
||||
void InitOnLineHelp();
|
||||
void InitOnLineHelp();
|
||||
|
||||
/**
|
||||
* Function GetSettings
|
||||
|
@ -164,20 +159,26 @@ public: WinEDA_App();
|
|||
* @param aReopenLastUsedDirectory True to switch to last opened directory, false
|
||||
* to use current CWD
|
||||
*/
|
||||
void GetSettings( bool aReopenLastUsedDirectory );
|
||||
void GetSettings( bool aReopenLastUsedDirectory );
|
||||
|
||||
/**
|
||||
* Function SaveSettings
|
||||
* saves the application settings.
|
||||
*/
|
||||
void SaveSettings();
|
||||
void SaveSettings();
|
||||
|
||||
void WriteProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List );
|
||||
void WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params );
|
||||
/**
|
||||
* Function WriteProjectConfig
|
||||
* Save the current "projet" parameters
|
||||
* saved parameters are parameters that have the .m_Setup member set to false
|
||||
* saving file is the .pro file project
|
||||
*/
|
||||
void WriteProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List );
|
||||
void WriteProjectConfig( const wxString& fileName,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& params );
|
||||
|
||||
/**
|
||||
* Function SaveCurrentSetupValues
|
||||
|
@ -186,8 +187,8 @@ public: WinEDA_App();
|
|||
* true
|
||||
* @param aList = array of PARAM_CFG_BASE pointers
|
||||
*/
|
||||
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
void SaveCurrentSetupValues( PARAM_CFG_ARRAY& List );
|
||||
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
void SaveCurrentSetupValues( PARAM_CFG_ARRAY& List );
|
||||
|
||||
/**
|
||||
* Function ReadCurrentSetupValues
|
||||
|
@ -196,30 +197,55 @@ public: WinEDA_App();
|
|||
* true
|
||||
* @param aList = array of PARAM_CFG_BASE pointers
|
||||
*/
|
||||
void ReadCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
void ReadCurrentSetupValues( PARAM_CFG_ARRAY& List );
|
||||
void ReadCurrentSetupValues( PARAM_CFG_BASE** aList );
|
||||
void ReadCurrentSetupValues( PARAM_CFG_ARRAY& List );
|
||||
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New );
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& List,
|
||||
bool Load_Only_if_New );
|
||||
bool ReCreatePrjConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
bool ForceUseLocalConfig );
|
||||
/**
|
||||
* Function ReadProjectConfig
|
||||
* Read the current "projet" parameters
|
||||
* Parameters are parameters that have the .m_Setup member set to false
|
||||
* read file is the .pro file project
|
||||
*
|
||||
* if Load_Only_if_New == true, this file is read only if it differs from
|
||||
* the current config (different dates )
|
||||
*
|
||||
* @return true if read.
|
||||
* Also set:
|
||||
* wxGetApp().m_CurrentOptionFileDateAndTime
|
||||
* wxGetApp().m_CurrentOptionFile
|
||||
*/
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_BASE** List,
|
||||
bool Load_Only_if_New );
|
||||
bool ReadProjectConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
PARAM_CFG_ARRAY& List,
|
||||
bool Load_Only_if_New );
|
||||
|
||||
void ReadPdfBrowserInfos();
|
||||
void WritePdfBrowserInfos();
|
||||
/**
|
||||
* Creates or recreates the kicad project file. (filename.pro)
|
||||
* Initialize:
|
||||
* G_Prj_Config
|
||||
* G_Prj_Config_LocalFilename
|
||||
* G_Prj_Default_Config_FullFilename
|
||||
* Return:
|
||||
* True if local config
|
||||
* False if default config
|
||||
*/
|
||||
bool ReCreatePrjConfig( const wxString& local_config_filename,
|
||||
const wxString& GroupName,
|
||||
bool ForceUseLocalConfig );
|
||||
|
||||
void ReadPdfBrowserInfos();
|
||||
void WritePdfBrowserInfos();
|
||||
|
||||
/**
|
||||
* Function FindFileInSearchPaths
|
||||
* looks in search paths for \a filename.
|
||||
*/
|
||||
wxString FindFileInSearchPaths( const wxString& filename,
|
||||
const wxArrayString* subdirs = NULL );
|
||||
wxString FindFileInSearchPaths( const wxString& filename,
|
||||
const wxArrayString* subdirs = NULL );
|
||||
|
||||
/**
|
||||
* Function GetHelpFile
|
||||
|
@ -238,9 +264,13 @@ public: WinEDA_App();
|
|||
* help/en
|
||||
* </p>
|
||||
*/
|
||||
wxString GetHelpFile( void );
|
||||
wxString GetHelpFile( void );
|
||||
|
||||
wxString GetLibraryFile( const wxString& filename );
|
||||
wxString GetLibraryFile( const wxString& filename );
|
||||
|
||||
/**
|
||||
* Return the preferred editor name.
|
||||
*/
|
||||
wxString& GetEditorName();
|
||||
|
||||
const wxString& GetTitle() { return m_Title; }
|
||||
|
@ -273,7 +303,7 @@ public: WinEDA_App();
|
|||
*/
|
||||
wxString ReturnLastVisitedLibraryPath( const wxString& aSubPathToSearch = wxEmptyString );
|
||||
|
||||
void SaveLastVisitedLibraryPath( const wxString& aPath );
|
||||
void SaveLastVisitedLibraryPath( const wxString& aPath );
|
||||
|
||||
/**
|
||||
* Function ReturnFilenameWithRelativePathInLibPath
|
||||
|
@ -289,7 +319,7 @@ public: WinEDA_App();
|
|||
* @param aPaths = path or path list to remove. paths must be separated by
|
||||
* ";"
|
||||
*/
|
||||
void RemoveLibraryPath( const wxString& aPaths );
|
||||
void RemoveLibraryPath( const wxString& aPaths );
|
||||
|
||||
/**
|
||||
* Function InsertLibraryPath
|
||||
|
@ -297,14 +327,14 @@ public: WinEDA_App();
|
|||
* @param aPaths = path or path list to add. paths must be separated by ";"
|
||||
* @param aIndex = insertion point
|
||||
*/
|
||||
void InsertLibraryPath( const wxString& aPaths, size_t aIndex );
|
||||
void InsertLibraryPath( const wxString& aPaths, size_t aIndex );
|
||||
};
|
||||
|
||||
/*
|
||||
* Use wxGetApp() to access WinEDA_App. It is not necessary to keep copies
|
||||
* Use wxGetApp() to access EDA_APP. It is not necessary to keep copies
|
||||
* of the application pointer all over the place or worse yet in a global
|
||||
* variable.
|
||||
*/
|
||||
DECLARE_APP( WinEDA_App )
|
||||
DECLARE_APP( EDA_APP )
|
||||
|
||||
#endif /* APPL_WXSTRUCT_H */
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "gestfich.h"
|
||||
|
||||
#include "kicad.h"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue