Added CopyrightsDialog

This commit is contained in:
YuSanka 2019-05-16 16:55:10 +02:00
parent d13d3f39af
commit 803e748849
2 changed files with 209 additions and 2 deletions

View file

@ -23,11 +23,45 @@ private:
void onRepaint(wxEvent &event);
};
class CopyrightsDialog : public DPIDialog
{
public:
CopyrightsDialog();
~CopyrightsDialog() {}
struct Entry {
Entry(const std::string &lib_name, const std::string &copyright, const std::string &link) :
lib_name(lib_name), copyright(copyright), link(link) {}
std::string lib_name;
std::string copyright;
std::string link;
};
protected:
void on_dpi_changed(const wxRect &suggested_rect) override;
private:
wxHtmlWindow* m_html;
std::vector<Entry> m_entries;
void onLinkClicked(wxHtmlLinkEvent &event);
void onCloseDialog(wxEvent &);
void fill_entries();
wxString get_html_text();
};
class AboutDialog : public DPIDialog
{
ScalableBitmap m_logo_bitmap;
wxHtmlWindow* m_html;
wxStaticBitmap* m_logo;
int m_copy_rights_btn_id { wxID_ANY };
public:
AboutDialog();
@ -37,6 +71,7 @@ protected:
private:
void onLinkClicked(wxHtmlLinkEvent &event);
void onCloseDialog(wxEvent &);
void onCopyrightBtn(wxEvent &);
};
} // namespace GUI