Fix some formatting issues in syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/4233
This commit is contained in:
parent
5c7ebb4f2b
commit
1cfcfc3ca7
|
@ -32,21 +32,17 @@
|
||||||
#include <gr_basic.h>
|
#include <gr_basic.h>
|
||||||
#include <macros.h>
|
#include <macros.h>
|
||||||
#include <trigo.h>
|
#include <trigo.h>
|
||||||
#include <sch_draw_panel.h>
|
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
#include <gr_text.h>
|
|
||||||
#include <sch_edit_frame.h>
|
#include <sch_edit_frame.h>
|
||||||
#include <plotter.h>
|
#include <plotter.h>
|
||||||
#include <msgpanel.h>
|
#include <msgpanel.h>
|
||||||
#include <gal/stroke_font.h>
|
#include <gal/stroke_font.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <macros.h>
|
|
||||||
#include <math/util.h> // for KiROUND
|
#include <math/util.h> // for KiROUND
|
||||||
#include <kiway.h>
|
#include <kiway.h>
|
||||||
#include <sch_text.h>
|
#include <sch_text.h>
|
||||||
#include <netlist_object.h>
|
#include <netlist_object.h>
|
||||||
#include <settings/color_settings.h>
|
#include <settings/color_settings.h>
|
||||||
#include <trace_helpers.h>
|
|
||||||
#include <sch_painter.h>
|
#include <sch_painter.h>
|
||||||
#include <default_values.h>
|
#include <default_values.h>
|
||||||
#include <wx/debug.h>
|
#include <wx/debug.h>
|
||||||
|
@ -1207,18 +1203,10 @@ wxPoint SCH_HIERLABEL::GetSchematicTextOffset( RENDER_SETTINGS* aSettings ) cons
|
||||||
switch( GetLabelSpinStyle() )
|
switch( GetLabelSpinStyle() )
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case LABEL_SPIN_STYLE::LEFT:
|
case LABEL_SPIN_STYLE::LEFT: text_offset.x = -dist; break; // Orientation horiz normale
|
||||||
text_offset.x = -dist;
|
case LABEL_SPIN_STYLE::UP: text_offset.y = -dist; break; // Orientation vert UP
|
||||||
break; // Orientation horiz normale
|
case LABEL_SPIN_STYLE::RIGHT: text_offset.x = dist; break; // Orientation horiz inverse
|
||||||
case LABEL_SPIN_STYLE::UP:
|
case LABEL_SPIN_STYLE::BOTTOM: text_offset.y = dist; break; // Orientation vert BOTTOM
|
||||||
text_offset.y = -dist;
|
|
||||||
break; // Orientation vert UP
|
|
||||||
case LABEL_SPIN_STYLE::RIGHT:
|
|
||||||
text_offset.x = dist;
|
|
||||||
break; // Orientation horiz inverse
|
|
||||||
case LABEL_SPIN_STYLE::BOTTOM:
|
|
||||||
text_offset.y = dist;
|
|
||||||
break; // Orientation vert BOTTOM
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return text_offset;
|
return text_offset;
|
||||||
|
@ -1247,59 +1235,61 @@ void SCH_TEXT::ShowSyntaxHelp( wxWindow* aParentWindow )
|
||||||
" <th>Result</th>"
|
" <th>Result</th>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>^{superscript}</td>"
|
" <td> <br><samp>^{superscript}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br><sup>superscript</sup> </td>"
|
" <td> <br><samp><sup>superscript</sup> </samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>Driver Board^{Rev A}</td>"
|
" <td> <br><samp>Driver Board^{Rev A}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>Driver Board<sup>Rev A</sup></td>"
|
" <td> <br><samp>Driver Board<sup>Rev A</sup></samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>_{subscript}</td>"
|
" <td> <br><samp>_{subscript}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br><sub>subscript</sub> </td>"
|
" <td> <br><samp><sub>subscript</sub> </samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>D_{0} - D_{15}</td>"
|
" <td> <br><samp>D_{0} - D_{15}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>D<sub>0</sub> - D<sub>31</sub></td>"
|
" <td> <br><samp>D<sub>0</sub> - D<sub>31</sub></samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td></td></tr>"
|
" <tr><td></td></tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td>"
|
" <td>"
|
||||||
" <br>~overbar<br>"
|
" <br><samp>~overbar</samp><br>"
|
||||||
" <br>~CLK"
|
" <br><samp>~CLK</samp>"
|
||||||
" </td>"
|
" </td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td>"
|
" <td>"
|
||||||
" <u> </u><br>overbar<br>"
|
" <samp><u> </u></samp><br>"
|
||||||
" <u> </u><br>CLK"
|
" <samp>overbar</samp><br>"
|
||||||
|
" <samp><u> </u></samp><br>"
|
||||||
|
" <samp>CLK</samp>"
|
||||||
" </td>"
|
" </td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>${variable}</td>"
|
" <td> <br><samp>${variable}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br><i>variable_value</i></td>"
|
" <td> <br><samp><i>variable_value</i></samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>${REVISION}</td>"
|
" <td> <br><samp>${REVISION}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>2020.1</td>"
|
" <td> <br><samp>2020.1</samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>${refdes:field}</td>"
|
" <td> <br><samp>${refdes:field}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br><i>field_value</i> of symbol <i>refdes</i></td>"
|
" <td> <br><samp><i>field_value</i> of symbol <i>refdes</i></samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>${R3:VALUE}</td>"
|
" <td> <br><samp>${R3:VALUE}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>150K</td>"
|
" <td> <br><samp>150K</samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
|
@ -1309,53 +1299,59 @@ void SCH_TEXT::ShowSyntaxHelp( wxWindow* aParentWindow )
|
||||||
" <th>Resultant Nets</th>"
|
" <th>Resultant Nets</th>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>prefix[m..n]</td>"
|
" <td> <br><samp>prefix[m..n]</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>prefixm to prefixn</td>"
|
" <td> <br><samp>prefixm to prefixn</samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>D[0..7]</td>"
|
" <td> <br><samp>D[0..7]</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>D0, D1, D2, D3, D4, D5, D6, D7</td>"
|
" <td> <br><samp>D0, D1, D2, D3, D4, D5, D6, D7</samp></td>"
|
||||||
|
" </tr>"
|
||||||
|
" <tr><td><br></td></tr>"
|
||||||
|
" <tr><samp>"
|
||||||
|
" <td> <br><samp>{net1 net2 ...}</samp></td>"
|
||||||
|
" <td></td>"
|
||||||
|
" <td> <br><samp>net1, net2, ...</samp></td>"
|
||||||
|
" </tr>"
|
||||||
|
" <tr>"
|
||||||
|
" <td> <br><samp>{SCL SDA}</samp></td>"
|
||||||
|
" <td></td>"
|
||||||
|
" <td> <br><samp>SCL, SDA</samp></td>"
|
||||||
|
" </tr></samp>"
|
||||||
|
" <tr><td><br></td></tr>"
|
||||||
|
" <tr>"
|
||||||
|
" <td> <br><samp>prefix{net1 net2 ...}</samp></td>"
|
||||||
|
" <td></td>"
|
||||||
|
" <td> <br><samp>prefix.net1, prefix.net2, ...</samp></td>"
|
||||||
|
" </tr>"
|
||||||
|
" <tr>"
|
||||||
|
" <td> <br><samp>USB1{DP DM}</samp></td>"
|
||||||
|
" <td></td>"
|
||||||
|
" <td> <br><samp>USB1.DP, USB1.DM</samp></td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr><td><br></td></tr>"
|
" <tr><td><br></td></tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>{net1 net2 ...}</td>"
|
" <td> <br><samp>MEM{D[1..2] LATCH}</samp></td>"
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td> <br>net1, net2, ...</td>"
|
" <td> <br>"
|
||||||
|
" <samp>MEM.D1, MEM.D2, MEM.LATCH</samp>"
|
||||||
|
" </td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
" <tr>"
|
" <tr>"
|
||||||
" <td> <br>{SCL SDA}</td>"
|
" <td> <br><samp>MEM{D_{[1..2]} ~LATCH}</samp></td>"
|
||||||
" <td></td>"
|
|
||||||
" <td> <br>SCL, SDA</td>"
|
|
||||||
" </tr>"
|
|
||||||
" <tr><td><br></td></tr>"
|
|
||||||
" <tr>"
|
|
||||||
" <td> <br>prefix{net1 net2 ...}</td>"
|
|
||||||
" <td></td>"
|
|
||||||
" <td> <br>prefix.net1, prefix.net2, ...</td>"
|
|
||||||
" </tr>"
|
|
||||||
" <tr>"
|
|
||||||
" <td> <br>USB1{DP DM}</td>"
|
|
||||||
" <td></td>"
|
|
||||||
" <td> <br>USB1.DP, USB1.DM</td>"
|
|
||||||
" </tr>"
|
|
||||||
" <tr><td><br></td></tr>"
|
|
||||||
" <tr>"
|
|
||||||
" <td> <br>MEM{D_{[1..2]} ~LATCH}</td>"
|
|
||||||
" <td></td>"
|
" <td></td>"
|
||||||
" <td>"
|
" <td>"
|
||||||
" "
|
" <samp> "
|
||||||
" "
|
" "
|
||||||
" "
|
" <u> </u></samp><br>"
|
||||||
" <u> </u><br>"
|
" <samp>MEM.D<sub>1</sub>, MEM.D<sub>2</sub>, MEM.LATCH</samp>"
|
||||||
" MEM.D<sub>1</sub>, MEM.D<sub>2</sub>, MEM.LATCH"
|
|
||||||
" </td>"
|
" </td>"
|
||||||
" </tr>"
|
" </tr>"
|
||||||
"</table>" );
|
"</table>" );
|
||||||
|
|
||||||
HTML_MESSAGE_BOX dlg( aParentWindow, _( "Syntax Help" ) );
|
HTML_MESSAGE_BOX dlg( aParentWindow, _( "Syntax Help" ) );
|
||||||
dlg.SetDialogSizeInDU( 240, 280 );
|
dlg.SetDialogSizeInDU( 280, 280 );
|
||||||
|
|
||||||
dlg.AddHTML_Text( msg );
|
dlg.AddHTML_Text( msg );
|
||||||
dlg.ShowModal();
|
dlg.ShowModal();
|
||||||
|
|
Loading…
Reference in New Issue