| 
    KiCad PCB EDA Suite
    
   | 
 
#include <design_block_pane.h>
  
Public Member Functions | |
| DESIGN_BLOCK_PANE (EDA_DRAW_FRAME *aParent, const LIB_ID *aPreselect, std::vector< LIB_ID > &aHistoryList) | |
| ~DESIGN_BLOCK_PANE () override | |
| void | SaveSettings () | 
| LIB_ID | GetSelectedLibId (int *aUnit=nullptr) const | 
| void | SelectLibId (const LIB_ID &aLibId) | 
| DESIGN_BLOCK * | GetDesignBlock (const LIB_ID &aLibId, bool aUseCacheLib, bool aShowErrorMsg) | 
| Load design block from design block library table.   | |
| DESIGN_BLOCK * | GetSelectedDesignBlock (bool aUseCacheLib, bool aShowErrorMsg) | 
| void | RefreshLibs () | 
| wxString | CreateNewDesignBlockLibrary (const wxString &aDialogTitle) | 
| Creates a new design block library.   | |
| bool | AddDesignBlockLibrary (const wxString &aDialogTitle, const wxString &aFilename, LIBRARY_TABLE_SCOPE aScope) | 
| Add an existing library to a library table (presumed to be either the global or project design block table).   | |
| bool | DeleteDesignBlockLibrary (const wxString &aLibName, bool aConfirm) | 
| bool | DeleteDesignBlockFromLibrary (const LIB_ID &aLibId, bool aConfirm) | 
| bool | EditDesignBlockProperties (const LIB_ID &aLibId) | 
| PANEL_DESIGN_BLOCK_CHOOSER * | GetDesignBlockPanel () const | 
| void | SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom) | 
| void | SetBorderColor (const KIGFX::COLOR4D &aColor) | 
Protected Member Functions | |
| virtual void | setLabelsAndTooltips ()=0 | 
| virtual void | OnLanguageChanged (wxCommandEvent &aEvent) | 
| void | OnClosed (wxAuiManagerEvent &aEvent) | 
Protected Attributes | |
| EDA_DRAW_FRAME * | m_frame = nullptr | 
| PANEL_DESIGN_BLOCK_CHOOSER * | m_chooserPanel = nullptr | 
Private Member Functions | |
| bool | checkOverwrite (wxWindow *aFrame, wxString &libname, wxString &newName) | 
| wxString | createNewDesignBlockLibrary (const wxString &aDialogTitle) | 
| void | OnPaint (wxPaintEvent &event) | 
Private Attributes | |
| bool | m_leftBorder | 
| bool | m_rightBorder | 
| bool | m_topBorder | 
| bool | m_bottomBorder | 
| KIGFX::COLOR4D | m_borderColor | 
Definition at line 39 of file design_block_pane.h.
| DESIGN_BLOCK_PANE::DESIGN_BLOCK_PANE | ( | EDA_DRAW_FRAME * | aParent, | 
| const LIB_ID * | aPreselect, | ||
| std::vector< LIB_ID > & | aHistoryList ) | 
Definition at line 45 of file design_block_pane.cpp.
References m_frame, OnClosed(), OnLanguageChanged(), and WX_PANEL::WX_PANEL().
Referenced by PCB_DESIGN_BLOCK_PANE::PCB_DESIGN_BLOCK_PANE(), and SCH_DESIGN_BLOCK_PANE::SCH_DESIGN_BLOCK_PANE().
      
  | 
  override | 
Definition at line 55 of file design_block_pane.cpp.
References m_frame, OnClosed(), and OnLanguageChanged().
| bool DESIGN_BLOCK_PANE::AddDesignBlockLibrary | ( | const wxString & | aDialogTitle, | 
| const wxString & | aFilename, | ||
| LIBRARY_TABLE_SCOPE | aScope ) | 
Add an existing library to a library table (presumed to be either the global or project design block table).
Definition at line 224 of file design_block_pane.cpp.
References _, DESIGN_BLOCK, DisplayError(), DESIGN_BLOCK_IO_MGR::FILE_TYPE_NONE, PGM_BASE::GetLibraryManager(), GLOBAL, DESIGN_BLOCK_IO_MGR::GuessPluginTypeFromLibPath(), DESIGN_BLOCK_IO_MGR::KICAD_SEXP, FILEEXT::KiCadDesignBlockLibPathExtension, LIBRARY_MANAGER::LoadGlobalTables(), m_frame, LIBRARY_ERROR::message, NormalizePath(), Pgm(), LIBRARY_MANAGER::ProjectChanged(), RefreshLibs(), SelectLibId(), LIBRARY_TABLE_ROW::SetDescription(), LIBRARY_TABLE_ROW::SetNickname(), LIBRARY_TABLE_ROW::SetType(), LIBRARY_TABLE_ROW::SetURI(), DESIGN_BLOCK_IO_MGR::ShowType(), LIBRARY_MANAGER::Table(), and table.
Referenced by createNewDesignBlockLibrary().
      
  | 
  private | 
