Commit 8080a2c9 authored by charras's avatar charras

code cleaning and a bug in eeschema (print all not working) solved

parent 5a27f272
......@@ -5,6 +5,15 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
email address.
2008-Juil-31 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+eeschema:
Added component sheet X,Y location in BOM.
Netlist generation: now spaces in names are replaced by '_' for pcbnew (which does not accept spaces)
Bug: print all pages did not work.
Please note in complex hierarchy, the current "Print All" function needs to be enhanced,
because it does not draw all sheets but only all different sheets
2008-Jule-08 UPDATE Andrey Fedorushkov <andrf@mail.ru>
================================================================================
+pcbnew:
......
......@@ -30,18 +30,18 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
wxString Line;
Ki_WorkSheetData* WsItem;
int scale = m_InternalUnits / 1000;
wxSize size( SIZETEXT* scale, SIZETEXT* scale );
wxSize size_ref( SIZETEXT_REF* scale, SIZETEXT_REF* scale );
wxSize size( SIZETEXT * scale, SIZETEXT * scale );
wxSize size_ref( SIZETEXT_REF * scale, SIZETEXT_REF * scale );
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
Color = RED;
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: m_CurrentSheet NULL" ) );
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) );
return;
}
......@@ -315,6 +315,61 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
}
/************************************************************************************************/
wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition )
/************************************************************************************************/
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
*/
{
Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc;
int ii, xg, yg, ipas, gxpas, gypas;
int refx, refy;
wxString msg;
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) );
return msg;
}
refx = Sheet->m_LeftMargin;
refy = Sheet->m_TopMargin; /* Upper left corner */
xg = Sheet->m_Size.x - Sheet->m_RightMargin;
yg = Sheet->m_Size.y - Sheet->m_BottomMargin; /* lower right corner */
/* Get the Y axis identifier (A symbol A ... Z) */
if( aPosition.y < refy || aPosition.y > yg ) // Ouside of Y limits
msg << wxT( "?" );
else
{
ipas = (yg - refy) / PAS_REF; // ipas = Y count sections
gypas = ( yg - refy) / ipas; // gypas = Y section size
ii = (aPosition.y - refy) / gypas;
msg.Printf( wxT( "%c" ), 'A' + ii );
}
/* Get the X axis identifier (A number 1 ... n) */
if( aPosition.x < refx || aPosition.x > xg ) // Ouside of X limits
msg << wxT( "?" );
else
{
ipas = (xg - refx) / PAS_REF; // ipas = X count sections
gxpas = ( xg - refx) / ipas; // gxpas = X section size
ii = (aPosition.x - refx) / gxpas;
msg << ii + 1;
}
return msg;
}
/*********************************************************************/
wxString WinEDA_DrawFrame::GetScreenDesc()
/*********************************************************************/
......
/****************/
/* rdpcad() */
/***************/
/****************/
/* rdpcad() */
/***************/
/* convertit la netliste PCAD en netliste standard (fichier temporaire)
assure la reaffectation des alimentations selon le format :
{I VALEUR<SEPARATEUR>(pin1,pin2,...=newalim).PRT ID
*/
* assure la reaffectation des alimentations selon le format :
* {I VALEUR<SEPARATEUR>(pin1,pin2,...=newalim).PRT ID
*/
#include "fctsys.h"
......@@ -18,257 +18,296 @@ assure la reaffectation des alimentations selon le format :
#define SEPARATEUR '|'
/* routines locales : */
int pin() ;
int pin();
/***************************************/
int WinEDA_CvpcbFrame::rdpcad()
/***************************************/
{
int i , j , k ,l ;
char Line[1024];
char label[80] ; /* buffer des references composants */
char val[80] ; /* buffer des valeurs */
char *ptchar ; /* pointeur de service */
STORECMP * Cmp;
modified = 0;
Rjustify = 0;
/* Raz buffer et variable de gestion */
if( g_BaseListeCmp ) FreeMemoryComponants();
/* Ouverture du fichier source */
source = wxFopen(FFileName, wxT("rt"));
if (source == 0)
{
wxString msg;
msg.Printf( _("File <%s> not found"),FFileName.GetData());
DisplayError(this, msg); return(-1);
}
/* Lecture entete qui doit etre "{COMPONENT ORCAD.PCB" ou "{ OrCAD PCB"*/
fgets(Line,255,source) ;
i = strncmp(Line,"{COMPONENT ORCAD.PCB",9) ; /* net type PCAD */
if ( i != 0 )
{
wxString msg, Lineconv = CONV_FROM_UTF8(Line);
msg.Printf( _("Unknown file format <%s>"), Lineconv.GetData());
DisplayError(this, msg);
fclose(source); return(-3) ;
}
SetStatusText( _("Netlist Format: Pcad"), 0);
/* Lecture de la liste */
for ( ;; )
{
/* recherche du debut de la description d'un composant */
if ( fgets(Line,80,source) == 0 ) break ;
/* suppression des blancs en d‚but de ligne */
i = 0 ; while (Line[i] == ' ') i++ ;
/* elimination des lignes vides : */
if (Line[i] < ' ') continue ;
if (strncmp(&Line[i],"{I",2) != 0) continue ;
/****************************/
/* debut description trouv‚ */
/****************************/
i += 3 ; /* i pointe le 1er caractere de la valeur du composant */
for (j = 0 ; j < 20 ; j++)
{
label[j] = 0 ; val[j] = ' ' ;
}
val[16] = 0 ;
for (j =0 ; j < 80 ; j++) alim[j] = 0 ;
/* lecture valeur du composant ( toujours r‚ecrire sur 8 caracteres) */
/* recherche fin de valeur (.PRT) */
ptchar = strstr(Line,".PRT") ;
if (ptchar == 0)
{
sprintf(cbuf,"Netlist error: %s\n",Line) ;
// Affiche_Message(cbuf) ;
}
k = ptchar - Line ;
for (j = 0 ; i < k ; i++)
{
if ( Line[i] == SEPARATEUR ) break ;
if ( j < 8 ) val[j++] = Line[i] ;
}
if ( (Line[++i] == '(') && (Line[k-1] == ')' ) )
{
i++ ; l = 0 ; while ( k-1 > i ) alim[l++] = Line[i++] ;
}
else i = k ;
/* recherche reference du composant */
while(Line[i] != ' ') i++ ; /* elimination fin valeur */
while(Line[i] == ' ') i++ ; /* recherche debut reference */
/* debut reference trouv‚ */
for ( k = 0 ; k < 8 ; i++ , k++ )
{
if ( Line[i] <= ' ' ) break ;
label[k] = Line[i] ;
}
/* classement du composant ,suivi de sa valeur */
Cmp = new STORECMP();
Cmp->Pnext = g_BaseListeCmp;
g_BaseListeCmp = Cmp;
Cmp->m_Reference = CONV_FROM_UTF8(label);
Cmp->m_Valeur = CONV_FROM_UTF8(val);
pin() ;
nbcomp++ ;
}
fclose(source);
/* reclassement alpab‚tique : */
g_BaseListeCmp = TriListeComposantss( g_BaseListeCmp, nbcomp);
return(0);
int i, j, k, l;
char Line[1024];
char label[80]; /* buffer des references composants */
char val[80]; /* buffer des valeurs */
char* ptchar; /* pointeur de service */
STORECMP* Cmp;
modified = 0;
Rjustify = 0;
/* Raz buffer et variable de gestion */
if( g_BaseListeCmp )
FreeMemoryComponants();
/* Ouverture du fichier source */
source = wxFopen( FFileName, wxT( "rt" ) );
if( source == 0 )
{
wxString msg;
msg.Printf( _( "File <%s> not found" ), FFileName.GetData() );
DisplayError( this, msg ); return -1;
}
/* Lecture entete qui doit etre "{COMPONENT ORCAD.PCB" ou "{ OrCAD PCB"*/
fgets( Line, 255, source );
i = strncmp( Line, "{COMPONENT ORCAD.PCB", 9 ); /* net type PCAD */
if( i != 0 )
{
wxString msg, Lineconv = CONV_FROM_UTF8( Line );
msg.Printf( _( "Unknown file format <%s>" ), Lineconv.GetData() );
DisplayError( this, msg );
fclose( source ); return -3;
}
SetStatusText( _( "Netlist Format: Pcad" ), 0 );
/* Lecture de la liste */
for( ; ; )
{
/* recherche du debut de la description d'un composant */
if( fgets( Line, 80, source ) == 0 )
break;
/* suppression des blancs en d‚but de ligne */
i = 0; while( Line[i] == ' ' )
i++;
/* elimination des lignes vides : */
if( Line[i] < ' ' )
continue;
if( strncmp( &Line[i], "{I", 2 ) != 0 )
continue;
/****************************/
/* debut description trouv‚ */
/****************************/
i += 3; /* i pointe le 1er caractere de la valeur du composant */
for( j = 0; j < 20; j++ )
{
label[j] = 0; val[j] = ' ';
}
val[16] = 0;
for( j = 0; j < 80; j++ )
alim[j] = 0;
/* lecture valeur du composant ( toujours reecrire sur 8 caracteres) */
/* recherche fin de valeur (.PRT) */
ptchar = strstr( Line, ".PRT" );
if( ptchar == 0 )
{
//Netlist error: todo: display a message error
}
k = ptchar - Line;
for( j = 0; i < k; i++ )
{
if( Line[i] == SEPARATEUR )
break;
if( j < 8 )
val[j++] = Line[i];
}
if( (Line[++i] == '(') && (Line[k - 1] == ')' ) )
{
i++; l = 0; while( k - 1 > i )
alim[l++] = Line[i++];
}
else
i = k;
/* recherche reference du composant */
while( Line[i] != ' ' )
i++; /* elimination fin valeur */
while( Line[i] == ' ' )
i++; /* recherche debut reference */
/* debut reference trouv‚ */
for( k = 0; k < 8; i++, k++ )
{
if( Line[i] <= ' ' )
break;
label[k] = Line[i];
}
/* classement du composant ,suivi de sa valeur */
Cmp = new STORECMP();
Cmp->Pnext = g_BaseListeCmp;
g_BaseListeCmp = Cmp;
Cmp->m_Reference = CONV_FROM_UTF8( label );
Cmp->m_Valeur = CONV_FROM_UTF8( val );
pin();
nbcomp++;
}
fclose( source );
/* reclassement alpab‚tique : */
g_BaseListeCmp = TriListeComposantss( g_BaseListeCmp, nbcomp );
return 0;
}
/***********************************/
/* pin() : analyse liste des pines */
/***********************************/
/***********************************/
/* pin() : analyse liste des pines */
/***********************************/
int pin()
{
int i , j , k ;
char numpin[9] , net[9] ;
char Line[1024];
for ( ;; )
{
/* recherche du debut de la description des pins d'un composant */
if ( fgets(Line,80,source) == 0 ) return(-1) ;
/* suppression des blancs en d‚but de ligne */
i = 0 ; while (Line[i] == ' ') i++ ;
/* elimination des lignes vides : */
if (Line[i] < ' ') continue ;
if (strncmp(&Line[i],"{CN",3) != 0) continue ;
/* debut description trouv‚ */
for ( ;; )
{
if ( fgets(Line,80,source) == 0 ) return(-1) ;
/* suppression des blancs en d‚but de ligne */
i = 0 ; while (Line[i] == ' ') i++ ;
/* elimination des lignes vides : */
if (Line[i] < ' ') continue ;
/* fin de description ? */
if (Line[i] == '}' ) return(0) ;
memset( net, 0, sizeof(net) ) ;
memset( numpin, 0, sizeof(numpin) ) ;
/* lecture name pin , 4 lettres */
for (j = 0 ; j < 4 ; j++ , i++)
{
if ( Line[i] == ' ' ) break ;
numpin[j] = Line[i] ;
}
j = 0 ;
/* recherche affectation forc‚e de net */
if ( reaffect(&numpin[j],net) != 0)
{
int i, j, k;
char numpin[9], net[9];
char Line[1024];
for( ; ; )
{
/* recherche du debut de la description des pins d'un composant */
if( fgets( Line, 80, source ) == 0 )
return -1;
/* suppression des blancs en d‚but de ligne */
i = 0; while( Line[i] == ' ' )
i++;
/* elimination des lignes vides : */
if( Line[i] < ' ' )
continue;
if( strncmp( &Line[i], "{CN", 3 ) != 0 )
continue;
/* debut description trouv‚ */
for( ; ; )
{
if( fgets( Line, 80, source ) == 0 )
return -1;
/* suppression des blancs en d‚but de ligne */
i = 0; while( Line[i] == ' ' )
i++;
/* elimination des lignes vides : */
if( Line[i] < ' ' )
continue;
/* fin de description ? */
if( Line[i] == '}' )
return 0;
memset( net, 0, sizeof(net) );
memset( numpin, 0, sizeof(numpin) );
/* lecture name pin , 4 lettres */
for( j = 0; j < 4; j++, i++ )
{
if( Line[i] == ' ' )
break;
numpin[j] = Line[i];
}
j = 0;
/* recherche affectation forc‚e de net */
if( reaffect( &numpin[j], net ) != 0 )
{
// fprintf(dest,"%s:%s\n",&numpin[j],net) ;
continue ;
}
continue;
}
/* recherche netname */
while( Line[i] == ' ' )
i++; /* recherche debut reference */
/* recherche netname */
while(Line[i] == ' ') i++ ; /* recherche debut reference */
/* debut netname trouv‚ */
for( k = 0; k < 8; i++, k++ )
{
if( Line[i] <= ' ' )
break;
net[k] = Line[i];
}
/* debut netname trouv‚ */
for ( k = 0 ; k < 8 ; i++ , k++ )
{
if ( Line[i] <= ' ' ) break ;
net[k] = Line[i] ;
}
/* les pins non connect‚es sont ‚limin‚es :*/
if (net[0] == '?' ) continue ;
/* les pins non connect‚es sont ‚limin‚es :*/
if( net[0] == '?' )
continue;
// fprintf(dest,"%s:%s\n",&numpin[j],net) ;
}
}
}
}
}
/**************************************/
int reaffect( char *ib, char *net)
int reaffect( char* ib, char* net )
/**************************************/
/* force un nom de net pour une pine
ib = reference de pin , net = nouveau net ; alim = ligne de consigne
*/
/* force un nom de net pour une pin
* ib = reference de pin , net = nouveau net ; alim = ligne de consigne
*/
{
char *pt , *pt0 , npin[12] ;
int i ;
pt = alim ;
while (*pt != 0 )
{
memset( npin, 0, sizeof(npin) ) ;
/* recherche separateur (':' ou ',') */
while ( (*pt != ':') && (*pt != ',') )
{
pt++ ; if (*pt == 0 ) return(0) ;
}
/* suppression des blancs eventuels */
pt0 = pt ; /* save position du nom du net */
pt0-- ; while (*pt0 == ' ') pt0-- ;
for (i = 3 ; i >= 0 ; i-- )
{
if ( (*pt0 == ',') || (*pt0 ==' ')) break ;
npin[i] = *pt0 ;
if (pt0 == alim) break ;
pt0-- ;
}
while ( npin[0] == ' ' ) /* suppression des espaces a gauche */
{
npin[0] = npin[1] ;
npin[1] = npin[2] ;
npin[2] = npin[3] ;
npin[3] = ' ' ;
}
if (strncmp(npin,ib,4) == 0 ) /* pin trouv‚e */
{
pt++ ; while ((*pt == ' ' ) && (*pt != 0 )) pt++ ;
i = 0 ;
while ((*pt != 0) && (*pt != ',') && ( i < 8 ) )
{
net[i++] = *pt++ ;
}
net[i] = 0 ;
return(1) ;
}
pt++ ;
}
return(0) ;
char* pt, * pt0, npin[12];
int i;
pt = alim;
while( *pt != 0 )
{
memset( npin, 0, sizeof(npin) );
/* recherche separateur (':' ou ',') */
while( (*pt != ':') && (*pt != ',') )
{
pt++; if( *pt == 0 )
return 0;
}
/* suppression des blancs eventuels */
pt0 = pt; /* save position du nom du net */
pt0--; while( *pt0 == ' ' )
pt0--;
for( i = 3; i >= 0; i-- )
{
if( (*pt0 == ',') || (*pt0 ==' ') )
break;
npin[i] = *pt0;
if( pt0 == alim )
break;
pt0--;
}
while( npin[0] == ' ' ) /* suppression des espaces a gauche */
{
npin[0] = npin[1];
npin[1] = npin[2];
npin[2] = npin[3];
npin[3] = ' ';
}
if( strncmp( npin, ib, 4 ) == 0 ) /* pin trouv‚e */
{
pt++; while( (*pt == ' ' ) && (*pt != 0 ) )
pt++;
i = 0;
while( (*pt != 0) && (*pt != ',') && ( i < 8 ) )
{
net[i++] = *pt++;
}
net[i] = 0;
return 1;
}
pt++;
}
return 0;
}
......@@ -57,7 +57,7 @@ int WinEDA_CvpcbFrame::ReadSchematicNetlist()
/* Read the file header (must be "( { OrCAD PCB" or "({ OrCAD PCB" )
* or "# EESchema Netliste"
*/
fgets( Line, 255, source );
fgets( Line, BUFFER_CHAR_SIZE, source );
/* test for netlist type PCB2 */
i = strnicmp( Line, "( {", 3 );
if( i != 0 )
......@@ -310,7 +310,7 @@ int ReadPinConnection( STORECMP* Cmp )
memset( net, 0, sizeof(net) );
memset( numpin, 0, sizeof(numpin) );
/* Read pi name , 4 letters */
/* Read pin name , 4 letters */
for( jj = 0; jj < 4; jj++, i++ )
{
if( Line[i] == ' ' )
......
......@@ -312,8 +312,8 @@ int BuildComponentsListFromSchematic( ListComponent* aList )
CONV_TO_UTF8( DrawLibItem->GetRef( sheet ) ),
sizeof( aList->m_Ref ) );
// @todo the above line is probably a bug, because it will not always nul terminate m_Ref.
// Ensure always nul terminate m_Ref.
aList->m_Ref[sizeof( aList->m_Ref ) - 1 ] = 0;
aList++;
}
}
......@@ -670,7 +670,11 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
fprintf( f, "ref%cvalue", s_ExportSeparatorSymbol );
if( aIncludeSubComponents )
{
fprintf( f, "%csheet path", s_ExportSeparatorSymbol );
fprintf( f, "%clocation", s_ExportSeparatorSymbol );
}
if( m_AddFootprintField->IsChecked() )
fprintf( f, "%cfootprint", s_ExportSeparatorSymbol );
......@@ -737,9 +741,17 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByRef( FILE* f,
{
msg = aList[ii].m_SheetList.PathHumanReadable();
if( CompactForm )
{
fprintf( f, "%c%s", s_ExportSeparatorSymbol, CONV_TO_UTF8( msg ) );
msg = m_Parent->GetXYSheetReferences( (BASE_SCREEN*)DrawLibItem->m_Parent, DrawLibItem->m_Pos );
fprintf( f, "%c%s)", s_ExportSeparatorSymbol, CONV_TO_UTF8( msg ) );
}
else
{
fprintf( f, " (Sheet %s)", CONV_TO_UTF8( msg ) );
msg = m_Parent->GetXYSheetReferences( (BASE_SCREEN*)DrawLibItem->m_Parent, DrawLibItem->m_Pos );
fprintf( f, " (loc %s)", CONV_TO_UTF8( msg ) );
}
}
PrintFieldData( f, DrawLibItem, CompactForm );
......@@ -811,6 +823,8 @@ int WinEDA_Build_BOM_Frame::PrintComponentsListByVal( FILE* f,
{
msg = aList[ii].m_SheetList.PathHumanReadable();
fprintf( f, " (Sheet %s)", CONV_TO_UTF8( msg ) );
msg = m_Parent->GetXYSheetReferences( (BASE_SCREEN*)DrawLibItem->m_Parent, DrawLibItem->m_Pos );
fprintf( f, " (loc %s)", CONV_TO_UTF8( msg ) );
}
PrintFieldData( f, DrawLibItem );
......
......@@ -137,16 +137,20 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
/*******************************************************************************/
void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int PrintMask )
/*******************************************************************************/
/** PrintPage
* used to print a page.
* Print the page pointed by ActiveScreen, set by the calling print function
* @param DC = wxDC given by the calling print function
* @param Print_Sheet_Ref = true to print page references
* @param PrintMask = not used here
*/
{
BASE_SCREEN* screen;
wxBeginBusyCursor();
ActiveScreen = screen = m_Parent->GetBaseScreen();
RedrawStructList( this, DC, screen->EEDrawList, GR_COPY );
RedrawStructList( this, DC, ActiveScreen->EEDrawList, GR_COPY );
if( Print_Sheet_Ref )
m_Parent->TraceWorkSheet( DC, screen, g_DrawMinimunLineWidth );
m_Parent->TraceWorkSheet( DC, ActiveScreen, g_DrawMinimunLineWidth );
wxEndBusyCursor();
}
......
......@@ -20,311 +20,333 @@
#include "bitmaps.h"
static bool UpdateScreenFromSheet(WinEDA_SchematicFrame * frame);
static bool UpdateScreenFromSheet( WinEDA_SchematicFrame* frame );
enum {
ID_TREECTRL_HIERARCHY = 1600
ID_TREECTRL_HIERARCHY = 1600
};
class WinEDA_HierFrame;
/* Cette classe permet de memoriser la feuille (sheet) associ�e a l'item
pour l'arbre de hierarchie */
class TreeItemData: public wxTreeItemData
* pour l'arbre de hierarchie */
class TreeItemData : public wxTreeItemData
{
public:
DrawSheetPath m_SheetList;
TreeItemData(DrawSheetPath sheet) :wxTreeItemData()
{
m_SheetList = sheet;
}
DrawSheetPath m_SheetList;
TreeItemData( DrawSheetPath sheet ) : wxTreeItemData()
{
m_SheetList = sheet;
}
};
/* Classe de l'arbre de hierarchie */
class WinEDA_Tree : public wxTreeCtrl
{
private:
WinEDA_HierFrame * m_Parent;
wxImageList *imageList;
WinEDA_HierFrame* m_Parent;
wxImageList* imageList;
public:
WinEDA_Tree() { }
WinEDA_Tree(WinEDA_HierFrame *parent);
WinEDA_Tree() { }
WinEDA_Tree( WinEDA_HierFrame* parent );
DECLARE_DYNAMIC_CLASS(WinEDA_Tree)
DECLARE_DYNAMIC_CLASS( WinEDA_Tree )
};
IMPLEMENT_DYNAMIC_CLASS(WinEDA_Tree, wxTreeCtrl)
IMPLEMENT_DYNAMIC_CLASS( WinEDA_Tree, wxTreeCtrl )
WinEDA_Tree::WinEDA_Tree(WinEDA_HierFrame *parent) :
wxTreeCtrl( (wxWindow*)parent, ID_TREECTRL_HIERARCHY,
wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS, wxDefaultValidator, wxT("HierachyTreeCtrl"))
WinEDA_Tree::WinEDA_Tree( WinEDA_HierFrame* parent ) :
wxTreeCtrl( (wxWindow*)parent, ID_TREECTRL_HIERARCHY,
wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS, wxDefaultValidator, wxT( "HierachyTreeCtrl" ) )
{
m_Parent = parent;
// Make an image list containing small icons
imageList = new wxImageList(16, 15, TRUE, 2);
m_Parent = parent;
imageList->Add(wxBitmap(tree_nosel_xpm));
imageList->Add(wxBitmap(tree_sel_xpm));
// Make an image list containing small icons
imageList = new wxImageList( 16, 15, TRUE, 2 );
AssignImageList(imageList);
imageList->Add( wxBitmap( tree_nosel_xpm ) );
imageList->Add( wxBitmap( tree_sel_xpm ) );
AssignImageList( imageList );
}
/* Classe definissant la fenetre d'affichage de la hierarchie */
class WinEDA_HierFrame : public wxDialog
{
public:
WinEDA_SchematicFrame * m_Parent;
WinEDA_Tree * m_Tree;
int m_nbsheets;
wxDC * m_DC;
WinEDA_SchematicFrame* m_Parent;
WinEDA_Tree* m_Tree;
int m_nbsheets;
wxDC* m_DC;
private:
wxSize m_TreeSize; // Taille de l'arbre de hierarchie
int maxposx;
wxSize m_TreeSize; // Taille de l'arbre de hierarchie
int maxposx;
public:
WinEDA_HierFrame(WinEDA_SchematicFrame *parent, wxDC * DC, const wxPoint& pos);
void BuildSheetList(DrawSheetPath * list, wxTreeItemId * previousmenu);
~WinEDA_HierFrame();
WinEDA_HierFrame( WinEDA_SchematicFrame* parent, wxDC* DC, const wxPoint& pos );
void BuildSheetList( DrawSheetPath* list, wxTreeItemId* previousmenu );
void OnSelect(wxTreeEvent& event);
~WinEDA_HierFrame();
void OnSelect( wxTreeEvent& event );
private:
void OnQuit(wxCommandEvent& event);
void OnQuit( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(WinEDA_HierFrame, wxDialog)
EVT_TREE_ITEM_ACTIVATED(ID_TREECTRL_HIERARCHY,
WinEDA_HierFrame::OnSelect)
BEGIN_EVENT_TABLE( WinEDA_HierFrame, wxDialog )
EVT_TREE_ITEM_ACTIVATED( ID_TREECTRL_HIERARCHY,
WinEDA_HierFrame::OnSelect )
END_EVENT_TABLE()
/*************************************************************************/
void WinEDA_SchematicFrame::InstallHierarchyFrame(wxDC * DC, wxPoint &pos)
void WinEDA_SchematicFrame::InstallHierarchyFrame( wxDC* DC, wxPoint& pos )
/*************************************************************************/
{
WinEDA_HierFrame * treeframe = new WinEDA_HierFrame(this, DC, pos);
treeframe->ShowModal(); treeframe->Destroy();
WinEDA_HierFrame* treeframe = new WinEDA_HierFrame( this, DC, pos );
treeframe->ShowModal(); treeframe->Destroy();
}
WinEDA_HierFrame::WinEDA_HierFrame(WinEDA_SchematicFrame *parent, wxDC * DC,
const wxPoint& pos):
wxDialog(parent, -1, _("Navigator"), pos, wxSize(110,50),
DIALOG_STYLE)
WinEDA_HierFrame::WinEDA_HierFrame( WinEDA_SchematicFrame* parent, wxDC* DC,
const wxPoint& pos ) :
wxDialog( parent, -1, _( "Navigator" ), pos, wxSize( 110, 50 ),
DIALOG_STYLE )
{
wxTreeItemId cellule;
wxTreeItemId cellule;
m_Parent = parent;
m_DC = DC;
m_Tree = new WinEDA_Tree(this);
m_Parent = parent;
m_DC = DC;
m_Tree = new WinEDA_Tree( this );
m_nbsheets = 1;
m_nbsheets = 1;
cellule = m_Tree->AddRoot(_("Root"), 0, 1);
m_Tree->SetItemBold(cellule, TRUE);
DrawSheetPath list;
list.Push(g_RootSheet);
m_Tree->SetItemData( cellule, new TreeItemData(list) );
cellule = m_Tree->AddRoot( _( "Root" ), 0, 1 );
m_Tree->SetItemBold( cellule, TRUE );
DrawSheetPath list;
list.Push( g_RootSheet );
m_Tree->SetItemData( cellule, new TreeItemData( list ) );
wxRect itemrect;
wxRect itemrect;
#ifdef __UNIX__
itemrect.SetWidth(100);
itemrect.SetHeight(20);
itemrect.SetWidth( 100 );
itemrect.SetHeight( 20 );
#else
m_Tree->GetBoundingRect(cellule,itemrect);
m_Tree->GetBoundingRect( cellule, itemrect );
#endif
m_TreeSize.x = itemrect.GetWidth() + 10;
m_TreeSize.y = 20;
m_TreeSize.x = itemrect.GetWidth() + 10;
m_TreeSize.y = 20;
if( m_Parent->GetSheet()->Last() == g_RootSheet )
m_Tree->SelectItem(cellule); //root.
if( m_Parent->GetSheet()->Last() == g_RootSheet )
m_Tree->SelectItem( cellule ); //root.
maxposx = 15;
BuildSheetList(&list, &cellule);
maxposx = 15;
BuildSheetList( &list, &cellule );
if ( m_nbsheets > 1)
{
m_Tree->Expand(cellule);
if( m_nbsheets > 1 )
{
m_Tree->Expand( cellule );
// Reajustage de la taille de la frame a une valeur optimale
m_TreeSize.y += m_nbsheets * itemrect.GetHeight();
m_TreeSize.x = MIN(m_TreeSize.x, 250);
m_TreeSize.y = MIN( m_TreeSize.y, 350);
SetClientSize(m_TreeSize);
}
// Reajustage de la taille de la frame a une valeur optimale
m_TreeSize.y += m_nbsheets * itemrect.GetHeight();
m_TreeSize.x = MIN( m_TreeSize.x, 250 );
m_TreeSize.y = MIN( m_TreeSize.y, 350 );
SetClientSize( m_TreeSize );
}
}
WinEDA_HierFrame::~WinEDA_HierFrame()
{
}
/************************************************************************/
void WinEDA_HierFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
void WinEDA_HierFrame::OnQuit( wxCommandEvent& WXUNUSED (event) )
/************************************************************************/
{
// true is to force the frame to close
Close(true);
Close( true );
}
/********************************************************************/
void WinEDA_HierFrame::BuildSheetList(DrawSheetPath* list,
wxTreeItemId * previousmenu)
void WinEDA_HierFrame::BuildSheetList( DrawSheetPath* list,
wxTreeItemId* previousmenu )
/********************************************************************/
/* Routine de creation de l'arbre de navigation dans la hierarchy
schematique
Cette routine est Reentrante !
*/
* schematique
* Cette routine est Reentrante !
*/
{
wxTreeItemId menu;
if( m_nbsheets > NB_MAX_SHEET ){
if( m_nbsheets == (NB_MAX_SHEET + 1) ){
wxString msg;
msg << wxT("BuildSheetList: Error: nbsheets > ") << NB_MAX_SHEET;
DisplayError(this, msg);
m_nbsheets++;
}
return;
}
maxposx += m_Tree->GetIndent();
EDA_BaseStruct* bs = list->LastDrawList();
while(bs && m_nbsheets < NB_MAX_SHEET){
if(bs->Type() == DRAW_SHEET_STRUCT_TYPE){
DrawSheetStruct* ss = (DrawSheetStruct*)bs;
m_nbsheets++;
menu = m_Tree->AppendItem(*previousmenu,
ss->m_SheetName, 0 , 1 );
list->Push(ss);
m_Tree->SetItemData( menu, new TreeItemData(*list) );
int ll = m_Tree->GetItemText(menu).Len();
wxTreeItemId menu;
if( m_nbsheets > NB_MAX_SHEET )
{
if( m_nbsheets == (NB_MAX_SHEET + 1) )
{
wxString msg;
msg << wxT( "BuildSheetList: Error: nbsheets > " ) << NB_MAX_SHEET;
DisplayError( this, msg );
m_nbsheets++;
}
return;
}
maxposx += m_Tree->GetIndent();
EDA_BaseStruct* bs = list->LastDrawList();
while( bs && m_nbsheets < NB_MAX_SHEET )
{
if( bs->Type() == DRAW_SHEET_STRUCT_TYPE )
{
DrawSheetStruct* ss = (DrawSheetStruct*) bs;
m_nbsheets++;
menu = m_Tree->AppendItem( *previousmenu,
ss->m_SheetName, 0, 1 );
list->Push( ss );
m_Tree->SetItemData( menu, new TreeItemData( *list ) );
int ll = m_Tree->GetItemText( menu ).Len();
#ifdef __WINDOWS__
ll *= 9; // * char width
ll *= 9; // * char width
#else
ll *= 12; // * char width
ll *= 12; // * char width
#endif
ll += maxposx + 20;
m_TreeSize.x = MAX(m_TreeSize.x, ll);
m_TreeSize.y += 1;
if ( *list == *(m_Parent->GetSheet()) ){
m_Tree->EnsureVisible(menu);
m_Tree->SelectItem(menu);
}
BuildSheetList(list, &menu);
m_Tree->Expand(menu);
list->Pop();
}
bs = bs->Pnext;
}
maxposx -= m_Tree->GetIndent();
ll += maxposx + 20;
m_TreeSize.x = MAX( m_TreeSize.x, ll );
m_TreeSize.y += 1;
if( *list == *( m_Parent->GetSheet() ) )
{
m_Tree->EnsureVisible( menu );
m_Tree->SelectItem( menu );
}
BuildSheetList( list, &menu );
m_Tree->Expand( menu );
list->Pop();
}
bs = bs->Pnext;
}
maxposx -= m_Tree->GetIndent();
}
/***************************************************/
void WinEDA_HierFrame::OnSelect(wxTreeEvent& event)
void WinEDA_HierFrame::OnSelect( wxTreeEvent& event )
/***************************************************/
/* Called on a double-click on a tree item:
Open the selected sheet, and display the corresponding screen
*/
* Open the selected sheet, and display the corresponding screen
*/
{
wxTreeItemId ItemSel = m_Tree->GetSelection();
wxTreeItemId ItemSel = m_Tree->GetSelection();
*(m_Parent->m_CurrentSheet) =
((TreeItemData*)(m_Tree->GetItemData(ItemSel)))->m_SheetList;
UpdateScreenFromSheet(m_Parent);
Close(TRUE);
*(m_Parent->m_CurrentSheet) =
( (TreeItemData*) ( m_Tree->GetItemData( ItemSel ) ) )->m_SheetList;
UpdateScreenFromSheet( m_Parent );
Close( TRUE );
}
/******************************************************/
void WinEDA_SchematicFrame::InstallPreviousSheet()
/******************************************************/
/* Set the current screen to display the parent sheet of the current displayed sheet
*/
*/
{
if( m_CurrentSheet->Last() == g_RootSheet ) return;
g_ItemToRepeat = NULL;
MsgPanel->EraseMsgBox();
//make a copy for testing purposes.
DrawSheetPath listtemp = *m_CurrentSheet;
listtemp.Pop();
if ( listtemp.LastScreen() == NULL ){
DisplayError( this, wxT("InstallPreviousScreen() Error: Sheet not found"));
return;
}
m_CurrentSheet->Pop();
UpdateScreenFromSheet(this);
if( m_CurrentSheet->Last() == g_RootSheet )
return;
g_ItemToRepeat = NULL;
MsgPanel->EraseMsgBox();
//make a copy for testing purposes.
DrawSheetPath listtemp = *m_CurrentSheet;
listtemp.Pop();
if( listtemp.LastScreen() == NULL )
{
DisplayError( this, wxT( "InstallPreviousScreen() Error: Sheet not found" ) );
return;
}
m_CurrentSheet->Pop();
UpdateScreenFromSheet( this );
}
/*********************************************************************/
void WinEDA_SchematicFrame::InstallNextScreen(DrawSheetStruct * Sheet)
void WinEDA_SchematicFrame::InstallNextScreen( DrawSheetStruct* Sheet )
/*********************************************************************/
/* Routine d'installation de l'ecran correspondant au symbole Sheet pointe
par la souris
have to be careful here because the DrawSheetStructs within the EEDrawList
don't actually have a valid m_AssociatedScreen (on purpose -- you need the m_SubSheet hierarchy
to maintain path info (well, this is but one way to maintain path info..)
*/
* par la souris
* have to be careful here because the DrawSheetStructs within the EEDrawList
* don't actually have a valid m_AssociatedScreen (on purpose -- you need the m_SubSheet hierarchy
* to maintain path info (well, this is but one way to maintain path info..)
*/
{
if( Sheet == NULL)
{
DisplayError(this,wxT("InstallNextScreen() error")); return;
}
m_CurrentSheet->Push(Sheet);
g_ItemToRepeat = NULL;
MsgPanel->EraseMsgBox();
UpdateScreenFromSheet(this);
if( Sheet == NULL )
{
DisplayError( this, wxT( "InstallNextScreen() error" ) ); return;
}
m_CurrentSheet->Push( Sheet );
g_ItemToRepeat = NULL;
MsgPanel->EraseMsgBox();
UpdateScreenFromSheet( this );
}
/**************************************************************/
static bool UpdateScreenFromSheet(WinEDA_SchematicFrame * frame)
static bool UpdateScreenFromSheet( WinEDA_SchematicFrame* frame )
/**************************************************************/
/* Recherche et installe de l'ecran relatif au sheet symbole Sheet.
Si Sheet == NULL installation de l'ecran de base ( Root ).
*/
* Si Sheet == NULL installation de l'ecran de base ( Root ).
*/
{
SCH_SCREEN * NewScreen;
NewScreen = frame->m_CurrentSheet->LastScreen();
if(!NewScreen)
{
DisplayError(frame, wxT("Screen not found for this sheet"));
return false;
}
// Reinit des parametres d'affichage du nouvel ecran
// assumes m_CurrentSheet has already been updated.
frame->MsgPanel->EraseMsgBox();
frame->DrawPanel->SetScrollbars( frame->DrawPanel->m_Scroll_unit,
frame->DrawPanel->m_Scroll_unit,
NewScreen->m_ScrollbarNumber.x,
NewScreen->m_ScrollbarNumber.y,
NewScreen->m_ScrollbarPos.x,
NewScreen->m_ScrollbarPos.y,TRUE);
//update the References
frame->m_CurrentSheet->UpdateAllScreenReferences();
SCH_SCREEN* NewScreen;
NewScreen = frame->m_CurrentSheet->LastScreen();
if( !NewScreen )
{
DisplayError( frame, wxT( "Screen not found for this sheet" ) );
return false;
}
// Reinit des parametres d'affichage du nouvel ecran
// assumes m_CurrentSheet has already been updated.
frame->MsgPanel->EraseMsgBox();
frame->DrawPanel->SetScrollbars( frame->DrawPanel->m_Scroll_unit,
frame->DrawPanel->m_Scroll_unit,
NewScreen->m_ScrollbarNumber.x,
NewScreen->m_ScrollbarNumber.y,
NewScreen->m_ScrollbarPos.x,
NewScreen->m_ScrollbarPos.y, TRUE );
//update the References
frame->m_CurrentSheet->UpdateAllScreenReferences();
frame->SetSheetNumberAndCount();
frame->DrawPanel->m_CanStartBlock = -1;
ActiveScreen = frame->m_CurrentSheet->LastScreen();
if ( NewScreen->m_FirstRedraw ){
NewScreen->m_FirstRedraw = FALSE;
frame->Zoom_Automatique(TRUE);
}else{
frame->DrawPanel->Refresh();
frame->DrawPanel->MouseToCursorSchema();
}
return true;
frame->DrawPanel->m_CanStartBlock = -1;
ActiveScreen = frame->m_CurrentSheet->LastScreen();
if( NewScreen->m_FirstRedraw )
{
NewScreen->m_FirstRedraw = FALSE;
frame->Zoom_Automatique( TRUE );
}
else
{
frame->DrawPanel->Refresh();
frame->DrawPanel->MouseToCursorSchema();
}
return true;
}
......@@ -236,11 +236,13 @@ static wxString ReturnPinNetName( ObjetNetListStruct* Pin,
{
if( g_TabObjNet[jj].m_Type != NET_PINLABEL )
{
NetName = g_TabObjNet[jj].m_SheetList.PathHumanReadable()
+ NetName;
wxString lnet = NetName;
NetName = g_TabObjNet[jj].m_SheetList.PathHumanReadable();
// If sheet path is too long, use the time stamp name insteed
if ( NetName.Length() > 32 )
NetName = g_TabObjNet[jj].m_SheetList.Path();
NetName += lnet;
}
//NetName << wxT("_") << g_TabObjNet[jj].m_SheetList.PathHumanReadable();
}
else
{
......@@ -619,7 +621,8 @@ static void WriteNetListPCBNEW( WinEDA_SchematicFrame* frame, FILE* f, bool with
continue;
wxString netname = ReturnPinNetName( Pin, wxT( "N-%.6d" ) );
if( netname.IsEmpty() )
netname = wxT( " ?" );
netname = wxT( "?" );
netname.Replace( wxT( " " ), wxT( "_" ) );
fprintf( f, " ( %4.4s %s )\n", (char*) &Pin->m_PinNum,
CONV_TO_UTF8( netname ) );
}
......
......@@ -9,7 +9,7 @@ COMMON_GLOBL wxString g_BuildVersion
# include "config.h"
(wxT(KICAD_SVN_VERSION))
# else
(wxT("(20080715"))
(wxT("(20080731.r1175"))
# endif
#endif
;
......
......@@ -20,8 +20,7 @@
#define PAD_SMD 1 // Smd pad, appears on the layer paste (default)
#define PAD_CONN 2 // Like smd, does not appear on the layer paste (default)
// reserved, but not yet really used:
#define PAD_P_HOLE 3 // trou simple, utile sur pad stack
#define PAD_MECA 4 // PAD "mecanique" (fixation, zone cuivre...)
#define PAD_HOLE_NOT_PLATED 3 // like PAD_STANDARD, but not plated (no connection between copper layers)
#endif // PAD_SHAPES_H_
......
......@@ -298,6 +298,14 @@ public:
void OnActivate( wxActivateEvent& event );
void ReDrawPanel();
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
* @param aPosition = position to identify by YX ref
* @return a wxString containing the message locator like A3 or B6 (or ?? if out of page limits)
*/
wxString GetXYSheetReferences( BASE_SCREEN* aScreen, const wxPoint& aPosition );
void DisplayToolMsg( const wxString msg );
void Process_Zoom( wxCommandEvent& event );
void Process_Grid( wxCommandEvent& event );
......
......@@ -94,7 +94,7 @@ EDA_Rect D_PAD::GetBoundingBox()
EDA_Rect area;
area.SetOrigin(m_Pos);
area.Inflate(m_Rayon, m_Rayon);
return area;
}
......@@ -256,7 +256,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
int zoom;
int fillpad = 0;
wxPoint shape_pos;
if ( m_Flags & DO_NOT_DRAW )
return;
......@@ -747,9 +747,7 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
if( strncmp( BufLine, "CONN", 4 ) == 0 )
m_Attribut = PAD_CONN;
if( strncmp( BufLine, "HOLE", 4 ) == 0 )
m_Attribut = PAD_P_HOLE;
if( strncmp( BufLine, "MECA", 4 ) == 0 )
m_Attribut = PAD_MECA;
m_Attribut = PAD_HOLE_NOT_PLATED;
break;
case 'N': /* Lecture du netname */
......@@ -777,7 +775,9 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
}
/*************************************/
bool D_PAD::Save( FILE* aFile ) const
/*************************************/
{
int cshape;
const char* texttype;
......@@ -833,12 +833,9 @@ bool D_PAD::Save( FILE* aFile ) const
case PAD_CONN:
texttype = "CONN"; break;
case PAD_P_HOLE:
case PAD_HOLE_NOT_PLATED:
texttype = "HOLE"; break;
case PAD_MECA:
texttype = "MECA"; break;
default:
texttype = "STD";
DisplayError( NULL, wxT( "Invalid Pad attribute" ) );
......@@ -1144,8 +1141,7 @@ static const char* ShowPadAttr( int aPadAttr )
case PAD_STANDARD: return "STD";
case PAD_SMD: return "SMD";
case PAD_CONN: return "CONN";
case PAD_P_HOLE: return "HOLE";
case PAD_MECA: return "MECA";
case PAD_HOLE_NOT_PLATED: return "HOLE";
default: return "??unkown??";
}
}
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_pad_edit.cpp
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 28/02/2006 13:34:48
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
......@@ -141,10 +141,10 @@ bool WinEDA_PadPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
*/
void WinEDA_PadPropertiesFrame::CreateControls()
{
{
SetFont(*g_DialogFont);
////@begin WinEDA_PadPropertiesFrame content construction
// Generated by DialogBlocks, 27/08/2007 21:03:59 (unregistered)
// Generated by DialogBlocks, 30/07/2008 22:05:19 (unregistered)
WinEDA_PadPropertiesFrame* itemDialog1 = this;
......@@ -205,8 +205,6 @@ void WinEDA_PadPropertiesFrame::CreateControls()
m_PadTypeStrings.Add(_("Standard"));
m_PadTypeStrings.Add(_("SMD"));
m_PadTypeStrings.Add(_("Conn"));
m_PadTypeStrings.Add(_("Hole"));
m_PadTypeStrings.Add(_("Mechanical"));
m_PadType = new wxRadioBox( itemDialog1, ID_LISTBOX_TYPE_PAD, _("Pad Type:"), wxDefaultPosition, wxDefaultSize, m_PadTypeStrings, 1, wxRA_SPECIFY_COLS );
m_PadType->SetSelection(0);
m_PadOptSizer->Add(m_PadType, 0, wxGROW|wxALL, 5);
......@@ -234,7 +232,7 @@ void WinEDA_PadPropertiesFrame::CreateControls()
m_PadLayerCmp->SetValue(false);
itemStaticBoxSizer18->Add(m_PadLayerCmp, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
itemStaticBoxSizer18->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemStaticBoxSizer18->Add(5, 5, 0, wxGROW|wxALL, 5);
m_PadLayerAdhCmp = new wxCheckBox( itemDialog1, ID_CHECKBOX2, _("Adhesive Cmp"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_PadLayerAdhCmp->SetValue(false);
......@@ -337,7 +335,7 @@ void WinEDA_PadPropertiesFrame::OnCancelClick( wxCommandEvent& event )
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
// Before editing this code, remove the block markers.
event.Skip();
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PadPropertiesFrame.
}
......@@ -386,7 +384,7 @@ void WinEDA_PadPropertiesFrame::OnListboxShapePadSelected( wxCommandEvent& event
void WinEDA_PadPropertiesFrame::OnListboxTypePadSelected( wxCommandEvent& event )
{
PadTypeSelectedEvent(event);
PadTypeSelected();
}
......
/////////////////////////////////////////////////////////////////////////////
// Name: dialog_pad_edit.h
// Purpose:
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Modified by:
// Created: 28/02/2006 13:34:48
// RCS-ID:
// RCS-ID:
// Copyright: License GNU
// Licence:
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 28/02/2006 13:34:48
......@@ -58,7 +58,7 @@ class wxBoxSizer;
#define ID_CHECKBOX10 10016
#define ID_CHECKBOX11 10017
#define ID_CHECKBOX12 10018
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_TITLE _("Pad properties")
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_PADPROPERTIESFRAME_SIZE wxSize(400, 300)
......@@ -78,7 +78,7 @@ class wxBoxSizer;
*/
class WinEDA_PadPropertiesFrame: public wxDialog
{
{
DECLARE_DYNAMIC_CLASS( WinEDA_PadPropertiesFrame )
DECLARE_EVENT_TABLE()
......@@ -131,7 +131,6 @@ public:
void PadPropertiesAccept(wxCommandEvent& event);
void PadTypeSelected();
void PadTypeSelectedEvent(wxCommandEvent& event);
void PadOrientEvent(wxCommandEvent& event);
void SetPadLayersList(long layer_mask);
void SetOthersControls();
......
......@@ -10,8 +10,10 @@
<bool name="convert_images_to_xpm">0</bool>
<bool name="inline_images">0</bool>
<bool name="generate_cpp_for_xrc">0</bool>
<long name="working_mode">1</long>
<bool name="use_help_text_for_tooltips">1</bool>
<bool name="translate_strings">1</bool>
<bool name="make_unicode_strings">1</bool>
<bool name="extract_strings">0</bool>
<string name="user_name">"jean-pierre Charras"</string>
<string name="copyright_string">"License GNU"</string>
......@@ -106,10 +108,12 @@
<bool name="use_resource_archive">0</bool>
<bool name="use_generated_xrc_cpp">0</bool>
<bool name="always_generate_xrc">1</bool>
<bool name="use_id_name_for_name">0</bool>
<bool name="archive_xrc_files">1</bool>
<bool name="archive_image_files">1</bool>
<bool name="archive_all_image_files">0</bool>
<bool name="xrc_retain_relative_paths">1</bool>
<bool name="xrc_generate_id_tags">0</bool>
</header>
<data>
<document>
......@@ -132,6 +136,7 @@
<long name="locked">0</long>
<string name="template-name">""</string>
<bool name="dirty">1</bool>
<long name="makefile-last-written">-8519680</long>
<string name="Compiler name">""</string>
<string name="Build mode">"Debug"</string>
<string name="Unicode mode">"ANSI"</string>
......@@ -173,6 +178,8 @@
<string name="wxWidgets build command">"%AUTO%"</string>
<string name="wxWidgets clean command">"%AUTO%"</string>
<string name="PATH variable">"%AUTO%"</string>
<bool name="Suppress source rules">0</bool>
<bool name="Enable makefile generation">1</bool>
</document>
</document>
</data>
......@@ -213,6 +220,7 @@
<bool name="use-id-suffix">0</bool>
<string name="id-suffix">""</string>
<long name="use-xrc">0</long>
<long name="working-mode">0</long>
<string name="proxy-Id name">"ID_DIALOG"</string>
<long name="proxy-Id value">10000</long>
<string name="proxy-Class">"WinEDA_PadPropertiesFrame"</string>
......@@ -233,10 +241,16 @@
<bool name="proxy-Hidden">0</bool>
<bool name="proxy-Enabled">1</bool>
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Texture">""</string>
<string name="proxy-Texture style">"Tiled"</string>
<bool name="proxy-wxDEFAULT_DIALOG_STYLE">0</bool>
<bool name="proxy-wxCAPTION">1</bool>
<bool name="proxy-wxRESIZE_BORDER">0</bool>
<bool name="proxy-wxTHICK_FRAME">0</bool>
<bool name="proxy-wxSYSTEM_MENU">1</bool>
<bool name="proxy-wxSTAY_ON_TOP">0</bool>
<bool name="proxy-wxDIALOG_NO_PARENT">0</bool>
......@@ -321,6 +335,7 @@
<string name="proxy-type">"wbStaticTextProxy"</string>
<string name="proxy-Id name">"wxID_STATIC"</string>
<long name="proxy-Id value">5105</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxStaticText"</string>
<string name="proxy-Base class">"wxStaticText"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -340,6 +355,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxALIGN_LEFT">0</bool>
<bool name="proxy-wxALIGN_RIGHT">0</bool>
<bool name="proxy-wxALIGN_CENTRE">0</bool>
......@@ -385,6 +405,7 @@
<string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL_PADNUM"</string>
<long name="proxy-Id value">10001</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string>
<string name="proxy-Base class">"wxTextCtrl"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -404,6 +425,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxTE_MULTILINE">0</bool>
<bool name="proxy-wxTE_PROCESS_ENTER">0</bool>
<bool name="proxy-wxTE_PROCESS_TAB">0</bool>
......@@ -419,6 +445,7 @@
<bool name="proxy-wxHSCROLL">0</bool>
<bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxTE_CAPITALIZE">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
<bool name="proxy-wxDOUBLE_BORDER">0</bool>
......@@ -461,6 +488,7 @@
<string name="proxy-type">"wbStaticTextProxy"</string>
<string name="proxy-Id name">"wxID_STATIC"</string>
<long name="proxy-Id value">5105</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxStaticText"</string>
<string name="proxy-Base class">"wxStaticText"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -480,6 +508,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxALIGN_LEFT">0</bool>
<bool name="proxy-wxALIGN_RIGHT">0</bool>
<bool name="proxy-wxALIGN_CENTRE">0</bool>
......@@ -525,6 +558,7 @@
<string name="proxy-type">"wbTextCtrlProxy"</string>
<string name="proxy-Id name">"ID_TEXTCTRL_NETNAME"</string>
<long name="proxy-Id value">10002</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxTextCtrl"</string>
<string name="proxy-Base class">"wxTextCtrl"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -544,6 +578,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxTE_MULTILINE">0</bool>
<bool name="proxy-wxTE_PROCESS_ENTER">0</bool>
<bool name="proxy-wxTE_PROCESS_TAB">0</bool>
......@@ -559,6 +598,7 @@
<bool name="proxy-wxHSCROLL">0</bool>
<bool name="proxy-wxTE_CHARWRAP">0</bool>
<bool name="proxy-wxTE_WORDWRAP">0</bool>
<bool name="proxy-wxTE_CAPITALIZE">0</bool>
<bool name="proxy-wxNO_BORDER">0</bool>
<bool name="proxy-wxSIMPLE_BORDER">0</bool>
<bool name="proxy-wxDOUBLE_BORDER">0</bool>
......@@ -654,6 +694,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxDrillShapeSelected"</string>
<string name="proxy-Id name">"ID_RADIOBOX_DRILL_SHAPE"</string>
<long name="proxy-Id value">10019</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -675,6 +716,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
......@@ -739,6 +785,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_RADIOBOX_SELECTED|OnListboxOrientPadSelected"</string>
<string name="proxy-Id name">"ID_LISTBOX_ORIENT_PAD"</string>
<long name="proxy-Id value">10003</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -760,6 +807,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
......@@ -798,6 +850,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_RADIOBOX_SELECTED|OnListboxShapePadSelected"</string>
<string name="proxy-Id name">"ID_LISTBOX_SHAPE_PAD"</string>
<long name="proxy-Id value">10004</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -819,6 +872,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
......@@ -857,6 +915,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_RADIOBOX_SELECTED|OnListboxTypePadSelected"</string>
<string name="proxy-Id name">"ID_LISTBOX_TYPE_PAD"</string>
<long name="proxy-Id value">10005</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxRadioBox"</string>
<string name="proxy-Base class">"wxRadioBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -866,7 +925,7 @@
<string name="proxy-Member variable name">"m_PadType"</string>
<string name="proxy-Label">"Pad Type:"</string>
<long name="proxy-Major dimension count">1</long>
<string name="proxy-Items">"Standard|SMD|Conn|Hole|Mechanical"</string>
<string name="proxy-Items">"Standard|SMD|Conn"</string>
<long name="proxy-Initial value">0</long>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
......@@ -878,6 +937,11 @@
<string name="proxy-Platform">"&lt;Any platform&gt;"</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<bool name="proxy-wxRA_SPECIFY_ROWS">0</bool>
<bool name="proxy-wxRA_SPECIFY_COLS">1</bool>
<bool name="proxy-wxWANTS_CHARS">0</bool>
......@@ -942,6 +1006,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick"</string>
<string name="proxy-Id name">"wxID_OK"</string>
<long name="proxy-Id value">5100</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -953,6 +1018,13 @@
<bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"CC0000"</string>
<string name="proxy-Font">""</string>
......@@ -1001,6 +1073,7 @@
<string name="event-handler-0">"wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick"</string>
<string name="proxy-Id name">"wxID_CANCEL"</string>
<long name="proxy-Id value">5101</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxButton"</string>
<string name="proxy-Base class">"wxButton"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1012,6 +1085,13 @@
<bool name="proxy-Default">0</bool>
<string name="proxy-Help text">""</string>
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">"0000FF"</string>
<string name="proxy-Font">""</string>
......@@ -1093,6 +1173,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX"</string>
<long name="proxy-Id value">10006</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1106,6 +1187,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1151,6 +1237,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX1"</string>
<long name="proxy-Id value">10007</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1164,6 +1251,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1209,7 +1301,7 @@
<string name="proxy-type">"wbSpacerProxy"</string>
<long name="proxy-Width">5</long>
<long name="proxy-Height">5</long>
<string name="proxy-AlignH">"Centre"</string>
<string name="proxy-AlignH">"Expand"</string>
<string name="proxy-AlignV">"Centre"</string>
<long name="proxy-Stretch factor">0</long>
<long name="proxy-Border">5</long>
......@@ -1235,6 +1327,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX2"</string>
<long name="proxy-Id value">10008</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1248,6 +1341,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1293,6 +1391,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX3"</string>
<long name="proxy-Id value">10009</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1306,6 +1405,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1351,6 +1455,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX4"</string>
<long name="proxy-Id value">10010</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1364,6 +1469,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1409,6 +1519,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX5"</string>
<long name="proxy-Id value">10011</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1422,6 +1533,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1467,6 +1583,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX6"</string>
<long name="proxy-Id value">10012</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1480,6 +1597,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1525,6 +1647,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX7"</string>
<long name="proxy-Id value">10013</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1538,6 +1661,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1583,6 +1711,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX8"</string>
<long name="proxy-Id value">10014</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1596,6 +1725,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1641,6 +1775,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX9"</string>
<long name="proxy-Id value">10015</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1654,6 +1789,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1699,6 +1839,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX10"</string>
<long name="proxy-Id value">10016</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1712,6 +1853,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1757,6 +1903,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX11"</string>
<long name="proxy-Id value">10017</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1770,6 +1917,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......@@ -1815,6 +1967,7 @@
<string name="proxy-type">"wbCheckBoxProxy"</string>
<string name="proxy-Id name">"ID_CHECKBOX12"</string>
<long name="proxy-Id value">10018</long>
<string name="proxy-Name">""</string>
<string name="proxy-Class">"wxCheckBox"</string>
<string name="proxy-Base class">"wxCheckBox"</string>
<bool name="proxy-External implementation">1</bool>
......@@ -1828,6 +1981,11 @@
<string name="proxy-Tooltip text">""</string>
<string name="proxy-Data variable">""</string>
<string name="proxy-Data validator">""</string>
<string name="proxy-Data source">""</string>
<string name="proxy-Data class name">""</string>
<string name="proxy-Data class implementation filename">""</string>
<string name="proxy-Data class header filename">""</string>
<string name="proxy-Data class manager window">""</string>
<string name="proxy-Background colour">""</string>
<string name="proxy-Foreground colour">""</string>
<string name="proxy-Font">""</string>
......
......@@ -26,22 +26,26 @@ int CodeShape[NBSHAPES] = /* forme des pads */
};
#define NBTYPES 5
#define NBTYPES 4
int CodeType[NBTYPES] =
{
PAD_STANDARD, PAD_SMD, PAD_CONN, PAD_P_HOLE, PAD_MECA
PAD_STANDARD, PAD_SMD, PAD_CONN, PAD_HOLE_NOT_PLATED
};
// Default mask layers for pads according to the pas type
static long Std_Pad_Layers[NBTYPES] =
{
// PAD_STANDARD:
ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP,
// PAD_CONN:
CMP_LAYER | SOLDERPASTE_LAYER_CMP | SOLDERMASK_LAYER_CMP,
// PAD_SMD:
CMP_LAYER | SOLDERMASK_LAYER_CMP,
ALL_CU_LAYERS | SILKSCREEN_LAYER_CU | SILKSCREEN_LAYER_CMP |
SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP,
ALL_CU_LAYERS | SILKSCREEN_LAYER_CU | SILKSCREEN_LAYER_CMP |
SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP
//PAD_HOLE_NOT_PLATED:
ALL_CU_LAYERS | SILKSCREEN_LAYER_CMP | SOLDERMASK_LAYER_CU | SOLDERMASK_LAYER_CMP
};
......@@ -247,18 +251,12 @@ void WinEDA_PadPropertiesFrame::PadOrientEvent( wxCommandEvent& event )
}
/**************************************************************************/
void WinEDA_PadPropertiesFrame::PadTypeSelectedEvent( wxCommandEvent& event )
/**************************************************************************/
/* calcule un layer_mask type selon la selection du type du pad
*/
{
PadTypeSelected();
}
/************************************************/
void WinEDA_PadPropertiesFrame::PadTypeSelected()
/************************************************/
/* Adjust the better mask layer according to the selected pad type
*/
{
long layer_mask;
int ii;
......@@ -524,8 +522,11 @@ void WinEDA_PadPropertiesFrame::PadPropertiesAccept( wxCommandEvent& event )
CurrentPad->m_Drill = wxSize( 0, 0 );
break;
case PAD_P_HOLE:
case PAD_MECA:
case PAD_HOLE_NOT_PLATED:
break;
default:
DisplayError(this, wxT("Error: unknown pad type"));
break;
}
......
......@@ -132,6 +132,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
int ii;
FILE* source;
wxString msg;
char cbuf[1024];
ActiveScreen = GetScreen();
......
......@@ -794,6 +794,7 @@ int WinEDA_ModuleEditFrame::Create_Librairie( const wxString& LibName )
{
FILE* lib_module;
wxString msg;
char cbuf[256];
if( wxFileExists( LibName ) )
{
......@@ -835,6 +836,7 @@ static bool CreateDocLibrary( const wxString& LibName )
*/
{
char Line[1024];
char cbuf[256];
wxString Name, Doc, KeyWord;
wxString LibDocName;
FILE* LibMod, * LibDoc;
......
......@@ -212,10 +212,7 @@ eda_global char* adr_himem; /* adresse haute limite de la memoire disponible
eda_global char* adr_max; /* adresse haute maxi utilisee pour la memoire */
/* variables g�erales */
eda_global char cbuf[1024]; /* buffer for some text printing */
eda_global BOARD* g_ModuleEditor_Pcb; /* board used to edit footprints (used by modedit)*/
/* variables generales */
eda_global int g_TimeOut; // Timer for automatic saving
eda_global int g_SaveTime; // Time for next saving
......@@ -320,6 +317,7 @@ eda_global int g_PadCMPColor;
#endif
eda_global PCB_SCREEN* ScreenPcb; /* Ecran principal */
eda_global BOARD* g_ModuleEditor_Pcb; /* board used to edit footprints (used by modedit)*/
eda_global PCB_SCREEN* ScreenModule; /* Ecran de l'editeur de modules */
......
......@@ -367,6 +367,7 @@ void trace_1_pastille_OVALE_GERBER( wxPoint pos, wxSize size, int orient )
*/
{
D_CODE* dcode_ptr;
char cbuf[256];
int x0, y0, x1, y1, delta;
if( orient == 900 || orient == 2700 ) /* orient tournee de 90 deg */
......@@ -420,6 +421,7 @@ void Plot_1_CIRCLE_pad_GERBER( wxPoint pos, int diametre )
*/
{
D_CODE* dcode_ptr;
char cbuf[256];
wxSize size( diametre, diametre );
......@@ -451,6 +453,7 @@ void PlotRectangularPad_GERBER( wxPoint pos, wxSize size, int orient )
*/
{
D_CODE* dcode_ptr;
char cbuf[256];
/* Trace de la forme flashee */
switch( orient )
......@@ -630,6 +633,7 @@ void PlotGERBERLine( wxPoint start, wxPoint end, int large )
*/
{
D_CODE* dcode_ptr;
char cbuf[256];
UserToDeviceCoordinate( start );
UserToDeviceCoordinate( end );
......@@ -865,6 +869,7 @@ int WinEDA_BasePcbFrame::Gen_D_CODE_File( FILE* penfile )
*/
{
D_CODE* ptr_tool;
char cbuf[1024];
int nb_dcodes = 0;
/* Init : */
......
......@@ -499,6 +499,7 @@ void trace_1_pastille_RONDE_HPGL( wxPoint pos, int diametre, int modetrace )
/**************************************************************************/
/* Trace 1 pastille RONDE (via,pad rond) en position pos */
{
char cbuf[1024];
int rayon, delta;
UserToDeviceCoordinate( pos );
......
......@@ -237,8 +237,7 @@ void Out_Pads( BOARD* Pcb, FILE* outfile )
fprintf( outfile, " %d", 2 );
break;
case PAD_P_HOLE:
case PAD_MECA:
case PAD_HOLE_NOT_PLATED:
fprintf( outfile, " %d", 4 );
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment