31#include <wx/clipbrd.h>
33#include <wx/hyperlink.h>
57 wxASSERT( aParent !=
nullptr );
59 SetEvtHandlerEnabled(
false );
63 wxVector<wxBitmapBundle> images;
78 m_images =
new wxImageList( 24, 24,
false, 9 );
103 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_kicad_nightly ) );
105 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_kicad ) );
120 #if defined( _WIN32 )
121 uint32_t gdi_count = GetGuiResources( GetCurrentProcess(), GR_GDIOBJECTS );
122 extraInfo.Printf(
_(
"GDI objects in use %u" ), gdi_count );
123 extraInfo.Prepend( wxT(
"\n" ) );
129 SetTitle( wxString::Format(
_(
"About %s" ),
m_titleName ) );
132 SetEvtHandlerEnabled(
true );
133 GetSizer()->SetSizeHints(
this );
176 const CONTRIBUTORS& aContributors )
180 for(
size_t i=0; i < aContributors.GetCount(); ++i )
182 CONTRIBUTOR* contributor = &aContributors.Item( i );
187 if( category == wxEmptyString || contributor->
IsChecked() )
190 html += wxString::Format( wxS(
"<p><b><u>%s:</u></b><ul>" ),
194 for(
size_t j=0; j < aContributors.GetCount(); ++j )
196 CONTRIBUTOR* sub_contributor = &aContributors.Item( j );
201 if( sub_contributor->
GetUrl().IsEmpty() )
203 html += wxString::Format( wxS(
"<li>%s</li>" ),
208 html += wxString::Format( wxS(
"<li><a href='%s'>%s</a></li>" ),
209 sub_contributor->
GetUrl(),
218 html += wxS(
"</ul></p>" );
226 IMAGES aIconIndex,
const wxString& html,
229 wxPanel* panel =
new wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
232 wxBoxSizer* bSizer =
new wxBoxSizer( wxVERTICAL );
234 int flags = aSelection ? wxHW_SCROLLBAR_AUTO : ( wxHW_SCROLLBAR_AUTO | wxHW_NO_SELECTION );
242 wxFont font = GetFont();
243 htmlWindow->SetStandardFonts( font.GetPointSize(), font.GetFaceName(), font.GetFaceName() );
248 htmlWindow->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED,
253 bSizer->Add( htmlWindow, 1, wxEXPAND, 0 );
254 panel->SetSizer( bSizer );
256 aParent->AddPage( panel, aCaption,
false,
static_cast<int>( aIconIndex ) );
262 ::wxLaunchDefaultBrowser( event.GetLinkInfo().GetHref() );
270 if( !wxTheClipboard->Open() )
272 wxMessageBox(
_(
"Could not open clipboard to write version information." ),
273 _(
"Clipboard Error" ), wxOK | wxICON_EXCLAMATION,
this );
279 wxTheClipboard->SetData(
new wxTextDataObject( msg_version ) );
280 wxTheClipboard->Flush();
281 wxTheClipboard->Close();
289 mgr->RunAction(
"common.SuiteControl.donate" );
296 mgr->RunAction(
"common.SuiteControl.reportBug" );
304 int page = aEvent.GetSelection();
307 m_notebook->ChangeSelection(
static_cast<unsigned>( page ) );
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
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.