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.

89 lines
2.7 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 The 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 SCH_INSPECTION_TOOL_H
  25. #define SCH_INSPECTION_TOOL_H
  26. #include <tools/sch_tool_base.h>
  27. #include <dialogs/dialog_book_reporter.h>
  28. #include <sch_base_frame.h>
  29. class SCH_SELECTION_TOOL;
  30. class SCH_BASE_FRAME;
  31. class DIALOG_ERC;
  32. class SYMBOL_DIFF_WIDGET;
  33. class SCH_INSPECTION_TOOL : public wxEvtHandler, public SCH_TOOL_BASE<SCH_BASE_FRAME>
  34. {
  35. public:
  36. SCH_INSPECTION_TOOL();
  37. ~SCH_INSPECTION_TOOL() {}
  38. /// @copydoc TOOL_INTERACTIVE::Init()
  39. bool Init() override;
  40. void Reset( RESET_REASON aReason ) override;
  41. int RunERC( const TOOL_EVENT& aEvent );
  42. void ShowERCDialog();
  43. int PrevMarker( const TOOL_EVENT& aEvent );
  44. int NextMarker( const TOOL_EVENT& aEvent );
  45. /// Called when clicking on a item:
  46. int CrossProbe( const TOOL_EVENT& aEvent );
  47. void CrossProbe( const SCH_MARKER* aMarker );
  48. wxString InspectERCErrorMenuText( const std::shared_ptr<RC_ITEM>& aERCItem );
  49. void InspectERCError( const std::shared_ptr<RC_ITEM>& aERCItem );
  50. int ExcludeMarker( const TOOL_EVENT& aEvent );
  51. int ShowBusSyntaxHelp( const TOOL_EVENT& aEvent );
  52. int CheckSymbol( const TOOL_EVENT& aEvent );
  53. int DiffSymbol( const TOOL_EVENT& aEvent );
  54. void DiffSymbol( SCH_SYMBOL* aSymbol );
  55. int RunSimulation( const TOOL_EVENT& aEvent );
  56. int ShowDatasheet( const TOOL_EVENT& aEvent );
  57. /// Display the selected item info (when clicking on a item)
  58. int UpdateMessagePanel( const TOOL_EVENT& aEvent );
  59. private:
  60. SYMBOL_DIFF_WIDGET* constructDiffPanel( wxPanel* aParentPanel );
  61. ///< @copydoc TOOL_INTERACTIVE::setTransitions();
  62. void setTransitions() override;
  63. private:
  64. HTML_MESSAGE_BOX* m_busSyntaxHelp;
  65. };
  66. #endif /* SCH_INSPECTION_TOOL_H */