Commit c95a1500 authored by jean-pierre charras's avatar jean-pierre charras

Pcb Calculator: fix wxWidgets 2.8 compatibility

parent c4428ae5
...@@ -143,11 +143,11 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow ...@@ -143,11 +143,11 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
wxStaticBoxSizer* sbSizerTW_Prms; wxStaticBoxSizer* sbSizerTW_Prms;
sbSizerTW_Prms = new wxStaticBoxSizer( new wxStaticBox( m_panelTrackWidth, wxID_ANY, _("Parameters:") ), wxVERTICAL ); sbSizerTW_Prms = new wxStaticBoxSizer( new wxStaticBox( m_panelTrackWidth, wxID_ANY, _("Parameters:") ), wxVERTICAL );
m_staticText89 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Valid max values:\n35A for external traces and 17.5A for internal.\n400mil widths.\nMaximum temperature rise of 100C."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText89 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Valid max values:\n35A for external traces and 17.5A for internal.\n400mil widths.\nMaximum temperature rise of 100°C."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText89->Wrap( -1 ); m_staticText89->Wrap( -1 );
m_staticText89->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); m_staticText89->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
sbSizerTW_Prms->Add( m_staticText89, 0, wxALL, 5 ); sbSizerTW_Prms->Add( m_staticText89, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizer10; wxFlexGridSizer* fgSizer10;
fgSizer10 = new wxFlexGridSizer( 4, 3, 0, 0 ); fgSizer10 = new wxFlexGridSizer( 4, 3, 0, 0 );
...@@ -160,7 +160,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow ...@@ -160,7 +160,7 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizer10->Add( m_staticTextCurrent, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); fgSizer10->Add( m_staticTextCurrent, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_TrackCurrentValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TrackCurrentValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer10->Add( m_TrackCurrentValue, 0, wxALL|wxEXPAND, 5 ); fgSizer10->Add( m_TrackCurrentValue, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_staticText62 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText62 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("A"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText62->Wrap( -1 ); m_staticText62->Wrap( -1 );
...@@ -171,9 +171,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow ...@@ -171,9 +171,9 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizer10->Add( m_staticText63, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); fgSizer10->Add( m_staticText63, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
m_TrackDeltaTValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TrackDeltaTValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer10->Add( m_TrackDeltaTValue, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); fgSizer10->Add( m_TrackDeltaTValue, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText64 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("C"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText64 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("deg C"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText64->Wrap( -1 ); m_staticText64->Wrap( -1 );
fgSizer10->Add( m_staticText64, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer10->Add( m_staticText64, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
...@@ -182,29 +182,29 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow ...@@ -182,29 +182,29 @@ PCB_CALCULATOR_FRAME_BASE::PCB_CALCULATOR_FRAME_BASE( wxWindow* parent, wxWindow
fgSizer10->Add( m_staticText65, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); fgSizer10->Add( m_staticText65, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_TrackThicknessValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TrackThicknessValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer10->Add( m_TrackThicknessValue, 0, wxALL|wxEXPAND, 5 ); fgSizer10->Add( m_TrackThicknessValue, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
wxArrayString m_TW_CuThickness_choiceUnitChoices; wxArrayString m_TW_CuThickness_choiceUnitChoices;
m_TW_CuThickness_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TW_CuThickness_choiceUnitChoices, 0 ); m_TW_CuThickness_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TW_CuThickness_choiceUnitChoices, 0 );
m_TW_CuThickness_choiceUnit->SetSelection( 0 ); m_TW_CuThickness_choiceUnit->SetSelection( 0 );
fgSizer10->Add( m_TW_CuThickness_choiceUnit, 0, wxALL|wxEXPAND, 5 ); fgSizer10->Add( m_TW_CuThickness_choiceUnit, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticText66 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Conductor length"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText66 = new wxStaticText( m_panelTrackWidth, wxID_ANY, _("Conductor length"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText66->Wrap( -1 ); m_staticText66->Wrap( -1 );
fgSizer10->Add( m_staticText66, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); fgSizer10->Add( m_staticText66, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 );
m_TrackLengthValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TrackLengthValue = new wxTextCtrl( m_panelTrackWidth, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer10->Add( m_TrackLengthValue, 0, wxALL|wxEXPAND, 5 ); fgSizer10->Add( m_TrackLengthValue, 0, wxEXPAND|wxALL, 5 );
wxArrayString m_TW_CuLength_choiceUnitChoices; wxArrayString m_TW_CuLength_choiceUnitChoices;
m_TW_CuLength_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TW_CuLength_choiceUnitChoices, 0 ); m_TW_CuLength_choiceUnit = new UNIT_SELECTOR_LEN( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TW_CuLength_choiceUnitChoices, 0 );
m_TW_CuLength_choiceUnit->SetSelection( 0 ); m_TW_CuLength_choiceUnit->SetSelection( 0 );
fgSizer10->Add( m_TW_CuLength_choiceUnit, 0, wxALL|wxEXPAND, 5 ); fgSizer10->Add( m_TW_CuLength_choiceUnit, 0, wxEXPAND|wxALL, 5 );
sbSizerTW_Prms->Add( fgSizer10, 1, wxEXPAND, 5 ); sbSizerTW_Prms->Add( fgSizer10, 0, wxEXPAND, 5 );
m_htmlWinFormulas = new wxHtmlWindow( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO|wxSIMPLE_BORDER ); m_htmlWinFormulas = new wxHtmlWindow( m_panelTrackWidth, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_NO_SELECTION|wxHW_SCROLLBAR_AUTO|wxSIMPLE_BORDER );
sbSizerTW_Prms->Add( m_htmlWinFormulas, 1, wxALL|wxEXPAND, 5 ); sbSizerTW_Prms->Add( m_htmlWinFormulas, 1, wxEXPAND|wxTOP, 5 );
bSizerTrackWidth->Add( sbSizerTW_Prms, 1, wxALL|wxEXPAND, 5 ); bSizerTrackWidth->Add( sbSizerTW_Prms, 1, wxALL|wxEXPAND, 5 );
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<property name="disconnect_mode">source_name</property> <property name="disconnect_mode">source_name</property>
<property name="disconnect_python_events">0</property> <property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property> <property name="embedded_files_path">res</property>
<property name="encoding">ANSI</property> <property name="encoding">UTF-8</property>
<property name="event_generation">connect</property> <property name="event_generation">connect</property>
<property name="file">pcb_calculator_frame_base</property> <property name="file">pcb_calculator_frame_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
...@@ -2303,7 +2303,7 @@ ...@@ -2303,7 +2303,7 @@
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -2391,7 +2391,7 @@ ...@@ -2391,7 +2391,7 @@
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property> <property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property> <property name="flexible_direction">wxBOTH</property>
...@@ -2493,7 +2493,7 @@ ...@@ -2493,7 +2493,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -2758,7 +2758,7 @@ ...@@ -2758,7 +2758,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -2876,7 +2876,7 @@ ...@@ -2876,7 +2876,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">°C</property> <property name="label">deg C</property>
<property name="layer"></property> <property name="layer"></property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
...@@ -3023,7 +3023,7 @@ ...@@ -3023,7 +3023,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -3114,7 +3114,7 @@ ...@@ -3114,7 +3114,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -3288,7 +3288,7 @@ ...@@ -3288,7 +3288,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -3379,7 +3379,7 @@ ...@@ -3379,7 +3379,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -3468,7 +3468,7 @@ ...@@ -3468,7 +3468,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxHtmlWindow" expanded="1"> <object class="wxHtmlWindow" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -188,15 +188,13 @@ void PCB_CALCULATOR_FRAME::TW_Init() ...@@ -188,15 +188,13 @@ void PCB_CALCULATOR_FRAME::TW_Init()
m_TrackLengthValue->SetValue( msg ); m_TrackLengthValue->SetValue( msg );
// Init formulas text // Init formulas text
m_htmlWinFormulas->AppendToPage( _( "<br>The formulas (from IPC 2221) are:</br>" ) ); m_htmlWinFormulas->AppendToPage( _( "<br>The formula (from IPC 2221) is:</br><br></br>" ) );
m_htmlWinFormulas->AppendToPage( _( m_htmlWinFormulas->AppendToPage( _( "<br><b>I = K * dT<sup>0.44</sup> * (W*H)<sup>0.725</sup></b></br>" ) );
"<br>Internal traces : <b>I = 0.024 * dT^0.44 * A^0.725</b></br>" ) ); m_htmlWinFormulas->AppendToPage( _( "<br>Internal traces : <b>K = 0.024</b></br>" ) );
m_htmlWinFormulas->AppendToPage( _( m_htmlWinFormulas->AppendToPage( _( "<br>External traces: <b>K = 0.048</b></br>" ) );
"<br>External traces: <b>I = 0.048 * dT^0.44 * A^0.725</b></br>" ) );
m_htmlWinFormulas->AppendToPage( _( "<br>where:</br>" ) ); m_htmlWinFormulas->AppendToPage( _( "<br>where:</br>" ) );
m_htmlWinFormulas->AppendToPage( _( "<br><b>I</b> = maximum current in Amps</br>" ) ); m_htmlWinFormulas->AppendToPage( _( "<br><b>I</b> = maximum current in Amps</br>" ) );
m_htmlWinFormulas->AppendToPage( _( m_htmlWinFormulas->AppendToPage( _( "<br><b>dT</b> = temperature rise above ambient in \0B0 C</br>" ) );
"<br><b>dT</b> = temperature rise above ambient in C</br>" ) ); m_htmlWinFormulas->AppendToPage( _( "<br><b>W,H</b> = Width and Thickness in mils</br>" ) );
m_htmlWinFormulas->AppendToPage( _( "<br><b>A</b> = cross-sectional area in mils</br>" ) );
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment