diff --git a/common/dialog_about/dialog_about.cpp b/common/dialog_about/dialog_about.cpp index acfb601f59..a9d3fcc9f9 100644 --- a/common/dialog_about/dialog_about.cpp +++ b/common/dialog_about/dialog_about.cpp @@ -392,34 +392,16 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString& wxBoxSizer* bSizer = new wxBoxSizer( wxVERTICAL ); - wxString htmlPage = wxEmptyString, htmlContent = html; - - // to have a unique look background color for HTML pages is set to the default as it is - // used for all the other widgets - wxString htmlColor = ( GetBackgroundColour() ).GetAsString( wxC2S_HTML_SYNTAX ); - wxString textColor = GetForegroundColour().GetAsString( wxC2S_HTML_SYNTAX ); - wxString linkColor = - wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT ).GetAsString( wxC2S_HTML_SYNTAX ); - - // beginning of HTML structure - htmlPage.Append( wxString::Format( wxT( "" ), - htmlColor, textColor, linkColor ) ); - - htmlPage.Append( htmlContent ); - - // end of HTML structure indicated by closing tags - htmlPage.Append( wxT( "" ) ); - int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION ); // the HTML page is going to be created with previously created HTML content - auto htmlWindow = new wxHtmlWindow( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags ); + auto htmlWindow = new HTML_WINDOW( panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, flags ); // HTML font set to font properties as they are used for widgets to have an unique look // under different platforms with HTML wxFont font = GetFont(); htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() ); - htmlWindow->SetPage( htmlPage ); + htmlWindow->SetPage( html ); // the HTML window shall not be used to open external links, thus this task is delegated // to users default browser diff --git a/common/dialogs/dialog_display_html_text_base.cpp b/common/dialogs/dialog_display_html_text_base.cpp index 99c793916b..cc5a6186da 100644 --- a/common/dialogs/dialog_display_html_text_base.cpp +++ b/common/dialogs/dialog_display_html_text_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -17,7 +17,7 @@ DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, bMainSizer = new wxBoxSizer( wxVERTICAL ); bMainSizer->SetMinSize( wxSize( 540,240 ) ); - m_htmlWindow = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); + m_htmlWindow = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); bMainSizer->Add( m_htmlWindow, 1, wxALL|wxEXPAND, 5 ); m_sdbSizer1 = new wxStdDialogButtonSizer(); diff --git a/common/dialogs/dialog_display_html_text_base.fbp b/common/dialogs/dialog_display_html_text_base.fbp index a444ec20f6..ad2d208353 100644 --- a/common/dialogs/dialog_display_html_text_base.fbp +++ b/common/dialogs/dialog_display_html_text_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_display_html_text_base 1000 none + 1 dialog_display_html_text_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h + 0 @@ -108,7 +111,7 @@ 1 wxHW_SCROLLBAR_AUTO - + HTML_WINDOW; html_window.h; 0 diff --git a/common/dialogs/dialog_display_html_text_base.h b/common/dialogs/dialog_display_html_text_base.h index bdcce47325..55a9d8ae50 100644 --- a/common/dialogs/dialog_display_html_text_base.h +++ b/common/dialogs/dialog_display_html_text_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +#include "html_window.h" #include "dialog_shim.h" #include #include @@ -32,17 +33,18 @@ class DIALOG_DISPLAY_HTML_TEXT_BASE : public DIALOG_SHIM private: protected: - wxHtmlWindow* m_htmlWindow; + HTML_WINDOW* m_htmlWindow; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); } public: DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_DISPLAY_HTML_TEXT_BASE(); }; diff --git a/common/dialogs/html_message_box.cpp b/common/dialogs/html_message_box.cpp index 9c21ab7f1c..e9b95c3e62 100644 --- a/common/dialogs/html_message_box.cpp +++ b/common/dialogs/html_message_box.cpp @@ -80,20 +80,7 @@ HTML_MESSAGE_BOX::~HTML_MESSAGE_BOX() void HTML_MESSAGE_BOX::reload() { - // Handle light/dark mode colors... - - wxTextCtrl dummy( m_host, wxID_ANY ); - wxColour foreground = dummy.GetForegroundColour(); - wxColour background = dummy.GetBackgroundColour(); - - m_htmlWindow->SetPage( wxString::Format( wxT( "" - " " - " %s" - " " - "" ), - background.GetAsString( wxC2S_HTML_SYNTAX ), - foreground.GetAsString( wxC2S_HTML_SYNTAX ), - m_source ) ); + m_htmlWindow->SetPage( m_source ); } diff --git a/common/dialogs/wx_html_report_box.cpp b/common/dialogs/wx_html_report_box.cpp index 2f9ba2d95b..e18b7599e2 100644 --- a/common/dialogs/wx_html_report_box.cpp +++ b/common/dialogs/wx_html_report_box.cpp @@ -27,9 +27,8 @@ WX_HTML_REPORT_BOX::WX_HTML_REPORT_BOX( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : - wxHtmlWindow( parent, id, pos, size, style ), - m_units( EDA_UNITS::MILLIMETRES ), - m_immediateMode( false ) + HTML_WINDOW( parent, id, pos, size, style ), + m_units( EDA_UNITS::MILLIMETRES ), m_immediateMode( false ) { Flush(); @@ -69,26 +68,7 @@ void WX_HTML_REPORT_BOX::Flush() for( const wxString& line : m_messages ) html += generateHtml( line ); - SetPage( addHeader( html ) ); -} - - -wxString WX_HTML_REPORT_BOX::addHeader( const wxString& aBody ) -{ - // Handle light/dark mode colors... - - wxTextCtrl dummy( GetParent(), wxID_ANY ); - wxColour foreground = dummy.GetForegroundColour(); - wxColour background = dummy.GetBackgroundColour(); - - return wxString::Format( wxT( "" - " " - " %s" - " " - "" ), - background.GetAsString( wxC2S_HTML_SYNTAX ), - foreground.GetAsString( wxC2S_HTML_SYNTAX ), - aBody ); + SetPage( html ); } diff --git a/common/dialogs/wx_html_report_box.h b/common/dialogs/wx_html_report_box.h index 9d17e99a22..e43aa74429 100644 --- a/common/dialogs/wx_html_report_box.h +++ b/common/dialogs/wx_html_report_box.h @@ -22,13 +22,13 @@ #include #include -#include +#include #include /** * A slimmed down version of #WX_HTML_REPORT_PANEL */ -class WX_HTML_REPORT_BOX : public wxHtmlWindow, public REPORTER +class WX_HTML_REPORT_BOX : public HTML_WINDOW, public REPORTER { public: WX_HTML_REPORT_BOX( wxWindow* parent, wxWindowID id = wxID_ANY, diff --git a/common/dialogs/wx_html_report_panel.cpp b/common/dialogs/wx_html_report_panel.cpp index 1b66b110b8..2857d20ce0 100644 --- a/common/dialogs/wx_html_report_panel.cpp +++ b/common/dialogs/wx_html_report_panel.cpp @@ -130,7 +130,7 @@ void WX_HTML_REPORT_PANEL::Flush( bool aSort ) for( const auto& line : m_reportTail ) html += generateHtml( line ); - m_htmlView->SetPage( addHeader( html ) ); + m_htmlView->SetPage( html ); scrollToBottom(); } @@ -157,25 +157,6 @@ void WX_HTML_REPORT_PANEL::updateBadges() } -wxString WX_HTML_REPORT_PANEL::addHeader( const wxString& aBody ) -{ - // Handle light/dark mode colors... - - wxTextCtrl dummy( GetParent(), wxID_ANY ); - wxColour foreground = dummy.GetForegroundColour(); - wxColour background = dummy.GetBackgroundColour(); - - return wxString::Format( wxT( "" - " " - " %s" - " " - "" ), - background.GetAsString( wxC2S_HTML_SYNTAX ), - foreground.GetAsString( wxC2S_HTML_SYNTAX ), - aBody ); -} - - int WX_HTML_REPORT_PANEL::Count( int severityMask ) { int count = 0; diff --git a/common/dialogs/wx_html_report_panel_base.cpp b/common/dialogs/wx_html_report_panel_base.cpp index e6952b9066..e65af93514 100644 --- a/common/dialogs/wx_html_report_panel_base.cpp +++ b/common/dialogs/wx_html_report_panel_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -21,7 +21,7 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow m_fgSizer->SetFlexibleDirection( wxBOTH ); m_fgSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_htmlView = new wxHtmlWindow( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); + m_htmlView = new HTML_WINDOW( m_box->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); m_fgSizer->Add( m_htmlView, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 2 ); wxBoxSizer* bSizerBottom; diff --git a/common/dialogs/wx_html_report_panel_base.fbp b/common/dialogs/wx_html_report_panel_base.fbp index 42d88a4d58..76cf8dfa29 100644 --- a/common/dialogs/wx_html_report_panel_base.fbp +++ b/common/dialogs/wx_html_report_panel_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ wx_html_report_panel_base 1000 none + 1 WX_HTML_REPORT_PANEL_BASE @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -46,6 +48,7 @@ -1,-1 + 0 wxTAB_TRAVERSAL @@ -123,7 +126,7 @@ 1 wxHW_SCROLLBAR_AUTO - + HTML_WINDOW; html_window.h; 0 @@ -694,6 +697,7 @@ + 0 diff --git a/common/dialogs/wx_html_report_panel_base.h b/common/dialogs/wx_html_report_panel_base.h index f18d6eba5b..237f7041b8 100644 --- a/common/dialogs/wx_html_report_panel_base.h +++ b/common/dialogs/wx_html_report_panel_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +#include "html_window.h" #include #include #include @@ -19,10 +20,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -40,7 +41,7 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel protected: wxStaticBoxSizer* m_box; wxFlexGridSizer* m_fgSizer; - wxHtmlWindow* m_htmlView; + HTML_WINDOW* m_htmlView; wxStaticText* m_staticTextShow; wxCheckBox* m_checkBoxShowAll; wxCheckBox* m_checkBoxShowErrors; @@ -51,7 +52,7 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel wxCheckBox* m_checkBoxShowInfos; wxButton* m_btnSaveReportToFile; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void onRightClick( wxMouseEvent& event ) { event.Skip(); } virtual void onCheckBoxShowAll( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckBoxShowErrors( wxCommandEvent& event ) { event.Skip(); } @@ -64,6 +65,7 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel public: WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + ~WX_HTML_REPORT_PANEL_BASE(); }; diff --git a/common/html_window.cpp b/common/html_window.cpp index aa7847dc3f..ad900e9e5c 100644 --- a/common/html_window.cpp +++ b/common/html_window.cpp @@ -27,8 +27,8 @@ HTML_WINDOW::HTML_WINDOW( wxWindow* aParent, wxWindowID aId, const wxPoint& aPos, - const wxSize& aSize, long aStyle, const wxString& aName ) - : wxHtmlWindow( aParent, aId, aPos, aSize, aStyle, aName ) + const wxSize& aSize, long aStyle, const wxString& aName ) : + wxHtmlWindow( aParent, aId, aPos, aSize, aStyle, aName ) { Bind( wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler( HTML_WINDOW::onThemeChanged ), this ); @@ -39,13 +39,25 @@ bool HTML_WINDOW::SetPage( const wxString& aSource ) { m_pageSource = aSource; - wxColour bg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ); - wxColour fg = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); + wxString fgColor = + wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ).GetAsString( wxC2S_HTML_SYNTAX ); + wxString bgColor = + wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ).GetAsString( wxC2S_HTML_SYNTAX ); + wxString linkColor = + wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT ).GetAsString( wxC2S_HTML_SYNTAX ); - return wxHtmlWindow::SetPage( "\n" - + aSource - + "\n" ); + wxString html = wxString::Format( wxT( "\n\n" ), + fgColor, bgColor, linkColor ); + html.Append( aSource ); + html.Append( wxT( "\n\n" ) ); + + return wxHtmlWindow::SetPage( html ); +} + + +bool HTML_WINDOW::AppendToPage( const wxString& aSource ) +{ + return SetPage( m_pageSource + aSource ); } diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 17ccc4917a..37b491b427 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -37,14 +36,12 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable, - wxObjectDataPtr& aAdapter, - WIDGETS aWidgets, wxHtmlWindow* aDetails ) - : wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxWANTS_CHARS | wxTAB_TRAVERSAL | wxNO_BORDER ), - m_lib_table( aLibTable ), - m_adapter( aAdapter ), - m_query_ctrl( nullptr ), - m_details_ctrl( nullptr ) + wxObjectDataPtr& aAdapter, WIDGETS aWidgets, + HTML_WINDOW* aDetails ) : + wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxWANTS_CHARS | wxTAB_TRAVERSAL | wxNO_BORDER ), + m_lib_table( aLibTable ), m_adapter( aAdapter ), m_query_ctrl( nullptr ), + m_details_ctrl( nullptr ) { wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL ); @@ -101,9 +98,9 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable, { wxPoint html_size = ConvertDialogToPixels( wxPoint( 80, 80 ) ); - m_details_ctrl = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, - wxSize( html_size.x, html_size.y ), - wxHW_SCROLLBAR_AUTO ); + m_details_ctrl = + new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, + wxSize( html_size.x, html_size.y ), wxHW_SCROLLBAR_AUTO ); sizer->Add( m_details_ctrl, 2, wxTOP | wxEXPAND, 5 ); } @@ -473,20 +470,10 @@ void LIB_TREE::onPreselect( wxCommandEvent& aEvent ) int unit = 0; LIB_ID id = GetSelectedLibId( &unit ); - wxString htmlColor = GetBackgroundColour().GetAsString( wxC2S_HTML_SYNTAX ); - wxString textColor = GetForegroundColour().GetAsString( wxC2S_HTML_SYNTAX ); - wxString linkColor = wxSystemSettings::GetColour( wxSYS_COLOUR_HOTLIGHT ) - .GetAsString( wxC2S_HTML_SYNTAX ); - - wxString html = wxString::Format( wxT( "" ), - htmlColor, textColor, linkColor ); - if( id.IsValid() ) - html.Append( m_adapter->GenerateInfo( id, unit ) ); - - html.Append( wxT( "" ) ); - - m_details_ctrl->SetPage( html ); + m_details_ctrl->SetPage( m_adapter->GenerateInfo( id, unit ) ); + else + m_details_ctrl->SetPage( wxEmptyString ); } aEvent.Skip(); diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 97a1c2b956..a98f64af98 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -13,6 +13,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/pcbnew ${CMAKE_SOURCE_DIR}/pcbnew/dialogs ${CMAKE_SOURCE_DIR}/common + ${CMAKE_SOURCE_DIR}/common/dialogs ${INC_AFTER} ) @@ -111,4 +112,4 @@ endif() if( KICAD_WIN32_INSTALL_PDBS ) # Get the PDBs to copy over for MSVC install(FILES $ DESTINATION ${KICAD_BIN}) -endif() \ No newline at end of file +endif() diff --git a/eeschema/dialogs/dialog_choose_symbol.cpp b/eeschema/dialogs/dialog_choose_symbol.cpp index 7bea064c5c..0d6046f1e7 100644 --- a/eeschema/dialogs/dialog_choose_symbol.cpp +++ b/eeschema/dialogs/dialog_choose_symbol.cpp @@ -104,8 +104,8 @@ DIALOG_CHOOSE_SYMBOL::DIALOG_CHOOSE_SYMBOL( SCH_BASE_FRAME* aParent, const wxStr wxBoxSizer* detailsSizer = new wxBoxSizer( wxVERTICAL ); detailsPanel->SetSizer( detailsSizer ); - m_details = new wxHtmlWindow( detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxHW_SCROLLBAR_AUTO ); + m_details = new HTML_WINDOW( detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxHW_SCROLLBAR_AUTO ); detailsSizer->Add( m_details, 1, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 5 ); detailsPanel->Layout(); detailsSizer->Fit( detailsPanel ); diff --git a/eeschema/dialogs/dialog_choose_symbol.h b/eeschema/dialogs/dialog_choose_symbol.h index 5dbec805cb..fbba5b84d8 100644 --- a/eeschema/dialogs/dialog_choose_symbol.h +++ b/eeschema/dialogs/dialog_choose_symbol.h @@ -27,13 +27,13 @@ #include "dialog_shim.h" #include #include +#include class wxCheckBox; class wxStaticBitmap; class wxTextCtrl; class wxStdDialogButtonSizer; class wxDataViewCtrl; -class wxHtmlWindow; class wxHtmlLinkEvent; class wxPanel; class wxChoice; @@ -214,7 +214,7 @@ protected: wxCheckBox* m_keepSymbol; wxCheckBox* m_useUnits; LIB_TREE* m_tree; - wxHtmlWindow* m_details; + HTML_WINDOW* m_details; SCH_BASE_FRAME* m_parent; int m_deMorganConvert; diff --git a/eeschema/dialogs/dialog_rescue_each_base.cpp b/eeschema/dialogs/dialog_rescue_each_base.cpp index 5604dcf425..90f22b0a79 100644 --- a/eeschema/dialogs/dialog_rescue_each_base.cpp +++ b/eeschema/dialogs/dialog_rescue_each_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version v3.8.0) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -19,7 +19,7 @@ DIALOG_RESCUE_EACH_BASE::DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID i wxBoxSizer* bSizer8; bSizer8 = new wxBoxSizer( wxVERTICAL ); - m_htmlPrompt = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); + m_htmlPrompt = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); m_htmlPrompt->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) ); m_htmlPrompt->SetMinSize( wxSize( -1,80 ) ); diff --git a/eeschema/dialogs/dialog_rescue_each_base.fbp b/eeschema/dialogs/dialog_rescue_each_base.fbp index cf996020f2..a79dd76fb3 100644 --- a/eeschema/dialogs/dialog_rescue_each_base.fbp +++ b/eeschema/dialogs/dialog_rescue_each_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_rescue_each_base 1000 none + 1 dialog_rescue_each_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Project Rescue Helper + 0 @@ -118,7 +121,7 @@ 1 wxHW_SCROLLBAR_AUTO - ; forward_declare + HTML_WINDOW; html_window.h; 0 @@ -608,6 +611,7 @@ + 0 diff --git a/eeschema/dialogs/dialog_rescue_each_base.h b/eeschema/dialogs/dialog_rescue_each_base.h index 1e392b1a56..f513e1721a 100644 --- a/eeschema/dialogs/dialog_rescue_each_base.h +++ b/eeschema/dialogs/dialog_rescue_each_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version v3.8.0) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +#include "html_window.h" #include "dialog_shim.h" #include #include @@ -21,10 +22,10 @@ #include #include #include +#include #include #include #include -#include #include /////////////////////////////////////////////////////////////////////////// @@ -38,7 +39,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM private: protected: - wxHtmlWindow* m_htmlPrompt; + HTML_WINDOW* m_htmlPrompt; wxStaticText* m_titleSymbols; wxDataViewListCtrl* m_ListOfConflicts; wxStaticText* m_titleInstances; @@ -54,7 +55,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM wxButton* m_stdButtonsOK; wxButton* m_stdButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnDialogResize( wxSizeEvent& event ) { event.Skip(); } virtual void OnConflictSelect( wxDataViewEvent& event ) { event.Skip(); } virtual void OnNeverShowClick( wxCommandEvent& event ) { event.Skip(); } @@ -64,6 +65,7 @@ class DIALOG_RESCUE_EACH_BASE : public DIALOG_SHIM public: DIALOG_RESCUE_EACH_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Project Rescue Helper"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_RESCUE_EACH_BASE(); }; diff --git a/eeschema/dialogs/dialog_symbol_remap_base.cpp b/eeschema/dialogs/dialog_symbol_remap_base.cpp index 9b6ab25fbb..1d7391112e 100644 --- a/eeschema/dialogs/dialog_symbol_remap_base.cpp +++ b/eeschema/dialogs/dialog_symbol_remap_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -14,49 +14,49 @@ DIALOG_SYMBOL_REMAP_BASE::DIALOG_SYMBOL_REMAP_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - + wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL ); - + wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxHORIZONTAL ); - - m_htmlCtrl = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); + + m_htmlCtrl = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO ); bSizer2->Add( m_htmlCtrl, 4, wxALL|wxEXPAND, 5 ); - + wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxVERTICAL ); - + m_buttonRemap = new wxButton( this, wxID_ANY, _("Remap Symbols"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_buttonRemap, 0, wxALL|wxEXPAND, 5 ); - + m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); - - + + bSizer2->Add( bSizer3, 1, wxEXPAND, 5 ); - - + + bSizer1->Add( bSizer2, 3, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - + wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxVERTICAL ); - + m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_messagePanel->SetMinSize( wxSize( -1,200 ) ); - + bSizer4->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 ); - - + + bSizer1->Add( bSizer4, 5, wxEXPAND, 5 ); - - + + this->SetSizer( bSizer1 ); this->Layout(); bSizer1->Fit( this ); - + this->Centre( wxBOTH ); - + // Connect Events m_buttonRemap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_REMAP_BASE::OnRemapSymbols ), NULL, this ); m_buttonRemap->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_REMAP_BASE::OnUpdateUIRemapButton ), NULL, this ); @@ -67,5 +67,5 @@ DIALOG_SYMBOL_REMAP_BASE::~DIALOG_SYMBOL_REMAP_BASE() // Disconnect Events m_buttonRemap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_REMAP_BASE::OnRemapSymbols ), NULL, this ); m_buttonRemap->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SYMBOL_REMAP_BASE::OnUpdateUIRemapButton ), NULL, this ); - + } diff --git a/eeschema/dialogs/dialog_symbol_remap_base.fbp b/eeschema/dialogs/dialog_symbol_remap_base.fbp index 7aef6750c6..5ae119eeb4 100644 --- a/eeschema/dialogs/dialog_symbol_remap_base.fbp +++ b/eeschema/dialogs/dialog_symbol_remap_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -14,82 +14,50 @@ dialog_symbol_remap_base 1000 none + + 1 DIALGO_SYMBOL_REMAP_BASE - + . - + 1 1 1 1 UI + 0 0 0 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + DIALOG_SYMBOL_REMAP_BASE - - + + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Remap Symbols - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 0 + + + - + bSizer1 wxVERTICAL none @@ -98,7 +66,7 @@ wxEXPAND|wxLEFT|wxRIGHT|wxTOP 3 - + bSizer2 wxHORIZONTAL none @@ -111,79 +79,53 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_htmlCtrl 1 - - + + protected 1 - + Resizable 1 - + wxHW_SCROLLBAR_AUTO - ; forward_declare + HTML_WINDOW; html_window.h; 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -191,7 +133,7 @@ wxEXPAND 1 - + bSizer3 wxVERTICAL none @@ -204,82 +146,69 @@ 1 1 1 - - - - - - - + + + + + 0 + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_ANY Remap Symbols - + + 0 + 0 - - + + 0 - + 1 m_buttonRemap 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRemapSymbols - - - - - - - - - - - - - - - - - - - - - - OnUpdateUIRemapButton @@ -292,83 +221,68 @@ 1 1 1 - - - - - - - + + + + + 0 + + + + 1 0 1 - + 1 + 0 0 + Dock 0 Left 1 - + 1 - + + 0 0 wxID_CANCEL Close - + + 0 + 0 - - + + 0 - + 1 m_buttonClose 1 - - + + protected 1 - + + + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -380,7 +294,7 @@ wxEXPAND 5 - + bSizer4 wxVERTICAL none @@ -393,75 +307,52 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 -1,200 1 m_messagePanel 1 - - + + protected 1 - + Resizable 1 - + WX_HTML_REPORT_PANEL; wx_html_report_panel.h 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - diff --git a/eeschema/dialogs/dialog_symbol_remap_base.h b/eeschema/dialogs/dialog_symbol_remap_base.h index 2d70a5a900..6ed801cdca 100644 --- a/eeschema/dialogs/dialog_symbol_remap_base.h +++ b/eeschema/dialogs/dialog_symbol_remap_base.h @@ -1,18 +1,18 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 22 2017) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __DIALOG_SYMBOL_REMAP_BASE_H__ -#define __DIALOG_SYMBOL_REMAP_BASE_H__ +#pragma once #include #include #include class WX_HTML_REPORT_PANEL; +#include "html_window.h" #include "dialog_shim.h" #include #include @@ -21,6 +21,9 @@ class WX_HTML_REPORT_PANEL; #include #include #include +#include +#include +#include #include #include #include @@ -34,23 +37,23 @@ class WX_HTML_REPORT_PANEL; class DIALOG_SYMBOL_REMAP_BASE : public DIALOG_SHIM { private: - + protected: - wxHtmlWindow* m_htmlCtrl; + HTML_WINDOW* m_htmlCtrl; wxButton* m_buttonRemap; wxButton* m_buttonClose; WX_HTML_REPORT_PANEL* m_messagePanel; - - // Virtual event handlers, overide them in your derived class + + // Virtual event handlers, override them in your derived class virtual void OnRemapSymbols( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUIRemapButton( wxUpdateUIEvent& event ) { event.Skip(); } - - + + public: - - DIALOG_SYMBOL_REMAP_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Remap Symbols"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_SYMBOL_REMAP_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Remap Symbols"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SYMBOL_REMAP_BASE(); - + }; -#endif //__DIALOG_SYMBOL_REMAP_BASE_H__ diff --git a/eeschema/generate_alias_info.h b/eeschema/generate_alias_info.h index 4f858c293f..ea92e34d39 100644 --- a/eeschema/generate_alias_info.h +++ b/eeschema/generate_alias_info.h @@ -28,7 +28,7 @@ class SYMBOL_LIB_TABLE; /** * Return an HTML page describing a #LIB_ID in a #SYMBOL_LIB_TABLE. This is suitable for inclusion - * in a wxHtmlWindow. + * in a HTML_WINDOW (wxHtmlWindow). */ wxString GenerateAliasInfo( SYMBOL_LIB_TABLE* aSymLibTable, LIB_ID const& aLibId, int aUnit ); diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index 8d51980fde..3a84457c3b 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -55,23 +55,7 @@ public: ~DIALOG_DISPLAY_HTML_TEXT() { } - void SetPage( const wxString& message ) - { - // Handle light/dark mode colors... - - wxTextCtrl dummy( GetParent(), wxID_ANY ); - wxColour foreground = dummy.GetForegroundColour(); - wxColour background = dummy.GetBackgroundColour(); - - m_htmlWindow->SetPage( wxString::Format( wxT( "" - " " - " %s" - " " - "" ), - background.GetAsString( wxC2S_HTML_SYNTAX ), - foreground.GetAsString( wxC2S_HTML_SYNTAX ), - message ) ); - } + void SetPage( const wxString& message ) { m_htmlWindow->SetPage( message ); } }; @@ -468,17 +452,11 @@ int EE_INSPECTION_TOOL::CheckSymbol( const TOOL_EVENT& aEvent ) } else { - wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ); - wxColour fgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ); - wxString outmsg = wxString::Format( "", - bgcolor.GetAsString( wxC2S_HTML_SYNTAX ), - fgcolor.GetAsString( wxC2S_HTML_SYNTAX ) ); + wxString outmsg; for( const wxString& single_msg : messages ) outmsg += single_msg; - outmsg += ""; - DIALOG_DISPLAY_HTML_TEXT error_display( m_frame, wxID_ANY, _( "Symbol Warnings" ), wxDefaultPosition, wxSize( 700, 350 ) ); diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index c54b5b5d25..a1ebe19a5f 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -10,6 +10,7 @@ include_directories( BEFORE ${INC_BEFORE} ) include_directories( dialogs ${CMAKE_SOURCE_DIR}/common + ${CMAKE_SOURCE_DIR}/common/dialogs ${CMAKE_SOURCE_DIR}/3d-viewer ${INC_AFTER} ) @@ -219,4 +220,4 @@ if( KICAD_WIN32_INSTALL_PDBS ) # Get the PDBs to copy over for MSVC install(FILES $ DESTINATION ${KICAD_BIN}) install(FILES $ DESTINATION ${KICAD_BIN}) -endif() \ No newline at end of file +endif() diff --git a/include/dialogs/dialog_display_html_text_base.h b/include/dialogs/dialog_display_html_text_base.h deleted file mode 100644 index bdcce47325..0000000000 --- a/include/dialogs/dialog_display_html_text_base.h +++ /dev/null @@ -1,49 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) -// http://www.wxformbuilder.org/ -// -// PLEASE DO *NOT* EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#pragma once - -#include -#include -#include -#include "dialog_shim.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_DISPLAY_HTML_TEXT_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_DISPLAY_HTML_TEXT_BASE : public DIALOG_SHIM -{ - private: - - protected: - wxHtmlWindow* m_htmlWindow; - wxStdDialogButtonSizer* m_sdbSizer1; - wxButton* m_sdbSizer1OK; - - // Virtual event handlers, overide them in your derived class - virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); } - - - public: - - DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_DISPLAY_HTML_TEXT_BASE(); - -}; - diff --git a/include/dialogs/html_message_box.h b/include/dialogs/html_message_box.h index 000fdcbc16..bb736bab1f 100644 --- a/include/dialogs/html_message_box.h +++ b/include/dialogs/html_message_box.h @@ -25,7 +25,7 @@ #ifndef HTML_MESSAGE_BOX_H #define HTML_MESSAGE_BOX_H -#include +#include class HTML_MESSAGE_BOX : public DIALOG_DISPLAY_HTML_TEXT_BASE diff --git a/include/html_window.h b/include/html_window.h index 250ee287b9..0f434c9f00 100644 --- a/include/html_window.h +++ b/include/html_window.h @@ -38,6 +38,7 @@ public: const wxString& aName="htmlWindow" ); bool SetPage( const wxString& aSource ) override; + bool AppendToPage( const wxString& aSource ); /* * Notify the HTML window the theme has changed. @@ -45,7 +46,7 @@ public: void ThemeChanged(); private: - void onThemeChanged( wxSysColourChangedEvent &aEvent ); + void onThemeChanged( wxSysColourChangedEvent& aEvent ); wxString m_pageSource; }; diff --git a/include/widgets/lib_tree.h b/include/widgets/lib_tree.h index 5911d43063..91e04cbb11 100644 --- a/include/widgets/lib_tree.h +++ b/include/widgets/lib_tree.h @@ -27,10 +27,10 @@ #include #include +#include class wxDataViewCtrl; class wxTextCtrl; -class wxHtmlWindow; class wxHtmlLinkEvent; class wxSearchCtrl; class wxTimer; @@ -55,12 +55,12 @@ public: * @param aLibTable table containing libraries and items to display * @param aAdapter a LIB_TREE_MODEL_ADAPTER instance to use * @param aWidgets selection of sub-widgets to include - * @param aDetails if not null, a custom wxHtmlWindow to hold symbol details. If null this + * @param aDetails if not null, a custom HTML_WINDOW to hold symbol details. If null this * will be created inside the LIB_TREE. */ LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable, - wxObjectDataPtr& aAdapter, - WIDGETS aWidgets = ALL, wxHtmlWindow *aDetails = nullptr ); + wxObjectDataPtr& aAdapter, WIDGETS aWidgets = ALL, + HTML_WINDOW* aDetails = nullptr ); ~LIB_TREE() override; @@ -178,7 +178,7 @@ protected: wxSearchCtrl* m_query_ctrl; wxDataViewCtrl* m_tree_ctrl; - wxHtmlWindow* m_details_ctrl; + HTML_WINDOW* m_details_ctrl; wxTimer* m_debounceTimer; LIB_ID m_last_libid; diff --git a/kicad/dialogs/dialog_template_selector.cpp b/kicad/dialogs/dialog_template_selector.cpp index 5d8487eff4..086fbeaba0 100644 --- a/kicad/dialogs/dialog_template_selector.cpp +++ b/kicad/dialogs/dialog_template_selector.cpp @@ -140,7 +140,7 @@ DIALOG_TEMPLATE_SELECTOR::DIALOG_TEMPLATE_SELECTOR( wxWindow* aParent ) : m_browseButton->SetBitmap( KiBitmap( BITMAPS::small_folder ) ); m_reloadButton->SetBitmap( KiBitmap( BITMAPS::small_refresh ) ); - m_htmlWin->SetPage( _( "

Template Selector

" ) ); + m_htmlWin->SetPage( _( "

Template Selector

" ) ); m_notebook->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_TEMPLATE_SELECTOR::onNotebookResize ), nullptr, this ); diff --git a/kicad/dialogs/dialog_template_selector_base.cpp b/kicad/dialogs/dialog_template_selector_base.cpp index f0b6de8732..29561e3049 100644 --- a/kicad/dialogs/dialog_template_selector_base.cpp +++ b/kicad/dialogs/dialog_template_selector_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,7 +22,7 @@ DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, bmainSizer->Add( m_notebook, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 3 ); - m_htmlWin = new wxHtmlWindow( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHW_SCROLLBAR_AUTO ); + m_htmlWin = new HTML_WINDOW( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxHW_SCROLLBAR_AUTO ); bmainSizer->Add( m_htmlWin, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bsizerTemplateSelector; diff --git a/kicad/dialogs/dialog_template_selector_base.fbp b/kicad/dialogs/dialog_template_selector_base.fbp index 0c24a11bb2..ee34c5a0a9 100644 --- a/kicad/dialogs/dialog_template_selector_base.fbp +++ b/kicad/dialogs/dialog_template_selector_base.fbp @@ -171,7 +171,7 @@ 1 -1,-1 wxHW_SCROLLBAR_AUTO - + HTML_WINDOW; html_window.h; 0 diff --git a/kicad/dialogs/dialog_template_selector_base.h b/kicad/dialogs/dialog_template_selector_base.h index d7d6ec6389..afdc396702 100644 --- a/kicad/dialogs/dialog_template_selector_base.h +++ b/kicad/dialogs/dialog_template_selector_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,6 +10,7 @@ #include #include #include +#include "html_window.h" #include "dialog_shim.h" #include #include @@ -44,7 +45,7 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM protected: wxNotebook* m_notebook; - wxHtmlWindow* m_htmlWin; + HTML_WINDOW* m_htmlWin; wxStaticText* m_staticTextTpath; wxTextCtrl* m_tcTemplatePath; wxBitmapButton* m_browseButton; diff --git a/pcbnew/dialogs/dialog_choose_footprint.cpp b/pcbnew/dialogs/dialog_choose_footprint.cpp index 867a4ccf83..dd3074a7d8 100644 --- a/pcbnew/dialogs/dialog_choose_footprint.cpp +++ b/pcbnew/dialogs/dialog_choose_footprint.cpp @@ -54,7 +54,7 @@ DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT( PCB_BASE_FRAME* aParent, m_external_browser_requested( false ) { auto sizer = new wxBoxSizer( wxVERTICAL ); - wxHtmlWindow* details = nullptr; + HTML_WINDOW* details = nullptr; m_vsplitter = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_LIVE_UPDATE ); @@ -69,8 +69,8 @@ DIALOG_CHOOSE_FOOTPRINT::DIALOG_CHOOSE_FOOTPRINT( PCB_BASE_FRAME* aParent, auto detailsSizer = new wxBoxSizer( wxVERTICAL ); detailsPanel->SetSizer( detailsSizer ); - details = new wxHtmlWindow( detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, - wxHW_SCROLLBAR_AUTO ); + details = new HTML_WINDOW( detailsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxHW_SCROLLBAR_AUTO ); detailsSizer->Add( details, 1, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, 5 ); detailsPanel->Layout(); detailsSizer->Fit( detailsPanel ); diff --git a/pcbnew/dialogs/dialog_choose_footprint.h b/pcbnew/dialogs/dialog_choose_footprint.h index e08d4f08d9..f8ed320c5e 100644 --- a/pcbnew/dialogs/dialog_choose_footprint.h +++ b/pcbnew/dialogs/dialog_choose_footprint.h @@ -33,7 +33,6 @@ class wxStaticBitmap; class wxTextCtrl; class wxStdDialogButtonSizer; class wxDataViewCtrl; -class wxHtmlWindow; class wxHtmlLinkEvent; class wxPanel; class wxChoice; diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp b/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp index a9523f229c..27d6c65cd7 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -39,9 +39,9 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, m_grid->SetColSize( 1, 240 ); m_grid->EnableDragColMove( false ); m_grid->EnableDragColSize( true ); - m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelValue( 0, _("Option") ); m_grid->SetColLabelValue( 1, _("Value") ); + m_grid->SetColLabelSize( 22 ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows @@ -87,7 +87,7 @@ DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, m_options_sizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_html = new wxHtmlWindow( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE|wxVSCROLL ); + m_html = new HTML_WINDOW( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE|wxVSCROLL ); m_html->SetMinSize( wxSize( 280,100 ) ); m_options_sizer->Add( m_html, 2, wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp b/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp index 2db04ef862..f98c8cbfac 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_fp_plugin_options_base 1000 none + 1 dialog_fp_plugin_options @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h + 0 @@ -192,6 +195,7 @@ + 0 @@ -275,6 +279,7 @@ + 0 @@ -429,6 +434,7 @@ + 0 @@ -549,7 +555,7 @@ 1 wxHW_SCROLLBAR_AUTO - + HTML_WINDOW; html_window.h; 0 diff --git a/pcbnew/dialogs/dialog_fp_plugin_options_base.h b/pcbnew/dialogs/dialog_fp_plugin_options_base.h index 50ff8752da..545852c5aa 100644 --- a/pcbnew/dialogs/dialog_fp_plugin_options_base.h +++ b/pcbnew/dialogs/dialog_fp_plugin_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -12,6 +12,7 @@ #include class WX_GRID; +#include "html_window.h" #include "dialog_shim.h" #include #include @@ -46,12 +47,12 @@ class DIALOG_FP_PLUGIN_OPTIONS_BASE : public DIALOG_SHIM wxBitmapButton* m_delete_button; wxListBox* m_listbox; wxButton* m_append_choice_button; - wxHtmlWindow* m_html; + HTML_WINDOW* m_html; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Cancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void onGridCellChange( wxGridEvent& event ) = 0; virtual void onSize( wxSizeEvent& event ) = 0; virtual void onUpdateUI( wxUpdateUIEvent& event ) = 0; @@ -65,6 +66,7 @@ class DIALOG_FP_PLUGIN_OPTIONS_BASE : public DIALOG_SHIM public: DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER ); + ~DIALOG_FP_PLUGIN_OPTIONS_BASE(); };