Definition at line 431 of file design_block_pane.cpp.
References _, and OKOrCancelDialog().
Referenced by EditDesignBlockProperties().
| wxString DESIGN_BLOCK_PANE::CreateNewDesignBlockLibrary | ( | const wxString & | aDialogTitle | ) | 
Creates a new design block library.
Definition at line 144 of file design_block_pane.cpp.
References createNewDesignBlockLibrary().
      
  | 
  private | 
Definition at line 150 of file design_block_pane.cpp.
References _, AddDesignBlockLibrary(), DisplayError(), KIDIALOG::DoNotShowCheckbox(), DESIGN_BLOCK_IO_MGR::FindPlugin(), FILEDLG_HOOK_NEW_LIBRARY::GetUseGlobalTable(), GLOBAL, DESIGN_BLOCK_IO_MGR::KICAD_SEXP, FILEEXT::KiCadDesignBlockLibPathExtension, FILEEXT::KiCadDesignBlockLibPathWildcard(), m_frame, PROJECT, KIDIALOG::ShowModal(), and IO_ERROR::What().
Referenced by CreateNewDesignBlockLibrary().
| bool DESIGN_BLOCK_PANE::DeleteDesignBlockFromLibrary | ( | const LIB_ID & | aLibId, | 
| bool | aConfirm ) | 
Definition at line 330 of file design_block_pane.cpp.
References _, DisplayError(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), IsOK(), LIB_ID::IsValid(), m_frame, RefreshLibs(), and IO_ERROR::What().
| bool DESIGN_BLOCK_PANE::DeleteDesignBlockLibrary | ( | const wxString & | aLibName, | 
| bool | aConfirm ) | 
Definition at line 288 of file design_block_pane.cpp.
References _, DisplayError(), DisplayErrorMessage(), IsOK(), m_frame, RefreshLibs(), and IO_ERROR::What().
| bool DESIGN_BLOCK_PANE::EditDesignBlockProperties | ( | const LIB_ID & | aLibId | ) | 
Definition at line 372 of file design_block_pane.cpp.
References _, checkOverwrite(), DisplayError(), GetDesignBlock(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), LIB_ID::IsValid(), m_frame, RefreshLibs(), SelectLibId(), DIALOG_SHIM::ShowModal(), and IO_ERROR::What().
| DESIGN_BLOCK * DESIGN_BLOCK_PANE::GetDesignBlock | ( | const LIB_ID & | aLibId, | 
| bool | aUseCacheLib, | ||
| bool | aShowErrorMsg ) | 
Load design block from design block library table.
| aLibId | is the design block library identifier to load. | 
| aUseCacheLib | set to true to fall back to cache library if design block is not found in design block library table. | 
| aShowErrorMessage | set to true to show any error messages. | 
Definition at line 109 of file design_block_pane.cpp.
References _, DESIGN_BLOCK_LIBRARY_ADAPTER::DesignBlockLoadWithOptionalNickname(), DisplayErrorMessage(), LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), m_frame, IO_ERROR::What(), and UTF8::wx_str().
Referenced by PCB_CONTROL::AppendDesignBlock(), EditDesignBlockProperties(), GetSelectedDesignBlock(), SCH_DRAWING_TOOLS::ImportSheet(), PCB_CONTROL::PlaceLinkedDesignBlock(), SCH_EDITOR_CONTROL::PlaceLinkedDesignBlock(), PCB_CONTROL::SaveToLinkedDesignBlock(), and SCH_EDITOR_CONTROL::SaveToLinkedDesignBlock().
      
  | 
  inline | 
Definition at line 88 of file design_block_pane.h.
References m_chooserPanel.
Referenced by DESIGN_BLOCK_CONTROL::getCurrentTreeNode().
| DESIGN_BLOCK * DESIGN_BLOCK_PANE::GetSelectedDesignBlock | ( | bool | aUseCacheLib, | 
| bool | aShowErrorMsg ) | 
Definition at line 135 of file design_block_pane.cpp.
References GetDesignBlock(), and GetSelectedLibId().
| LIB_ID DESIGN_BLOCK_PANE::GetSelectedLibId | ( | int * | aUnit = nullptr | ) | const | 
Definition at line 91 of file design_block_pane.cpp.
References m_chooserPanel.
Referenced by PCB_CONTROL::AppendDesignBlock(), GetSelectedDesignBlock(), DESIGN_BLOCK_CONTROL::getSelectedLibId(), PCB_DESIGN_BLOCK_CONTROL::getSelectedLibId(), and SCH_DRAWING_TOOLS::ImportSheet().
      
  | 
  protected | 
