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.

78 lines
2.2 KiB

  1. /*
  2. * This program source code file is part of KICAD, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2013 CERN
  5. * @author Maciej Suminski <maciej.suminski@cern.ch>
  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. /**
  25. * @file ratsnest_viewitem.h
  26. * @brief Class that draws missing connections on a PCB.
  27. */
  28. #ifndef RATSNEST_VIEWITEM_H
  29. #define RATSNEST_VIEWITEM_H
  30. #include <memory>
  31. #include <base_struct.h>
  32. #include <math/vector2d.h>
  33. class GAL;
  34. class CONNECTIVITY_DATA;
  35. namespace KIGFX
  36. {
  37. class RATSNEST_VIEWITEM : public EDA_ITEM
  38. {
  39. public:
  40. RATSNEST_VIEWITEM( std::shared_ptr<CONNECTIVITY_DATA> aData );
  41. /// @copydoc VIEW_ITEM::ViewBBox()
  42. const BOX2I ViewBBox() const override;
  43. /// @copydoc VIEW_ITEM::ViewDraw()
  44. void ViewDraw( int aLayer, KIGFX::VIEW* aView ) const override;
  45. /// @copydoc VIEW_ITEM::ViewGetLayers()
  46. void ViewGetLayers( int aLayers[], int& aCount ) const override;
  47. #if defined(DEBUG)
  48. /// @copydoc EDA_ITEM::Show()
  49. void Show( int x, std::ostream& st ) const override
  50. {
  51. }
  52. #endif
  53. /** Get class name
  54. * @return string "RATSNEST_VIEWITEM"
  55. */
  56. virtual wxString GetClass() const override
  57. {
  58. return wxT( "RATSNEST_VIEWITEM" );
  59. }
  60. protected:
  61. ///> Object containing ratsnest data.
  62. std::shared_ptr<CONNECTIVITY_DATA> m_data;
  63. };
  64. } // namespace KIGFX
  65. #endif /* RATSNEST_VIEWITEM_H */