1 #ifndef slic3r_GUI_AboutDialog_hpp_ 2 #define slic3r_GUI_AboutDialog_hpp_ 3 4 #include <wx/wx.h> 5 #include <wx/intl.h> 6 #include <wx/html/htmlwin.h> 7 8 #include "GUI_Utils.hpp" 9 #include "wxExtensions.hpp" 10 11 namespace Slic3r { 12 namespace GUI { 13 14 class AboutDialogLogo : public wxPanel 15 { 16 public: 17 AboutDialogLogo(wxWindow* parent); 18 19 private: 20 wxBitmap logo; 21 void onRepaint(wxEvent &event); 22 }; 23 24 25 26 class CopyrightsDialog : public DPIDialog 27 { 28 public: 29 CopyrightsDialog(); ~CopyrightsDialog()30 ~CopyrightsDialog() {} 31 32 struct Entry { EntrySlic3r::GUI::CopyrightsDialog::Entry33 Entry(const std::string &lib_name, const std::string ©right, const std::string &link) : 34 lib_name(lib_name), copyright(copyright), link(link) {} 35 36 std::string lib_name; 37 std::string copyright; 38 std::string link; 39 }; 40 41 protected: 42 void on_dpi_changed(const wxRect &suggested_rect) override; 43 44 private: 45 wxHtmlWindow* m_html; 46 std::vector<Entry> m_entries; 47 48 void onLinkClicked(wxHtmlLinkEvent &event); 49 void onCloseDialog(wxEvent &); 50 51 void fill_entries(); 52 wxString get_html_text(); 53 }; 54 55 56 57 class AboutDialog : public DPIDialog 58 { 59 ScalableBitmap m_logo_bitmap; 60 wxHtmlWindow* m_html; 61 wxStaticBitmap* m_logo; 62 int m_copy_rights_btn_id { wxID_ANY }; 63 int m_copy_version_btn_id { wxID_ANY }; 64 public: 65 AboutDialog(); 66 67 protected: 68 void on_dpi_changed(const wxRect &suggested_rect) override; 69 70 private: 71 void onLinkClicked(wxHtmlLinkEvent &event); 72 void onCloseDialog(wxEvent &); 73 void onCopyrightBtn(wxEvent &); 74 void onCopyToClipboard(wxEvent&); 75 }; 76 77 } // namespace GUI 78 } // namespace Slic3r 79 80 #endif 81