Commit 8c36cbf4 authored by stambaughw's avatar stambaughw
Browse files

Complete comment translation of cvpcb source and fix tool tip capitalization.

parent 56995b33
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
/* CVPCB: autosel.cpp  */
/* CVPCB: autosel.cpp  */
/**********************/
/**********************/


/* Routines de selection automatique des modules */
/* Routines for automatic selection of modules. */


#include "fctsys.h"
#include "fctsys.h"
#include "common.h"
#include "common.h"
@@ -81,7 +81,7 @@ void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event )
    if( m_components.empty() )
    if( m_components.empty() )
        return;
        return;


    /* recherche des equivalences a travers les fichiers possibles */
    /* Find equivalents in all available files. */
    for( ii = 0; ii < m_AliasLibNames.GetCount(); ii++ )
    for( ii = 0; ii < m_AliasLibNames.GetCount(); ii++ )
    {
    {
        fn = m_AliasLibNames[ii];
        fn = m_AliasLibNames[ii];
@@ -106,7 +106,6 @@ found in the default search paths." ),
            continue;
            continue;
        }
        }


        /* lecture fichier n */
        while( GetLine( file, Line, NULL, sizeof(Line) ) != NULL )
        while( GetLine( file, Line, NULL, sizeof(Line) ) != NULL )
        {
        {
            char* text = Line;
            char* text = Line;
@@ -133,7 +132,7 @@ found in the default search paths." ),
        fclose( file );
        fclose( file );
    }
    }


    /* Display the number of footpint aliases.  */
    /* Display the number of footprint aliases.  */
    msg.Printf( _( "%d footprint aliases found." ), aliases.size() );
    msg.Printf( _( "%d footprint aliases found." ), aliases.size() );
    SetStatusText( msg, 0 );
    SetStatusText( msg, 0 );


+9 −16
Original line number Original line Diff line number Diff line
/***************************************/
/*************/
/** cfg.cpp : configuration de CVPCB  **/
/** cfg.cpp **/
/***************************************/
/*************/

/* lit ou met a jour la configuration de CVPCB */


#include "fctsys.h"
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "appl_wxstruct.h"
@@ -52,20 +50,19 @@ PARAM_CFG_ARRAY& WinEDA_CvpcbFrame::GetProjectFileParameters( void )




/**
/**
 * lit la configuration
 * Reads the configuration
 * 1 - lit cvpcb.cnf
 * 1 - bed cvpcb.cnf
 * 2 - si non trouve lit <chemin de cvpcb.exe>/cvpcb.cnf
 * 2 - if not in path of  <cvpcb.exe> / cvpcb.cnf
 * 3 - si non trouve: init des variables aux valeurs par defaut
 * 3 - If not found: init variables to default values
 *
 *
 * Remarque:
 * Note:
 * le chemin de l'executable cvpcb.exe doit etre dans BinDir
 * The path of the executable must be in cvpcb.exe.
 *
 *
 */
 */
void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName )
void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName )
{
{
    wxFileName fn = FileName;
    wxFileName fn = FileName;


    /* Init des valeurs par defaut */
    m_ModuleLibNames.Clear();
    m_ModuleLibNames.Clear();
    m_AliasLibNames.Clear();
    m_AliasLibNames.Clear();


@@ -85,9 +82,6 @@ void WinEDA_CvpcbFrame::LoadProjectFile( const wxString& FileName )
}
}




/* fonction relai d'appel a Save_Config,
 * la vraie fonction de sauvegarde de la config
 */
void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event )
void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event )
{
{
    SaveProjectFile( m_NetlistFileName.GetFullPath() );
    SaveProjectFile( m_NetlistFileName.GetFullPath() );
@@ -106,7 +100,6 @@ void WinEDA_CvpcbFrame::SaveProjectFile( const wxString& fileName )
    if( dlg.ShowModal() == wxID_CANCEL )
    if( dlg.ShowModal() == wxID_CANCEL )
        return;
        return;


    /* ecriture de la configuration */
    wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
    wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
                                   GetProjectFileParameters() );
                                   GetProjectFileParameters() );
}
}
+2 −2
Original line number Original line Diff line number Diff line
@@ -10,8 +10,8 @@


PIN::PIN()
PIN::PIN()
{
{
    m_Index = 0;         /* variable utilisee selon types de netlistes */
    m_Index = 0;         /* Variable used by types of netlists. */
    m_Type = 0;          /* code type electrique ( Entree Sortie Passive..) */
    m_Type = 0;          /* Electrical type. */
}
}


