| 
    KiCad PCB EDA Suite
    
   | 
 
#include <panel_footprint_chooser.h>
 Public Member Functions | |
| PANEL_FOOTPRINT_CHOOSER (PCB_BASE_FRAME *aFrame, wxTopLevelWindow *aParent, const wxArrayString &aFootprintHistoryList, std::function< bool(LIB_TREE_NODE &)> aFilter, std::function< void()> aAcceptHandler, std::function< void()> aEscapeHandler) | |
| Create dialog to choose component.   | |
| ~PANEL_FOOTPRINT_CHOOSER () | |
| void | FinishSetup () | 
| void | SetPreselect (const LIB_ID &aPreselect) | 
| LIB_ID | GetSelectedLibId () const | 
| To be called after this dialog returns from ShowModal().   | |
| int | GetItemCount () const | 
| wxWindow * | GetFocusTarget () const | 
| wxSizer * | GetFiltersSizer () const | 
| void | Regenerate () | 
| FOOTPRINT_PREVIEW_WIDGET * | GetViewerPanel () const | 
| wxSplitterWindow * | GetVerticalSpliter () const | 
| wxPanel * | GetDetailsPanel () const | 
Public Attributes | |
| wxPanel * | m_RightPanel | 
| wxBoxSizer * | m_RightPanelSizer | 
| const FOOTPRINT * | m_CurrFootprint | 
Protected Member Functions | |
| void | OnDetailsCharHook (wxKeyEvent &aEvt) | 
| void | onCloseTimer (wxTimerEvent &aEvent) | 
| void | onOpenLibsTimer (wxTimerEvent &aEvent) | 
| void | onMenuOpen (wxMenuEvent &aEvent) | 
| Handle parent frame menu events to block tree preview.   | |
| void | onMenuClose (wxMenuEvent &aEvent) | 
| void | onFootprintSelected (wxCommandEvent &aEvent) | 
| void | onFootprintChosen (wxCommandEvent &aEvent) | 
| Handle the selection of an item.   | |
Protected Attributes | |
| wxPanel * | m_detailsPanel | 
| wxTimer * | m_dbl_click_timer | 
| wxTimer * | m_open_libs_timer | 
| wxSplitterWindow * | m_hsplitter | 
| wxSplitterWindow * | m_vsplitter | 
| wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > | m_adapter | 
| FOOTPRINT_PREVIEW_WIDGET * | m_preview_ctrl | 
| LIB_TREE * | m_tree | 
| HTML_WINDOW * | m_details | 
| PCB_BASE_FRAME * | m_frame | 
| std::function< bool(LIB_TREE_NODE &)> | m_filter | 
| std::function< void()> | m_acceptHandler | 
| std::function< void()> | m_escapeHandler | 
Static Protected Attributes | |
| static constexpr int | DblClickDelay = 100 | 
Definition at line 42 of file panel_footprint_chooser.h.
| PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER | ( | PCB_BASE_FRAME * | aFrame, | 
| wxTopLevelWindow * | aParent, | ||
| const wxArrayString & | aFootprintHistoryList, | ||
| std::function< bool(LIB_TREE_NODE &)> | aFilter, | ||
| std::function< void()> | aAcceptHandler, | ||
| std::function< void()> | aEscapeHandler ) | 
Create dialog to choose component.
| aFrame | the parent frame (usually a PCB_EDIT_FRAME or FOOTPRINT_CHOOSER_FRAME) | 
| aParent | the parent window (usually a DIALOG_SHIM or FOOTPRINT_CHOOSER_FRAME) | 
| aAcceptHandler | a handler to be called on double-click of a footprint | 
| aEscapeHandler | a handler to be called on <ESC> | 
Definition at line 53 of file panel_footprint_chooser.cpp.
References _, FP_TREE_MODEL_ADAPTER::AddLibraries(), LIB_TREE::ALL_WIDGETS, FP_TREE_MODEL_ADAPTER::Create(), LIB_TREE_MODEL_ADAPTER::DoAddLibrary(), GFootprintList, m_acceptHandler, m_adapter, m_CurrFootprint, m_dbl_click_timer, m_details, m_detailsPanel, m_escapeHandler, m_filter, m_frame, m_hsplitter, LIB_TREE_NODE::m_IsRecentlyUsedGroup, m_open_libs_timer, m_preview_ctrl, m_RightPanel, m_RightPanelSizer, m_tree, m_vsplitter, move, onCloseTimer(), OnDetailsCharHook(), onFootprintChosen(), onFootprintSelected(), onMenuClose(), onMenuOpen(), onOpenLibsTimer(), PROJECT_PCB::PcbFootprintLibs(), PR_CAN_ABORT, KIWAY_HOLDER::Prj(), LIB_TREE_MODEL_ADAPTER::SetFilter(), and LIB_TREE_MODEL_ADAPTER::SetPreselectNode().
| PANEL_FOOTPRINT_CHOOSER::~PANEL_FOOTPRINT_CHOOSER | ( | ) | 
Definition at line 217 of file panel_footprint_chooser.cpp.
References GetAppSettings(), m_adapter, m_dbl_click_timer, m_details, m_frame, m_hsplitter, m_open_libs_timer, m_tree, m_vsplitter, onCloseTimer(), OnDetailsCharHook(), onFootprintChosen(), onFootprintSelected(), onMenuClose(), and onMenuOpen().
| void PANEL_FOOTPRINT_CHOOSER::FinishSetup | ( | ) | 
Definition at line 265 of file panel_footprint_chooser.cpp.
References GetAppSettings(), PCBNEW_SETTINGS::FOOTPRINT_CHOOSER::height, m_adapter, m_hsplitter, m_vsplitter, PCBNEW_SETTINGS::FOOTPRINT_CHOOSER::sash_h, PCBNEW_SETTINGS::FOOTPRINT_CHOOSER::sash_v, PCBNEW_SETTINGS::FOOTPRINT_CHOOSER::sort_mode, and PCBNEW_SETTINGS::FOOTPRINT_CHOOSER::width.
      
  | 
  inline | 
