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 ) );
114 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
117 SetEvtHandlerEnabled(
true );
118 GetSizer()->SetSizeHints(
this );
161 const CONTRIBUTORS& aContributors )
165 for(
size_t i=0; i < aContributors.GetCount(); ++i )
167 CONTRIBUTOR* contributor = &aContributors.Item( i );
172 if( category == wxEmptyString || contributor->
IsChecked() )
175 html += wxString::Format( wxS(
"<p><b><u>%s:</u></b><ul>" ),
179 for(
size_t j=0; j < aContributors.GetCount(); ++j )
181 CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
186 if( sub_contributor->
GetUrl().IsEmpty() )
188 html += wxString::Format( wxS(
"<li>%s</li>" ),
193 html += wxString::Format( wxS(
"<li><a href='%s'>%s</a></li>" ),
194 sub_contributor->
GetUrl(),
203 html += wxS(
"</ul></p>" );
211 IMAGES aIconIndex,
const wxString& html,
214 wxPanel* panel =
new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
217 wxBoxSizer* bSizer =
new wxBoxSizer( wxVERTICAL );
219 int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
227 wxFont font = GetFont();
228 htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
233 htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
238 bSizer->Add( htmlWindow, 1, wxEXPAND, 0 );
239 panel->SetSizer( bSizer );
241 aParent->AddPage( panel, aCaption,
false,
static_cast<int>( aIconIndex ) );
247 ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
255 if( !wxTheClipboard->Open() )
257 wxMessageBox(
_(
"Could not open clipboard to write version information." ),
258 _(
"Clipboard Error" ), wxOK | wxICON_EXCLAMATION,
this );
264 wxTheClipboard->SetData(
new wxTextDataObject( msg_version ) );
265 wxTheClipboard->Flush();
266 wxTheClipboard->Close();
274 mgr->RunAction(
"common.SuiteControl.donate" );
281 mgr->RunAction(
"common.SuiteControl.reportBug" );
289 int page = aEvent.GetSelection();
292 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()
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_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.