31#include <wx/clipbrd.h>
33#include <wx/hyperlink.h>
57 wxASSERT( aParent !=
nullptr );
62 SetEvtHandlerEnabled(
false );
64 const int c_iconSize = 16;
65 wxVector<wxBitmapBundle> images;
79 if(
m_info.GetAppIcon().IsOk() )
81 SetIcon(
m_info.GetAppIcon() );
106 #if defined( _WIN32 )
107 uint32_t gdi_count = GetGuiResources( GetCurrentProcess(), GR_GDIOBJECTS );
108 extraInfo.Printf(
_(
"GDI objects in use %u" ), gdi_count );
109 extraInfo.Prepend( wxT(
"\n" ) );
115 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
118 SetEvtHandlerEnabled(
true );
119 GetSizer()->SetSizeHints(
this );
136 m_info.GetDescription() );
153 m_info.GetTranslators() );
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 KiBitmapBundleDef(BITMAPS aBitmap, int aDefHeight)
Constructs and returns a bitmap bundle for the given icon ID, with the default bitmap size being aDef...
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...
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
DIALOG_ABOUT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("About"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(570, 500), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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
wxString GetAboutTitle() const
Add dark theme support to wxHtmlWindow.
bool SetPage(const wxString &aSource) override
Base window classes and related definitions.