28#include <wx/clipbrd.h>
30#include <wx/hyperlink.h>
54 wxASSERT( aParent !=
nullptr );
56 SetEvtHandlerEnabled(
false );
60 wxVector<wxBitmapBundle> images;
75 m_images =
new wxImageList( 24, 24,
false, 9 );
100 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_kicad_nightly ) );
102 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_kicad ) );
115 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
118 SetEvtHandlerEnabled(
true );
119 GetSizer()->SetSizeHints(
this );
162 const CONTRIBUTORS& aContributors )
166 for(
size_t i=0; i < aContributors.GetCount(); ++i )
168 CONTRIBUTOR* contributor = &aContributors.Item( i );
173 if( category == wxEmptyString || contributor->
IsChecked() )
176 html += wxString::Format( wxS(
"<p><b><u>%s:</u></b><ul>" ),
180 for(
size_t j=0; j < aContributors.GetCount(); ++j )
182 CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
187 if( sub_contributor->
GetUrl().IsEmpty() )
189 html += wxString::Format( wxS(
"<li>%s</li>" ),
194 html += wxString::Format( wxS(
"<li><a href='%s'>%s</a></li>" ),
195 sub_contributor->
GetUrl(),
204 html += wxS(
"</ul></p>" );
212 IMAGES aIconIndex,
const wxString& html,
215 wxPanel* panel =
new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
218 wxBoxSizer* bSizer =
new wxBoxSizer( wxVERTICAL );
220 int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
228 wxFont font = GetFont();
229 htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
234 htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
239 bSizer->Add( htmlWindow, 1, wxEXPAND, 0 );
240 panel->SetSizer( bSizer );
242 aParent->AddPage( panel, aCaption,
false,
static_cast<int>( aIconIndex ) );
248 ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
256 if( !wxTheClipboard->Open() )
258 wxMessageBox(
_(
"Could not open clipboard to write version information." ),
259 _(
"Clipboard Error" ), wxOK | wxICON_EXCLAMATION,
this );
265 wxTheClipboard->SetData(
new wxTextDataObject( msg_version ) );
266 wxTheClipboard->Flush();
267 wxTheClipboard->Close();
275 mgr->RunAction(
"common.SuiteControl.donate" );
282 mgr->RunAction(
"common.SuiteControl.reportBug" );
290 int page = aEvent.GetSelection();
293 m_notebook->ChangeSelection(
static_cast<unsigned>( page ) );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxString GetVersionInfoData(const wxString &aTitle, bool aHtml, bool aBrief)
Create a version info string for bug reports and the about dialog.
bool IsNightlyVersion()
Check if the build is meant to be nightly.
An object of this class is meant to be used to store application specific information like who has co...
CONTRIBUTORS GetPackagers()
CONTRIBUTORS GetLibrarians()
wxString & GetLibVersion()
CONTRIBUTORS GetDevelopers()
CONTRIBUTORS GetDocWriters()
wxString & GetBuildVersion()
wxString & GetDescription()
CONTRIBUTORS GetTranslators()
CONTRIBUTORS GetArtists()
wxIcon & GetAppIcon()
Wrapper to manage memory allocation for bitmaps.
A contributor, a person which was involved in the development of the application or which has contrib...
void SetChecked(bool status)
wxStaticText * m_staticTextBuildVersion
wxStaticBitmap * m_bitmapApp
wxStaticText * m_staticTextCopyright
wxStaticText * m_staticTextLibVersion
wxButton * m_btCopyVersionInfo
wxStaticText * m_staticTextAppTitle
void OnNotebookPageChanged(wxNotebookEvent &aEvent) override
wxString m_untranslatedTitleName
void createNotebookPageByCategory(wxNotebook *aParent, const wxString &aCaption, IMAGES aIconIndex, const CONTRIBUTORS &aContributors)
DIALOG_ABOUT(EDA_BASE_FRAME *aParent, ABOUT_APP_INFO &aAppInfo)
void onCopyVersionInfo(wxCommandEvent &event) override
void onHtmlLinkClicked(wxHtmlLinkEvent &event)
void onReportBug(wxCommandEvent &event) override
void onDonateClick(wxCommandEvent &event) override
void createNotebookHtmlPage(wxNotebook *aParent, const wxString &aCaption, IMAGES aIconIndex, const wxString &aHtmlMessage, bool aSelection=false)
The base frame for deriving all KiCad main window classes.
const wxString & GetUntranslatedAboutTitle() const
const wxString & GetAboutTitle() const
Add dark theme support to wxHtmlWindow.
bool SetPage(const wxString &aSource) override
Base window classes and related definitions.