bool operator<( const PIN& item1, const PIN& item2 )
bool operator<( const PIN& item1, const PIN& item2 )
+67 −112
Original line number Original line Diff line number Diff line
@@ -26,9 +26,6 @@ static const wxString KeepCvpcbOpenEntry( wxT( "KeepCvpcbOpen" ) );
static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) );
static const wxString FootprintDocFileEntry( wxT( "footprints_doc_file" ) );




/*************************************/
/* Event table for WinEDA_CvpcbFrame */
/*************************************/
BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
    EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList )
    EVT_MENU_RANGE( wxID_FILE1, wxID_FILE9, WinEDA_CvpcbFrame::LoadNetList )


@@ -99,11 +96,8 @@ BEGIN_EVENT_TABLE( WinEDA_CvpcbFrame, WinEDA_BasicFrame )
                   WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave )
                   WinEDA_CvpcbFrame::OnUpdateKeepOpenOnSave )
END_EVENT_TABLE()
END_EVENT_TABLE()



WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title,
/*******************************************************/
                                      long            style ) :
/* Constructeur de WinEDA_CvpcbFrame: la fenetre generale */
/*******************************************************/
WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long  style ) :
    WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition,
    WinEDA_BasicFrame( NULL, CVPCB_FRAME, title, wxDefaultPosition,
                       wxDefaultSize, style )
                       wxDefaultSize, style )
{
{
@@ -151,13 +145,11 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
    ReCreateMenuBar();
    ReCreateMenuBar();
    ReCreateHToolbar();
    ReCreateHToolbar();


    // Creation des listes de modules disponibles et des composants du schema
    // Create list of available modules and components of the schematic
    // Create child subwindows.
    BuildCmpListBox();
    BuildCmpListBox();
    BuildFOOTPRINTS_LISTBOX();
    BuildFOOTPRINTS_LISTBOX();


    /* Creation des contraintes de dimension de la fenetre d'affichage des
    /* Create size constraints of the component list window display. */
     * composants du schema */
    wxLayoutConstraints* linkpos = new wxLayoutConstraints;
    wxLayoutConstraints* linkpos = new wxLayoutConstraints;
    linkpos->top.SameAs( this, wxTop );
    linkpos->top.SameAs( this, wxTop );
    linkpos->bottom.SameAs( this, wxBottom );
    linkpos->bottom.SameAs( this, wxBottom );
@@ -166,8 +158,7 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
    if( m_ListCmp )
    if( m_ListCmp )
        m_ListCmp->SetConstraints( linkpos );
        m_ListCmp->SetConstraints( linkpos );


    /* Creation des contraintes de dimension de la fenetre d'affichage des
    /* Create size constraints for the footprint display window. */
     * modules de la librairie */
    linkpos = new wxLayoutConstraints;
    linkpos = new wxLayoutConstraints;
    linkpos->top.SameAs( m_ListCmp, wxTop );
    linkpos->top.SameAs( m_ListCmp, wxTop );
    linkpos->bottom.SameAs( m_ListCmp, wxBottom );
    linkpos->bottom.SameAs( m_ListCmp, wxBottom );
@@ -202,7 +193,8 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
                      wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top() );
                      wxAuiPaneInfo( horiz ).Name( wxT( "m_HToolBar" ) ).Top() );


    m_auimgr.AddPane( m_FootprintList,
    m_auimgr.AddPane( m_FootprintList,
        wxAuiPaneInfo(horiz).Name(wxT("m_FootprintList")).Left().BestSize(m_FrameSize.x * 0.3 ,m_FrameSize.y * 0.9));
                      wxAuiPaneInfo( horiz ).Name( wxT( "m_FootprintList" ) ).
                      Left().BestSize( m_FrameSize.x * 0.3, m_FrameSize.y * 0.9 ) );


    m_auimgr.AddPane( m_ListCmp,
    m_auimgr.AddPane( m_ListCmp,
                      wxAuiPaneInfo().Name( wxT( "m_ListCmp" ) ).CentrePane() );
                      wxAuiPaneInfo().Name( wxT( "m_ListCmp" ) ).CentrePane() );
@@ -212,9 +204,7 @@ WinEDA_CvpcbFrame::WinEDA_CvpcbFrame( const wxString& title, long style ) :
}
}




