29#include <wx/filedlg.h>
47 return current && current->
m_Type == LIB_TREE_NODE::TYPE::LIBRARY
54 return current && current->
m_Type == LIB_TREE_NODE::TYPE::LIBRARY
63 && ( current->
m_Type == LIB_TREE_NODE::TYPE::LIBRARY
64 || current->
m_Type == LIB_TREE_NODE::TYPE::ITEM );
71 return current && current->
m_Type == LIB_TREE_NODE::TYPE::ITEM;
static TOOL_ACTION pinLibrary
static TOOL_ACTION hideLibraryTree
static TOOL_ACTION unpinLibrary
static TOOL_ACTION newLibrary
PANEL_DESIGN_BLOCK_CHOOSER * GetDesignBlockPanel() const
LIB_ID GetSelectedLibId(int *aUnit=nullptr) const
To be called after this dialog returns from ShowModal().
static TOOL_ACTION deleteDesignBlock
static TOOL_ACTION placeDesignBlock
static TOOL_ACTION saveSheetAsDesignBlock
static TOOL_ACTION saveSelectionAsDesignBlock
static TOOL_ACTION editDesignBlockProperties
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
Widget displaying a tree of symbols with optional search text control and description panel....
LIB_TREE_NODE * GetCurrentTreeNode() const
void PinLibrary(const wxString &aLibrary, enum LIB_TYPE_T aLibType)
void UnpinLibrary(const wxString &aLibrary, enum LIB_TYPE_T aLibType)
int DeleteDesignBlock(const TOOL_EVENT &aEvent)
int PinLibrary(const TOOL_EVENT &aEvent)
int HideLibraryTree(const TOOL_EVENT &aEvent)
LIB_ID getSelectedLibId()
Set up handlers for various events.
int SaveSheetAsDesignBlock(const TOOL_EVENT &aEvent)
int EditDesignBlockProperties(const TOOL_EVENT &aEvent)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
LIB_TREE_NODE * getCurrentTreeNode()
int SaveSelectionAsDesignBlock(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
SCH_EDIT_FRAME * m_editFrame
DESIGN_BLOCK_PANE * getDesignBlockPane()
int UnpinLibrary(const TOOL_EVENT &aEvent)
int NewLibrary(const TOOL_EVENT &aEvent)
void SaveSelectionAsDesignBlock(const wxString &aLibraryName)
bool EditDesignBlockProperties(const LIB_ID &aLibId)
void ToggleLibraryTree() override
void SaveSheetAsDesignBlock(const wxString &aLibraryName, SCH_SHEET_PATH &aSheetPath)
bool DeleteDesignBlockFromLibrary(const LIB_ID &aLibId, bool aConfirm)
SCH_SHEET_PATH & GetCurrentSheet() const
wxString CreateNewDesignBlockLibrary(const wxString &aLibName=wxEmptyString, const wxString &aProposedName=wxEmptyString)
If a library name is given, creates a new design block library in the project folder with the given n...
DESIGN_BLOCK_PANE * GetDesignBlockPane() const
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
This file is part of the common library.
This file is part of the common library.
Definition of file extensions used in Kicad.