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.

63 lines
2.1 KiB

  1. /*
  2. * This program source code file is part of KICAD, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2019 CERN
  5. * Copyright (C) 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 WS_PROXY_UNDO_ITEM_H
  25. #define WS_PROXY_UNDO_ITEM_H
  26. #include <base_struct.h>
  27. #include <title_block.h>
  28. #include <page_info.h>
  29. class WS_PROXY_UNDO_ITEM : public EDA_ITEM
  30. {
  31. public:
  32. WS_PROXY_UNDO_ITEM( const EDA_DRAW_FRAME* aFrame );
  33. /*
  34. * Restores the saved worksheet layout to the global worksheet record, and the saved
  35. * page info and title blocks to the given frame. The WS_DRAW_ITEMs are rehydrated
  36. * and installed in aView if it is not null (ie: if we're in the PageLayout Editor).
  37. */
  38. void Restore( EDA_DRAW_FRAME* aFrame, KIGFX::VIEW* aView = nullptr );
  39. #if defined(DEBUG)
  40. /// @copydoc EDA_ITEM::Show()
  41. void Show( int x, std::ostream& st ) const override { }
  42. #endif
  43. wxString GetClass() const override
  44. {
  45. return wxT( "WS_PROXY_UNDO_ITEM" );
  46. }
  47. protected:
  48. TITLE_BLOCK m_titleBlock;
  49. PAGE_INFO m_pageInfo;
  50. wxString m_layoutSerialization;
  51. int m_selectedDataItem;
  52. int m_selectedDrawItem;
  53. };
  54. #endif /* WS_PROXY_UNDO_ITEM_H */