KiCad PCB EDA Suite
SYMBOL_EDITOR_DRAWING_TOOLS Class Reference

SYMBOL_EDITOR_DRAWING_TOOLS. More...

#include <symbol_editor_drawing_tools.h>

Inheritance diagram for SYMBOL_EDITOR_DRAWING_TOOLS:
EE_TOOL_BASE< SYMBOL_EDIT_FRAME > TOOL_INTERACTIVE TOOL_BASE

Public Types

enum  RESET_REASON { RUN, MODEL_RELOAD, GAL_SWITCH }
 Determine the reason of reset for a tool. More...
 

Public Member Functions

 SYMBOL_EDITOR_DRAWING_TOOLS ()
 
 ~SYMBOL_EDITOR_DRAWING_TOOLS () override
 
bool Init () override
 Init() is called once upon a registration of the tool. More...
 
int TwoClickPlace (const TOOL_EVENT &aEvent)
 
int DrawShape (const TOOL_EVENT &aEvent)
 
int PlaceAnchor (const TOOL_EVENT &aEvent)
 
int RepeatDrawItem (const TOOL_EVENT &aEvent)
 
void SetLastTextAngle (double aAngle)
 
double GetLastTextAngle () const
 
void SetDrawSpecificConvert (bool aSpecific)
 
bool GetDrawSpecificConvert () const
 
void SetDrawSpecificUnit (bool aSpecific)
 
bool GetDrawSpecificUnit () const
 
void Reset (RESET_REASON aReason) override
 Bring the tool to a known, initial state. More...
 
void Activate ()
 Run the tool. More...
 
TOOL_MENUGetToolMenu ()
 
void SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON)
 Assign a context menu and tells when it should be activated. More...
 
void RunMainStack (std::function< void()> aFunc)
 Call a function using the main stack. More...
 