Definition at line 73 of file design_block_pane.cpp.
References m_frame.
Referenced by DESIGN_BLOCK_PANE(), and ~DESIGN_BLOCK_PANE().
      
  | 
  protectedvirtual | 
Definition at line 62 of file design_block_pane.cpp.
References m_chooserPanel, and setLabelsAndTooltips().
Referenced by DESIGN_BLOCK_PANE(), and ~DESIGN_BLOCK_PANE().
      
  | 
  privateinherited | 
Definition at line 47 of file wx_panel.cpp.
References m_borderColor, m_bottomBorder, m_leftBorder, m_rightBorder, m_topBorder, KIGFX::COLOR4D::Mix(), KIGFX::COLOR4D::ToColour(), and KIGFX::COLOR4D::UNSPECIFIED.
Referenced by WX_PANEL(), and ~WX_PANEL().
| void DESIGN_BLOCK_PANE::RefreshLibs | ( | ) | 
Definition at line 103 of file design_block_pane.cpp.
References m_chooserPanel.
Referenced by AddDesignBlockLibrary(), DeleteDesignBlockFromLibrary(), DeleteDesignBlockLibrary(), EditDesignBlockProperties(), DESIGN_BLOCK_CONTROL::PinLibrary(), and DESIGN_BLOCK_CONTROL::UnpinLibrary().
| void DESIGN_BLOCK_PANE::SaveSettings | ( | ) | 
Definition at line 85 of file design_block_pane.cpp.
References m_chooserPanel.
| void DESIGN_BLOCK_PANE::SelectLibId | ( | const LIB_ID & | aLibId | ) | 
Definition at line 97 of file design_block_pane.cpp.
References m_chooserPanel.
Referenced by AddDesignBlockLibrary(), EditDesignBlockProperties(), SCH_EDITOR_CONTROL::PlaceLinkedDesignBlock(), PCB_CONTROL::SaveToLinkedDesignBlock(), and SCH_EDITOR_CONTROL::SaveToLinkedDesignBlock().
      
  | 
  inlineinherited | 
Definition at line 47 of file wx_panel.h.
References m_borderColor.
Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
      
  | 
  inlineinherited | 
Definition at line 39 of file wx_panel.h.
References m_bottomBorder, m_leftBorder, m_rightBorder, and m_topBorder.
Referenced by APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D(), PAGED_DIALOG::PAGED_DIALOG(), PANEL_SCH_SELECTION_FILTER::PANEL_SCH_SELECTION_FILTER(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::ShowPreview().
      
  | 
  protectedpure virtual | 
Implemented in PCB_DESIGN_BLOCK_PANE, and SCH_DESIGN_BLOCK_PANE.
Referenced by OnLanguageChanged().
      
  | 
  privateinherited | 
Definition at line 61 of file wx_panel.h.
Referenced by OnPaint(), SetBorderColor(), and WX_PANEL().
      
  | 
  privateinherited | 
Definition at line 59 of file wx_panel.h.
Referenced by OnPaint(), SetBorders(), and WX_PANEL().
      
  | 
  protected | 
Definition at line 97 of file design_block_pane.h.
Referenced by GetDesignBlockPanel(), GetSelectedLibId(), OnLanguageChanged(), PCB_DESIGN_BLOCK_PANE::PCB_DESIGN_BLOCK_PANE(), RefreshLibs(), SaveSettings(), SCH_DESIGN_BLOCK_PANE::SCH_DESIGN_BLOCK_PANE(), and SelectLibId().
      
  | 
  protected | 
Definition at line 96 of file design_block_pane.h.
Referenced by AddDesignBlockLibrary(), createNewDesignBlockLibrary(), DeleteDesignBlockFromLibrary(), DeleteDesignBlockLibrary(), DESIGN_BLOCK_PANE(), EditDesignBlockProperties(), GetDesignBlock(), OnClosed(), SCH_DESIGN_BLOCK_PANE::SCH_DESIGN_BLOCK_PANE(), and ~DESIGN_BLOCK_PANE().
      
  | 
  privateinherited | 
Definition at line 56 of file wx_panel.h.
Referenced by OnPaint(), SetBorders(), and WX_PANEL().
      
  | 
  privateinherited | 
Definition at line 57 of file wx_panel.h.
Referenced by OnPaint(), SetBorders(), and WX_PANEL().
      
  | 
  privateinherited | 
Definition at line 58 of file wx_panel.h.
Referenced by OnPaint(), SetBorders(), and WX_PANEL().