You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.5 KiB

6 years ago
6 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
  5. * Copyright (C) 2010-2019 KiCad Developers, see AUTHORS.TXT for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. #ifndef DIALOG_ABOUT_H
  25. #define DIALOG_ABOUT_H
  26. #include <wx/html/htmlwin.h>
  27. #include <wx/statbmp.h>
  28. #include <wx/stattext.h>
  29. #include <wx/hyperlink.h>
  30. #include "aboutinfo.h"
  31. #include "dialog_about_base.h"
  32. // Used for the notebook image list
  33. enum class IMAGES {
  34. INFORMATION,
  35. VERSION,
  36. DEVELOPERS,
  37. DOCWRITERS,
  38. LIBRARIANS,
  39. ARTISTS,
  40. TRANSLATORS,
  41. PACKAGERS,
  42. LICENSE
  43. };
  44. /**
  45. * About dialog to show application specific information.
  46. * Needs a <code>ABOUT_APP_INFO</code> object that contains the data to be displayed.
  47. */
  48. class DIALOG_ABOUT : public DIALOG_ABOUT_BASE
  49. {
  50. private:
  51. wxImageList* m_images;
  52. wxString m_titleName;
  53. ABOUT_APP_INFO& m_info;
  54. public:
  55. DIALOG_ABOUT( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aAppInfo );
  56. ~DIALOG_ABOUT();
  57. protected:
  58. void OnNotebookPageChanged( wxNotebookEvent& aEvent ) override;
  59. private:
  60. void onHtmlLinkClicked( wxHtmlLinkEvent& event );
  61. void onCopyVersionInfo( wxCommandEvent& event ) override;
  62. void onReportBug( wxCommandEvent& event ) override;
  63. void onDonateClick( wxCommandEvent& event ) override;
  64. // Notebook pages
  65. wxFlexGridSizer* createFlexGridSizer();
  66. void createNotebooks();
  67. void createNotebookPage( wxNotebook* aParent,
  68. const wxString& aCaption,
  69. IMAGES aIconIndex,
  70. const CONTRIBUTORS& aContributors );
  71. void createNotebookPageByCategory( wxNotebook* aParent,
  72. const wxString& aCaption,
  73. IMAGES aIconIndex,
  74. const CONTRIBUTORS& aContributors );
  75. void createNotebookHtmlPage( wxNotebook* aParent,
  76. const wxString& aCaption,
  77. IMAGES aIconIndex,
  78. const wxString& aHtmlMessage,
  79. bool aSelection = false );
  80. wxStaticText* wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference );
  81. wxStaticBitmap* createStaticBitmap( wxScrolledWindow* aParent, wxBitmap* icon );
  82. };
  83. #endif // DIALOG_ABOUT_H