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.

80 lines
2.4 KiB

  1. /**
  2. * @file class_pl_editor_screen.h
  3. */
  4. /*
  5. * This program source code file is part of KiCad, a free EDA CAD application.
  6. *
  7. * Copyright (C) 2013 CERN
  8. * @author Jean-Pierre Charras, jp.charras at wanadoo.fr
  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 CLASS_PL_EDITOR_SCREEN_H_
  28. #define CLASS_PL_EDITOR_SCREEN_H_
  29. #include <base_units.h>
  30. #include <class_base_screen.h>
  31. class WORKSHEET_DATAITEM;
  32. /* Handle info to display a board */
  33. class PL_EDITOR_SCREEN : public BASE_SCREEN
  34. {
  35. public:
  36. /**
  37. * Constructor
  38. * @param aPageSizeIU is the size of the initial paper page in internal units.
  39. */
  40. PL_EDITOR_SCREEN( const wxSize& aPageSizeIU );
  41. ~PL_EDITOR_SCREEN();
  42. virtual int MilsToIuScalar() override;
  43. /**
  44. * Function ClearUndoORRedoList
  45. * virtual pure in BASE_SCREEN, so it must be defined here
  46. */
  47. void ClearUndoORRedoList( UNDO_REDO_CONTAINER& aList, int aItemCount = -1 ) override;
  48. /**
  49. * Function GetCurItem
  50. * returns the currently selected WORKSHEET_DATAITEM, overriding
  51. * BASE_SCREEN::GetCurItem().
  52. * @return WORKSHEET_DATAITEM* - the one selected, or NULL.
  53. */
  54. WORKSHEET_DATAITEM* GetCurItem() const
  55. {
  56. return (WORKSHEET_DATAITEM*) BASE_SCREEN::GetCurItem();
  57. }
  58. /**
  59. * Function SetCurItem
  60. * sets the currently selected object, m_CurrentItem.
  61. * @param aItem Any object derived from WORKSHEET_DATAITEM
  62. */
  63. void SetCurItem( WORKSHEET_DATAITEM* aItem ) { BASE_SCREEN::SetCurItem( (EDA_ITEM*)aItem ); }
  64. };
  65. #endif // CLASS_PL_EDITOR_SCREEN_H_