Definition at line 84 of file panel_footprint_chooser.h.
References m_detailsPanel.
      
  | 
  inline | 
Definition at line 76 of file panel_footprint_chooser.h.
References m_tree.
      
  | 
  inline | 
Definition at line 74 of file panel_footprint_chooser.h.
References m_tree.
      
  | 
  inline | 
Definition at line 72 of file panel_footprint_chooser.h.
References m_adapter.
| LIB_ID PANEL_FOOTPRINT_CHOOSER::GetSelectedLibId | ( | ) | const | 
To be called after this dialog returns from ShowModal().
Definition at line 308 of file panel_footprint_chooser.cpp.
References m_tree.
      
  | 
  inline | 
Definition at line 82 of file panel_footprint_chooser.h.
References m_vsplitter.
      
  | 
  inline | 
Definition at line 80 of file panel_footprint_chooser.h.
References m_preview_ctrl.
      
  | 
  protected | 
Definition at line 314 of file panel_footprint_chooser.cpp.
References DblClickDelay, m_acceptHandler, and m_dbl_click_timer.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 386 of file panel_footprint_chooser.cpp.
References m_details.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Handle the selection of an item.
This is called when either the search box or the tree receive an Enter, or the tree receives a double click. If the item selected is a category, it is expanded or collapsed; if it is a component, the component is picked.
Definition at line 368 of file panel_footprint_chooser.cpp.
References DblClickDelay, m_dbl_click_timer, and m_tree.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 341 of file panel_footprint_chooser.cpp.
References _, FOOTPRINT_PREVIEW_PANEL::GetCurrentFootprint(), LIB_ID::IsValid(), m_CurrFootprint, m_preview_ctrl, and m_tree.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 258 of file panel_footprint_chooser.cpp.
References m_tree.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Handle parent frame menu events to block tree preview.
Definition at line 251 of file panel_footprint_chooser.cpp.
References m_tree.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 334 of file panel_footprint_chooser.cpp.
References Kiface(), and m_adapter.
Referenced by PANEL_FOOTPRINT_CHOOSER().
      
  | 
  inline | 
Definition at line 78 of file panel_footprint_chooser.h.
References m_tree.
| void PANEL_FOOTPRINT_CHOOSER::SetPreselect | ( | const LIB_ID & | aPreselect | ) | 
Definition at line 302 of file panel_footprint_chooser.cpp.
References m_adapter.
      
  | 
  staticconstexprprotected | 
Definition at line 87 of file panel_footprint_chooser.h.
Referenced by onCloseTimer(), and onFootprintChosen().
      
  | 
  protected | 
Definition at line 130 of file panel_footprint_chooser.h.
Referenced by onCloseTimer(), and PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 122 of file panel_footprint_chooser.h.
Referenced by FinishSetup(), GetItemCount(), onOpenLibsTimer(), PANEL_FOOTPRINT_CHOOSER(), SetPreselect(), and ~PANEL_FOOTPRINT_CHOOSER().
| const FOOTPRINT* PANEL_FOOTPRINT_CHOOSER::m_CurrFootprint | 
Definition at line 113 of file panel_footprint_chooser.h.
Referenced by onFootprintSelected(), and PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 117 of file panel_footprint_chooser.h.
Referenced by onCloseTimer(), onFootprintChosen(), PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 126 of file panel_footprint_chooser.h.
Referenced by OnDetailsCharHook(), PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 116 of file panel_footprint_chooser.h.
Referenced by GetDetailsPanel(), and PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 131 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 129 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 128 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 119 of file panel_footprint_chooser.h.
Referenced by FinishSetup(), PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 118 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 124 of file panel_footprint_chooser.h.
Referenced by GetViewerPanel(), onFootprintSelected(), and PANEL_FOOTPRINT_CHOOSER().
| wxPanel* PANEL_FOOTPRINT_CHOOSER::m_RightPanel | 
Definition at line 110 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER().
| wxBoxSizer* PANEL_FOOTPRINT_CHOOSER::m_RightPanelSizer | 
Definition at line 111 of file panel_footprint_chooser.h.
Referenced by PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 125 of file panel_footprint_chooser.h.
Referenced by GetFiltersSizer(), GetFocusTarget(), GetSelectedLibId(), onFootprintChosen(), onFootprintSelected(), onMenuClose(), onMenuOpen(), PANEL_FOOTPRINT_CHOOSER(), Regenerate(), and ~PANEL_FOOTPRINT_CHOOSER().
      
  | 
  protected | 
Definition at line 120 of file panel_footprint_chooser.h.
Referenced by FinishSetup(), GetVerticalSpliter(), PANEL_FOOTPRINT_CHOOSER(), and ~PANEL_FOOTPRINT_CHOOSER().