| 
    KiCad PCB EDA Suite
    
   | 
 
#include <symbol_editor_edit_tool.h>
  
Public Types | |
| enum | RESET_REASON | 
| Determine the reason of reset for a tool.  More... | |
Public Member Functions | |
| SYMBOL_EDITOR_EDIT_TOOL () | |
| ~SYMBOL_EDITOR_EDIT_TOOL ()=default | |
| bool | Init () override | 
| Init() is called once upon a registration of the tool.      | |
| int | Rotate (const TOOL_EVENT &aEvent) | 
| int | Mirror (const TOOL_EVENT &aEvent) | 
| int | Swap (const TOOL_EVENT &aEvent) | 
| int | Duplicate (const TOOL_EVENT &aEvent) | 
| int | Properties (const TOOL_EVENT &aEvent) | 
| int | PinTable (const TOOL_EVENT &aEvent) | 
| int | ConvertStackedPins (const TOOL_EVENT &aEvent) | 
| int | ExplodeStackedPin (const TOOL_EVENT &aEvent) | 
| int | UpdateSymbolFields (const TOOL_EVENT &aEvent) | 
| int | Undo (const TOOL_EVENT &aEvent) | 
| int | Redo (const TOOL_EVENT &aEvent) | 
| int | Cut (const TOOL_EVENT &aEvent) | 
| int | Copy (const TOOL_EVENT &aEvent) | 
| int | CopyAsText (const TOOL_EVENT &aEvent) | 
| int | Paste (const TOOL_EVENT &aEvent) | 
| int | DoDelete (const TOOL_EVENT &aEvent) | 
| Delete the selected items, or the item under the cursor.   | |
| void | Reset (RESET_REASON aReason) override | 
| Bring the tool to a known, initial state.      | |
| bool | IsSymbolEditor () const | 
| Returns true if the tool is running in the symbol editor.   | |
| int | Increment (const TOOL_EVENT &aEvent) | 
| int | InteractiveDelete (const TOOL_EVENT &aEvent) | 
| void | Activate () | 
| Run the tool.   | |
| TOOL_MENU & | GetToolMenu () | 
| void | SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON) | 
| Assign a context menu and tells when it should be activated.   | |
| void | RunMainStack (std::function< void()> aFunc) | 
| Call a function using the main stack.   | |
| void | Go (int(SYMBOL_EDIT_FRAME::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY)) | 
| Define which state (aStateFunc) to go when a certain event arrives (aConditions).   | |
| TOOL_EVENT * | Wait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY)) | 
| Suspend execution of the tool until an event specified in aEventList arrives.   | |
| TOOL_TYPE | GetType () const | 
| Return the type of the tool.   | |
| TOOL_ID | GetId () const | 
| Return the unique identifier of the tool.   | |
| const std::string & | GetName () const | 
| Return the name of the tool.   | |
| TOOL_MANAGER * | GetManager () const | 
| Return the instance of TOOL_MANAGER that takes care of the tool.   | |
| bool | IsToolActive () const | 
Static Public Attributes | |
| static const std::vector< KICAD_T > | SwappableItems | 
Protected Member Functions | |
| void | updateItem (EDA_ITEM *aItem, bool aUpdateRTree) const | 
| Similar to getView()->Update(), but also updates the SCH_SCREEN's RTree.   | |
| void | saveCopyInUndoList (EDA_ITEM *aItem, UNDO_REDO aType, bool aAppend=false, bool aDirtyConnectivity=true) | 
| void | attachManager (TOOL_MANAGER *aManager) | 
| Set the TOOL_MANAGER the tool will belong to.   | |
| KIGFX::VIEW * | getView () const | 
| Returns the instance of #VIEW object used in the application.   | |
| KIGFX::VIEW_CONTROLS * | getViewControls () const | 
| Return the instance of VIEW_CONTROLS object used in the application.   | |
| SYMBOL_EDIT_FRAME * | getEditFrame () const | 
| Return the application window object, casted to requested user type.   | |
| SYMBOL_EDIT_FRAME * | getModel () const | 
| Return the model object if it matches the requested type.   | |
Protected Attributes | |
| SYMBOL_EDIT_FRAME * | m_frame | 
| KIGFX::SCH_VIEW * | m_view | 
| SCH_SELECTION_TOOL * | m_selectionTool | 
| bool | m_isSymbolEditor | 
| EDA_ITEM * | m_pickerItem | 
| std::unique_ptr< TOOL_MENU > | m_menu | 
| The functions below are not yet implemented - their interface may change.   | |
| TOOL_TYPE | m_type | 
| TOOL_ID | m_toolId | 
| Unique id, assigned by a TOOL_MANAGER instance.   | |
| std::string | m_toolName | 
| Names are expected to obey the format application.ToolName (eg.   | |
| TOOL_MANAGER * | m_toolMgr | 
Private Member Functions | |
| void | editShapeProperties (SCH_SHAPE *aShape) | 
| void | editTextProperties (SCH_ITEM *aItem) | 
| void | editTextBoxProperties (SCH_ITEM *aItem) | 
| void | editFieldProperties (SCH_FIELD *aField) | 
| void | editSymbolProperties () | 
| Set up handlers for various events.   | |
| void | setTransitions () override | 
| This method is meant to be overridden in order to specify handlers for events.   | |
| void | resetTransitions () | 
| Clear the current transition map and restores the default one created by setTransitions().   | |
| void | goInternal (TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions) | 
| EDA_ITEM * | getModelInternal () const | 
| TOOLS_HOLDER * | getToolHolderInternal () const | 
Definition at line 35 of file symbol_editor_edit_tool.h.
      
  | 
  inherited | 
Determine the reason of reset for a tool.
Definition at line 77 of file tool_base.h.
| SYMBOL_EDITOR_EDIT_TOOL::SYMBOL_EDITOR_EDIT_TOOL | ( | ) | 
Definition at line 55 of file symbol_editor_edit_tool.cpp.
References SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::SCH_TOOL_BASE().
      
  | 
  default | 
References SwappableItems.
      
  | 
  inherited | 
Run the tool.
After activation, the tool starts receiving events until it is finished.
Definition at line 75 of file tool_interactive.cpp.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  protectedinherited | 
Set the TOOL_MANAGER the tool will belong to.
Called by TOOL_MANAGER::RegisterTool()
Definition at line 163 of file tool_base.cpp.
| int SYMBOL_EDITOR_EDIT_TOOL::ConvertStackedPins | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 785 of file symbol_editor_edit_tool.cpp.
References _, end, SELECTION::Front(), SCH_PIN::GetNumber(), LIB_SYMBOL::GetPins(), SCH_PIN::GetPosition(), SCH_SELECTION_TOOL::GetSelection(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), pin, SCH_COMMIT::Push(), LIB_SYMBOL::RemoveDrawItem(), result, SCH_PIN_T, ACTIONS::selectionClear, SCH_PIN::SetNumber(), SELECTION::Size(), traceStackedPins, EDA_ITEM::Type(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Copy | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1175 of file symbol_editor_edit_tool.cpp.
References EDA_ITEM::ClearFlags(), SCH_IO_KICAD_SEXPR::FormatLibSymbol(), LIB_SYMBOL::GetDrawItems(), SELECTION::GetSize(), STRING_FORMATTER::GetString(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, nonFields, KICAD_FORMAT::Prettify(), SaveClipboard(), SCH_FIELD_T, and STRUCT_DELETED.
Referenced by Cut(), and setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::CopyAsText | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1214 of file symbol_editor_edit_tool.cpp.
References GetSelectedItemsAsText(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, SCH_SELECTION_TOOL::RequestSelection(), SaveClipboard(), and ACTIONS::selectionClear.
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Cut | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1164 of file symbol_editor_edit_tool.cpp.
References Copy(), and DoDelete().
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::DoDelete | ( | const TOOL_EVENT & | aEvent | ) | 
Delete the selected items, or the item under the cursor.
Definition at line 455 of file symbol_editor_edit_tool.cpp.
References _, SCH_ITEM::GetBodyStyle(), SCH_PIN::GetName(), LIB_SYMBOL::GetPins(), SCH_PIN::GetPosition(), SCH_PIN::GetType(), SCH_ITEM::GetUnit(), LIB_SYMBOL::GetUnitCount(), EDA_TEXT::IsVisible(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), pin, SCH_COMMIT::Push(), LIB_SYMBOL::RemoveDrawItem(), SCH_FIELD_T, SCH_PIN_T, ACTIONS::selectionClear, and EDA_TEXT::SetVisible().
Referenced by Cut(), and setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Duplicate | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1310 of file symbol_editor_edit_tool.cpp.
References SELECTION::begin(), SELECTION::end(), EDA_ITEM::GetPosition(), SELECTION::GetSize(), LexicographicalCompare(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, EDA_ITEM::m_Uuid, COMMIT::Modify(), and nonFields.
Referenced by setTransitions().
      
  | 
  private | 
Definition at line 675 of file symbol_editor_edit_tool.cpp.
References _, SCH_FIELD::GetName(), SCH_FIELD::IsMandatory(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), SCH_COMMIT::Push(), DIALOG_SHIM::ShowQuasiModal(), TitleCaps(), and DIALOG_FIELD_PROPERTIES::UpdateField().
Referenced by Properties().
      
  | 
  private | 
Definition at line 622 of file symbol_editor_edit_tool.cpp.
References DIALOG_SHAPE_PROPERTIES::GetApplyToAllConversions(), DIALOG_SHAPE_PROPERTIES::GetApplyToAllUnits(), SCH_SHAPE::GetMsgPanelInfo(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificBodyStyle(), SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificUnit(), DIALOG_SHIM::ShowModal(), and SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().
Referenced by Properties().
      
  | 
  private | 
Set up handlers for various events.
Definition at line 706 of file symbol_editor_edit_tool.cpp.
References ACTIONS::cancelInteractive, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, ACTIONS::selectionClear, DIALOG_SHIM::ShowQuasiModal(), tools, and LIB_SYMBOL::UnitsLocked().
Referenced by Properties().
      
  | 
  private | 
Definition at line 659 of file symbol_editor_edit_tool.cpp.
References SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TEXTBOX_T, DIALOG_SHIM::ShowModal(), EDA_ITEM::Type(), and SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().
Referenced by Properties().
      
  | 
  private | 
Definition at line 643 of file symbol_editor_edit_tool.cpp.
References SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TEXT_T, DIALOG_SHIM::ShowModal(), EDA_ITEM::Type(), and SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().
Referenced by Properties().
| int SYMBOL_EDITOR_EDIT_TOOL::ExplodeStackedPin | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1027 of file symbol_editor_edit_tool.cpp.
References _, LIB_SYMBOL::AddDrawItem(), SELECTION::Front(), SCH_SELECTION_TOOL::GetSelection(), SELECTION::GetSize(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), pin, SCH_COMMIT::Push(), SCH_PIN_T, ACTIONS::selectionClear, SCH_ITEM::SetBodyStyle(), SCH_PIN::SetLength(), SCH_PIN::SetName(), SCH_PIN::SetNameTextSize(), SCH_PIN::SetNumber(), SCH_PIN::SetNumberTextSize(), SCH_PIN::SetOrientation(), SCH_PIN::SetPosition(), SCH_PIN::SetShape(), SCH_PIN::SetType(), SCH_ITEM::SetUnit(), SCH_PIN::SetVisible(), and EDA_ITEM::Type().
Referenced by setTransitions().
      
  | 
  inlineprotectedinherited | 
Return the application window object, casted to requested user type.
Definition at line 186 of file tool_base.h.
      
  | 
  inlineinherited | 
Return the unique identifier of the tool.
The identifier is set by an instance of TOOL_MANAGER.
Definition at line 123 of file tool_base.h.
      
  | 
  inlineinherited | 
Return the instance of TOOL_MANAGER that takes care of the tool.
Definition at line 146 of file tool_base.h.
      
  | 
  inlineprotectedinherited | 
Return the model object if it matches the requested type.
Definition at line 198 of file tool_base.h.
      
  | 
  privateinherited | 
Definition at line 210 of file tool_base.cpp.
      
  | 
  inlineinherited | 
Return the name of the tool.
Tool names are expected to obey the format: application.ToolName (eg. pcbnew.InteractiveSelection).
Definition at line 136 of file tool_base.h.
      
  | 
  privateinherited | 
Definition at line 211 of file tool_base.cpp.
      
  | 
  inherited | 
Definition at line 77 of file tool_interactive.cpp.
      
  | 
  inlineinherited | 
Return the type of the tool.
Definition at line 111 of file tool_base.h.
      
  | 
  protectedinherited | 
Returns the instance of #VIEW object used in the application.
It allows tools to draw.
Definition at line 170 of file tool_base.cpp.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  protectedinherited | 
Return the instance of VIEW_CONTROLS object used in the application.
It allows tools to read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.).
Definition at line 180 of file tool_base.cpp.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  inherited | 
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
No conditions means any event.
Definition at line 100 of file tool_interactive.h.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::setTransitions(), SYMBOL_EDITOR_EDIT_TOOL::setTransitions(), SYMBOL_EDITOR_MOVE_TOOL::setTransitions(), and SYMBOL_EDITOR_PIN_TOOL::setTransitions().
      
  | 
  privateinherited | 
Definition at line 140 of file tool_interactive.cpp.
      
  | 
  inlineinherited | 
Definition at line 110 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::setTransitions().
      
  | 
  overridevirtual | 
Init() is called once upon a registration of the tool.
Reimplemented from SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >.
Definition at line 71 of file symbol_editor_edit_tool.cpp.
References CONDITIONAL_MENU::AddItem(), CONDITIONAL_MENU::AddSeparator(), SCH_ACTIONS::convertStackedPins, ACTIONS::copy, ACTIONS::copyAsText, SELECTION_CONDITIONS::Count(), ACTIONS::cut, ACTIONS::doDelete, ACTIONS::duplicate, SCH_ACTIONS::explodeStackedPin, TOOL_MENU::GetMenu(), LIB_SYMBOL::GetPins(), SCH_PIN::GetPosition(), TOOL_INTERACTIVE::GetToolMenu(), SELECTION_CONDITIONS::Idle(), SELECTION_CONDITIONS::IdleSelection(), SCH_TOOL_BASE< T >::Init(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_isSymbolEditor, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, SCH_ACTIONS::mirrorH, SCH_ACTIONS::mirrorV, SELECTION_CONDITIONS::MoreThan(), SELECTION_CONDITIONS::NotEmpty(), SELECTION_CONDITIONS::OnlyTypes(), ACTIONS::paste, pin, SCH_ACTIONS::properties, SCH_ACTIONS::rotateCCW, SCH_ACTIONS::rotateCW, SCH_FIELD_T, SCH_PIN_T, SCH_TABLE_T, SCH_TABLECELL_T, SCH_TEXT_T, SCH_TEXTBOX_T, ACTIONS::selectAll, SCH_ACTIONS::swap, SwappableItems, and ACTIONS::unselectAll.
      
  | 
  inlineinherited | 
Definition at line 247 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::setTransitions().
      
  | 
  inlineinherited | 
Returns true if the tool is running in the symbol editor.
Definition at line 105 of file sch_tool_base.h.
      
  | 
  inherited | 
Definition at line 153 of file tool_base.cpp.
| int SYMBOL_EDITOR_EDIT_TOOL::Mirror | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 298 of file symbol_editor_edit_tool.cpp.
References SELECTION::Front(), SELECTION::GetCenter(), GetFlippedAlignment(), EDA_TEXT::GetHorizJustify(), SELECTION::GetItem(), EDA_ITEM::GetPosition(), SELECTION::GetSize(), EDA_TEXT::GetVertJustify(), SELECTION::IsHover(), EDA_ITEM::IsMoving(), LIBEDIT, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, TOOL_EVENT::Matches(), SCH_ITEM::MirrorHorizontally(), SCH_ACTIONS::mirrorV, SCH_ITEM::MirrorVertically(), ACTIONS::refreshPreview, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), SCH_FIELD_T, ACTIONS::selectionClear, EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetVertJustify(), EDA_ITEM::Type(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Paste | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1231 of file symbol_editor_edit_tool.cpp.
References _, KIGFX::VIEW::Add(), LIB_SYMBOL::AddDrawItem(), SCH_ITEM::Duplicate(), SELECTION::Empty(), SCH_ITEM::GetBodyStyle(), GetClipboardUTF8(), LIB_SYMBOL::GetDrawItems(), SCH_ITEM::GetUnit(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::getView(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::getViewControls(), IS_NEW, IS_PASTED, LIB_SYMBOL::IsDerived(), LAYER_DEVICE, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), SCH_ACTIONS::move, SCH_IO_KICAD_SEXPR::ParseLibSymbols(), SCH_COMMIT::Push(), SCH_COMMIT::Revert(), SCH_FIELD_T, SELECTED, SCH_ITEM::SetBodyStyle(), EDA_ITEM::SetFlags(), EDA_ITEM::SetParent(), SELECTION::SetReferencePoint(), and SCH_ITEM::SetUnit().
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::PinTable | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 743 of file symbol_editor_edit_tool.cpp.
References _, SCH_SELECTION_TOOL::GetSelection(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, COMMIT::Modify(), SCH_COMMIT::Push(), SCH_PIN_T, ACTIONS::selectionClear, and DIALOG_SHIM::ShowModal().
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Properties | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 555 of file symbol_editor_edit_tool.cpp.
References editFieldProperties(), editShapeProperties(), editSymbolProperties(), editTextBoxProperties(), editTextProperties(), SELECTION::Empty(), SELECTION::Front(), SCH_ITEM::GetClass(), EDA_ITEM::GetEditFlags(), EDA_ITEM::GetParent(), PIN_LAYOUT_CACHE::GetPinNumberBBox(), TOOL_EVENT::IsAction(), SELECTION::IsHover(), LIBEDIT, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, pin, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), SCH_FIELD_T, SCH_PIN_T, SCH_SHAPE_T, SCH_TEXT_T, SCH_TEXTBOX_T, ACTIONS::selectionClear, SELECTION::Size(), SCH_ACTIONS::symbolProperties, and EDA_ITEM::Type().
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Redo | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1148 of file symbol_editor_edit_tool.cpp.
References SELECTION::Clear(), SCH_SELECTION_TOOL::GetSelection(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, and SCH_SELECTION_TOOL::RebuildSelection().
Referenced by setTransitions().
      
  | 
  inlineoverridevirtualinherited | 
Bring the tool to a known, initial state.
If the tool claimed anything from the model or the view, it must release it when its reset.
| aReason | contains information about the reason of tool reset. | 
Implements TOOL_BASE.
Reimplemented in SYMBOL_EDITOR_MOVE_TOOL.
Definition at line 90 of file sch_tool_base.h.
      
  | 
  privateinherited | 
Clear the current transition map and restores the default one created by setTransitions().
Definition at line 138 of file tool_interactive.cpp.
| int SYMBOL_EDITOR_EDIT_TOOL::Rotate | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 250 of file symbol_editor_edit_tool.cpp.
References _, TOOL_EVENT::Commit(), COMMIT::Empty(), SELECTION::Front(), SELECTION::GetCenter(), SELECTION::GetItem(), EDA_ITEM::GetPosition(), SELECTION::GetSize(), SELECTION::IsHover(), EDA_ITEM::IsMoving(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, TOOL_EVENT::Matches(), COMMIT::Modify(), SCH_COMMIT::Push(), RECURSE, ACTIONS::refreshPreview, SCH_ITEM::Rotate(), SCH_ACTIONS::rotateCCW, and ACTIONS::selectionClear.
Referenced by setTransitions().
      
  | 
  inherited | 
Call a function using the main stack.
| aFunc | is the function to be calls. | 
Definition at line 92 of file tool_interactive.cpp.
      
  | 
  inlineprotectedinherited | 
Definition at line 333 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), and SYMBOL_EDITOR_EDIT_TOOL::Swap().
      
  | 
  inherited | 
Assign a context menu and tells when it should be activated.
| aMenu | is the menu to be assigned. | 
| aTrigger | determines conditions upon which the context menu is activated. | 
Definition at line 85 of file tool_interactive.cpp.
      
  | 
  overrideprivatevirtual | 
This method is meant to be overridden in order to specify handlers for events.
It is called every time tool is reset or finished.
Implements TOOL_INTERACTIVE.
Definition at line 1390 of file symbol_editor_edit_tool.cpp.
References ConvertStackedPins(), SCH_ACTIONS::convertStackedPins, Copy(), ACTIONS::copy, CopyAsText(), ACTIONS::copyAsText, Cut(), ACTIONS::cut, ACTIONS::decrementPrimary, ACTIONS::decrementSecondary, ACTIONS::deleteTool, DoDelete(), ACTIONS::doDelete, Duplicate(), ACTIONS::duplicate, ExplodeStackedPin(), SCH_ACTIONS::explodeStackedPin, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::Go(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::Increment(), ACTIONS::increment, ACTIONS::incrementPrimary, ACTIONS::incrementSecondary, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::InteractiveDelete(), Mirror(), SCH_ACTIONS::mirrorH, SCH_ACTIONS::mirrorV, Paste(), ACTIONS::paste, PinTable(), SCH_ACTIONS::pinTable, Properties(), SCH_ACTIONS::properties, Redo(), ACTIONS::redo, Rotate(), SCH_ACTIONS::rotateCCW, SCH_ACTIONS::rotateCW, Swap(), SCH_ACTIONS::swap, SCH_ACTIONS::symbolProperties, Undo(), ACTIONS::undo, UpdateSymbolFields(), and SCH_ACTIONS::updateSymbolFields.
| int SYMBOL_EDITOR_EDIT_TOOL::Swap | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 373 of file symbol_editor_edit_tool.cpp.
References SELECTION::Front(), EDA_ITEM::GetEditFlags(), SELECTION::GetItemsSortedBySelectionOrder(), SCH_PIN::GetOrientation(), EDA_ITEM::GetParent(), EDA_ITEM::GetPosition(), SELECTION::IsHover(), EDA_ITEM::IsMoving(), LIBEDIT, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, ACTIONS::refreshPreview, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList(), SCH_PIN_T, ACTIONS::selectionClear, SCH_PIN::SetOrientation(), EDA_ITEM::SetPosition(), SELECTION::Size(), SwappableItems, EDA_ITEM::Type(), and SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem().
Referenced by setTransitions().
| int SYMBOL_EDITOR_EDIT_TOOL::Undo | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1132 of file symbol_editor_edit_tool.cpp.
References SELECTION::Clear(), SCH_SELECTION_TOOL::GetSelection(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_toolMgr, and SCH_SELECTION_TOOL::RebuildSelection().
Referenced by setTransitions().
      
  | 
  inlineprotectedinherited | 
Similar to getView()->Update(), but also updates the SCH_SCREEN's RTree.
Similar to m_frame->SaveCopyInUndoList(), but also handles connectivity.
Definition at line 327 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextBoxProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextProperties(), and SYMBOL_EDITOR_EDIT_TOOL::Swap().
| int SYMBOL_EDITOR_EDIT_TOOL::UpdateSymbolFields | ( | const TOOL_EVENT & | aEvent | ) | 
Definition at line 1109 of file symbol_editor_edit_tool.cpp.
References _, LIB_SYMBOL::IsDerived(), SCH_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, and DIALOG_SHIM::ShowModal().
Referenced by setTransitions().
      
  | 
  inherited | 
Suspend execution of the tool until an event specified in aEventList arrives.
No parameters means waiting for any event.
Definition at line 108 of file tool_interactive.cpp.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  protectedinherited | 
Definition at line 373 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SYMBOL_EDITOR_EDIT_TOOL::ConvertStackedPins(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), SYMBOL_EDITOR_PIN_TOOL::CreateImagePins(), SYMBOL_EDITOR_PIN_TOOL::CreatePin(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SYMBOL_EDITOR_PIN_TOOL::EditPinProperties(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextBoxProperties(), SYMBOL_EDITOR_EDIT_TOOL::editTextProperties(), SYMBOL_EDITOR_EDIT_TOOL::ExplodeStackedPin(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_MOVE_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SYMBOL_EDITOR_PIN_TOOL::PlacePin(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), SYMBOL_EDITOR_PIN_TOOL::RepeatPin(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_EDIT_TOOL::Undo(), and SYMBOL_EDITOR_EDIT_TOOL::UpdateSymbolFields().
      
  | 
  protectedinherited | 
Definition at line 376 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::Init().
      
  | 
  protectedinherited | 
The functions below are not yet implemented - their interface may change.
Definition at line 125 of file tool_interactive.h.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  protectedinherited | 
Definition at line 377 of file sch_tool_base.h.
      
  | 
  protectedinherited | 
Definition at line 375 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_MOVE_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  protectedinherited | 
Unique id, assigned by a TOOL_MANAGER instance.
Definition at line 215 of file tool_base.h.
      
  | 
  protectedinherited | 
Definition at line 220 of file tool_base.h.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SYMBOL_EDITOR_EDIT_TOOL::ConvertStackedPins(), SYMBOL_EDITOR_EDIT_TOOL::CopyAsText(), SYMBOL_EDITOR_PIN_TOOL::CreateImagePins(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SYMBOL_EDITOR_EDIT_TOOL::editFieldProperties(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SYMBOL_EDITOR_EDIT_TOOL::ExplodeStackedPin(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_EDIT_TOOL::Undo().
      
  | 
  protectedinherited | 
Names are expected to obey the format application.ToolName (eg.
pcbnew.InteractiveSelection).
Definition at line 219 of file tool_base.h.
      
  | 
  protectedinherited | 
Definition at line 214 of file tool_base.h.
      
  | 
  protectedinherited | 
Definition at line 374 of file sch_tool_base.h.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
      
  | 
  static | 
Definition at line 61 of file symbol_editor_edit_tool.h.
Referenced by Init(), Swap(), and ~SYMBOL_EDITOR_EDIT_TOOL().