void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
void AddContextMenuItems(CONDITIONAL_MENU *aMenu)
bool selIsInLibrary(const SELECTION &aSel)
LIB_TREE_NODE * getCurrentTreeNode()
bool selIsDesignBlock(const SELECTION &aSel)
int EditDesignBlockProperties(const TOOL_EVENT &aEvent)
std::vector< FRAME_T > m_framesToNotify
Notify other frames that the design block lib table has changed.
int DeleteDesignBlock(const TOOL_EVENT &aEvent)
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.
static TOOL_ACTION saveSheetAsDesignBlock
static TOOL_ACTION saveSelectionAsDesignBlock
static TOOL_ACTION deleteDesignBlock
static TOOL_ACTION saveSheetToDesignBlock
static TOOL_ACTION editDesignBlockProperties
static TOOL_ACTION saveSelectionToDesignBlock
static TOOL_ACTION placeDesignBlock
int SaveSheetAsDesignBlock(const TOOL_EVENT &aEvent)
DESIGN_BLOCK_PANE * getDesignBlockPane() override
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int SaveSelectionToDesignBlock(const TOOL_EVENT &aEvent)
int SaveSelectionAsDesignBlock(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
SCH_EDIT_FRAME * m_editFrame
int SaveSheetToDesignBlock(const TOOL_EVENT &aEvent)
virtual ~SCH_DESIGN_BLOCK_CONTROL()
bool SaveSheetToDesignBlock(const LIB_ID &aLibId, SCH_SHEET_PATH &aSheetPath)
SCH_DESIGN_BLOCK_PANE * GetDesignBlockPane() const
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
bool SaveSelectionToDesignBlock(const LIB_ID &aLibId)
SCH_SHEET_PATH & GetCurrentSheet() const
bool SaveSheetAsDesignBlock(const wxString &aLibraryName, SCH_SHEET_PATH &aSheetPath)
bool SaveSelectionAsDesignBlock(const wxString &aLibraryName)
bool Empty() const
Checks if there is anything selected.