template<class T >
void Go (int(T::*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). More...
 
TOOL_EVENTWait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
 Suspend execution of the tool until an event specified in aEventList arrives. More...
 
TOOL_TYPE GetType () const
 Return the type of the tool. More...
 
TOOL_ID GetId () const
 Return the unique identifier of the tool. More...
 
const std::string & GetName () const
 Return the name of the tool. More...
 
TOOL_MANAGERGetManager () const
 Return the instance of TOOL_MANAGER that takes care of the tool. More...
 
bool IsToolActive () const
 

Protected Member Functions

void updateItem (EDA_ITEM *aItem, bool aUpdateRTree) const
 Similar to getView()->Update(), but handles items that are redrawn by their parents and updating the SCH_SCREEN's RTree. More...
 
void saveCopyInUndoList (EDA_ITEM *aItem, UNDO_REDO aType, bool aAppend=false)
 
void attachManager (TOOL_MANAGER *aManager)
 Set the TOOL_MANAGER the tool will belong to. More...
 
KIGFX::VIEWgetView () const
 Returns the instance of #VIEW object used in the application. More...
 
KIGFX::VIEW_CONTROLSgetViewControls () const
 Return the instance of VIEW_CONTROLS object used in the application. More...
 
template<typename T >
T * getEditFrame () const
 Return the application window object, casted to requested user type. More...
 
template<typename T >
T * getModel () const
 Return the model object if it matches the requested type. More...
 

Protected Attributes

SYMBOL_EDIT_FRAMEm_frame
 
KIGFX::SCH_VIEWm_view
 
EE_SELECTION_TOOLm_selectionTool
 
bool m_isSymbolEditor
 
TOOL_MENU m_menu
 The functions below are not yet implemented - their interface may change. More...
 
TOOL_TYPE m_type
 Unique identifier for the tool, assigned by a TOOL_MANAGER instance. More...
 
TOOL_ID m_toolId
 Name of the tool. More...
 
std::string m_toolName
 
TOOL_MANAGERm_toolMgr
 

Private Member Functions

void setTransitions () override
 This method is meant to be overridden in order to specify handlers for events. More...
 

Private Attributes

double m_lastTextAngle
 
FILL_T m_lastFillStyle
 
bool m_drawSpecificConvert
 
bool m_drawSpecificUnit
 

Detailed Description

SYMBOL_EDITOR_DRAWING_TOOLS.

Tool responsible for drawing/placing items (body outlines, pins, etc.)

Definition at line 40 of file symbol_editor_drawing_tools.h.

Member Enumeration Documentation

◆ RESET_REASON

enum TOOL_BASE::RESET_REASON
inherited

Determine the reason of reset for a tool.

Enumerator
RUN 

Tool is invoked after being inactive.

MODEL_RELOAD 

Model changes (required full reload)

GAL_SWITCH 

Rendering engine changes.

Definition at line 77 of file tool_base.h.

78  {
79  RUN,
80  MODEL_RELOAD,
81  GAL_SWITCH
82  };
Model changes (required full reload)
Definition: tool_base.h:80
Tool is invoked after being inactive.
Definition: tool_base.h:79
Rendering engine changes.
Definition: tool_base.h:81

Constructor & Destructor Documentation

◆ SYMBOL_EDITOR_DRAWING_TOOLS()

SYMBOL_EDITOR_DRAWING_TOOLS::SYMBOL_EDITOR_DRAWING_TOOLS ( )

◆ ~SYMBOL_EDITOR_DRAWING_TOOLS()

SYMBOL_EDITOR_DRAWING_TOOLS::~SYMBOL_EDITOR_DRAWING_TOOLS ( )
inlineoverride

Definition at line 44 of file symbol_editor_drawing_tools.h.

44 { }

Member Function Documentation

◆ Activate()

void TOOL_INTERACTIVE::Activate ( )
inherited

Run the tool.

After activation, the tool starts receiving events until it is finished.

Definition at line 51 of file tool_interactive.cpp.

52 {
54 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:209
bool InvokeTool(TOOL_ID aToolId)
Call a tool by sending a tool activation event to tool of given ID.

References TOOL_MANAGER::InvokeTool(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.

Referenced by AUTOPLACE_TOOL::autoplace(), EDIT_TOOL::copyToClipboard(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), PAD_TOOL::EnumeratePads(), PCB_CONTROL::GridSetOrigin(), SCH_EDITOR_CONTROL::HighlightNetCursor(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), EE_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), LIB_TREE::onContextMenu(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ attachManager()

void TOOL_BASE::attachManager ( TOOL_MANAGER aManager)
protectedinherited

Set the TOOL_MANAGER the tool will belong to.

Called by TOOL_MANAGER::RegisterTool()

Definition at line 60 of file tool_base.cpp.

61 {
62  m_toolMgr = aManager;
63 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ DrawShape()

int SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape ( const TOOL_EVENT aEvent)

Definition at line 299 of file symbol_editor_drawing_tools.cpp.

300 {
301  SETTINGS_MANAGER& settingsMgr = Pgm().GetSettingsManager();
303  SHAPE_T type = aEvent.Parameter<SHAPE_T>();
304  LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
305  LIB_ITEM* item = nullptr;
306 
307  // We might be running as the same shape in another co-routine. Make sure that one
308  // gets whacked.
310 
312 
313  std::string tool = aEvent.GetCommandStr().get();
314  m_frame->PushTool( tool );
315 
316  auto setCursor =
317  [&]()
318  {
320  };
321 
322  auto cleanup =
323  [&] ()
324  {
326  m_view->ClearPreview();
327  delete item;
328  item = nullptr;
329  };
330 
331  Activate();
332  // Must be done after Activate() so that it gets set into the correct context
333  getViewControls()->ShowCursor( true );
334  // Set initial cursor
335  setCursor();
336 
337  // Prime the pump
338  if( aEvent.HasPosition() )
340 
341  // Main loop: keep receiving events
342  while( TOOL_EVENT* evt = Wait() )
343  {
344  setCursor();
345 
346  VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
347 
348  if( evt->IsCancelInteractive() )
349  {
350  if( item )
351  cleanup();
352  else
353  {
354  m_frame->PopTool( tool );
355  break;
356  }
357  }
358  else if( evt->IsActivate() )
359  {
360  if( item )
361  cleanup();
362 
363  if( evt->IsPointEditor() )
364  {
365  // don't exit (the point editor runs in the background)
366  }
367  else if( evt->IsMoveTool() )
368  {
369  // leave ourselves on the stack so we come back after the move
370  break;
371  }
372  else
373  {
374  m_frame->PopTool( tool );
375  break;
376  }
377  }
378  else if( evt->IsClick( BUT_LEFT ) && !item )
379  {
380  // Update in case the symbol was changed while the tool was running
381  symbol = m_frame->GetCurSymbol();
382 
383  if( !symbol )
384  continue;
385 
387 
388  int lineWidth = Mils2iu( settings->m_Defaults.line_width );
389 
390  item = new LIB_SHAPE( symbol, type, lineWidth, m_lastFillStyle );
391  item->SetFlags( IS_NEW );
392  item->BeginEdit( wxPoint( cursorPos.x, -cursorPos.y ) );
393 
394  if( m_drawSpecificUnit )
395  item->SetUnit( m_frame->GetUnit() );
396 
398  item->SetConvert( m_frame->GetConvert() );
399 
400  m_selectionTool->AddItemToSel( item );
401  }
402  else if( item && ( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT )
403  || evt->IsAction( &EE_ACTIONS::finishDrawing ) ) )
404  {
405  if( symbol != m_frame->GetCurSymbol() )
406  {
407  symbol = m_frame->GetCurSymbol();
408  item->SetParent( symbol );
409  }
410 
411  if( evt->IsDblClick( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::finishDrawing )
412  || !item->ContinueEdit( wxPoint( cursorPos.x, -cursorPos.y ) ) )
413  {
414  item->EndEdit();
415  item->ClearEditFlags();
416  m_view->ClearPreview();
417 
418  m_frame->SaveCopyInUndoList( symbol );
419  symbol->AddDrawItem( item );
420  item = nullptr;
421 
422  m_frame->RebuildView();
423  m_frame->OnModify();
425  }
426  }
427  else if( item && ( evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsMotion() ) )
428  {
429  item->CalcEdit( wxPoint( cursorPos.x, -cursorPos.y) );
430  m_view->ClearPreview();
431  m_view->AddToPreview( item->Clone() );
432  }
433  else if( evt->IsDblClick( BUT_LEFT ) && !item )
434  {
436  }
437  else if( evt->IsClick( BUT_RIGHT ) )
438  {
439  // Warp after context menu only if dragging...
440  if( !item )
442 
444  }
445  else
446  {
447  evt->SetPassEvent();
448  }
449 
450  // Enable autopanning and cursor capture only when there is a shape being drawn
451  getViewControls()->SetAutoPan( item != nullptr );
452  getViewControls()->CaptureCursor( item != nullptr );
453  }
454 
455  getViewControls()->SetAutoPan( false );
456  getViewControls()->CaptureCursor( false );
458  return 0;
459 }
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
static TOOL_ACTION properties
Definition: ee_actions.h:121
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
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.
static TOOL_ACTION activatePointEditor
Definition: actions.h:168
#define IS_NEW
New item, just created.
void AddToPreview(EDA_ITEM *aItem, bool aTakeOwnership=true)
Definition: view.cpp:1614
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
virtual void PushTool(const std::string &actionName)
NB: the definition of "tool" is different at the user level.
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition: eda_item.h:152
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:143
virtual void CalcEdit(const wxPoint &aPosition)
Calculate the attributes of an item at aPosition when it is being edited.
Definition: lib_item.h:135
Define a library symbol object.
Definition: lib_symbol.h:96
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
void DeactivateTool()
Deactivate the currently active tool.
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:115
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Definition: eda_item.cpp:83
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
EE_SELECTION & GetSelection()
Return the set of currently selected items.
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
virtual void PopTool(const std::string &actionName)
SHAPE_T
Definition: eda_shape.h:40
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SaveCopyInUndoList(EDA_ITEM *aItem, UNDO_REDO aUndoType=UNDO_REDO::LIBEDIT, bool aAppend=false)
Create a copy of the current symbol, and save it in the undo list.
Generic, UI-independent tool event.
Definition: tool_event.h:152
void ClearPreview()
Definition: view.cpp:1592
T * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:179
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
static TOOL_ACTION finishDrawing
Definition: ee_actions.h:108
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
void SetConvert(int aConvert)
Definition: lib_item.h:268
OPT< std::string > GetCommandStr() const
Definition: tool_event.h:460
void SetUnit(int aUnit)
Definition: lib_item.h:265
virtual bool ContinueEdit(const wxPoint &aPosition)
Continue an edit in progress at aPosition.
Definition: lib_item.h:117
int AddItemToSel(const TOOL_EVENT &aEvent)
virtual void BeginEdit(const wxPoint &aPosition)
Begin drawing a symbol library draw item at aPosition.
Definition: lib_item.h:105
void VetoContextMenuMouseWarp()
Disable mouse warping after the current context menu is closed.
Definition: tool_manager.h:422
void Activate()
Run the tool.
bool HasPosition() const
Definition: tool_event.h:240
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition: tool_base.cpp:42
void ClearEditFlags()
Definition: eda_item.h:171
virtual void EndEdit()
End an object editing action.
Definition: lib_item.h:124
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:59
static TOOL_ACTION refreshPreview
Definition: actions.h:106
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
static TOOL_ACTION cursorClick
Definition: actions.h:123

References TOOL_INTERACTIVE::Activate(), ACTIONS::activatePointEditor, EE_SELECTION_TOOL::AddItemToSel(), KIGFX::VIEW::AddToPreview(), ARROW, LIB_ITEM::BeginEdit(), BUT_LEFT, BUT_RIGHT, LIB_ITEM::CalcEdit(), KIGFX::VIEW_CONTROLS::CaptureCursor(), EDA_ITEM::ClearEditFlags(), KIGFX::VIEW::ClearPreview(), EE_ACTIONS::clearSelection, EDA_ITEM::Clone(), LIB_ITEM::ContinueEdit(), ACTIONS::cursorClick, TOOL_MANAGER::DeactivateTool(), LIB_ITEM::EndEdit(), EE_ACTIONS::finishDrawing, SETTINGS_MANAGER::GetAppSettings(), SCH_BASE_FRAME::GetCanvas(), TOOL_EVENT::GetCommandStr(), SYMBOL_EDIT_FRAME::GetConvert(), KIGFX::VIEW_CONTROLS::GetCursorPosition(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EE_SELECTION_TOOL::GetSelection(), SYMBOL_EDIT_FRAME::GetUnit(), TOOL_BASE::getViewControls(), TOOL_EVENT::HasPosition(), IS_NEW, SYMBOL_EDITOR_SETTINGS::DEFAULTS::line_width, SYMBOL_EDITOR_SETTINGS::m_Defaults, m_drawSpecificConvert, m_drawSpecificUnit, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, m_lastFillStyle, TOOL_INTERACTIVE::m_menu, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view, SYMBOL_EDIT_FRAME::OnModify(), TOOL_EVENT::Parameter(), PENCIL, Pgm(), TOOLS_HOLDER::PopTool(), EE_ACTIONS::properties, TOOLS_HOLDER::PushTool(), SYMBOL_EDIT_FRAME::RebuildView(), ACTIONS::refreshPreview, TOOL_MANAGER::RunAction(), SYMBOL_EDIT_FRAME::SaveCopyInUndoList(), KIGFX::VIEW_CONTROLS::SetAutoPan(), LIB_ITEM::SetConvert(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), EDA_ITEM::SetFlags(), EDA_ITEM::SetParent(), LIB_ITEM::SetUnit(), TOOL_MENU::ShowContextMenu(), KIGFX::VIEW_CONTROLS::ShowCursor(), TOOL_MANAGER::VetoContextMenuMouseWarp(), TOOL_INTERACTIVE::Wait(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by setTransitions().

◆ GetDrawSpecificConvert()

bool SYMBOL_EDITOR_DRAWING_TOOLS::GetDrawSpecificConvert ( ) const
inline

◆ GetDrawSpecificUnit()

bool SYMBOL_EDITOR_DRAWING_TOOLS::GetDrawSpecificUnit ( ) const
inline

◆ getEditFrame()

template<typename T >
T* TOOL_BASE::getEditFrame ( ) const
inlineprotectedinherited

Return the application window object, casted to requested user type.

Definition at line 184 of file tool_base.h.

185  {
186 #if !defined( QA_TEST ) // Dynamic casts give the linker a seizure in the test framework
187  wxASSERT( dynamic_cast<T*>( getToolHolderInt() ) );
188 #endif
189  return static_cast<T*>( getToolHolderInt() );
190  }
TOOLS_HOLDER * getToolHolderInt() const
Definition: tool_base.cpp:48

References TOOL_BASE::getToolHolderInt().

Referenced by ZONE_CREATE_HELPER::createNewZone().

◆ GetId()

TOOL_ID TOOL_BASE::GetId ( ) const
inlineinherited

Return the unique identifier of the tool.

The identifier is set by an instance of TOOL_MANAGER.

Returns
Identifier of the tool.

Definition at line 120 of file tool_base.h.

121  {
122  return m_toolId;
123  }
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:209

References TOOL_BASE::m_toolId.

Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::isActive(), TOOL_MANAGER::RegisterTool(), ACTION_MANAGER::RunHotKey(), TOOL_MANAGER::runTool(), TOOL_MANAGER::saveViewControls(), and TOOL_MANAGER::ShutdownTool().

◆ GetLastTextAngle()

double SYMBOL_EDITOR_DRAWING_TOOLS::GetLastTextAngle ( ) const
inline

Definition at line 56 of file symbol_editor_drawing_tools.h.

References m_lastTextAngle.

◆ GetManager()

TOOL_MANAGER* TOOL_BASE::GetManager ( ) const
inlineinherited

Return the instance of TOOL_MANAGER that takes care of the tool.

Returns
Instance of the TOOL_MANAGER or NULL if there is no associated tool manager.

Definition at line 143 of file tool_base.h.

144  {
145  return m_toolMgr;
146  }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214

References TOOL_BASE::m_toolMgr.

Referenced by BOARD_COMMIT::BOARD_COMMIT(), ZONE_CREATE_HELPER::commitZone(), ZONE_CREATE_HELPER::createNewZone(), PCB_TOOL_BASE::doInteractiveItemPlacement(), ACTION_MENU::getToolManager(), LIB_TREE::onContextMenu(), ZONE_CREATE_HELPER::OnFirstPoint(), ACTION_MENU::OnMenuEvent(), and ZONE_CREATE_HELPER::performZoneCutout().

◆ getModel()

template<typename T >
T* TOOL_BASE::getModel ( ) const
inlineprotectedinherited

Return the model object if it matches the requested type.

Store the type of the tool.

Definition at line 196 of file tool_base.h.

References TOOL_BASE::getModelInt().

Referenced by ZONE_CREATE_HELPER::commitZone(), and ZONE_CREATE_HELPER::createZoneFromExisting().

◆ GetName()

const std::string& TOOL_BASE::GetName ( void  ) const
inlineinherited

Return the name of the tool.

Tool names are expected to obey the format: application.ToolName (eg. pcbnew.InteractiveSelection).

Returns
The name of the tool.

Definition at line 133 of file tool_base.h.

134  {
135  return m_toolName;
136  }
std::string m_toolName
Definition: tool_base.h:213

References TOOL_BASE::m_toolName.

Referenced by TOOL_MANAGER::dispatchInternal(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::invokeTool(), TOOL_MANAGER::RegisterTool(), and TOOL_MANAGER::runTool().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Return the type of the tool.

Returns
The type of the tool.

Definition at line 108 of file tool_base.h.

109  {
110  return m_type;
111  }
TOOL_TYPE m_type
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition: tool_base.h:206

References TOOL_BASE::m_type.

Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InvokeTool(), TOOL_MANAGER::ResetTools(), TOOL_MANAGER::runTool(), and TOOL_MANAGER::ShutdownTool().

◆ getView()

KIGFX::VIEW * TOOL_BASE::getView ( ) const
protectedinherited

Returns the instance of #VIEW object used in the application.

It allows tools to draw.

Returns
The instance of VIEW.

Definition at line 36 of file tool_base.cpp.

37 {
38  return m_toolMgr->GetView();
39 }
KIGFX::VIEW * GetView() const
Definition: tool_manager.h:283
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214

References TOOL_MANAGER::GetView(), and TOOL_BASE::m_toolMgr.

Referenced by EE_POINT_EDITOR::addCornerCondition(), ALIGN_DISTRIBUTE_TOOL::AlignLeft(), ALIGN_DISTRIBUTE_TOOL::AlignRight(), COMMON_TOOLS::CenterContents(), SCH_EDIT_TOOL::ChangeTextType(), EE_INSPECTION_TOOL::CheckSymbol(), GERBVIEW_CONTROL::ClearAllLayers(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::CollectHits(), SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), COMMON_TOOLS::CursorControl(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PL_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), COMMON_TOOLS::doZoomFit(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), EE_SELECTION_TOOL::GetNode(), ROUTER_TOOL::getStartLayer(), PCB_CONTROL::GridResetOrigin(), PCB_CONTROL::GridSetOrigin(), ROUTER_TOOL::handleCommonEvents(), PL_SELECTION_TOOL::highlight(), EE_SELECTION_TOOL::highlight(), PCB_SELECTION_TOOL::highlight(), GERBVIEW_CONTROL::HighlightControl(), PNS::TOOL_BASE::highlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), PCB_SELECTION_TOOL::hitTestDistance(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineDrag(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), PL_EDIT_TOOL::moveItem(), SCH_MOVE_TOOL::moveItem(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), ROUTER_TOOL::performRouting(), PNS::TOOL_BASE::pickSingleItem(), BOARD_EDITOR_CONTROL::PlaceFootprint(), PL_DRAWING_TOOLS::PlaceItem(), BOARD_EDITOR_CONTROL::PlaceTarget(), ROUTER_TOOL::prepareInteractive(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EDIT_TOOL::Remove(), BOARD_EDITOR_CONTROL::Reset(), PNS::TOOL_BASE::Reset(), PCB_CONTROL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), DRAWING_TOOL::Reset(), EE_SELECTION_TOOL::Reset(), PCB_SELECTION_TOOL::Reset(), EE_TOOL_BASE< SCH_BASE_FRAME >::Reset(), SCH_EDIT_TOOL::Rotate(), GERBVIEW_SELECTION_TOOL::select(), GERBVIEW_SELECTION_TOOL::selectable(), PCB_SELECTION_TOOL::Selectable(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::SelectAll(), PL_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), PL_SELECTION_TOOL::unhighlight(), EE_SELECTION_TOOL::unhighlight(), PCB_SELECTION_TOOL::unhighlight(), GERBVIEW_SELECTION_TOOL::unselect(), GERBVIEW_SELECTION_TOOL::unselectVisually(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), SCH_EDITOR_CONTROL::UpdateFind(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< SCH_BASE_FRAME >::updateItem(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), PCB_SELECTION_TOOL::updateSelection(), PNS::TOOL_BASE::updateStartItem(), PCB_VIEWER_TOOLS::view(), PCB_TOOL_BASE::view(), PCB_SELECTION_TOOL::zoomFitSelection(), EE_SELECTION_TOOL::~EE_SELECTION_TOOL(), GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL(), and PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL().

◆ getViewControls()

KIGFX::VIEW_CONTROLS * TOOL_BASE::getViewControls ( ) const
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.).

Returns
The instance of VIEW_CONTROLS.

Definition at line 42 of file tool_base.cpp.

43 {
44  return m_toolMgr->GetViewControls();
45 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
KIGFX::VIEW_CONTROLS * GetViewControls() const
Definition: tool_manager.h:285

References TOOL_MANAGER::GetViewControls(), and TOOL_BASE::m_toolMgr.

Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), SCH_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_TOOL::BreakWire(), PCB_TOOL_BASE::controls(), EDIT_TOOL::copyToClipboard(), SCH_DRAWING_TOOLS::createSheetPin(), COMMON_TOOLS::CursorControl(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), SCH_DRAWING_TOOLS::GetCanvasFreeAreaPixels(), BOARD_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), EE_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), ROUTER_TOOL::performDragging(), LENGTH_TUNER_TOOL::performTuning(), PlaceAnchor(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EDIT_TOOL::Remove(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), PCB_POINT_EDITOR::Reset(), DRAWING_TOOL::Reset(), COMMON_TOOLS::ResetLocalCoords(), GERBVIEW_SELECTION_TOOL::selectCursor(), PCB_SELECTION_TOOL::selectCursor(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::SelectNode(), ZOOM_TOOL::selectRegion(), ALIGN_DISTRIBUTE_TOOL::selectTarget(), PCB_PICKER_TOOL::setControls(), PICKER_TOOL::setControls(), PL_POINT_EDITOR::setEditedPoint(), EE_POINT_EDITOR::setEditedPoint(), PCB_POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateItem(), PL_EDIT_TOOL::updateModificationPoint(), and COMMON_TOOLS::ZoomCenter().

◆ Go()

template<class T >
void TOOL_INTERACTIVE::Go ( int(T::*)(const TOOL_EVENT &)  aStateFunc,
const TOOL_EVENT_LIST aConditions = TOOL_EVENTTC_ANYTA_ANY ) 
)
inherited

Define which state (aStateFunc) to go when a certain event arrives (aConditions).

No conditions means any event.

Definition at line 147 of file tool_interactive.h.

149 {
150  TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
151 
152  goInternal( sptr, aConditions );
153 }
std::function< int(const TOOL_EVENT &)> TOOL_STATE_FUNC
Definition: tool_base.h:58
void goInternal(TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions)

References TOOL_INTERACTIVE::goInternal().

Referenced by AUTOPLACE_TOOL::setTransitions(), ZOOM_TOOL::setTransitions(), LENGTH_TUNER_TOOL::setTransitions(), BOARD_REANNOTATE_TOOL::setTransitions(), GERBVIEW_INSPECTION_TOOL::setTransitions(), PCB_PICKER_TOOL::setTransitions(), SCH_NAVIGATE_TOOL::setTransitions(), SYMBOL_EDITOR_PIN_TOOL::setTransitions(), SYMBOL_EDITOR_MOVE_TOOL::setTransitions(), PL_DRAWING_TOOLS::setTransitions(), EE_POINT_EDITOR::setTransitions(), PL_POINT_EDITOR::setTransitions(), ROUTER_TOOL::setTransitions(), SCRIPTING_TOOL::setTransitions(), COMMON_CONTROL::setTransitions(), KICAD_MANAGER_CONTROL::setTransitions(), CONVERT_TOOL::setTransitions(), setTransitions(), ZONE_FILLER_TOOL::setTransitions(), PCB_VIEWER_TOOLS::setTransitions(), MICROWAVE_TOOL::setTransitions(), EE_INSPECTION_TOOL::setTransitions(), PCB_POINT_EDITOR::setTransitions(), GERBVIEW_CONTROL::setTransitions(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::setTransitions(), PAD_TOOL::setTransitions(), GLOBAL_EDIT_TOOL::setTransitions(), GROUP_TOOL::setTransitions(), PL_EDITOR_CONTROL::setTransitions(), SYMBOL_EDITOR_EDIT_TOOL::setTransitions(), SYMBOL_EDITOR_CONTROL::setTransitions(), PL_EDIT_TOOL::setTransitions(), POSITION_RELATIVE_TOOL::setTransitions(), GERBVIEW_SELECTION_TOOL::setTransitions(), SCH_DRAWING_TOOLS::setTransitions(), SCH_MOVE_TOOL::setTransitions(), SCH_EDIT_TOOL::setTransitions(), FOOTPRINT_EDITOR_CONTROL::setTransitions(), ALIGN_DISTRIBUTE_TOOL::setTransitions(), COMMON_TOOLS::setTransitions(), DRC_TOOL::setTransitions(), EDA_3D_CONTROLLER::setTransitions(), PCB_CONTROL::setTransitions(), CVPCB_ASSOCIATION_TOOL::setTransitions(), SCH_LINE_WIRE_BUS_TOOL::setTransitions(), CVPCB_CONTROL::setTransitions(), BOARD_INSPECTION_TOOL::setTransitions(), BOARD_EDITOR_CONTROL::setTransitions(), PICKER_TOOL::setTransitions(), EDIT_TOOL::setTransitions(), PCB_SELECTION_TOOL::setTransitions(), PL_SELECTION_TOOL::setTransitions(), DRAWING_TOOL::setTransitions(), SCH_EDITOR_CONTROL::setTransitions(), and EE_SELECTION_TOOL::setTransitions().

◆ Init()

bool SYMBOL_EDITOR_DRAWING_TOOLS::Init ( )
overridevirtual

Init() is called once upon a registration of the tool.

Returns
True if the initialization went fine, false - otherwise.

Reimplemented from TOOL_BASE.

Definition at line 52 of file symbol_editor_drawing_tools.cpp.

53 {
55 
56  auto isDrawingCondition =
57  [] ( const SELECTION& aSel )
58  {
59  LIB_ITEM* item = (LIB_ITEM*) aSel.Front();
60  return item && item->IsNew();
61  };
62 
63  m_menu.GetMenu().AddItem( EE_ACTIONS::finishDrawing, isDrawingCondition, 2 );
64 
65  return true;
66 }
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:46
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
bool IsNew() const
Definition: eda_item.h:118
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:66
static TOOL_ACTION finishDrawing
Definition: ee_actions.h:108
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Add a menu entry to run a TOOL_ACTION on selected items.

References CONDITIONAL_MENU::AddItem(), EE_ACTIONS::finishDrawing, TOOL_MENU::GetMenu(), EE_TOOL_BASE< T >::Init(), EDA_ITEM::IsNew(), and TOOL_INTERACTIVE::m_menu.

◆ IsToolActive()

bool TOOL_BASE::IsToolActive ( ) const
inherited

Definition at line 31 of file tool_base.cpp.

32 {
33  return m_toolMgr->IsToolActive( m_toolId );
34 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:209
bool IsToolActive(TOOL_ID aId) const
Return true if a tool with given id is active (executing)

References TOOL_MANAGER::IsToolActive(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.

Referenced by EDIT_TOOL::Drag(), ROUTER_TOOL::handleLayerSwitch(), EDIT_TOOL::isRouterActive(), PCB_SELECTION_TOOL::Main(), BOARD_EDITOR_CONTROL::TrackWidthDec(), and BOARD_EDITOR_CONTROL::TrackWidthInc().

◆ PlaceAnchor()

int SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor ( const TOOL_EVENT aEvent)

Definition at line 462 of file symbol_editor_drawing_tools.cpp.

463 {
464  std::string tool = aEvent.GetCommandStr().get();
465  m_frame->PushTool( tool );
466 
467  auto setCursor =
468  [&]()
469  {
471  };
472 
473  Activate();
474  // Must be done after Activate() so that it gets set into the correct context
475  getViewControls()->ShowCursor( true );
476  // Set initial cursor
477  setCursor();
478 
479  // Main loop: keep receiving events
480  while( TOOL_EVENT* evt = Wait() )
481  {
482  setCursor();
483 
484  if( evt->IsCancelInteractive() )
485  {
486  m_frame->PopTool( tool );
487  break;
488  }
489  else if( evt->IsActivate() )
490  {
491  m_frame->PopTool( tool );
492  break;
493  }
494  else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
495  {
496  LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
497 
498  if( !symbol )
499  continue;
500 
501  VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
502  wxPoint offset( -cursorPos.x, cursorPos.y );
503 
504  symbol->SetOffset( offset );
505 
506  // Refresh the view without changing the viewport
507  auto center = m_view->GetCenter();
508  center.x += offset.x;
509  center.y -= offset.y;
510  m_view->SetCenter( center );
512  m_frame->OnModify();
513  }
514  else if( evt->IsClick( BUT_RIGHT ) )
515  {
517  }
518  else
519  {
520  evt->SetPassEvent();
521  }
522  }
523 
525  return 0;
526 }
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
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.
void SetOffset(const wxPoint &aOffset)
Move the symbol aOffset.
const VECTOR2D & GetCenter() const
Return the center point of this VIEW (in world space coordinates).
Definition: view.h:334
void RecacheAllItems()
Rebuild GAL display lists.
Definition: view.cpp:1385
virtual void PushTool(const std::string &actionName)
NB: the definition of "tool" is different at the user level.
Define a library symbol object.
Definition: lib_symbol.h:96
EE_SELECTION & GetSelection()
Return the set of currently selected items.
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
Definition: view.cpp:578
virtual void PopTool(const std::string &actionName)
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Generic, UI-independent tool event.
Definition: tool_event.h:152
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:179
OPT< std::string > GetCommandStr() const
Definition: tool_event.h:460
void Activate()
Run the tool.
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition: tool_base.cpp:42
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:59
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.

References TOOL_INTERACTIVE::Activate(), ARROW, BULLSEYE, BUT_LEFT, BUT_RIGHT, SCH_BASE_FRAME::GetCanvas(), KIGFX::VIEW::GetCenter(), TOOL_EVENT::GetCommandStr(), KIGFX::VIEW_CONTROLS::GetCursorPosition(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EE_SELECTION_TOOL::GetSelection(), TOOL_BASE::getViewControls(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, TOOL_INTERACTIVE::m_menu, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view, SYMBOL_EDIT_FRAME::OnModify(), TOOLS_HOLDER::PopTool(), TOOLS_HOLDER::PushTool(), KIGFX::VIEW::RecacheAllItems(), KIGFX::VIEW::SetCenter(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), LIB_SYMBOL::SetOffset(), TOOL_MENU::ShowContextMenu(), KIGFX::VIEW_CONTROLS::ShowCursor(), TOOL_INTERACTIVE::Wait(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by setTransitions().

◆ RepeatDrawItem()

int SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem ( const TOOL_EVENT aEvent)

Definition at line 529 of file symbol_editor_drawing_tools.cpp.

530 {
532  LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
533  LIB_PIN* sourcePin = nullptr;
534 
535  if( !symbol )
536  return 0;
537 
538  // See if we have a pin matching our weak ptr
539  for( LIB_PIN* test = symbol->GetNextPin(); test; test = symbol->GetNextPin( test ) )
540  {
541  if( (void*) test == g_lastPinWeakPtr )
542  sourcePin = test;
543  }
544 
545  if( sourcePin )
546  {
547  LIB_PIN* pin = pinTool->RepeatPin( sourcePin );
549 
551 
552  if( pin )
554  }
555 
556  return 0;
557 }
LIB_PIN * RepeatPin(const LIB_PIN *aSourcePin)
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:143
Define a library symbol object.
Definition: lib_symbol.h:96
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
static TOOL_ACTION addItemToSel
Selects an item (specified as the event parameter).
Definition: ee_actions.h:59
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
static void * g_lastPinWeakPtr

References EE_ACTIONS::addItemToSel, EE_ACTIONS::clearSelection, g_lastPinWeakPtr, SYMBOL_EDIT_FRAME::GetCurSymbol(), TOOL_MANAGER::GetTool(), EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, TOOL_BASE::m_toolMgr, pin, SYMBOL_EDITOR_PIN_TOOL::RepeatPin(), and TOOL_MANAGER::RunAction().

Referenced by setTransitions().

◆ Reset()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::Reset ( RESET_REASON  aReason)
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.

Parameters
aReasoncontains information about the reason of tool reset.

Implements TOOL_BASE.

Definition at line 86 of file ee_tool_base.h.

87  {
88  if( aReason == MODEL_RELOAD )
89  {
90  // Init variables used by every drawing tool
91  m_frame = getEditFrame<T>();
92  m_isSymbolEditor = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame ) != nullptr;
93  }
94 
95  m_view = static_cast<KIGFX::SCH_VIEW*>( getView() );
96  }
Model changes (required full reload)
Definition: tool_base.h:80
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36

◆ RunMainStack()

void TOOL_INTERACTIVE::RunMainStack ( std::function< void()>  aFunc)
inherited

Call a function using the main stack.

Parameters
aFuncis the function to be calls.

Definition at line 87 of file tool_interactive.cpp.

88 {
89  m_toolMgr->RunMainStack( this, std::move( aFunc ) );
90 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
void RunMainStack(TOOL_BASE *aTool, std::function< void()> aFunc)

References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::RunMainStack().

Referenced by DRAWING_TOOL::PlaceText().

◆ saveCopyInUndoList()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::saveCopyInUndoList ( EDA_ITEM aItem,
UNDO_REDO  aType,
bool  aAppend = false 
)
inlineprotectedinherited

Definition at line 134 of file ee_tool_base.h.

135  {
136  wxASSERT( aItem );
137 
138  KICAD_T itemType = aItem->Type();
139  bool selected = aItem->IsSelected();
140 
141  // IS_SELECTED flag should not be set on undo items which were added for
142  // a drag operation.
143  if( selected && aItem->HasFlag( TEMP_SELECTED ) )
144  aItem->ClearSelected();
145 
146  if( m_isSymbolEditor )
147  {
148  SYMBOL_EDIT_FRAME* editFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
149  wxASSERT( editFrame );
150 
151  editFrame->SaveCopyInUndoList( static_cast<LIB_ITEM*>( aItem ), aType, aAppend );
152  }
153  else
154  {
155  SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
156  wxASSERT( editFrame );
157 
158  if( itemType == SCH_PIN_T || itemType == SCH_FIELD_T || itemType == SCH_SHEET_PIN_T )
159  {
160  editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
161  static_cast<SCH_ITEM*>( aItem->GetParent() ),
162  UNDO_REDO::CHANGED, aAppend );
163  }
164  else
165  {
166  editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
167  static_cast<SCH_ITEM*>( aItem ),
168  aType, aAppend );
169  }
170  }
171 
172  if( selected && aItem->HasFlag( TEMP_SELECTED ) )
173  aItem->SetSelected();
174  }
bool IsSelected() const
Definition: eda_item.h:122
void ClearSelected()
Definition: eda_item.h:131
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
Definition: eda_item.h:155
Schematic editor (Eeschema) main window.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:77
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void SetSelected()
Definition: eda_item.h:128
void SaveCopyInUndoList(EDA_ITEM *aItem, UNDO_REDO aUndoType=UNDO_REDO::LIBEDIT, bool aAppend=false)
Create a copy of the current symbol, and save it in the undo list.
EDA_ITEM * GetParent() const
Definition: eda_item.h:114
#define TEMP_SELECTED
flag indicating that the structure has already selected
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend)
Create a copy of the current schematic item, and put it in the undo list.
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:112
The symbol library editor main window.

◆ SetContextMenu()

void TOOL_INTERACTIVE::SetContextMenu ( ACTION_MENU aMenu,
CONTEXT_MENU_TRIGGER  aTrigger = CMENU_BUTTON 
)
inherited

Assign a context menu and tells when it should be activated.

Parameters
aMenuis the menu to be assigned.
aTriggerdetermines conditions upon which the context menu is activated.

Definition at line 76 of file tool_interactive.cpp.

77 {
78  if( aMenu )
79  aMenu->SetTool( this );
80  else
81  aTrigger = CMENU_OFF;
82 
83  m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger );
84 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
void SetTool(TOOL_INTERACTIVE *aTool)
Set a tool that is the creator of the menu.
void ScheduleContextMenu(TOOL_BASE *aTool, ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger)
Set behavior of the tool's context popup menu.

References CMENU_OFF, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ScheduleContextMenu(), and ACTION_MENU::SetTool().

Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), TOOL_MENU::ShowContextMenu(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ SetDrawSpecificConvert()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificConvert ( bool  aSpecific)
inline

◆ SetDrawSpecificUnit()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificUnit ( bool  aSpecific)
inline

◆ SetLastTextAngle()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetLastTextAngle ( double  aAngle)
inline

Definition at line 55 of file symbol_editor_drawing_tools.h.

References m_lastTextAngle.

◆ setTransitions()

void SYMBOL_EDITOR_DRAWING_TOOLS::setTransitions ( )
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 560 of file symbol_editor_drawing_tools.cpp.

561 {
570 }
static TOOL_ACTION placeSymbolText
Definition: ee_actions.h:102
static TOOL_ACTION drawSymbolLines
Definition: ee_actions.h:106
int PlaceAnchor(const TOOL_EVENT &aEvent)
void Go(int(T::*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).
static TOOL_ACTION drawSymbolRectangle
Definition: ee_actions.h:103
int RepeatDrawItem(const TOOL_EVENT &aEvent)
static TOOL_ACTION placeSymbolPin
Definition: ee_actions.h:101
int DrawShape(const TOOL_EVENT &aEvent)
static TOOL_ACTION repeatDrawItem
Definition: ee_actions.h:116
static TOOL_ACTION drawSymbolCircle
Definition: ee_actions.h:104
int TwoClickPlace(const TOOL_EVENT &aEvent)
static TOOL_ACTION drawSymbolArc
Definition: ee_actions.h:105
static TOOL_ACTION placeSymbolAnchor
Definition: ee_actions.h:107

References DrawShape(), EE_ACTIONS::drawSymbolArc, EE_ACTIONS::drawSymbolCircle, EE_ACTIONS::drawSymbolLines, EE_ACTIONS::drawSymbolRectangle, TOOL_INTERACTIVE::Go(), PlaceAnchor(), EE_ACTIONS::placeSymbolAnchor, EE_ACTIONS::placeSymbolPin, EE_ACTIONS::placeSymbolText, RepeatDrawItem(), EE_ACTIONS::repeatDrawItem, and TwoClickPlace().

◆ TwoClickPlace()

int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace ( const TOOL_EVENT aEvent)

Definition at line 69 of file symbol_editor_drawing_tools.cpp.

70 {
71  KICAD_T type = aEvent.Parameter<KICAD_T>();
72  auto* settings = Pgm().GetSettingsManager().GetAppSettings<SYMBOL_EDITOR_SETTINGS>();
73  auto* pinTool = type == LIB_PIN_T ? m_toolMgr->GetTool<SYMBOL_EDITOR_PIN_TOOL>() : nullptr;
74 
77  VECTOR2I cursorPos;
78  bool ignorePrimePosition = false;
79  LIB_ITEM* item = nullptr;
80  bool isText = aEvent.IsAction( &EE_ACTIONS::placeSymbolText );
81 
83 
84  std::string tool = aEvent.GetCommandStr().get();
85  m_frame->PushTool( tool );
86 
87  auto setCursor =
88  [&]()
89  {
90  if( item )
92  else if( isText )
94  else
96  };
97 
98  Activate();
99  // Must be done after Activate() so that it gets set into the correct context
100  controls->ShowCursor( true );
101  // Set initial cursor
102  setCursor();
103 
104  // Prime the pump
105  if( aEvent.HasPosition() )
106  {
107  m_toolMgr->PrimeTool( aEvent.Position() );
108  }
109  else if( !aEvent.IsReactivate() && isText )
110  {
111  m_toolMgr->PrimeTool( { 0, 0 } );
112  ignorePrimePosition = true;
113  }
114 
115  // Main loop: keep receiving events
116  while( TOOL_EVENT* evt = Wait() )
117  {
118  setCursor();
119  grid.SetSnap( !evt->Modifier( MD_SHIFT ) );
120  grid.SetUseGrid( getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
121 
122  cursorPos = grid.Align( controls->GetMousePosition() );
123  controls->ForceCursorPosition( true, cursorPos );
124 
125  auto cleanup =
126  [&] ()
127  {
129  m_view->ClearPreview();
130  delete item;
131  item = nullptr;
132  };
133 
134  if( evt->IsCancelInteractive() )
135  {
136  m_frame->GetInfoBar()->Dismiss();
137 
138  if( item )
139  {
140  cleanup();
141  }
142  else
143  {
144  m_frame->PopTool( tool );
145  break;
146  }
147  }
148  else if( evt->IsActivate() )
149  {
150  if( item && evt->IsMoveTool() )
151  {
152  // we're already moving our own item; ignore the move tool
153  evt->SetPassEvent( false );
154  continue;
155  }
156 
157  if( item )
158  {
159  m_frame->ShowInfoBarMsg( _( "Press <ESC> to cancel item creation." ) );
160  evt->SetPassEvent( false );
161  continue;
162  }
163 
164  if( evt->IsPointEditor() )
165  {
166  // don't exit (the point editor runs in the background)
167  }
168  else if( evt->IsMoveTool() )
169  {
170  break;
171  }
172  else
173  {
174  m_frame->PopTool( tool );
175  break;
176  }
177  }
178  else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
179  {
180  LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
181 
182  if( !symbol )
183  continue;
184 
185  // First click creates...
186  if( !item )
187  {
189 
190  switch( type )
191  {
192  case LIB_PIN_T:
193  {
194  item = pinTool->CreatePin( wxPoint( cursorPos.x, -cursorPos.y ), symbol );
195  g_lastPinWeakPtr = item;
196  break;
197  }
198  case LIB_TEXT_T:
199  {
200  LIB_TEXT* text = new LIB_TEXT( symbol );
201 
202  text->SetPosition( wxPoint( cursorPos.x, -cursorPos.y ) );
203  text->SetTextSize( wxSize( Mils2iu( settings->m_Defaults.text_size ),
204  Mils2iu( settings->m_Defaults.text_size ) ) );
205  text->SetTextAngle( m_lastTextAngle );
206 
208 
209  if( dlg.ShowModal() != wxID_OK || NoPrintableChars( text->GetText() ) )
210  delete text;
211  else
212  item = text;
213 
214  break;
215  }
216  default:
217  wxFAIL_MSG( wxT( "TwoClickPlace(): unknown type" ) );
218  }
219 
220  // If we started with a click on a tool button or menu then continue with the
221  // current mouse position. Otherwise warp back to the original click position.
222  if( evt->IsPrime() && ignorePrimePosition )
223  cursorPos = grid.Align( controls->GetMousePosition() );
224  else
225  controls->WarpCursor( cursorPos, true );
226 
227  if( item )
228  {
229  item->SetPosition( wxPoint( cursorPos.x, -cursorPos.y ) );
230 
231  item->SetFlags( IS_NEW | IS_MOVING );
232  m_view->ClearPreview();
233  m_view->AddToPreview( item->Clone() );
234  m_selectionTool->AddItemToSel( item );
235 
236  // update the cursor so it looks correct before another event
237  setCursor();
238  }
239 
240  controls->SetCursorPosition( cursorPos, false );
241  }
242  // ... and second click places:
243  else
244  {
245  m_frame->SaveCopyInUndoList( symbol );
246 
247  switch( item->Type() )
248  {
249  case LIB_PIN_T:
250  pinTool->PlacePin( (LIB_PIN*) item );
251  break;
252  case LIB_TEXT_T:
253  symbol->AddDrawItem( (LIB_TEXT*) item );
254  break;
255  default:
256  wxFAIL_MSG( wxT( "TwoClickPlace(): unknown type" ) );
257  }
258 
259  item->ClearEditFlags();
260  item = nullptr;
261  m_view->ClearPreview();
262 
263  m_frame->RebuildView();
264  m_frame->OnModify();
265  }
266  }
267  else if( evt->IsClick( BUT_RIGHT ) )
268  {
269  // Warp after context menu only if dragging...
270  if( !item )
272 
274  }
275  else if( item && ( evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsMotion() ) )
276  {
277  item->SetPosition( wxPoint( cursorPos.x, -cursorPos.y ) );
278  m_view->ClearPreview();
279  m_view->AddToPreview( item->Clone() );
280  }
281  else
282  {
283  evt->SetPassEvent();
284  }
285 
286  // Enable autopanning and cursor capture only when there is an item to be placed
287  controls->SetAutoPan( item != nullptr );
288  controls->CaptureCursor( item != nullptr );
289  }
290 
291  controls->SetAutoPan( false );
292  controls->CaptureCursor( false );
293  controls->ForceCursorPosition( false );
295  return 0;
296 }
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
static TOOL_ACTION placeSymbolText
Definition: ee_actions.h:102
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
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.
#define IS_NEW
New item, just created.
Define a symbol library graphical text item.
Definition: lib_text.h:39
void AddToPreview(EDA_ITEM *aItem, bool aTakeOwnership=true)
Definition: view.cpp:1614
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
virtual void PushTool(const std::string &actionName)
NB: the definition of "tool" is different at the user level.
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition: eda_item.h:152
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:143
void PrimeTool(const VECTOR2D &aPosition)
"Prime" a tool by sending a cursor left-click event with the mouse position set to the passed in posi...
Define a library symbol object.
Definition: lib_symbol.h:96
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:77
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Definition: eda_item.cpp:83
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
bool IsAction(const TOOL_ACTION *aAction) const
Test if the event contains an action issued upon activation of the given TOOL_ACTION.
Definition: tool_event.cpp:88
EE_SELECTION & GetSelection()
Return the set of currently selected items.
void ShowInfoBarMsg(const wxString &aMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an info icon on the left of...
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Definition: infobar.cpp:175
#define IS_MOVING
Item being moved.
virtual void PopTool(const std::string &actionName)
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SaveCopyInUndoList(EDA_ITEM *aItem, UNDO_REDO aUndoType=UNDO_REDO::LIBEDIT, bool aAppend=false)
Create a copy of the current symbol, and save it in the undo list.
Generic, UI-independent tool event.
Definition: tool_event.h:152
void ClearPreview()
Definition: view.cpp:1592
An interface for classes handling user events controlling the view behavior such as zooming,...
#define _(s)
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:179
void AddDrawItem(LIB_ITEM *aItem, bool aSort=true)
Add a new draw aItem to the draw object list and sort according to aSort.
Definition: lib_symbol.cpp:716
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36
OPT< std::string > GetCommandStr() const
Definition: tool_event.h:460
static void * g_lastPinWeakPtr
int AddItemToSel(const TOOL_EVENT &aEvent)
void VetoContextMenuMouseWarp()
Disable mouse warping after the current context menu is closed.
Definition: tool_manager.h:422
bool IsReactivate() const
Definition: tool_event.h:252
void Activate()
Run the tool.
WX_INFOBAR * GetInfoBar()
void SetPosition(const wxPoint &aPosition) override
Definition: lib_item.h:230
bool HasPosition() const
Definition: tool_event.h:240
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: lib_text.cpp:72
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition: tool_base.cpp:42
void ClearEditFlags()
Definition: eda_item.h:171
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:59
bool NoPrintableChars(const wxString &aString)
Return true if the string is empty or contains only whitespace.
const VECTOR2D Position() const
Returns the point where dragging has started.
Definition: tool_event.h:263
static TOOL_ACTION refreshPreview
Definition: actions.h:106
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:112

References _, TOOL_INTERACTIVE::Activate(), LIB_SYMBOL::AddDrawItem(), EE_SELECTION_TOOL::AddItemToSel(), KIGFX::VIEW::AddToPreview(), ARROW, BUT_LEFT, BUT_RIGHT, EDA_ITEM::ClearEditFlags(), KIGFX::VIEW::ClearPreview(), EE_ACTIONS::clearSelection, EDA_ITEM::Clone(), WX_INFOBAR::Dismiss(), g_lastPinWeakPtr, SCH_BASE_FRAME::GetCanvas(), TOOL_EVENT::GetCommandStr(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EDA_BASE_FRAME::GetInfoBar(), EE_SELECTION_TOOL::GetSelection(), TOOL_MANAGER::GetTool(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), grid, TOOL_EVENT::HasPosition(), IS_MOVING, IS_NEW, TOOL_EVENT::IsAction(), TOOL_EVENT::IsReactivate(), LIB_PIN_T, LIB_TEXT_T, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, m_lastTextAngle, TOOL_INTERACTIVE::m_menu, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view, MD_SHIFT, NoPrintableChars(), SYMBOL_EDIT_FRAME::OnModify(), TOOL_EVENT::Parameter(), PENCIL, Pgm(), PLACE, EE_ACTIONS::placeSymbolText, TOOLS_HOLDER::PopTool(), TOOL_EVENT::Position(), TOOL_MANAGER::PrimeTool(), TOOLS_HOLDER::PushTool(), SYMBOL_EDIT_FRAME::RebuildView(), ACTIONS::refreshPreview, TOOL_MANAGER::RunAction(), SYMBOL_EDIT_FRAME::SaveCopyInUndoList(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), EDA_ITEM::SetFlags(), LIB_ITEM::SetPosition(), TOOL_MENU::ShowContextMenu(), EDA_BASE_FRAME::ShowInfoBarMsg(), TEXT, text, EDA_ITEM::Type(), TOOL_MANAGER::VetoContextMenuMouseWarp(), TOOL_INTERACTIVE::Wait(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by setTransitions().

◆ updateItem()

void EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::updateItem ( EDA_ITEM aItem,
bool  aUpdateRTree 
) const
inlineprotectedinherited

Similar to getView()->Update(), but handles items that are redrawn by their parents and updating the SCH_SCREEN's RTree.

Similar to m_frame->SaveCopyInUndoList(), but handles items that are owned by their parents.

Definition at line 103 of file ee_tool_base.h.

◆ Wait()

TOOL_EVENT * TOOL_INTERACTIVE::Wait ( const TOOL_EVENT_LIST aEventList = TOOL_EVENTTC_ANYTA_ANY ))
inherited

Suspend execution of the tool until an event specified in aEventList arrives.

No parameters means waiting for any event.

Definition at line 57 of file tool_interactive.cpp.

58 {
59  return m_toolMgr->ScheduleWait( this, aEventList );
60 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
TOOL_EVENT * ScheduleWait(TOOL_BASE *aTool, const TOOL_EVENT_LIST &aConditions)
Pause execution of a given tool until one or more events matching aConditions arrives.

References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::ScheduleWait().

Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), CVPCB_CONTROL::Main(), PL_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_SELECTION_TOOL::Main(), EDA_3D_CONTROLLER::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

Member Data Documentation

◆ m_drawSpecificConvert

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_drawSpecificConvert
private

◆ m_drawSpecificUnit

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_drawSpecificUnit
private

◆ m_frame

SYMBOL_EDIT_FRAME * EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame
protectedinherited

Definition at line 177 of file ee_tool_base.h.

◆ m_isSymbolEditor

bool EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_isSymbolEditor
protectedinherited

Definition at line 180 of file ee_tool_base.h.

◆ m_lastFillStyle

FILL_T SYMBOL_EDITOR_DRAWING_TOOLS::m_lastFillStyle
private

Definition at line 69 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastTextAngle

double SYMBOL_EDITOR_DRAWING_TOOLS::m_lastTextAngle
private

Definition at line 68 of file symbol_editor_drawing_tools.h.

Referenced by GetLastTextAngle(), SetLastTextAngle(), and TwoClickPlace().

◆ m_menu

TOOL_MENU TOOL_INTERACTIVE::m_menu
protectedinherited

The functions below are not yet implemented - their interface may change.

Definition at line 125 of file tool_interactive.h.

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), ROUTER_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), PAD_TOOL::Init(), PL_DRAWING_TOOLS::Init(), Init(), SYMBOL_EDITOR_CONTROL::Init(), PCB_VIEWER_TOOLS::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PL_SELECTION_TOOL::Init(), SCH_DRAWING_TOOLS::Init(), BOARD_EDITOR_CONTROL::Init(), GERBVIEW_SELECTION_TOOL::Init(), EDA_3D_CONTROLLER::Init(), DRAWING_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), PCB_SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), PCB_TOOL_BASE::Init(), PICKER_TOOL::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), PCB_PICKER_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), EDA_3D_CONTROLLER::Main(), PL_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), TwoClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().

◆ m_selectionTool

EE_SELECTION_TOOL* EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool
protectedinherited

Definition at line 179 of file ee_tool_base.h.

◆ m_toolId

TOOL_ID TOOL_BASE::m_toolId
protectedinherited

Name of the tool.

Names are expected to obey the format application.ToolName (eg. pcbnew.InteractiveSelection).

Definition at line 209 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), TOOL_BASE::GetId(), and TOOL_BASE::IsToolActive().

◆ m_toolMgr

TOOL_MANAGER* TOOL_BASE::m_toolMgr
protectedinherited

Definition at line 214 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), PL_SELECTION_TOOL::AddItemsToSel(), EE_SELECTION_TOOL::AddItemsToSel(), PL_SELECTION_TOOL::AddItemToSel(), PCB_SELECTION_TOOL::AddItemToSel(), EE_SELECTION_TOOL::AddItemToSel(), SCH_MOVE_TOOL::AlignElements(), SCH_EDITOR_CONTROL::AssignNetclass(), CVPCB_ASSOCIATION_TOOL::Associate(), TOOL_BASE::attachManager(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::BreakWire(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), GERBVIEW_CONTROL::ClearAllLayers(), BOARD_INSPECTION_TOOL::ClearHighlight(), SCH_EDITOR_CONTROL::ClearHighlight(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), GERBVIEW_SELECTION_TOOL::clearSelection(), EE_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), PL_EDIT_TOOL::Copy(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), PAD_TOOL::copyPadSettings(), EDIT_TOOL::copyToClipboard(), EDIT_TOOL::CreateArray(), MICROWAVE_TOOL::createInductorBetween(), DRC_TOOL::CrossProbe(), BOARD_INSPECTION_TOOL::CrossProbePcbToSch(), COMMON_TOOLS::CursorControl(), SCH_EDITOR_CONTROL::Cut(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), BOARD_INSPECTION_TOOL::doHideNet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::Drag(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawRectangle(), DRAWING_TOOL::drawSegment(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), PAD_TOOL::EditPad(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), GROUP_TOOL::EnterGroup(), SCH_NAVIGATE_TOOL::EnterSheet(), SCH_EDITOR_CONTROL::EnterSheet(), PAD_TOOL::EnumeratePads(), EE_INSPECTION_TOOL::ExcludeMarker(), PCB_SELECTION_TOOL::expandConnection(), PAD_TOOL::explodePad(), PCB_SELECTION_TOOL::filterSelection(), PCB_SELECTION_TOOL::FindItem(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), EDIT_TOOL::Flip(), EDIT_TOOL::GetAndPlace(), TOOL_BASE::GetManager(), TOOL_BASE::getModelInt(), DRAWING_TOOL::getSourceZoneForAction(), TOOL_BASE::getToolHolderInt(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), TOOL_INTERACTIVE::goInternal(), COMMON_TOOLS::GridNext(), COMMON_TOOLS::GridPreset(), COMMON_TOOLS::GridPrev(), PCB_CONTROL::GridSetOrigin(), GROUP_TOOL::Group(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::HighlightItem(), BOARD_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PL_EDIT_TOOL::ImportDrawingSheetContent(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), BOARD_REANNOTATE_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), CONVERT_TOOL::Init(), PL_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_CONTROL::Init(), GLOBAL_EDIT_TOOL::Init(), PL_POINT_EDITOR::Init(), BOARD_INSPECTION_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), PCB_POINT_EDITOR::Init(), BOARD_EDITOR_CONTROL::Init(), POSITION_RELATIVE_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDIT_TOOL::invokeInlineRouter(), EDIT_TOOL::isRouterActive(), TOOL_BASE::IsToolActive(), GROUP_TOOL::LeaveGroup(), SCH_NAVIGATE_TOOL::LeaveSheet(), SCH_EDITOR_CONTROL::LeaveSheet(), COMMON_CONTROL::ListHotKeys(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), CVPCB_CONTROL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_SELECTION_TOOL::Main(), EDA_3D_CONTROLLER::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), PL_SELECTION_TOOL::onDisambiguationExpire(), EE_SELECTION_TOOL::onDisambiguationExpire(), PCB_SELECTION_TOOL::onDisambiguationExpire(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), PL_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), PAD_TOOL::pastePadProperties(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PCB_CONTROL::Print(), GERBVIEW_CONTROL::Print(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), EE_SELECTION_TOOL::RebuildSelection(), PAD_TOOL::recombinePad(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SCH_EDITOR_CONTROL::Redo(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), PCB_POINT_EDITOR::removeCorner(), GROUP_TOOL::RemoveFromGroup(), PL_SELECTION_TOOL::RemoveItemFromSel(), EE_SELECTION_TOOL::RemoveItemFromSel(), PCB_SELECTION_TOOL::RemoveItemFromSel(), PL_SELECTION_TOOL::RemoveItemsFromSel(), EE_SELECTION_TOOL::RemoveItemsFromSel(), SCH_EDIT_TOOL::RepeatDrawItem(), RepeatDrawItem(), EE_SELECTION_TOOL::RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), PAD_TOOL::Reset(), COMMON_TOOLS::Reset(), PNS::TOOL_BASE::Reset(), EDA_3D_CONTROLLER::Reset(), COMMON_TOOLS::ResetLocalCoords(), TOOL_INTERACTIVE::resetTransitions(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), TOOL_INTERACTIVE::RunMainStack(), DRC_TOOL::RunTests(), EE_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::SelectConnection(), PCB_TOOL_BASE::selection(), COMMON_TOOLS::SelectionTool(), GERBVIEW_SELECTION_TOOL::SelectItem(), GERBVIEW_SELECTION_TOOL::SelectItems(), PCB_SELECTION_TOOL::SelectItems(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectNet(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), DRAWING_TOOL::SetAnchor(), TOOL_INTERACTIVE::SetContextMenu(), EDA_3D_CONTROLLER::SetMaterial(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), EDA_3D_CONTROLLER::ToggleVisibility(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_EDIT_TOOL::Undo(), SCH_EDITOR_CONTROL::Undo(), GROUP_TOOL::Ungroup(), GERBVIEW_SELECTION_TOOL::UnselectItem(), GERBVIEW_SELECTION_TOOL::UnselectItems(), PCB_SELECTION_TOOL::UnselectItems(), PNS::TOOL_BASE::updateEndItem(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), EE_POINT_EDITOR::updateParentItem(), BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest(), PNS::TOOL_BASE::updateStartItem(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), TOOL_INTERACTIVE::Wait(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().

◆ m_toolName

std::string TOOL_BASE::m_toolName
protectedinherited

Definition at line 213 of file tool_base.h.

Referenced by TOOL_BASE::GetName().

◆ m_type

TOOL_TYPE TOOL_BASE::m_type
protectedinherited

Unique identifier for the tool, assigned by a TOOL_MANAGER instance.

Definition at line 206 of file tool_base.h.

Referenced by TOOL_BASE::GetType(), and BOARD_COMMIT::Push().

◆ m_view

KIGFX::SCH_VIEW* EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view
protectedinherited

Definition at line 178 of file ee_tool_base.h.


The documentation for this class was generated from the following files: