Add syntax help to pin dialogs.

This commit is contained in:
Jeff Young 2020-05-09 21:27:06 +01:00
parent f3a5f5b6ca
commit cc1ebca242
8 changed files with 292 additions and 116 deletions

View File

@ -500,73 +500,5 @@ bool DIALOG_LABEL_EDITOR::TransferDataFromWindow()
void DIALOG_LABEL_EDITOR::OnFormattingHelp( wxHyperlinkEvent& aEvent )
{
wxString msg = _(
"<table>"
" <tr>"
" <th>Markup</th>"
" <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>"
" <th>Result</th>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>^{superscript}</td>"
" <td></td>"
" <td>&nbsp;<br><sup>superscript</sup></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>Driver Board^{Rev A}</td>"
" <td></td>"
" <td>&nbsp;<br>Driver Board<sup>Rev A</sup></td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>_{subscript}</td>"
" <td></td>"
" <td>&nbsp;<br><sub>subscript</sub></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>D_{0} - D_{15}</td>"
" <td></td>"
" <td>&nbsp;<br>D<sub>0</sub> - D<sub>31</sub></td>"
" </tr>"
" <tr><td></td></tr>"
" <tr>"
" <td>"
" &nbsp;<br>~overbar<br>"
" &nbsp;<br>~CLK"
" </td>"
" <td></td>"
" <td>"
" <u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u><br>overbar<br>"
" <u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u><br>CLK"
" </td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>${variable}</td>"
" <td></td>"
" <td>&nbsp;<br><i>variable_value</i></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>${REVISION}</td>"
" <td></td>"
" <td>&nbsp;<br>2020.1</td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>${refdes:field}</td>"
" <td></td>"
" <td>&nbsp;<br><i>field_value</i></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>${R3:VALUE}</td>"
" <td></td>"
" <td>&nbsp;<br>150K</td>"
" </tr>"
"</table>" );
HTML_MESSAGE_BOX dlg( GetParent(), _( "Syntax Help" ) );
dlg.SetDialogSizeInDU( 180, 280 );
dlg.AddHTML_Text( msg );
dlg.ShowModal();
SCH_TEXT::ShowSyntaxHelp( this );
}

View File

@ -112,3 +112,9 @@ void DIALOG_EDIT_SHEET_PIN::onOKButton( wxCommandEvent& event )
{
event.Skip();
}
void DIALOG_EDIT_SHEET_PIN::OnSyntaxHelp( wxHyperlinkEvent& aEvent )
{
SCH_TEXT::ShowSyntaxHelp( this );
}

View File

@ -48,6 +48,7 @@ public:
private:
void onOKButton( wxCommandEvent& event ) override;
void OnSyntaxHelp( wxHyperlinkEvent& event ) override;
};
#endif // DIALOG_EDIT_SHEET_PIN_H

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -17,57 +17,74 @@ DIALOG_EDIT_SHEET_PIN_BASE::DIALOG_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWind
m_mainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* m_nameSizer;
m_nameSizer = new wxBoxSizer( wxHORIZONTAL );
m_nameSizer = new wxBoxSizer( wxVERTICAL );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 4, 3, 0, 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 2, 2, 4, 0 );
fgSizer2->AddGrowableCol( 1 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textName->SetMinSize( wxSize( 160,-1 ) );
fgSizer1->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( m_textName, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 );
fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
m_hyperlink1 = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxT("http://www.wxformbuilder.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
fgSizer2->Add( m_hyperlink1, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 7 );
m_nameSizer->Add( fgSizer2, 0, wxEXPAND, 5 );
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_nameSizer->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 2, 3, 2, 0 );
fgSizer1->AddGrowableCol( 1 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_textSizeLabel->Wrap( -1 );
fgSizer1->Add( m_textSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer1->Add( m_textSizeLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textSizeCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
fgSizer1->Add( m_textSizeCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_textSizeUnits->Wrap( -1 );
fgSizer1->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
fgSizer1->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Connection type:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizer1->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxArrayString m_choiceConnectionTypeChoices;
m_choiceConnectionType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceConnectionTypeChoices, 0 );
m_choiceConnectionType->SetSelection( 0 );
fgSizer1->Add( m_choiceConnectionType, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
m_choiceConnectionType->SetMinSize( wxSize( 160,-1 ) );
fgSizer1->Add( m_choiceConnectionType, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 6 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
m_nameSizer->Add( fgSizer1, 1, wxEXPAND, 6 );
m_nameSizer->Add( fgSizer1, 0, wxEXPAND, 6 );
m_mainSizer->Add( m_nameSizer, 1, wxALL|wxEXPAND, 10 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_mainSizer->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_mainSizer->Add( m_staticline2, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
@ -86,12 +103,14 @@ DIALOG_EDIT_SHEET_PIN_BASE::DIALOG_EDIT_SHEET_PIN_BASE( wxWindow* parent, wxWind
this->Centre( wxBOTH );
// Connect Events
m_hyperlink1->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::OnSyntaxHelp ), NULL, this );
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onOKButton ), NULL, this );
}
DIALOG_EDIT_SHEET_PIN_BASE::~DIALOG_EDIT_SHEET_PIN_BASE()
{
// Disconnect Events
m_hyperlink1->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::OnSyntaxHelp ), NULL, this );
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_SHEET_PIN_BASE::onOKButton ), NULL, this );
}