/******************************************/
WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
WinEDA_CvpcbFrame::~WinEDA_CvpcbFrame()
/******************************************/
{
{
    wxConfig* config = wxGetApp().m_EDA_Config;
    wxConfig* config = wxGetApp().m_EDA_Config;


@@ -268,25 +258,19 @@ void WinEDA_CvpcbFrame::SaveSettings()
}
}




/************************************************/
void WinEDA_CvpcbFrame::OnSize( wxSizeEvent& event )
void WinEDA_CvpcbFrame::OnSize( wxSizeEvent& event )
/************************************************/
{
{
    event.Skip();
    event.Skip();
}
}




/******************************************************/
void WinEDA_CvpcbFrame::OnQuit( wxCommandEvent& event )
void WinEDA_CvpcbFrame::OnQuit( wxCommandEvent& event )
/******************************************************/
{
{
    Close( TRUE );
    Close( TRUE );
}
}




/**********************************************************/
void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
/**********************************************************/
{
{
    int diag;
    int diag;


@@ -296,7 +280,8 @@ void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
        wxMessageDialog dialog( this,
        wxMessageDialog dialog( this,
                                _( "Net and component list modified.\nSave before exit ?" ),
                                _( "Net and component list modified.\nSave before exit ?" ),
                                _( "Confirmation" ),
                                _( "Confirmation" ),
                                wxYES_NO | wxCANCEL | wxICON_EXCLAMATION | wxYES_DEFAULT );
                                wxYES_NO | wxCANCEL | wxICON_EXCLAMATION |
                                wxYES_DEFAULT );


        ii = dialog.ShowModal();
        ii = dialog.ShowModal();


@@ -330,7 +315,8 @@ void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
    // Close the help frame
    // Close the help frame
    if( wxGetApp().m_HtmlCtrl )
    if( wxGetApp().m_HtmlCtrl )
    {
    {
        if( wxGetApp().m_HtmlCtrl->GetFrame() )  // returns NULL if no help frame active
        if( wxGetApp().m_HtmlCtrl->GetFrame() )  // returns NULL if no help
                                                 // frame active
            wxGetApp().m_HtmlCtrl->GetFrame()->Close( TRUE );
            wxGetApp().m_HtmlCtrl->GetFrame()->Close( TRUE );
    }
    }


@@ -346,9 +332,7 @@ void WinEDA_CvpcbFrame::OnCloseWindow( wxCloseEvent& Event )
}
}




/************************************************/
void WinEDA_CvpcbFrame::OnChar( wxKeyEvent& event )
void WinEDA_CvpcbFrame::OnChar( wxKeyEvent& event )
/************************************************/
{
{
    switch( event.GetKeyCode() )
    switch( event.GetKeyCode() )
    {
    {
@@ -369,9 +353,7 @@ void WinEDA_CvpcbFrame::OnChar( wxKeyEvent& event )
}
}




/*******************************************************/
void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
/*******************************************************/
{
{
    int ii = 0;
    int ii = 0;
    int selection;
    int selection;
@@ -384,8 +366,7 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
    if( selection < 0 )
    if( selection < 0 )
        selection = 0;
        selection = 0;


    BOOST_FOREACH( COMPONENT& component, m_components )
    BOOST_FOREACH( COMPONENT & component, m_components ) {
    {
        if( component.m_Module.IsEmpty() && ii > selection )
        if( component.m_Module.IsEmpty() && ii > selection )
        {
        {
            m_ListCmp->SetSelection( ii );
            m_ListCmp->SetSelection( ii );
@@ -400,9 +381,7 @@ void WinEDA_CvpcbFrame::ToFirstNA( wxCommandEvent& event )
}
}




/**********************************************************/
void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
/**********************************************************/
{
{
    int ii;
    int ii;
    int selection;
    int selection;
@@ -431,9 +410,7 @@ void WinEDA_CvpcbFrame::ToPreviousNA( wxCommandEvent& event )
}
}




/**********************************************************/
void WinEDA_CvpcbFrame::SaveQuitCvpcb( wxCommandEvent& event )
void WinEDA_CvpcbFrame::SaveQuitCvpcb( wxCommandEvent& event )
/**********************************************************/
{
{
    if( SaveNetList( wxEmptyString ) > 0 )
    if( SaveNetList( wxEmptyString ) > 0 )
    {
    {
@@ -444,12 +421,10 @@ void WinEDA_CvpcbFrame::SaveQuitCvpcb( wxCommandEvent& event )
}
}




/*************************************************************/
/* Removes all associations already made
void WinEDA_CvpcbFrame::DelAssociations( wxCommandEvent& event )
/*************************************************************/

/* Supprime toutes les associations deja faites
 */
 */

void WinEDA_CvpcbFrame::DelAssociations( wxCommandEvent& event )
{
{
    wxString Line;
    wxString Line;


@@ -529,11 +504,10 @@ void WinEDA_CvpcbFrame::LoadNetList( wxCommandEvent& event )
}
}




/***********************************************************/
void WinEDA_CvpcbFrame::ConfigCvpcb( wxCommandEvent& event )
void WinEDA_CvpcbFrame::ConfigCvpcb( wxCommandEvent& event )
/***********************************************************/
{
{
    DIALOG_CVPCB_CONFIG ConfigFrame( this );
    DIALOG_CVPCB_CONFIG ConfigFrame( this );

    ConfigFrame.ShowModal();
    ConfigFrame.ShowModal();
}
}


@@ -544,13 +518,7 @@ void WinEDA_CvpcbFrame::OnKeepOpenOnSave( wxCommandEvent& event )
}
}




/************************************************************/
void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
/************************************************************/

/* Fonction liee au boutton "Visu"
 *  Affiche l'ecran de visualisation des modules
 */
{
{
    CreateScreenCmp();
    CreateScreenCmp();
    DrawFrame->AdjustScrollBars();
    DrawFrame->AdjustScrollBars();
@@ -558,9 +526,7 @@ void WinEDA_CvpcbFrame::DisplayModule( wxCommandEvent& event )
}
}




/********************************************************/
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
/********************************************************/
{
{
    int id = event.GetId();
    int id = event.GetId();


@@ -571,34 +537,26 @@ void WinEDA_CvpcbFrame::SetLanguage( wxCommandEvent& event )
}
}




/*************************************************************/
void WinEDA_CvpcbFrame::DisplayDocFile( wxCommandEvent& event )
void WinEDA_CvpcbFrame::DisplayDocFile( wxCommandEvent& event )
/*************************************************************/
{
{
    GetAssociatedDocument( this, m_DocModulesFileName,
    GetAssociatedDocument( this, m_DocModulesFileName,
                           &wxGetApp().GetLibraryPathList() );
                           &wxGetApp().GetLibraryPathList() );
}
}




/******************************************************/
void WinEDA_CvpcbFrame::OnLeftClick( wxListEvent& event )
void WinEDA_CvpcbFrame::OnLeftClick( wxListEvent& event )
/******************************************************/
{
{
    m_FootprintList->OnLeftClick( event );
    m_FootprintList->OnLeftClick( event );
}
}




/******************************************************/
void WinEDA_CvpcbFrame::OnLeftDClick( wxListEvent& event )
void WinEDA_CvpcbFrame::OnLeftDClick( wxListEvent& event )
/******************************************************/
{
{
    m_FootprintList->OnLeftDClick( event );
    m_FootprintList->OnLeftDClick( event );
}
}




/*************************************************************/
void WinEDA_CvpcbFrame::OnSelectComponent( wxListEvent& event )
void WinEDA_CvpcbFrame::OnSelectComponent( wxListEvent& event )
/*************************************************************/
{
{
    int selection;
    int selection;


@@ -626,12 +584,9 @@ void WinEDA_CvpcbFrame::OnSelectComponent( wxListEvent& event )
}
}




/************************************************************************/
void WinEDA_CvpcbFrame::OnSelectFilteringFootprint( wxCommandEvent& event )
/************************************************************************/

/* Select full/filtered footprint display on tool click
/* Select full/filtered footprint display on tool click
 */
 */
void WinEDA_CvpcbFrame::OnSelectFilteringFootprint( wxCommandEvent& event )
{
{
    wxListEvent l_event;
    wxListEvent l_event;


+22 −23
Original line number Original line Diff line number Diff line
/**********************************************/
/*********/
/* CVPCB : declaration des variables globales */
/* CVPCB */
/**********************************************/
/*********/


#ifndef __CVPCB_H__
#ifndef __CVPCB_H__
#define __CVPCB_H__
#define __CVPCB_H__
@@ -11,7 +11,7 @@
#include <boost/foreach.hpp>
#include <boost/foreach.hpp>




// config for footprints doc file acces
// config for footprints doc file access
#define DEFAULT_FOOTPRINTS_LIST_FILENAME wxT( "footprints_doc/footprints.pdf" )
#define DEFAULT_FOOTPRINTS_LIST_FILENAME wxT( "footprints_doc/footprints.pdf" )


// Define print format to display a schematic component line
// Define print format to display a schematic component line
@@ -19,7 +19,7 @@


#define FILTERFOOTPRINTKEY "FilterFootprint"
#define FILTERFOOTPRINTKEY "FilterFootprint"


/* Types de netliste: */
/* Net list types. */
#define TYPE_NON_SPECIFIE  0
#define TYPE_NON_SPECIFIE  0
#define TYPE_ORCADPCB2     1
#define TYPE_ORCADPCB2     1
#define TYPE_PCAD          2
#define TYPE_PCAD          2
@@ -30,12 +30,12 @@
class PIN
class PIN
{
{
public:
public:
    int       m_Index;     /* variable utilisee selon types de netlistes */
    int       m_Index;     /* Type of net list. */
    int       m_Type;      /* code type electrique ( Entree Sortie Passive..) */
    int       m_Type;      /* Electrical connection type. */
    wxString  m_Net;       /* Pointeur sur le texte nom de net */
    wxString  m_Net;       /* Name of net. */
    wxString  m_Number;
    wxString  m_Number;
    wxString  m_Name;
    wxString  m_Name;
    wxString  m_Repere;    /* utilise selon formats de netliste */
    wxString  m_Repere;    /* Formats used by net lister. */


    PIN();
    PIN();
};
};
@@ -55,14 +55,14 @@ extern bool same_pin_net( const PIN* item1, const PIN* item2 );
class COMPONENT
class COMPONENT
{
{
public:
public:
    int           m_Num;       /* Numero d'ordre */
    int           m_Num;       /* Component number. */
    int           m_Multi;     /* Nombre d' unites par boitier */
    int           m_Multi;     /* Part if component has multiple parts. */
    PIN_LIST      m_Pins;      /* pointeur sur la liste des Pins */
    PIN_LIST      m_Pins;      /* List of component pins. */
    wxString      m_Reference; /* U3, R5  ... */
    wxString      m_Reference; /* Reference designator: U3, R5  ... */
    wxString      m_Value;     /* 7400, 47K ... */
    wxString      m_Value;     /* Value: 7400, 47K ... */
    wxString      m_TimeStamp; /* Signature temporelle ("00000000" si absente) */
    wxString      m_TimeStamp; /* Time stamp ("00000000" if absent) */
    wxString      m_Module;    /* Nom du module (Package) corresp */
    wxString      m_Module;    /* Footprint (module) name. */
    wxString      m_Repere;    /* utilise selon formats de netliste */
    wxString      m_Repere;    /* Net list format */
    wxArrayString m_FootprintFilter;  /* List of allowed footprints (wildcards
    wxArrayString m_FootprintFilter;  /* List of allowed footprints (wildcards
                                       * allowed ). If empty: no filtering */
                                       * allowed ). If empty: no filtering */


@@ -79,11 +79,11 @@ extern bool operator<( const COMPONENT& item1, const COMPONENT& item2 );
class FOOTPRINT
class FOOTPRINT
{
{
public:
public:
    wxString  m_Module;     /* Nom du module */
    wxString  m_Module;     /* Module name. */
    wxString  m_LibName;    /* Nom de la librairie contenant ce module */
    wxString  m_LibName;    /* Name of the library containing this module. */
    int       m_Num;        /* Numero d'ordre pour affichage sur la liste */
    int       m_Num;        /* Order number in the display list. */
    wxString  m_Doc;        /* Doc associee */
    wxString  m_Doc;        /* Footprint description. */
    wxString  m_KeyWord;    /* Mots cles associes */
    wxString  m_KeyWord;    /* Footprint key words. */


    FOOTPRINT();
    FOOTPRINT();
};
};
@@ -93,7 +93,6 @@ typedef boost::ptr_vector< FOOTPRINT > FOOTPRINT_LIST;
/* FOOTPRINT object list sort function. */
/* FOOTPRINT object list sort function. */
extern bool operator<( const FOOTPRINT& item1, const FOOTPRINT& item2 );
extern bool operator<( const FOOTPRINT& item1, const FOOTPRINT& item2 );


/* Gestion des noms des librairies */
extern const wxString FootprintAliasFileExtension;
extern const wxString FootprintAliasFileExtension;
extern const wxString RetroFileExtension;
extern const wxString RetroFileExtension;
extern const wxString ComponentFileExtension;
extern const wxString ComponentFileExtension;
Loading