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.

69 lines
2.1 KiB

  1. /**
  2. * @file properties_frame.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 _PROPERTIES_FRAME_H
  28. #define _PROPERTIES_FRAME_H
  29. #include <pl_editor_frame.h>
  30. #include <dialogs/properties_frame_base.h>
  31. class WORKSHEET_DATAITEM;
  32. /**
  33. * Class PROPERTIES_FRAME display properties of the current item.
  34. */
  35. class PROPERTIES_FRAME : public PANEL_PROPERTIES_BASE
  36. {
  37. PL_EDITOR_FRAME* m_parent;
  38. public:
  39. PROPERTIES_FRAME( PL_EDITOR_FRAME* aParent );
  40. ~PROPERTIES_FRAME();
  41. // Event functions
  42. void OnAcceptPrms( wxCommandEvent& event ) override;
  43. void OnSetDefaultValues( wxCommandEvent& event ) override;
  44. // Data transfert from general properties to widgets
  45. void CopyPrmsFromGeneralToPanel();
  46. // Data transfert from widgets to general properties
  47. bool CopyPrmsFromPanelToGeneral();
  48. // Data transfert from item to widgets in properties frame
  49. void CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem );
  50. // Data transfert from widgets in properties frame to item
  51. bool CopyPrmsFromPanelToItem( WORKSHEET_DATAITEM* aItem );
  52. wxSize GetMinSize() const override;
  53. };
  54. #endif /* _PROPERTIES_FRAME_H */