View File

@ -14,7 +14,6 @@
<property name="file">dialog_edit_sheet_pin_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_edit_sheet_pin</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -67,27 +65,27 @@
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">m_nameSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property>
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgSizer1</property>
<property name="name">fgSizer2</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">4</property>
<property name="vgap">0</property>
<property name="rows">2</property>
<property name="vgap">4</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
@ -148,7 +146,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
@ -211,7 +209,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
@ -220,9 +218,149 @@
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">7</property>
<property name="flag">wxALIGN_RIGHT|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxHyperlinkCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="hover_color"></property>
<property name="id">wxID_ANY</property>
<property name="label">Syntax help</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_hyperlink1</property>
<property name="normal_color"></property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHL_DEFAULT_STYLE</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="url">http://www.wxformbuilder.org</property>
<property name="visited_color"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnHyperlink">OnSyntaxHelp</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline3</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
<property name="name">fgSizer1</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">2</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
@ -283,7 +421,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
@ -347,7 +485,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
@ -377,7 +515,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">units</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
@ -408,7 +546,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
@ -469,7 +607,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND</property>
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
@ -505,7 +643,7 @@
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="minimum_size">160,-1</property>
<property name="moveable">1</property>
<property name="name">m_choiceConnectionType</property>
<property name="pane_border">1</property>
@ -532,7 +670,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
@ -546,7 +684,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
@ -584,7 +722,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</property>
<property name="name">m_staticline2</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -595,7 +733,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; forward_declare</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -18,9 +18,10 @@
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/hyperlink.h>
#include <wx/sizer.h>
#include <wx/statline.h>
#include <wx/choice.h>
#include <wx/button.h>
#include <wx/dialog.h>
@ -37,17 +38,20 @@ class DIALOG_EDIT_SHEET_PIN_BASE : public DIALOG_SHIM
protected:
wxStaticText* m_staticText1;
wxTextCtrl* m_textName;
wxHyperlinkCtrl* m_hyperlink1;
wxStaticLine* m_staticline3;
wxStaticText* m_textSizeLabel;
wxTextCtrl* m_textSizeCtrl;
wxStaticText* m_textSizeUnits;
wxStaticText* m_staticText3;
wxChoice* m_choiceConnectionType;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline2;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnSyntaxHelp( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void onOKButton( wxCommandEvent& event ) { event.Skip(); }

View File

@ -50,7 +50,7 @@
#include <sch_painter.h>
#include <default_values.h>
#include <wx/debug.h>
#include <html_messagebox.h>
using KIGFX::SCH_RENDER_SETTINGS;
@ -1235,3 +1235,77 @@ BITMAP_DEF SCH_HIERLABEL::GetMenuImage() const
{
return add_hierarchical_label_xpm;
}
void SCH_TEXT::ShowSyntaxHelp( wxWindow* aParentWindow )
{
wxString msg = _(
"<table>"
" <tr>"
" <th>Markup</th>"
" <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>"
" <th>Result</th>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>^{superscript}</td>"
" <td></td>"
" <td>&nbsp;<br><sup>superscript</sup></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>Driver Board^{Rev A}</td>"
" <td></td>"
" <td>&nbsp;<br>Driver Board<sup>Rev A</sup></td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>_{subscript}</td>"
" <td></td>"
" <td>&nbsp;<br><sub>subscript</sub></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>D_{0} - D_{15}</td>"
" <td></td>"
" <td>&nbsp;<br>D<sub>0</sub> - D<sub>31</sub></td>"
" </tr>"
" <tr><td></td></tr>"
" <tr>"
" <td>"
" &nbsp;<br>~overbar<br>"
" &nbsp;<br>~CLK"
" </td>"
" <td></td>"
" <td>"
" <u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u><br>overbar<br>"
" <u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u><br>CLK"
" </td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>${variable}</td>"
" <td></td>"
" <td>&nbsp;<br><i>variable_value</i></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>${REVISION}</td>"
" <td></td>"
" <td>&nbsp;<br>2020.1</td>"
" </tr>"
" <tr><td><br></td></tr>"
" <tr>"
" <td>&nbsp;<br>${refdes:field}</td>"
" <td></td>"
" <td>&nbsp;<br><i>field_value</i></td>"
" </tr>"
" <tr>"
" <td>&nbsp;<br>${R3:VALUE}</td>"
" <td></td>"
" <td>&nbsp;<br>150K</td>"
" </tr>"
"</table>" );
HTML_MESSAGE_BOX dlg( aParentWindow, _( "Syntax Help" ) );
dlg.SetDialogSizeInDU( 180, 280 );
dlg.AddHTML_Text( msg );
dlg.ShowModal();
}

View File

@ -319,6 +319,8 @@ public:
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override;
#endif
static void ShowSyntaxHelp( wxWindow* aParentWindow );
};