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.

71 lines
2.1 KiB

  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2017 CERN
  5. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  6. * @author Maciej Suminski <maciej.suminski@cern.ch>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License
  10. * as published by the Free Software Foundation; either version 3
  11. * of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, you may find one here:
  20. * https://www.gnu.org/licenses/gpl-3.0.html
  21. * or you may search the http://www.gnu.org website for the version 3 license,
  22. * or you may write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  24. */
  25. #ifndef FOOTPRINT_TREE_PANE_H
  26. #define FOOTPRINT_TREE_PANE_H
  27. #include <wx/panel.h>
  28. #include <wx/dataview.h>
  29. #include <vector>
  30. class LIB_TREE;
  31. class FOOTPRINT_EDIT_FRAME;
  32. class wxBoxSizer;
  33. /**
  34. * Footprint Editor pane with footprint library tree.
  35. */
  36. class FOOTPRINT_TREE_PANE : public wxPanel
  37. {
  38. public:
  39. FOOTPRINT_TREE_PANE( FOOTPRINT_EDIT_FRAME* aParent );
  40. ~FOOTPRINT_TREE_PANE();
  41. LIB_TREE* GetLibTree() const
  42. {
  43. return m_tree;
  44. }
  45. /**
  46. * Focus the search widget if it exists
  47. */
  48. void FocusSearchFieldIfExists();
  49. protected:
  50. /**
  51. * Handle parent menu events to block preview updates while the menu is open.
  52. */
  53. void onMenuOpen( wxMenuEvent& aEvent );
  54. void onMenuClose( wxMenuEvent& aEvent );
  55. void onComponentSelected( wxCommandEvent& aEvent );
  56. void onUpdateUI( wxUpdateUIEvent& aEvent );
  57. FOOTPRINT_EDIT_FRAME* m_frame;
  58. LIB_TREE* m_tree; ///< component search tree widget
  59. };
  60. #endif /* FOOTPRINT_TREE_PANE_H */