Beautification, Doxyfile edits

This commit is contained in:
dickelbeck 2008-03-04 14:27:48 +00:00
parent 0dc3be8806
commit 3d73eb6823
5 changed files with 737 additions and 1702 deletions

1067
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@ -41,22 +41,26 @@ wxSize minsize;
// Create child subwindows. // Create child subwindows.
GetClientSize( &m_FrameSize.x, &m_FrameSize.y ); /* dimx, dimy = dimensions utiles de la GetClientSize( &m_FrameSize.x, &m_FrameSize.y ); /* dimx, dimy = dimensions utiles de la
zone utilisateur de la fenetre principale */ * zone utilisateur de la fenetre principale */
m_FramePos.x = m_FramePos.y = 0; m_FramePos.x = m_FramePos.y = 0;
m_FrameSize.y -= m_MsgFrameHeight; m_FrameSize.y -= m_MsgFrameHeight;
} }
/******************************************/ /******************************************/
WinEDA_BasicFrame::~WinEDA_BasicFrame() WinEDA_BasicFrame::~WinEDA_BasicFrame()
/******************************************/ /******************************************/
{ {
if ( m_Parent->m_HtmlCtrl ) delete m_Parent->m_HtmlCtrl; if( m_Parent->m_HtmlCtrl )
delete m_Parent->m_HtmlCtrl;
m_Parent->m_HtmlCtrl = NULL; m_Parent->m_HtmlCtrl = NULL;
} }
/********************************************/ /********************************************/
void WinEDA_BasicFrame::ReCreateMenuBar() void WinEDA_BasicFrame::ReCreateMenuBar()
/********************************************/ /********************************************/
// Virtual function // Virtual function
{ {
} }
@ -83,12 +87,14 @@ int Ypos_min;
// Ensure Window title bar is visible // Ensure Window title bar is visible
#ifdef __WXMAC__ #ifdef __WXMAC__
// for macOSX, the window must be below system (macOSX) toolbar // for macOSX, the window must be below system (macOSX) toolbar
Ypos_min = GetMBarHeight(); Ypos_min = GetMBarHeight();
#else #else
Ypos_min = 0; Ypos_min = 0;
#endif #endif
if ( m_FramePos.y < Ypos_min ) m_FramePos.y = Ypos_min; if( m_FramePos.y < Ypos_min )
m_FramePos.y = Ypos_min;
} }
@ -98,9 +104,11 @@ void WinEDA_BasicFrame::SaveSettings()
{ {
wxString text; wxString text;
if ( !m_Parent || !m_Parent->m_EDA_Config ) return; if( !m_Parent || !m_Parent->m_EDA_Config )
return;
if( ! m_Parent->m_EDA_Config || IsIconized() ) return; if( !m_Parent->m_EDA_Config || IsIconized() )
return;
m_FrameSize = GetSize(); m_FrameSize = GetSize();
m_FramePos = GetPosition(); m_FramePos = GetPosition();
@ -116,7 +124,6 @@ wxString text;
} }
/******************************************************/ /******************************************************/
void WinEDA_BasicFrame::PrintMsg( const wxString& text ) void WinEDA_BasicFrame::PrintMsg( const wxString& text )
/******************************************************/ /******************************************************/
@ -127,9 +134,11 @@ void WinEDA_BasicFrame::PrintMsg(const wxString & text)
#endif #endif
} }
/*************************************************************************/ /*************************************************************************/
void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text ) void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
/*************************************************************************/ /*************************************************************************/
/* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100 /* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/ */
{ {
@ -140,25 +149,30 @@ wxString Line;
PerCent = (PerCent < 0) ? 0 : PerCent; PerCent = (PerCent < 0) ? 0 : PerCent;
PerCent = (PerCent > 100) ? 100 : PerCent; PerCent = (PerCent > 100) ? 100 : PerCent;
PerCent /= 2; // Bargraph is 0 .. 50 points from 0% to 100% PerCent /= 2; // Bargraph is 0 .. 50 points from 0% to 100%
if (PerCent) Line.Pad(PerCent, '*'); if( PerCent )
Line.Pad( PerCent, '*' );
SetStatusText( Line ); SetStatusText( Line );
} }
/*******************************************************************/ /*******************************************************************/
void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName ) void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*******************************************************************/ /*******************************************************************/
/* Met a jour la liste des anciens projets /* Met a jour la liste des anciens projets
*/ */
{ {
unsigned ii; unsigned ii;
if ( FullFileName.IsEmpty() ) return; if( FullFileName.IsEmpty() )
return;
//suppression d'une ancienne trace eventuelle du meme fichier //suppression d'une ancienne trace eventuelle du meme fichier
for( ii = 0; ii < m_Parent->m_LastProject.GetCount(); ) for( ii = 0; ii < m_Parent->m_LastProject.GetCount(); )
{ {
if(m_Parent->m_LastProject[ii].IsEmpty() ) break; if( m_Parent->m_LastProject[ii].IsEmpty() )
break;
#ifdef __WINDOWS__ #ifdef __WINDOWS__
if( m_Parent->m_LastProject[ii].CmpNoCase( FullFileName ) == 0 ) if( m_Parent->m_LastProject[ii].CmpNoCase( FullFileName ) == 0 )
#else #else
@ -171,7 +185,8 @@ unsigned ii;
m_Parent->m_LastProject.RemoveAt( ii ); m_Parent->m_LastProject.RemoveAt( ii );
#endif #endif
} }
else ii++; else
ii++;
} }
while( m_Parent->m_LastProject.GetCount() >= m_Parent->m_LastProjectMaxCount ) while( m_Parent->m_LastProject.GetCount() >= m_Parent->m_LastProjectMaxCount )
@ -182,16 +197,19 @@ unsigned ii;
m_Parent->m_LastProject.RemoveAt( m_Parent->m_LastProject.GetCount() - 1 ); m_Parent->m_LastProject.RemoveAt( m_Parent->m_LastProject.GetCount() - 1 );
#endif #endif
} }
m_Parent->m_LastProject.Insert( FullFileName, 0 ); m_Parent->m_LastProject.Insert( FullFileName, 0 );
ReCreateMenuBar(); ReCreateMenuBar();
} }
/**************************************************/ /**************************************************/
wxString WinEDA_BasicFrame::GetLastProject( int rang ) wxString WinEDA_BasicFrame::GetLastProject( int rang )
/**************************************************/ /**************************************************/
{ {
if ( rang < 0 ) rang = 0; if( rang < 0 )
rang = 0;
if( (unsigned) rang >= m_Parent->m_LastProject.GetCount() ) if( (unsigned) rang >= m_Parent->m_LastProject.GetCount() )
return wxEmptyString; return wxEmptyString;
return m_Parent->m_LastProject[rang]; return m_Parent->m_LastProject[rang];
@ -221,6 +239,7 @@ void WinEDA_BasicFrame::GetKicadHelp(wxCommandEvent& event)
} }
} }
/***********************************************************/ /***********************************************************/
void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& event ) void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& event )
/**********************************************************/ /**********************************************************/
@ -228,6 +247,7 @@ void WinEDA_BasicFrame::GetKicadAbout(wxCommandEvent& event)
Print_Kicad_Infos( this, m_AboutTitle ); Print_Kicad_Infos( this, m_AboutTitle );
} }
/********************************************************************/ /********************************************************************/
void WinEDA_BasicFrame::ProcessFontPreferences( int id ) void WinEDA_BasicFrame::ProcessFontPreferences( int id )
/********************************************************************/ /********************************************************************/
@ -236,12 +256,10 @@ wxFont font;
switch( id ) switch( id )
{ {
case ID_PREFERENCES_FONT: case ID_PREFERENCES_FONT:
break; break;
case ID_PREFERENCES_FONT_STATUS: case ID_PREFERENCES_FONT_STATUS:
{
font = wxGetFontFromUser( this, *g_StdFont ); font = wxGetFontFromUser( this, *g_StdFont );
if( font.Ok() ) if( font.Ok() )
{ {
@ -253,10 +271,8 @@ wxFont font;
g_StdFontPointSize = pointsize; g_StdFontPointSize = pointsize;
} }
break; break;
}
case ID_PREFERENCES_FONT_DIALOG: case ID_PREFERENCES_FONT_DIALOG:
{
font = wxGetFontFromUser( this, *g_DialogFont ); font = wxGetFontFromUser( this, *g_DialogFont );
if( font.Ok() ) if( font.Ok() )
{ {
@ -268,9 +284,9 @@ wxFont font;
g_FixedFont->SetPointSize( g_FixedFontPointSize ); g_FixedFont->SetPointSize( g_FixedFontPointSize );
} }
break; break;
}
default: DisplayError(this, wxT("WinEDA_BasicFrame::ProcessFontPreferences Internal Error") ); default:
DisplayError( this, wxT( "WinEDA_BasicFrame::ProcessFontPreferences Internal Error" ) );
break; break;
} }
} }

View File

@ -16,10 +16,12 @@ extern wxString g_Main_Title;
/*************************************************************************************/ /*************************************************************************************/
void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width ) void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width )
/*************************************************************************************/ /*************************************************************************************/
/* Draw the sheet references /* Draw the sheet references
*/ */
{ {
if ( ! m_Draw_Sheet_Ref ) return; if( !m_Draw_Sheet_Ref )
return;
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc; Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
int ii, jj, xg, yg, ipas, gxpas, gypas; int ii, jj, xg, yg, ipas, gxpas, gypas;
@ -30,6 +32,7 @@ Ki_WorkSheetData * WsItem;
int scale = m_InternalUnits / 1000; int scale = m_InternalUnits / 1000;
wxSize size( SIZETEXT* scale, SIZETEXT* scale ); wxSize size( SIZETEXT* scale, SIZETEXT* scale );
wxSize size_ref( SIZETEXT_REF* scale, SIZETEXT_REF* scale ); wxSize size_ref( SIZETEXT_REF* scale, SIZETEXT_REF* scale );
wxString msg; wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION; int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width; int width = line_width;
@ -66,6 +69,7 @@ int width = line_width;
refx += GRID_REF_W; refy += GRID_REF_W; refx += GRID_REF_W; refy += GRID_REF_W;
xg -= GRID_REF_W; yg -= GRID_REF_W; xg -= GRID_REF_W; yg -= GRID_REF_W;
} }
/* trace des reperes */ /* trace des reperes */
refx = Sheet->m_LeftMargin; refx = Sheet->m_LeftMargin;
refy = Sheet->m_TopMargin; /* Upper left corner */ refy = Sheet->m_TopMargin; /* Upper left corner */
@ -106,8 +110,10 @@ int width = line_width;
for( ii = refy + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- ) for( ii = refy + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
{ {
Line.Empty(); Line.Empty();
if( jj < 26 ) Line.Printf(wxT("%c"), jj + 'A'); if( jj < 26 )
else Line.Printf(wxT("%c"), 'a' + jj - 26); Line.Printf( wxT( "%c" ), jj + 'A' );
else
Line.Printf( wxT( "%c" ), 'a' + jj - 26 );
if( ii < yg - PAS_REF / 2 ) if( ii < yg - PAS_REF / 2 )
{ {
GRLine( &DrawPanel->m_ClipBox, DC, refx * scale, ii * scale, GRLine( &DrawPanel->m_ClipBox, DC, refx * scale, ii * scale,
@ -130,8 +136,6 @@ int width = line_width;
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width ); GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width );
} }
/* Trace du cartouche */ /* Trace du cartouche */
refx = Sheet->m_Size.x - Sheet->m_RightMargin - GRID_REF_W; refx = Sheet->m_Size.x - Sheet->m_RightMargin - GRID_REF_W;
refy = Sheet->m_Size.y - Sheet->m_BottomMargin - GRID_REF_W; /* lower right corner */ refy = Sheet->m_Size.y - Sheet->m_BottomMargin - GRID_REF_W; /* lower right corner */
@ -141,10 +145,12 @@ int width = line_width;
pos.x = (refx - WsItem->m_Posx) * scale; pos.x = (refx - WsItem->m_Posx) * scale;
pos.y = (refy - WsItem->m_Posy) * scale; pos.y = (refy - WsItem->m_Posy) * scale;
msg.Empty(); msg.Empty();
switch( WsItem->m_Type ) switch( WsItem->m_Type )
{ {
case WS_DATE: case WS_DATE:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Date; msg += screen->m_Date;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -152,7 +158,8 @@ int width = line_width;
break; break;
case WS_REV: case WS_REV:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Revision; msg += screen->m_Revision;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -160,7 +167,8 @@ int width = line_width;
break; break;
case WS_KICAD_VERSION: case WS_KICAD_VERSION:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += g_ProductName + g_Main_Title; msg += g_ProductName + g_Main_Title;
msg += wxT( " " ) + GetBuildVersion(); msg += wxT( " " ) + GetBuildVersion();
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
@ -169,7 +177,8 @@ int width = line_width;
break; break;
case WS_SIZESHEET: case WS_SIZESHEET:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += Sheet->m_Name; msg += Sheet->m_Name;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -178,7 +187,8 @@ int width = line_width;
case WS_IDENTSHEET: case WS_IDENTSHEET:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen; msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -189,7 +199,8 @@ int width = line_width;
{ {
wxString fname, fext; wxString fname, fext;
wxFileName::SplitPath( screen->m_FileName, (wxString*) NULL, &fname, &fext ); wxFileName::SplitPath( screen->m_FileName, (wxString*) NULL, &fname, &fext );
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << fname << wxT( "." ) << fext; msg << fname << wxT( "." ) << fext;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -198,7 +209,8 @@ int width = line_width;
break; break;
case WS_FULLSHEETNAME: case WS_FULLSHEETNAME:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += GetScreenDesc(); msg += GetScreenDesc();
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -207,7 +219,8 @@ int width = line_width;
case WS_COMPANY_NAME: case WS_COMPANY_NAME:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Company; msg += screen->m_Company;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
@ -219,7 +232,8 @@ int width = line_width;
break; break;
case WS_TITLE: case WS_TITLE:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Title; msg += screen->m_Title;
DrawGraphicText( DrawPanel, DC, pos, Color, DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size, msg, TEXT_ORIENT_HORIZ, size,
@ -227,7 +241,8 @@ int width = line_width;
break; break;
case WS_COMMENT1: case WS_COMMENT1:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire1; msg += screen->m_Commentaire1;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
@ -239,7 +254,8 @@ int width = line_width;
break; break;
case WS_COMMENT2: case WS_COMMENT2:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire2; msg += screen->m_Commentaire2;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
@ -251,7 +267,8 @@ int width = line_width;
break; break;
case WS_COMMENT3: case WS_COMMENT3:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire3; msg += screen->m_Commentaire3;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
@ -263,7 +280,8 @@ int width = line_width;
break; break;
case WS_COMMENT4: case WS_COMMENT4:
if(WsItem->m_Legende) msg = WsItem->m_Legende; if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire4; msg += screen->m_Commentaire4;
if( !msg.IsEmpty() ) if( !msg.IsEmpty() )
{ {
@ -275,12 +293,15 @@ int width = line_width;
break; break;
case WS_UPPER_SEGMENT: case WS_UPPER_SEGMENT:
if (UpperLimit == 0 ) break; if( UpperLimit == 0 )
break;
case WS_LEFT_SEGMENT: case WS_LEFT_SEGMENT:
WS_MostUpperLine.m_Posy = WS_MostUpperLine.m_Posy =
WS_MostUpperLine.m_Endy = WS_MostUpperLine.m_Endy =
WS_MostLeftLine.m_Posy = UpperLimit; WS_MostLeftLine.m_Posy = UpperLimit;
pos.y = (refy - WsItem->m_Posy) * scale; pos.y = (refy - WsItem->m_Posy) * scale;
case WS_SEGMENT: case WS_SEGMENT:
xg = Sheet->m_Size.x - xg = Sheet->m_Size.x -
GRID_REF_W - Sheet->m_RightMargin - WsItem->m_Endx; GRID_REF_W - Sheet->m_RightMargin - WsItem->m_Endx;
@ -289,15 +310,17 @@ int width = line_width;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y, GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color ); xg * scale, yg * scale, width, Color );
break; break;
}
}
}
}
}
}
/*********************************************************************/ /*********************************************************************/
wxString WinEDA_DrawFrame::GetScreenDesc() wxString WinEDA_DrawFrame::GetScreenDesc()
/*********************************************************************/ /*********************************************************************/
{ {
wxString msg; wxString msg;
msg << GetScreen()->m_ScreenNumber << wxT( "/" ) << msg << GetScreen()->m_ScreenNumber << wxT( "/" ) <<
GetScreen()->m_NumberOfScreen; GetScreen()->m_NumberOfScreen;
return msg; return msg;

View File

@ -22,8 +22,7 @@ static bool Pad_Shape_Change = FALSE;
static bool Pad_Orient_Change = FALSE; static bool Pad_Orient_Change = FALSE;
static bool Pad_Drill_Change = TRUE; static bool Pad_Drill_Change = TRUE;
enum id_pad_global_edit enum id_pad_global_edit {
{
ID_CHANGE_CURRENT_MODULE = 1900, ID_CHANGE_CURRENT_MODULE = 1900,
ID_CHANGE_ID_MODULES, ID_CHANGE_ID_MODULES,
ID_CHANGE_GET_PAD_SETTINGS ID_CHANGE_GET_PAD_SETTINGS
@ -50,6 +49,7 @@ private:
wxCheckBox* m_Pad_Orient_Change; wxCheckBox* m_Pad_Orient_Change;
public: public:
// Constructor and destructor // Constructor and destructor
WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame * parent, WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame * parent,
D_PAD * Pad, wxDC * DC, const wxPoint &pos ); D_PAD * Pad, wxDC * DC, const wxPoint &pos );
@ -72,7 +72,9 @@ END_EVENT_TABLE()
/********************************************************************************/ /********************************************************************************/
WinEDA_PadGlobalEditFrame::WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame* parent, WinEDA_PadGlobalEditFrame::WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame* parent,
D_PAD * Pad,wxDC * DC, const wxPoint & framepos): D_PAD* Pad,
wxDC* DC,
const wxPoint& framepos ) :
wxDialog( parent, -1, _( "Pads Global Edit" ), framepos, wxSize( 310, 235 ), wxDialog( parent, -1, _( "Pads Global Edit" ), framepos, wxSize( 310, 235 ),
DIALOG_STYLE ) DIALOG_STYLE )
/********************************************************************************/ /********************************************************************************/
@ -92,20 +94,24 @@ wxButton * Button;
pos.y = 10; pos.y = 10;
Button = new wxButton( this, ID_CHANGE_GET_PAD_SETTINGS, Button = new wxButton( this, ID_CHANGE_GET_PAD_SETTINGS,
_( "Pad Settings..." ), pos ); _( "Pad Settings..." ), pos );
Button->SetForegroundColour( wxColor( 0, 80, 0 ) ); Button->SetForegroundColour( wxColor( 0, 80, 0 ) );
pos.y += Button->GetDefaultSize().y + 50; pos.y += Button->GetDefaultSize().y + 50;
Button = new wxButton( this, ID_CHANGE_CURRENT_MODULE, Button = new wxButton( this, ID_CHANGE_CURRENT_MODULE,
_( "Change Module" ), pos ); _( "Change Module" ), pos );
Button->SetForegroundColour( *wxRED ); Button->SetForegroundColour( *wxRED );
pos.y += Button->GetDefaultSize().y + 10; pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton( this, ID_CHANGE_ID_MODULES, Button = new wxButton( this, ID_CHANGE_ID_MODULES,
_( "Change Id Modules" ), pos ); _( "Change Id Modules" ), pos );
Button->SetForegroundColour( *wxRED ); Button->SetForegroundColour( *wxRED );
pos.y += Button->GetDefaultSize().y + 10; pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), pos ); Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), pos );
Button->SetForegroundColour( *wxBLUE ); Button->SetForegroundColour( *wxBLUE );
// Selection des filtres de selection des pads : // Selection des filtres de selection des pads :
@ -116,14 +122,17 @@ wxButton * Button;
pos.x += 5; pos.x += 5;
pos.y += 18; pos.y += 18;
m_Pad_Shape_Filter = new wxCheckBox( this, -1, _( "Shape Filter" ), pos ); m_Pad_Shape_Filter = new wxCheckBox( this, -1, _( "Shape Filter" ), pos );
m_Pad_Shape_Filter->SetValue( Pad_Shape_Filter ); m_Pad_Shape_Filter->SetValue( Pad_Shape_Filter );
pos.y += 18; pos.y += 18;
m_Pad_Layer_Filter = new wxCheckBox( this, -1, _( "Layer Filter" ), pos ); m_Pad_Layer_Filter = new wxCheckBox( this, -1, _( "Layer Filter" ), pos );
m_Pad_Layer_Filter->SetValue( Pad_Layer_Filter ); m_Pad_Layer_Filter->SetValue( Pad_Layer_Filter );
pos.y += 18; pos.y += 18;
m_Pad_Orient_Filter = new wxCheckBox( this, -1, _( "Orient Filter" ), pos ); m_Pad_Orient_Filter = new wxCheckBox( this, -1, _( "Orient Filter" ), pos );
m_Pad_Orient_Filter->SetValue( Pad_Orient_Filter ); m_Pad_Orient_Filter->SetValue( Pad_Orient_Filter );
// Items a editer // Items a editer
@ -134,18 +143,22 @@ wxButton * Button;
pos.x += 5; pos.x += 5;
pos.y += 18; pos.y += 18;
m_Pad_Size_Change = new wxCheckBox( this, -1, _( "Change Size" ), pos ); m_Pad_Size_Change = new wxCheckBox( this, -1, _( "Change Size" ), pos );
m_Pad_Size_Change->SetValue( Pad_Size_Change ); m_Pad_Size_Change->SetValue( Pad_Size_Change );
pos.y += 18; pos.y += 18;
m_Pad_Shape_Change = new wxCheckBox( this, -1, _( "Change Shape" ), pos ); m_Pad_Shape_Change = new wxCheckBox( this, -1, _( "Change Shape" ), pos );
m_Pad_Shape_Change->SetValue( Pad_Shape_Change ); m_Pad_Shape_Change->SetValue( Pad_Shape_Change );
pos.y += 18; pos.y += 18;
m_Pad_Drill_Change = new wxCheckBox( this, -1, _( "Change Drill" ), pos ); m_Pad_Drill_Change = new wxCheckBox( this, -1, _( "Change Drill" ), pos );
m_Pad_Drill_Change->SetValue( Pad_Drill_Change ); m_Pad_Drill_Change->SetValue( Pad_Drill_Change );
pos.y += 18; pos.y += 18;
m_Pad_Orient_Change = new wxCheckBox( this, -1, _( "Change Orient" ), pos ); m_Pad_Orient_Change = new wxCheckBox( this, -1, _( "Change Orient" ), pos );
m_Pad_Orient_Change->SetValue( Pad_Orient_Change ); m_Pad_Orient_Change->SetValue( Pad_Orient_Change );
} }
@ -161,6 +174,7 @@ void WinEDA_PadGlobalEditFrame::OnCancelClick(wxCommandEvent& WXUNUSED(event))
/*************************************************************************/ /*************************************************************************/
void WinEDA_PadGlobalEditFrame::PadPropertiesAccept( wxCommandEvent& event ) void WinEDA_PadGlobalEditFrame::PadPropertiesAccept( wxCommandEvent& event )
/*************************************************************************/ /*************************************************************************/
/* Met a jour les differents parametres pour le composant en cours d'édition /* Met a jour les differents parametres pour le composant en cours d'édition
*/ */
{ {
@ -174,6 +188,7 @@ int returncode = 0;
case ID_CHANGE_ID_MODULES: case ID_CHANGE_ID_MODULES:
returncode = 1; returncode = 1;
// Fall through // Fall through
case ID_CHANGE_CURRENT_MODULE: case ID_CHANGE_CURRENT_MODULE:
@ -193,6 +208,7 @@ int returncode = 0;
/***************************************************************************/ /***************************************************************************/
void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* Pad, wxDC* DC ) void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* Pad, wxDC* DC )
/***************************************************************************/ /***************************************************************************/
/* /*
* Routine de selection et de correction des dimensions des pastilles * Routine de selection et de correction des dimensions des pastilles
* de tous les modules * de tous les modules
@ -223,6 +239,7 @@ wxString ref_name_module = Module->m_LibRef;
WinEDA_PadGlobalEditFrame* frame = new WinEDA_PadGlobalEditFrame( this, Pad, DC, WinEDA_PadGlobalEditFrame* frame = new WinEDA_PadGlobalEditFrame( this, Pad, DC,
wxPoint( -1, -1 ) ); wxPoint( -1, -1 ) );
diag = frame->ShowModal(); diag = frame->ShowModal();
frame->Destroy(); frame->Destroy();
@ -323,10 +340,13 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
default: default:
break; break;
} }
pt_pad->ComputeRayon(); pt_pad->ComputeRayon();
} }
Module->Set_Rectangle_Encadrement(); Module->Set_Rectangle_Encadrement();
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_OR ); Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_OR );
} }
GetScreen()->SetModify(); GetScreen()->SetModify();
} }

View File

@ -309,7 +309,7 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
if( strncmp( Line, "Layer[", LAYERKEYZ ) == 0 ) if( strncmp( Line, "Layer[", LAYERKEYZ ) == 0 )
{ {
// parse: // parse:
// Layer[n] "a Layer name" <LAYER_T> // Layer[n] <a_Layer_name_with_no_spaces> <LAYER_T>
char* cp = Line + LAYERKEYZ; char* cp = Line + LAYERKEYZ;
int layer = atoi(cp); int layer = atoi(cp);
@ -320,7 +320,6 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
m_Pcb->SetLayerName( layer, layerName ); m_Pcb->SetLayerName( layer, layerName );
data = strtok( NULL, " " ); data = strtok( NULL, " " );
if( data ) if( data )
{ {
LAYER_T type = LAYER::ParseType( data ); LAYER_T type = LAYER::ParseType( data );