Commit ebc7259a authored by Wayne Stambaugh's avatar Wayne Stambaugh

Rename WinEDA_App class to EDA_APP and remove redundant includes.

parent 4467b911
......@@ -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;
......
This diff is collapsed.
......@@ -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"
......
#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" );
......
This diff is collapsed.
......@@ -6,7 +6,6 @@
*/
#include "fctsys.h"
#include "common.h"
#include "gestfich.h"
#include "kicad.h"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment