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.

65 lines
1.8 KiB

3 years ago
3 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2019 jp.charras at wanadoo.fr
  5. * Copyright (C) 2019, 2023 KiCad Developers, see AUTHORS.txt for contributors.
  6. *
  7. * This program is free software: you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation, either version 3 of the License, or (at your
  10. * option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License along
  18. * with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /**
  21. * @file design_inspector.h
  22. */
  23. #ifndef _DESIGN_INSPECTOR_H
  24. #define _DESIGN_INSPECTOR_H
  25. #include <vector>
  26. class DIALOG_INSPECTOR_BASE;
  27. class PL_EDITOR_FRAME;
  28. /**
  29. * DESIGN_INSPECTOR is the left window showing the list of items
  30. */
  31. class DIALOG_INSPECTOR : public DIALOG_INSPECTOR_BASE
  32. {
  33. public:
  34. DIALOG_INSPECTOR( PL_EDITOR_FRAME* aParent );
  35. ~DIALOG_INSPECTOR();
  36. void ReCreateDesignList();
  37. /**
  38. * @return the DS_DATA_ITEM item managed by the grid row
  39. */
  40. DS_DATA_ITEM* GetDrawingSheetDataItem( int aRow ) const;
  41. // Select the tree item corresponding to the DS_DATA_ITEM aItem
  42. void SelectRow( DS_DATA_ITEM* aItem );
  43. private:
  44. friend class PL_EDITOR_FRAME;
  45. wxGrid* GetGridList() const { return m_gridListItems; }
  46. void onCellClicked( wxGridEvent& event ) override;
  47. // The list of DS_DATA_ITEM found in drawing sheet
  48. std::vector<DS_DATA_ITEM*> m_itemsList;
  49. PL_EDITOR_FRAME* m_editorFrame;
  50. };
  51. #endif /* _DESIGN_INSPECTOR_H */