31#include <wx/clipbrd.h>
33#include <wx/hyperlink.h>
57 wxASSERT( aParent !=
nullptr );
59 SetEvtHandlerEnabled(
false );
61 const int c_iconSize = 16;
62 wxVector<wxBitmapBundle> images;
76 if(
m_info.GetAppIcon().IsOk() )
78 SetIcon(
m_info.GetAppIcon() );
103 #if defined( _WIN32 )
104 uint32_t gdi_count = GetGuiResources( GetCurrentProcess(), GR_GDIOBJECTS );
105 extraInfo.Printf(
_(
"GDI objects in use %u" ), gdi_count );
106 extraInfo.Prepend( wxT(
"\n" ) );
112 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
115 SetEvtHandlerEnabled(
true );
116 GetSizer()->SetSizeHints(
this );
133 m_info.GetDescription() );
150 m_info.GetTranslators() );
159 const CONTRIBUTORS& aContributors )
163 for(
size_t i=0; i < aContributors.GetCount(); ++i )
165 CONTRIBUTOR* contributor = &aContributors.Item( i );
170 if( category == wxEmptyString || contributor->
IsChecked() )
173 html += wxString::Format( wxS(
"<p><b><u>%s:</u></b><ul>" ),
177 for(
size_t j=0; j < aContributors.GetCount(); ++j )
179 CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
184 if( sub_contributor->
GetUrl().IsEmpty() )
186 html += wxString::Format( wxS(
"<li>%s</li>" ),
191 html += wxString::Format( wxS(
"<li><a href='%s'>%s</a></li>" ),
192 sub_contributor->
GetUrl(),
201 html += wxS(
"</ul></p>" );
209 IMAGES aIconIndex,
const wxString& html,
212 wxPanel* panel =
new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
215 wxBoxSizer* bSizer =
new wxBoxSizer( wxVERTICAL );
217 int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
225 wxFont font = GetFont();
226 htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
231 htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
236 bSizer->Add( htmlWindow, 1, wxEXPAND, 0 );
237 panel->SetSizer( bSizer );
239 aParent->AddPage( panel, aCaption,
false,
static_cast<int>( aIconIndex ) );
245 ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
253 if( !wxTheClipboard->Open() )
255 wxMessageBox(
_(
"Could not open clipboard to write version information." ),
256 _(
"Clipboard Error" ), wxOK | wxICON_EXCLAMATION,
this );
262 wxTheClipboard->SetData(
new wxTextDataObject( msg_version ) );
263 wxTheClipboard->Flush();
264 wxTheClipboard->Close();
272 mgr->RunAction(
"common.SuiteControl.donate" );
279 mgr->RunAction(
"common.SuiteControl.reportBug" );
287 int page = aEvent.GetSelection();
290 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
const wxString & GetAboutTitle() const
Add dark theme support to wxHtmlWindow.
bool SetPage(const wxString &aSource) override
Base window classes and related definitions.