More header file realignments to reduce recompiling and general code cleaning.
This commit is contained in:
parent
89e5909f59
commit
b833a46bad
|
@ -22,8 +22,8 @@
|
||||||
#include "wx/clipbrd.h"
|
#include "wx/clipbrd.h"
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#include "3d_struct.h"
|
#include "3d_struct.h"
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,10 @@
|
||||||
#error Please set wxUSE_GLCANVAS to 1 in setup.h.
|
#error Please set wxUSE_GLCANVAS to 1 in setup.h.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
|
||||||
#include "pcbstruct.h"
|
#include "pcbstruct.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
|
@ -460,7 +461,8 @@ static void Draw3dTextSegm( int x0, int y0, int xf, int yf )
|
||||||
double endx = xf * g_Parm_3D_Visu.m_BoardScale;
|
double endx = xf * g_Parm_3D_Visu.m_BoardScale;
|
||||||
double endy = yf * g_Parm_3D_Visu.m_BoardScale;
|
double endy = yf * g_Parm_3D_Visu.m_BoardScale;
|
||||||
|
|
||||||
Draw3D_FilledSegment( startx, -starty, endx, -endy, s_Text3DWidth, s_Text3DZPos );
|
Draw3D_FilledSegment( startx, -starty, endx, -endy,
|
||||||
|
s_Text3DWidth, s_Text3DZPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -480,11 +482,9 @@ void Pcb3D_GLCanvas::Draw3D_DrawText( TEXTE_PCB* text )
|
||||||
s_Text3DZPos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
s_Text3DZPos = g_Parm_3D_Visu.m_LayerZcoord[layer];
|
||||||
s_Text3DWidth = text->m_Width * g_Parm_3D_Visu.m_BoardScale;
|
s_Text3DWidth = text->m_Width * g_Parm_3D_Visu.m_BoardScale;
|
||||||
glNormal3f( 0.0, 0.0, Get3DLayerSide( layer ) );
|
glNormal3f( 0.0, 0.0, Get3DLayerSide( layer ) );
|
||||||
DrawGraphicText( NULL, NULL,
|
DrawGraphicText( NULL, NULL, text->m_Pos, (EDA_Colors) color,
|
||||||
text->m_Pos, (EDA_Colors) color, text->m_Text,
|
text->m_Text, text->m_Orient, text->m_Size,
|
||||||
text->m_Orient, text->m_Size,
|
text->m_HJustify, text->m_VJustify,
|
||||||
text->m_HJustify,
|
|
||||||
text->m_VJustify,
|
|
||||||
text->m_Width, text->m_Italic,
|
text->m_Width, text->m_Italic,
|
||||||
Draw3dTextSegm );
|
Draw3dTextSegm );
|
||||||
}
|
}
|
||||||
|
@ -668,7 +668,8 @@ void D_PAD::Draw3D( Pcb3D_GLCanvas* glcanvas )
|
||||||
if( holeX && holeY )
|
if( holeX && holeY )
|
||||||
{
|
{
|
||||||
SetGLColor( DARKGRAY );
|
SetGLColor( DARKGRAY );
|
||||||
Draw3D_FilledCylinder( drillx, -drilly, hole, g_Parm_3D_Visu.m_LayerZcoord[CMP_N], 0.0 );
|
Draw3D_FilledCylinder( drillx, -drilly, hole,
|
||||||
|
g_Parm_3D_Visu.m_LayerZcoord[CMP_N], 0.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
glNormal3f( 0.0, 0.0, 1.0 ); // Normal is Z axis
|
glNormal3f( 0.0, 0.0, 1.0 ); // Normal is Z axis
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include <wx/colordlg.h>
|
|
||||||
|
|
||||||
#if !wxUSE_GLCANVAS
|
#if !wxUSE_GLCANVAS
|
||||||
#error Please set wxUSE_GLCANVAS to 1 in setup.h.
|
#error Please set wxUSE_GLCANVAS to 1 in setup.h.
|
||||||
|
@ -25,6 +24,8 @@
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
#include "trackball.h"
|
#include "trackball.h"
|
||||||
|
|
||||||
|
#include <wx/colordlg.h>
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
|
BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
|
||||||
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
|
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
|
||||||
|
|
|
@ -10,10 +10,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
#include "3d_struct.h"
|
#include "3d_struct.h"
|
||||||
#include "3d_viewer.h"
|
#include "3d_viewer.h"
|
||||||
|
|
|
@ -5,6 +5,14 @@ Started 2007-June-11
|
||||||
Please add newer entries at the top, list the date and your name with
|
Please add newer entries at the top, list the date and your name with
|
||||||
email address.
|
email address.
|
||||||
|
|
||||||
|
2009-Feb-04 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
|
||||||
|
================================================================================
|
||||||
|
++All
|
||||||
|
* Refactor header files to reduce the number of files that need recompiled
|
||||||
|
when making changes to base classes.
|
||||||
|
* Move sine and cosine look up tables from trigo.h to trigo.cpp to avoid
|
||||||
|
multiple recompiles.
|
||||||
|
|
||||||
2009-feb-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
2009-feb-01 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
|
||||||
================================================================================
|
================================================================================
|
||||||
++All:
|
++All:
|
||||||
|
|
|
@ -85,7 +85,7 @@ IF(Subversion_SVN_EXECUTABLE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
IF(NOT ${Subversion_svn_info_result} EQUAL 0)
|
IF(NOT ${Subversion_svn_info_result} EQUAL 0)
|
||||||
MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
|
MESSAGE(STATUS "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}")
|
||||||
ELSE(NOT ${Subversion_svn_info_result} EQUAL 0)
|
ELSE(NOT ${Subversion_svn_info_result} EQUAL 0)
|
||||||
|
|
||||||
STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
|
STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*"
|
||||||
|
@ -121,7 +121,7 @@ IF(Subversion_SVN_EXECUTABLE)
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
IF(NOT ${Subversion_svn_log_result} EQUAL 0)
|
IF(NOT ${Subversion_svn_log_result} EQUAL 0)
|
||||||
MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
|
MESSAGE(STATUS "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
|
||||||
ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
|
ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
|
||||||
ENDMACRO(Subversion_WC_LOG)
|
ENDMACRO(Subversion_WC_LOG)
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,7 @@
|
||||||
extern wxString g_Main_Title; // Import program title
|
extern wxString g_Main_Title; // Import program title
|
||||||
|
|
||||||
/**********************************/
|
/**********************************/
|
||||||
wxString
|
wxString SetMsg( const wxString& msg )
|
||||||
SetMsg( const wxString& msg )
|
|
||||||
/**********************************/
|
/**********************************/
|
||||||
/* add \n at the beginning of msg under Windows, and do nothing under other version of wxWidgets
|
/* add \n at the beginning of msg under Windows, and do nothing under other version of wxWidgets
|
||||||
* Needed under wxWidgets 2.8 because wxGTK and wxMSW do not have the same behavior
|
* Needed under wxWidgets 2.8 because wxGTK and wxMSW do not have the same behavior
|
||||||
|
@ -30,8 +29,7 @@ SetMsg( const wxString& msg )
|
||||||
|
|
||||||
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
void
|
void InitKiCadAbout( wxAboutDialogInfo& info )
|
||||||
InitKiCadAbout( wxAboutDialogInfo& info )
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
{
|
{
|
||||||
/* Set name and title */
|
/* Set name and title */
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "base_struct.h"
|
||||||
#include "sch_item_struct.h"
|
#include "sch_item_struct.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
|
||||||
/* Implement wxSize array for grid list implementation. */
|
/* Implement wxSize array for grid list implementation. */
|
||||||
#include <wx/arrimpl.cpp>
|
#include <wx/arrimpl.cpp>
|
||||||
|
|
|
@ -10,10 +10,13 @@
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "wxstruct.h"
|
|
||||||
#include "base_struct.h"
|
|
||||||
#include "grfonte.h"
|
#include "grfonte.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
|
||||||
|
|
||||||
enum textbox {
|
enum textbox {
|
||||||
ID_TEXTBOX_LIST = 8010
|
ID_TEXTBOX_LIST = 8010
|
||||||
|
|
|
@ -10,12 +10,16 @@
|
||||||
#include <wx/aboutdlg.h>
|
#include <wx/aboutdlg.h>
|
||||||
#include "wx/statline.h"
|
#include "wx/statline.h"
|
||||||
#include "wx/generic/aboutdlgg.h"
|
#include "wx/generic/aboutdlgg.h"
|
||||||
|
#include <wx/fontdlg.h>
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include <wx/fontdlg.h>
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "online_help.h"
|
#include "online_help.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "eda_doc.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
|
@ -9,8 +9,13 @@
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "sch_item_struct.h"
|
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "base_struct.h"
|
||||||
|
#include "sch_item_struct.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "block_commande.h"
|
||||||
|
|
||||||
|
|
||||||
/*******************/
|
/*******************/
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "base_struct.h"
|
||||||
#include "sch_item_struct.h"
|
#include "sch_item_struct.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "build_version.h"
|
#include "build_version.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include <wx/process.h>
|
#include <wx/process.h>
|
||||||
|
|
||||||
/*****************************/
|
/*****************************/
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "plot_common.h"
|
#include "plot_common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "base_struct.h"
|
#include "base_struct.h"
|
||||||
#include "common.h"
|
|
||||||
#include "plot_common.h"
|
#include "plot_common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
/* parametre HPGL pour trace de cercle: */
|
/* parametre HPGL pour trace de cercle: */
|
||||||
#define CHORD_ANGLE 10
|
#define CHORD_ANGLE 10
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "plot_common.h"
|
#include "plot_common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
// Locales
|
// Locales
|
||||||
static Ki_PageDescr* SheetPS;
|
static Ki_PageDescr* SheetPS;
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#include "plot_common.h"
|
#include "plot_common.h"
|
||||||
#include "worksheet.h"
|
#include "worksheet.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
|
||||||
|
|
||||||
// Variables partagees avec Common plot Postscript et HPLG Routines
|
// Variables partagees avec Common plot Postscript et HPLG Routines
|
||||||
|
|
|
@ -5,12 +5,17 @@
|
||||||
// Created: 18 aug 2006
|
// Created: 18 aug 2006
|
||||||
// Licence: License GNU
|
// Licence: License GNU
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/metafile.h"
|
#include "wx/metafile.h"
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
extern BASE_SCREEN* ActiveScreen;
|
extern BASE_SCREEN* ActiveScreen;
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
/********************************/
|
/********************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
|
|
||||||
/***********************/
|
/***********************/
|
||||||
|
|
|
@ -7,11 +7,16 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include <wx/fontdlg.h>
|
#include <wx/fontdlg.h>
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
/******************************************/
|
/******************************************/
|
||||||
/* drawpanel.cpp - WinEDA_DrawPanel class */
|
/* drawpanel.cpp - WinEDA_DrawPanel class */
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
// Local defines
|
// Local defines
|
||||||
#define CURSOR_SIZE 12 // Cursor size in pixels
|
#define CURSOR_SIZE 12 // Cursor size in pixels
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
|
||||||
#ifndef DEFAULT_SIZE_TEXT
|
#ifndef DEFAULT_SIZE_TEXT
|
||||||
#define DEFAULT_SIZE_TEXT 50
|
#define DEFAULT_SIZE_TEXT 50
|
||||||
|
|
|
@ -2,24 +2,16 @@
|
||||||
/* eda_doc.cpp */
|
/* eda_doc.cpp */
|
||||||
/***************/
|
/***************/
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
#include "fctsys.h"
|
||||||
#include "wx/wxprec.h"
|
#include "appl_wxstruct.h"
|
||||||
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// for all others, include the necessary headers (this file is usually all you
|
|
||||||
// need because it includes almost all "standard" wxWindows headers
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include <wx/wx.h>
|
|
||||||
#endif
|
|
||||||
#include <wx/mimetype.h>
|
#include <wx/mimetype.h>
|
||||||
#include <wx/tokenzr.h>
|
#include <wx/tokenzr.h>
|
||||||
|
#include <wx/filename.h>
|
||||||
|
|
||||||
#include "fctsys.h"
|
|
||||||
#include "wxstruct.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/*****************************************/
|
/*****************************************/
|
||||||
void WinEDA_App::ReadPdfBrowserInfos()
|
void WinEDA_App::ReadPdfBrowserInfos()
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
#include <wx/filename.h>
|
#include <wx/filename.h>
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
#include <wx/apptrait.h>
|
#include <wx/apptrait.h>
|
||||||
|
#include <wx/snglinst.h>
|
||||||
|
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "worksheet.h"
|
#include "worksheet.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
@ -31,6 +33,7 @@
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "online_help.h"
|
#include "online_help.h"
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "wx/mimetype.h"
|
#include "confirm.h"
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
@ -16,6 +16,11 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
|
#include "wx/mimetype.h"
|
||||||
|
#include "wx/filename.h"
|
||||||
|
|
||||||
|
|
||||||
/* List of default paths used to locate help files and kicad library files.
|
/* List of default paths used to locate help files and kicad library files.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,9 +4,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/* Show a dialog frame to choose a name from an history list, or a new name */
|
/* Show a dialog frame to choose a name from an history list, or a new name */
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "base_struct.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
|
||||||
#ifndef FILLED
|
#ifndef FILLED
|
||||||
#define FILLED 1
|
#define FILLED 1
|
||||||
|
|
|
@ -6,12 +6,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "wxstruct.h"
|
|
||||||
#include "hotkeys_basic.h"
|
#include "hotkeys_basic.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/* Class to handle hotkey commnands. hotkeys have a default value
|
/* Class to handle hotkey commnands. hotkeys have a default value
|
||||||
|
|
|
@ -7,13 +7,14 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "colors.h"
|
||||||
|
|
||||||
|
|
||||||
/* table des evenements captes par un WinEDA_MsgPanel */
|
/* table des evenements captes par un WinEDA_MsgPanel */
|
||||||
BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel )
|
BEGIN_EVENT_TABLE( WinEDA_MsgPanel, wxPanel )
|
||||||
EVT_PAINT( WinEDA_MsgPanel::OnPaint )
|
EVT_PAINT( WinEDA_MsgPanel::OnPaint )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#define CONFIG_VERSION 1
|
#define CONFIG_VERSION 1
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "common.h"
|
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
|
@ -1,36 +1,31 @@
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
/* toolbars.cpp - fonctions des classes du type WinEDA_ttolbar */
|
/* toolbars.cpp - fonctions des classes du type WinEDA_ttolbar */
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
/*************************/
|
||||||
|
/* class WinEDA_HToolbar */
|
||||||
|
/*************************/
|
||||||
|
|
||||||
#include "id.h"
|
WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent,
|
||||||
|
wxWindowID id, bool horizontal ):
|
||||||
/*************************/
|
wxToolBar( parent, id, wxPoint( -1,-1 ), wxSize( -1,-1 ),
|
||||||
/* class WinEDA_HToolbar */
|
horizontal ? wxTB_HORIZONTAL : wxTB_VERTICAL )
|
||||||
/*************************/
|
|
||||||
|
|
||||||
WinEDA_Toolbar::WinEDA_Toolbar(id_toolbar type, wxWindow * parent,
|
|
||||||
wxWindowID id, bool horizontal):
|
|
||||||
wxToolBar(parent,id, wxPoint(-1,-1), wxSize(-1,-1),
|
|
||||||
horizontal ? wxTB_HORIZONTAL : wxTB_VERTICAL)
|
|
||||||
{
|
{
|
||||||
m_Parent = parent;
|
m_Parent = parent;
|
||||||
Pnext = NULL;
|
Pnext = NULL;
|
||||||
m_Ident = type;
|
m_Ident = type;
|
||||||
m_Horizontal = horizontal;
|
m_Horizontal = horizontal;
|
||||||
m_Size = 24;
|
m_Size = 24;
|
||||||
|
|
||||||
SetToolBitmapSize(wxSize(16,16));
|
SetToolBitmapSize(wxSize(16,16));
|
||||||
SetMargins(0,0);
|
SetMargins(0,0);
|
||||||
SetToolSeparation(1);
|
SetToolSeparation(1);
|
||||||
SetToolPacking(1);
|
SetToolPacking(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
1485
common/trigo.cpp
1485
common/trigo.cpp
File diff suppressed because it is too large
Load Diff
|
@ -4,12 +4,16 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
#include "worksheet.h"
|
#include "worksheet.h"
|
||||||
|
|
||||||
|
|
||||||
/* Must be defined in main applications: */
|
/* Must be defined in main applications: */
|
||||||
extern wxString g_Main_Title;
|
extern wxString g_Main_Title;
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************************/
|
/**********************************************************************************/
|
||||||
|
@ -23,7 +24,7 @@ WinEDA_EnterText::WinEDA_EnterText( wxWindow* parent,
|
||||||
if( TextToEdit )
|
if( TextToEdit )
|
||||||
m_NewText = TextToEdit;
|
m_NewText = TextToEdit;
|
||||||
|
|
||||||
m_Title = new wxStaticText( parent, -1, Title );
|
m_Title = new wxStaticText( parent, -1, Title );
|
||||||
|
|
||||||
m_Title->SetForegroundColour( wxColour( 200, 0, 0 ) );
|
m_Title->SetForegroundColour( wxColour( 200, 0, 0 ) );
|
||||||
BoxSizer->Add( m_Title, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
|
BoxSizer->Add( m_Title, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE, 5 );
|
||||||
|
|
|
@ -8,14 +8,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "class_base_screen.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
|
|
||||||
/**************************************************/
|
/**************************************************/
|
||||||
void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
|
void WinEDA_DrawFrame::Recadre_Trace( bool ToMouse )
|
||||||
|
|
|
@ -5,11 +5,13 @@
|
||||||
/* Routines de selection automatique des modules */
|
/* Routines de selection automatique des modules */
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
#define QUOTE '\''
|
#define QUOTE '\''
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
/* lit ou met a jour la configuration de CVPCB */
|
/* lit ou met a jour la configuration de CVPCB */
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "gestfich.h"
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
|
|
||||||
/* Routines Locales */
|
/* Routines Locales */
|
||||||
|
|
|
@ -2,17 +2,21 @@
|
||||||
/* File: cvframe.cpp */
|
/* File: cvframe.cpp */
|
||||||
/*********************/
|
/*********************/
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "eda_doc.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
#include "id.h"
|
||||||
|
|
||||||
#include <wx/fontdlg.h>
|
#include <wx/fontdlg.h>
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "pcbnew.h"
|
#include "pcbnew.h"
|
||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#define FRAME_MIN_SIZE_X 450
|
#define FRAME_MIN_SIZE_X 450
|
||||||
#define FRAME_MIN_SIZE_Y 300
|
#define FRAME_MIN_SIZE_Y 300
|
||||||
|
|
|
@ -5,17 +5,19 @@
|
||||||
#define eda_global
|
#define eda_global
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
#include "id.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "trigo.h"
|
|
||||||
#include "zones.h"
|
#include "zones.h"
|
||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
#include "id.h"
|
#include <wx/snglinst.h>
|
||||||
|
|
||||||
wxString g_Main_Title = wxT( "CVpcb" );
|
wxString g_Main_Title = wxT( "CVpcb" );
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,7 @@
|
||||||
#define eda_global extern
|
#define eda_global extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wxstruct.h"
|
|
||||||
#include "pcbnew.h"
|
#include "pcbnew.h"
|
||||||
#include "cvstruct.h"
|
|
||||||
|
|
||||||
#include "gr_basic.h"
|
|
||||||
#include "colors.h"
|
|
||||||
|
|
||||||
// config for footprints doc file acces
|
// config for footprints doc file acces
|
||||||
#define DOC_FOOTPRINTS_LIST_KEY wxT("footprints_doc_file")
|
#define DOC_FOOTPRINTS_LIST_KEY wxT("footprints_doc_file")
|
||||||
|
|
|
@ -15,17 +15,6 @@
|
||||||
#pragma implementation "dialog_display_options.h"
|
#pragma implementation "dialog_display_options.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
////@end includes
|
////@end includes
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
@ -34,6 +23,8 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
#include "dialog_display_options.h"
|
#include "dialog_display_options.h"
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "id.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "id.h"
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
|
|
@ -1,59 +1,62 @@
|
||||||
/***************/
|
/***************/
|
||||||
/* genstf() */
|
/* genstf() */
|
||||||
/***************/
|
/***************/
|
||||||
|
|
||||||
/* genere le fichier STF type 'ref' 'nom_empreinte' pour DRAFT */
|
/* genere le fichier STF type 'ref' 'nom_empreinte' pour DRAFT */
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
void WinEDA_CvpcbFrame::WriteStuffList(wxCommandEvent & event)
|
|
||||||
|
void WinEDA_CvpcbFrame::WriteStuffList( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
FILE * FileEquiv;
|
FILE* FileEquiv;
|
||||||
STORECMP * Cmp;
|
STORECMP* Cmp;
|
||||||
wxString Line, FullFileName, Mask;
|
wxString Line, FullFileName, Mask;
|
||||||
|
|
||||||
if( nbcomp <= 0 ) return;
|
if( nbcomp <= 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
/* calcul du nom du fichier */
|
/* calcul du nom du fichier */
|
||||||
Mask = wxT("*") + ExtRetroBuffer;
|
Mask = wxT( "*" ) + ExtRetroBuffer;
|
||||||
FullFileName = FFileName;
|
FullFileName = FFileName;
|
||||||
ChangeFileNameExt(FullFileName, ExtRetroBuffer);
|
ChangeFileNameExt( FullFileName, ExtRetroBuffer );
|
||||||
|
|
||||||
FullFileName = EDA_FileSelector( wxT("Create Stuff File"),
|
FullFileName = EDA_FileSelector( wxT( "Create Stuff File" ),
|
||||||
wxGetCwd(), /* Chemin par defaut */
|
wxGetCwd(), /* Chemin par defaut */
|
||||||
FullFileName, /* nom fichier par defaut */
|
FullFileName, /* nom fichier par defaut */
|
||||||
ExtRetroBuffer, /* extension par defaut */
|
ExtRetroBuffer, /* extension par defaut */
|
||||||
Mask, /* Masque d'affichage */
|
Mask, /* Masque d'affichage */
|
||||||
this,
|
this,
|
||||||
wxFD_SAVE,
|
wxFD_SAVE,
|
||||||
TRUE
|
TRUE );
|
||||||
);
|
if( FullFileName.IsEmpty() )
|
||||||
if ( FullFileName.IsEmpty() ) return;
|
return;
|
||||||
|
|
||||||
FileEquiv = wxFopen(FullFileName, wxT("wt") );
|
FileEquiv = wxFopen( FullFileName, wxT( "wt" ) );
|
||||||
if (FileEquiv == 0 )
|
if( FileEquiv == 0 )
|
||||||
{
|
{
|
||||||
Line = _("Unable to create ") + FullFileName;
|
Line = _( "Unable to create " ) + FullFileName;
|
||||||
DisplayError(this, Line,30);
|
DisplayError( this, Line, 30 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generation de la liste */
|
/* Generation de la liste */
|
||||||
for (Cmp = g_BaseListeCmp ; Cmp != NULL ; Cmp = Cmp->Pnext )
|
for( Cmp = g_BaseListeCmp; Cmp != NULL; Cmp = Cmp->Pnext )
|
||||||
{
|
{
|
||||||
/* génération du composant si son empreinte est définie */
|
/* génération du composant si son empreinte est définie */
|
||||||
if ( Cmp->m_Module.IsEmpty() ) continue;
|
if( Cmp->m_Module.IsEmpty() )
|
||||||
fprintf(FileEquiv, "comp = \"%s\" module = \"%s\"\n",
|
continue;
|
||||||
CONV_TO_UTF8(Cmp->m_Reference),
|
fprintf( FileEquiv, "comp = \"%s\" module = \"%s\"\n",
|
||||||
CONV_TO_UTF8(Cmp->m_Module));
|
CONV_TO_UTF8( Cmp->m_Reference ),
|
||||||
}
|
CONV_TO_UTF8( Cmp->m_Module ) );
|
||||||
|
}
|
||||||
|
|
||||||
fclose(FileEquiv);
|
fclose( FileEquiv );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
313
cvpcb/init.cpp
313
cvpcb/init.cpp
|
@ -1,214 +1,237 @@
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/* CVPCB: Routines de base : */
|
/* CVPCB: Routines de base : */
|
||||||
/* lecture Netliste et creation des fenetres composants et modules */
|
/* lecture Netliste et creation des fenetres composants et modules */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gr_basic.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
#include "id.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "gr_basic.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "id.h"
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/* routines locales : */
|
/* routines locales : */
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************/
|
/**********************************************************/
|
||||||
void WinEDA_CvpcbFrame::SetNewPkg(const wxString & package)
|
void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package )
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- Affecte un module au composant selectionne
|
* - Affecte un module au composant selectionne
|
||||||
- Selectionne le composant suivant
|
* - Selectionne le composant suivant
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STORECMP * Composant;
|
STORECMP* Composant;
|
||||||
int ii, NumCmp, IsNew = 1;
|
int ii, NumCmp, IsNew = 1;
|
||||||
wxString Line;
|
wxString Line;
|
||||||
|
|
||||||
if ( g_BaseListeCmp == NULL ) return;
|
if( g_BaseListeCmp == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
NumCmp = m_ListCmp->GetSelection();
|
NumCmp = m_ListCmp->GetSelection();
|
||||||
if( NumCmp < 0 )
|
if( NumCmp < 0 )
|
||||||
{
|
{
|
||||||
NumCmp = 0;
|
NumCmp = 0;
|
||||||
m_ListCmp->SetSelection(NumCmp, TRUE);
|
m_ListCmp->SetSelection( NumCmp, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
Composant = g_BaseListeCmp;
|
Composant = g_BaseListeCmp;
|
||||||
for ( ii = 0; Composant != NULL; Composant = Composant->Pnext, ii++ )
|
for( ii = 0; Composant != NULL; Composant = Composant->Pnext, ii++ )
|
||||||
{
|
{
|
||||||
if ( NumCmp == ii ) break;
|
if( NumCmp == ii )
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if ( Composant == NULL ) return;
|
if( Composant == NULL )
|
||||||
if ( ! Composant->m_Module.IsEmpty() ) IsNew = 0;
|
return;
|
||||||
|
if( !Composant->m_Module.IsEmpty() )
|
||||||
|
IsNew = 0;
|
||||||
|
|
||||||
Composant->m_Module = package;
|
Composant->m_Module = package;
|
||||||
|
|
||||||
Line.Printf( CMP_FORMAT ,ii+1,
|
Line.Printf( CMP_FORMAT, ii + 1,
|
||||||
Composant->m_Reference.GetData(), Composant->m_Valeur.GetData(),
|
Composant->m_Reference.GetData(), Composant->m_Valeur.GetData(),
|
||||||
Composant->m_Module.GetData());
|
Composant->m_Module.GetData() );
|
||||||
modified = 1;
|
modified = 1;
|
||||||
if ( IsNew ) composants_non_affectes -= 1;
|
if( IsNew )
|
||||||
|
composants_non_affectes -= 1;
|
||||||
|
|
||||||
m_ListCmp->SetString(NumCmp, Line);
|
m_ListCmp->SetString( NumCmp, Line );
|
||||||
m_ListCmp->SetSelection(NumCmp, FALSE);
|
m_ListCmp->SetSelection( NumCmp, FALSE );
|
||||||
|
|
||||||
// We activate next component:
|
// We activate next component:
|
||||||
if ( NumCmp < (m_ListCmp->GetCount() - 1) ) NumCmp++;
|
if( NumCmp < (m_ListCmp->GetCount() - 1) )
|
||||||
m_ListCmp->SetSelection(NumCmp, TRUE);
|
NumCmp++;
|
||||||
|
m_ListCmp->SetSelection( NumCmp, TRUE );
|
||||||
|
|
||||||
Line.Printf( _("Components: %d (free: %d)"),
|
Line.Printf( _( "Components: %d (free: %d)" ),
|
||||||
nbcomp, composants_non_affectes);
|
nbcomp, composants_non_affectes );
|
||||||
SetStatusText(Line,1);
|
SetStatusText( Line, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/********************************************/
|
/********************************************/
|
||||||
void WinEDA_CvpcbFrame::ReadNetListe()
|
void WinEDA_CvpcbFrame::ReadNetListe()
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
|
|
||||||
/* Lecture de la netliste selon format, ainsi que du fichier des composants
|
/* Lecture de la netliste selon format, ainsi que du fichier des composants
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STORECMP * Composant;
|
STORECMP* Composant;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
int ii;
|
int ii;
|
||||||
int error_level;
|
int error_level;
|
||||||
|
|
||||||
error_level = ReadSchematicNetlist();
|
error_level = ReadSchematicNetlist();
|
||||||
|
|
||||||
if ( error_level < 0 ) return;
|
if( error_level < 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
/* lecture des correspondances */
|
/* lecture des correspondances */
|
||||||
loadcmp();
|
loadcmp();
|
||||||
|
|
||||||
if (m_ListCmp == NULL ) return;
|
if( m_ListCmp == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( ! NetInNameBuffer.IsEmpty() )
|
if( !NetInNameBuffer.IsEmpty() )
|
||||||
wxSetWorkingDirectory( wxPathOnly(NetInNameBuffer) );
|
wxSetWorkingDirectory( wxPathOnly( NetInNameBuffer ) );
|
||||||
|
|
||||||
Read_Config(NetInNameBuffer); // relecture de la config (elle peut etre modifiée)
|
Read_Config( NetInNameBuffer ); // relecture de la config (elle peut etre modifiée)
|
||||||
|
|
||||||
listlib();
|
listlib();
|
||||||
BuildFootprintListBox();
|
BuildFootprintListBox();
|
||||||
|
|
||||||
m_ListCmp->Clear();
|
m_ListCmp->Clear();
|
||||||
Composant = g_BaseListeCmp;
|
Composant = g_BaseListeCmp;
|
||||||
|
|
||||||
composants_non_affectes = 0;
|
composants_non_affectes = 0;
|
||||||
for ( ii = 1;Composant != NULL; Composant = Composant->Pnext, ii++ )
|
for( ii = 1; Composant != NULL; Composant = Composant->Pnext, ii++ )
|
||||||
{
|
{
|
||||||
msg.Printf(CMP_FORMAT ,ii,
|
msg.Printf( CMP_FORMAT, ii,
|
||||||
Composant->m_Reference.GetData(), Composant->m_Valeur.GetData(),
|
Composant->m_Reference.GetData(),
|
||||||
Composant->m_Module.GetData());
|
Composant->m_Valeur.GetData(),
|
||||||
m_ListCmp->AppendLine(msg);
|
Composant->m_Module.GetData() );
|
||||||
if( Composant->m_Module.IsEmpty() ) composants_non_affectes += 1;
|
m_ListCmp->AppendLine( msg );
|
||||||
}
|
if( Composant->m_Module.IsEmpty() )
|
||||||
if ( g_BaseListeCmp )
|
composants_non_affectes += 1;
|
||||||
m_ListCmp->SetSelection(0, TRUE);
|
}
|
||||||
|
|
||||||
msg.Printf(_("Componants: %d (free: %d)"), nbcomp, composants_non_affectes);
|
if( g_BaseListeCmp )
|
||||||
SetStatusText(msg,1);
|
m_ListCmp->SetSelection( 0, TRUE );
|
||||||
|
|
||||||
/* Mise a jour du titre de la fenetre principale */
|
msg.Printf( _( "Componants: %d (free: %d)" ), nbcomp,
|
||||||
wxString Title = g_Main_Title + wxT(" ") + GetBuildVersion();
|
composants_non_affectes );
|
||||||
msg.Printf( wxT("%s [%s]"), Title.GetData(), FFileName.GetData());
|
SetStatusText( msg, 1 );
|
||||||
SetTitle(msg);
|
|
||||||
|
|
||||||
|
/* Mise a jour du titre de la fenetre principale */
|
||||||
|
wxString Title = g_Main_Title + wxT( " " ) + GetBuildVersion();
|
||||||
|
msg.Printf( wxT( "%s [%s]" ), Title.GetData(), FFileName.GetData() );
|
||||||
|
SetTitle( msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
int WinEDA_CvpcbFrame::SaveNetList(const wxString & FullFilename)
|
int WinEDA_CvpcbFrame::SaveNetList( const wxString& FullFilename )
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
|
||||||
/* Sauvegarde des fichiers netliste et cmp
|
/* Sauvegarde des fichiers netliste et cmp
|
||||||
Le nom complet du fichier Netliste doit etre dans FFileName.
|
* Le nom complet du fichier Netliste doit etre dans FFileName.
|
||||||
Le nom du fichier cmp en est deduit
|
* Le nom du fichier cmp en est deduit
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxString NetlistFullFileName = FullFilename;
|
wxString NetlistFullFileName = FullFilename;
|
||||||
|
|
||||||
if ( NetlistFullFileName.IsEmpty() )
|
if( NetlistFullFileName.IsEmpty() )
|
||||||
{
|
{
|
||||||
wxString Mask = wxT("*") + NetExtBuffer;
|
wxString Mask = wxT( "*" ) + NetExtBuffer;
|
||||||
if ( ! NetNameBuffer.IsEmpty() )
|
if( !NetNameBuffer.IsEmpty() )
|
||||||
{
|
{
|
||||||
NetlistFullFileName = NetNameBuffer;
|
NetlistFullFileName = NetNameBuffer;
|
||||||
ChangeFileNameExt(NetlistFullFileName, NetExtBuffer);
|
ChangeFileNameExt( NetlistFullFileName, NetExtBuffer );
|
||||||
}
|
}
|
||||||
|
|
||||||
NetlistFullFileName = EDA_FileSelector( _("Save NetList and Components List files"),
|
NetlistFullFileName =
|
||||||
NetDirBuffer, /* Chemin par defaut */
|
EDA_FileSelector( _( "Save NetList and Components List files" ),
|
||||||
NetlistFullFileName, /* nom fichier par defaut */
|
NetDirBuffer, /* Chemin par defaut */
|
||||||
NetExtBuffer, /* extension par defaut */
|
NetlistFullFileName, /* nom fichier par defaut */
|
||||||
Mask, /* Masque d'affichage */
|
NetExtBuffer, /* extension par defaut */
|
||||||
this,
|
Mask, /* Masque d'affichage */
|
||||||
wxFD_SAVE,
|
this,
|
||||||
TRUE
|
wxFD_SAVE,
|
||||||
);
|
TRUE
|
||||||
}
|
);
|
||||||
if ( NetlistFullFileName.IsEmpty() ) return -1;
|
}
|
||||||
|
if( NetlistFullFileName.IsEmpty() )
|
||||||
|
return -1;
|
||||||
|
|
||||||
FFileName = NetlistFullFileName;
|
FFileName = NetlistFullFileName;
|
||||||
NetNameBuffer = NetlistFullFileName;
|
NetNameBuffer = NetlistFullFileName;
|
||||||
if( SaveComponentList(NetlistFullFileName) == 0 )
|
if( SaveComponentList( NetlistFullFileName ) == 0 )
|
||||||
{
|
{
|
||||||
DisplayError(this, _("Unable to create component file (.cmp)") );
|
DisplayError( this, _( "Unable to create component file (.cmp)" ) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dest = wxFopen(NetlistFullFileName, wxT("wt") );
|
dest = wxFopen( NetlistFullFileName, wxT( "wt" ) );
|
||||||
if( dest == 0 )
|
if( dest == 0 )
|
||||||
{
|
{
|
||||||
DisplayError(this, _("Unable to create netlist file") );
|
DisplayError( this, _( "Unable to create netlist file" ) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GenNetlistPcbnew() ;
|
GenNetlistPcbnew();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
bool WinEDA_CvpcbFrame::ReadInputNetList(const wxString & FullFileName)
|
bool WinEDA_CvpcbFrame::ReadInputNetList( const wxString& FullFileName )
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
|
||||||
/* Routine de selection du nom de la netliste d'entree, et de lecure de
|
/* Routine de selection du nom de la netliste d'entree, et de lecure de
|
||||||
celle-ci
|
* celle-ci
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxString Mask, Line;
|
wxString Mask, Line;
|
||||||
|
|
||||||
if ( FullFileName.IsEmpty() )
|
if( FullFileName.IsEmpty() )
|
||||||
{
|
{
|
||||||
if( ! NetInExtBuffer.IsEmpty() ) Mask = wxT("*") + NetInExtBuffer;
|
if( !NetInExtBuffer.IsEmpty() )
|
||||||
else Mask = wxT("*.net");
|
Mask = wxT( "*" ) + NetInExtBuffer;
|
||||||
Line = EDA_FileSelector(_("Load Net List"),
|
else
|
||||||
NetDirBuffer, /* Chemin par defaut */
|
Mask = wxT( "*.net" );
|
||||||
NetInNameBuffer, /* nom fichier par defaut */
|
Line = EDA_FileSelector( _( "Load Net List" ),
|
||||||
NetInExtBuffer, /* extension par defaut */
|
NetDirBuffer, /* Chemin par defaut */
|
||||||
Mask, /* Masque d'affichage */
|
NetInNameBuffer, /* nom fichier par defaut */
|
||||||
this,
|
NetInExtBuffer, /* extension par defaut */
|
||||||
0,
|
Mask, /* Masque d'affichage */
|
||||||
FALSE
|
this,
|
||||||
);
|
0,
|
||||||
if ( Line.IsEmpty()) return(FALSE);
|
FALSE
|
||||||
}
|
);
|
||||||
else Line = FullFileName;
|
if( Line.IsEmpty() )
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Line = FullFileName;
|
||||||
|
|
||||||
NetInNameBuffer = Line;
|
NetInNameBuffer = Line;
|
||||||
NetNameBuffer = Line;
|
NetNameBuffer = Line;
|
||||||
FFileName = NetInNameBuffer;
|
FFileName = NetInNameBuffer;
|
||||||
|
|
||||||
/* Mise a jour du titre de la fenetre principale */
|
/* Mise a jour du titre de la fenetre principale */
|
||||||
Line = g_Main_Title + wxT(" ") + GetBuildVersion();
|
Line = g_Main_Title + wxT( " " ) + GetBuildVersion();
|
||||||
Line += wxT(" ") + NetInNameBuffer;
|
Line += wxT( " " ) + NetInNameBuffer;
|
||||||
SetTitle(Line);
|
SetTitle( Line );
|
||||||
|
|
||||||
ReadNetListe();
|
ReadNetListe();
|
||||||
|
|
||||||
return(TRUE);
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
|
||||||
|
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
|
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Basic class (from wxListView) for displaying component and footprint lists */
|
/* Basic class (from wxListView) for displaying component and footprint lists */
|
||||||
|
|
|
@ -1,250 +1,277 @@
|
||||||
/**************/
|
/**************/
|
||||||
/* listlib.cpp */
|
/* listlib.cpp */
|
||||||
/**************/
|
/**************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
cherche toutes les ref <chemin lib>*.??? si nom fichier pr‚sent,
|
* cherche toutes les ref <chemin lib>*.??? si nom fichier pr‚sent,
|
||||||
ou examine <chemin lib>[MODULE.LIB]
|
* ou examine <chemin lib>[MODULE.LIB]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
FILE *name_libmodules ; /* pour lecture librairie */
|
FILE* name_libmodules; /* pour lecture librairie */
|
||||||
|
|
||||||
/* routines locales : */
|
/* routines locales : */
|
||||||
static void ReadDocLib(const wxString & ModLibName );
|
static void ReadDocLib( const wxString& ModLibName );
|
||||||
static int LibCompare(void * mod1, void * mod2);
|
static int LibCompare( void* mod1, void* mod2 );
|
||||||
static STOREMOD * TriListeModules(STOREMOD * BaseListe, int nbitems);
|
static STOREMOD* TriListeModules( STOREMOD* BaseListe, int nbitems );
|
||||||
|
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
/*********************/
|
/*********************/
|
||||||
int listlib()
|
int listlib()
|
||||||
/*********************/
|
/*********************/
|
||||||
|
|
||||||
/* Routine lisant la liste des librairies, et generant la liste chainee
|
/* Routine lisant la liste des librairies, et generant la liste chainee
|
||||||
des modules disponibles
|
* des modules disponibles
|
||||||
|
*
|
||||||
Module descr format:
|
* Module descr format:
|
||||||
$MODULE c64acmd
|
* $MODULE c64acmd
|
||||||
Li c64acmd
|
* Li c64acmd
|
||||||
Cd Connecteur DIN Europe 96 Contacts AC male droit
|
* Cd Connecteur DIN Europe 96 Contacts AC male droit
|
||||||
Kw PAD_CONN DIN
|
* Kw PAD_CONN DIN
|
||||||
$EndMODULE
|
* $EndMODULE
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
wxString FullLibName;
|
wxString FullLibName;
|
||||||
int errorlevel = 0, end;
|
int errorlevel = 0, end;
|
||||||
int flag_librairie;
|
int flag_librairie;
|
||||||
STOREMOD * ItemLib;
|
STOREMOD* ItemLib;
|
||||||
unsigned ii;
|
unsigned ii;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( g_BaseListePkg ) /* Liste Deja existante, a supprimer */
|
if( g_BaseListePkg ) /* Liste Deja existante, a supprimer */
|
||||||
{
|
{
|
||||||
FreeMemoryModules(); g_BaseListePkg = NULL;
|
FreeMemoryModules();
|
||||||
}
|
g_BaseListePkg = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if ( g_LibName_List.GetCount() == 0 ) return -4;
|
if( g_LibName_List.GetCount() == 0 )
|
||||||
|
return -4;
|
||||||
|
|
||||||
/* init recherche */
|
/* init recherche */
|
||||||
SetRealLibraryPath( wxT("modules"));
|
SetRealLibraryPath( wxT( "modules" ) );
|
||||||
nblib = 0;
|
nblib = 0;
|
||||||
|
|
||||||
/* Lecture des Librairies */
|
/* Lecture des Librairies */
|
||||||
for( ii= 0 ; ii < g_LibName_List.GetCount(); ii++)
|
for( ii = 0; ii < g_LibName_List.GetCount(); ii++ )
|
||||||
{
|
{
|
||||||
/* Calcul du nom complet de la librairie */
|
/* Calcul du nom complet de la librairie */
|
||||||
FullLibName = MakeFileName(g_RealLibDirBuffer, g_LibName_List[ii], LibExtBuffer);
|
FullLibName = MakeFileName( g_RealLibDirBuffer,
|
||||||
/* acces a une librairie */
|
g_LibName_List[ii],
|
||||||
if ((name_libmodules = wxFopen(FullLibName, wxT("rt"))) == NULL )
|
LibExtBuffer );
|
||||||
{
|
/* acces a une librairie */
|
||||||
msg.Printf( _("Library file <%s> not found"),FullLibName.GetData());
|
if( ( name_libmodules = wxFopen( FullLibName, wxT( "rt" ) ) ) == NULL )
|
||||||
DisplayError(NULL, msg, 20);
|
{
|
||||||
continue;
|
msg.Printf( _( "Library file <%s> not found" ),
|
||||||
}
|
FullLibName.GetData() );
|
||||||
|
DisplayError( NULL, msg, 20 );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Controle du type de la librairie : */
|
/* Controle du type de la librairie : */
|
||||||
flag_librairie = 0;
|
flag_librairie = 0;
|
||||||
fgets(buffer,32,name_libmodules) ;
|
fgets( buffer, 32, name_libmodules );
|
||||||
if( strncmp(buffer,ENTETE_LIBRAIRIE,L_ENTETE_LIB) != 0 )
|
if( strncmp( buffer, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
|
||||||
{
|
{
|
||||||
msg.Printf(_("Library file <%s> is not a module library"),
|
msg.Printf( _( "Library file <%s> is not a module library" ),
|
||||||
FullLibName.GetData());
|
FullLibName.GetData() );
|
||||||
DisplayError(NULL, msg, 20);
|
DisplayError( NULL, msg, 20 );
|
||||||
fclose(name_libmodules); continue;
|
fclose( name_libmodules );
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Lecture du nombre de composants */
|
/* Lecture du nombre de composants */
|
||||||
fseek(name_libmodules,0,0) ;
|
fseek( name_libmodules, 0, 0 );
|
||||||
|
|
||||||
/* lecture nom des composants : */
|
/* lecture nom des composants : */
|
||||||
end = 0;
|
end = 0;
|
||||||
while( !end && fgets(buffer,255,name_libmodules) != NULL )
|
while( !end && fgets( buffer, 255, name_libmodules ) != NULL )
|
||||||
{
|
{
|
||||||
if(strnicmp(buffer,"$INDEX",6) == 0 )
|
if( strnicmp( buffer, "$INDEX", 6 ) == 0 )
|
||||||
{
|
{
|
||||||
while( fgets(buffer,255,name_libmodules) != NULL )
|
while( fgets( buffer, 255, name_libmodules ) != NULL )
|
||||||
{
|
{
|
||||||
if(strnicmp(buffer,"$EndINDEX",6) == 0 )
|
if( strnicmp( buffer, "$EndINDEX", 6 ) == 0 )
|
||||||
{ end = 1; break; }
|
{
|
||||||
|
end = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ItemLib = new STOREMOD();
|
ItemLib = new STOREMOD();
|
||||||
ItemLib->Pnext = g_BaseListePkg;
|
ItemLib->Pnext = g_BaseListePkg;
|
||||||
g_BaseListePkg = ItemLib;
|
g_BaseListePkg = ItemLib;
|
||||||
ItemLib->m_Module = CONV_FROM_UTF8(StrPurge(buffer));
|
ItemLib->m_Module = CONV_FROM_UTF8( StrPurge( buffer ) );
|
||||||
ItemLib->m_LibName = FullLibName;
|
ItemLib->m_LibName = FullLibName;
|
||||||
|
|
||||||
nblib++;
|
nblib++;
|
||||||
}
|
}
|
||||||
if( !end ) errorlevel = -3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(name_libmodules);
|
|
||||||
ReadDocLib(FullLibName );
|
|
||||||
}
|
|
||||||
|
|
||||||
/* classement alphabetique: */
|
if( !end )
|
||||||
if( g_BaseListePkg )
|
errorlevel = -3;
|
||||||
g_BaseListePkg = TriListeModules(g_BaseListePkg, nblib);
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(errorlevel) ;
|
fclose( name_libmodules );
|
||||||
|
ReadDocLib( FullLibName );
|
||||||
|
}
|
||||||
|
|
||||||
|
/* classement alphabetique: */
|
||||||
|
if( g_BaseListePkg )
|
||||||
|
g_BaseListePkg = TriListeModules( g_BaseListePkg, nblib );
|
||||||
|
|
||||||
|
return errorlevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
static int LibCompare(void * mod1, void * mod2)
|
static int LibCompare( void* mod1, void* mod2 )
|
||||||
/************************************************/
|
/************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
routine compare() pour qsort() en classement alphabétique des modules
|
* routine compare() pour qsort() en classement alphabétique des modules
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int ii;
|
int ii;
|
||||||
STOREMOD *pt1 , *pt2;
|
STOREMOD* pt1, * pt2;
|
||||||
|
|
||||||
pt1 = * ((STOREMOD**)mod1);
|
pt1 = *( (STOREMOD**) mod1 );
|
||||||
pt2 = * ((STOREMOD**)mod2);
|
pt2 = *( (STOREMOD**) mod2 );
|
||||||
|
|
||||||
ii = StrNumICmp( pt1->m_Module.GetData(), pt2->m_Module.GetData() );
|
ii = StrNumICmp( pt1->m_Module.GetData(), pt2->m_Module.GetData() );
|
||||||
return(ii);
|
return ii;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
static STOREMOD* TriListeModules( STOREMOD* BaseListe, int nbitems )
|
||||||
|
/********************************************************************/
|
||||||
|
|
||||||
/********************************************************************/
|
|
||||||
static STOREMOD * TriListeModules(STOREMOD * BaseListe, int nbitems)
|
|
||||||
/********************************************************************/
|
|
||||||
/* Tri la liste des Modules par ordre alphabetique et met a jour
|
/* Tri la liste des Modules par ordre alphabetique et met a jour
|
||||||
le nouveau chainage avant/arriere
|
* le nouveau chainage avant/arriere
|
||||||
retourne un pointeur sur le 1er element de la liste
|
* retourne un pointeur sur le 1er element de la liste
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STOREMOD ** bufferptr, * Item;
|
STOREMOD** bufferptr, * Item;
|
||||||
int ii, nb;
|
int ii, nb;
|
||||||
|
|
||||||
if (nbitems <= 0 ) return(NULL);
|
if( nbitems <= 0 )
|
||||||
if ( BaseListe == NULL ) return(NULL);
|
return NULL;
|
||||||
|
if( BaseListe == NULL )
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (nbitems == 1 ) return(BaseListe); // Tri inutile et impossible
|
if( nbitems == 1 )
|
||||||
|
return BaseListe; // Tri inutile et impossible
|
||||||
|
|
||||||
bufferptr = (STOREMOD**)MyZMalloc( (nbitems+3) * sizeof(STOREMOD*) );
|
bufferptr = (STOREMOD**) MyZMalloc( (nbitems + 3) * sizeof(STOREMOD*) );
|
||||||
|
|
||||||
for( ii = 1, nb = 0, Item = BaseListe; Item != NULL; Item = Item->Pnext, ii++)
|
for( ii = 1, nb = 0, Item = BaseListe;
|
||||||
{
|
Item != NULL;
|
||||||
nb++;
|
Item = Item->Pnext, ii++ )
|
||||||
bufferptr[ii] = Item;
|
{
|
||||||
}
|
nb++;
|
||||||
|
bufferptr[ii] = Item;
|
||||||
|
}
|
||||||
|
|
||||||
/* ici bufferptr[0] = NULL et bufferptr[nbitem+1] = NULL et ces 2 valeurs
|
/* ici bufferptr[0] = NULL et bufferptr[nbitem+1] = NULL et ces 2 valeurs
|
||||||
representent le chainage arriere du 1er element ( = NULL),
|
* representent le chainage arriere du 1er element ( = NULL),
|
||||||
et le chainage avant du dernier element ( = NULL ) */
|
* et le chainage avant du dernier element ( = NULL ) */
|
||||||
|
|
||||||
qsort(bufferptr+1,nb,sizeof(STOREMOD*),
|
qsort( bufferptr + 1, nb, sizeof(STOREMOD*),
|
||||||
(int(*)(const void*,const void*))LibCompare) ;
|
( int( * ) ( const void*, const void* ) )LibCompare );
|
||||||
|
|
||||||
/* Mise a jour du chainage */
|
/* Mise a jour du chainage */
|
||||||
for( ii = 1; ii <= nb; ii++ )
|
for( ii = 1; ii <= nb; ii++ )
|
||||||
{
|
{
|
||||||
Item = bufferptr[ii];
|
Item = bufferptr[ii];
|
||||||
Item->m_Num = ii;
|
Item->m_Num = ii;
|
||||||
Item->Pnext = bufferptr[ii+1];
|
Item->Pnext = bufferptr[ii + 1];
|
||||||
Item->Pback = bufferptr[ii-1];
|
Item->Pback = bufferptr[ii - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Item = bufferptr[1];
|
Item = bufferptr[1];
|
||||||
MyFree(bufferptr);
|
MyFree( bufferptr );
|
||||||
|
|
||||||
return(Item);
|
return Item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************/
|
||||||
|
static void ReadDocLib( const wxString& ModLibName )
|
||||||
|
/***************************************************/
|
||||||
|
|
||||||
/***************************************************/
|
|
||||||
static void ReadDocLib(const wxString & ModLibName )
|
|
||||||
/***************************************************/
|
|
||||||
/* Routine de lecture du fichier Doc associe a la librairie ModLibName.
|
/* Routine de lecture du fichier Doc associe a la librairie ModLibName.
|
||||||
Cree en memoire la chaine liste des docs pointee par MList
|
* Cree en memoire la chaine liste des docs pointee par MList
|
||||||
ModLibName = full file Name de la librairie Modules
|
* ModLibName = full file Name de la librairie Modules
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STOREMOD * NewMod;
|
STOREMOD* NewMod;
|
||||||
char Line[1024];
|
char Line[1024];
|
||||||
wxString ModuleName;
|
wxString ModuleName;
|
||||||
wxString docfilename;
|
wxString docfilename;
|
||||||
FILE * LibDoc;
|
FILE* LibDoc;
|
||||||
|
|
||||||
docfilename = ModLibName;
|
docfilename = ModLibName;
|
||||||
ChangeFileNameExt(docfilename, EXT_DOC);
|
ChangeFileNameExt( docfilename, EXT_DOC );
|
||||||
|
|
||||||
if( (LibDoc = wxFopen(docfilename, wxT("rt"))) == NULL ) return;
|
if( ( LibDoc = wxFopen( docfilename, wxT( "rt" ) ) ) == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
GetLine(LibDoc, Line, NULL, sizeof(Line) -1);
|
GetLine( LibDoc, Line, NULL, sizeof(Line) - 1 );
|
||||||
if(strnicmp( Line,ENTETE_LIBDOC, L_ENTETE_LIB) != 0) return;
|
if( strnicmp( Line, ENTETE_LIBDOC, L_ENTETE_LIB ) != 0 )
|
||||||
|
return;
|
||||||
|
|
||||||
/* Lecture de la librairie */
|
/* Lecture de la librairie */
|
||||||
while( GetLine(LibDoc,Line, NULL, sizeof(Line) -1) )
|
while( GetLine( LibDoc, Line, NULL, sizeof(Line) - 1 ) )
|
||||||
{
|
{
|
||||||
NewMod = NULL;
|
NewMod = NULL;
|
||||||
if( Line[0] != '$' ) continue;
|
if( Line[0] != '$' )
|
||||||
if( Line[1] == 'E' ) break;;
|
continue;
|
||||||
if( Line[1] == 'M' ) /* Debut decription 1 module */
|
if( Line[1] == 'E' )
|
||||||
{
|
break;;
|
||||||
while( GetLine(LibDoc,Line, NULL, sizeof(Line) -1) )
|
if( Line[1] == 'M' ) /* Debut decription 1 module */
|
||||||
{
|
{
|
||||||
if( Line[0] == '$' ) /* $EndMODULE */
|
while( GetLine( LibDoc, Line, NULL, sizeof(Line) - 1 ) )
|
||||||
break;
|
{
|
||||||
switch( Line[0] )
|
if( Line[0] == '$' ) /* $EndMODULE */
|
||||||
{
|
break;
|
||||||
case 'L': /* LibName */
|
switch( Line[0] )
|
||||||
ModuleName = CONV_FROM_UTF8(StrPurge(Line+3));
|
{
|
||||||
NewMod = g_BaseListePkg;
|
case 'L': /* LibName */
|
||||||
while ( NewMod )
|
ModuleName = CONV_FROM_UTF8( StrPurge( Line + 3 ) );
|
||||||
{
|
NewMod = g_BaseListePkg;
|
||||||
if( ModuleName == NewMod->m_Module ) break;
|
while( NewMod )
|
||||||
NewMod = NewMod->Pnext;
|
{
|
||||||
}
|
if( ModuleName == NewMod->m_Module )
|
||||||
break;
|
break;
|
||||||
|
NewMod = NewMod->Pnext;
|
||||||
|
}
|
||||||
|
|
||||||
case 'K': /* KeyWords */
|
break;
|
||||||
if( NewMod && (! NewMod->m_KeyWord) )
|
|
||||||
NewMod->m_KeyWord = CONV_FROM_UTF8(StrPurge(Line+3) );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'C': /* Doc */
|
case 'K': /* KeyWords */
|
||||||
if( NewMod && (! NewMod->m_Doc ) )
|
if( NewMod && (!NewMod->m_KeyWord) )
|
||||||
NewMod->m_Doc = CONV_FROM_UTF8(StrPurge(Line+3) );
|
NewMod->m_KeyWord = CONV_FROM_UTF8( StrPurge( Line + 3 ) );
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
case 'C': /* Doc */
|
||||||
} /* lecture 1 descr module */
|
if( NewMod && (!NewMod->m_Doc ) )
|
||||||
} /* Fin lecture librairie */
|
NewMod->m_Doc = CONV_FROM_UTF8( StrPurge( Line + 3 ) );
|
||||||
fclose(LibDoc);
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} /* lecture 1 descr module */
|
||||||
|
} /* Fin lecture librairie */
|
||||||
|
|
||||||
|
fclose( LibDoc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,15 @@
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************/
|
/*****************************************************************/
|
||||||
|
@ -103,7 +107,8 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose( lib_module ); lib_module = 0;
|
fclose( lib_module );
|
||||||
|
lib_module = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( lib_module )
|
if( lib_module )
|
||||||
|
|
|
@ -5,10 +5,14 @@
|
||||||
/* cree et/ou affiche et modifie la configuration de CVPCB */
|
/* cree et/ou affiche et modifie la configuration de CVPCB */
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*****************************************/
|
/*****************************************/
|
||||||
|
|
|
@ -8,12 +8,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
#define SEPARATEUR '|' /* caractere separateur dans netliste */
|
#define SEPARATEUR '|' /* caractere separateur dans netliste */
|
||||||
|
|
||||||
|
|
|
@ -1,167 +1,181 @@
|
||||||
/**************/
|
/**************/
|
||||||
/* savecmp() */
|
/* savecmp() */
|
||||||
/**************/
|
/**************/
|
||||||
|
|
||||||
/* sauvegarde la liste des associations composants/empreintes */
|
/* sauvegarde la liste des associations composants/empreintes */
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "wxstruct.h"
|
#include "wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "cvpcb.h"
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/* Chaines de caractere d'identification */
|
/* Chaines de caractere d'identification */
|
||||||
char EnteteCmpMod[] = {"Cmp-Mod V01"};
|
char EnteteCmpMod[] = { "Cmp-Mod V01" };
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
int WinEDA_CvpcbFrame::SaveComponentList(const wxString & NetlistFullFileName)
|
int WinEDA_CvpcbFrame::SaveComponentList( const wxString& NetlistFullFileName )
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* Routine de sauvegarde du fichier des modules
|
/* Routine de sauvegarde du fichier des modules
|
||||||
Retourne 1 si OK
|
* Retourne 1 si OK
|
||||||
0 si ecriture non faite
|
* 0 si ecriture non faite
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STORECMP * Cmp;
|
STORECMP* Cmp;
|
||||||
wxString FullFileName;
|
wxString FullFileName;
|
||||||
char Line[1024];
|
char Line[1024];
|
||||||
wxString Title = g_Main_Title + wxT(" ") + GetBuildVersion();
|
wxString Title = g_Main_Title + wxT( " " ) + GetBuildVersion();
|
||||||
|
|
||||||
/* calcul du nom du fichier */
|
/* calcul du nom du fichier */
|
||||||
FullFileName = NetlistFullFileName;
|
FullFileName = NetlistFullFileName;
|
||||||
ChangeFileNameExt(FullFileName, g_ExtCmpBuffer);
|
ChangeFileNameExt( FullFileName, g_ExtCmpBuffer );
|
||||||
|
|
||||||
dest = wxFopen(FullFileName, wxT("wt") );
|
dest = wxFopen( FullFileName, wxT( "wt" ) );
|
||||||
if( dest == NULL ) return(0); /* Erreur ecriture */
|
if( dest == NULL )
|
||||||
|
return 0; /* Erreur ecriture */
|
||||||
|
|
||||||
fprintf(dest,"%s", EnteteCmpMod);
|
fprintf( dest, "%s", EnteteCmpMod );
|
||||||
fprintf(dest," Created by %s", CONV_TO_UTF8(Title));
|
fprintf( dest, " Created by %s", CONV_TO_UTF8( Title ) );
|
||||||
fprintf(dest," date = %s\n", DateAndTime(Line));
|
fprintf( dest, " date = %s\n", DateAndTime( Line ) );
|
||||||
|
|
||||||
for ( Cmp = g_BaseListeCmp ; Cmp != NULL ; Cmp = Cmp->Pnext )
|
for( Cmp = g_BaseListeCmp; Cmp != NULL; Cmp = Cmp->Pnext )
|
||||||
{
|
{
|
||||||
fprintf(dest,"\nBeginCmp\n");
|
fprintf( dest, "\nBeginCmp\n" );
|
||||||
fprintf(dest,"TimeStamp = %s;\n", CONV_TO_UTF8(Cmp->m_TimeStamp));
|
fprintf( dest, "TimeStamp = %s;\n", CONV_TO_UTF8( Cmp->m_TimeStamp ) );
|
||||||
fprintf(dest,"Reference = %s;\n", CONV_TO_UTF8(Cmp->m_Reference));
|
fprintf( dest, "Reference = %s;\n", CONV_TO_UTF8( Cmp->m_Reference ) );
|
||||||
fprintf(dest,"ValeurCmp = %s;\n", CONV_TO_UTF8(Cmp->m_Valeur));
|
fprintf( dest, "ValeurCmp = %s;\n", CONV_TO_UTF8( Cmp->m_Valeur ) );
|
||||||
fprintf(dest,"IdModule = %s;\n", CONV_TO_UTF8(Cmp->m_Module));
|
fprintf( dest, "IdModule = %s;\n", CONV_TO_UTF8( Cmp->m_Module ) );
|
||||||
fprintf(dest,"EndCmp\n");
|
fprintf( dest, "EndCmp\n" );
|
||||||
}
|
}
|
||||||
fprintf(dest,"\nEndListe\n") ;
|
|
||||||
fclose(dest) ;
|
|
||||||
|
|
||||||
return(1) ;
|
fprintf( dest, "\nEndListe\n" );
|
||||||
|
fclose( dest );
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************/
|
/****************/
|
||||||
int loadcmp()
|
int loadcmp()
|
||||||
/***************/
|
/***************/
|
||||||
|
|
||||||
/* recupere la liste des associations composants/empreintes
|
/* recupere la liste des associations composants/empreintes
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
wxString timestamp, valeur, ilib, namecmp;
|
wxString timestamp, valeur, ilib, namecmp;
|
||||||
bool read_cmp_data = FALSE, eof = FALSE;
|
bool read_cmp_data = FALSE, eof = FALSE;
|
||||||
STORECMP * Cmp;
|
STORECMP* Cmp;
|
||||||
char Line[1024], * ident, *data;
|
char Line[1024], * ident, * data;
|
||||||
wxString FullFileName;
|
wxString FullFileName;
|
||||||
|
|
||||||
/* calcul du nom du fichier */
|
/* calcul du nom du fichier */
|
||||||
FullFileName = FFileName;
|
FullFileName = FFileName;
|
||||||
ChangeFileNameExt(FullFileName, g_ExtCmpBuffer);
|
ChangeFileNameExt( FullFileName, g_ExtCmpBuffer );
|
||||||
|
|
||||||
source = wxFopen(FullFileName, wxT("rt") );
|
source = wxFopen( FullFileName, wxT( "rt" ) );
|
||||||
if (source == NULL )
|
if( source == NULL )
|
||||||
{
|
{
|
||||||
return(0) ;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identification du Type de fichier CmpMod */
|
/* Identification du Type de fichier CmpMod */
|
||||||
if ( fgets(Line,79,source) == 0 ) return(0);
|
if( fgets( Line, 79, source ) == 0 )
|
||||||
if( strnicmp(Line, EnteteCmpMod, 11 ) != 0 ) /* old file version*/
|
return 0;
|
||||||
{
|
if( strnicmp( Line, EnteteCmpMod, 11 ) != 0 ) /* old file version*/
|
||||||
fclose(source) ;
|
{
|
||||||
DisplayError( NULL, wxT("Old version of Componaent file, recreate it!"));
|
fclose( source );
|
||||||
return(0) ;
|
DisplayError( NULL,
|
||||||
}
|
wxT( "Old version of Componaent file, recreate it!" ) );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* lecture de la liste */
|
/* lecture de la liste */
|
||||||
while( ! eof && fgets(Line,79,source) != 0 )
|
while( !eof && fgets( Line, 79, source ) != 0 )
|
||||||
{
|
{
|
||||||
if( strnicmp(Line, "EndListe", 8 ) == 0 ) break;
|
if( strnicmp( Line, "EndListe", 8 ) == 0 )
|
||||||
|
break;
|
||||||
|
|
||||||
/* Recherche du debut de description du composant */
|
/* Recherche du debut de description du composant */
|
||||||
if( strnicmp(Line, "BeginCmp", 8 ) != 0 ) continue;
|
if( strnicmp( Line, "BeginCmp", 8 ) != 0 )
|
||||||
timestamp.Empty();
|
continue;
|
||||||
valeur.Empty();
|
timestamp.Empty();
|
||||||
ilib.Empty();
|
valeur.Empty();
|
||||||
namecmp.Empty();
|
ilib.Empty();
|
||||||
read_cmp_data = TRUE;
|
namecmp.Empty();
|
||||||
|
read_cmp_data = TRUE;
|
||||||
|
|
||||||
while( ! eof && read_cmp_data )
|
while( !eof && read_cmp_data )
|
||||||
{
|
{
|
||||||
if( fgets(Line, 1024,source) == 0 )
|
if( fgets( Line, 1024, source ) == 0 )
|
||||||
{
|
{
|
||||||
eof = TRUE; break;
|
eof = TRUE; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strnicmp(Line, "EndCmp", 6 ) == 0 )
|
if( strnicmp( Line, "EndCmp", 6 ) == 0 )
|
||||||
{
|
{
|
||||||
read_cmp_data = TRUE; break;
|
read_cmp_data = TRUE; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ident = strtok ( Line,"=;\n\r");
|
ident = strtok( Line, "=;\n\r" );
|
||||||
data = strtok ( NULL,";\n\r");
|
data = strtok( NULL, ";\n\r" );
|
||||||
if( strnicmp(ident, "TimeStamp", 9) == 0)
|
if( strnicmp( ident, "TimeStamp", 9 ) == 0 )
|
||||||
{
|
{
|
||||||
timestamp = CONV_FROM_UTF8(data);
|
timestamp = CONV_FROM_UTF8( data );
|
||||||
timestamp.Trim(TRUE);
|
timestamp.Trim( TRUE );
|
||||||
timestamp.Trim(FALSE);
|
timestamp.Trim( FALSE );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strnicmp(ident, "Reference", 9) == 0)
|
if( strnicmp( ident, "Reference", 9 ) == 0 )
|
||||||
{
|
{
|
||||||
namecmp = CONV_FROM_UTF8(data);
|
namecmp = CONV_FROM_UTF8( data );
|
||||||
namecmp.Trim(TRUE);
|
namecmp.Trim( TRUE );
|
||||||
namecmp.Trim(FALSE);
|
namecmp.Trim( FALSE );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strnicmp(ident, "ValeurCmp", 9) == 0)
|
if( strnicmp( ident, "ValeurCmp", 9 ) == 0 )
|
||||||
{
|
{
|
||||||
valeur = CONV_FROM_UTF8(data);
|
valeur = CONV_FROM_UTF8( data );
|
||||||
valeur.Trim(TRUE);
|
valeur.Trim( TRUE );
|
||||||
valeur.Trim(FALSE);
|
valeur.Trim( FALSE );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( strnicmp(ident, "IdModule", 8) == 0)
|
if( strnicmp( ident, "IdModule", 8 ) == 0 )
|
||||||
{
|
{
|
||||||
ilib = CONV_FROM_UTF8(data);
|
ilib = CONV_FROM_UTF8( data );
|
||||||
ilib.Trim(TRUE);
|
ilib.Trim( TRUE );
|
||||||
ilib.Trim(FALSE);
|
ilib.Trim( FALSE );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} /* Fin lecture description de 1 composant */
|
} /* Fin lecture description de 1 composant */
|
||||||
|
|
||||||
/* Recherche du composant correspondant en netliste et
|
/* Recherche du composant correspondant en netliste et
|
||||||
mise a jour de ses parametres */
|
* mise a jour de ses parametres */
|
||||||
for ( Cmp = g_BaseListeCmp ; Cmp != NULL ; Cmp = Cmp->Pnext )
|
for( Cmp = g_BaseListeCmp; Cmp != NULL; Cmp = Cmp->Pnext )
|
||||||
{
|
{
|
||||||
if (selection_type == 1 )
|
if( selection_type == 1 )
|
||||||
{
|
{
|
||||||
if( timestamp != Cmp->m_TimeStamp )
|
if( timestamp != Cmp->m_TimeStamp )
|
||||||
continue ;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if( namecmp != Cmp->m_Reference ) continue;
|
if( namecmp != Cmp->m_Reference )
|
||||||
|
continue;
|
||||||
|
|
||||||
/* composant identifie , copie du nom du module correspondant */
|
/* composant identifie , copie du nom du module correspondant */
|
||||||
Cmp->m_Module= ilib;
|
Cmp->m_Module = ilib;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(source) ;
|
|
||||||
return(1) ;
|
fclose( source );
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,17 @@
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "class_drawpanel.h"
|
||||||
#include "3d_viewer.h"
|
|
||||||
#include "id.h"
|
#include "id.h"
|
||||||
#include "bitmaps.h"
|
|
||||||
|
|
||||||
|
#include "3d_viewer.h"
|
||||||
|
|
||||||
|
#include "bitmaps.h"
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
void WinEDA_CvpcbFrame::CreateScreenCmp()
|
void WinEDA_CvpcbFrame::CreateScreenCmp()
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
/***************************************************/
|
/***************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "id.h"
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
|
|
||||||
#include "protos.h"
|
|
||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "id.h"
|
#include "protos.h"
|
||||||
|
#include "cvstruct.h"
|
||||||
|
|
||||||
|
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
|
|
|
@ -1,29 +1,30 @@
|
||||||
/***************************/
|
/***************************/
|
||||||
/* writenetlistpcbnew.cpp */
|
/* writenetlistpcbnew.cpp */
|
||||||
/***************************/
|
/***************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Complete la netliste (*.NET) en y placant les ref *.lib FORMAT PCBNEW ou ORCADPCB
|
* Complete la netliste (*.NET) en y placant les ref *.lib FORMAT PCBNEW ou ORCADPCB
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "cvpcb.h"
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
|
#include "cvpcb.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
#define MAX_LEN_NETNAME 16
|
#define MAX_LEN_NETNAME 16
|
||||||
|
|
||||||
/* Routines locales */
|
/* Routines locales */
|
||||||
static void TriPinsModule( STORECMP * CurrentCmp );
|
static void TriPinsModule( STORECMP* CurrentCmp );
|
||||||
static int PinCompare(const void *cmp1, const void *cmp2);
|
static int PinCompare( const void* cmp1, const void* cmp2 );
|
||||||
static void ChangePinNet( wxString & PinNet );
|
static void ChangePinNet( wxString& PinNet );
|
||||||
static void WriteFootprintFilterInfos(FILE * dest);
|
static void WriteFootprintFilterInfos( FILE* dest );
|
||||||
|
|
||||||
/* Variables Locales */
|
/* Variables Locales */
|
||||||
int NetNumCode; /* Nombre utilise pour cree des NetNames lors de
|
int NetNumCode; /* Nombre utilise pour cree des NetNames lors de
|
||||||
reaffectation de NetNames */
|
* reaffectation de NetNames */
|
||||||
|
|
||||||
|
|
||||||
/*************************/
|
/*************************/
|
||||||
|
@ -31,205 +32,228 @@ int GenNetlistPcbnew()
|
||||||
/*************************/
|
/*************************/
|
||||||
{
|
{
|
||||||
#define NETLIST_HEAD_STRING "EESchema Netlist Version 1.1"
|
#define NETLIST_HEAD_STRING "EESchema Netlist Version 1.1"
|
||||||
char Line[1024];
|
char Line[1024];
|
||||||
STOREPIN * Pin;
|
STOREPIN* Pin;
|
||||||
STORECMP * CurrentCmp;
|
STORECMP* CurrentCmp;
|
||||||
wxString Title = g_Main_Title + wxT(" ") + GetBuildVersion();
|
wxString Title = g_Main_Title + wxT( " " ) + GetBuildVersion();
|
||||||
|
|
||||||
NetNumCode = 1; DateAndTime(Line);
|
NetNumCode = 1; DateAndTime( Line );
|
||||||
if ( g_FlagEESchema )
|
if( g_FlagEESchema )
|
||||||
fprintf( dest, "# %s created %s\n(\n", NETLIST_HEAD_STRING, Line);
|
fprintf( dest, "# %s created %s\n(\n", NETLIST_HEAD_STRING, Line );
|
||||||
else fprintf( dest, "( { netlist created %s }\n", Line );
|
else
|
||||||
|
fprintf( dest, "( { netlist created %s }\n", Line );
|
||||||
|
|
||||||
/***********************/
|
/***********************/
|
||||||
/* Lecture de la liste */
|
/* Lecture de la liste */
|
||||||
/***********************/
|
/***********************/
|
||||||
|
|
||||||
CurrentCmp = g_BaseListeCmp;
|
CurrentCmp = g_BaseListeCmp;
|
||||||
for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext)
|
for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext )
|
||||||
{
|
{
|
||||||
fprintf(dest," ( %s ", CONV_TO_UTF8(CurrentCmp->m_TimeStamp));
|
fprintf( dest, " ( %s ", CONV_TO_UTF8( CurrentCmp->m_TimeStamp ) );
|
||||||
|
|
||||||
if( ! CurrentCmp->m_Module.IsEmpty() )
|
if( !CurrentCmp->m_Module.IsEmpty() )
|
||||||
fprintf(dest, CONV_TO_UTF8(CurrentCmp->m_Module));
|
fprintf( dest, CONV_TO_UTF8( CurrentCmp->m_Module ) );
|
||||||
|
|
||||||
else fprintf(dest,"$noname$") ;
|
else
|
||||||
|
fprintf( dest, "$noname$" );
|
||||||
|
|
||||||
fprintf(dest," %s ",CONV_TO_UTF8(CurrentCmp->m_Reference)) ;
|
fprintf( dest, " %s ", CONV_TO_UTF8( CurrentCmp->m_Reference ) );
|
||||||
|
|
||||||
/* placement de la valeur */
|
/* placement de la valeur */
|
||||||
fprintf(dest,"%s\n",CONV_TO_UTF8(CurrentCmp->m_Valeur)) ;
|
fprintf( dest, "%s\n", CONV_TO_UTF8( CurrentCmp->m_Valeur ) );
|
||||||
|
|
||||||
/* Tri des pins */
|
/* Tri des pins */
|
||||||
TriPinsModule( CurrentCmp );
|
TriPinsModule( CurrentCmp );
|
||||||
|
|
||||||
/* Placement de la liste des pins */
|
/* Placement de la liste des pins */
|
||||||
Pin = CurrentCmp->m_Pins;
|
Pin = CurrentCmp->m_Pins;
|
||||||
for( ; Pin != NULL; Pin = Pin->Pnext )
|
for( ; Pin != NULL; Pin = Pin->Pnext )
|
||||||
{
|
{
|
||||||
if( Pin->m_PinNet.Len() > MAX_LEN_NETNAME)
|
if( Pin->m_PinNet.Len() > MAX_LEN_NETNAME )
|
||||||
ChangePinNet( Pin->m_PinNet );
|
ChangePinNet( Pin->m_PinNet );
|
||||||
|
|
||||||
if( ! Pin->m_PinNet.IsEmpty() )
|
if( !Pin->m_PinNet.IsEmpty() )
|
||||||
fprintf(dest," ( %s %s )\n",
|
fprintf( dest, " ( %s %s )\n",
|
||||||
CONV_TO_UTF8(Pin->m_PinNum),
|
CONV_TO_UTF8( Pin->m_PinNum ),
|
||||||
CONV_TO_UTF8(Pin->m_PinNet));
|
CONV_TO_UTF8( Pin->m_PinNet ) );
|
||||||
else
|
else
|
||||||
fprintf(dest," ( %s ? )\n", CONV_TO_UTF8(Pin->m_PinNum));
|
fprintf( dest, " ( %s ? )\n", CONV_TO_UTF8( Pin->m_PinNum ) );
|
||||||
}
|
}
|
||||||
fprintf(dest," )\n");
|
|
||||||
}
|
fprintf( dest, " )\n" );
|
||||||
fprintf(dest,")\n*\n");
|
}
|
||||||
if ( g_FlagEESchema ) WriteFootprintFilterInfos(dest);
|
|
||||||
fclose(dest);
|
fprintf( dest, ")\n*\n" );
|
||||||
return(0);
|
if( g_FlagEESchema )
|
||||||
|
WriteFootprintFilterInfos( dest );
|
||||||
|
fclose( dest );
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
void WriteFootprintFilterInfos(FILE * dest)
|
void WriteFootprintFilterInfos( FILE* dest )
|
||||||
/******************************************/
|
/******************************************/
|
||||||
/* Write the allowed footprint list for each component */
|
/* Write the allowed footprint list for each component */
|
||||||
{
|
{
|
||||||
STORECMP * component = g_BaseListeCmp;
|
STORECMP* component = g_BaseListeCmp;
|
||||||
bool WriteHeader = FALSE;
|
bool WriteHeader = FALSE;
|
||||||
|
|
||||||
for ( ; component != NULL; component = component->Pnext )
|
for( ; component != NULL; component = component->Pnext )
|
||||||
{
|
{
|
||||||
unsigned int FilterCount;
|
unsigned int FilterCount;
|
||||||
FilterCount = component->m_FootprintFilter.GetCount();
|
FilterCount = component->m_FootprintFilter.GetCount();
|
||||||
if ( FilterCount == 0 ) continue;
|
if( FilterCount == 0 )
|
||||||
if ( ! WriteHeader )
|
continue;
|
||||||
{
|
if( !WriteHeader )
|
||||||
fprintf( dest, "{ Allowed footprints by component:\n" );
|
{
|
||||||
WriteHeader = TRUE;
|
fprintf( dest, "{ Allowed footprints by component:\n" );
|
||||||
}
|
WriteHeader = TRUE;
|
||||||
fprintf(dest, "$component %s\n", CONV_TO_UTF8(component->m_Reference));
|
}
|
||||||
/* Write the footprint list */
|
fprintf( dest, "$component %s\n",
|
||||||
for ( unsigned int jj = 0; jj < FilterCount; jj ++ )
|
CONV_TO_UTF8( component->m_Reference ) );
|
||||||
{
|
/* Write the footprint list */
|
||||||
fprintf(dest, " %s\n", CONV_TO_UTF8(component->m_FootprintFilter[jj]));
|
for( unsigned int jj = 0; jj < FilterCount; jj++ )
|
||||||
}
|
{
|
||||||
fprintf(dest, "$endlist\n");
|
fprintf( dest, " %s\n",
|
||||||
}
|
CONV_TO_UTF8( component->m_FootprintFilter[jj] ) );
|
||||||
if ( WriteHeader )
|
}
|
||||||
fprintf(dest, "$endfootprintlist\n}\n");
|
|
||||||
|
fprintf( dest, "$endlist\n" );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( WriteHeader )
|
||||||
|
fprintf( dest, "$endfootprintlist\n}\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
static void TriPinsModule( STORECMP * CurrentCmp )
|
static void TriPinsModule( STORECMP* CurrentCmp )
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
|
|
||||||
/* Tri et controle des pins du module CurrentCmp
|
/* Tri et controle des pins du module CurrentCmp
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STOREPIN * Pin, * NextPin, ** BasePin;
|
STOREPIN* Pin, * NextPin, ** BasePin;
|
||||||
int nbpins = 0, ii;
|
int nbpins = 0, ii;
|
||||||
|
|
||||||
Pin = CurrentCmp->m_Pins;
|
Pin = CurrentCmp->m_Pins;
|
||||||
if( Pin == NULL ) return;
|
if( Pin == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
/* comptage des pins */
|
/* comptage des pins */
|
||||||
for( ; Pin != NULL ; Pin = Pin->Pnext ) nbpins++;
|
for( ; Pin != NULL; Pin = Pin->Pnext )
|
||||||
|
nbpins++;
|
||||||
|
|
||||||
/* Tri des pins: etablissement de la liste des pointeurs */
|
/* Tri des pins: etablissement de la liste des pointeurs */
|
||||||
BasePin = (STOREPIN ** )MyZMalloc( nbpins * sizeof(STOREPIN*) );
|
BasePin = (STOREPIN**) MyZMalloc( nbpins * sizeof(STOREPIN*) );
|
||||||
|
|
||||||
Pin = CurrentCmp->m_Pins;
|
Pin = CurrentCmp->m_Pins;
|
||||||
for( ii = 0 ; ii < nbpins ; ii++, Pin = Pin->Pnext )
|
for( ii = 0; ii < nbpins; ii++, Pin = Pin->Pnext )
|
||||||
{
|
{
|
||||||
BasePin[ii] = Pin;
|
BasePin[ii] = Pin;
|
||||||
}
|
}
|
||||||
/* Tri des Pins */
|
|
||||||
qsort( BasePin, nbpins, sizeof( STORECMP*), PinCompare) ;
|
|
||||||
|
|
||||||
/* Remise a jour des pointeurs chaines */
|
/* Tri des Pins */
|
||||||
for( ii = 0 ; ii < nbpins-1 ; ii++ )
|
qsort( BasePin, nbpins, sizeof( STORECMP*), PinCompare );
|
||||||
{
|
|
||||||
BasePin[ii]->Pnext = BasePin[ii+1];
|
|
||||||
}
|
|
||||||
BasePin[ii]->Pnext = NULL;
|
|
||||||
CurrentCmp->m_Pins = BasePin[0];
|
|
||||||
|
|
||||||
MyFree(BasePin);
|
/* Remise a jour des pointeurs chaines */
|
||||||
|
for( ii = 0; ii < nbpins - 1; ii++ )
|
||||||
|
{
|
||||||
|
BasePin[ii]->Pnext = BasePin[ii + 1];
|
||||||
|
}
|
||||||
|
|
||||||
/* Elimination des redondances */
|
BasePin[ii]->Pnext = NULL;
|
||||||
Pin = CurrentCmp->m_Pins;
|
CurrentCmp->m_Pins = BasePin[0];
|
||||||
while( Pin != NULL)
|
|
||||||
{
|
MyFree( BasePin );
|
||||||
NextPin = Pin->Pnext;
|
|
||||||
if ( NextPin == NULL ) break;
|
/* Elimination des redondances */
|
||||||
if( Pin->m_PinNum != NextPin->m_PinNum )
|
Pin = CurrentCmp->m_Pins;
|
||||||
{
|
while( Pin != NULL )
|
||||||
Pin = Pin->Pnext; continue;
|
{
|
||||||
}
|
NextPin = Pin->Pnext;
|
||||||
/* 2 pins successives ont le meme numero */
|
if( NextPin == NULL )
|
||||||
if( Pin->m_PinNet != NextPin->m_PinNet )
|
break;
|
||||||
{
|
if( Pin->m_PinNum != NextPin->m_PinNum )
|
||||||
wxString msg;
|
{
|
||||||
msg.Printf( _("%s %s pin %s : Different Nets"),
|
Pin = Pin->Pnext; continue;
|
||||||
CurrentCmp->m_Reference.GetData(),CurrentCmp->m_Valeur.GetData(),
|
}
|
||||||
Pin->m_PinNum.GetData());
|
/* 2 pins successives ont le meme numero */
|
||||||
DisplayError(NULL, msg, 60 );
|
if( Pin->m_PinNet != NextPin->m_PinNet )
|
||||||
}
|
{
|
||||||
Pin->Pnext = NextPin->Pnext;
|
wxString msg;
|
||||||
delete NextPin;
|
msg.Printf( _( "%s %s pin %s : Different Nets" ),
|
||||||
}
|
CurrentCmp->m_Reference.GetData(),
|
||||||
|
CurrentCmp->m_Valeur.GetData(),
|
||||||
|
Pin->m_PinNum.GetData() );
|
||||||
|
DisplayError( NULL, msg, 60 );
|
||||||
|
}
|
||||||
|
Pin->Pnext = NextPin->Pnext;
|
||||||
|
delete NextPin;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
static int PinCompare(const void *cmp1,const void *cmp2)
|
static int PinCompare( const void* cmp1, const void* cmp2 )
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
routine PinCompare() pour qsort() pour classement alphabetique
|
* routine PinCompare() pour qsort() pour classement alphabetique
|
||||||
pour tri de la liste des Pins
|
* pour tri de la liste des Pins
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STOREPIN **pt1 , **pt2 ;
|
STOREPIN** pt1, ** pt2;
|
||||||
int ii;
|
int ii;
|
||||||
|
|
||||||
pt1 = (STOREPIN**)cmp1;
|
pt1 = (STOREPIN**) cmp1;
|
||||||
pt2 = (STOREPIN**)cmp2;
|
pt2 = (STOREPIN**) cmp2;
|
||||||
|
|
||||||
ii = StrLenNumICmp( (*pt1)->m_PinNum.GetData(), (*pt2)->m_PinNum.GetData(), 4);
|
ii = StrLenNumICmp( (*pt1)->m_PinNum.GetData(),
|
||||||
return(ii);
|
(*pt2)->m_PinNum.GetData(), 4 );
|
||||||
|
return ii;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
static void ChangePinNet( wxString & PinNet )
|
static void ChangePinNet( wxString& PinNet )
|
||||||
/*******************************************/
|
/*******************************************/
|
||||||
|
|
||||||
/* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
|
/* Change le NetName PinNet par un nom compose des 8 derniers codes de PinNet
|
||||||
suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
|
* suivi de _Xnnnnn ou nnnnn est un nom de 0 a 99999
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
STOREPIN * Pin;
|
STOREPIN* Pin;
|
||||||
STORECMP * CurrentCmp;
|
STORECMP* CurrentCmp;
|
||||||
int ii;
|
int ii;
|
||||||
wxString OldName;
|
wxString OldName;
|
||||||
wxString NewName;
|
wxString NewName;
|
||||||
|
|
||||||
OldName = PinNet;
|
OldName = PinNet;
|
||||||
ii = PinNet.Len();
|
ii = PinNet.Len();
|
||||||
if( Rjustify ) /* On conserve les 8 dernieres lettres du nom */
|
if( Rjustify ) /* On conserve les 8 dernieres lettres du nom */
|
||||||
{
|
{
|
||||||
NewName= OldName.Right(8); NewName << NetNumCode;
|
NewName = OldName.Right( 8 );
|
||||||
}
|
NewName << NetNumCode;
|
||||||
|
}
|
||||||
|
else /* On conserve les 8 premieres lettres du nom */
|
||||||
|
{
|
||||||
|
NewName = OldName.Left( 8 );
|
||||||
|
NewName << NetNumCode;
|
||||||
|
}
|
||||||
|
NetNumCode++;
|
||||||
|
|
||||||
else /* On conserve les 8 premieres lettres du nom */
|
CurrentCmp = g_BaseListeCmp;
|
||||||
{
|
for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext )
|
||||||
NewName = OldName.Left(8); NewName << NetNumCode;
|
{
|
||||||
}
|
Pin = CurrentCmp->m_Pins;
|
||||||
NetNumCode ++;
|
for( ; Pin != NULL; Pin = Pin->Pnext )
|
||||||
|
{
|
||||||
CurrentCmp = g_BaseListeCmp;
|
if( Pin->m_PinNet != OldName )
|
||||||
for( ; CurrentCmp != NULL; CurrentCmp = CurrentCmp->Pnext)
|
continue;
|
||||||
{
|
Pin->m_PinNet = NewName;
|
||||||
Pin = CurrentCmp->m_Pins;
|
}
|
||||||
for( ; Pin != NULL; Pin = Pin->Pnext )
|
}
|
||||||
{
|
|
||||||
if( Pin->m_PinNet != OldName ) continue;
|
|
||||||
Pin->m_PinNet = NewName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "wxstruct.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
|
@ -15,17 +15,6 @@
|
||||||
#pragma implementation "annotate_dialog.h"
|
#pragma implementation "annotate_dialog.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
////@end includes
|
////@end includes
|
||||||
|
|
||||||
|
@ -33,6 +22,7 @@
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
|
|
||||||
#include "annotate_dialog.h"
|
#include "annotate_dialog.h"
|
||||||
|
|
||||||
extern void AnnotateComponents( WinEDA_SchematicFrame* parent,
|
extern void AnnotateComponents( WinEDA_SchematicFrame* parent,
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
////@begin forward declarations
|
////@begin forward declarations
|
||||||
class wxBoxSizer;
|
class wxBoxSizer;
|
||||||
|
class WinEDA_SchematicFrame;
|
||||||
////@end forward declarations
|
////@end forward declarations
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
|
@ -15,8 +17,7 @@
|
||||||
/*******************************************************************************************/
|
/*******************************************************************************************/
|
||||||
bool WinEDA_SchematicFrame::FillFootprintFieldForAllInstancesofComponent(
|
bool WinEDA_SchematicFrame::FillFootprintFieldForAllInstancesofComponent(
|
||||||
const wxString& aReference,
|
const wxString& aReference,
|
||||||
const wxString&
|
const wxString& aFootPrint,
|
||||||
aFootPrint,
|
|
||||||
bool aSetVisible )
|
bool aSetVisible )
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,16 @@
|
||||||
/****************************************************/
|
/****************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "block_commande.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "block_commande.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/* Variables Locales */
|
/* Variables Locales */
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/* Routines Locales */
|
/* Routines Locales */
|
||||||
|
|
|
@ -13,12 +13,14 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
#include "common.h"
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
/*****************/
|
/*****************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
|
|
|
@ -4,15 +4,15 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
/*********************************/
|
/*********************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -3,18 +3,15 @@
|
||||||
/****************/
|
/****************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "eda_dde.h"
|
||||||
|
#include "id.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "eda_dde.h"
|
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/*********************/
|
/*********************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
/****************************/
|
/****************************/
|
||||||
/* EESchema - database.cpp */
|
/* EESchema - database.cpp */
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
/* Routine de selection d'un composant en librairie
|
/* Routine de selection d'un composant en librairie
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "eda_doc.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
@ -22,110 +25,119 @@
|
||||||
|
|
||||||
|
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
bool DataBaseGetName(WinEDA_DrawFrame * frame,
|
bool DataBaseGetName( WinEDA_DrawFrame* frame,
|
||||||
wxString & Keys, wxString & BufName)
|
wxString& Keys, wxString& BufName )
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Routine de selection du nom d'un composant en librairie pour chargement,
|
* Routine de selection du nom d'un composant en librairie pour chargement,
|
||||||
Keys pointe la liste des mots cles de filtrage
|
* Keys pointe la liste des mots cles de filtrage
|
||||||
Si Keys = "", recherche des composants qui correspondent
|
* Si Keys = "", recherche des composants qui correspondent
|
||||||
au masque BufName( avec * et ? )
|
* au masque BufName( avec * et ? )
|
||||||
|
*
|
||||||
Retourne
|
* Retourne
|
||||||
TRUE si composant selectionne
|
* TRUE si composant selectionne
|
||||||
FALSE si commande annulee
|
* FALSE si commande annulee
|
||||||
place le nom du composant a charger, selectionne a partir d'une liste dans
|
* place le nom du composant a charger, selectionne a partir d'une liste dans
|
||||||
BufName
|
* BufName
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int ii;
|
int ii;
|
||||||
EDA_LibComponentStruct * LibEntry;
|
EDA_LibComponentStruct* LibEntry;
|
||||||
LibraryStruct * Lib;
|
LibraryStruct* Lib;
|
||||||
WinEDAListBox * ListBox;
|
WinEDAListBox* ListBox;
|
||||||
const wxChar ** ListNames;
|
const wxChar** ListNames;
|
||||||
|
|
||||||
BufName.MakeUpper();
|
BufName.MakeUpper();
|
||||||
Keys.MakeUpper();
|
Keys.MakeUpper();
|
||||||
|
|
||||||
/* Examen de la liste des librairies pour comptage */
|
/* Examen de la liste des librairies pour comptage */
|
||||||
for (Lib = g_LibraryList, ii = 0; Lib != NULL; Lib = Lib->m_Pnext)
|
for( Lib = g_LibraryList, ii = 0; Lib != NULL; Lib = Lib->m_Pnext )
|
||||||
{
|
{
|
||||||
LibEntry = (EDA_LibComponentStruct *) PQFirst(&Lib->m_Entries, FALSE);
|
LibEntry = (EDA_LibComponentStruct*) PQFirst( &Lib->m_Entries, FALSE );
|
||||||
while( LibEntry )
|
while( LibEntry )
|
||||||
{
|
{
|
||||||
if ( ! Keys.IsEmpty() )
|
if( !Keys.IsEmpty() )
|
||||||
{
|
{
|
||||||
if( KeyWordOk(Keys, LibEntry->m_KeyWord) ) ii++;
|
if( KeyWordOk( Keys, LibEntry->m_KeyWord ) )
|
||||||
}
|
ii++;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
if( WildCompareString( BufName, LibEntry->m_Name.m_Text, FALSE ) ) ii++;
|
{
|
||||||
}
|
if( WildCompareString( BufName, LibEntry->m_Name.m_Text, FALSE ) )
|
||||||
LibEntry = (EDA_LibComponentStruct *) PQNext(Lib->m_Entries, LibEntry, NULL);
|
ii++;
|
||||||
}
|
}
|
||||||
}
|
LibEntry = (EDA_LibComponentStruct*) PQNext( Lib->m_Entries,
|
||||||
|
LibEntry,
|
||||||
|
NULL );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ii == 0 )
|
if( ii == 0 )
|
||||||
{
|
{
|
||||||
DisplayError(frame, _("No Component found") );
|
DisplayError( frame, _( "No Component found" ) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListNames = (const wxChar**)MyZMalloc( (ii+1) * sizeof(const wxChar*));
|
ListNames = (const wxChar**) MyZMalloc( (ii + 1) * sizeof(const wxChar*) );
|
||||||
for (Lib = g_LibraryList, ii = 0; Lib != NULL; Lib = Lib->m_Pnext)
|
for( Lib = g_LibraryList, ii = 0; Lib != NULL; Lib = Lib->m_Pnext )
|
||||||
{
|
{
|
||||||
/* Examen de la liste des elements */
|
/* Examen de la liste des elements */
|
||||||
LibEntry = (EDA_LibComponentStruct *) PQFirst(&Lib->m_Entries, FALSE);
|
LibEntry = (EDA_LibComponentStruct*) PQFirst( &Lib->m_Entries, FALSE );
|
||||||
while( LibEntry )
|
while( LibEntry )
|
||||||
{
|
{
|
||||||
if ( ! Keys.IsEmpty())
|
if( !Keys.IsEmpty() )
|
||||||
{
|
{
|
||||||
if( KeyWordOk(Keys, LibEntry->m_KeyWord) )
|
if( KeyWordOk( Keys, LibEntry->m_KeyWord ) )
|
||||||
{
|
{
|
||||||
ListNames[ii] = LibEntry->m_Name.m_Text.GetData(); ii++;
|
ListNames[ii] = LibEntry->m_Name.m_Text.GetData(); ii++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( WildCompareString( BufName, LibEntry->m_Name.m_Text, FALSE ) )
|
else if( WildCompareString( BufName, LibEntry->m_Name.m_Text,
|
||||||
{
|
FALSE ) )
|
||||||
ListNames[ii] = LibEntry->m_Name.m_Text; ii++;
|
{
|
||||||
}
|
ListNames[ii] = LibEntry->m_Name.m_Text; ii++;
|
||||||
LibEntry = (EDA_LibComponentStruct *) PQNext(Lib->m_Entries, LibEntry, NULL);
|
}
|
||||||
}
|
LibEntry = (EDA_LibComponentStruct*) PQNext( Lib->m_Entries,
|
||||||
}
|
LibEntry,
|
||||||
|
NULL );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListBox = new WinEDAListBox(frame, _("Selection"), ListNames,
|
ListBox = new WinEDAListBox( frame, _( "Selection" ), ListNames,
|
||||||
wxEmptyString, DisplayCmpDoc, wxColour(200,200,255) );
|
wxEmptyString, DisplayCmpDoc,
|
||||||
ListBox->MoveMouseToOrigin();
|
wxColour( 200, 200, 255 ) );
|
||||||
|
ListBox->MoveMouseToOrigin();
|
||||||
|
|
||||||
/* Affichage de la liste selectionnee */
|
/* Affichage de la liste selectionnee */
|
||||||
if( ii )
|
if( ii )
|
||||||
{
|
{
|
||||||
ii = ListBox->ShowModal(); ListBox->Destroy();
|
ii = ListBox->ShowModal(); ListBox->Destroy();
|
||||||
if ( ii < 0 ) ii = 0;
|
if( ii < 0 )
|
||||||
else
|
ii = 0;
|
||||||
{
|
else
|
||||||
BufName = ListNames[ii];
|
{
|
||||||
ii = 1;
|
BufName = ListNames[ii];
|
||||||
}
|
ii = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
free (ListNames);
|
free( ListNames );
|
||||||
return (ii) ;
|
return ii;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************/
|
/**********************************/
|
||||||
void DisplayCmpDoc(wxString & Name)
|
void DisplayCmpDoc( wxString& Name )
|
||||||
/**********************************/
|
/**********************************/
|
||||||
{
|
{
|
||||||
LibCmpEntry * CmpEntry;
|
LibCmpEntry* CmpEntry;
|
||||||
|
|
||||||
CmpEntry = FindLibPart(Name.GetData(), wxEmptyString, FIND_ALIAS);
|
CmpEntry = FindLibPart( Name.GetData(), wxEmptyString, FIND_ALIAS );
|
||||||
if ( CmpEntry == NULL ) return;
|
if( CmpEntry == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
Name = wxT("Descr: ") + CmpEntry->m_Doc;
|
Name = wxT( "Descr: " ) + CmpEntry->m_Doc;
|
||||||
Name += wxT("\nKeyW: ") + CmpEntry->m_KeyWord;
|
Name += wxT( "\nKeyW: " ) + CmpEntry->m_KeyWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,12 @@
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "dialog_SVG_print_base.h"
|
#include "dialog_SVG_print_base.h"
|
||||||
|
|
||||||
|
|
|
@ -16,18 +16,8 @@
|
||||||
#pragma implementation "dialog_build_BOM.h"
|
#pragma implementation "dialog_build_BOM.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
////@end includes
|
////@end includes
|
||||||
|
|
|
@ -15,21 +15,10 @@
|
||||||
#pragma implementation "dialog_create_component.h"
|
#pragma implementation "dialog_create_component.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -5,12 +5,13 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
#include "dialog_edit_component_in_schematic.h"
|
#include "dialog_edit_component_in_schematic.h"
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "wx/valgen.h"
|
#include "wx/valgen.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -15,22 +15,14 @@
|
||||||
#pragma implementation "dialog_eeschema_config.h"
|
#pragma implementation "dialog_eeschema_config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
////@end includes
|
////@end includes
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -16,27 +16,16 @@
|
||||||
#pragma implementation "dialog_options.h"
|
#pragma implementation "dialog_options.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
////@begin includes
|
////@begin includes
|
||||||
|
|
|
@ -5,9 +5,11 @@
|
||||||
// Set this to 1 if you want to test PostScript printing under MSW.
|
// Set this to 1 if you want to test PostScript printing under MSW.
|
||||||
#define wxTEST_POSTSCRIPT_IN_MSW 1
|
#define wxTEST_POSTSCRIPT_IN_MSW 1
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
|
@ -3,8 +3,14 @@
|
||||||
/*******************************************************/
|
/*******************************************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
@ -13,7 +19,6 @@
|
||||||
#include "worksheet.h"
|
#include "worksheet.h"
|
||||||
#include "hotkeys.h"
|
#include "hotkeys.h"
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
/* Variables locales */
|
/* Variables locales */
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/* Routines Locales */
|
/* Routines Locales */
|
||||||
|
|
|
@ -9,27 +9,15 @@
|
||||||
#pragma implementation "eelayer.h"
|
#pragma implementation "eelayer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For compilers that support precompilation, includes "wx/wx.h".
|
|
||||||
#include "wx/wxprec.h"
|
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
|
||||||
#pragma hdrstop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
|
||||||
#include "wx/wx.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "id.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "id.h"
|
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
#include "eelayer.h" // Header file associated with this file
|
#include "eelayer.h" // Header file associated with this file
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "drawtxt.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "component_class.h"
|
#include "component_class.h"
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "trigo.h"
|
#include "trigo.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
/* Local Functions */
|
/* Local Functions */
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,19 +10,24 @@
|
||||||
#define MAIN
|
#define MAIN
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
#include "appl_wxstruct.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "netlist.h"
|
#include "netlist.h"
|
||||||
#include "worksheet.h"
|
#include "worksheet.h"
|
||||||
#include "trigo.h"
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "eda_dde.h"
|
#include "eda_dde.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
|
#include <wx/snglinst.h>
|
||||||
|
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
wxString g_Main_Title( wxT( "EESchema" ) );
|
wxString g_Main_Title( wxT( "EESchema" ) );
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,16 @@
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "gr_basic.h"
|
#include "gr_basic.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "kicad_string.h"
|
||||||
|
#include "gestfich.h"
|
||||||
|
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "netlist.h"
|
#include "netlist.h"
|
||||||
|
|
||||||
#include "protos.h"
|
#include "protos.h"
|
||||||
|
|
||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "class_drawpanel.h"
|
||||||
|
#include "confirm.h"
|
||||||
|
#include "gestfich.h"
|
||||||
#include "program.h"
|
#include "program.h"
|
||||||
#include "libcmp.h"
|
#include "libcmp.h"
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue