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.

60 lines
1.8 KiB

  1. /**
  2. * @file dialog_image_editor.h
  3. */
  4. /*
  5. * This program source code file is part of KICAD, a free EDA CAD application.
  6. *
  7. * Copyright (C) 2018 jean-pierre.charras
  8. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License
  12. * as published by the Free Software Foundation; either version 2
  13. * of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, you may find one here:
  22. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  23. * or you may search the http://www.gnu.org website for the version 2 license,
  24. * or you may write to the Free Software Foundation, Inc.,
  25. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  26. */
  27. #ifndef _DIALOG_IMAGE_EDITOR_H_
  28. #define _DIALOG_IMAGE_EDITOR_H_
  29. #include <dialog_image_editor_base.h>
  30. class DIALOG_IMAGE_EDITOR : public DIALOG_IMAGE_EDITOR_BASE
  31. {
  32. private:
  33. BITMAP_BASE* m_workingImage; // The copy of BITMAP_BASE to be edited
  34. public:
  35. DIALOG_IMAGE_EDITOR( wxWindow* aParent, BITMAP_BASE* aItem );
  36. ~DIALOG_IMAGE_EDITOR(){ delete m_workingImage; }
  37. public:
  38. /**
  39. * Copy edited image to \a aItem.
  40. */
  41. void TransferToImage( BITMAP_BASE* aItem );
  42. private:
  43. void OnGreyScaleConvert( wxCommandEvent& event ) override;
  44. void OnRedrawPanel( wxPaintEvent& event ) override;
  45. bool TransferDataFromWindow() override;
  46. bool CheckValues();
  47. };
  48. #endif // _DIALOG_IMAGE_EDITOR_H_