27#include <wx/clipbrd.h>
29#include <wx/hyperlink.h>
53 wxASSERT( aParent !=
nullptr );
58 SetEvtHandlerEnabled(
false );
60 const int c_iconSize = 16;
61 wxVector<wxBitmapBundle> images;
75 if(
m_info.GetAppIcon().IsOk() )
77 SetIcon(
m_info.GetAppIcon() );
102 #if defined( _WIN32 )
103 uint32_t gdi_count = GetGuiResources( GetCurrentProcess(), GR_GDIOBJECTS );
104 extraInfo.Printf(
_(
"GDI objects in use %u" ), gdi_count );
105 extraInfo.Prepend( wxT(
"\n" ) );
111 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
114 SetEvtHandlerEnabled(
true );
115 GetSizer()->SetSizeHints(
this );
132 m_info.GetDescription() );
149 m_info.GetTranslators() );
158 const CONTRIBUTORS& aContributors )
162 for(
size_t i=0; i < aContributors.GetCount(); ++i )
164 CONTRIBUTOR* contributor = &aContributors.Item( i );
169 if( category == wxEmptyString || contributor->
IsChecked() )
172 html += wxString::Format( wxS(
"<p><b><u>%s:</u></b><ul>" ),
176 for(
size_t j=0; j < aContributors.GetCount(); ++j )
178 CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
183 if( sub_contributor->
GetUrl().IsEmpty() )
185 html += wxString::Format( wxS(
"<li>%s</li>" ),
190 html += wxString::Format( wxS(
"<li><a href='%s'>%s</a></li>" ),
191 sub_contributor->
GetUrl(),
200 html += wxS(
"</ul></p>" );
208 IMAGES aIconIndex,
const wxString& html,
211 wxPanel* panel =
new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
214 wxBoxSizer* bSizer =
new wxBoxSizer( wxVERTICAL );
216 int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
224 wxFont font = GetFont();
225 htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
230 htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
235 bSizer->Add( htmlWindow, 1, wxEXPAND, 0 );
236 panel->SetSizer( bSizer );
238 aParent->AddPage( panel, aCaption,
false,
static_cast<int>( aIconIndex ) );
244 ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
252 if( !wxTheClipboard->Open() )
254 wxMessageBox(
_(
"Could not open clipboard to write version information." ),
255 _(
"Clipboard Error" ), wxOK | wxICON_EXCLAMATION,
this );
261 wxTheClipboard->SetData(
new wxTextDataObject( msg_version ) );
262 wxTheClipboard->Flush();
263 wxTheClipboard->Close();
271 mgr->RunAction(
"common.SuiteControl.donate" );
278 mgr->RunAction(
"common.SuiteControl.reportBug" );
286 int page = aEvent.GetSelection();
289 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.