diff --git a/common/base_screen.cpp b/common/base_screen.cpp
index bca646f9c6..a7d544c7c3 100644
--- a/common/base_screen.cpp
+++ b/common/base_screen.cpp
@@ -116,7 +116,9 @@ wxPoint BASE_SCREEN::CursorRealPosition( const wxPoint& ScreenPos )
wxPoint curpos = ScreenPos;
Unscale( curpos );
+#ifndef WX_ZOOM
curpos += m_DrawOrg;
+#endif
return curpos;
}
diff --git a/common/displlst.cpp b/common/displlst.cpp
index 19b1dc6395..b757514783 100644
--- a/common/displlst.cpp
+++ b/common/displlst.cpp
@@ -57,7 +57,6 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,
m_MoveFct = movefct;
m_WinMsg = NULL;
SetReturnCode( -1 );
- SetFont( *g_DialogFont );
if( itemlist )
for( names = m_ItemList, ii = 0; *names != NULL; names++ )
@@ -114,9 +113,10 @@ WinEDAListBox::WinEDAListBox( WinEDA_DrawFrame* parent, const wxString& title,
if( m_MoveFct )
{
- size.x = -1; size.y = 60;
- m_WinMsg = new wxTextCtrl( this, -1, wxEmptyString, wxDefaultPosition, size,
- wxTE_READONLY | wxTE_MULTILINE );
+ size.x = -1;
+ size.y = 60;
+ m_WinMsg = new wxTextCtrl( this, -1, wxEmptyString, wxDefaultPosition,
+ size, wxTE_READONLY | wxTE_MULTILINE );
GeneralBoxSizer->Add( m_WinMsg, 0, wxGROW | wxALL, 5 );
}
diff --git a/common/drawframe.cpp b/common/drawframe.cpp
index aa0e5d2f24..e9638d9e7a 100644
--- a/common/drawframe.cpp
+++ b/common/drawframe.cpp
@@ -630,6 +630,11 @@ void WinEDA_DrawFrame::AdjustScrollBars()
screen->m_ScrollbarNumber.y,
screen->m_ScrollbarPos.x,
screen->m_ScrollbarPos.y, TRUE );
+#else
+ BASE_SCREEN* screen = GetBaseScreen();
+ wxSize drawingSize = screen->ReturnPageSize() * 2;
+ DrawPanel->SetScrollbars( 1, 1, drawingSize.x, drawingSize.y,
+ screen->m_Curseur.x, screen->m_Curseur.y, true );
#endif
}
diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp
index a4c79a169c..3737f427c6 100644
--- a/common/drawpanel.cpp
+++ b/common/drawpanel.cpp
@@ -222,7 +222,16 @@ wxPoint WinEDA_DrawPanel::CursorRealPosition( const wxPoint& ScreenPos )
* @param ScreenPos = absolute position in pixels
*/
{
+#ifdef WX_ZOOM
+ wxCoord x, y;
+ wxClientDC DC( this );
+ PrepareGraphicContext( &DC );
+ x = DC.DeviceToLogicalX( ScreenPos.x );
+ y = DC.DeviceToLogicalY( ScreenPos.y );
+ return wxPoint( x, y );
+#else
return GetScreen()->CursorRealPosition( ScreenPos );
+#endif
}
@@ -323,17 +332,23 @@ void WinEDA_DrawPanel::ConvertPcbUnitsToPixelsUnits( wxPoint* aPosition )
}
-/********************************************************/
-wxPoint WinEDA_DrawPanel::CursorScreenPosition()
-/********************************************************/
-
/** Function CursorScreenPosition
* @return the cursor current position in pixels in the screen draw area
*/
+wxPoint WinEDA_DrawPanel::CursorScreenPosition()
{
+#ifdef WX_ZOOM
+ wxCoord x, y;
+ wxClientDC DC( this );
+ PrepareGraphicContext( &DC );
+ x = DC.LogicalToDeviceX( GetScreen()->m_Curseur.x );
+ y = DC.LogicalToDeviceY( GetScreen()->m_Curseur.y );
+ return wxPoint( x, y );
+#else
wxPoint pos = GetScreen()->m_Curseur - GetScreen()->m_DrawOrg;
GetScreen()->Scale( pos );
return pos;
+#endif
}
@@ -352,8 +367,16 @@ wxPoint WinEDA_DrawPanel::GetScreenCenterRealPosition( void )
realpos = CalcUnscrolledPosition( wxPoint( size.x, size.y ) );
GetScreen()->Unscale( realpos );
+#ifdef WX_ZOOM
+ wxCoord x, y;
+ wxClientDC DC( this );
+ PrepareGraphicContext( &DC );
+ x = DC.DeviceToLogicalX( realpos.x );
+ y = DC.DeviceToLogicalY( realpos.y );
+ return wxPoint( x, y );
+#else
realpos += GetScreen()->m_DrawOrg;
-
+#endif
return realpos;
}
@@ -648,6 +671,10 @@ void WinEDA_DrawPanel::OnPaint( wxPaintEvent& event )
wxDCClipper dcclip( paintDC, PaintClipBox );
ReDraw( &paintDC, true );
+
+#ifdef WX_ZOOM
+ paintDC.SetUserScale( 1.0, 1.0 );
+#endif
}
m_ClipBox = tmp;
@@ -1284,7 +1311,11 @@ void WinEDA_DrawPanel::OnKeyEvent( wxKeyEvent& event )
}
/* Some key commands use the current mouse position: refresh it */
+#ifdef WX_ZOOM
+ pos = CalcUnscrolledPosition( wxGetMousePosition() );
+#else
pos = CalcUnscrolledPosition( wxGetMousePosition() - GetScreenPosition() );
+#endif
/* Compute absolute mouse position in pixel units (i.e. considering the
current scroll) : */
diff --git a/common/edaappl.cpp b/common/edaappl.cpp
index 557da610cb..8cfb6e05c3 100644
--- a/common/edaappl.cpp
+++ b/common/edaappl.cpp
@@ -697,6 +697,7 @@ void WinEDA_App::SaveSettings()
m_EDA_Config->Write( wxT( "FixedFontSize" ), g_FixedFontPointSize );
m_EDA_Config->Write( wxT( "ShowPageLimits" ), g_ShowPageLimits );
m_EDA_Config->Write( wxT( "WorkingDir" ), wxGetCwd() );
+ m_EDA_Config->Write( wxT( "BgColor" ), g_DrawBgColor );
#endif // wxCHECK_VERSION
/* Save the file history list */
diff --git a/common/get_component_dialog.cpp b/common/get_component_dialog.cpp
index 823dd1a0b3..5088612599 100644
--- a/common/get_component_dialog.cpp
+++ b/common/get_component_dialog.cpp
@@ -86,7 +86,6 @@ WinEDA_SelectCmp::WinEDA_SelectCmp( WinEDA_DrawFrame* parent,
m_AuxTool = show_extra_tool;
m_GetExtraFunction = FALSE;
- SetFont( *g_DialogFont );
s_ItemName.Empty();
m_Text = &s_ItemName;
@@ -122,7 +121,6 @@ WinEDA_SelectCmp::WinEDA_SelectCmp( WinEDA_DrawFrame* parent,
5 );
Button = new wxButton( this, ID_ACCEPT_NAME, _( "OK" ) );
- Button->SetForegroundColour( *wxRED );
Button->SetDefault();
RightBoxSizer->Add( Button,
0,
@@ -130,22 +128,18 @@ WinEDA_SelectCmp::WinEDA_SelectCmp( WinEDA_DrawFrame* parent,
5 );
Button = new wxButton( this, ID_ACCEPT_KEYWORD, _( "Search KeyWord" ) );
- Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
Button = new wxButton( this, ID_CANCEL, _( "Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
Button = new wxButton( this, ID_LIST_ALL, _( "List All" ) );
- Button->SetForegroundColour( wxColor( 0, 80, 0 ) );
RightBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
#ifndef __WXMAC__
if( m_AuxTool ) /* The selection can be done by an extra function */
{
Button = new wxButton( this, ID_EXTRA_TOOL, _( "By Lib Browser" ) );
- Button->SetForegroundColour( wxColor( 0, 0, 0 ) ); // Listbox Color
RightBoxSizer->Add( Button, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
}
#endif
diff --git a/common/projet_config.cpp b/common/projet_config.cpp
index 9dd0f28599..272377fcc7 100644
--- a/common/projet_config.cpp
+++ b/common/projet_config.cpp
@@ -246,7 +246,6 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList )
*/
{
PARAM_CFG_BASE* pt_cfg;
- wxString msg;
if( m_EDA_Config == NULL )
return;
@@ -268,6 +267,32 @@ void WinEDA_App::SaveCurrentSetupValues( PARAM_CFG_BASE** aList )
}
+void WinEDA_App::SaveCurrentSetupValues( const PARAM_CFG_ARRAY& List )
+{
+ size_t i;
+ PARAM_CFG_BASE* pt_cfg;
+
+ if( m_EDA_Config == NULL )
+ return;
+
+ for( i = 0; i < List.GetCount(); i++ )
+ {
+ pt_cfg = &List[i];
+
+ if( pt_cfg->m_Setup == false )
+ continue;
+
+ if ( pt_cfg->m_Type == PARAM_COMMAND_ERASE ) // Erase all data
+ {
+ if( pt_cfg->m_Ident )
+ m_EDA_Config->DeleteGroup( pt_cfg->m_Ident );
+ }
+ else
+ pt_cfg->SaveParam( m_EDA_Config );
+ }
+}
+
+
/** Function ReadProjectConfig
* Read the current "projet" parameters
* Parameters are parameters that have the .m_Setup member set to false
@@ -410,6 +435,23 @@ void WinEDA_App::ReadCurrentSetupValues( PARAM_CFG_BASE** aList )
}
+void WinEDA_App::ReadCurrentSetupValues( const PARAM_CFG_ARRAY& List )
+{
+ size_t i;
+ PARAM_CFG_BASE* pt_cfg;
+
+ for( i = 0; i < List.GetCount(); i++ )
+ {
+ pt_cfg = &List[i];
+
+ if( pt_cfg->m_Setup == false )
+ continue;
+
+ pt_cfg->ReadParam( m_EDA_Config );
+ }
+}
+
+
/**************************************************************/
/* Constructeurs des descripteurs de structs de configuration */
/**************************************************************/
diff --git a/eeschema/annotate_dialog.cpp b/eeschema/annotate_dialog.cpp
index ea9c8fc042..569a1e1d67 100644
--- a/eeschema/annotate_dialog.cpp
+++ b/eeschema/annotate_dialog.cpp
@@ -137,7 +137,7 @@ void WinEDA_AnnotateFrame::Init()
void WinEDA_AnnotateFrame::CreateControls()
{
////@begin WinEDA_AnnotateFrame content construction
- // Generated by DialogBlocks, 21/04/2008 16:47:55 (unregistered)
+ // Generated by DialogBlocks, 29/04/2009 13:38:10 (unregistered)
WinEDA_AnnotateFrame* itemDialog1 = this;
@@ -145,11 +145,10 @@ void WinEDA_AnnotateFrame::CreateControls()
itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
- itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxRIGHT|wxTOP|wxBOTTOM, 5);
+ itemBoxSizer2->Add(itemBoxSizer3, 0, wxGROW|wxALL, 5);
wxStaticText* itemStaticText4 = new wxStaticText( itemDialog1, wxID_STATIC, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticText4->SetForegroundColour(wxColour(0, 128, 64));
- itemStaticText4->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
+ itemStaticText4->SetFont(wxFont(int(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize()*1.2), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetStyle(), wxBOLD, false, wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()));
itemBoxSizer3->Add(itemStaticText4, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
@@ -174,46 +173,42 @@ void WinEDA_AnnotateFrame::CreateControls()
m_rbResetAnnotation->SetValue(false);
itemBoxSizer5->Add(m_rbResetAnnotation, 0, wxGROW|wxALL, 5);
- wxStaticLine* itemStaticLine11 = new wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- itemBoxSizer3->Add(itemStaticLine11, 0, wxGROW|wxALL, 5);
+ wxStaticText* itemStaticText11 = new wxStaticText( itemDialog1, wxID_STATIC, _("Order"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticText11->SetFont(wxFont(int(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetPointSize()*1.2), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFamily(), wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetStyle(), wxBOLD, false, wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT).GetFaceName()));
+ itemBoxSizer3->Add(itemStaticText11, 0, wxALIGN_LEFT|wxALL, 5);
- wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("Order"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticText12->SetForegroundColour(wxColour(125, 2, 12));
- itemStaticText12->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Tahoma")));
- itemBoxSizer3->Add(itemStaticText12, 0, wxALIGN_LEFT|wxALL, 5);
+ wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer3->Add(itemBoxSizer12, 0, wxGROW|wxLEFT, 25);
- wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL);
- itemBoxSizer3->Add(itemBoxSizer13, 0, wxGROW|wxLEFT, 25);
+ wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer12->Add(itemBoxSizer13, 0, wxGROW, 5);
- wxBoxSizer* itemBoxSizer14 = new wxBoxSizer(wxHORIZONTAL);
- itemBoxSizer13->Add(itemBoxSizer14, 0, wxGROW, 5);
+ wxStaticBitmap* itemStaticBitmap14 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_down_right_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer13->Add(itemStaticBitmap14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxStaticBitmap* itemStaticBitmap15 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_down_right_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer14->Add(itemStaticBitmap15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
-
- m_rbSortBy_X_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+ m_rbSortBy_X_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_rbSortBy_X_Position->SetValue(true);
- itemBoxSizer14->Add(m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ itemBoxSizer13->Add(m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxBoxSizer* itemBoxSizer17 = new wxBoxSizer(wxHORIZONTAL);
- itemBoxSizer13->Add(itemBoxSizer17, 0, wxGROW, 5);
+ wxBoxSizer* itemBoxSizer16 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer12->Add(itemBoxSizer16, 0, wxGROW, 5);
- wxStaticBitmap* itemStaticBitmap18 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_right_down_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer17->Add(itemStaticBitmap18, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ wxStaticBitmap* itemStaticBitmap17 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("annotate_right_down_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer16->Add(itemStaticBitmap17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- m_rbSortBy_Y_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_rbSortBy_Y_Position = new wxRadioButton( itemDialog1, ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbSortBy_Y_Position->SetValue(false);
- itemBoxSizer17->Add(m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ itemBoxSizer16->Add(m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxHORIZONTAL);
- itemBoxSizer13->Add(itemBoxSizer20, 0, wxGROW, 5);
+ wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer12->Add(itemBoxSizer19, 0, wxGROW, 5);
- wxStaticBitmap* itemStaticBitmap21 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("add_text_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
- itemBoxSizer20->Add(itemStaticBitmap21, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ wxStaticBitmap* itemStaticBitmap20 = new wxStaticBitmap( itemDialog1, wxID_STATIC, itemDialog1->GetBitmapResource(wxT("add_text_xpm")), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer19->Add(itemStaticBitmap20, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- rbSortByValue = new wxRadioButton( itemDialog1, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 );
+ rbSortByValue = new wxRadioButton( itemDialog1, ID_SORT_BY_VALUE, _("Sort components by &value"), wxDefaultPosition, wxDefaultSize, 0 );
rbSortByValue->SetValue(false);
- itemBoxSizer20->Add(rbSortByValue, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ itemBoxSizer19->Add(rbSortByValue, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
sizerDialogButtons = new wxBoxSizer(wxHORIZONTAL);
itemBoxSizer2->Add(sizerDialogButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
@@ -223,12 +218,10 @@ void WinEDA_AnnotateFrame::CreateControls()
sizerDialogButtons->Add(m_btnClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_btnClear = new wxButton( itemDialog1, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btnClear->SetForegroundColour(wxColour(0, 0, 230));
sizerDialogButtons->Add(m_btnClear, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_btnApply = new wxButton( itemDialog1, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 );
m_btnApply->SetDefault();
- m_btnApply->SetForegroundColour(wxColour(198, 0, 0));
sizerDialogButtons->Add(m_btnApply, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end WinEDA_AnnotateFrame content construction
diff --git a/eeschema/annotate_dialog.h b/eeschema/annotate_dialog.h
index 27294f1bd5..f1c1299e88 100644
--- a/eeschema/annotate_dialog.h
+++ b/eeschema/annotate_dialog.h
@@ -32,7 +32,6 @@
////@begin forward declarations
class wxBoxSizer;
-class WinEDA_SchematicFrame;
////@end forward declarations
/*!
diff --git a/eeschema/annotate_dialog.pjd b/eeschema/annotate_dialog.pjd
index 6618d00578..849c02a323 100644
--- a/eeschema/annotate_dialog.pjd
+++ b/eeschema/annotate_dialog.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -314,7 +319,7 @@
"Centre"
0
5
- 0
+ 1
1
1
1
@@ -348,8 +353,8 @@
""
""
""
- "008040"
- "8, wxSWISS, wxNORMAL, wxBOLD, false, Tahoma"
+ ""
+ "wxSYS_DEFAULT_GUI_FONT:*1.2,default,default,wxBOLD,false,default"
0
1
"<Any platform>"
@@ -721,61 +726,6 @@
""
-
- "wxStaticLine: wxID_STATIC"
- "dialog-control-document"
- ""
- "staticline"
- 0
- 1
- 0
- 0
- "21/4/2008"
- "wbStaticLineProxy"
- "wxID_STATIC"
- 5105
- ""
- "wxStaticLine"
- "wxStaticLine"
- 1
- 0
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Expand"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
-
"wxStaticText: wxID_STATIC"
"dialog-control-document"
@@ -802,8 +752,8 @@
""
""
""
- "7D020C"
- "8, wxSWISS, wxNORMAL, wxBOLD, false, Tahoma"
+ ""
+ "wxSYS_DEFAULT_GUI_FONT:*1.2,default,default,wxBOLD,false,default"
0
1
"<Any platform>"
@@ -982,7 +932,7 @@
""
""
"m_rbSortBy_X_Position"
- "Sort Components by &X Position"
+ "Sort components by &X position"
1
""
""
@@ -1135,7 +1085,7 @@
""
""
"m_rbSortBy_Y_Position"
- "Sort Components by &Y Position"
+ "Sort components by &Y position"
0
""
""
@@ -1288,7 +1238,7 @@
""
""
"rbSortByValue"
- "Sort Components by &Value"
+ "Sort components by &value"
0
""
""
@@ -1458,7 +1408,7 @@
""
""
""
- "0000E6"
+ ""
""
0
1
@@ -1525,7 +1475,7 @@
""
""
""
- "C60000"
+ ""
""
0
1
diff --git a/eeschema/class_pin.cpp b/eeschema/class_pin.cpp
index 28cf63da65..478d6d65aa 100644
--- a/eeschema/class_pin.cpp
+++ b/eeschema/class_pin.cpp
@@ -246,7 +246,7 @@ void LibDrawPin::Draw( WinEDA_DrawPanel* aPanel,
{
if( frame->m_LibeditFrame && frame->m_LibeditFrame->IsActive() )
aColor = g_InvisibleItemColor;
- else if( !g_ShowAllPins )
+ else if( !frame->m_ShowAllPins )
return;
}
diff --git a/eeschema/dialog_SVG_print.cpp b/eeschema/dialog_SVG_print.cpp
index c5c3199e23..d1d4046a9e 100644
--- a/eeschema/dialog_SVG_print.cpp
+++ b/eeschema/dialog_SVG_print.cpp
@@ -84,13 +84,11 @@ DIALOG_SVG_PRINT::DIALOG_SVG_PRINT( WinEDA_DrawFrame* parent )
void DIALOG_SVG_PRINT::OnInitDialog( wxInitDialogEvent& event )
/*************************************************************/
{
- SetFont( *g_DialogFont );
SetFocus(); // Make ESC key working
m_ImageXSize_mm = 270;
if( m_Config )
{
- m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width );
m_Config->Read( PLOTSVGMODECOLOR_KEY, &s_PlotBlackAndWhite );
}
@@ -294,7 +292,6 @@ void DIALOG_SVG_PRINT::OnCloseWindow( wxCloseEvent& event )
if( m_Config )
{
s_PlotBlackAndWhite = m_ModeColorOption->GetSelection();
- m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width );
m_Config->Write( PLOTSVGMODECOLOR_KEY, s_PlotBlackAndWhite );
}
EndModal( 0 );
diff --git a/eeschema/dialog_build_BOM.pjd b/eeschema/dialog_build_BOM.pjd
deleted file mode 100644
index ffc7869683..0000000000
--- a/eeschema/dialog_build_BOM.pjd
+++ /dev/null
@@ -1,1994 +0,0 @@
-
-
-
- 0
- ""
- ""
- ""
- ""
- ""
- 0
- 0
- 0
- 1
- 1
- 1
- 1
- 0
- "jean-pieere Charras"
- "GNU license"
- ""
- 0
- 0
- "<All platforms>"
- "<Any>"
- "/////////////////////////////////////////////////////////////////////////////
-// Name: %HEADER-FILENAME%
-// Purpose:
-// Author: %AUTHOR%
-// Modified by:
-// Created: %DATE%
-// RCS-ID:
-// Copyright: %COPYRIGHT%
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-"
- "/////////////////////////////////////////////////////////////////////////////
-// Name: %SOURCE-FILENAME%
-// Purpose:
-// Author: %AUTHOR%
-// Modified by:
-// Created: %DATE%
-// RCS-ID:
-// Copyright: %COPYRIGHT%
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-"
- "/////////////////////////////////////////////////////////////////////////////
-// Name: %SYMBOLS-FILENAME%
-// Purpose: Symbols file
-// Author: %AUTHOR%
-// Modified by:
-// Created: %DATE%
-// RCS-ID:
-// Copyright: %COPYRIGHT%
-// Licence:
-/////////////////////////////////////////////////////////////////////////////
-
-"
- "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "%HEADER-FILENAME%"
-#endif
-
-"
- "#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "%HEADER-FILENAME%"
-#endif
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-"
- " /// %BODY%
-"
- "
-/*!
- * %BODY%
- */
-
-"
- "app_resources.h"
- "app_resources.cpp"
- "AppResources"
- "app.h"
- "app.cpp"
- "Application"
- 0
- ""
- "<None>"
- "<System>"
- "utf-8"
- "<System>"
- ""
- 0
- 0
- 4
- " "
- ""
- 0
- 0
- 1
- 0
- 1
- 1
- 0
- 1
- 0
-
-
-
- ""
- "data-document"
- ""
- ""
- 0
- 1
- 0
- 0
-
- "Configurations"
- "config-data-document"
- ""
- ""
- 0
- 1
- 0
- 0
- ""
- 1
- 0
- ""
- "Debug"
- "ANSI"
- "Static"
- "Modular"
- "GUI"
- "wxMSW"
- "Dynamic"
- "Yes"
- "No"
- "No"
- "%WXVERSION%"
- "%EXECUTABLE%"
- ""
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- 0
- 1
-
- "GCC Release"
- "gcc-config-data-document"
- ""
- ""
- 0
- 1
- 0
- 0
- "GCC"
- 1
- 0
- "GCC"
- "Release"
- "ANSI"
- "Static"
- "Modular"
- "GUI"
- "wxMSW"
- "Dynamic"
- "Yes"
- "No"
- "No"
- "Yes"
- "No"
- "No"
- "%WXVERSION%"
- "%EXECUTABLE%"
- ""
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- 0
- 1
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
- "%AUTO%"
-
-
-
-
-
-
-
- "Projects"
- "root-document"
- ""
- "project"
- 1
- 1
- 0
- 1
-
- "Windows"
- "html-document"
- ""
- "dialogsfolder"
- 1
- 1
- 0
- 1
-
- "List of Material"
- "dialog-document"
- ""
- "dialog"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbDialogProxy"
- 10000
- 0
- ""
- 0
- ""
- 0
- 0
- "ID_DIALOG"
- 10000
- "WinEDA_Build_BOM_Frame"
- "wxDialog"
- "wxDialog"
- "dialog_build_BOM.cpp"
- "dialog_build_BOM.h"
- ""
- "List of Material"
- 1
- ""
- 0
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- ""
- ""
- ""
- ""
- ""
- ""
- "Tiled"
- 1
- 1
- 0
- 1
- 0
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 1
- 0
- "MAYBE_RESIZE_BORDER"
- 0
- 1
- -1
- -1
- 400
- 300
- 0
- ""
-
- "wxBoxSizer V"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "wbBoxSizerProxy"
- "Vertical"
- ""
- 0
- 0
- 0
- "<Any platform>"
-
- "wxBoxSizer H"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbBoxSizerProxy"
- "Horizontal"
- ""
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 0
- 0
- 0
- 0
- 0
- "<Any platform>"
-
- "wxBoxSizer V"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbBoxSizerProxy"
- "Vertical"
- ""
- "Centre"
- "Centre"
- 0
- 5
- 0
- 0
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxStaticBoxSizer V"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbStaticBoxSizerProxy"
- "wxID_ANY"
- -1
- "List items:"
- ""
- ""
- ""
- ""
- 0
- 1
- "wxStaticBox"
- "Vertical"
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxCheckBox: ID_CHECKBOX1"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX1"
- 10001
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_ListCmpbyRefItems"
- "Components by Reference"
- 1
- ""
- ""
- "s_ListByRef"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX2"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX2"
- 10002
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_ListSubCmpItems"
- "Sub Components (i.e. U2A, U2B ...)"
- 0
- ""
- ""
- "s_ListWithSubCmponents"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX3"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX3"
- 10003
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_ListCmpbyValItems"
- "Components by Value"
- 1
- ""
- ""
- "s_ListByValue"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX4"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX4"
- 10004
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_GenListLabelsbyVal"
- "Hierachy Pins by Name"
- 0
- ""
- ""
- "s_ListHierarchicalPinByName"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX5"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX5"
- 10005
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_GenListLabelsbySheet"
- "Hierachy Pins by Sheets"
- 0
- ""
- ""
- "s_ListBySheet"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
-
- "wxRadioBox: ID_RADIOBOX_SELECT_FORMAT"
- "dialog-control-document"
- ""
- "radiobox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbRadioBoxProxy"
- "wxEVT_COMMAND_RADIOBOX_SELECTED|OnRadioboxSelectFormatSelected|NONE||"
- "ID_RADIOBOX_SELECT_FORMAT"
- 10006
- ""
- "wxRadioBox"
- "wxRadioBox"
- 1
- 0
- ""
- ""
- "m_OutputFormCtrl"
- "Output format:"
- 1
- "List|Text for spreadsheet import"
- 0
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- "s_OutputFormOpt"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 0
- 0
- 0
- 0
- ""
- ""
-
-
- "wxRadioBox: ID_RADIOBOX_SEPARATOR"
- "dialog-control-document"
- ""
- "radiobox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbRadioBoxProxy"
- "ID_RADIOBOX_SEPARATOR"
- 10007
- ""
- "wxRadioBox"
- "wxRadioBox"
- 1
- 0
- ""
- ""
- "m_OutputSeparatorCtrl"
- "Field separator for spreadsheet import:"
- 1
- "Tab|;|,"
- 0
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- "s_OutputSeparatorOpt"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- 1
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 0
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxStaticBoxSizer H"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbStaticBoxSizerProxy"
- "wxID_ANY"
- -1
- "Options:"
- ""
- ""
- ""
- ""
- 0
- 1
- "wxStaticBox"
- "Horizontal"
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxCheckBox: ID_CHECKBOX6"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX6"
- 10008
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_GetListBrowser"
- "Launch list browser"
- 0
- ""
- ""
- "s_BrowsList"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
-
-
- "wxBoxSizer V"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbBoxSizerProxy"
- "Vertical"
- ""
- "Centre"
- "Top"
- 0
- 5
- 1
- 0
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxStaticBoxSizer V"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbStaticBoxSizerProxy"
- "wxID_ANY"
- -1
- "Fields to add:"
- ""
- "m_FieldsToAppendListSizer"
- ""
- ""
- 0
- 1
- "wxStaticBox"
- "Vertical"
- "Left"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxCheckBox: ID_CHECKBOX_FOOTPRINT_FIELD"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "30/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FOOTPRINT_FIELD"
- 10018
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddFootprintField"
- "Footprint"
- 0
- ""
- ""
- "s_Add_FpField_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD1"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD1"
- 10009
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField1"
- "Field 1"
- 0
- ""
- ""
- "s_Add_F1_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD2"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD2"
- 10010
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField2"
- "Field 2"
- 0
- ""
- ""
- "s_Add_F2_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD3"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD3"
- 10011
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField3"
- "Field 3"
- 0
- ""
- ""
- "s_Add_F3_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD4"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD4"
- 10012
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField4"
- "Field 4"
- 0
- ""
- ""
- "s_Add_F4_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD5"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD5"
- 10013
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField5"
- "Field 5"
- 0
- ""
- ""
- "s_Add_F5_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD6"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD6"
- 10014
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField6"
- "Field 6"
- 0
- ""
- ""
- "s_Add_F6_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD7"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD7"
- 10015
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField7"
- "Field 7"
- 0
- ""
- ""
- "s_Add_F7_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxCheckBox: ID_CHECKBOX_FIELD8"
- "dialog-control-document"
- ""
- "checkbox"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbCheckBoxProxy"
- "ID_CHECKBOX_FIELD8"
- 10016
- ""
- "wxCheckBox"
- "wxCheckBox"
- 1
- 0
- ""
- ""
- "m_AddField8"
- "Field 8"
- 0
- ""
- ""
- "s_Add_F8_state"
- "wxGenericValidator(& %VARIABLE%)"
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 1
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Expand"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
-
- "Spacer"
- "dialog-control-document"
- ""
- "spacer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbSpacerProxy"
- 5
- 5
- "Expand"
- "Centre"
- 0
- 10
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- "<Any platform>"
-
-
- "wxButton: ID_CREATE_LIST"
- "dialog-control-document"
- ""
- "dialogcontrol"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbButtonProxy"
- "wxEVT_COMMAND_BUTTON_CLICKED|OnCreateListClick|NONE||"
- "ID_CREATE_LIST"
- 10017
- ""
- "wxButton"
- "wxButton"
- 1
- 0
- ""
- ""
- ""
- "Create &List"
- 1
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- "A60000"
- ""
- 0
- 1
- "<Any platform>"
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
-
-
- "wxBoxSizer H"
- "dialog-control-document"
- ""
- "sizer"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbBoxSizerProxy"
- "Horizontal"
- ""
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 0
- 1
- 0
- 0
- 0
- "<Any platform>"
-
- "wxButton: wxID_OK"
- "dialog-control-document"
- ""
- "dialogcontrol"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbButtonProxy"
- "wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||"
- "wxID_OK"
- 5100
- ""
- "wxButton"
- "wxButton"
- 1
- 0
- ""
- ""
- ""
- "&OK"
- 0
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- "FF0000"
- ""
- 0
- 1
- "<Any platform>"
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxButton: wxID_CANCEL"
- "dialog-control-document"
- ""
- "dialogcontrol"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbButtonProxy"
- "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||WinEDA_Build_BOM_Frame"
- "wxID_CANCEL"
- 5101
- ""
- "wxButton"
- "wxButton"
- 1
- 0
- ""
- ""
- "m_btClose"
- "&Close"
- 0
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- "0000FF"
- ""
- 0
- 1
- "<Any platform>"
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
- "wxButton: wxID_APPLY"
- "dialog-control-document"
- ""
- "dialogcontrol"
- 0
- 1
- 0
- 0
- "12/10/2007"
- "wbButtonProxy"
- "wxEVT_COMMAND_BUTTON_CLICKED|OnApplyClick|NONE||"
- "wxID_APPLY"
- 5102
- ""
- "wxButton"
- "wxButton"
- 1
- 0
- ""
- ""
- ""
- "&Apply"
- 0
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- ""
- 0
- 1
- "<Any platform>"
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- 0
- ""
- -1
- -1
- -1
- -1
- "Centre"
- "Centre"
- 0
- 5
- 1
- 1
- 1
- 1
- 0
- 0
- 0
- ""
- ""
-
-
-
-
-
-
- "Sources"
- "html-document"
- ""
- "sourcesfolder"
- 1
- 1
- 0
- 1
-
- "dialog_build_BOM.rc"
- "source-editor-document"
- "dialog_build_BOM.rc"
- "source-editor"
- 0
- 0
- 1
- 0
- "12/10/2007"
- ""
-
-
-
- "Images"
- "html-document"
- ""
- "bitmapsfolder"
- 1
- 1
- 0
- 1
-
-
-
-
-
diff --git a/eeschema/dialog_build_BOM_base.cpp b/eeschema/dialog_build_BOM_base.cpp
index 85dc116d48..1629289bbc 100644
--- a/eeschema/dialog_build_BOM_base.cpp
+++ b/eeschema/dialog_build_BOM_base.cpp
@@ -130,13 +130,9 @@ DIALOG_BUILD_BOM_BASE::DIALOG_BUILD_BOM_BASE( wxWindow* parent, wxWindowID id, c
m_buttonOK = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault();
- m_buttonOK->SetForegroundColour( wxColour( 170, 0, 0 ) );
-
bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonCANCEL->SetForegroundColour( wxColour( 11, 0, 202 ) );
-
bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
bMainSizer->Add( bRightSizer, 8, wxALL|wxEXPAND, 5 );
diff --git a/eeschema/dialog_build_BOM_base.fbp b/eeschema/dialog_build_BOM_base.fbp
index 88eb434227..ebbd829815 100644
--- a/eeschema/dialog_build_BOM_base.fbp
+++ b/eeschema/dialog_build_BOM_base.fbp
@@ -1127,7 +1127,7 @@
1
1
- 170,0,0
+
0
wxID_OK
@@ -1179,7 +1179,7 @@
0
1
- 11,0,202
+
0
wxID_CANCEL
diff --git a/eeschema/dialog_cmp_graphic_properties.cpp b/eeschema/dialog_cmp_graphic_properties.cpp
index ecc5700993..a24361b534 100644
--- a/eeschema/dialog_cmp_graphic_properties.cpp
+++ b/eeschema/dialog_cmp_graphic_properties.cpp
@@ -139,10 +139,8 @@ bool WinEDA_bodygraphics_PropertiesFrame::Create( wxWindow* parent, wxWindowID i
void WinEDA_bodygraphics_PropertiesFrame::CreateControls()
{
- SetFont(*g_DialogFont);
-
////@begin WinEDA_bodygraphics_PropertiesFrame content construction
- // Generated by DialogBlocks, 29/04/2008 21:07:12 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:19:31 (unregistered)
WinEDA_bodygraphics_PropertiesFrame* itemDialog1 = this;
@@ -177,11 +175,9 @@ void WinEDA_bodygraphics_PropertiesFrame::CreateControls()
wxButton* itemButton9 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton9->SetDefault();
- itemButton9->SetForegroundColour(wxColour(206, 0, 0));
itemBoxSizer8->Add(itemButton9, 0, wxGROW|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer8->Add(m_btClose, 0, wxGROW|wxALL, 5);
////@end WinEDA_bodygraphics_PropertiesFrame content construction
diff --git a/eeschema/dialog_cmp_graphic_properties.pjd b/eeschema/dialog_cmp_graphic_properties.pjd
index a14f742e16..2d4506a0c8 100644
--- a/eeschema/dialog_cmp_graphic_properties.pjd
+++ b/eeschema/dialog_cmp_graphic_properties.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -136,7 +138,7 @@
0
""
1
- 0
+ -8519680
""
"Debug"
"ANSI"
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -609,7 +614,7 @@
""
""
""
- "CE0000"
+ ""
""
0
1
@@ -676,7 +681,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
diff --git a/eeschema/dialog_create_component.cpp b/eeschema/dialog_create_component.cpp
index 7d22297ba9..b520700008 100644
--- a/eeschema/dialog_create_component.cpp
+++ b/eeschema/dialog_create_component.cpp
@@ -129,11 +129,9 @@ void WinEDA_CreateCmpDialog::SetComponentData( EDA_LibComponentStruct & componen
*/
void WinEDA_CreateCmpDialog::CreateControls()
-{
- SetFont(*g_DialogFont);
-
+{
////@begin WinEDA_CreateCmpDialog content construction
- // Generated by DialogBlocks, 29/04/2008 21:00:24 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:20:19 (unregistered)
WinEDA_CreateCmpDialog* itemDialog1 = this;
@@ -173,7 +171,7 @@ void WinEDA_CreateCmpDialog::CreateControls()
m_AsConvert->SetValue(false);
itemStaticBoxSizer11->Add(m_AsConvert, 0, wxALIGN_LEFT|wxALL, 5);
- m_IsPowerSymbol = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _("Power symbol"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
+ m_IsPowerSymbol = new wxCheckBox( itemDialog1, ID_CHECKBOX4, _("Power Symbol"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_IsPowerSymbol->SetValue(false);
itemStaticBoxSizer11->Add(m_IsPowerSymbol, 0, wxALIGN_LEFT|wxALL, 5);
@@ -186,11 +184,9 @@ void WinEDA_CreateCmpDialog::CreateControls()
wxButton* itemButton16 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton16->SetDefault();
- itemButton16->SetForegroundColour(wxColour(188, 0, 0));
itemBoxSizer15->Add(itemButton16, 0, wxGROW|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 221));
itemBoxSizer15->Add(m_btClose, 0, wxGROW|wxALL, 5);
wxStaticLine* itemStaticLine18 = new wxStaticLine( itemDialog1, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL|wxDOUBLE_BORDER );
diff --git a/eeschema/dialog_create_component.pjd b/eeschema/dialog_create_component.pjd
index 89f61b26e5..25d28a7050 100644
--- a/eeschema/dialog_create_component.pjd
+++ b/eeschema/dialog_create_component.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -136,7 +138,7 @@
0
""
1
- 0
+ -8519680
""
"Debug"
"ANSI"
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
"GCC Release"
"gcc-config-data-document"
@@ -191,7 +196,7 @@
0
"GCC"
1
- 0
+ -8519680
"GCC"
"Release"
"ANSI"
@@ -215,6 +220,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -226,6 +232,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -238,6 +245,7 @@
"%AUTO%"
0
1
+ ""
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -986,7 +994,7 @@
""
""
""
- "BC0000"
+ ""
""
0
1
@@ -1053,7 +1061,7 @@
""
""
""
- "0000DD"
+ ""
""
0
1
diff --git a/eeschema/dialog_edit_component_in_lib.cpp b/eeschema/dialog_edit_component_in_lib.cpp
index 9bf59081b5..4f523712bd 100644
--- a/eeschema/dialog_edit_component_in_lib.cpp
+++ b/eeschema/dialog_edit_component_in_lib.cpp
@@ -117,10 +117,8 @@ bool WinEDA_PartPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const
void WinEDA_PartPropertiesFrame::CreateControls()
{
- SetFont(*g_DialogFont);
-
////@begin WinEDA_PartPropertiesFrame content construction
- // Generated by DialogBlocks, 29/04/2008 21:32:37 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:21:42 (unregistered)
WinEDA_PartPropertiesFrame* itemDialog1 = this;
@@ -141,7 +139,7 @@ void WinEDA_PartPropertiesFrame::CreateControls()
m_PanelBasicBoxSizer->Add(itemBoxSizer7, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer7->Add(itemBoxSizer8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxStaticText* itemStaticText9 = new wxStaticText( m_PanelBasic, wxID_STATIC, _("Number of units:"), wxDefaultPosition, wxDefaultSize, 0 );
+ wxStaticText* itemStaticText9 = new wxStaticText( m_PanelBasic, wxID_STATIC, _("Number of Units:"), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add(itemStaticText9, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
SelNumberOfUnits = new wxSpinCtrl( m_PanelBasic, ID_SPINCTRL1, _T("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 16, 1 );
@@ -155,7 +153,7 @@ void WinEDA_PartPropertiesFrame::CreateControls()
m_SetSkew = new wxSpinCtrl( m_PanelBasic, ID_SPINCTRL, _T("0"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 100, 0 );
itemBoxSizer11->Add(m_SetSkew, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- m_OptionPower = new wxCheckBox( m_PanelBasic, ID_CHECKBOX, _("Power symbol"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
+ m_OptionPower = new wxCheckBox( m_PanelBasic, ID_CHECKBOX, _("Power Symbol"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_OptionPower->SetValue(false);
m_PanelBasicBoxSizer->Add(m_OptionPower, 0, wxGROW|wxALL, 5);
@@ -170,21 +168,18 @@ void WinEDA_PartPropertiesFrame::CreateControls()
m_PanelDoc->SetSizer(m_PanelDocBoxSizer);
wxStaticText* itemStaticText18 = new wxStaticText( m_PanelDoc, wxID_STATIC, _("Doc:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticText18->SetForegroundColour(wxColour(196, 0, 0));
m_PanelDocBoxSizer->Add(itemStaticText18, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_Doc = new wxTextCtrl( m_PanelDoc, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_PanelDocBoxSizer->Add(m_Doc, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticText* itemStaticText20 = new wxStaticText( m_PanelDoc, wxID_STATIC, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticText20->SetForegroundColour(wxColour(196, 0, 0));
m_PanelDocBoxSizer->Add(itemStaticText20, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_Keywords = new wxTextCtrl( m_PanelDoc, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
m_PanelDocBoxSizer->Add(m_Keywords, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
wxStaticText* itemStaticText22 = new wxStaticText( m_PanelDoc, wxID_STATIC, _("DocFileName:"), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticText22->SetForegroundColour(wxColour(196, 0, 0));
m_PanelDocBoxSizer->Add(itemStaticText22, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
m_Docfile = new wxTextCtrl( m_PanelDoc, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
@@ -193,11 +188,9 @@ void WinEDA_PartPropertiesFrame::CreateControls()
wxBoxSizer* itemBoxSizer24 = new wxBoxSizer(wxHORIZONTAL);
m_PanelDocBoxSizer->Add(itemBoxSizer24, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_ButtonCopyDoc = new wxButton( m_PanelDoc, ID_COPY_DOC_TO_ALIAS, _("Copy Doc"), wxDefaultPosition, wxDefaultSize, 0 );
- m_ButtonCopyDoc->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer24->Add(m_ButtonCopyDoc, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton26 = new wxButton( m_PanelDoc, ID_BROWSE_DOC_FILES, _("Browse DocFiles"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton26->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer24->Add(itemButton26, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
m_NoteBook->AddPage(m_PanelDoc, _("Doc"));
@@ -212,12 +205,10 @@ void WinEDA_PartPropertiesFrame::CreateControls()
m_GeneralBoxSizer->Add(itemBoxSizer28, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer28->Add(m_btClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton30 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton30->SetDefault();
- itemButton30->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer28->Add(itemButton30, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
////@end WinEDA_PartPropertiesFrame content construction
diff --git a/eeschema/dialog_edit_component_in_lib.pjd b/eeschema/dialog_edit_component_in_lib.pjd
index c99c71f097..020efb91dc 100644
--- a/eeschema/dialog_edit_component_in_lib.pjd
+++ b/eeschema/dialog_edit_component_in_lib.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -136,7 +138,7 @@
0
""
1
- 0
+ -8519680
""
"Debug"
"ANSI"
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -1120,7 +1125,7 @@
""
""
""
- "C40000"
+ ""
""
0
1
@@ -1273,7 +1278,7 @@
""
""
""
- "C40000"
+ ""
""
0
1
@@ -1426,7 +1431,7 @@
""
""
""
- "C40000"
+ ""
""
0
1
@@ -1612,7 +1617,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -1679,7 +1684,7 @@
""
""
""
- "CA0000"
+ ""
""
0
1
@@ -1851,7 +1856,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -1918,7 +1923,7 @@
""
""
""
- "CA0000"
+ ""
""
0
1
diff --git a/eeschema/dialog_edit_label_base.cpp b/eeschema/dialog_edit_label_base.cpp
index 6069024ddf..c20fb9cbad 100644
--- a/eeschema/dialog_edit_label_base.cpp
+++ b/eeschema/dialog_edit_label_base.cpp
@@ -74,13 +74,9 @@ DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id,
bSizer4->Add( 8, 8, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonOK->SetForegroundColour( wxColour( 234, 0, 0 ) );
-
bSizer4->Add( m_buttonOK, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_buttonCANCEL->SetForegroundColour( wxColour( 0, 0, 187 ) );
-
bSizer4->Add( m_buttonCANCEL, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
bMainSizer->Add( bSizer4, 1, 0, 5 );
diff --git a/eeschema/dialog_edit_label_base.fbp b/eeschema/dialog_edit_label_base.fbp
index 07f54d2c09..3877254ff8 100644
--- a/eeschema/dialog_edit_label_base.fbp
+++ b/eeschema/dialog_edit_label_base.fbp
@@ -499,7 +499,7 @@
0
1
- 234,0,0
+
0
wxID_OK
@@ -551,7 +551,7 @@
0
1
- 0,0,187
+
0
wxID_CANCEL
diff --git a/eeschema/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialog_edit_libentry_fields_in_lib.cpp
index aa20318eaa..1b5b392941 100644
--- a/eeschema/dialog_edit_libentry_fields_in_lib.cpp
+++ b/eeschema/dialog_edit_libentry_fields_in_lib.cpp
@@ -142,7 +142,6 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB()
void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::OnInitDialog( wxInitDialogEvent& event )
/**********************************************************************************/
{
- SetFont( *g_DialogFont );
m_skipCopyFromPanel = false;
wxListItem columnLabel;
diff --git a/eeschema/dialog_eeschema_config.cpp b/eeschema/dialog_eeschema_config.cpp
index 169d302bf5..6f456aeff6 100644
--- a/eeschema/dialog_eeschema_config.cpp
+++ b/eeschema/dialog_eeschema_config.cpp
@@ -87,12 +87,11 @@ DIALOG_EESCHEMA_CONFIG::DIALOG_EESCHEMA_CONFIG( WinEDA_SchematicFrame* parent )
void DIALOG_EESCHEMA_CONFIG::Init()
/***********************************/
{
- SetFont( *g_DialogFont );
SetFocus();
m_LibListChanged = false;
m_LibPathChanged = false;
- m_UserLibDirBufferImg = g_UserLibDirBuffer; // Save the original lib path
+ m_UserLibDirBufferImg = m_Parent->m_UserLibraryPath; // Save the original lib path
// Display current files extension (info)
wxString msg = m_InfoCmpFileExt->GetLabel() + g_NetCmpExtBuffer;
@@ -127,11 +126,11 @@ void DIALOG_EESCHEMA_CONFIG::Init()
m_NetFormatBox->InsertItems( NetlistNameItems, 0 );
- if( g_NetFormat > (int) m_NetFormatBox->GetCount() )
- g_NetFormat = NET_TYPE_PCBNEW;
- m_NetFormatBox->SetSelection( g_NetFormat - NET_TYPE_PCBNEW );
+ if( m_Parent->m_NetlistFormat > (int) m_NetFormatBox->GetCount() )
+ m_Parent->m_NetlistFormat = NET_TYPE_PCBNEW;
+ m_NetFormatBox->SetSelection( m_Parent->m_NetlistFormat - NET_TYPE_PCBNEW );
- m_ListLibr->InsertItems( g_LibName_List, 0 );
+ m_ListLibr->InsertItems( m_Parent->m_ComponentLibFiles, 0 );
// Load user libs paths:
wxStringTokenizer Token( m_UserLibDirBufferImg, wxT( ";\n\r" ) );
@@ -164,7 +163,7 @@ void DIALOG_EESCHEMA_CONFIG::OnCancelClick( wxCommandEvent& event )
{
for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ )
wxGetApp().RemoveLibraryPath( m_listUserPaths->GetString(ii)) ;
- wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1);
+ wxGetApp().InsertLibraryPath( m_Parent->m_UserLibraryPath, 1);
}
EndModal( -1 );
}
@@ -175,17 +174,17 @@ void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event )
/**************************************************************/
{
// Set new netlist format
- g_NetFormat = m_NetFormatBox->GetSelection() + NET_TYPE_PCBNEW;
+ m_Parent->m_NetlistFormat = m_NetFormatBox->GetSelection() + NET_TYPE_PCBNEW;
// Recreate the user lib path
if ( m_LibPathChanged )
{
- g_UserLibDirBuffer.Empty();
+ m_Parent->m_UserLibraryPath.Empty();
for ( unsigned ii = 0; ii < m_listUserPaths->GetCount(); ii ++ )
{
if ( ii > 0 )
- g_UserLibDirBuffer << wxT(";");
- g_UserLibDirBuffer << m_listUserPaths->GetString(ii);
+ m_Parent->m_UserLibraryPath << wxT(";");
+ m_Parent->m_UserLibraryPath << m_listUserPaths->GetString(ii);
}
}
@@ -194,9 +193,9 @@ void DIALOG_EESCHEMA_CONFIG::OnOkClick( wxCommandEvent& event )
if( m_LibListChanged || m_LibPathChanged )
{
// Recreate lib list
- g_LibName_List.Clear();
+ m_Parent->m_ComponentLibFiles.Clear();
for ( unsigned ii = 0; ii < m_ListLibr->GetCount(); ii ++ )
- g_LibName_List.Add(m_ListLibr->GetString(ii) );
+ m_Parent->m_ComponentLibFiles.Add(m_ListLibr->GetString(ii) );
// take new list in account
LoadLibraries( m_Parent );
@@ -220,7 +219,7 @@ void DIALOG_EESCHEMA_CONFIG::OnCloseWindow( wxCloseEvent& event )
void DIALOG_EESCHEMA_CONFIG::OnRemoveLibClick( wxCommandEvent& event )
/*********************************************************************/
/* Remove a library to the library list.
- * The real list (g_LibName_List) is not changed, so the change can be cancelled
+ * The real list (m_Parent->m_ComponentLibFiles) is not changed, so the change can be cancelled
*/
{
int ii;
@@ -241,7 +240,8 @@ void DIALOG_EESCHEMA_CONFIG::OnAddOrInsertLibClick( wxCommandEvent& event )
/* Insert or add a library to the library list:
* The new library is put in list before (insert button) the selection,
* or added (add button) to end of list
- * The real list (g_LibName_List) is not changed, so the change can be cancelled
+ * The real list (m_Parent->m_ComponentLibFiles) is not changed, so the change
+ * can be cancelled
*/
{
int ii;
@@ -320,7 +320,7 @@ void DIALOG_EESCHEMA_CONFIG::OnSaveCfgClick( wxCommandEvent& event )
/*******************************************************************/
{
OnOkClick( event );
- m_Parent->Save_Config( this );
+ m_Parent->SaveProjectFile( this );
}
diff --git a/eeschema/dialog_erc.cpp b/eeschema/dialog_erc.cpp
index bebc0ad6fd..dee7182d43 100644
--- a/eeschema/dialog_erc.cpp
+++ b/eeschema/dialog_erc.cpp
@@ -151,10 +151,8 @@ bool WinEDA_ErcFrame::Create( wxWindow* parent, wxWindowID id, const wxString& c
void WinEDA_ErcFrame::CreateControls()
{
- SetFont(*g_DialogFont);
-
////@begin WinEDA_ErcFrame content construction
- // Generated by DialogBlocks, 29/04/2008 21:09:11 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:22:48 (unregistered)
WinEDA_ErcFrame* itemDialog1 = this;
@@ -174,15 +172,13 @@ void WinEDA_ErcFrame::CreateControls()
itemBoxSizer6->Add(itemStaticBoxSizer7, 0, wxALIGN_LEFT|wxALL, 5);
wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxVERTICAL);
itemStaticBoxSizer7->Add(itemBoxSizer8, 0, wxGROW|wxLEFT|wxTOP|wxBOTTOM, 5);
- ErcTotalErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("-> Total Errors: "), wxDefaultPosition, wxDefaultSize, 0 );
+ ErcTotalErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("Total Errors: "), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add(ErcTotalErrors, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- WarnErcErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("-> Last Warnings: "), wxDefaultPosition, wxDefaultSize, 0 );
- WarnErcErrors->SetForegroundColour(wxColour(0, 0, 255));
+ WarnErcErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("Last Warnings: "), wxDefaultPosition, wxDefaultSize, 0 );
itemBoxSizer8->Add(WarnErcErrors, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
- ErcErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("-> Last Errors: "), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
- ErcErrors->SetForegroundColour(wxColour(202, 0, 0));
+ ErcErrors = new wxStaticText( m_PanelERC, wxID_STATIC, _("Last Errors: "), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT );
itemBoxSizer8->Add(ErcErrors, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
wxBoxSizer* itemBoxSizer12 = new wxBoxSizer(wxVERTICAL);
@@ -191,11 +187,9 @@ void WinEDA_ErcFrame::CreateControls()
itemBoxSizer12->Add(m_TotalErrCount, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
m_LastWarningCount = new wxStaticText( m_PanelERC, wxID_STATIC, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
- m_LastWarningCount->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer12->Add(m_LastWarningCount, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
m_LastErrCount = new wxStaticText( m_PanelERC, wxID_STATIC, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
- m_LastErrCount->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer12->Add(m_LastErrCount, 0, wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE, 5);
itemBoxSizer6->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
@@ -210,7 +204,6 @@ void WinEDA_ErcFrame::CreateControls()
wxBoxSizer* itemBoxSizer19 = new wxBoxSizer(wxVERTICAL);
m_PanelERCSizer->Add(itemBoxSizer19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton20 = new wxButton( m_PanelERC, ID_ERC_CMP, _("&Test Erc"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton20->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer19->Add(itemButton20, 0, wxGROW|wxALL, 5);
wxButton* itemButton21 = new wxButton( m_PanelERC, ID_ERASE_DRC_MARKERS, _("&Del Markers"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -218,7 +211,6 @@ void WinEDA_ErcFrame::CreateControls()
m_btClose = new wxButton( m_PanelERC, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
m_btClose->SetDefault();
- m_btClose->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer19->Add(m_btClose, 0, wxGROW|wxALL, 5);
m_NoteBook->AddPage(m_PanelERC, _("erc"));
diff --git a/eeschema/dialog_erc.pjd b/eeschema/dialog_erc.pjd
index 3c330a2f42..638c27cce1 100644
--- a/eeschema/dialog_erc.pjd
+++ b/eeschema/dialog_erc.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -577,7 +582,7 @@
""
""
"ErcTotalErrors"
- "-> Total Errors: "
+ "Total Errors: "
-1
""
""
@@ -647,12 +652,12 @@
""
""
"WarnErcErrors"
- "-> Last Warnings: "
+ "Last Warnings: "
-1
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -717,12 +722,12 @@
""
""
"ErcErrors"
- "-> Last Errors: "
+ "Last Errors: "
-1
""
""
""
- "CA0000"
+ ""
""
0
1
@@ -888,7 +893,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -958,7 +963,7 @@
""
""
""
- "CA0000"
+ ""
""
0
1
@@ -1189,7 +1194,7 @@
""
""
""
- "C60000"
+ ""
""
0
1
@@ -1323,7 +1328,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
diff --git a/eeschema/dialog_find.cpp b/eeschema/dialog_find.cpp
index a70ea58734..408406b5e1 100644
--- a/eeschema/dialog_find.cpp
+++ b/eeschema/dialog_find.cpp
@@ -74,12 +74,14 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
////@end WinEDA_FindFrame member initialisation
////@begin WinEDA_FindFrame creation
- SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS);
+ SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
- GetSizer()->Fit(this);
- GetSizer()->SetSizeHints(this);
+ if (GetSizer())
+ {
+ GetSizer()->SetSizeHints(this);
+ }
Centre();
////@end WinEDA_FindFrame creation
@@ -101,10 +103,8 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
void WinEDA_FindFrame::CreateControls()
{
- SetFont(*g_DialogFont);
-
////@begin WinEDA_FindFrame content construction
- // Generated by DialogBlocks, 03/03/2006 08:14:51 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:23:21 (unregistered)
WinEDA_FindFrame* itemDialog1 = this;
@@ -139,15 +139,12 @@ void WinEDA_FindFrame::CreateControls()
itemBoxSizer6->Add(itemBoxSizer11, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP|wxFIXED_MINSIZE, 5);
wxButton* itemButton12 = new wxButton( itemDialog1, FIND_MARKERS, _("Find Markers"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton12->SetForegroundColour(wxColour(41, 84, 84));
itemBoxSizer11->Add(itemButton12, 0, wxGROW|wxLEFT|wxRIGHT, 1);
wxButton* itemButton13 = new wxButton( itemDialog1, FIND_NEXT_MARKER, _("Next Marker (F5)"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton13->SetForegroundColour(wxColour(0, 0, 213));
itemBoxSizer11->Add(itemButton13, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 1);
wxButton* itemButton14 = new wxButton( itemDialog1, LOCATE_IN_LIBRARIES, _("Find Cmp in &Lib"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton14->SetForegroundColour(wxColour(170, 0, 0));
itemBoxSizer11->Add(itemButton14, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 1);
// Set validators
diff --git a/eeschema/dialog_find.h b/eeschema/dialog_find.h
index 3018f60bd9..50072a0696 100644
--- a/eeschema/dialog_find.h
+++ b/eeschema/dialog_find.h
@@ -35,11 +35,6 @@
////@begin control identifiers
#define ID_DIALOG 10000
-#define SYMBOL_WINEDA_FINDFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
-#define SYMBOL_WINEDA_FINDFRAME_TITLE _("EESchema Locate")
-#define SYMBOL_WINEDA_FINDFRAME_IDNAME ID_DIALOG
-#define SYMBOL_WINEDA_FINDFRAME_SIZE wxSize(400, 300)
-#define SYMBOL_WINEDA_FINDFRAME_POSITION wxDefaultPosition
#define ID_TEXTCTRL1 10008
#define FIND_SHEET 10001
#define FIND_HIERARCHY 10002
@@ -47,6 +42,11 @@
#define FIND_MARKERS 10003
#define FIND_NEXT_MARKER 10006
#define LOCATE_IN_LIBRARIES 10004
+#define SYMBOL_WINEDA_FINDFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
+#define SYMBOL_WINEDA_FINDFRAME_TITLE _("EESchema Locate")
+#define SYMBOL_WINEDA_FINDFRAME_IDNAME ID_DIALOG
+#define SYMBOL_WINEDA_FINDFRAME_SIZE wxSize(400, 300)
+#define SYMBOL_WINEDA_FINDFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
diff --git a/eeschema/dialog_find.pjd b/eeschema/dialog_find.pjd
index dd2171a856..562979ec74 100644
--- a/eeschema/dialog_find.pjd
+++ b/eeschema/dialog_find.pjd
@@ -1,4 +1,4 @@
-
+
0
@@ -6,18 +6,21 @@
""
""
""
- 21
""
0
0
0
+ 1
1
1
+ 1
0
"jean-pierre Charras"
"License GNU"
""
0
+ 0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -43,12 +46,6 @@
// Licence:
/////////////////////////////////////////////////////////////////////////////
-"
- "
-/*!
- * %BODY%
- */
-
"
"/////////////////////////////////////////////////////////////////////////////
// Name: %SYMBOLS-FILENAME%
@@ -82,6 +79,14 @@
#include "wx/wx.h"
#endif
+"
+ " /// %BODY%
+"
+ "
+/*!
+ * %BODY%
+ */
+
"
"app_resources.h"
"app_resources.cpp"
@@ -93,11 +98,24 @@
""
"<None>"
"<System>"
+ "utf-8"
"<System>"
""
+ 0
+ 0
+ 4
+ " "
+ ""
0
+ 0
+ 1
+ 0
1
1
+ 0
+ 1
+ 0
+ 0
@@ -120,6 +138,7 @@
0
""
1
+ 0
""
"Debug"
"ANSI"
@@ -140,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -151,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -161,6 +182,9 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ 0
+ 1
+ ""
@@ -174,7 +198,7 @@
1
1
0
- 0
+ 1
"Windows"
"html-document"
@@ -198,7 +222,10 @@
10000
0
""
+ 0
+ ""
0
+ 0
"ID_DIALOG"
10000
"WinEDA_FindFrame"
@@ -219,10 +246,16 @@
0
1
"<Any platform>"
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ "Tiled"
0
1
0
- 0
1
0
0
@@ -237,7 +270,9 @@
0
0
0
- 0
+ 0
+ 0
+ 0
0
0
1
@@ -249,6 +284,7 @@
-1
400
300
+ 0
""
"wxBoxSizer V"
@@ -304,9 +340,16 @@
"wbStaticTextProxy"
"wxID_STATIC"
5105
+ ""
"wxStaticText"
+ "wxStaticText"
+ 1
+ 0
+ ""
+ ""
""
"Item to find:"
+ -1
""
""
""
@@ -317,6 +360,11 @@
"<Any platform>"
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
0
0
0
@@ -328,6 +376,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -360,7 +410,13 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL1"
10008
+ ""
"wxTextCtrl"
+ "wxTextCtrl"
+ 1
+ 0
+ ""
+ ""
"m_NewTextCtrl"
""
0
@@ -374,6 +430,11 @@
"<Any platform>"
"s_OldStringFound"
"wxTextValidator(wxFILTER_NONE, & %VARIABLE%)"
+ ""
+ ""
+ ""
+ ""
+ ""
0
0
0
@@ -387,8 +448,9 @@
0
0
0
- 0
+ 0
0
+ 0
0
0
0
@@ -396,6 +458,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -414,6 +478,7 @@
0
""
""
+ 0
@@ -480,12 +545,25 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnFindSheetClick"
"FIND_SHEET"
10001
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Item in &Sheet"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -499,6 +577,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -532,12 +612,25 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnFindHierarchyClick"
"FIND_HIERARCHY"
10002
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Item in &Hierarchy"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -551,6 +644,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -584,12 +679,25 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnFindNextClick"
"FIND_NEXT"
10005
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Find &Next Item (F5)"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -603,6 +711,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -662,14 +772,27 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnFindMarkersClick"
"FIND_MARKERS"
10003
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Find Markers"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
- "295454"
+ ""
""
0
1
@@ -681,6 +804,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -714,14 +839,27 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnFindNextMarkerClick"
"FIND_NEXT_MARKER"
10006
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Next Marker (F5)"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
- "0000D5"
+ ""
""
0
1
@@ -733,6 +871,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
@@ -766,14 +906,27 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnLocateInLibrariesClick"
"LOCATE_IN_LIBRARIES"
10004
+ ""
"wxButton"
+ "wxButton"
+ 1
+ 0
+ ""
+ ""
""
"Find Cmp in &Lib"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
- "AA0000"
+ ""
""
0
1
@@ -785,6 +938,8 @@
0
0
0
+ 0
+ 0
""
-1
-1
diff --git a/eeschema/dialog_options.cpp b/eeschema/dialog_options.cpp
index 0473d9007d..e0928fb80d 100644
--- a/eeschema/dialog_options.cpp
+++ b/eeschema/dialog_options.cpp
@@ -38,7 +38,7 @@
/**************************************************************************/
-void DisplayOptionFrame( WinEDA_DrawFrame* parent, const wxPoint& framepos )
+void DisplayOptionFrame( WinEDA_SchematicFrame* parent, const wxPoint& framepos )
/**************************************************************************/
{
WinEDA_SetOptionsFrame* frame =
@@ -78,7 +78,7 @@ WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame()
}
-WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame( WinEDA_DrawFrame* parent,
+WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame( WinEDA_SchematicFrame* parent,
wxWindowID id,
const wxString& caption,
const wxPoint& pos,
@@ -128,7 +128,7 @@ WinEDA_SetOptionsFrame::WinEDA_SetOptionsFrame( WinEDA_DrawFrame* parent,
/* Adjust the current selections and options: */
m_ShowGridOpt->SetValue( m_Parent->m_Draw_Grid );
m_AutoPANOpt->SetValue( m_Parent->DrawPanel->m_AutoPAN_Enable );
- m_SelShowPins->SetSelection( g_ShowAllPins ? TRUE : FALSE );
+ m_SelShowPins->SetSelection( m_Parent->m_ShowAllPins );
m_Selunits->SetSelection( g_UnitMetric ? 0 : 1 );
m_SelDirWires->SetSelection( g_HVLines ? 0 : 1 );
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1 );
@@ -200,10 +200,8 @@ bool WinEDA_SetOptionsFrame::Create( wxWindow* parent,
void WinEDA_SetOptionsFrame::CreateControls()
{
- SetFont( *g_DialogFont );
-
////@begin WinEDA_SetOptionsFrame content construction
- // Generated by DialogBlocks, 29/04/2008 21:08:50 (unregistered)
+ // Generated by DialogBlocks, 27/04/2009 09:01:10 (unregistered)
WinEDA_SetOptionsFrame* itemDialog1 = this;
@@ -244,7 +242,6 @@ void WinEDA_SetOptionsFrame::CreateControls()
m_AutoPANOpt = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_AutoPANOpt->SetValue(false);
- m_AutoPANOpt->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer8->Add(m_AutoPANOpt, 0, wxGROW|wxALL, 5);
wxArrayString m_SelunitsStrings;
@@ -276,11 +273,9 @@ void WinEDA_SetOptionsFrame::CreateControls()
wxButton* itemButton15 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton15->SetDefault();
- itemButton15->SetForegroundColour(wxColour(202, 0, 0));
itemBoxSizer14->Add(itemButton15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer14->Add(m_btClose, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
itemBoxSizer14->Add(5, 5, 0, wxGROW|wxALL, 5);
@@ -435,9 +430,9 @@ void WinEDA_SetOptionsFrame::Accept( wxCommandEvent& event )
g_UnitMetric = 0;
if( m_SelShowPins->GetSelection() == 0 )
- g_ShowAllPins = FALSE;
+ m_Parent->m_ShowAllPins = false;
else
- g_ShowAllPins = TRUE;
+ m_Parent->m_ShowAllPins = true;
m_Parent->m_Draw_Grid = m_ShowGridOpt->GetValue();
m_Parent->DrawPanel->m_AutoPAN_Enable = m_AutoPANOpt->GetValue();
diff --git a/eeschema/dialog_options.h b/eeschema/dialog_options.h
index d374ece82d..2462bfbca7 100644
--- a/eeschema/dialog_options.h
+++ b/eeschema/dialog_options.h
@@ -78,7 +78,7 @@ class WinEDA_SetOptionsFrame: public wxDialog
public:
/// Constructors
WinEDA_SetOptionsFrame( );
- WinEDA_SetOptionsFrame( WinEDA_DrawFrame* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
+ WinEDA_SetOptionsFrame( WinEDA_SchematicFrame* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_SETOPTIONSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_SETOPTIONSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_SETOPTIONSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_SETOPTIONSFRAME_SIZE, long style = SYMBOL_WINEDA_SETOPTIONSFRAME_STYLE );
@@ -110,7 +110,7 @@ public:
/// Should we show tooltips?
static bool ShowToolTips();
- WinEDA_DrawFrame * m_Parent;
+ WinEDA_SchematicFrame * m_Parent;
////@begin WinEDA_SetOptionsFrame member variables
wxStaticBoxSizer* m_DrawOptionsSizer;
diff --git a/eeschema/dialog_options.pjd b/eeschema/dialog_options.pjd
index 93da9b45f2..3a9f8a3fa2 100644
--- a/eeschema/dialog_options.pjd
+++ b/eeschema/dialog_options.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -136,7 +138,7 @@
0
""
1
- 0
+ -8519680
""
"Debug"
"ANSI"
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -602,7 +607,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -907,7 +912,7 @@
""
""
""
- "CA0000"
+ ""
""
0
1
@@ -973,7 +978,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
diff --git a/eeschema/dialog_print_using_printer.cpp b/eeschema/dialog_print_using_printer.cpp
index 7b5ee657ed..92916d9f13 100644
--- a/eeschema/dialog_print_using_printer.cpp
+++ b/eeschema/dialog_print_using_printer.cpp
@@ -129,12 +129,10 @@ DIALOG_PRINT_USING_PRINTER::DIALOG_PRINT_USING_PRINTER( WinEDA_DrawFrame* parent
void DIALOG_PRINT_USING_PRINTER::OnInitDialog( wxInitDialogEvent& event )
/************************************************************************/
{
- SetFont(*g_DialogFont);
SetFocus();
if( m_Config )
{
- m_Config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE, &g_PlotLine_Width );
m_Config->Read( PRINTMODECOLOR_KEY, &s_Print_Black_and_White );
}
@@ -163,7 +161,6 @@ void DIALOG_PRINT_USING_PRINTER::OnCloseWindow( wxCloseEvent& event )
if( m_Config )
{
- m_Config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, g_PlotLine_Width );
m_Config->Write( PRINTMODECOLOR_KEY, s_Print_Black_and_White );
}
diff --git a/eeschema/edit_component_in_lib.cpp b/eeschema/edit_component_in_lib.cpp
index 2de9a87f66..add0be563f 100644
--- a/eeschema/edit_component_in_lib.cpp
+++ b/eeschema/edit_component_in_lib.cpp
@@ -95,7 +95,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelAlias()
{
wxButton* Button;
- m_PanelAlias->SetFont( *g_DialogFont );
wxBoxSizer* PanelAliasBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_PanelAlias->SetSizer( PanelAliasBoxSizer );
@@ -105,7 +104,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelAlias()
wxStaticText* Msg = new wxStaticText( m_PanelAlias, -1, _( "Alias" ) );
- Msg->SetForegroundColour( wxColour( 200, 0, 0 ) );
LeftBoxSizer->Add( Msg, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
m_PartAliasList = new wxListBox( m_PanelAlias,
@@ -122,19 +120,16 @@ void WinEDA_PartPropertiesFrame::BuildPanelAlias()
Button = new wxButton( m_PanelAlias, ID_ADD_ALIAS, _( "Add" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
m_ButtonDeleteOneAlias = new wxButton( m_PanelAlias, ID_DELETE_ONE_ALIAS,
_( "Delete" ) );
- m_ButtonDeleteOneAlias->SetForegroundColour( *wxRED );
RightBoxSizer->Add( m_ButtonDeleteOneAlias, 0, wxGROW | wxALL, 5 );
m_ButtonDeleteAllAlias = new wxButton( m_PanelAlias, ID_DELETE_ALL_ALIAS,
_( "Delete All" ) );
- m_ButtonDeleteAllAlias->SetForegroundColour( *wxRED );
if( !CurrentAliasName.IsEmpty() )
m_ButtonDeleteAllAlias->Enable( FALSE );
RightBoxSizer->Add( m_ButtonDeleteAllAlias, 0, wxGROW | wxALL, 5 );
@@ -170,8 +165,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelFootprintFilter()
m_NoteBook->AddPage( m_PanelFootprintFilter, _( "Footprint Filter" ) );
- m_PanelFootprintFilter->SetFont( *g_DialogFont );
-
wxBoxSizer* PanelFpFilterBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_PanelFootprintFilter->SetSizer( PanelFpFilterBoxSizer );
@@ -182,7 +175,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelFootprintFilter()
wxStaticText* Msg = new wxStaticText( m_PanelFootprintFilter, -1, _(
"Footprints" ) );
- Msg->SetForegroundColour( wxColour( 200, 0, 0 ) );
LeftBoxSizer->Add( Msg, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
m_FootprintFilterListBox = new wxListBox( m_PanelFootprintFilter,
@@ -201,7 +193,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelFootprintFilter()
ID_ADD_FOOTPRINT_FILTER, _(
"Add" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
m_ButtonDeleteOneFootprintFilter = new wxButton( m_PanelFootprintFilter,
@@ -209,7 +200,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelFootprintFilter()
_(
"Delete" ) );
- m_ButtonDeleteOneFootprintFilter->SetForegroundColour( *wxRED );
RightBoxSizer->Add( m_ButtonDeleteOneFootprintFilter, 0, wxGROW | wxALL, 5 );
m_ButtonDeleteAllFootprintFilter = new wxButton( m_PanelFootprintFilter,
@@ -217,7 +207,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelFootprintFilter()
_(
"Delete All" ) );
- m_ButtonDeleteAllFootprintFilter->SetForegroundColour( *wxRED );
RightBoxSizer->Add( m_ButtonDeleteAllFootprintFilter, 0, wxGROW | wxALL, 5 );
@@ -286,8 +275,6 @@ void WinEDA_PartPropertiesFrame::BuildPanelBasic()
/* create the basic panel for component properties editing
*/
{
- m_PanelBasic->SetFont( *g_DialogFont );
-
AsConvertButt = new wxCheckBox( m_PanelBasic, -1, _( "As Convert" ) );
if( g_AsDeMorgan )
diff --git a/eeschema/eeconfig.cpp b/eeschema/eeconfig.cpp
index 3e9649e95a..04eae661cf 100644
--- a/eeschema/eeconfig.cpp
+++ b/eeschema/eeconfig.cpp
@@ -25,9 +25,8 @@
#define HOTKEY_FILENAME wxT( "eeschema" )
-/*********************************************************************/
+
void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
-/*********************************************************************/
{
int id = event.GetId();
wxPoint pos;
@@ -53,7 +52,7 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
break;
case ID_CONFIG_SAVE:
- Save_Config( this );
+ SaveProjectFile( this );
break;
case ID_CONFIG_READ:
@@ -68,7 +67,7 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
break;
- Read_Config( fn.GetFullPath(), TRUE );
+ LoadProjectFile( fn.GetFullPath(), TRUE );
}
break;
@@ -109,13 +108,10 @@ void WinEDA_SchematicFrame::Process_Config( wxCommandEvent& event )
}
-/***************************************************************/
-bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
-/***************************************************************/
-
/*
* Read the hotkey files config for eeschema and libedit
*/
+bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
{
wxString FullFileName = ReturnHotkeyConfigFilePath(
g_ConfigFileLocationChoice );
@@ -130,21 +126,112 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
}
-/***********************************************************************/
-bool Read_Config( const wxString& CfgFileName, bool ForceRereadConfig )
-/***********************************************************************/
-
-/* lit la configuration, si elle n'a pas deja ete lue
- * 1 - lit .pro
- * 2 - si non trouve lit ../template/kicad.pro
- * 3 - si non trouve: init des variables aux valeurs par defaut
+/**
+ * Return project file parameter list for EESchema.
*
- * Retourne TRUE si lu, FALSE si config non lue
+ * Populate the project file parameter array specific to EESchema if it hasn't
+ * already been populated and return a reference to the array to the caller.
+ * Creating the parameter list at run time has the advantage of being able
+ * to define local variables. The old method of statically building the array
+ * at compile time requiring global variable definitions.
*/
+const PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetProjectFileParameters( void )
+{
+ if( !m_projectFileParams.IsEmpty() )
+ return m_projectFileParams;
+
+ m_projectFileParams.Add( new PARAM_CFG_WXSTRING( wxT( "LibDir" ),
+ &m_UserLibraryPath ) );
+ m_projectFileParams.Add( new PARAM_CFG_LIBNAME_LIST( wxT( "LibName" ),
+ &m_ComponentLibFiles,
+ GROUPLIB ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "NetFmt" ),
+ &m_NetlistFormat,
+ NET_TYPE_PCBNEW,
+ NET_TYPE_PCBNEW,
+ NET_TYPE_CUSTOM_MAX ) );
+
+ /* NOTE: Left as global until supporting code can be fixed. */
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "HPGLSpd" ),
+ &g_HPGL_Pen_Descr.m_Pen_Speed,
+ 20, 2, 45 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "HPGLDm" ),
+ &g_HPGL_Pen_Descr.m_Pen_Diam,
+ 15, 1, 150 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "HPGLNum" ),
+ &g_HPGL_Pen_Descr.m_Pen_Num,
+ 1, 1, 8 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A4" ),
+ &g_Sheet_A4.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A4" ),
+ &g_Sheet_A4.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A3" ),
+ &g_Sheet_A3.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A3" ),
+ &g_Sheet_A3.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A2" ),
+ &g_Sheet_A2.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A2" ),
+ &g_Sheet_A2.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A1" ),
+ &g_Sheet_A1.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A1" ),
+ &g_Sheet_A1.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A0" ),
+ &g_Sheet_A0.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A0" ),
+ &g_Sheet_A0.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_A" ),
+ &g_Sheet_A.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_A" ),
+ &g_Sheet_A.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_B" ),
+ &g_Sheet_B.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_B" ),
+ &g_Sheet_B.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_C" ),
+ &g_Sheet_C.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_C" ),
+ &g_Sheet_C.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_D" ),
+ &g_Sheet_D.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_D" ),
+ &g_Sheet_D.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offX_E" ),
+ &g_Sheet_E.m_Offset.x ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "offY_E" ),
+ &g_Sheet_E.m_Offset.y ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "RptD_X" ),
+ &g_RepeatStep.x,
+ 0, -1000, +1000 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "RptD_Y" ),
+ &g_RepeatStep.y,
+ 100, -1000, +1000 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "RptLab" ),
+ &g_RepeatDeltaLabel,
+ 1, -10, +10 ) );
+ m_projectFileParams.Add( new PARAM_CFG_WXSTRING( wxT( "SimCmd" ),
+ &g_SimulatorCommandLine ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "UseNetN" ),
+ &g_OptNetListUseNames,
+ 0, 0, 1 ) );
+ m_projectFileParams.Add( new PARAM_CFG_INT( wxT( "LabSize" ),
+ &g_DefaultTextLabelSize,
+ DEFAULT_SIZE_TEXT, 0, 1000 ) );
+
+ return m_projectFileParams;
+}
+
+
+/*
+ * Load the Kicad project file (*.pro) settings specific to EESchema.
+ */
+bool WinEDA_SchematicFrame::LoadProjectFile( const wxString& CfgFileName,
+ bool ForceRereadConfig )
{
wxFileName fn;
bool IsRead = TRUE;
- wxArrayString liblist_tmp = g_LibName_List;
+ wxArrayString liblist_tmp = m_ComponentLibFiles;
WinEDA_SchematicFrame* frame;
frame = (WinEDA_SchematicFrame*)wxGetApp().GetTopWindow();
@@ -153,29 +240,30 @@ bool Read_Config( const wxString& CfgFileName, bool ForceRereadConfig )
fn = g_RootSheet->m_AssociatedScreen->m_FileName;
else
fn = CfgFileName;
- g_LibName_List.Clear();
+ m_ComponentLibFiles.Clear();
/* Change the schematic file extension (.sch) to the project file
* extension (.pro). */
fn.SetExt( ProjectFileExtension );
- wxGetApp().RemoveLibraryPath( g_UserLibDirBuffer );
+ wxGetApp().RemoveLibraryPath( m_UserLibraryPath );
- if( !wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, ParamCfgList,
+ if( !wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP,
+ GetProjectFileParameters(),
ForceRereadConfig ? FALSE : TRUE ) )
{
- g_LibName_List = liblist_tmp;
+ m_ComponentLibFiles = liblist_tmp;
IsRead = FALSE;
}
/* User library path takes precedent over default library search paths. */
- wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
+ wxGetApp().InsertLibraryPath( m_UserLibraryPath, 1 );
// If the list is void, load the libraries "power.lib" and "device.lib"
- if( g_LibName_List.GetCount() == 0 )
+ if( m_ComponentLibFiles.GetCount() == 0 )
{
- g_LibName_List.Add( wxT( "power" ) );
- g_LibName_List.Add( wxT( "device" ) );
+ m_ComponentLibFiles.Add( wxT( "power" ) );
+ m_ComponentLibFiles.Add( wxT( "device" ) );
}
if( frame )
@@ -189,9 +277,10 @@ bool Read_Config( const wxString& CfgFileName, bool ForceRereadConfig )
}
-/****************************************************************/
-void WinEDA_SchematicFrame::Save_Config( wxWindow* displayframe )
-/***************************************************************/
+/*
+ * Save the Kicad project file (*.pro) settings specific to EESchema.
+ */
+void WinEDA_SchematicFrame::SaveProjectFile( wxWindow* displayframe )
{
wxFileName fn;
@@ -206,7 +295,120 @@ void WinEDA_SchematicFrame::Save_Config( wxWindow* displayframe )
return;
/* ecriture de la configuration */
- wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, ParamCfgList );
+ wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
+ GetProjectFileParameters() );
+}
+
+
+static const wxString MinDrawLineWidthEntry( wxT( "MinimunDrawLineWidth" ) );
+static const wxString PlotLineWidthEntry( wxT( "PlotLineWidth" ) );
+static const wxString ShowHiddenPinsEntry( wxT( "ShowHiddenPins" ) );
+
+
+/*
+ * Return the EESchema applications settings list.
+ *
+ * This replaces the old statically define list that had the project
+ * file settings and the application settings mixed together. This
+ * was confusing and caused some settings to get saved and loaded
+ * incorrectly. Currently, only the settings that are needed at start
+ * up by the main window are defined here. There are other locally used
+ * settings scattered thoughout the EESchema source code. If you need
+ * to define a configuration setting that need to be loaded at run time,
+ * this is the place to define it.
+ *
+ * TODO: Define the configuration variables as member variables instead of
+ * global variables or move them to the object class where they are
+ * used.
+ */
+const PARAM_CFG_ARRAY& WinEDA_SchematicFrame::GetConfigurationSettings( void )
+{
+ if( !m_configSettings.IsEmpty() )
+ return m_configSettings;
+
+ m_configSettings.Add( new PARAM_CFG_INT( true, wxT( "Unite" ),
+ &g_UnitMetric, 0, 0, 1 ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColWire" ),
+ &g_LayerDescr.LayerColor[LAYER_WIRE],
+ GREEN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBus" ),
+ &g_LayerDescr.LayerColor[LAYER_BUS],
+ BLUE ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorConn" ),
+ &g_LayerDescr.LayerColor[LAYER_JUNCTION],
+ GREEN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorLlab" ),
+ &g_LayerDescr.LayerColor[LAYER_LOCLABEL],
+ BLACK ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorHlab" ),
+ &g_LayerDescr.LayerColor[LAYER_HIERLABEL],
+ BROWN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGbllab" ),
+ &g_LayerDescr.LayerColor[LAYER_GLOBLABEL],
+ RED ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPinF" ),
+ &g_LayerDescr.LayerColor[LAYER_PINFUN],
+ MAGENTA ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColPinN" ),
+ &g_LayerDescr.LayerColor[LAYER_PINNUM],
+ RED ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPNam" ),
+ &g_LayerDescr.LayerColor[LAYER_PINNAM],
+ CYAN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorField" ),
+ &g_LayerDescr.LayerColor[LAYER_FIELDS],
+ MAGENTA ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorRef" ),
+ &g_LayerDescr.LayerColor[LAYER_REFERENCEPART],
+ CYAN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorValue" ),
+ &g_LayerDescr.LayerColor[LAYER_VALUEPART],
+ CYAN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNote" ),
+ &g_LayerDescr.LayerColor[LAYER_NOTES],
+ LIGHTBLUE ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBody" ),
+ &g_LayerDescr.LayerColor[LAYER_DEVICE],
+ RED ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorBodyBg" ),
+ &g_LayerDescr.LayerColor[LAYER_DEVICE_BACKGROUND],
+ LIGHTYELLOW ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNetN" ),
+ &g_LayerDescr.LayerColor[LAYER_NETNAM],
+ DARKGRAY ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorPin" ),
+ &g_LayerDescr.LayerColor[LAYER_PIN],
+ RED ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheet" ),
+ &g_LayerDescr.LayerColor[LAYER_SHEET],
+ MAGENTA ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true,
+ wxT( "ColorSheetFileName" ),
+ &g_LayerDescr.LayerColor[LAYER_SHEETFILENAME],
+ BROWN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheetName" ),
+ &g_LayerDescr.LayerColor[LAYER_SHEETNAME],
+ CYAN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorSheetLab" ),
+ &g_LayerDescr.LayerColor[LAYER_SHEETLABEL],
+ BROWN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorNoCo" ),
+ &g_LayerDescr.LayerColor[LAYER_NOCONNECT],
+ BLUE ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcW" ),
+ &g_LayerDescr.LayerColor[LAYER_ERC_WARN],
+ GREEN ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
+ &g_LayerDescr.LayerColor[LAYER_ERC_ERR],
+ RED ) );
+ m_configSettings.Add( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGrid" ),
+ &g_GridColor,
+ DARKDARKGRAY ) );
+ m_configSettings.Add( new PARAM_CFG_INT( true, wxT( "Pltmarg" ),
+ &g_PlotMargin,
+ 300, 0, 10000 ) );
+
+ return m_configSettings;
}
@@ -215,7 +417,18 @@ void WinEDA_SchematicFrame::Save_Config( wxWindow* displayframe )
*/
void WinEDA_SchematicFrame::LoadSettings()
{
+ wxASSERT( wxGetApp().m_EDA_Config != NULL );
+
+ wxConfig* cfg = wxGetApp().m_EDA_Config;
+
WinEDA_DrawFrame::LoadSettings();
+
+ wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
+
+ g_DrawMinimunLineWidth = cfg->Read( MinDrawLineWidthEntry, (long) 0 );
+ g_PlotLine_Width = cfg->Read( PlotLineWidthEntry, (long) 4 );
+ cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
+
}
@@ -224,5 +437,15 @@ void WinEDA_SchematicFrame::LoadSettings()
*/
void WinEDA_SchematicFrame::SaveSettings()
{
+ wxASSERT( wxGetApp().m_EDA_Config != NULL );
+
+ wxConfig* cfg = wxGetApp().m_EDA_Config;
+
WinEDA_DrawFrame::SaveSettings();
+
+ wxGetApp().SaveCurrentSetupValues( GetConfigurationSettings() );
+
+ cfg->Write( MinDrawLineWidthEntry, (long) g_DrawMinimunLineWidth );
+ cfg->Write( PlotLineWidthEntry, (long) g_PlotLine_Width );
+ cfg->Write( ShowHiddenPinsEntry, m_ShowAllPins );
}
diff --git a/eeschema/eeconfig.h b/eeschema/eeconfig.h
index 75b69de907..95839b519f 100644
--- a/eeschema/eeconfig.h
+++ b/eeschema/eeconfig.h
@@ -16,520 +16,3 @@ extern int g_PenMinWidth;
/* saving parameters option : */
#define INSETUP TRUE // used when the parameter is saved in general config
// if not used, the parameter is saved in the loca config (project config)
-
-/* Liste des parametres */
-static PARAM_CFG_WXSTRING UserLibDirBufCfg
-(
- wxT( "LibDir" ), /* Ident String */
- &g_UserLibDirBuffer /* Parameter address */
-);
-
-
-static PARAM_CFG_LIBNAME_LIST LibNameBufCfg
-(
- wxT( "LibName" ), /* Ident String */
- &g_LibName_List, /* Parameter address */
- GROUPLIB /* Groupe */
-);
-
-static PARAM_CFG_INT NetFormatCfg
-(
- wxT( "NetFmt" ), /* Ident String */
- &g_NetFormat, /* Parameter address */
- NET_TYPE_PCBNEW, /* Default value */
- NET_TYPE_PCBNEW, /* Min value for the parameter */
- NET_TYPE_CUSTOM_MAX /* Max value for the parameter */
-);
-
-static PARAM_CFG_INT UnitCfg
-(
- INSETUP,
- wxT( "Unite" ), /* Ident String */
- &g_UnitMetric, /* Parameter address */
- 0, /* Default value */
- 0, 1 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_SETCOLOR DrawBgColorCfg
-(
- INSETUP,
- wxT( "BgColor" ), /* Ident String */
- &g_DrawBgColor, /* Parameter address */
- WHITE /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerWireCfg
-(
- INSETUP,
- wxT( "ColWire" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_WIRE], /* Parameter address */
- GREEN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerBusCfg
-(
- INSETUP,
- wxT( "ColorBus" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_BUS], /* Parameter address */
- BLUE /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerJunctionCfg
-(
- INSETUP,
- wxT( "ColorConn" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_JUNCTION], /* Parameter address */
- GREEN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerLLabelCfg
-(
- INSETUP,
- wxT( "ColorLlab" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_LOCLABEL], /* Parameter address */
- BLACK /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerHierarLabelCfg
-(
- INSETUP,
- wxT( "ColorHlab" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_HIERLABEL], /* Parameter address */
- BROWN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerGLabelCfg
-(
- INSETUP,
- wxT( "ColorGbllab" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_GLOBLABEL], /* Parameter address */
- RED /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerPinFunCfg
-(
- INSETUP,
- wxT( "ColorPinF" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_PINFUN], /* Parameter address */
- MAGENTA /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerPinNumCfg
-(
- INSETUP,
- wxT( "ColPinN" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_PINNUM], /* Parameter address */
- RED /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerPinNamCfg
-(
- INSETUP,
- wxT( "ColorPNam" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_PINNAM], /* Parameter address */
- CYAN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerFieldsCfg
-(
- INSETUP,
- wxT( "ColorField" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_FIELDS], /* Parameter address */
- MAGENTA /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerReferenceCfg
-(
- INSETUP,
- wxT( "ColorRef" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_REFERENCEPART], /* Parameter address */
- CYAN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerValueCfg
-(
- INSETUP,
- wxT( "ColorValue" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_VALUEPART], /* Parameter address */
- CYAN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerNotesCfg
-(
- INSETUP,
- wxT( "ColorNote" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_NOTES], /* Parameter address */
- LIGHTBLUE /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerBodyCfg
-(
- INSETUP,
- wxT( "ColorBody" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_DEVICE], /* Parameter address */
- RED /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerBodyBackgroundCfg
-(
- INSETUP,
- wxT( "ColorBodyBg" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_DEVICE_BACKGROUND], /* Parameter address */
- LIGHTYELLOW /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerNetNameCfg
-(
- INSETUP,
- wxT( "ColorNetN" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_NETNAM], /* Parameter address */
- DARKGRAY /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerPinCfg
-(
- INSETUP,
- wxT( "ColorPin" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_PIN], /* Parameter address */
- RED /* Default value */
-);
-
-
-static PARAM_CFG_SETCOLOR ColorLayerSheetCfg
-(
- INSETUP,
- wxT( "ColorSheet" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_SHEET], /* Parameter address */
- MAGENTA /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerSheetFileNameCfg
-(
- INSETUP,
- wxT( "ColorSheetFileName" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_SHEETFILENAME], /* Parameter address */
- BROWN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerSheetNameCfg
-(
- INSETUP,
- wxT( "ColorSheetName" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_SHEETNAME], /* Parameter address */
- CYAN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerSheetLabelCfg
-(
- INSETUP,
- wxT( "ColorSheetLab" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_SHEETLABEL], /* Parameter address */
- BROWN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerNoConnectCfg
-(
- INSETUP,
- wxT( "ColorNoCo" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_NOCONNECT], /* Parameter address */
- BLUE /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerErcWarnCfg
-(
- INSETUP,
- wxT( "ColorErcW" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_ERC_WARN], /* Parameter address */
- GREEN /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerErcErrCfg
-(
- INSETUP,
- wxT( "ColorErcE" ), /* Ident String */
- &g_LayerDescr.LayerColor[LAYER_ERC_ERR], /* Parameter address */
- RED /* Default value */
-);
-
-static PARAM_CFG_SETCOLOR ColorLayerGridCfg
-(
- INSETUP,
- wxT( "ColorGrid" ), /* Ident String */
- &g_GridColor, /* Parameter address */
- DARKDARKGRAY /* Default value */
-);
-
-static PARAM_CFG_INT PlotMarginCfg
-(
- INSETUP,
- wxT( "Pltmarg" ), /* Ident String */
- &g_PlotMargin, /* Parameter address */
- 300, /* Default value */
- 0, 10000 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT HPGLSpeed
-(
- wxT( "HPGLSpd" ), /* Ident String */
- &g_HPGL_Pen_Descr.m_Pen_Speed, /* Parameter address */
- 20, /* Default value */
- 2, 45 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT HPGLDiam
-(
- wxT( "HPGLDm" ), /* Ident String */
- &g_HPGL_Pen_Descr.m_Pen_Diam, /* Parameter address */
- 15, /* Default value */
- 1, 150 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT HPGLPenNum
-(
- wxT( "HPGLNum" ), /* Ident String */
- &g_HPGL_Pen_Descr.m_Pen_Num, /* Parameter address */
- 1, /* Default value */
- 1, 8 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetX_A4
-(
- wxT( "offX_A4" ), /* Ident String */
- &g_Sheet_A4.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A4
-(
- wxT( "offY_A4" ), /* Ident String */
- &g_Sheet_A4.m_Offset.y /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetX_A3
-(
- wxT( "offX_A3" ), /* Ident String */
- &g_Sheet_A3.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A3
-(
- wxT( "offY_A3" ), /* Ident String */
- &g_Sheet_A3.m_Offset.y /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetX_A2
-(
- wxT( "offX_A2" ), /* Ident String */
- &g_Sheet_A2.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A2
-(
- wxT( "offY_A2" ), /* Ident String */
- &g_Sheet_A2.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_A1
-(
- wxT( "offX_A1" ), /* Ident String */
- &g_Sheet_A1.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A1
-(
- wxT( "offY_A1" ), /* Ident String */
- &g_Sheet_A1.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_A0
-(
- wxT( "offX_A0" ), /* Ident String */
- &g_Sheet_A0.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A0
-(
- wxT( "offY_A0" ), /* Ident String */
- &g_Sheet_A0.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_A
-(
- wxT( "offX_A" ), /* Ident String */
- &g_Sheet_A.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_A
-(
- wxT( "offY_A" ), /* Ident String */
- &g_Sheet_A.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_B
-(
- wxT( "offX_B" ), /* Ident String */
- &g_Sheet_B.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_B
-(
- wxT( "offY_B" ), /* Ident String */
- &g_Sheet_B.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_C
-(
- wxT( "offX_C" ), /* Ident String */
- &g_Sheet_C.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_C
-(
- wxT( "offY_C" ), /* Ident String */
- &g_Sheet_C.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_D
-(
- wxT( "offX_D" ), /* Ident String */
- &g_Sheet_D.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_D
-(
- wxT( "offY_D" ), /* Ident String */
- &g_Sheet_D.m_Offset.y /* Parameter address */
-);
-
-
-static PARAM_CFG_INT PlotSheetOffsetX_E
-(
- wxT( "offX_E" ), /* Ident String */
- &g_Sheet_E.m_Offset.x /* Parameter address */
-);
-
-static PARAM_CFG_INT PlotSheetOffsetY_E
-(
- wxT( "offY_E" ), /* Ident String */
- &g_Sheet_E.m_Offset.y /* Parameter address */
-);
-
-static PARAM_CFG_INT CfgRepeatDeltaX
-(
- wxT( "RptD_X" ), /* Ident String */
- &g_RepeatStep.x, /* parameter address */
- 0, /* Default value */
- -1000, +1000 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT CfgRepeatDeltaY
-(
- wxT( "RptD_Y" ), /* Ident String */
- &g_RepeatStep.y, /* Parameter address */
- 100, /* Default value */
- -1000, +1000 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT CfgRepeatDeltaLabel
-(
- wxT( "RptLab" ), /* Ident String */
- &g_RepeatDeltaLabel, /* Parameter address */
- 1, /* Default value */
- -10, +10 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_WXSTRING CfgSimulatorCommandLine
-(
- wxT( "SimCmd" ), /* Ident String */
- &g_SimulatorCommandLine /* Parameter address */
-);
-
-static PARAM_CFG_INT OptNetListUseNamesCfg
-(
- wxT( "UseNetN" ), /* Ident String */
- &g_OptNetListUseNames, /* Parameter address */
- 0, /* Default value */
- 0, 1 /* Min and Max values for the parameter */
-);
-
-static PARAM_CFG_INT OptDefaultLabelSizeCfg
-(
- wxT( "LabSize" ), /* Ident String */
- &g_DefaultTextLabelSize, /* Parameter address */
- DEFAULT_SIZE_TEXT, /* Default value */
- 0, 1000 /* Min and Max values for the parameter */
-);
-
-
-PARAM_CFG_BASE* ParamCfgList[] =
-{
- &UserLibDirBufCfg,
- &LibNameBufCfg,
-
- &NetFormatCfg,
-
- &UnitCfg,
- &DrawBgColorCfg,
- &ColorLayerWireCfg,
- &ColorLayerBusCfg,
- &ColorLayerJunctionCfg,
- &ColorLayerLLabelCfg,
- &ColorLayerHierarLabelCfg,
- &ColorLayerGLabelCfg,
- &ColorLayerPinFunCfg,
- &ColorLayerPinNumCfg,
- &ColorLayerPinNamCfg,
- &ColorLayerFieldsCfg,
- &ColorLayerReferenceCfg,
- &ColorLayerValueCfg,
- &ColorLayerNotesCfg,
- &ColorLayerBodyCfg,
- &ColorLayerBodyBackgroundCfg,
- &ColorLayerNetNameCfg,
- &ColorLayerPinCfg,
- &ColorLayerSheetCfg,
- &ColorLayerSheetFileNameCfg,
- &ColorLayerSheetNameCfg,
- &ColorLayerSheetLabelCfg,
- &ColorLayerNoConnectCfg,
- &ColorLayerErcWarnCfg,
- &ColorLayerErcErrCfg,
- &ColorLayerGridCfg,
-
- &PlotMarginCfg,
- &HPGLSpeed,
- &HPGLDiam,
- &HPGLPenNum,
- &PlotSheetOffsetX_A4,
- &PlotSheetOffsetY_A4,
- &PlotSheetOffsetX_A3,
- &PlotSheetOffsetY_A3,
- &PlotSheetOffsetX_A2,
- &PlotSheetOffsetY_A2,
- &PlotSheetOffsetX_A1,
- &PlotSheetOffsetY_A1,
- &PlotSheetOffsetX_A0,
- &PlotSheetOffsetY_A0,
- &PlotSheetOffsetX_A,
- &PlotSheetOffsetY_A,
- &PlotSheetOffsetX_B,
- &PlotSheetOffsetY_B,
- &PlotSheetOffsetX_C,
- &PlotSheetOffsetY_C,
- &PlotSheetOffsetX_D,
- &PlotSheetOffsetY_D,
- &PlotSheetOffsetX_E,
- &PlotSheetOffsetY_E,
- &CfgRepeatDeltaX,
- &CfgRepeatDeltaY,
- &CfgRepeatDeltaLabel,
- &CfgSimulatorCommandLine,
- &OptNetListUseNamesCfg,
- &OptDefaultLabelSizeCfg,
- NULL
-};
diff --git a/eeschema/eelayer.cpp b/eeschema/eelayer.cpp
index c5f849182c..39ed55245a 100644
--- a/eeschema/eelayer.cpp
+++ b/eeschema/eelayer.cpp
@@ -121,8 +121,6 @@ void WinEDA_SetColorsFrame::CreateControls()
{
int lyr, grp, butt_ID, buttcolor;
- SetFont( *g_DialogFont );
-
OuterBoxSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(OuterBoxSizer);
@@ -237,11 +235,9 @@ void WinEDA_SetColorsFrame::CreateControls()
OuterBoxSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
Button = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxRED );
StdDialogButtonSizer->AddButton(Button);
Button = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxBLUE );
StdDialogButtonSizer->AddButton(Button);
Button->SetFocus();
diff --git a/eeschema/eelibs_read_libraryfiles.cpp b/eeschema/eelibs_read_libraryfiles.cpp
index e1048a162f..e1838342cf 100644
--- a/eeschema/eelibs_read_libraryfiles.cpp
+++ b/eeschema/eelibs_read_libraryfiles.cpp
@@ -104,14 +104,14 @@ LibraryStruct* LoadLibraryName( WinEDA_DrawFrame* frame,
/******************************************/
/* Function LoadLibraries
* Clear all alredy loaded librries and load all librairies
- * given in g_LibName_List
+ * given in frame->m_ComponentLibFiles
*/
/******************************************/
-void LoadLibraries (WinEDA_DrawFrame* frame)
+void LoadLibraries( WinEDA_SchematicFrame* frame )
{
wxFileName fn;
wxString msg, tmp;
- unsigned ii, iimax = g_LibName_List.GetCount();
+ unsigned ii, iimax = frame->m_ComponentLibFiles.GetCount();
frame->PrintMsg( _( "Loading schematic component libraries" ) );
@@ -124,15 +124,15 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
if( lib->m_IsLibCache )
continue;
- // is this library in "wanted list" g_LibName_List ?
- if( g_LibName_List.Index( lib->m_Name ) == wxNOT_FOUND )
+ // is this library in "wanted list" frame->m_ComponentLibFiles ?
+ if( frame->m_ComponentLibFiles.Index( lib->m_Name ) == wxNOT_FOUND )
FreeCmpLibrary( frame, lib->m_Name );
}
// Load missing libraries (if any)
for( ii = 0; ii < iimax; ii++ )
{
- fn = g_LibName_List[ii];
+ fn = frame->m_ComponentLibFiles[ii];
fn.SetExt( CompLibFileExtension );
if( !fn.IsOk() )
@@ -182,11 +182,11 @@ void LoadLibraries (WinEDA_DrawFrame* frame)
(LibraryStruct**) MyZMalloc( sizeof(LibraryStruct*) * (NumOfLibs + 2) );
int jj = 0;
- for( ii = 0; ii < g_LibName_List.GetCount(); ii++ )
+ for( ii = 0; ii < frame->m_ComponentLibFiles.GetCount(); ii++ )
{
if( jj >= NumOfLibs )
break;
- fn = g_LibName_List[ii];
+ fn = frame->m_ComponentLibFiles[ii];
lib = FindLibrary( fn.GetName() );
if( lib )
{
diff --git a/eeschema/eeredraw.cpp b/eeschema/eeredraw.cpp
index a53d1a3701..3280a0c4f1 100644
--- a/eeschema/eeredraw.cpp
+++ b/eeschema/eeredraw.cpp
@@ -87,7 +87,7 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
GetScreen()->ClrRefreshReq();
// Display the sheet filename, and the sheet path, for non root sheets
- if( GetScreen()->m_FileName == g_DefaultSchematicFileName )
+ if( GetScreen()->m_FileName == m_DefaultSchematicFileName )
{
wxString msg = wxGetApp().GetAppName() + wxT( " " ) + GetBuildVersion();
title.Printf( wxT( "%s [%s]" ), msg.GetData(),
diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp
index 391ebfef66..1866a284a2 100644
--- a/eeschema/eeschema.cpp
+++ b/eeschema/eeschema.cpp
@@ -21,11 +21,8 @@
// Global variables
-wxString g_DefaultSchematicFileName( wxT( "noname.sch" ) );
-wxArrayString g_LibName_List; // library list (short filenames) to load
LibraryStruct* g_LibraryList; // All part libs are saved here.
-int g_NetFormat; /* Numero de reference du type de netliste */
int g_OptNetListUseNames; /* TRUE pour utiliser les noms de net plutot que
* les numeros (netlist PSPICE seulement) */
SCH_ITEM* g_ItemToRepeat; /* pointeur sur la derniere structure
@@ -46,7 +43,6 @@ bool g_LastSearchIsMarker; /* True if last seach is a marker serach
SCH_ITEM* g_BlockSaveDataList; // List of items to paste (Created by Block Save)
// Gestion d'options
-int g_ShowAllPins;
int g_HVLines = 1; // Bool: force H or V directions (Wires, Bus ..)
int g_PlotPSColorOpt; // True = plot postcript color (see plotps.cpp)
@@ -158,8 +154,6 @@ bool WinEDA_App::OnInit()
/* init EESCHEMA */
SeedLayers();
GetSettings();
- extern PARAM_CFG_BASE* ParamCfgList[];
- wxGetApp().ReadCurrentSetupValues( ParamCfgList );
Read_Hotkey_Config( frame, false ); /* Must be called before creating
* the main frame in order to
* display the real hotkeys in menus
@@ -195,7 +189,7 @@ bool WinEDA_App::OnInit()
else
{
// Read a default config file if no file to load.
- Read_Config( wxEmptyString, TRUE );
+ frame->LoadProjectFile( wxEmptyString, TRUE );
if( frame->DrawPanel )
frame->DrawPanel->Refresh( TRUE );
}
diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp
index 58003aac91..5a9865c550 100644
--- a/eeschema/files-io.cpp
+++ b/eeschema/files-io.cpp
@@ -73,7 +73,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
{
if( !IsOK( this, _( "Clear Schematic Hierarchy (modified!)?" ) ) )
return FALSE;
- if( g_RootSheet->m_AssociatedScreen->m_FileName != g_DefaultSchematicFileName )
+ if( g_RootSheet->m_AssociatedScreen->m_FileName != m_DefaultSchematicFileName )
SetLastProject( g_RootSheet->m_AssociatedScreen->m_FileName );
}
@@ -121,7 +121,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
screen->m_Commentaire2.Empty();
screen->m_Commentaire3.Empty();
screen->m_Commentaire4.Empty();
- Read_Config( wxEmptyString, TRUE );
+ LoadProjectFile( wxEmptyString, TRUE );
Zoom_Automatique( TRUE );
SetSheetNumberAndCount();
DrawPanel->Refresh();
@@ -132,7 +132,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
msg = _( "Ready\nWorking dir: \n" ) + wxGetCwd();
PrintMsg( msg );
- Read_Config( wxEmptyString, FALSE );
+ LoadProjectFile( wxEmptyString, FALSE );
// Delete old caches.
LibraryStruct* nextlib, * lib = g_LibraryList;
diff --git a/eeschema/general.h b/eeschema/general.h
index a78900c399..f1ef9b1e83 100644
--- a/eeschema/general.h
+++ b/eeschema/general.h
@@ -94,10 +94,8 @@ typedef enum {
/* variables generales */
-extern wxArrayString g_LibName_List; // library list (short filenames) to load
extern LibraryStruct* g_LibraryList; // All part libs are saved here.
-extern int g_NetFormat; /* Numero de reference du type de netliste */
extern int g_OptNetListUseNames; /* TRUE pour utiliser les noms de net plutot que
* les numeros (netlist PSPICE seulement) */
extern SCH_ITEM* g_ItemToRepeat; /* pointeur sur la derniere structure
@@ -208,8 +206,4 @@ extern int g_ItemSelectetColor;
// Color to draw items flagged invisible, in libedit (they are insisible in eeschema
extern int g_InvisibleItemColor;
-/* Config keys */
-#define MINI_DRAW_LINE_WIDTH_KEY wxT( "MinimunDrawLineWidth" )
-#define OPTKEY_PLOT_LINEWIDTH_VALUE wxT( "PlotLineWidth" )
-
#endif // _GENERAL_H_
diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp
index aba3af5d6c..079c819dbd 100644
--- a/eeschema/menubar.cpp
+++ b/eeschema/menubar.cpp
@@ -298,9 +298,6 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
item->SetBitmap( preference_xpm );
configmenu->Append( item );
- // Font selection and setup
- AddFontSelectionMenu( configmenu );
-
wxGetApp().AddMenuLanguageList( configmenu );
configmenu->AppendSeparator();
diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp
index b04336b2ad..9496afb72e 100644
--- a/eeschema/netform.cpp
+++ b/eeschema/netform.cpp
@@ -50,13 +50,13 @@ void WriteNetList( WinEDA_SchematicFrame* frame, const wxString& FileNameNL,
bool use_netnames )
/*******************************************************************************/
-/* Create the netlist file ( Format is given by g_NetFormat )
+/* Create the netlist file ( Format is given by frame->m_NetlistFormat )
* bool use_netnames is used only for Spice netlist
*/
{
FILE* f = NULL;
- if( g_NetFormat < NET_TYPE_CUSTOM1 )
+ if( frame->m_NetlistFormat < NET_TYPE_CUSTOM1 )
{
if( ( f = wxFopen( FileNameNL, wxT( "wt" ) ) ) == NULL )
{
@@ -68,7 +68,7 @@ void WriteNetList( WinEDA_SchematicFrame* frame, const wxString& FileNameNL,
wxBusyCursor Busy;
- switch( g_NetFormat )
+ switch( frame->m_NetlistFormat )
{
case NET_TYPE_PCBNEW:
WriteNetListPCBNEW( frame, f, TRUE );
diff --git a/eeschema/netlist_control.cpp b/eeschema/netlist_control.cpp
index 3d77139590..f6e9336ec2 100644
--- a/eeschema/netlist_control.cpp
+++ b/eeschema/netlist_control.cpp
@@ -82,7 +82,8 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
const wxString& title,
int id_NetType,
int idCheckBox,
- int idCreateFile ) :
+ int idCreateFile,
+ bool selected ) :
wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL |
wxBORDER_SUNKEN )
/*****************************************************************************/
@@ -96,14 +97,13 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
* @param idCreateFile = event ID attached to the "create netlist" button
*/
{
- SetFont( *g_DialogFont );
m_IdNetType = id_NetType;
m_CommandStringCtrl = NULL;
m_TitleStringCtrl = NULL;
m_IsCurrentFormat = NULL;
m_ButtonCancel = NULL;
- parent->AddPage( this, title, g_NetFormat == m_IdNetType );
+ parent->AddPage( this, title, selected );
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( MainBoxSizer );
@@ -130,9 +130,7 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
m_IsCurrentFormat =
new wxCheckBox( this, idCheckBox, _( "Default format" ) );
m_LeftBoxSizer->Add( m_IsCurrentFormat, 0, wxGROW | wxALL, 5 );
-
- if( g_NetFormat == m_IdNetType )
- m_IsCurrentFormat->SetValue( TRUE );
+ m_IsCurrentFormat->SetValue( selected );
}
/* Create the buttons: Create Neltist or browse Plugin and Cancel
@@ -144,12 +142,10 @@ EDA_NoteBookPage::EDA_NoteBookPage( wxNotebook* parent,
Button = new wxButton( this, idCreateFile, _( "&Browse Plugin" ) );
else
Button = new wxButton( this, idCreateFile, _( "&Netlist" ) );
- Button->SetForegroundColour( *wxRED );
m_RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
m_ButtonCancel =
Button = new wxButton( this, wxID_CANCEL, _( "&Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
m_RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
/* Add special buttons to plugin panels:
@@ -182,7 +178,6 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) :
int ii;
m_Parent = parent;
- SetFont( *g_DialogFont );
for( ii = 0; ii < PANELCUSTOMBASE + CUSTOMPANEL_COUNTMAX; ii++ )
{
@@ -196,31 +191,36 @@ WinEDA_NetlistFrame::WinEDA_NetlistFrame( WinEDA_SchematicFrame* parent ) :
m_NoteBook = new wxNotebook( this, ID_NETLIST_NOTEBOOK,
wxDefaultPosition, wxDefaultSize );
- m_NoteBook->SetFont( *g_DialogFont );
GeneralBoxSizer->Add( m_NoteBook, 0, wxGROW | wxALL, 5 );
// Add notebook pages:
// Add Panel FORMAT PCBNEW
- m_PanelNetType[PANELPCBNEW] = new EDA_NoteBookPage( m_NoteBook,
- wxT( "Pcbnew" ),
- NET_TYPE_PCBNEW,
- ID_CURRENT_FORMAT_IS_DEFAULT,
- ID_CREATE_NETLIST );
+ m_PanelNetType[PANELPCBNEW] =
+ new EDA_NoteBookPage( m_NoteBook,
+ wxT( "Pcbnew" ),
+ NET_TYPE_PCBNEW,
+ ID_CURRENT_FORMAT_IS_DEFAULT,
+ ID_CREATE_NETLIST,
+ m_Parent->m_NetlistFormat == NET_TYPE_PCBNEW );
// Add Panel FORMAT ORCADPCB2
- m_PanelNetType[PANELORCADPCB2] = new EDA_NoteBookPage( m_NoteBook,
- wxT( "OrcadPCB2" ),
- NET_TYPE_ORCADPCB2,
- ID_CURRENT_FORMAT_IS_DEFAULT,
- ID_CREATE_NETLIST );
+ m_PanelNetType[PANELORCADPCB2] =
+ new EDA_NoteBookPage( m_NoteBook,
+ wxT( "OrcadPCB2" ),
+ NET_TYPE_ORCADPCB2,
+ ID_CURRENT_FORMAT_IS_DEFAULT,
+ ID_CREATE_NETLIST,
+ m_Parent->m_NetlistFormat == NET_TYPE_ORCADPCB2 );
// Add Panel FORMAT CADSTAR
- m_PanelNetType[PANELCADSTAR] = new EDA_NoteBookPage( m_NoteBook,
- wxT( "CadStar" ),
- NET_TYPE_CADSTAR,
- ID_CURRENT_FORMAT_IS_DEFAULT,
- ID_CREATE_NETLIST );
+ m_PanelNetType[PANELCADSTAR] =
+ new EDA_NoteBookPage( m_NoteBook,
+ wxT( "CadStar" ),
+ NET_TYPE_CADSTAR,
+ ID_CURRENT_FORMAT_IS_DEFAULT,
+ ID_CREATE_NETLIST,
+ m_Parent->m_NetlistFormat == NET_TYPE_CADSTAR );
// Add Panel spice
InstallPageSpice();
@@ -243,15 +243,17 @@ void WinEDA_NetlistFrame::InstallPageSpice()
wxButton* Button;
EDA_NoteBookPage* page;
- page = m_PanelNetType[PANELSPICE] = new EDA_NoteBookPage( m_NoteBook,
- wxT( "Spice" ),
- NET_TYPE_SPICE,
- 0, 0 );
+ page = m_PanelNetType[PANELSPICE] =
+ new EDA_NoteBookPage( m_NoteBook,
+ wxT( "Spice" ),
+ NET_TYPE_SPICE,
+ 0, 0,
+ m_Parent->m_NetlistFormat == NET_TYPE_SPICE );
page->m_IsCurrentFormat =
new wxCheckBox( page, ID_CURRENT_FORMAT_IS_DEFAULT,
_( "Default format" ) );
- page->m_IsCurrentFormat->SetValue( g_NetFormat == NET_TYPE_SPICE );
+ page->m_IsCurrentFormat->SetValue( m_Parent->m_NetlistFormat == NET_TYPE_SPICE );
page->m_LeftBoxSizer->Add( page->m_IsCurrentFormat, 0, wxGROW | wxALL, 5 );
wxString netlist_opt[2] = { _( "Use Net Names" ), _( "Use Net Numbers" ) };
@@ -271,15 +273,12 @@ void WinEDA_NetlistFrame::InstallPageSpice()
// Add buttons
Button = new wxButton( page, ID_CREATE_NETLIST, _( "Netlist" ) );
- Button->SetForegroundColour( *wxRED );
page->m_RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( page, ID_RUN_SIMULATOR, _( "&Run Simulator" ) );
- Button->SetForegroundColour( wxColour( 0, 100, 0 ) );
page->m_RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( page, wxID_CANCEL, _( "&Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
page->m_RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
}
@@ -291,6 +290,7 @@ void WinEDA_NetlistFrame::InstallCustomPages()
/* create the pages for custom netlist format selection:
*/
{
+ bool selected;
int ii, CustomCount;
wxString title, previoustitle, msg;
EDA_NoteBookPage* CurrPage;
@@ -304,6 +304,8 @@ void WinEDA_NetlistFrame::InstallCustomPages()
if( title.IsEmpty() && previoustitle.IsEmpty() )
break; // No more panel to install
+ selected = m_Parent->m_NetlistFormat == ( NET_TYPE_CUSTOM1 + ii );
+
/* Install the panel "Add Plugin" after
* the last initialised panel */
previoustitle = title;
@@ -314,7 +316,8 @@ void WinEDA_NetlistFrame::InstallCustomPages()
_( "Add Plugin" ),
NET_TYPE_CUSTOM1 + ii,
ID_CURRENT_FORMAT_IS_DEFAULT,
- ID_SETUP_PLUGIN );
+ ID_SETUP_PLUGIN,
+ selected );
else /* Install a plugin panel */
CurrPage =
m_PanelNetType[PANELCUSTOMBASE + ii] =
@@ -322,7 +325,8 @@ void WinEDA_NetlistFrame::InstallCustomPages()
title,
NET_TYPE_CUSTOM1 + ii,
ID_CURRENT_FORMAT_IS_DEFAULT,
- ID_CREATE_NETLIST );
+ ID_CREATE_NETLIST,
+ selected );
msg = CUSTOM_NETLIST_COMMAND;
msg << ii + 1;
@@ -398,7 +402,7 @@ void WinEDA_NetlistFrame::SelectNetlistType( wxCommandEvent& event )
if( CurrPage == NULL )
return;
- g_NetFormat = CurrPage->m_IdNetType;
+ m_Parent->m_NetlistFormat = CurrPage->m_IdNetType;
CurrPage->m_IsCurrentFormat->SetValue( TRUE );
}
@@ -411,14 +415,14 @@ void WinEDA_NetlistFrame::NetlistUpdateOpt()
g_SimulatorCommandLine =
m_PanelNetType[PANELSPICE]->m_CommandStringCtrl->GetValue();
- g_NetFormat = NET_TYPE_PCBNEW;
+ m_Parent->m_NetlistFormat = NET_TYPE_PCBNEW;
for( ii = 0; ii < PANELCUSTOMBASE + CUSTOMPANEL_COUNTMAX; ii++ )
{
if( m_PanelNetType[ii] == NULL )
break;
if( m_PanelNetType[ii]->m_IsCurrentFormat->GetValue() == TRUE )
- g_NetFormat = m_PanelNetType[ii]->m_IdNetType;
+ m_Parent->m_NetlistFormat = m_PanelNetType[ii]->m_IdNetType;
}
g_OptNetListUseNames = TRUE; // Used for pspice, gnucap
@@ -440,19 +444,19 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
wxFileName fn;
wxString FileWildcard, FileExt;
wxString msg, Command;
- int netformat_tmp = g_NetFormat;
+ int netformat_tmp = m_Parent->m_NetlistFormat;
NetlistUpdateOpt();
EDA_NoteBookPage* CurrPage;
CurrPage = (EDA_NoteBookPage*) m_NoteBook->GetCurrentPage();
- g_NetFormat = CurrPage->m_IdNetType;
+ m_Parent->m_NetlistFormat = CurrPage->m_IdNetType;
/* Calculate the netlist filename */
fn = g_RootSheet->m_AssociatedScreen->m_FileName;
- switch( g_NetFormat )
+ switch( m_Parent->m_NetlistFormat )
{
case NET_TYPE_SPICE:
FileExt = wxT( "cir" );
@@ -509,7 +513,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
else
g_NetListerCommandLine.Empty();
- switch( g_NetFormat )
+ switch( m_Parent->m_NetlistFormat )
{
default:
WriteNetList( m_Parent, dlg.GetPath(), TRUE );
@@ -528,7 +532,7 @@ void WinEDA_NetlistFrame::GenNetlist( wxCommandEvent& event )
}
FreeTabNetList( g_TabObjNet, g_NbrObjNet );
- g_NetFormat = netformat_tmp;
+ m_Parent->m_NetlistFormat = netformat_tmp;
WriteCurrentNetlistSetup();
diff --git a/eeschema/netlist_control.h b/eeschema/netlist_control.h
index 1a96375bb7..39b9e02643 100644
--- a/eeschema/netlist_control.h
+++ b/eeschema/netlist_control.h
@@ -51,7 +51,8 @@ public:
wxBoxSizer* m_LowBoxSizer;
EDA_NoteBookPage( wxNotebook* parent, const wxString& title,
- int id_NetType, int idCheckBox, int idCreateFile );
+ int id_NetType, int idCheckBox, int idCreateFile,
+ bool selected );
~EDA_NoteBookPage() { };
};
diff --git a/eeschema/pinedit-dialog.cpp b/eeschema/pinedit-dialog.cpp
index f88be38922..07dcdbda09 100644
--- a/eeschema/pinedit-dialog.cpp
+++ b/eeschema/pinedit-dialog.cpp
@@ -134,10 +134,8 @@ bool WinEDA_PinPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const w
void WinEDA_PinPropertiesFrame::CreateControls()
{
- SetFont(*g_DialogFont);
-
////@begin WinEDA_PinPropertiesFrame content construction
- // Generated by DialogBlocks, 11/08/2008 19:12:48 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:24:14 (unregistered)
WinEDA_PinPropertiesFrame* itemDialog1 = this;
@@ -177,10 +175,10 @@ void WinEDA_PinPropertiesFrame::CreateControls()
m_PinSizeIncDecButton->SetValue(0);
itemBoxSizer10->Add(m_PinSizeIncDecButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5);
- m_PinSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin length"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_PinSizeText = new wxStaticText( itemDialog1, wxID_STATIC, _("Pin Lenght"), wxDefaultPosition, wxDefaultSize, 0 );
itemStaticBoxSizer9->Add(m_PinSizeText, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_CommonUnit = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMON_UNITS, _("Common to units"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
+ m_CommonUnit = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMON_UNITS, _("Common to Units"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_CommonUnit->SetValue(false);
itemStaticBoxSizer9->Add(m_CommonUnit, 0, wxALIGN_LEFT|wxALL, 5);
@@ -226,12 +224,10 @@ void WinEDA_PinPropertiesFrame::CreateControls()
itemBoxSizer24->Add(itemBoxSizer25, 0, wxGROW|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 160));
itemBoxSizer25->Add(m_btClose, 0, wxGROW|wxALL, 5);
wxButton* itemButton27 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton27->SetDefault();
- itemButton27->SetForegroundColour(wxColour(198, 0, 0));
itemBoxSizer25->Add(itemButton27, 0, wxGROW|wxALL, 5);
wxBoxSizer* itemBoxSizer28 = new wxBoxSizer(wxHORIZONTAL);
diff --git a/eeschema/pinedit-dialog.pjd b/eeschema/pinedit-dialog.pjd
index c18a0540b7..dd0b2a142f 100644
--- a/eeschema/pinedit-dialog.pjd
+++ b/eeschema/pinedit-dialog.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -1635,7 +1640,7 @@
""
""
""
- "0000A0"
+ ""
""
0
1
@@ -1702,7 +1707,7 @@
""
""
""
- "C60000"
+ ""
""
0
1
diff --git a/eeschema/plothpgl.cpp b/eeschema/plothpgl.cpp
index 4c677ff057..02843c7e55 100644
--- a/eeschema/plothpgl.cpp
+++ b/eeschema/plothpgl.cpp
@@ -106,21 +106,21 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PlotHPGLFrame, wxDialog )
BEGIN_EVENT_TABLE( WinEDA_PlotHPGLFrame, wxDialog )
////@begin WinEDA_PlotHPGLFrame event table entries
-EVT_RADIOBOX( ID_RADIOBOX, WinEDA_PlotHPGLFrame::OnRadioboxSelected )
+ EVT_RADIOBOX( ID_RADIOBOX, WinEDA_PlotHPGLFrame::OnRadioboxSelected )
-EVT_SPINCTRL( ID_PEN_WIDTH_UPDATED, WinEDA_PlotHPGLFrame::OnPenWidthUpdatedUpdated )
+ EVT_SPINCTRL( ID_PEN_WIDTH_UPDATED, WinEDA_PlotHPGLFrame::OnPenWidthUpdatedUpdated )
-EVT_SPINCTRL( ID_PEN_SPEED_UPDATED, WinEDA_PlotHPGLFrame::OnPenSpeedUpdatedUpdated )
+ EVT_SPINCTRL( ID_PEN_SPEED_UPDATED, WinEDA_PlotHPGLFrame::OnPenSpeedUpdatedUpdated )
-EVT_SPINCTRL( ID_PEN_NUMBER_UPDATED, WinEDA_PlotHPGLFrame::OnPenNumberUpdatedUpdated )
+ EVT_SPINCTRL( ID_PEN_NUMBER_UPDATED, WinEDA_PlotHPGLFrame::OnPenNumberUpdatedUpdated )
-EVT_BUTTON( ID_PLOT_HPGL_CURRENT_EXECUTE, WinEDA_PlotHPGLFrame::OnPlotHpglCurrentExecuteClick )
+ EVT_BUTTON( ID_PLOT_HPGL_CURRENT_EXECUTE, WinEDA_PlotHPGLFrame::OnPlotHpglCurrentExecuteClick )
-EVT_BUTTON( ID_PLOT_HPGL_ALL_EXECUTE, WinEDA_PlotHPGLFrame::OnPlotHpglAllExecuteClick )
+ EVT_BUTTON( ID_PLOT_HPGL_ALL_EXECUTE, WinEDA_PlotHPGLFrame::OnPlotHpglAllExecuteClick )
-EVT_BUTTON( wxID_CANCEL, WinEDA_PlotHPGLFrame::OnCancelClick )
+ EVT_BUTTON( wxID_CANCEL, WinEDA_PlotHPGLFrame::OnCancelClick )
-EVT_BUTTON( ID_PLOT_ACCEPT_OFFSET, WinEDA_PlotHPGLFrame::OnPlotAcceptOffsetClick )
+ EVT_BUTTON( ID_PLOT_ACCEPT_OFFSET, WinEDA_PlotHPGLFrame::OnPlotAcceptOffsetClick )
////@end WinEDA_PlotHPGLFrame event table entries
@@ -160,28 +160,26 @@ bool WinEDA_PlotHPGLFrame::Create( wxWindow* parent,
long style )
{
////@begin WinEDA_PlotHPGLFrame member initialisation
- m_SizeOption = NULL;
+ m_SizeOption = NULL;
m_ButtPenWidth = NULL;
m_ButtPenSpeed = NULL;
- m_ButtPenNum = NULL;
+ m_ButtPenNum = NULL;
m_PlotOrgPosition_X = NULL;
m_PlotOrgPosition_Y = NULL;
m_btClose = NULL;
- m_MsgBox = NULL;
-
+ m_MsgBox = NULL;
////@end WinEDA_PlotHPGLFrame member initialisation
////@begin WinEDA_PlotHPGLFrame creation
- SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
+ SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
- if( GetSizer() )
+ if (GetSizer())
{
- GetSizer()->SetSizeHints( this );
+ GetSizer()->SetSizeHints(this);
}
Centre();
-
////@end WinEDA_PlotHPGLFrame creation
return true;
}
@@ -193,173 +191,105 @@ bool WinEDA_PlotHPGLFrame::Create( wxWindow* parent,
void WinEDA_PlotHPGLFrame::CreateControls()
{
- SetFont( *g_DialogFont );
-
////@begin WinEDA_PlotHPGLFrame content construction
- // Generated by DialogBlocks, 23/08/2008 08:33:29 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:24:58 (unregistered)
WinEDA_PlotHPGLFrame* itemDialog1 = this;
- wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
- itemDialog1->SetSizer( itemBoxSizer2 );
+ wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
+ itemDialog1->SetSizer(itemBoxSizer2);
- wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxHORIZONTAL );
- itemBoxSizer2->Add( itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
+ wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
- wxBoxSizer* itemBoxSizer4 = new wxBoxSizer( wxVERTICAL );
- itemBoxSizer3->Add( itemBoxSizer4, 0, wxGROW | wxALL, 5 );
+ wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer3->Add(itemBoxSizer4, 0, wxGROW|wxALL, 5);
- wxArrayString m_SizeOptionStrings;
- m_SizeOptionStrings.Add( _( "Sheet Size" ) );
- m_SizeOptionStrings.Add( _( "Page Size A4" ) );
- m_SizeOptionStrings.Add( _( "Page Size A3" ) );
- m_SizeOptionStrings.Add( _( "Page Size A2" ) );
- m_SizeOptionStrings.Add( _( "Page Size A1" ) );
- m_SizeOptionStrings.Add( _( "Page Size A0" ) );
- m_SizeOptionStrings.Add( _( "Page Size A" ) );
- m_SizeOptionStrings.Add( _( "Page Size B" ) );
- m_SizeOptionStrings.Add( _( "Page Size C" ) );
- m_SizeOptionStrings.Add( _( "Page Size D" ) );
- m_SizeOptionStrings.Add( _( "Page Size E" ) );
- m_SizeOption = new wxRadioBox( itemDialog1, ID_RADIOBOX, _(
- "Plot page size:" ), wxDefaultPosition, wxDefaultSize,
- m_SizeOptionStrings, 1,
- wxRA_SPECIFY_COLS );
- m_SizeOption->SetSelection( 0 );
- itemBoxSizer4->Add( m_SizeOption, 0, wxALIGN_LEFT | wxALL, 5 );
+ wxArrayString m_SizeOptionStrings;
+ m_SizeOptionStrings.Add(_("Sheet Size"));
+ m_SizeOptionStrings.Add(_("Page Size A4"));
+ m_SizeOptionStrings.Add(_("Page Size A3"));
+ m_SizeOptionStrings.Add(_("Page Size A2"));
+ m_SizeOptionStrings.Add(_("Page Size A1"));
+ m_SizeOptionStrings.Add(_("Page Size A0"));
+ m_SizeOptionStrings.Add(_("Page Size A"));
+ m_SizeOptionStrings.Add(_("Page Size B"));
+ m_SizeOptionStrings.Add(_("Page Size C"));
+ m_SizeOptionStrings.Add(_("Page Size D"));
+ m_SizeOptionStrings.Add(_("Page Size E"));
+ m_SizeOption = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Plot page size:"), wxDefaultPosition, wxDefaultSize, m_SizeOptionStrings, 1, wxRA_SPECIFY_COLS );
+ m_SizeOption->SetSelection(0);
+ itemBoxSizer4->Add(m_SizeOption, 0, wxALIGN_LEFT|wxALL, 5);
- wxBoxSizer* itemBoxSizer6 = new wxBoxSizer( wxVERTICAL );
- itemBoxSizer3->Add( itemBoxSizer6, 0, wxALIGN_TOP | wxALL, 5 );
+ wxBoxSizer* itemBoxSizer6 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer3->Add(itemBoxSizer6, 0, wxALIGN_TOP|wxALL, 5);
- wxStaticBox* itemStaticBoxSizer7Static =
- new wxStaticBox( itemDialog1, wxID_ANY, _( "Pen control:" ) );
- wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer( itemStaticBoxSizer7Static,
- wxVERTICAL );
- itemBoxSizer6->Add( itemStaticBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
+ wxStaticBox* itemStaticBoxSizer7Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Pen control:"));
+ wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(itemStaticBoxSizer7Static, wxVERTICAL);
+ itemBoxSizer6->Add(itemStaticBoxSizer7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
- wxStaticText* itemStaticText8 =
- new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Pen Width ( mils )" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer7->Add( itemStaticText8,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText8 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Width ( mils )"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer7->Add(itemStaticText8, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_ButtPenWidth = new wxSpinCtrl( itemDialog1, ID_PEN_WIDTH_UPDATED, _T(
- "1" ), wxDefaultPosition, wxDefaultSize,
- wxSP_ARROW_KEYS | wxSP_WRAP, 1, 100, 1 );
- itemStaticBoxSizer7->Add( m_ButtPenWidth, 0, wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM, 5 );
+ m_ButtPenWidth = new wxSpinCtrl( itemDialog1, ID_PEN_WIDTH_UPDATED, _T("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 );
+ itemStaticBoxSizer7->Add(m_ButtPenWidth, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- wxStaticText* itemStaticText10 =
- new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Pen Speed ( cm/s )" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer7->Add( itemStaticText10,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText10 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Speed ( cm/s )"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer7->Add(itemStaticText10, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_ButtPenSpeed = new wxSpinCtrl( itemDialog1, ID_PEN_SPEED_UPDATED, _T(
- "1" ), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS,
- 1, 100, 1 );
- itemStaticBoxSizer7->Add( m_ButtPenSpeed,
- 0,
- wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT | wxBOTTOM,
- 5 );
+ m_ButtPenSpeed = new wxSpinCtrl( itemDialog1, ID_PEN_SPEED_UPDATED, _T("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 1 );
+ itemStaticBoxSizer7->Add(m_ButtPenSpeed, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Pen Number" ), wxDefaultPosition,
- wxDefaultSize, 0 );
- itemStaticBoxSizer7->Add( itemStaticText12,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText12 = new wxStaticText( itemDialog1, wxID_STATIC, _("Pen Number"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer7->Add(itemStaticText12, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_ButtPenNum = new wxSpinCtrl( itemDialog1, ID_PEN_NUMBER_UPDATED, _T(
- "1" ), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1,
- 8, 1 );
- itemStaticBoxSizer7->Add( m_ButtPenNum,
- 0,
- wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT | wxBOTTOM,
- 5 );
+ m_ButtPenNum = new wxSpinCtrl( itemDialog1, ID_PEN_NUMBER_UPDATED, _T("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 8, 1 );
+ itemStaticBoxSizer7->Add(m_ButtPenNum, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- wxStaticBox* itemStaticBoxSizer14Static =
- new wxStaticBox( itemDialog1, wxID_ANY, _( "Page offset:" ) );
- wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer( itemStaticBoxSizer14Static,
- wxVERTICAL );
- itemBoxSizer6->Add( itemStaticBoxSizer14, 0, wxALIGN_LEFT | wxALL, 5 );
+ wxStaticBox* itemStaticBoxSizer14Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Page offset:"));
+ wxStaticBoxSizer* itemStaticBoxSizer14 = new wxStaticBoxSizer(itemStaticBoxSizer14Static, wxVERTICAL);
+ itemBoxSizer6->Add(itemStaticBoxSizer14, 0, wxALIGN_LEFT|wxALL, 5);
- wxStaticText* itemStaticText15 =
- new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Plot Offset X" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer14->Add( itemStaticText15,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("Plot Offset X"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_PlotOrgPosition_X = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(
- "" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer14->Add( m_PlotOrgPosition_X,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM,
- 5 );
+ m_PlotOrgPosition_X = new wxTextCtrl( itemDialog1, ID_TEXTCTRL1, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer14->Add(m_PlotOrgPosition_X, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- wxStaticText* itemStaticText17 =
- new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Plot Offset Y" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer14->Add( itemStaticText17,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText17 = new wxStaticText( itemDialog1, wxID_STATIC, _("Plot Offset Y"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer14->Add(itemStaticText17, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_PlotOrgPosition_Y = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(
- "" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemStaticBoxSizer14->Add( m_PlotOrgPosition_Y,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxBOTTOM,
- 5 );
+ m_PlotOrgPosition_Y = new wxTextCtrl( itemDialog1, ID_TEXTCTRL2, _T(""), wxDefaultPosition, wxDefaultSize, 0 );
+ itemStaticBoxSizer14->Add(m_PlotOrgPosition_Y, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxBOTTOM, 5);
- itemBoxSizer3->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxBoxSizer* itemBoxSizer20 = new wxBoxSizer( wxVERTICAL );
- itemBoxSizer3->Add( itemBoxSizer20, 0, wxALIGN_TOP | wxLEFT | wxTOP | wxBOTTOM, 5 );
+ wxBoxSizer* itemBoxSizer20 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer3->Add(itemBoxSizer20, 0, wxALIGN_TOP|wxLEFT|wxTOP|wxBOTTOM, 5);
- wxButton* itemButton21 =
- new wxButton( itemDialog1, ID_PLOT_HPGL_CURRENT_EXECUTE, _(
- "&Plot page" ), wxDefaultPosition, wxDefaultSize, 0 );
+ wxButton* itemButton21 = new wxButton( itemDialog1, ID_PLOT_HPGL_CURRENT_EXECUTE, _("&Plot Page"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton21->SetDefault();
- itemButton21->SetForegroundColour( wxColour( 0, 128, 0 ) );
- itemBoxSizer20->Add( itemButton21, 0, wxGROW | wxALL, 5 );
+ itemBoxSizer20->Add(itemButton21, 0, wxGROW|wxALL, 5);
- wxButton* itemButton22 = new wxButton( itemDialog1, ID_PLOT_HPGL_ALL_EXECUTE, _(
- "Plot a&ll" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton22->SetForegroundColour( wxColour( 0, 0, 255 ) );
- itemBoxSizer20->Add( itemButton22, 0, wxGROW | wxALL, 5 );
+ wxButton* itemButton22 = new wxButton( itemDialog1, ID_PLOT_HPGL_ALL_EXECUTE, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer20->Add(itemButton22, 0, wxGROW|wxALL, 5);
- m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _(
- "&Close" ), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour( wxColour( 128, 0, 0 ) );
- itemBoxSizer20->Add( m_btClose, 0, wxGROW | wxALL, 5 );
+ m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Close"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer20->Add(m_btClose, 0, wxGROW|wxALL, 5);
- itemBoxSizer20->Add( 5, 5, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
+ itemBoxSizer20->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
- wxButton* itemButton25 = new wxButton( itemDialog1, ID_PLOT_ACCEPT_OFFSET, _(
- "&Accept Offset" ), wxDefaultPosition,
- wxDefaultSize, 0 );
- itemButton25->SetForegroundColour( wxColour( 101, 123, 68 ) );
- itemBoxSizer20->Add( itemButton25, 0, wxGROW | wxALL, 5 );
+ wxButton* itemButton25 = new wxButton( itemDialog1, ID_PLOT_ACCEPT_OFFSET, _("&Accept Offset"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer20->Add(itemButton25, 0, wxGROW|wxALL, 5);
- m_MsgBox =
- new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T( "" ), wxDefaultPosition, wxSize( -1,
- 110 ),
- wxTE_MULTILINE );
- itemBoxSizer2->Add( m_MsgBox, 0, wxGROW | wxALL, 5 );
+ m_MsgBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(-1, 110), wxTE_MULTILINE );
+ itemBoxSizer2->Add(m_MsgBox, 0, wxGROW|wxALL, 5);
// Set validators
- m_SizeOption->SetValidator( wxGenericValidator( &HPGL_SizeSelect ) );
- m_ButtPenWidth->SetValidator( wxGenericValidator( &g_HPGL_Pen_Descr.m_Pen_Diam ) );
- m_ButtPenSpeed->SetValidator( wxGenericValidator( &g_HPGL_Pen_Descr.m_Pen_Speed ) );
- m_ButtPenNum->SetValidator( wxGenericValidator( &g_HPGL_Pen_Descr.m_Pen_Num ) );
-
+ m_SizeOption->SetValidator( wxGenericValidator(& HPGL_SizeSelect) );
+ m_ButtPenWidth->SetValidator( wxGenericValidator(& g_HPGL_Pen_Descr.m_Pen_Diam) );
+ m_ButtPenSpeed->SetValidator( wxGenericValidator(& g_HPGL_Pen_Descr.m_Pen_Speed) );
+ m_ButtPenNum->SetValidator( wxGenericValidator(& g_HPGL_Pen_Descr.m_Pen_Num) );
////@end WinEDA_PlotHPGLFrame content construction
SetFocus(); // Make ESC key working
}
@@ -394,7 +324,6 @@ void WinEDA_PlotHPGLFrame::OnCancelClick( wxCommandEvent& event )
////@begin wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PlotHPGLFrame.
// Before editing this code, remove the block markers.
event.Skip();
-
////@end wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL in WinEDA_PlotHPGLFrame.
}
@@ -427,9 +356,8 @@ wxBitmap WinEDA_PlotHPGLFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_PlotHPGLFrame bitmap retrieval
- wxUnusedVar( name );
+ wxUnusedVar(name);
return wxNullBitmap;
-
////@end WinEDA_PlotHPGLFrame bitmap retrieval
}
@@ -442,9 +370,8 @@ wxIcon WinEDA_PlotHPGLFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_PlotHPGLFrame icon retrieval
- wxUnusedVar( name );
+ wxUnusedVar(name);
return wxNullIcon;
-
////@end WinEDA_PlotHPGLFrame icon retrieval
}
diff --git a/eeschema/plothpgl.pjd b/eeschema/plothpgl.pjd
index 4d01b77922..5e32b1257a 100644
--- a/eeschema/plothpgl.pjd
+++ b/eeschema/plothpgl.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -1319,7 +1324,7 @@
""
""
""
- "008000"
+ ""
""
0
1
@@ -1386,7 +1391,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -1453,7 +1458,7 @@
""
""
""
- "800000"
+ ""
""
0
1
@@ -1546,7 +1551,7 @@
""
""
""
- "657B44"
+ ""
""
0
1
diff --git a/eeschema/plotps.cpp b/eeschema/plotps.cpp
index b5e78ce7ea..052595d6bd 100644
--- a/eeschema/plotps.cpp
+++ b/eeschema/plotps.cpp
@@ -101,11 +101,11 @@ IMPLEMENT_DYNAMIC_CLASS( WinEDA_PlotPSFrame, wxDialog )
BEGIN_EVENT_TABLE( WinEDA_PlotPSFrame, wxDialog )
////@begin WinEDA_PlotPSFrame event table entries
-EVT_BUTTON( ID_PLOT_PS_CURRENT_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsCurrentExecuteClick )
+ EVT_BUTTON( ID_PLOT_PS_CURRENT_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsCurrentExecuteClick )
-EVT_BUTTON( ID_PLOT_PS_ALL_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsAllExecuteClick )
+ EVT_BUTTON( ID_PLOT_PS_ALL_EXECUTE, WinEDA_PlotPSFrame::OnPlotPsAllExecuteClick )
-EVT_BUTTON( wxID_CANCEL, WinEDA_PlotPSFrame::OnCancelClick )
+ EVT_BUTTON( wxID_CANCEL, WinEDA_PlotPSFrame::OnCancelClick )
////@end WinEDA_PlotPSFrame event table entries
@@ -146,24 +146,22 @@ bool WinEDA_PlotPSFrame::Create( wxWindow* parent,
////@begin WinEDA_PlotPSFrame member initialisation
m_SizeOption = NULL;
m_PlotPSColorOption = NULL;
- m_Plot_Sheet_Ref = NULL;
+ m_Plot_Sheet_Ref = NULL;
m_btClose = NULL;
m_DefaultLineSizeCtrlSizer = NULL;
m_MsgBox = NULL;
-
////@end WinEDA_PlotPSFrame member initialisation
////@begin WinEDA_PlotPSFrame creation
- SetExtraStyle( wxWS_EX_BLOCK_EVENTS );
+ SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
- if( GetSizer() )
+ if (GetSizer())
{
- GetSizer()->SetSizeHints( this );
+ GetSizer()->SetSizeHints(this);
}
Centre();
-
////@end WinEDA_PlotPSFrame creation
return true;
}
@@ -175,97 +173,70 @@ bool WinEDA_PlotPSFrame::Create( wxWindow* parent,
void WinEDA_PlotPSFrame::CreateControls()
{
- SetFont( *g_DialogFont );
-
////@begin WinEDA_PlotPSFrame content construction
- // Generated by DialogBlocks, 23/08/2008 08:35:17 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:25:24 (unregistered)
WinEDA_PlotPSFrame* itemDialog1 = this;
- wxBoxSizer* itemBoxSizer2 = new wxBoxSizer( wxVERTICAL );
- itemDialog1->SetSizer( itemBoxSizer2 );
+ wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL);
+ itemDialog1->SetSizer(itemBoxSizer2);
- wxBoxSizer* itemBoxSizer3 = new wxBoxSizer( wxHORIZONTAL );
- itemBoxSizer2->Add( itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL | wxALL, 5 );
+ wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
+ itemBoxSizer2->Add(itemBoxSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
- wxArrayString m_SizeOptionStrings;
- m_SizeOptionStrings.Add( _( "Auto" ) );
- m_SizeOptionStrings.Add( _( "Page Size A4" ) );
- m_SizeOptionStrings.Add( _( "Page Size A" ) );
- m_SizeOption = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _(
- "Plot page size:" ), wxDefaultPosition, wxDefaultSize,
- m_SizeOptionStrings, 1,
- wxRA_SPECIFY_COLS );
- m_SizeOption->SetSelection( 0 );
- itemBoxSizer3->Add( m_SizeOption, 0, wxGROW | wxALL, 5 );
+ wxArrayString m_SizeOptionStrings;
+ m_SizeOptionStrings.Add(_("Auto"));
+ m_SizeOptionStrings.Add(_("Page Size A4"));
+ m_SizeOptionStrings.Add(_("Page Size A"));
+ m_SizeOption = new wxRadioBox( itemDialog1, ID_RADIOBOX1, _("Plot page size:"), wxDefaultPosition, wxDefaultSize, m_SizeOptionStrings, 1, wxRA_SPECIFY_COLS );
+ m_SizeOption->SetSelection(0);
+ itemBoxSizer3->Add(m_SizeOption, 0, wxGROW|wxALL, 5);
- itemBoxSizer3->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox( itemDialog1, wxID_ANY,
- _( "Plot Options:" ) );
- wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer( itemStaticBoxSizer6Static,
- wxVERTICAL );
- itemBoxSizer3->Add( itemStaticBoxSizer6, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ wxStaticBox* itemStaticBoxSizer6Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Plot Options:"));
+ wxStaticBoxSizer* itemStaticBoxSizer6 = new wxStaticBoxSizer(itemStaticBoxSizer6Static, wxVERTICAL);
+ itemBoxSizer3->Add(itemStaticBoxSizer6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxArrayString m_PlotPSColorOptionStrings;
- m_PlotPSColorOptionStrings.Add( _( "B/W" ) );
- m_PlotPSColorOptionStrings.Add( _( "Color" ) );
- m_PlotPSColorOption = new wxRadioBox( itemDialog1, ID_RADIOBOX, _(
- "Plot Color:" ), wxDefaultPosition, wxDefaultSize,
- m_PlotPSColorOptionStrings, 1,
- wxRA_SPECIFY_COLS );
- m_PlotPSColorOption->SetSelection( 0 );
- itemStaticBoxSizer6->Add( m_PlotPSColorOption, 0, wxGROW | wxALL, 5 );
+ m_PlotPSColorOptionStrings.Add(_("B/W"));
+ m_PlotPSColorOptionStrings.Add(_("Color"));
+ m_PlotPSColorOption = new wxRadioBox( itemDialog1, ID_RADIOBOX, _("Plot Color:"), wxDefaultPosition, wxDefaultSize, m_PlotPSColorOptionStrings, 1, wxRA_SPECIFY_COLS );
+ m_PlotPSColorOption->SetSelection(0);
+ itemStaticBoxSizer6->Add(m_PlotPSColorOption, 0, wxGROW|wxALL, 5);
- m_Plot_Sheet_Ref = new wxCheckBox( itemDialog1, ID_CHECKBOX, _(
- "Print Sheet Ref" ), wxDefaultPosition, wxDefaultSize,
- wxCHK_2STATE );
- m_Plot_Sheet_Ref->SetValue( false );
- itemStaticBoxSizer6->Add( m_Plot_Sheet_Ref, 0, wxGROW | wxALL, 5 );
+ m_Plot_Sheet_Ref = new wxCheckBox( itemDialog1, ID_CHECKBOX, _("Print Sheet Ref"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
+ m_Plot_Sheet_Ref->SetValue(false);
+ itemStaticBoxSizer6->Add(m_Plot_Sheet_Ref, 0, wxGROW|wxALL, 5);
- itemBoxSizer3->Add( 5, 5, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ itemBoxSizer3->Add(5, 5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxBoxSizer* itemBoxSizer10 = new wxBoxSizer( wxVERTICAL );
- itemBoxSizer3->Add( itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
+ wxBoxSizer* itemBoxSizer10 = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer3->Add(itemBoxSizer10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxButton* itemButton11 = new wxButton( itemDialog1, ID_PLOT_PS_CURRENT_EXECUTE,
- _(
- "&Plot page" ), wxDefaultPosition, wxDefaultSize,
- 0 );
+ wxButton* itemButton11 = new wxButton( itemDialog1, ID_PLOT_PS_CURRENT_EXECUTE, _("&Plot Page"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton11->SetDefault();
- itemButton11->SetForegroundColour( wxColour( 0, 128, 0 ) );
- itemBoxSizer10->Add( itemButton11, 0, wxGROW | wxALL, 5 );
+ itemBoxSizer10->Add(itemButton11, 0, wxGROW|wxALL, 5);
- wxButton* itemButton12 = new wxButton( itemDialog1, ID_PLOT_PS_ALL_EXECUTE, _(
- "Plot a&ll" ), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton12->SetForegroundColour( wxColour( 179, 0, 0 ) );
- itemBoxSizer10->Add( itemButton12, 0, wxGROW | wxALL, 5 );
+ wxButton* itemButton12 = new wxButton( itemDialog1, ID_PLOT_PS_ALL_EXECUTE, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer10->Add(itemButton12, 0, wxGROW|wxALL, 5);
- m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _(
- "&Close" ), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour( wxColour( 0, 0, 255 ) );
- itemBoxSizer10->Add( m_btClose, 0, wxGROW | wxALL, 5 );
+ m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer10->Add(m_btClose, 0, wxGROW|wxALL, 5);
- m_DefaultLineSizeCtrlSizer = new wxBoxSizer( wxVERTICAL );
- itemBoxSizer2->Add( m_DefaultLineSizeCtrlSizer, 0, wxGROW | wxALL, 5 );
+ m_DefaultLineSizeCtrlSizer = new wxBoxSizer(wxVERTICAL);
+ itemBoxSizer2->Add(m_DefaultLineSizeCtrlSizer, 0, wxGROW|wxALL, 5);
- wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _(
- "Messages :" ), wxDefaultPosition,
- wxDefaultSize, 0 );
- itemBoxSizer2->Add( itemStaticText15,
- 0,
- wxALIGN_LEFT | wxLEFT | wxRIGHT | wxTOP | wxADJUST_MINSIZE,
- 5 );
+ wxStaticText* itemStaticText15 = new wxStaticText( itemDialog1, wxID_STATIC, _("Messages :"), wxDefaultPosition, wxDefaultSize, 0 );
+ itemBoxSizer2->Add(itemStaticText15, 0, wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE, 5);
- m_MsgBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T( "" ), wxDefaultPosition,
- wxSize( -1, 200 ), wxTE_MULTILINE );
- itemBoxSizer2->Add( m_MsgBox, 0, wxGROW | wxALL | wxFIXED_MINSIZE, 5 );
+ m_MsgBox = new wxTextCtrl( itemDialog1, ID_TEXTCTRL, _T(""), wxDefaultPosition, wxSize(-1, 200), wxTE_MULTILINE );
+ itemBoxSizer2->Add(m_MsgBox, 0, wxGROW|wxALL|wxFIXED_MINSIZE, 5);
// Set validators
- m_SizeOption->SetValidator( wxGenericValidator( &PS_SizeSelect ) );
- m_PlotPSColorOption->SetValidator( wxGenericValidator( &g_PlotPSColorOpt ) );
- m_Plot_Sheet_Ref->SetValidator( wxGenericValidator( &Plot_Sheet_Ref ) );
-
+ m_SizeOption->SetValidator( wxGenericValidator(& PS_SizeSelect) );
+ m_PlotPSColorOption->SetValidator( wxGenericValidator(& g_PlotPSColorOpt) );
+ m_Plot_Sheet_Ref->SetValidator( wxGenericValidator(& Plot_Sheet_Ref) );
////@end WinEDA_PlotPSFrame content construction
SetFocus(); // make the ESC work
@@ -295,9 +266,8 @@ wxBitmap WinEDA_PlotPSFrame::GetBitmapResource( const wxString& name )
{
// Bitmap retrieval
////@begin WinEDA_PlotPSFrame bitmap retrieval
- wxUnusedVar( name );
+ wxUnusedVar(name);
return wxNullBitmap;
-
////@end WinEDA_PlotPSFrame bitmap retrieval
}
@@ -310,9 +280,8 @@ wxIcon WinEDA_PlotPSFrame::GetIconResource( const wxString& name )
{
// Icon retrieval
////@begin WinEDA_PlotPSFrame icon retrieval
- wxUnusedVar( name );
+ wxUnusedVar(name);
return wxNullIcon;
-
////@end WinEDA_PlotPSFrame icon retrieval
}
diff --git a/eeschema/plotps.pjd b/eeschema/plotps.pjd
index a8e432766d..f03faa69e0 100644
--- a/eeschema/plotps.pjd
+++ b/eeschema/plotps.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -660,7 +665,7 @@
""
""
""
- "008000"
+ ""
""
0
1
@@ -727,7 +732,7 @@
""
""
""
- "B30000"
+ ""
""
0
1
@@ -794,7 +799,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
diff --git a/eeschema/protos.h b/eeschema/protos.h
index 7e9c0f4b85..89f5870372 100644
--- a/eeschema/protos.h
+++ b/eeschema/protos.h
@@ -78,7 +78,7 @@ PriorQue *LoadLibraryAux(WinEDA_DrawFrame * frame, LibraryStruct * library,
FILE *f, int *NumOfParts);
LibraryStruct * LoadLibraryName(WinEDA_DrawFrame * frame,
const wxString & FullLibName, const wxString & LibName);
-void LoadLibraries(WinEDA_DrawFrame * frame);
+void LoadLibraries( WinEDA_SchematicFrame* frame );
void FreeCmpLibrary(wxWindow * frame, const wxString & LibName);
const wxChar **GetLibNames();
@@ -209,7 +209,6 @@ int CountCmpNumber();
/***************/
/* EECONFIG.CPP */
/***************/
-bool Read_Config( const wxString & CfgFileName, bool ForceRereadConfig );
bool Read_Hotkey_Config( WinEDA_DrawFrame * frame, bool verbose );
@@ -387,7 +386,8 @@ int LocateAlias( const wxArrayString & AliasData, const wxString & Name);
/***************/
/* OPTIONS.CPP */
/***************/
-void DisplayOptionFrame(WinEDA_DrawFrame * parent, const wxPoint & framepos);
+void DisplayOptionFrame( WinEDA_SchematicFrame* parent,
+ const wxPoint& framepos );
/****************/
/* CONTROLE.CPP */
diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp
index 3e5082bf18..acb4bd2bd5 100644
--- a/eeschema/schframe.cpp
+++ b/eeschema/schframe.cpp
@@ -51,9 +51,6 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
ID_SCHEMATIC_MAIN_TOOLBAR_END,
WinEDA_SchematicFrame::Process_Special_Functions )
- EVT_MENU_RANGE( ID_PREFERENCES_FONT_DIALOG, ID_PREFERENCES_FONT_END,
- WinEDA_DrawFrame::ProcessFontPreferences )
-
EVT_MENU( ID_SAVE_PROJECT, WinEDA_SchematicFrame::Save_File )
EVT_MENU( ID_SAVE_ONE_SHEET, WinEDA_SchematicFrame::Save_File )
EVT_MENU( ID_SAVE_ONE_SHEET_AS, WinEDA_SchematicFrame::Save_File )
@@ -119,6 +116,26 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
WinEDA_SchematicFrame::Process_Special_Functions )
+
+ /* Handle user interface update events. */
+ EVT_UPDATE_UI( wxID_CUT, WinEDA_SchematicFrame::OnUpdateBlockSelected )
+ EVT_UPDATE_UI( wxID_COPY, WinEDA_SchematicFrame::OnUpdateBlockSelected )
+ EVT_UPDATE_UI( wxID_PASTE, WinEDA_SchematicFrame::OnUpdatePaste )
+ EVT_UPDATE_UI( ID_SCHEMATIC_UNDO,
+ WinEDA_SchematicFrame::OnUpdateSchematicUndo )
+ EVT_UPDATE_UI( ID_SCHEMATIC_REDO,
+ WinEDA_SchematicFrame::OnUpdateSchematicRedo )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_GRID,
+ WinEDA_SchematicFrame::OnUpdateGrid )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_SELECT_CURSOR,
+ WinEDA_SchematicFrame::OnUpdateSelectCursor )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_HIDDEN_PINS,
+ WinEDA_SchematicFrame::OnUpdateHiddenPins )
+ EVT_UPDATE_UI( ID_TB_OPTIONS_BUS_WIRES_ORIENT,
+ WinEDA_SchematicFrame::OnUpdateBusOrientation )
+ EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SELECT_UNIT_MM,
+ ID_TB_OPTIONS_SELECT_UNIT_INCH,
+ WinEDA_SchematicFrame::OnUpdateUnits )
END_EVENT_TABLE()
@@ -133,8 +150,6 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
long style ) :
WinEDA_DrawFrame( father, SCHEMATIC_FRAME, title, pos, size, style )
{
- wxConfig* config = wxGetApp().m_EDA_Config;
-
m_FrameName = wxT( "SchematicFrame" );
m_Draw_Axis = FALSE; // TRUE to show axis
m_Draw_Sheet_Ref = TRUE; // TRUE to show sheet references
@@ -144,6 +159,7 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
m_TextFieldSize = DEFAULT_SIZE_TEXT;
m_LibeditFrame = NULL; // Component editor frame.
m_ViewlibFrame = NULL; // Frame for browsing component libraries
+ m_DefaultSchematicFileName = wxT( "noname.sch" );
CreateScreens();
@@ -159,14 +175,6 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
/* Get config */
LoadSettings();
- if( config )
- {
- g_DrawMinimunLineWidth = config->Read( MINI_DRAW_LINE_WIDTH_KEY,
- (long) 0 );
- g_PlotLine_Width = config->Read( OPTKEY_PLOT_LINEWIDTH_VALUE,
- (long) 4 );
- }
-
SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
if( DrawPanel )
@@ -185,9 +193,6 @@ WinEDA_SchematicFrame::WinEDA_SchematicFrame( wxWindow* father,
WinEDA_SchematicFrame::~WinEDA_SchematicFrame()
{
- extern PARAM_CFG_BASE* ParamCfgList[];
- wxGetApp().SaveCurrentSetupValues( ParamCfgList );
-
SAFE_DELETE( g_RootSheet );
SAFE_DELETE( m_CurrentSheet ); //a DrawSheetPath, on the heap.
m_CurrentSheet = NULL;
@@ -277,7 +282,7 @@ void WinEDA_SchematicFrame::CreateScreens()
g_RootSheet->m_AssociatedScreen = new SCH_SCREEN();
g_RootSheet->m_AssociatedScreen->m_RefCount++;
}
- g_RootSheet->m_AssociatedScreen->m_FileName = g_DefaultSchematicFileName;
+ g_RootSheet->m_AssociatedScreen->m_FileName = m_DefaultSchematicFileName;
g_RootSheet->m_AssociatedScreen->m_Date = GenDate();
m_CurrentSheet->Clear();
m_CurrentSheet->Push( g_RootSheet );
@@ -294,7 +299,6 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
/*****************************************************************/
{
DrawSheetPath* sheet;
- wxConfig* config = wxGetApp().m_EDA_Config;
if( m_LibeditFrame ) // Can close component editor ?
{
@@ -312,14 +316,12 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
if( sheet )
{
- unsigned ii;
wxMessageDialog dialog( this,
_( "Schematic modified, Save before exit ?" ),
_( "Confirmation" ), wxYES_NO | wxCANCEL |
wxICON_EXCLAMATION | wxYES_DEFAULT );
- ii = dialog.ShowModal();
- switch( ii )
+ switch( dialog.ShowModal() )
{
case wxID_CANCEL:
Event.Veto();
@@ -351,93 +353,11 @@ void WinEDA_SchematicFrame::OnCloseWindow( wxCloseEvent& Event )
/* allof sub sheets are deleted, only the main sheet is useable */
m_CurrentSheet->Clear();
-
SaveSettings();
-
- if( config )
- {
- config->Write( MINI_DRAW_LINE_WIDTH_KEY, (long) g_DrawMinimunLineWidth );
- config->Write( OPTKEY_PLOT_LINEWIDTH_VALUE, (long) g_PlotLine_Width );
- }
-
Destroy();
}
-/*****************************************************************************
-* Enable or disable some tools according to current conditions
-*****************************************************************************/
-void WinEDA_SchematicFrame::SetToolbars()
-{
- if( m_HToolBar )
- {
- if( GetScreen() && GetScreen()->BlockLocate.m_Command == BLOCK_MOVE )
- {
- m_HToolBar->EnableTool( wxID_CUT, TRUE );
- m_HToolBar->EnableTool( wxID_COPY, TRUE );
- }
- else
- {
- m_HToolBar->EnableTool( wxID_CUT, FALSE );
- m_HToolBar->EnableTool( wxID_COPY, FALSE );
- }
-
- if( g_BlockSaveDataList )
- m_HToolBar->EnableTool( wxID_PASTE, TRUE );
- else
- m_HToolBar->EnableTool( wxID_PASTE, FALSE );
-
- wxMenuBar* menuBar = GetMenuBar();
- if( GetScreen() && GetScreen()->m_RedoList )
- {
- m_HToolBar->EnableTool( ID_SCHEMATIC_REDO, TRUE );
- menuBar->Enable( ID_SCHEMATIC_REDO, TRUE );
- }
- else
- {
- m_HToolBar->EnableTool( ID_SCHEMATIC_REDO, FALSE );
- menuBar->Enable( ID_SCHEMATIC_REDO, FALSE );
- }
- if( GetScreen() && GetScreen()->m_UndoList )
- {
- m_HToolBar->EnableTool( ID_SCHEMATIC_UNDO, TRUE );
- menuBar->Enable( ID_SCHEMATIC_UNDO, TRUE );
- }
- else
- {
- m_HToolBar->EnableTool( ID_SCHEMATIC_UNDO, FALSE );
- menuBar->Enable( ID_SCHEMATIC_UNDO, FALSE );
- }
- }
-
- if( m_OptionsToolBar )
- {
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GRID, m_Draw_Grid );
- m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_GRID,
- m_Draw_Grid ? _( "Grid not show" ) : _( "Show Grid" ) );
-
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM,
- g_UnitMetric == MILLIMETRE ? TRUE : FALSE );
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH,
- g_UnitMetric == INCHES ? TRUE : FALSE );
-
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_CURSOR,
- m_CursorShape );
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_HIDDEN_PINS, g_ShowAllPins );
- m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_HIDDEN_PINS,
- g_ShowAllPins ? _( "No show Hidden Pins" ) : _(
- "Show Hidden Pins" ) );
- m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_BUS_WIRES_ORIENT,
- g_HVLines );
- m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_BUS_WIRES_ORIENT,
- g_HVLines ? _( "Allows any direction for wires and busses" ) :
- _( "Allows horizontal and vertical wires and busses only" ) );
- }
-
- DisplayUnitsMsg();
-}
-
-
/************************************/
int WinEDA_SchematicFrame::BestZoom()
/************************************/
@@ -490,6 +410,75 @@ wxString WinEDA_SchematicFrame::GetUniqueFilenameForCurrentSheet( )
return filename;
}
+/*****************************************************************************
+ * Enable or disable menu entry and toolbar buttons according to current
+ * conditions.
+ *****************************************************************************/
+
+void WinEDA_SchematicFrame::OnUpdateBlockSelected( wxUpdateUIEvent& event )
+{
+ bool enable = ( GetScreen() &&
+ GetScreen()->BlockLocate.m_Command == BLOCK_MOVE );
+ event.Enable(enable);
+ m_HToolBar->EnableTool( wxID_CUT, enable );
+ m_HToolBar->EnableTool( wxID_COPY, enable );
+}
+
+void WinEDA_SchematicFrame::OnUpdatePaste( wxUpdateUIEvent& event )
+{
+ event.Enable( g_BlockSaveDataList );
+ m_HToolBar->EnableTool( wxID_PASTE, g_BlockSaveDataList );
+}
+
+void WinEDA_SchematicFrame::OnUpdateSchematicUndo( wxUpdateUIEvent& event )
+{
+ event.Enable( (GetScreen()->m_UndoList) ? true : false );
+}
+
+void WinEDA_SchematicFrame::OnUpdateSchematicRedo( wxUpdateUIEvent& event )
+{
+ event.Enable( (GetScreen()->m_RedoList) ? true : false );
+}
+
+void WinEDA_SchematicFrame::OnUpdateBusOrientation( wxUpdateUIEvent& event )
+{
+ wxString tool_tip = g_HVLines ?
+ _( "Draw wires and busses in any direction" ) :
+ _( "Draw horizontal and vertical wires and busses only" );
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_BUS_WIRES_ORIENT, g_HVLines );
+ m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_BUS_WIRES_ORIENT,
+ tool_tip );
+}
+
+void WinEDA_SchematicFrame::OnUpdateHiddenPins( wxUpdateUIEvent& event )
+{
+ wxString tool_tip = m_ShowAllPins ? _( "Do not show hidden pins" ) :
+ _( "Show hidden pins" );
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_HIDDEN_PINS, m_ShowAllPins );
+ m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_HIDDEN_PINS, tool_tip );
+}
+
+void WinEDA_SchematicFrame::OnUpdateSelectCursor( wxUpdateUIEvent& event )
+{
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_CURSOR, m_CursorShape );
+}
+
+void WinEDA_SchematicFrame::OnUpdateUnits( wxUpdateUIEvent& event )
+{
+ bool is_metric = g_UnitMetric == MILLIMETRE ? true : false;
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_MM, is_metric );
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_UNIT_INCH, !is_metric );
+ DisplayUnitsMsg();
+}
+
+void WinEDA_SchematicFrame::OnUpdateGrid( wxUpdateUIEvent& event )
+{
+ wxString tool_tip = m_Draw_Grid ? _( "Hide grid" ) : _( "Show grid" );
+ m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GRID, m_Draw_Grid );
+ m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_GRID, tool_tip );
+}
+
+
/**************************************************************/
void WinEDA_SchematicFrame::OnAnnotate( wxCommandEvent& event )
/**************************************************************/
@@ -518,8 +507,8 @@ void WinEDA_SchematicFrame::OnCreateNetlist( wxCommandEvent& event )
{
int i;
- if( g_NetFormat < NET_TYPE_PCBNEW )
- g_NetFormat = NET_TYPE_PCBNEW;
+ if( m_NetlistFormat < NET_TYPE_PCBNEW )
+ m_NetlistFormat = NET_TYPE_PCBNEW;
do
{
diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp
index 512bf09a3c..ea3154a1fd 100644
--- a/eeschema/sheet.cpp
+++ b/eeschema/sheet.cpp
@@ -135,10 +135,8 @@ bool WinEDA_SheetPropertiesFrame::Create( wxWindow* parent, wxWindowID id, const
void WinEDA_SheetPropertiesFrame::CreateControls()
{
- SetFont( *g_DialogFont );
-
////@begin WinEDA_SheetPropertiesFrame content construction
- // Generated by DialogBlocks, 29/04/2008 21:25:45 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 14:25:43 (unregistered)
WinEDA_SheetPropertiesFrame* itemDialog1 = this;
@@ -184,12 +182,10 @@ void WinEDA_SheetPropertiesFrame::CreateControls()
itemBoxSizer2->Add(itemBoxSizer15, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
m_btClose = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- m_btClose->SetForegroundColour(wxColour(0, 0, 255));
itemBoxSizer15->Add(m_btClose, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton17 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton17->SetDefault();
- itemButton17->SetForegroundColour(wxColour(196, 0, 0));
itemBoxSizer15->Add(itemButton17, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
// Set validators
diff --git a/eeschema/sheet.pjd b/eeschema/sheet.pjd
index b376d459da..3afff6b16b 100644
--- a/eeschema/sheet.pjd
+++ b/eeschema/sheet.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -114,6 +115,7 @@
0
1
0
+ 0
@@ -157,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -168,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -180,6 +184,7 @@
"%AUTO%"
0
1
+ ""
@@ -1070,7 +1075,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1
@@ -1137,7 +1142,7 @@
""
""
""
- "C40000"
+ ""
""
0
1
diff --git a/eeschema/sheetlab.cpp b/eeschema/sheetlab.cpp
index d5f3c309c0..f4de594029 100644
--- a/eeschema/sheetlab.cpp
+++ b/eeschema/sheetlab.cpp
@@ -61,8 +61,8 @@ private:
};
BEGIN_EVENT_TABLE( WinEDA_PinSheetPropertiesFrame, wxDialog )
-EVT_BUTTON( wxID_OK, WinEDA_PinSheetPropertiesFrame::OnOkClick )
-EVT_BUTTON( wxID_CANCEL, WinEDA_PinSheetPropertiesFrame::OnCancelClick )
+ EVT_BUTTON( wxID_OK, WinEDA_PinSheetPropertiesFrame::OnOkClick )
+ EVT_BUTTON( wxID_CANCEL, WinEDA_PinSheetPropertiesFrame::OnCancelClick )
END_EVENT_TABLE()
@@ -71,8 +71,8 @@ WinEDA_PinSheetPropertiesFrame::WinEDA_PinSheetPropertiesFrame(
WinEDA_SchematicFrame* parent,
Hierarchical_PIN_Sheet_Struct* curr_pinsheet,
const wxPoint& framepos ) :
- wxDialog( parent, -1, _( "PinSheet Properties:" ), framepos, wxSize( 340, 220 ),
- DIALOG_STYLE )
+ wxDialog( parent, -1, _( "PinSheet Properties:" ), framepos,
+ wxSize( 340, 220 ), DIALOG_STYLE )
/**********************************************************************************/
{
wxPoint pos;
@@ -93,15 +93,14 @@ WinEDA_PinSheetPropertiesFrame::WinEDA_PinSheetPropertiesFrame(
/* Creation des boutons de commande */
Button = new wxButton( this, wxID_OK, _( "OK" ) );
- Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
m_TextWin = new WinEDA_GraphicTextCtrl( this, _( "Text:" ),
- m_CurrentPinSheet->m_Text, m_CurrentPinSheet->m_Size.x,
+ m_CurrentPinSheet->m_Text,
+ m_CurrentPinSheet->m_Size.x,
g_UnitMetric, LeftBoxSizer, 200 );
// Selection de la forme :
diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp
index cf1a50fbb3..d0ea46095c 100644
--- a/eeschema/tool_sch.cpp
+++ b/eeschema/tool_sch.cpp
@@ -310,7 +310,7 @@ void WinEDA_SchematicFrame::OnSelectOptionToolbar( wxCommandEvent& event )
break;
case ID_TB_OPTIONS_HIDDEN_PINS:
- g_ShowAllPins = m_OptionsToolBar->GetToolState( id );
+ m_ShowAllPins = m_OptionsToolBar->GetToolState( id );
DrawPanel->ReDraw( &dc, TRUE );
break;
diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp
index 81321120f7..3826f49359 100644
--- a/eeschema/viewlib_frame.cpp
+++ b/eeschema/viewlib_frame.cpp
@@ -111,7 +111,6 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
m_LibList = new wxListBox( m_LibListWindow, ID_LIBVIEW_LIB_LIST, wxPoint( 0, 0 ),
m_LibListWindow->GetClientSize() - wxSize(EXTRA_BORDER_SIZE*2,0),
0, NULL, wxLB_HSCROLL );
- m_LibList->SetFont( *g_DialogFont );
}
else
{
@@ -135,7 +134,6 @@ WinEDA_ViewlibFrame::WinEDA_ViewlibFrame( wxWindow* father,
wxPoint( 0, 0 ),
m_CmpListWindow->GetClientSize() - wxSize(EXTRA_BORDER_SIZE*2,0),
0, NULL, wxLB_HSCROLL );
- m_CmpList->SetFont( *g_DialogFont );
if( m_LibList )
ReCreateListLib();
diff --git a/gerbview/edit.cpp b/gerbview/edit.cpp
index 703d4c8d72..c69bb56a90 100644
--- a/gerbview/edit.cpp
+++ b/gerbview/edit.cpp
@@ -254,7 +254,10 @@ void WinEDA_GerberFrame::Process_Special_Functions( wxCommandEvent& event )
{
wxString editorname = wxGetApp().GetEditorName();
if( !editorname.IsEmpty() )
- ExecuteFile( this, editorname, gerber_layer->m_FileName );
+ {
+ wxFileName fn( gerber_layer->m_FileName );
+ ExecuteFile( this, editorname, QuoteFullPath( fn ) );
+ }
}
break;
diff --git a/gerbview/gerberframe.cpp b/gerbview/gerberframe.cpp
index 04c292492a..b3f541adb5 100644
--- a/gerbview/gerberframe.cpp
+++ b/gerbview/gerberframe.cpp
@@ -37,9 +37,6 @@ BEGIN_EVENT_TABLE( WinEDA_GerberFrame, WinEDA_BasePcbFrame )
EVT_TOOL( ID_NEW_BOARD, WinEDA_GerberFrame::Files_io )
EVT_TOOL( ID_SAVE_BOARD, WinEDA_GerberFrame::Files_io )
- EVT_MENU_RANGE( ID_PREFERENCES_FONT_DIALOG, ID_PREFERENCES_FONT_END,
- WinEDA_DrawFrame::ProcessFontPreferences )
-
// Menu Files:
EVT_MENU( ID_MENU_LOAD_FILE, WinEDA_GerberFrame::Files_io )
EVT_MENU( ID_MENU_APPEND_FILE, WinEDA_GerberFrame::Files_io )
diff --git a/gerbview/options.cpp b/gerbview/options.cpp
index 42f3b16bc2..3c1d63ce20 100644
--- a/gerbview/options.cpp
+++ b/gerbview/options.cpp
@@ -158,7 +158,6 @@ WinEDA_GerberGeneralOptionsFrame::WinEDA_GerberGeneralOptionsFrame(
*/
{
m_Parent = parent;
- SetFont( *g_DialogFont );
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
SetSizer( MainBoxSizer );
@@ -170,11 +169,9 @@ WinEDA_GerberGeneralOptionsFrame::WinEDA_GerberGeneralOptionsFrame(
MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
wxButton* Button = new wxButton( this, wxID_OK, _( "OK" ) );
- Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
/* Display / not display polar coordinates: */
@@ -289,7 +286,6 @@ WinEDA_LookFrame::WinEDA_LookFrame( WinEDA_BasePcbFrame* parent,
/*******************************************************************************/
{
m_Parent = parent;
- SetFont( *g_DialogFont );
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
SetSizer( MainBoxSizer );
@@ -301,11 +297,9 @@ WinEDA_LookFrame::WinEDA_LookFrame( WinEDA_BasePcbFrame* parent,
MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
wxButton* Button = new wxButton( this, wxID_OK, _( "OK" ) );
- Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
// Show Option Draw Tracks
diff --git a/gerbview/readgerb.cpp b/gerbview/readgerb.cpp
index bb2bf8aa14..04011f9d4e 100644
--- a/gerbview/readgerb.cpp
+++ b/gerbview/readgerb.cpp
@@ -204,8 +204,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
case 'D': /* Line type Dxx : Tool selection (xx > 0) or command if xx = 0..9*/
D_commande = gerber->ReturnDCodeNumber( text );
- gerber->Execute_DCODE_Command( this, DC,
- text, D_commande );
+ gerber->Execute_DCODE_Command( this, DC, text, D_commande );
break;
case 'X':
@@ -214,7 +213,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
if( *text == '*' ) // command like X12550Y19250*
{
gerber->Execute_DCODE_Command( this, DC, text,
- gerber->m_Last_Pen_Command );
+ gerber->m_Last_Pen_Command );
}
break;
diff --git a/gerbview/reglage.cpp b/gerbview/reglage.cpp
index 402a30dfbc..63a318045a 100644
--- a/gerbview/reglage.cpp
+++ b/gerbview/reglage.cpp
@@ -83,7 +83,6 @@ WinEDA_ConfigFrame::WinEDA_ConfigFrame( WinEDA_GerberFrame* parent,
wxString title;
m_Parent = parent;
- SetFont( *g_DialogFont );
/* Shows the config filename currently used : */
title = _( "from " ) + wxGetApp().m_CurrentOptionFile;
@@ -105,11 +104,9 @@ WinEDA_ConfigFrame::WinEDA_ConfigFrame( WinEDA_GerberFrame* parent,
RightBoxSizer->AddSpacer( 20 );
Button = new wxButton( this, wxID_OK, _( "OK" ) );
- Button->SetForegroundColour( *wxRED );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
- Button->SetForegroundColour( *wxBLUE );
RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
wxSize size;
diff --git a/gerbview/rs274d.cpp b/gerbview/rs274d.cpp
index cbb6106609..0a24aa197f 100644
--- a/gerbview/rs274d.cpp
+++ b/gerbview/rs274d.cpp
@@ -45,14 +45,14 @@
* X,Y sont suivies de + ou - et de m+n chiffres (non separes)
* m = partie entiere
* n = partie apres la virgule
- * formats classiques : m = 2, n = 3 (format 2.3)
+ * formats classiques : m = 2, n = 3 (format 2.3)
* m = 3, n = 4 (format 3.4)
* ex:
* G__ X00345Y-06123 D__*
*
* Outils et D_CODES
* numero d'outil ( identification des formes )
- * 1 a 99 (classique)
+ * 1 a 99 (classique)
* 1 a 999
* D_CODES:
*
@@ -94,8 +94,13 @@ static wxPoint LastPosition;
* color other than the background color, else use the background color
* when drawing so that an erasure happens.
*/
-static void fillCircularTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
- const wxPoint& aPos, int aDiameter, int aPenWidth, bool isDark )
+static void fillCircularTRACK( TRACK* aTrack,
+ int Dcode_index,
+ int aLayer,
+ const wxPoint& aPos,
+ int aDiameter,
+ int aPenWidth,
+ bool isDark )
{
aTrack->m_Shape = S_CIRCLE;
aTrack->m_Width = aPenWidth;
@@ -105,8 +110,8 @@ static void fillCircularTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
// When drawing a TRACK with shape S_CIRCLE, the hypotenuse (i.e. distance)
// between the Start and End points gives the radius of the circle.
- aTrack->m_Start = aTrack->m_End = aPos;
- aTrack->m_End.x += max(0, (aDiameter + 1)/2);
+ aTrack->m_Start = aTrack->m_End = aPos;
+ aTrack->m_End.x += max( 0, (aDiameter + 1) / 2 );
NEGATE( aTrack->m_Start.y );
NEGATE( aTrack->m_End.y );
@@ -132,8 +137,12 @@ static void fillCircularTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
* color other than the background color, else use the background color
* when drawing so that an erasure happens.
*/
-static void fillRoundFlashTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
- const wxPoint& aPos, int aDiameter, bool isDark )
+static void fillRoundFlashTRACK( TRACK* aTrack,
+ int Dcode_index,
+ int aLayer,
+ const wxPoint& aPos,
+ int aDiameter,
+ bool isDark )
{
aTrack->SetLayer( aLayer );
aTrack->m_Width = aDiameter;
@@ -141,7 +150,7 @@ static void fillRoundFlashTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
NEGATE( aTrack->m_Start.y );
NEGATE( aTrack->m_End.y );
aTrack->SetNet( Dcode_index );
- aTrack->m_Shape = S_SPOT_CIRCLE;
+ aTrack->m_Shape = S_SPOT_CIRCLE;
if( !isDark )
{
@@ -152,7 +161,8 @@ static void fillRoundFlashTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
/**
* Function fillOvalOrRectFlashTRACK
- * initializes a given TRACK so that it can draw an oval or rectangular filled rectangle.
+ * initializes a given TRACK so that it can draw an oval or rectangular
+ * filled rectangle.
*
* @param aTrack The TRACK to fill in.
* @param Dcode_index The DCODE value, like D14
@@ -164,8 +174,13 @@ static void fillRoundFlashTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
* color other than the background color, else use the background color
* when drawing so that an erasure happens.
*/
-static void fillOvalOrRectFlashTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
- const wxPoint& aPos, const wxSize& aSize, int aShape, bool isDark )
+static void fillOvalOrRectFlashTRACK( TRACK* aTrack,
+ int Dcode_index,
+ int aLayer,
+ const wxPoint& aPos,
+ const wxSize& aSize,
+ int aShape,
+ bool isDark )
{
int width = MIN( aSize.x, aSize.y );
int len = MAX( aSize.x, aSize.y ) - width;
@@ -214,8 +229,13 @@ static void fillOvalOrRectFlashTRACK( TRACK* aTrack, int Dcode_index, int aLaye
* color other than the background color, else use the background color
* when drawing so that an erasure happens.
*/
-static void fillLineTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
- const wxPoint& aStart, const wxPoint& aEnd, int aWidth, bool isDark )
+static void fillLineTRACK( TRACK* aTrack,
+ int Dcode_index,
+ int aLayer,
+ const wxPoint& aStart,
+ const wxPoint& aEnd,
+ int aWidth,
+ bool isDark )
{
aTrack->SetLayer( aLayer );
@@ -266,9 +286,9 @@ static void fillLineTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
* when drawing so that an erasure happens.
*/
static void fillArcTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
- const wxPoint& aStart, const wxPoint& aEnd,
- const wxPoint& rel_center, int aWidth,
- bool trigo_sens, bool multiquadrant, bool isDark )
+ const wxPoint& aStart, const wxPoint& aEnd,
+ const wxPoint& rel_center, int aWidth,
+ bool trigo_sens, bool multiquadrant, bool isDark )
{
wxPoint center, delta;
@@ -333,7 +353,7 @@ static void fillArcTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
}
aTrack->SetNet( Dcode_index );
- aTrack->m_Param = center.x;
+ aTrack->m_Param = center.x;
aTrack->SetSubNet( center.y );
NEGATE( aTrack->m_Start.y );
@@ -358,11 +378,10 @@ static void fillArcTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
/***********************************************/
wxPoint GERBER::ReadXYCoord( char*& Text )
+{
/***********************************************/
-
/* Retourne la coord courante pointee par Text (XnnnnYmmmm)
*/
-{
wxPoint pos = m_CurrentPos;
int type_coord = 0, current_coord, nbchar;
bool is_float = false;
@@ -385,7 +404,7 @@ wxPoint GERBER::ReadXYCoord( char*& Text )
{
type_coord = *Text;
Text++;
- text = line;
+ text = line;
nbchar = 0;
while( IsNumber( *Text ) )
{
@@ -406,10 +425,12 @@ wxPoint GERBER::ReadXYCoord( char*& Text )
}
else
{
- int fmt_scale = (type_coord == 'X') ? m_FmtScale.x : m_FmtScale.y;
+ int fmt_scale =
+ (type_coord == 'X') ? m_FmtScale.x : m_FmtScale.y;
if( m_NoTrailingZeros )
{
- int min_digit = (type_coord == 'X') ? m_FmtLen.x : m_FmtLen.y;
+ int min_digit =
+ (type_coord == 'X') ? m_FmtLen.x : m_FmtLen.y;
while( nbchar < min_digit )
{
*(text++) = '0';
@@ -493,19 +514,18 @@ wxPoint GERBER::ReadXYCoord( char*& Text )
/************************************************/
wxPoint GERBER::ReadIJCoord( char*& Text )
+{
/************************************************/
-
/* Retourne la coord type InnJnn courante pointee par Text (InnnnJmmmm)
* Ces coordonn�es sont relatives, donc si une coord est absente, sa valeur
* par defaut est 0
*/
-{
wxPoint pos( 0, 0 );
- int type_coord = 0, current_coord, nbchar;
- bool is_float = false;
- char* text;
- char line[256];
+ int type_coord = 0, current_coord, nbchar;
+ bool is_float = false;
+ char* text;
+ char line[256];
if( Text == NULL )
return pos;
@@ -517,7 +537,7 @@ wxPoint GERBER::ReadIJCoord( char*& Text )
{
type_coord = *Text;
Text++;
- text = line;
+ text = line;
nbchar = 0;
while( IsNumber( *Text ) )
{
@@ -538,10 +558,12 @@ wxPoint GERBER::ReadIJCoord( char*& Text )
}
else
{
- int fmt_scale = (type_coord == 'I') ? m_FmtScale.x : m_FmtScale.y;
+ int fmt_scale =
+ (type_coord == 'I') ? m_FmtScale.x : m_FmtScale.y;
if( m_NoTrailingZeros )
{
- int min_digit = (type_coord == 'I') ? m_FmtLen.x : m_FmtLen.y;
+ int min_digit =
+ (type_coord == 'I') ? m_FmtLen.x : m_FmtLen.y;
while( nbchar < min_digit )
{
*(text++) = '0';
@@ -616,11 +638,10 @@ wxPoint GERBER::ReadIJCoord( char*& Text )
/*****************************************************/
int GERBER::ReturnGCodeNumber( char*& Text )
+{
/*****************************************************/
-
/* Lit la sequence Gnn et retourne la valeur nn
*/
-{
int ii = 0;
char* text;
char line[1024];
@@ -642,11 +663,10 @@ int GERBER::ReturnGCodeNumber( char*& Text )
/**************************************************/
int GERBER::ReturnDCodeNumber( char*& Text )
+{
/**************************************************/
-
/* Lit la sequence Dnn et retourne la valeur nn
*/
-{
int ii = 0;
char* text;
char line[1024];
@@ -667,9 +687,9 @@ int GERBER::ReturnDCodeNumber( char*& Text )
/******************************************************************/
bool GERBER::Execute_G_Command( char*& text, int G_commande )
-/******************************************************************/
{
- D(printf( "%22s: G_CODE<%d>\n", __func__, G_commande );)
+/******************************************************************/
+ D( printf( "%22s: G_CODE<%d>\n", __func__, G_commande ); )
switch( G_commande )
{
@@ -747,14 +767,15 @@ bool GERBER::Execute_G_Command( char*& text, int G_commande )
break;
case GC_TURN_OFF_POLY_FILL:
- m_PolygonFillMode = false;
+ m_PolygonFillMode = false;
m_PolygonFillModeState = 0;
break;
case GC_MOVE: // Non existant
default:
{
- wxString msg; msg.Printf( wxT( "G%.2d command not handled" ), G_commande );
+ wxString msg; msg.Printf( wxT( "G%0.2d command not handled" ),
+ G_commande );
DisplayError( NULL, msg );
return false;
}
@@ -790,8 +811,8 @@ static int scale( double aCoord, bool isMetric )
*/
static wxPoint mapPt( double x, double y, bool isMetric )
{
- wxPoint ret( scale( x, isMetric ),
- scale( y, isMetric ) );
+ wxPoint ret( scale( x, isMetric ),
+ scale( y, isMetric ) );
return ret;
}
@@ -801,25 +822,28 @@ static wxPoint mapPt( double x, double y, bool isMetric )
* Function mapExposure
* translates the first parameter from an aperture macro into a current exposure
* setting.
- * @param curExposure A dynamic setting which can change throughout the reading of the
- * gerber file, and it indicates whether the current tool is lit or not.
+ * @param curExposure A dynamic setting which can change throughout the
+ * reading of the gerber file, and it indicates whether the current tool
+ * is lit or not.
* @param isNegative A dynamic setting which can change throughout the reading of
* the gerber file, and it indicates whether the current D codes are to
* be interpreted as erasures or not.
*/
static bool mapExposure( int param1, bool curExposure, bool isNegative )
{
- bool exposure;
+ bool exposure;
switch( param1 )
{
case 0:
exposure = false;
break;
+
default:
case 1:
exposure = true;
break;
+
case 2:
exposure = !curExposure;
}
@@ -830,22 +854,22 @@ static bool mapExposure( int param1, bool curExposure, bool isNegative )
/*****************************************************************************/
bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
- char*& text, int D_commande )
-/*****************************************************************************/
+ char*& text, int D_commande )
{
- wxSize size( 15, 15 );
+/*****************************************************************************/
+ wxSize size( 15, 15 );
- APERTURE_T aperture = APT_CIRCLE;
- TRACK* track;
- BOARD* pcb = frame->GetBoard();
+ APERTURE_T aperture = APT_CIRCLE;
+ TRACK* track;
+ BOARD* pcb = frame->GetBoard();
- int activeLayer = frame->GetScreen()->m_Active_Layer;
+ int activeLayer = frame->GetScreen()->m_Active_Layer;
- int dcode = 0;
- D_CODE* tool = NULL;
- wxString msg;
+ int dcode = 0;
+ D_CODE* tool = NULL;
+ wxString msg;
- D(printf( "%22s: D_CODE<%d>\n", __func__, D_commande );)
+ D( printf( "%22s: D_CODE<%d>\n", __func__, D_commande ); )
if( D_commande >= FIRST_DCODE ) // This is a "Set tool" command
{
@@ -876,7 +900,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
SEGZONE* edge_poly;
edge_poly = new SEGZONE( pcb );
pcb->m_Zone.Append( edge_poly );
- D(printf("R:%p\n", edge_poly );)
+ D( printf( "R:%p\n", edge_poly ); )
edge_poly->SetLayer( activeLayer );
edge_poly->m_Width = 1;
@@ -889,13 +913,14 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
edge_poly->SetNet( m_PolygonFillModeState );
- // the first track of each polygon has a netcode of zero, otherwise one.
- // set the erasure flag in that special track, if a negative polygon.
+ // the first track of each polygon has a netcode of zero,
+ // otherwise one. Sset the erasure flag in that special track,
+ // if a negative polygon.
if( !m_PolygonFillModeState )
{
if( m_LayerNegative ^ m_ImageNegative )
edge_poly->m_Flags |= DRAW_ERASED;
- D(printf("\nm_Flags=0x%08X\n", edge_poly->m_Flags );)
+ D( printf( "\nm_Flags=0x%08X\n", edge_poly->m_Flags ); )
}
m_PreviousPos = m_CurrentPos;
@@ -903,7 +928,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
break;
case 2: // code D2: exposure OFF (i.e. "move to")
- m_Exposure = false;
+ m_Exposure = false;
m_PreviousPos = m_CurrentPos;
m_PolygonFillModeState = 0;
break;
@@ -932,10 +957,10 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case GERB_INTERPOL_LINEAR_1X:
track = new TRACK( pcb );
pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillLineTRACK( track, dcode, activeLayer,
- m_PreviousPos, m_CurrentPos,
- size.x, !(m_LayerNegative ^ m_ImageNegative) );
+ D( printf( "R:%p\n", track ); )
+ fillLineTRACK( track, dcode, activeLayer, m_PreviousPos,
+ m_CurrentPos, size.x,
+ !(m_LayerNegative ^ m_ImageNegative) );
break;
case GERB_INTERPOL_LINEAR_01X:
@@ -948,16 +973,17 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case GERB_INTERPOL_ARC_POS:
track = new TRACK( pcb );
pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillArcTRACK( track, dcode, activeLayer,
- m_PreviousPos, m_CurrentPos, m_IJPos,
- size.x, m_Iterpolation==GERB_INTERPOL_ARC_NEG ? false : true,
- m_360Arc_enbl, !(m_LayerNegative ^ m_ImageNegative) );
+ D( printf( "R:%p\n", track ); )
+ fillArcTRACK( track, dcode, activeLayer, m_PreviousPos,
+ m_CurrentPos, m_IJPos, size.x,
+ ( m_Iterpolation == GERB_INTERPOL_ARC_NEG ) ?
+ false : true, m_360Arc_enbl,
+ !(m_LayerNegative ^ m_ImageNegative) );
break;
default:
- msg.Printf( wxT( "Execute_DCODE_Command: interpol error (type %X)" ),
- m_Iterpolation );
+ msg.Printf( wxT( "Execute_DCODE_Command: interpol error " \
+ "(type %X)" ), m_Iterpolation );
DisplayError( frame, msg );
break;
}
@@ -966,7 +992,7 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
break;
case 2: // code D2: exposure OFF (i.e. "move to")
- m_Exposure = false;
+ m_Exposure = false;
m_PreviousPos = m_CurrentPos;
break;
@@ -985,193 +1011,245 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
case APT_CIRCLE:
track = new TRACK( pcb );
pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
+ D( printf( "R:%p\n", track ); )
fillRoundFlashTRACK( track, dcode, activeLayer,
- m_CurrentPos,
- size.x, !(m_LayerNegative ^ m_ImageNegative) );
+ m_CurrentPos, size.x,
+ !(m_LayerNegative ^ m_ImageNegative) );
break;
case APT_OVAL:
case APT_RECT:
track = new TRACK( pcb );
pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
+ D( printf( "R:%p\n", track ); )
fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- m_CurrentPos, size,
- aperture == APT_RECT ? S_SPOT_RECT : S_SPOT_OVALE,
- !(m_LayerNegative ^ m_ImageNegative) );
+ m_CurrentPos, size,
+ ( aperture == APT_RECT ) ?
+ S_SPOT_RECT : S_SPOT_OVALE,
+ !(m_LayerNegative ^ m_ImageNegative) );
break;
case APT_MACRO:
+ {
+ APERTURE_MACRO* macro = tool->GetMacro();
+ wxASSERT( macro );
+
+ // split the macro primitives up into multiple normal TRACK elements
+ for( AM_PRIMITIVES::iterator p = macro->primitives.begin();
+ p!=macro->primitives.end();
+ ++p )
{
- APERTURE_MACRO* macro = tool->GetMacro();
- wxASSERT( macro );
+ bool exposure;
+ wxPoint curPos = m_CurrentPos;
- // split the macro primitives up into multiple normal TRACK elements
- for( AM_PRIMITIVES::iterator p=macro->primitives.begin(); p!=macro->primitives.end(); ++p )
+ switch( p->primitive_id )
{
- bool exposure;
- wxPoint curPos = m_CurrentPos;
+ case AMP_CIRCLE:
+ {
+ exposure = mapExposure( p->GetExposure(), m_Exposure,
+ m_ImageNegative );
+ curPos += mapPt( p->params[2].GetValue( tool ),
+ p->params[3].GetValue( tool ),
+ m_GerbMetric );
+ int diameter = scale( p->params[1].GetValue( tool ),
+ m_GerbMetric );
- switch( p->primitive_id )
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillRoundFlashTRACK( track, dcode, activeLayer,
+ m_CurrentPos, diameter, exposure );
+ }
+ break;
+
+ case AMP_LINE2:
+ case AMP_LINE20:
+ {
+ exposure = mapExposure(
+ p->GetExposure(), m_Exposure, m_ImageNegative );
+ int width = scale( p->params[1].GetValue( tool ),
+ m_GerbMetric );
+ wxPoint start = mapPt( p->params[2].GetValue( tool ),
+ p->params[3].GetValue( tool ),
+ m_GerbMetric );
+ wxPoint end = mapPt( p->params[4].GetValue( tool ),
+ p->params[5].GetValue( tool ),
+ m_GerbMetric );
+
+ if( start.x == end.x )
{
- case AMP_CIRCLE:
- {
- exposure = mapExposure( p->GetExposure(), m_Exposure, m_ImageNegative );
- curPos += mapPt( p->params[2].GetValue( tool ), p->params[3].GetValue( tool ), m_GerbMetric );
- int diameter = scale( p->params[1].GetValue( tool ), m_GerbMetric );
-
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillRoundFlashTRACK( track, dcode, activeLayer,
- m_CurrentPos,
- diameter, exposure );
- }
- break;
-
- case AMP_LINE2:
- case AMP_LINE20:
- {
- exposure = mapExposure( p->GetExposure(), m_Exposure, m_ImageNegative );
- int width = scale( p->params[1].GetValue( tool ), m_GerbMetric );
- wxPoint start = mapPt( p->params[2].GetValue( tool ), p->params[3].GetValue( tool ), m_GerbMetric );
- wxPoint end = mapPt( p->params[4].GetValue( tool ), p->params[5].GetValue( tool ), m_GerbMetric );
-
- if( start.x == end.x )
- {
- size.x = width;
- size.y = ABS( end.y - start.y ) + 1;
- }
- else
- {
- size.x = ABS( end.x - start.x ) + 1;
- size.y = width;
- }
-
- wxPoint midPoint( (start.x + end.x)/2, (start.y+end.y)/2 );
- curPos += midPoint;
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- curPos, size, S_SPOT_RECT,
- exposure );
- }
- break;
-
- case AMP_LINE_CENTER:
- {
- exposure = mapExposure( p->GetExposure(), m_Exposure, m_ImageNegative );
- wxPoint msize = mapPt( p->params[1].GetValue( tool ), p->params[2].GetValue( tool ), m_GerbMetric );
- size.x = msize.x;
- size.y = msize.y;
- curPos += mapPt( p->params[3].GetValue( tool ), p->params[4].GetValue( tool ), m_GerbMetric );
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- curPos, size, S_SPOT_RECT,
- exposure );
- }
- break;
-
- case AMP_LINE_LOWER_LEFT:
- {
- exposure = mapExposure( p->GetExposure(), m_Exposure, m_ImageNegative );
- wxPoint msize = mapPt( p->params[1].GetValue( tool ), p->params[2].GetValue( tool ), m_GerbMetric );
- size.x = msize.x;
- size.y = msize.y;
- wxPoint lowerLeft = mapPt( p->params[3].GetValue( tool ), p->params[4].GetValue( tool ), m_GerbMetric );
- curPos += lowerLeft;
- // need the middle, so adjust from the lower left
- curPos.y += size.y/2;
- curPos.x += size.x/2;
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- curPos, size, S_SPOT_RECT,
- exposure );
- }
- break;
-
- case AMP_THERMAL:
- {
- int outerDiam = scale( p->params[2].GetValue(tool), m_GerbMetric );
- int innerDiam = scale( p->params[3].GetValue(tool), m_GerbMetric );
-
- curPos += mapPt( p->params[0].GetValue( tool ), p->params[1].GetValue( tool ), m_GerbMetric );
-
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
- outerDiam, !(m_LayerNegative ^ m_ImageNegative) );
-
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
- innerDiam, (m_LayerNegative ^ m_ImageNegative) );
-
- // @todo: draw the cross hairs, see page 23 of rs274 spec.
- // this might be done with two lines, thickness from params[4], and drawing
- // darkness "(m_LayerNegative ^ m_ImageNegative)"
- }
- break;
-
- case AMP_MOIRE:
- {
- curPos += mapPt( p->params[0].GetValue( tool ), p->params[1].GetValue( tool ), m_GerbMetric );
-
- // e.g.: "6,0,0,0.125,.01,0.01,3,0.003,0.150,0"
- int outerDiam = scale( p->params[2].GetValue(tool), m_GerbMetric );
- int penThickness = scale( p->params[3].GetValue(tool), m_GerbMetric );
- int gap = scale( p->params[4].GetValue(tool), m_GerbMetric );
- int numCircles = p->params[5].GetValue(tool);
- int crossHairThickness = scale( p->params[6].GetValue(tool), m_GerbMetric );
- int crossHairLength = scale( p->params[7].GetValue(tool), m_GerbMetric );
- // ignore rotation, not supported
-
- int diamAdjust = 2 * (gap + penThickness); // adjust outerDiam by this on each nested circle
- for( int i=0; im_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillCircularTRACK( track, dcode, activeLayer, curPos, outerDiam,
- penThickness, !(m_LayerNegative ^ m_ImageNegative) );
- }
-
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
- fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- curPos, wxSize(crossHairThickness,crossHairLength),
- S_SPOT_RECT, !(m_LayerNegative ^ m_ImageNegative) );
-
- track = new TRACK( pcb );
- pcb->m_Track.Append( track );
- D(printf("R:%p\n", track );)
-
- // swap x and y in wxSize() for this one
- fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
- curPos, wxSize(crossHairLength,crossHairThickness),
- S_SPOT_RECT, !(m_LayerNegative ^ m_ImageNegative) );
- }
- break;
-
- case AMP_EOF:
- case AMP_OUTLINE:
- case AMP_POLYGON:
- default:
- // not yet supported, waiting for you.
- break;
+ size.x = width;
+ size.y = ABS( end.y - start.y ) + 1;
}
+ else
+ {
+ size.x = ABS( end.x - start.x ) + 1;
+ size.y = width;
+ }
+
+ wxPoint midPoint( (start.x + end.x) / 2,
+ (start.y + end.y) / 2 );
+ curPos += midPoint;
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
+ curPos, size, S_SPOT_RECT,
+ exposure );
+ }
+ break;
+
+ case AMP_LINE_CENTER:
+ {
+ exposure = mapExposure( p->GetExposure(), m_Exposure,
+ m_ImageNegative );
+ wxPoint msize = mapPt( p->params[1].GetValue( tool ),
+ p->params[2].GetValue( tool ),
+ m_GerbMetric );
+ size.x = msize.x;
+ size.y = msize.y;
+ curPos += mapPt( p->params[3].GetValue( tool ),
+ p->params[4].GetValue( tool ),
+ m_GerbMetric );
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
+ curPos, size, S_SPOT_RECT,
+ exposure );
+ }
+ break;
+
+ case AMP_LINE_LOWER_LEFT:
+ {
+ exposure = mapExposure(
+ p->GetExposure(), m_Exposure, m_ImageNegative );
+ wxPoint msize = mapPt( p->params[1].GetValue( tool ),
+ p->params[2].GetValue( tool ),
+ m_GerbMetric );
+ size.x = msize.x;
+ size.y = msize.y;
+ wxPoint lowerLeft = mapPt( p->params[3].GetValue( tool ),
+ p->params[4].GetValue( tool ),
+ m_GerbMetric );
+ curPos += lowerLeft;
+
+ // need the middle, so adjust from the lower left
+ curPos.y += size.y / 2;
+ curPos.x += size.x / 2;
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
+ curPos, size, S_SPOT_RECT,
+ exposure );
+ }
+ break;
+
+ case AMP_THERMAL:
+ {
+ int outerDiam = scale( p->params[2].GetValue( tool ),
+ m_GerbMetric );
+ int innerDiam = scale( p->params[3].GetValue( tool ),
+ m_GerbMetric );
+
+ curPos += mapPt( p->params[0].GetValue( tool ),
+ p->params[1].GetValue( tool ),
+ m_GerbMetric );
+
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillRoundFlashTRACK( track, dcode, activeLayer,
+ curPos, outerDiam,
+ !(m_LayerNegative ^ m_ImageNegative) );
+
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillRoundFlashTRACK( track, dcode, activeLayer, curPos,
+ innerDiam,
+ (m_LayerNegative ^ m_ImageNegative) );
+
+ // @todo: draw the cross hairs, see page 23 of rs274
+ // spec. this might be done with two lines, thickness
+ // from params[4], and drawing
+ // darkness "(m_LayerNegative ^ m_ImageNegative)"
+ }
+ break;
+
+ case AMP_MOIRE:
+ {
+ curPos += mapPt( p->params[0].GetValue( tool ),
+ p->params[1].GetValue( tool ),
+ m_GerbMetric );
+
+ // e.g.: "6,0,0,0.125,.01,0.01,3,0.003,0.150,0"
+ int outerDiam = scale( p->params[2].GetValue( tool ),
+ m_GerbMetric );
+ int penThickness = scale( p->params[3].GetValue( tool ),
+ m_GerbMetric );
+ int gap = scale( p->params[4].GetValue( tool ),
+ m_GerbMetric );
+ int numCircles = p->params[5].GetValue( tool );
+ int crossHairThickness =
+ scale( p->params[6].GetValue( tool ), m_GerbMetric );
+ int crossHairLength =
+ scale( p->params[7].GetValue( tool ), m_GerbMetric );
+
+ // ignore rotation, not supported
+
+ int diamAdjust = 2 * (gap + penThickness); // adjust outerDiam by this on each nested circle
+ for( int i = 0;
+ i < numCircles;
+ ++i, outerDiam -= diamAdjust )
+ {
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillCircularTRACK( track, dcode, activeLayer,
+ curPos, outerDiam,
+ penThickness,
+ !(m_LayerNegative ^ m_ImageNegative) );
+ }
+
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+ fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
+ curPos,
+ wxSize( crossHairThickness,
+ crossHairLength ),
+ S_SPOT_RECT,
+ !(m_LayerNegative ^
+ m_ImageNegative) );
+
+ track = new TRACK( pcb );
+ pcb->m_Track.Append( track );
+ D( printf( "R:%p\n", track ); )
+
+ // swap x and y in wxSize() for this one
+ fillOvalOrRectFlashTRACK( track, dcode, activeLayer,
+ curPos,
+ wxSize( crossHairLength,
+ crossHairThickness ),
+ S_SPOT_RECT,
+ !(m_LayerNegative ^
+ m_ImageNegative) );
+ }
+ break;
+
+ case AMP_EOF:
+ case AMP_OUTLINE:
+ case AMP_POLYGON:
+ default:
+
+ // not yet supported, waiting for you.
+ break;
}
}
- break;
+ }
+ break;
default:
break;
@@ -1187,4 +1265,3 @@ bool GERBER::Execute_DCODE_Command( WinEDA_GerberFrame* frame, wxDC* DC,
return true;
}
-
diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp
index f76d47f782..c94717adb4 100644
--- a/gerbview/rs274x.cpp
+++ b/gerbview/rs274x.cpp
@@ -10,35 +10,34 @@
#include "pcbplot.h"
#include "protos.h"
-#define CODE( x, y ) ( ((x) << 8) + (y) )
+#define CODE( x, y ) ( ( (x) << 8 ) + (y) )
-enum RS274X_PARAMETERS
-{
- FORMAT_STATEMENT = CODE( 'F', 'S' ),
- AXIS_SELECT = CODE( 'A', 'S' ),
- MIRROR_IMAGE = CODE( 'M', 'I' ),
- MODE_OF_UNITS = CODE( 'M', 'O' ),
- INCH = CODE( 'I', 'N' ),
- MILLIMETER = CODE( 'M', 'M' ),
- OFFSET = CODE( 'O', 'F' ),
- SCALE_FACTOR = CODE( 'S', 'F' ),
+enum RS274X_PARAMETERS {
+ FORMAT_STATEMENT = CODE( 'F', 'S' ),
+ AXIS_SELECT = CODE( 'A', 'S' ),
+ MIRROR_IMAGE = CODE( 'M', 'I' ),
+ MODE_OF_UNITS = CODE( 'M', 'O' ),
+ INCH = CODE( 'I', 'N' ),
+ MILLIMETER = CODE( 'M', 'M' ),
+ OFFSET = CODE( 'O', 'F' ),
+ SCALE_FACTOR = CODE( 'S', 'F' ),
- IMAGE_NAME = CODE( 'I', 'N' ),
- IMAGE_JUSTIFY = CODE( 'I', 'J' ),
- IMAGE_OFFSET = CODE( 'I', 'O' ),
- IMAGE_POLARITY = CODE( 'I', 'P' ),
- IMAGE_ROTATION = CODE( 'I', 'R' ),
- PLOTTER_FILM = CODE( 'P', 'M' ),
- INCLUDE_FILE = CODE( 'I', 'F' ),
+ IMAGE_NAME = CODE( 'I', 'N' ),
+ IMAGE_JUSTIFY = CODE( 'I', 'J' ),
+ IMAGE_OFFSET = CODE( 'I', 'O' ),
+ IMAGE_POLARITY = CODE( 'I', 'P' ),
+ IMAGE_ROTATION = CODE( 'I', 'R' ),
+ PLOTTER_FILM = CODE( 'P', 'M' ),
+ INCLUDE_FILE = CODE( 'I', 'F' ),
- AP_DEFINITION = CODE( 'A', 'D' ),
+ AP_DEFINITION = CODE( 'A', 'D' ),
- AP_MACRO = CODE( 'A', 'M' ),
- LAYER_NAME = CODE( 'L', 'N' ),
- LAYER_POLARITY = CODE( 'L', 'P' ),
- KNOCKOUT = CODE( 'K', 'O' ),
- STEP_AND_REPEAT = CODE( 'S', 'P' ),
- ROTATE = CODE( 'R', 'O' )
+ AP_MACRO = CODE( 'A', 'M' ),
+ LAYER_NAME = CODE( 'L', 'N' ),
+ LAYER_POLARITY = CODE( 'L', 'P' ),
+ KNOCKOUT = CODE( 'K', 'O' ),
+ STEP_AND_REPEAT = CODE( 'S', 'P' ),
+ ROTATE = CODE( 'R', 'O' )
};
@@ -50,7 +49,8 @@ enum RS274X_PARAMETERS
* reads in two bytes of data and assembles them into an int with the first
* byte in the sequence put into the most significant part of a 16 bit value
* and the second byte put into the least significant part of the 16 bit value.
- * @param text A reference to a pointer to read bytes from and to advance as they are read.
+ * @param text A reference to a pointer to read bytes from and to advance as
+ * they are read.
* @return int - with 16 bits of data in the ls bits, upper bits zeroed.
*/
static int ReadXCommand( char*& text )
@@ -83,7 +83,7 @@ static int ReadInt( char*& text )
{
int ret = (int) strtol( text, &text, 10 );
- if( *text == ',' )
+ if( *text == ',' || isspace( *text ) )
++text;
return ret;
@@ -92,8 +92,8 @@ static int ReadInt( char*& text )
/**
* Function ReadDouble
- * reads a double from an ASCII character buffer. If there is a comma after the double,
- * then skip over that.
+ * reads a double from an ASCII character buffer. If there is a comma after
+ * the double, then skip over that.
* @param text A reference to a character pointer from which the ASCII double
* is read from and the pointer advanced for each character read.
* @return double
@@ -102,7 +102,7 @@ static double ReadDouble( char*& text )
{
double ret = strtod( text, &text );
- if( *text == ',' )
+ if( *text == ',' || isspace( *text ) )
++text;
return ret;
@@ -111,15 +111,15 @@ static double ReadDouble( char*& text )
/****************************************************************************/
bool GERBER::ReadRS274XCommand( WinEDA_GerberFrame* frame, wxDC* DC,
- char buff[GERBER_BUFZ], char*& text )
-/****************************************************************************/
+ char buff[GERBER_BUFZ], char*& text )
{
+/****************************************************************************/
bool ok = true;
int code_command;
text++;
- for(;;)
+ for( ; ; )
{
while( *text )
{
@@ -166,18 +166,22 @@ exit:
/*******************************************************************************/
-bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& text )
-/*******************************************************************************/
+bool GERBER::ExecuteRS274XCommand( int command,
+ char buff[GERBER_BUFZ],
+ char*& text )
{
+/*******************************************************************************/
int code;
int xy_seq_len, xy_seq_char;
bool ok = TRUE;
char line[GERBER_BUFZ];
wxString msg;
double fcoord;
- double conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / 25.4 : PCB_INTERNAL_UNIT;
+ double conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT /
+ 25.4 : PCB_INTERNAL_UNIT;
- D(printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF, command & 0xFF );)
+ D( printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF,
+ command & 0xFF ); )
switch( command )
{
@@ -221,22 +225,22 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
case 'X':
case 'Y': // Valeurs transmises :2 (really xy_seq_len : FIX ME) digits
+ {
+ code = *(text++);
+ char ctmp = *(text++) - '0';
+ if( code == 'X' )
{
- code = *(text++);
- char ctmp = *(text++) - '0';
- if( code == 'X' )
- {
- m_FmtScale.x = *text - '0'; // = nb chiffres apres la virgule
- m_FmtLen.x = ctmp + m_FmtScale.x; // = nb total de chiffres
- }
- else
- {
- m_FmtScale.y = *text - '0';
- m_FmtLen.y = ctmp + m_FmtScale.y;
- }
- text++;
+ m_FmtScale.x = *text - '0'; // = nb chiffres apres la virgule
+ m_FmtLen.x = ctmp + m_FmtScale.x; // = nb total de chiffres
}
- break;
+ else
+ {
+ m_FmtScale.y = *text - '0';
+ m_FmtLen.y = ctmp + m_FmtScale.y;
+ }
+ text++;
+ }
+ break;
case '*':
break;
@@ -247,6 +251,7 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
break;
}
}
+
break;
case AXIS_SELECT:
@@ -260,7 +265,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
m_GerbMetric = FALSE;
else if( code == MILLIMETER )
m_GerbMetric = TRUE;
- conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT / 25.4 : PCB_INTERNAL_UNIT;
+ conv_scale = m_GerbMetric ? PCB_INTERNAL_UNIT /
+ 25.4 : PCB_INTERNAL_UNIT;
break;
case OFFSET: // command: OFAnnBnn (nn = float number)
@@ -314,7 +320,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
m_ImageNegative = true;
else
m_ImageNegative = false;
- D(printf("%22s: IMAGE_POLARITY m_ImageNegative=%s\n", __func__, m_ImageNegative ? "true" : "false");)
+ D( printf( "%22s: IMAGE_POLARITY m_ImageNegative=%s\n", __func__,
+ m_ImageNegative ? "true" : "false" ); )
break;
case LAYER_POLARITY:
@@ -322,7 +329,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
m_LayerNegative = true;
else
m_LayerNegative = false;
- D(printf("%22s: LAYER_POLARITY m_LayerNegative=%s\n", __func__, m_LayerNegative ? "true" : "false");)
+ D( printf( "%22s: LAYER_POLARITY m_LayerNegative=%s\n", __func__,
+ m_LayerNegative ? "true" : "false" ); )
break;
case INCLUDE_FILE:
@@ -356,6 +364,7 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
break;
case AP_DEFINITION:
+
// input example: %ADD30R,0.081800X0.101500*%
// at this point, text points to 2nd 'D'
@@ -367,19 +376,19 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
m_Has_DCode = TRUE;
- code = ReadInt( text );
+ code = ReadInt( text );
- D_CODE* dcode;
+ D_CODE* dcode;
dcode = GetDCODE( code );
if( dcode == NULL )
break;
- // at this point, text points to character after the ADD, i.e. R in example above
-
- // if text[0] is one of the usual apertures: (C,R,O,P), there is a comma after it.
+ // at this point, text points to character after the ADD,
+ // i.e. R in example above. If text[0] is one of the usual
+ // apertures: (C,R,O,P), there is a comma after it.
if( text[1] == ',' )
{
- char stdAperture = *text;
+ char stdAperture = *text;
text += 2; // skip "C," for example
@@ -397,7 +406,7 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
{
text++;
dcode->m_Drill.x = dcode->m_Drill.y =
- wxRound( ReadDouble( text ) * conv_scale );
+ wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = 1;
}
@@ -436,7 +445,7 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
{
text++;
dcode->m_Drill.x = dcode->m_Drill.y =
- wxRound( ReadDouble( text ) * conv_scale );
+ wxRound( ReadDouble( text ) * conv_scale );
dcode->m_DrillShape = 1;
}
@@ -459,20 +468,19 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
break;
}
}
-
else // text[0] starts an aperture macro name
{
- APERTURE_MACRO am_lookup;
+ APERTURE_MACRO am_lookup;
- while( *text && *text!='*' && *text!=',' )
+ while( *text && *text != '*' && *text != ',' )
am_lookup.name.Append( *text++ );
- if( *text && *text==',' )
+ if( *text && *text == ',' )
{
- while( *text && *text!='*' )
+ while( *text && *text != '*' )
{
double param = ReadDouble( text );
- if( *text == 'X' )
+ if( *text == 'X' || isspace( *text ) )
++text;
dcode->AppendParam( param );
@@ -484,7 +492,8 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
if( !pam )
{
// @todo not found, don't know how to report an error
- D( printf("aperture macro %s not found\n", CONV_TO_UTF8(am_lookup.name) );)
+ D( printf( "aperture macro %s not found\n",
+ CONV_TO_UTF8( am_lookup.name ) ); )
ok = false;
break;
}
@@ -507,9 +516,9 @@ bool GERBER::ExecuteRS274XCommand( int command, char buff[GERBER_BUFZ], char*& t
/*****************************************************************/
bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file )
-/*****************************************************************/
{
- for(;;)
+/*****************************************************************/
+ for( ; ; )
{
while( (text < buff + GERBER_BUFZ) && *text )
{
@@ -533,9 +542,11 @@ bool GetEndOfBlock( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file )
/*******************************************************************/
-bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], char*& text, FILE* gerber_file )
-/*******************************************************************/
+bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ],
+ char*& text,
+ FILE* gerber_file )
{
+/*******************************************************************/
APERTURE_MACRO am;
// read macro name
@@ -553,9 +564,9 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], char*& text, FILE* gerbe
if( g_DebugLevel > 0 )
wxMessageBox( am.name, wxT( "macro name" ) );
- for(;;)
+ for( ; ; )
{
- AM_PRIMITIVE prim;
+ AM_PRIMITIVE prim;
if( *text == '*' )
++text;
@@ -582,37 +593,47 @@ bool GERBER::ReadApertureMacro( char buff[GERBER_BUFZ], char*& text, FILE* gerbe
case AMP_CIRCLE:
paramCount = 4;
break;
+
case AMP_LINE2:
case AMP_LINE20:
paramCount = 7;
break;
+
case AMP_LINE_CENTER:
case AMP_LINE_LOWER_LEFT:
paramCount = 6;
break;
+
case AMP_EOF:
paramCount = 0;
break;
+
case AMP_OUTLINE:
paramCount = 4;
break;
+
case AMP_POLYGON:
paramCount = 4;
break;
+
case AMP_MOIRE:
paramCount = 9;
break;
+
case AMP_THERMAL:
paramCount = 6;
break;
+
default:
- // @todo, there needs to be a way of reporting the line number and character offset.
- D(printf("Invalid primitive id code %d\n", prim.primitive_id );)
+
+ // @todo, there needs to be a way of reporting the line number
+ // and character offset.
+ D( printf( "Invalid primitive id code %d\n", prim.primitive_id ); )
return false;
}
int i;
- for( i=0; iShowModal();
+
frame->Destroy();
if( ii >= 0 )
return LayerLookUpTable;
@@ -87,32 +87,32 @@ int * InstallDialogLayerPairChoice(WinEDA_GerberFrame * parent)
/*************************************************************************/
-WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
- wxDialog( parent, -1, _("Layer selection:"), wxPoint(-1, -1),
- wxDefaultSize, wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER )
-/*************************************************************************/
+WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( WinEDA_GerberFrame* parent ) :
+ wxDialog( parent, -1, _( "Layer selection:" ), wxPoint( -1, -1 ),
+ wxDefaultSize, wxDEFAULT_DIALOG_STYLE | MAYBE_RESIZE_BORDER )
{
+/*************************************************************************/
OuterBoxSizer = NULL;
- MainBoxSizer = NULL;
+ MainBoxSizer = NULL;
FlexColumnBoxSizer = NULL;
- label = NULL;
+ label = NULL;
Button = NULL;
- text = NULL;
- Line = NULL;
+ text = NULL;
+ Line = NULL;
StdDialogButtonSizer = NULL;
m_Parent = parent;
- SetFont( *g_DialogFont );
- int item_ID, ii, nb_items;
+ int item_ID, ii, nb_items;
wxString msg;
- wxSize goodSize;
+ wxSize goodSize;
- // Experimentation has shown that buttons in the Windows version can be 20 pixels
- // wide and 20 pixels high, but that they need to be 26 pixels wide and 26 pixels
- // high in the Linux version. (And although the dimensions of those buttons could
- // be set to 26 pixels wide and 26 pixels high in both of those versions, that would
- // result in a dialog box which would be excessively high in the Windows version.)
+ // Experimentation has shown that buttons in the Windows version can be 20
+ // pixels wide and 20 pixels high, but that they need to be 26 pixels wide
+ // and 26 pixels high in the Linux version. (And although the dimensions
+ // of those buttons could be set to 26 pixels wide and 26 pixels high in
+ // both of those versions, that would result in a dialog box which would
+ // be excessively high in the Windows version.)
#ifdef __WINDOWS__
int w = 20;
int h = 20;
@@ -120,10 +120,11 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
int w = 26;
int h = 26;
#endif
- // As currently implemented, the dimensions of the buttons in the Mac version are
- // also 26 pixels wide and 26 pixels high. If appropriate, the above code should be
- // modified as required in the event that those buttons should be some other size
- // in that version.
+
+ // As currently implemented, the dimensions of the buttons in the Mac
+ // version are also 26 pixels wide and 26 pixels high. If appropriate,
+ // the above code should be modified as required in the event that those
+ // buttons should be some other size in that version.
// Compute a reasonable number of copper layers
g_DesignSettings.m_CopperLayerCount = 0;
@@ -134,7 +135,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
// Specify the default value for each member of these arrays.
ButtonTable[ii] = -1;
- LayerLookUpTable[ii] = LAYER_UNSELECTED; // Value associated with deselected Gerber layer
+ LayerLookUpTable[ii] = LAYER_UNSELECTED;
}
int pcb_layer_number = 0;
@@ -144,20 +145,20 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
continue;
if( (pcb_layer_number == g_DesignSettings.m_CopperLayerCount - 1)
- && (g_DesignSettings.m_CopperLayerCount > 1) )
+ && (g_DesignSettings.m_CopperLayerCount > 1) )
pcb_layer_number = CMP_N;
ButtonTable[nb_items] = ii;
- LayerLookUpTable[ii] = pcb_layer_number;
+ LayerLookUpTable[ii] = pcb_layer_number;
nb_items++;
pcb_layer_number++;
}
- OuterBoxSizer = new wxBoxSizer(wxVERTICAL);
- SetSizer(OuterBoxSizer);
+ OuterBoxSizer = new wxBoxSizer( wxVERTICAL );
+ SetSizer( OuterBoxSizer );
- MainBoxSizer = new wxBoxSizer(wxHORIZONTAL);
- OuterBoxSizer->Add(MainBoxSizer, 1, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
+ MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
+ OuterBoxSizer->Add( MainBoxSizer, 1, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
for( ii = 0; ii < nb_items; ii++ )
{
@@ -165,63 +166,83 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
// separate the two FlexGrid sizers
if( (nb_items > 16) && (ii == 16) )
{
- Line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
- MainBoxSizer->Add(Line, 0, wxGROW|wxLEFT|wxRIGHT, 5);
+ Line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize,
+ wxLI_VERTICAL );
+ MainBoxSizer->Add( Line, 0, wxGROW | wxLEFT | wxRIGHT, 5 );
}
// Provide a separate FlexGrid sizer for every sixteen sets of controls
if( ii % 16 == 0 )
{
- // Each Gerber layer has an associated static text string (to identify that layer),
- // a button (for invoking a child dialog box to change which pcbnew layer that the
- // Gerber layer is mapped to), and a second static text string (to depict which
- // pcbnew layer that the Gerber layer has been mapped to). Each of those items are
- // placed into the left hand column, middle column, and right hand column
- // (respectively) of the Flexgrid sizer, and the color of the second text string
- // is set to fushia or blue (to respectively indicate whether the Gerber layer has
- // been mapped to a pcbnew layer or is not being exported at all).
- // (Experimentation has shown that if a text control is used to depict which
- // pcbnew layer that each Gerber layer is mapped to (instead of a static text
- // string), then those controls do not behave in a fully satisfactory manner in
- // the Linux version. Even when the read-only attribute is specified for all of
- // those controls, they can still be selected when the arrow keys or Tab key is
- // used to step through all of the controls within the dialog box, and
- // directives to set the foreground color of the text of each such control to
- // blue (to indicate that the text is of a read-only nature) are disregarded.)
-
- // Specify a FlexGrid sizer with an appropriate number of rows and three columns.
- // If nb_items < 16, then the number of rows is nb_items; otherwise, the number of
- // rows is 16 (with two separate columns of controls being used if nb_items > 16).
+ // Each Gerber layer has an associated static text string (to
+ // identify that layer), a button (for invoking a child dialog
+ // box to change which pcbnew layer that the Gerber layer is
+ // mapped to), and a second static text string (to depict which
+ // pcbnew layer that the Gerber layer has been mapped to). Each
+ // of those items are placed into the left hand column, middle
+ // column, and right hand column (respectively) of the Flexgrid
+ // sizer, and the color of the second text string is set to
+ // fushia or blue (to respectively indicate whether the Gerber
+ // layer has been mapped to a pcbnew layer or is not being
+ // exported at all). (Experimentation has shown that if a text
+ // control is used to depict which pcbnew layer that each Gerber
+ // layer is mapped to (instead of a static text string), then
+ // those controls do not behave in a fully satisfactory manner
+ // in the Linux version. Even when the read-only attribute is
+ // specified for all of those controls, they can still be selected
+ // when the arrow keys or Tab key is used to step through all of
+ // the controls within the dialog box, and directives to set the
+ // foreground color of the text of each such control to blue (to
+ // indicate that the text is of a read-only nature) are disregarded.
+ // Specify a FlexGrid sizer with an appropriate number of rows
+ // and three columns. If nb_items < 16, then the number of rows
+ // is nb_items; otherwise, the number of rows is 16 (with two
+ // separate columns of controls being used if nb_items > 16).
if( nb_items < 16 )
- FlexColumnBoxSizer = new wxFlexGridSizer(nb_items, 3, 0, 0);
+ FlexColumnBoxSizer = new wxFlexGridSizer( nb_items, 4, 0, 0 );
else
- FlexColumnBoxSizer = new wxFlexGridSizer(16, 3, 0, 0);
+ FlexColumnBoxSizer = new wxFlexGridSizer( 16, 4, 0, 0 );
// Specify that all of the rows can be expanded.
- for( int jj = 0; jj < MIN(nb_items, 16); jj++ )
+ for( int jj = 0; jj < MIN( nb_items, 16 ); jj++ )
{
- FlexColumnBoxSizer->AddGrowableRow(jj);
+ FlexColumnBoxSizer->AddGrowableRow( jj );
}
// Specify that (just) the right-hand column can be expanded.
- FlexColumnBoxSizer->AddGrowableCol(2);
+ FlexColumnBoxSizer->AddGrowableCol( 2 );
- MainBoxSizer->Add(FlexColumnBoxSizer, 1, wxGROW|wxTOP, 5);
+ MainBoxSizer->Add( FlexColumnBoxSizer, 1, wxGROW | wxTOP, 5 );
}
// Provide a text string to identify the Gerber layer
- msg = _("Gerber layer ");
+ msg = _( "Layer " );
msg << ButtonTable[ii] + 1;
- label = new wxStaticText( this, wxID_STATIC, msg, wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT );
- FlexColumnBoxSizer->Add(label, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxBOTTOM, 5);
+ label = new wxStaticText( this, wxID_STATIC, msg, wxDefaultPosition,
+ wxDefaultSize, wxALIGN_RIGHT );
+ FlexColumnBoxSizer->Add( label, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL |
+ wxALL, 5 );
+
+ /* Add file name and extension without path. */
+ wxFileName fn( g_GERBER_List[ii]->m_FileName );
+ label = new wxStaticText( this, wxID_STATIC, fn.GetFullName(),
+ wxDefaultPosition, wxDefaultSize );
+ FlexColumnBoxSizer->Add( label, 0,
+ wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL |
+ wxALL, 5 );
// Provide a button for this layer (which will invoke a child dialog box)
item_ID = ID_BUTTON_0 + ii;
- Button = new wxButton( this, item_ID, wxT("..."), wxDefaultPosition, wxSize(w, h), 0 );
- FlexColumnBoxSizer->Add(Button, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxBOTTOM, 5);
+ Button = new wxButton( this, item_ID, wxT( "..." ),
+ wxDefaultPosition, wxSize( w, h ), 0 );
+
+ FlexColumnBoxSizer->Add( Button, 0,
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL |
+ wxALL, 5 );
// Provide another text string to specify which pcbnew layer that this
// Gerber layer is initially mapped to, and set the initial text to
@@ -229,33 +250,40 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
// of the text to fushia (to indicate that the layer is being exported).
item_ID = ID_TEXT_0 + ii;
- // When the first of these text strings is being added, determine what size is necessary to
- // to be able to display any possible string without it being truncated. Then specify that
- // size as the minimum size for all of these text strings. (If this minimum size is not
- // determined in this fashion, then it is possible for the display of one or more of these
- // strings to be truncated after different pcbnew layers are selected.)
+ // When the first of these text strings is being added, determine what
+ // size is necessary to to be able to display any possible string
+ // without it being truncated. Then specify that size as the minimum
+ // size for all of these text strings. (If this minimum size is not
+ // determined in this fashion, then it is possible for the display of
+ // one or more of these strings to be truncated after different pcbnew
+ // layers are selected.)
if( ii == 0 )
{
msg = _( "Do not export" );
- text = new wxStaticText( this, item_ID, msg, wxDefaultPosition, wxDefaultSize, 0 );
+ text = new wxStaticText( this, item_ID, msg, wxDefaultPosition,
+ wxDefaultSize, 0 );
goodSize = text->GetSize();
+
for( int jj = 0; jj < NB_LAYERS; jj++ )
{
text->SetLabel( ReturnPcbLayerName( jj ) );
if( goodSize.x < text->GetSize().x )
goodSize.x = text->GetSize().x;
}
- msg = ReturnPcbLayerName(LayerLookUpTable[ButtonTable[ii]]);
+
+ msg = ReturnPcbLayerName( LayerLookUpTable[ButtonTable[ii]] );
text->SetLabel( msg );
}
else
{
- msg = ReturnPcbLayerName(LayerLookUpTable[ButtonTable[ii]]);
- text = new wxStaticText( this, item_ID, msg, wxDefaultPosition, wxDefaultSize, 0 );
+ msg = ReturnPcbLayerName( LayerLookUpTable[ButtonTable[ii]] );
+ text = new wxStaticText( this, item_ID, msg, wxDefaultPosition,
+ wxDefaultSize, 0 );
}
text->SetMinSize( goodSize );
- text->SetForegroundColour( wxColour(255, 0, 128) );
- FlexColumnBoxSizer->Add(text, 1, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
+ FlexColumnBoxSizer->Add( text, 1,
+ wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,
+ 5 );
layer_list[ii] = text;
}
@@ -265,44 +293,45 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame(WinEDA_GerberFrame *parent) :
// are thus required for each otherwise unused row.)
if( 16 < nb_items && nb_items < 32 )
{
- for( ii = 3 * nb_items; ii < 96; ii++ )
+ for( ii = 4 * nb_items; ii < 96; ii++ )
{
- FlexColumnBoxSizer->Add(5, h, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
+ FlexColumnBoxSizer->Add( 5, h, 0,
+ wxALIGN_CENTER_HORIZONTAL |
+ wxALIGN_CENTER_VERTICAL | wxLEFT |
+ wxRIGHT | wxBOTTOM, 5 );
}
}
// Provide a line to separate the controls which have been provided so far
// from the OK and Cancel buttons (which will be provided after this line)
- Line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- OuterBoxSizer->Add(Line, 0, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5);
+ Line = new wxStaticLine( this, -1, wxDefaultPosition, wxDefaultSize,
+ wxLI_HORIZONTAL );
+ OuterBoxSizer->Add( Line, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 );
// Provide a StdDialogButtonSizer to accommodate the OK and Cancel buttons;
// using that type of sizer results in those buttons being automatically
// located in positions appropriate for each (OS) version of KiCad.
StdDialogButtonSizer = new wxStdDialogButtonSizer;
- OuterBoxSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
+ OuterBoxSizer->Add( StdDialogButtonSizer, 0, wxGROW | wxALL, 10 );
- Button = new wxButton( this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxRED );
- StdDialogButtonSizer->AddButton(Button);
-
- Button = new wxButton( this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxBLUE );
- StdDialogButtonSizer->AddButton(Button);
+ Button = new wxButton( this, wxID_OK, _( "&OK" ), wxDefaultPosition,
+ wxDefaultSize, 0 );
+ StdDialogButtonSizer->AddButton( Button );
+ Button = new wxButton( this, wxID_CANCEL, _( "&Cancel" ),
+ wxDefaultPosition, wxDefaultSize, 0 );
+ StdDialogButtonSizer->AddButton( Button );
StdDialogButtonSizer->Realize();
// Resize the dialog
if( GetSizer() )
{
- GetSizer()->SetSizeHints(this);
+ GetSizer()->SetSizeHints( this );
}
}
-/***************************************************************/
-void WinEDA_SwapLayerFrame::Sel_Layer(wxCommandEvent& event)
-/***************************************************************/
+void WinEDA_SwapLayerFrame::OnSelectLayer( wxCommandEvent& event )
{
int ii, jj;
@@ -314,11 +343,11 @@ void WinEDA_SwapLayerFrame::Sel_Layer(wxCommandEvent& event)
ii = event.GetId() - ID_BUTTON_0;
jj = LayerLookUpTable[ButtonTable[ii]];
- if( (jj < 0) || (jj > LAYER_UNSELECTED) )
+ if( ( jj < 0 ) || ( jj > LAYER_UNSELECTED ) )
jj = 0; // (Defaults to "Copper" layer.)
- jj = m_Parent->SelectLayer(jj, -1, -1, true);
+ jj = m_Parent->SelectLayer( jj, -1, -1, true );
- if( (jj < 0) || (jj > LAYER_UNSELECTED) )
+ if( ( jj < 0 ) || ( jj > LAYER_UNSELECTED ) )
return;
if( jj != LayerLookUpTable[ButtonTable[ii]] )
@@ -327,6 +356,7 @@ void WinEDA_SwapLayerFrame::Sel_Layer(wxCommandEvent& event)
if( jj == LAYER_UNSELECTED )
{
layer_list[ii]->SetLabel( _( "Do not export" ) );
+
// Change the text color to blue (to highlight
// that this layer is *not* being exported)
layer_list[ii]->SetForegroundColour( *wxBLUE );
@@ -334,27 +364,28 @@ void WinEDA_SwapLayerFrame::Sel_Layer(wxCommandEvent& event)
else
{
layer_list[ii]->SetLabel( ReturnPcbLayerName( jj ) );
+
// Change the text color to fushia (to highlight
// that this layer *is* being exported)
- layer_list[ii]->SetForegroundColour( wxColour(255, 0, 128) );
+ layer_list[ii]->SetForegroundColour( wxColour( 255, 0, 128 ) );
}
}
}
/*********************************************************/
-void WinEDA_SwapLayerFrame::OnCancelClick(wxCommandEvent& event)
-/*********************************************************/
+void WinEDA_SwapLayerFrame::OnCancelClick( wxCommandEvent& event )
{
+/*********************************************************/
EndModal( -1 );
}
/*********************************************************/
-void WinEDA_SwapLayerFrame::OnOkClick(wxCommandEvent& event)
-/*********************************************************/
+void WinEDA_SwapLayerFrame::OnOkClick( wxCommandEvent& event )
{
- int ii;
+/*********************************************************/
+ int ii;
bool AsCmpLayer = false;
/* Compute the number of copper layers
diff --git a/gerbview/set_color.cpp b/gerbview/set_color.cpp
index e9258ee4fa..e49c17d821 100644
--- a/gerbview/set_color.cpp
+++ b/gerbview/set_color.cpp
@@ -124,8 +124,6 @@ void WinEDA_SetColorsFrame::CreateControls()
wxSize CorrectSize; // Used while specifying sizes of buttons and spacers
int ButtonHeight; // Also used for the same reason
- SetFont( *g_DialogFont );
-
OuterBoxSizer = new wxBoxSizer(wxVERTICAL);
SetSizer(OuterBoxSizer);
@@ -268,7 +266,6 @@ void WinEDA_SetColorsFrame::CreateControls()
if (WinEDA_SetColorsFrame::ShowToolTips())
Button->SetToolTip( _("Switch on all of the Gerber layers") );
Button->SetMinSize( wxSize( CorrectSize.x, ButtonHeight ) );
- Button->SetForegroundColour( wxColor( 0, 100, 0 ) );
FlexColumnBoxSizer->Add(Button, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5);
// Now do everything required for providing the second button.
@@ -277,7 +274,6 @@ void WinEDA_SetColorsFrame::CreateControls()
if (WinEDA_SetColorsFrame::ShowToolTips())
Button->SetToolTip( _("Switch off all of the Gerber layers") );
Button->SetMinSize( wxSize( CorrectSize.x, ButtonHeight ) );
- Button->SetForegroundColour( wxColor( 100, 0, 0 ) );
FlexColumnBoxSizer->Add(Button, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5);
// As each column contains seventeen rows, and only six rows of the third column have been
@@ -313,11 +309,9 @@ void WinEDA_SetColorsFrame::CreateControls()
OuterBoxSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
Button = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxRED );
StdDialogButtonSizer->AddButton(Button);
Button = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- Button->SetForegroundColour( *wxBLUE );
StdDialogButtonSizer->AddButton(Button);
Button = new wxButton( this, wxID_APPLY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
diff --git a/gerbview/tool_gerber.cpp b/gerbview/tool_gerber.cpp
index a165d982db..db2b92e8ed 100644
--- a/gerbview/tool_gerber.cpp
+++ b/gerbview/tool_gerber.cpp
@@ -91,9 +91,6 @@ void WinEDA_GerberFrame::ReCreateMenuBar( void )
_( " Select how items are displayed" ),
display_options_xpm );
- // Font selection and setup
- AddFontSelectionMenu( configmenu );
-
wxGetApp().AddMenuLanguageList( configmenu );
configmenu->AppendSeparator();
@@ -242,7 +239,8 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
-1, -1, (wxObject*) NULL,
msg );
- msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr, HK_ZOOM_REDRAW );
+ msg = AddHotkeyName( _( "Redraw view" ), s_Gerbview_Hokeys_Descr,
+ HK_ZOOM_REDRAW );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxBitmap( zoom_redraw_xpm ),
wxNullBitmap,
FALSE,
@@ -271,8 +269,10 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
choices.Add( msg );
}
- m_SelLayerBox = new WinEDAChoiceBox( m_HToolBar, ID_TOOLBARH_PCB_SELECT_LAYER,
- wxDefaultPosition, wxSize( 150, -1 ), choices );
+ m_SelLayerBox = new WinEDAChoiceBox( m_HToolBar,
+ ID_TOOLBARH_PCB_SELECT_LAYER,
+ wxDefaultPosition, wxSize( 150, -1 ),
+ choices );
m_SelLayerBox->SetSelection( GetScreen()->m_Active_Layer );
m_HToolBar->AddControl( m_SelLayerBox );
@@ -286,8 +286,10 @@ void WinEDA_GerberFrame::ReCreateHToolbar( void )
choices.Add( msg );
}
- m_SelLayerTool = new WinEDAChoiceBox( m_HToolBar, ID_TOOLBARH_GERBER_SELECT_TOOL,
- wxDefaultPosition, wxSize( 150, -1 ), choices );
+ m_SelLayerTool = new WinEDAChoiceBox( m_HToolBar,
+ ID_TOOLBARH_GERBER_SELECT_TOOL,
+ wxDefaultPosition, wxSize( 150, -1 ),
+ choices );
m_HToolBar->AddControl( m_SelLayerTool );
@@ -368,7 +370,8 @@ create or update the left vertical toolbar (option toolbar
return;
// creation du tool bar options
- m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this, ID_OPT_TOOLBAR, FALSE );
+ m_OptionsToolBar = new WinEDA_Toolbar( TOOLBAR_OPTION, this,
+ ID_OPT_TOOLBAR, FALSE );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GRID, wxBitmap( grid_xpm ),
wxNullBitmap,
@@ -376,7 +379,8 @@ create or update the left vertical toolbar (option toolbar
-1, -1, (wxObject*) NULL,
_( "Display Grid OFF" ) );
- m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD, wxBitmap( polar_coord_xpm ),
+ m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_POLAR_COORD,
+ wxBitmap( polar_coord_xpm ),
wxNullBitmap,
TRUE,
-1, -1, (wxObject*) NULL,
@@ -390,7 +394,8 @@ create or update the left vertical toolbar (option toolbar
wxBitmap( unit_mm_xpm ),
_( "Units in millimeters" ), wxITEM_CHECK );
- m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxBitmap( cursor_shape_xpm ),
+ m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR,
+ wxBitmap( cursor_shape_xpm ),
wxNullBitmap,
TRUE,
-1, -1, (wxObject*) NULL,
diff --git a/include/appl_wxstruct.h b/include/appl_wxstruct.h
index d07e9fc7ce..18310a3e17 100644
--- a/include/appl_wxstruct.h
+++ b/include/appl_wxstruct.h
@@ -131,6 +131,7 @@ public:
* @param aList = array of PARAM_CFG_BASE pointers
*/
void SaveCurrentSetupValues( PARAM_CFG_BASE** aList );
+ void SaveCurrentSetupValues( const PARAM_CFG_ARRAY& List );
/** Function ReadCurrentSetupValues()
* Raed the current setup values previously saved, from m_EDA_Config
@@ -138,6 +139,7 @@ public:
* @param aList = array of PARAM_CFG_BASE pointers
*/
void ReadCurrentSetupValues( PARAM_CFG_BASE** aList );
+ void ReadCurrentSetupValues( const PARAM_CFG_ARRAY& List );
bool ReadProjectConfig( const wxString& local_config_filename,
const wxString& GroupName,
diff --git a/include/common.h b/include/common.h
index 6e91933236..a4ba52d14a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -85,9 +85,6 @@ enum pseudokeys {
class LibNameList;
-//#define MAX_COLOR 0x8001F
-
-
/***********************************/
/* Classe pour affichage de textes */
/***********************************/
diff --git a/include/param_config.h b/include/param_config.h
index cd4e19fc20..1361640001 100644
--- a/include/param_config.h
+++ b/include/param_config.h
@@ -24,6 +24,8 @@ enum paramcfg_id /* type du parametre dans la structure ParamConfig */
};
#define MAX_COLOR 0x8001F
+#define IS_VALID_COLOR( c ) ( ( c >= 0 ) && ( c <= 0x8001F ) )
+
#define INT_MINVAL 0x80000000
#define INT_MAXVAL 0x7FFFFFFF
diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h
index 3b4a5958ad..5b897c9518 100644
--- a/include/wxEeschemaStruct.h
+++ b/include/wxEeschemaStruct.h
@@ -7,6 +7,7 @@
#define WX_EESCHEMA_STRUCT_H
#include "wxstruct.h"
+#include "param_config.h"
class WinEDA_LibeditFrame;
@@ -56,16 +57,23 @@ class WinEDA_SchematicFrame : public WinEDA_DrawFrame
public:
WinEDAChoiceBox* m_SelPartBox;
DrawSheetPath* m_CurrentSheet; ///< which sheet we are presently working on.
- int m_Multiflag;
+ int m_Multiflag;
+ int m_NetlistFormat;
+ bool m_ShowAllPins;
wxPoint m_OldPos;
WinEDA_LibeditFrame* m_LibeditFrame;
WinEDA_ViewlibFrame* m_ViewlibFrame;
+ wxString m_UserLibraryPath;
+ wxArrayString m_ComponentLibFiles;
private:
- SCH_CMP_FIELD* m_CurrentField;
- int m_TextFieldSize;
- bool m_ShowGrid;
+ wxString m_DefaultSchematicFileName;
+ SCH_CMP_FIELD* m_CurrentField;
+ int m_TextFieldSize;
+ bool m_ShowGrid;
+ PARAM_CFG_ARRAY m_projectFileParams;
+ PARAM_CFG_ARRAY m_configSettings;
public:
@@ -82,8 +90,11 @@ public:
void GeneralControle( wxDC* DC, wxPoint MousePositionInPixels );
- void Save_Config( wxWindow* displayframe );
+ const PARAM_CFG_ARRAY& GetProjectFileParameters( void );
+ void SaveProjectFile( wxWindow* displayframe );
+ bool LoadProjectFile( const wxString& CfgFileName, bool ForceRereadConfig );
+ const PARAM_CFG_ARRAY& GetConfigurationSettings( void );
void LoadSettings();
void SaveSettings();
@@ -94,7 +105,6 @@ public:
void ReCreateVToolbar();
void ReCreateOptToolbar();
void ReCreateMenuBar();
- void SetToolbars();
void OnHotKey( wxDC* DC,
int hotkey,
EDA_BaseStruct* DrawStruct );
@@ -251,6 +261,16 @@ private:
void OnOpenLibraryViewer( wxCommandEvent& event );
void OnOpenLibraryEditor( wxCommandEvent& event );
+ /* User interface update event handlers. */
+ void OnUpdateBlockSelected( wxUpdateUIEvent& event );
+ void OnUpdatePaste( wxUpdateUIEvent& event );
+ void OnUpdateSchematicUndo( wxUpdateUIEvent& event );
+ void OnUpdateSchematicRedo( wxUpdateUIEvent& event );
+ void OnUpdateGrid( wxUpdateUIEvent& event );
+ void OnUpdateUnits( wxUpdateUIEvent& event );
+ void OnUpdateSelectCursor( wxUpdateUIEvent& event );
+ void OnUpdateHiddenPins( wxUpdateUIEvent& event );
+ void OnUpdateBusOrientation( wxUpdateUIEvent& event );
// Bus Entry
DrawBusEntryStruct* CreateBusEntry( wxDC* DC, int entry_type );
@@ -415,12 +435,13 @@ public:
void SetToolbars();
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
- SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) GetBaseScreen(); }
+ SCH_SCREEN* GetScreen() { return (SCH_SCREEN*) GetBaseScreen(); }
void OnHotKey( wxDC* DC, int hotkey,
EDA_BaseStruct* DrawStruct );
void GeneralControle( wxDC* DC,
wxPoint MousePositionInPixels );
+
void LoadSettings();
void SaveSettings();
diff --git a/share/setpage.cpp b/share/setpage.cpp
index 27497dc13c..37b8932317 100644
--- a/share/setpage.cpp
+++ b/share/setpage.cpp
@@ -51,7 +51,6 @@ Ki_PageDescr * SheetList[NB_ITEMS + 1] =
#include "setpage.h"
////@begin XPM images
-
////@end XPM images
/******************************************************************/
@@ -155,7 +154,7 @@ bool WinEDA_SetPageFrame::Create( wxWindow* parent, wxWindowID id, const wxStrin
wxDialog::Create( parent, id, caption, pos, size, style );
CreateControls();
- if( GetSizer() )
+ if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
@@ -203,33 +202,29 @@ void WinEDA_SetPageFrame::Init()
m_TextSheetNumber = NULL;
RevisionSizer = NULL;
m_TextRevision = NULL;
+ m_RevisionExport = NULL;
TitleSizer = NULL;
m_TextTitle = NULL;
+ m_TitleExport = NULL;
CompanySizer = NULL;
m_TextCompany = NULL;
+ m_CompanyExport = NULL;
Comment1Sizer = NULL;
m_TextComment1 = NULL;
+ m_Comment1Export = NULL;
Comment2Sizer = NULL;
m_TextComment2 = NULL;
+ m_Comment2Export = NULL;
Comment3Sizer = NULL;
m_TextComment3 = NULL;
+ m_Comment3Export = NULL;
Comment4Sizer = NULL;
m_TextComment4 = NULL;
+ m_Comment4Export = NULL;
Line = NULL;
StdDialogButtonSizer = NULL;
Button_OK = NULL;
Button_Cancel = NULL;
-
-#ifdef EESCHEMA
- m_RevisionExport = NULL;
- m_TitleExport = NULL;
- m_CompanyExport = NULL;
- m_Comment1Export = NULL;
- m_Comment2Export = NULL;
- m_Comment3Export = NULL;
- m_Comment4Export = NULL;
-#endif
-
////@end WinEDA_SetPageFrame member initialisation
}
@@ -240,17 +235,14 @@ void WinEDA_SetPageFrame::Init()
void WinEDA_SetPageFrame::CreateControls()
{
- SetFont( *g_DialogFont );
-
// NOTE: The following code has been modified by providing the seven
// checkboxes *only* within the EESchema version of this dialog box.
////@begin WinEDA_SetPageFrame content construction
- // Generated by DialogBlocks, 13/11/2007 09:11:27 (unregistered)
+ // Generated by DialogBlocks, 24/04/2009 15:17:10 (unregistered)
WinEDA_SetPageFrame* itemDialog1 = this;
- this->SetForegroundColour(wxColour(0, 128, 64));
OuterSizer = new wxBoxSizer(wxVERTICAL);
itemDialog1->SetSizer(OuterSizer);
@@ -321,112 +313,89 @@ void WinEDA_SetPageFrame::CreateControls()
RightColumnSizer->Add(SheetInfoSizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5);
m_TextSheetCount = new wxStaticText( itemDialog1, wxID_STATIC, _("Number of sheets: %d"), wxDefaultPosition, wxDefaultSize, 0 );
- m_TextSheetCount->SetForegroundColour(wxColour(128, 0, 128));
SheetInfoSizer->Add(m_TextSheetCount, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5);
SheetInfoSizer->Add(5, 5, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM, 5);
m_TextSheetNumber = new wxStaticText( itemDialog1, wxID_STATIC, _("Sheet number: %d"), wxDefaultPosition, wxDefaultSize, 0 );
- m_TextSheetNumber->SetForegroundColour(wxColour(128, 0, 128));
SheetInfoSizer->Add(m_TextSheetNumber, 0, wxGROW|wxLEFT|wxRIGHT|wxBOTTOM|wxADJUST_MINSIZE, 5);
wxStaticBox* itemStaticBoxSizer20Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Revision:"));
RevisionSizer = new wxStaticBoxSizer(itemStaticBoxSizer20Static, wxHORIZONTAL);
- itemStaticBoxSizer20Static->SetForegroundColour(wxColour(200, 0, 0));
RightColumnSizer->Add(RevisionSizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5);
m_TextRevision = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_REVISION, _T(""), wxDefaultPosition, wxSize(100, -1), wxTE_RICH );
RevisionSizer->Add(m_TextRevision, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_RevisionExport = new wxCheckBox( itemDialog1, ID_CHECKBOX_REVISION, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_RevisionExport->SetValue(false);
RevisionSizer->Add(m_RevisionExport, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer23Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Title:"));
TitleSizer = new wxStaticBoxSizer(itemStaticBoxSizer23Static, wxHORIZONTAL);
- itemStaticBoxSizer23Static->SetForegroundColour(wxColour(200, 0, 0));
RightColumnSizer->Add(TitleSizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextTitle = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_TITLE, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
TitleSizer->Add(m_TextTitle, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_TitleExport = new wxCheckBox( itemDialog1, ID_CHECKBOX_TITLE, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_TitleExport->SetValue(false);
TitleSizer->Add(m_TitleExport, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer26Static = new wxStaticBox(itemDialog1, wxID_ANY, _("Company:"));
CompanySizer = new wxStaticBoxSizer(itemStaticBoxSizer26Static, wxHORIZONTAL);
- itemStaticBoxSizer26Static->SetForegroundColour(wxColour(200, 0, 0));
RightColumnSizer->Add(CompanySizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextCompany = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_COMPANY, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
CompanySizer->Add(m_TextCompany, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_CompanyExport = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMPANY, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_CompanyExport->SetValue(false);
CompanySizer->Add(m_CompanyExport, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer29Static = new wxStaticBox(itemDialog1, wxID_STATIC, _("Comment1:"));
Comment1Sizer = new wxStaticBoxSizer(itemStaticBoxSizer29Static, wxHORIZONTAL);
- itemStaticBoxSizer29Static->SetForegroundColour(wxColour(196, 0, 100));
RightColumnSizer->Add(Comment1Sizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextComment1 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_COMMENT1, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
Comment1Sizer->Add(m_TextComment1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_Comment1Export = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMENT1, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_Comment1Export->SetValue(false);
Comment1Sizer->Add(m_Comment1Export, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer32Static = new wxStaticBox(itemDialog1, wxID_STATIC, _("Comment2:"));
Comment2Sizer = new wxStaticBoxSizer(itemStaticBoxSizer32Static, wxHORIZONTAL);
- itemStaticBoxSizer32Static->SetForegroundColour(wxColour(196, 0, 100));
RightColumnSizer->Add(Comment2Sizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextComment2 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_COMMENT2, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
Comment2Sizer->Add(m_TextComment2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_Comment2Export = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMENT2, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_Comment2Export->SetValue(false);
Comment2Sizer->Add(m_Comment2Export, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer35Static = new wxStaticBox(itemDialog1, wxID_STATIC, _("Comment3:"));
Comment3Sizer = new wxStaticBoxSizer(itemStaticBoxSizer35Static, wxHORIZONTAL);
- itemStaticBoxSizer35Static->SetForegroundColour(wxColour(196, 0, 100));
RightColumnSizer->Add(Comment3Sizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextComment3 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_COMMENT3, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
Comment3Sizer->Add(m_TextComment3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_Comment3Export = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMENT3, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_Comment3Export->SetValue(false);
Comment3Sizer->Add(m_Comment3Export, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
wxStaticBox* itemStaticBoxSizer38Static = new wxStaticBox(itemDialog1, wxID_STATIC, _("Comment4:"));
Comment4Sizer = new wxStaticBoxSizer(itemStaticBoxSizer38Static, wxHORIZONTAL);
- itemStaticBoxSizer38Static->SetForegroundColour(wxColour(196, 0, 100));
RightColumnSizer->Add(Comment4Sizer, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxADJUST_MINSIZE, 5);
m_TextComment4 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL_COMMENT4, _T(""), wxDefaultPosition, wxSize(400, -1), 0 );
Comment4Sizer->Add(m_TextComment4, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#ifdef EESCHEMA
m_Comment4Export = new wxCheckBox( itemDialog1, ID_CHECKBOX_COMMENT4, _("Export to other sheets"), wxDefaultPosition, wxDefaultSize, 0 );
m_Comment4Export->SetValue(false);
Comment4Sizer->Add(m_Comment4Export, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
-#endif
Line = new wxStaticLine( itemDialog1, ID_STATICLINE, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
OuterSizer->Add(Line, 0, wxGROW|wxLEFT|wxRIGHT, 5);
@@ -435,16 +404,13 @@ void WinEDA_SetPageFrame::CreateControls()
OuterSizer->Add(StdDialogButtonSizer, 0, wxGROW|wxALL, 10);
Button_OK = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 );
- Button_OK->SetForegroundColour(wxColour(200, 0, 0));
StdDialogButtonSizer->AddButton(Button_OK);
Button_Cancel = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- Button_Cancel->SetForegroundColour(wxColour(0, 0, 255));
StdDialogButtonSizer->AddButton(Button_Cancel);
StdDialogButtonSizer->Realize();
-
// Set validators
m_PageSizeBox->SetValidator( wxGenericValidator(& m_CurrentSelection) );
m_TextRevision->SetValidator( wxTextValidator(wxFILTER_NONE, & m_Screen->m_Revision) );
diff --git a/share/setpage.h b/share/setpage.h
index 58372b7ab7..61aefe2a5a 100644
--- a/share/setpage.h
+++ b/share/setpage.h
@@ -62,23 +62,19 @@ class wxStdDialogButtonSizer;
#define ID_TEXTCTRL_USER_PAGE_SIZE_X 10002
#define ID_TEXTCTRL_USER_PAGE_SIZE_Y 10003
#define ID_TEXTCTRL_REVISION 10004
-#define ID_TEXTCTRL_TITLE 10005
-#define ID_TEXTCTRL_COMPANY 10006
-#define ID_TEXTCTRL_COMMENT1 10007
-#define ID_TEXTCTRL_COMMENT2 10008
-#define ID_TEXTCTRL_COMMENT3 10009
-#define ID_TEXTCTRL_COMMENT4 10010
-
-#ifdef EESCHEMA
#define ID_CHECKBOX_REVISION 10011
+#define ID_TEXTCTRL_TITLE 10005
#define ID_CHECKBOX_TITLE 10012
+#define ID_TEXTCTRL_COMPANY 10006
#define ID_CHECKBOX_COMPANY 10013
+#define ID_TEXTCTRL_COMMENT1 10007
#define ID_CHECKBOX_COMMENT1 10014
+#define ID_TEXTCTRL_COMMENT2 10008
#define ID_CHECKBOX_COMMENT2 10015
+#define ID_TEXTCTRL_COMMENT3 10009
#define ID_CHECKBOX_COMMENT3 10016
+#define ID_TEXTCTRL_COMMENT4 10010
#define ID_CHECKBOX_COMMENT4 10017
-#endif
-
#define ID_STATICLINE 10018
#define SYMBOL_WINEDA_SETPAGEFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_SETPAGEFRAME_TITLE _("Page Settings")
@@ -124,6 +120,7 @@ public:
void CreateControls();
////@begin WinEDA_SetPageFrame event handler declarations
+
/// wxEVT_CLOSE_WINDOW event handler for ID_DIALOG
void OnCloseWindow( wxCloseEvent& event );
@@ -136,6 +133,7 @@ public:
////@end WinEDA_SetPageFrame event handler declarations
////@begin WinEDA_SetPageFrame member function declarations
+
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
@@ -170,33 +168,29 @@ public:
wxStaticText* m_TextSheetNumber;
wxStaticBoxSizer* RevisionSizer;
wxTextCtrl* m_TextRevision;
+ wxCheckBox* m_RevisionExport;
wxStaticBoxSizer* TitleSizer;
wxTextCtrl* m_TextTitle;
+ wxCheckBox* m_TitleExport;
wxStaticBoxSizer* CompanySizer;
wxTextCtrl* m_TextCompany;
+ wxCheckBox* m_CompanyExport;
wxStaticBoxSizer* Comment1Sizer;
wxTextCtrl* m_TextComment1;
+ wxCheckBox* m_Comment1Export;
wxStaticBoxSizer* Comment2Sizer;
wxTextCtrl* m_TextComment2;
+ wxCheckBox* m_Comment2Export;
wxStaticBoxSizer* Comment3Sizer;
wxTextCtrl* m_TextComment3;
+ wxCheckBox* m_Comment3Export;
wxStaticBoxSizer* Comment4Sizer;
wxTextCtrl* m_TextComment4;
+ wxCheckBox* m_Comment4Export;
wxStaticLine* Line;
wxStdDialogButtonSizer* StdDialogButtonSizer;
wxButton* Button_OK;
wxButton* Button_Cancel;
-
-#ifdef EESCHEMA
- wxCheckBox* m_RevisionExport;
- wxCheckBox* m_TitleExport;
- wxCheckBox* m_CompanyExport;
- wxCheckBox* m_Comment1Export;
- wxCheckBox* m_Comment2Export;
- wxCheckBox* m_Comment3Export;
- wxCheckBox* m_Comment4Export;
-#endif
-
////@end WinEDA_SetPageFrame member variables
WinEDA_DrawFrame *m_ParentDrawFrame;
diff --git a/share/setpage.pjd b/share/setpage.pjd
index 240e80bc11..cb07313b32 100644
--- a/share/setpage.pjd
+++ b/share/setpage.pjd
@@ -20,6 +20,7 @@
""
0
0
+ 0
"<All platforms>"
"<Any>"
"/////////////////////////////////////////////////////////////////////////////
@@ -108,10 +109,13 @@
0
0
1
+ 0
1
1
0
1
+ 0
+ 0
@@ -134,6 +138,7 @@
0
""
1
+ -8519680
""
"Debug"
"ANSI"
@@ -154,6 +159,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -165,6 +171,7 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ "%AUTO%"
"%AUTO%"
"%AUTO%"
"%AUTO%"
@@ -175,6 +182,9 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ 0
+ 1
+ ""
@@ -232,7 +242,7 @@
""
""
""
- "008040"
+ ""
""
0
1
@@ -247,7 +257,6 @@
1
0
0
- 0
0
0
0
@@ -363,6 +372,7 @@
"wbRadioBoxProxy"
"ID_RADIOBOX_PAGE_SIZE"
10001
+ ""
"wxRadioBox"
"wxRadioBox"
1
@@ -451,6 +461,7 @@
"wbStaticTextProxy"
"wxID_STATIC"
5105
+ ""
"wxStaticText"
"wxStaticText"
1
@@ -520,6 +531,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_USER_PAGE_SIZE_X"
10002
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -627,6 +639,7 @@
"wbStaticTextProxy"
"wxID_STATIC"
5105
+ ""
"wxStaticText"
"wxStaticText"
1
@@ -696,6 +709,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_USER_PAGE_SIZE_Y"
10003
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -912,6 +926,7 @@
"wbStaticTextProxy"
"wxID_STATIC"
5105
+ ""
"wxStaticText"
"wxStaticText"
1
@@ -924,7 +939,7 @@
""
""
""
- "800080"
+ ""
""
0
1
@@ -1007,6 +1022,7 @@
"wbStaticTextProxy"
"wxID_STATIC"
5105
+ ""
"wxStaticText"
"wxStaticText"
1
@@ -1019,7 +1035,7 @@
""
""
""
- "800080"
+ ""
""
0
1
@@ -1080,7 +1096,7 @@
"Revision:"
""
"RevisionSizer"
- "C80000"
+ ""
""
0
1
@@ -1111,6 +1127,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_REVISION"
10004
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -1192,6 +1209,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_REVISION"
10011
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -1259,7 +1277,7 @@
"Title:"
""
"TitleSizer"
- "C80000"
+ ""
""
0
1
@@ -1290,6 +1308,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_TITLE"
10005
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -1371,6 +1390,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_TITLE"
10012
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -1438,7 +1458,7 @@
"Company:"
""
"CompanySizer"
- "C80000"
+ ""
""
0
1
@@ -1469,6 +1489,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_COMPANY"
10006
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -1550,6 +1571,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_COMPANY"
10013
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -1617,7 +1639,7 @@
"Comment1:"
""
"Comment1Sizer"
- "C40064"
+ ""
""
0
1
@@ -1648,6 +1670,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_COMMENT1"
10007
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -1729,6 +1752,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_COMMENT1"
10014
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -1796,7 +1820,7 @@
"Comment2:"
""
"Comment2Sizer"
- "C40064"
+ ""
""
0
1
@@ -1827,6 +1851,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_COMMENT2"
10008
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -1908,6 +1933,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_COMMENT2"
10015
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -1975,7 +2001,7 @@
"Comment3:"
""
"Comment3Sizer"
- "C40064"
+ ""
""
0
1
@@ -2006,6 +2032,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_COMMENT3"
10009
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -2087,6 +2114,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_COMMENT3"
10016
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -2154,7 +2182,7 @@
"Comment4:"
""
"Comment4Sizer"
- "C40064"
+ ""
""
0
1
@@ -2185,6 +2213,7 @@
"wbTextCtrlProxy"
"ID_TEXTCTRL_COMMENT4"
10010
+ ""
"wxTextCtrl"
"wxTextCtrl"
1
@@ -2266,6 +2295,7 @@
"wbCheckBoxProxy"
"ID_CHECKBOX_COMMENT4"
10017
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -2332,6 +2362,7 @@
"wbStaticLineProxy"
"ID_STATICLINE"
10018
+ ""
"wxStaticLine"
"wxStaticLine"
1
@@ -2419,6 +2450,7 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||"
"wxID_OK"
5100
+ ""
"wxButton"
"wxButton"
1
@@ -2438,7 +2470,7 @@
""
""
""
- "C80000"
+ ""
""
0
1
@@ -2485,6 +2517,7 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||"
"wxID_CANCEL"
5101
+ ""
"wxButton"
"wxButton"
1
@@ -2504,7 +2537,7 @@
""
""
""
- "0000FF"
+ ""
""
0
1