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 , REDRAW }
 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 (const EDA_ANGLE &aAngle)
 
EDA_ANGLE 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, bool aDirtyConnectivity=true)
 
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...
 
void resetTransitions ()
 Clear the current transition map and restores the default one created by setTransitions(). More...
 
void goInternal (TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions)
 
EDA_ITEMgetModelInt () const
 
TOOLS_HOLDERgetToolHolderInt () const
 

Private Attributes

bool m_lastTextBold
 
bool m_lastTextItalic
 
EDA_ANGLE m_lastTextAngle
 
GR_TEXT_H_ALIGN_T m_lastTextJust
 
FILL_T m_lastFillStyle
 
COLOR4D m_lastFillColor
 
STROKE_PARAMS m_lastStroke
 
bool m_drawSpecificConvert
 
bool m_drawSpecificUnit
 Re-entrancy guards. More...
 
bool m_inDrawShape
 
bool m_inTwoClickPlace
 

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.

REDRAW 

Full drawing refresh.

Definition at line 77 of file tool_base.h.

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

Constructor & Destructor Documentation

◆ SYMBOL_EDITOR_DRAWING_TOOLS()

SYMBOL_EDITOR_DRAWING_TOOLS::SYMBOL_EDITOR_DRAWING_TOOLS ( )

Definition at line 43 of file symbol_editor_drawing_tools.cpp.

43 :
44 EE_TOOL_BASE<SYMBOL_EDIT_FRAME>( "eeschema.SymbolDrawing" ),
45 m_lastTextBold( false ),
46 m_lastTextItalic( false ),
50 m_lastFillColor( COLOR4D::UNSPECIFIED ),
51 m_lastStroke( 0, PLOT_DASH_TYPE::DEFAULT, COLOR4D::UNSPECIFIED ),
53 m_drawSpecificUnit( false ),
54 m_inDrawShape( false ),
55 m_inTwoClickPlace( false )
56{
57}
bool m_drawSpecificUnit
Re-entrancy guards.
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
Definition: eda_angle.h:425
@ GR_TEXT_H_ALIGN_LEFT

References DEFAULT, NO_FILL, and UNSPECIFIED.

◆ ~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:215
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:210
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(), SCH_EDIT_TOOL::DeleteItemCursor(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_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(), SCH_DRAWING_TOOLS::DrawShape(), 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(), EE_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), ROUTER_TOOL::RouteSelected(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), 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}

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ DrawShape()

int SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape ( const TOOL_EVENT aEvent)

Definition at line 328 of file symbol_editor_drawing_tools.cpp.

329{
330 SETTINGS_MANAGER& settingsMgr = Pgm().GetSettingsManager();
332 SHAPE_T type = aEvent.Parameter<SHAPE_T>();
333 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
334 LIB_SHAPE* item = nullptr;
335 bool isTextBox = aEvent.IsAction( &EE_ACTIONS::drawSymbolTextBox );
336
337 if( m_inDrawShape )
338 return 0;
339
341
342 // We might be running as the same shape in another co-routine. Make sure that one
343 // gets whacked.
345
347
348 m_frame->PushTool( aEvent );
349
350 auto setCursor =
351 [&]()
352 {
354 };
355
356 auto cleanup =
357 [&] ()
358 {
361 delete item;
362 item = nullptr;
363 };
364
365 Activate();
366 // Must be done after Activate() so that it gets set into the correct context
367 getViewControls()->ShowCursor( true );
368 // Set initial cursor
369 setCursor();
370
371 if( aEvent.HasPosition() )
372 m_toolMgr->PrimeTool( aEvent.Position() );
373
374 // Main loop: keep receiving events
375 while( TOOL_EVENT* evt = Wait() )
376 {
377 setCursor();
378
379 VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
380
381 // The tool hotkey is interpreted as a click when drawing
382 bool isSyntheticClick = item && evt->IsActivate() && evt->HasPosition()
383 && evt->Matches( aEvent );
384
385 if( evt->IsCancelInteractive() )
386 {
387 if( item )
388 {
389 cleanup();
390 }
391 else
392 {
393 m_frame->PopTool( aEvent );
394 break;
395 }
396 }
397 else if( evt->IsActivate() && !isSyntheticClick )
398 {
399 if( item )
400 cleanup();
401
402 if( evt->IsPointEditor() )
403 {
404 // don't exit (the point editor runs in the background)
405 }
406 else if( evt->IsMoveTool() )
407 {
408 // leave ourselves on the stack so we come back after the move
409 break;
410 }
411 else
412 {
413 m_frame->PopTool( aEvent );
414 break;
415 }
416 }
417 else if( evt->IsClick( BUT_LEFT ) && !item )
418 {
419 // Update in case the symbol was changed while the tool was running
420 symbol = m_frame->GetCurSymbol();
421
422 if( !symbol )
423 continue;
424
426
427 int lineWidth = schIUScale.MilsToIU( settings->m_Defaults.line_width );
428
429 if( isTextBox )
430 {
431 LIB_TEXTBOX* textbox = new LIB_TEXTBOX( symbol, lineWidth, m_lastFillStyle );
432
433 textbox->SetBold( m_lastTextBold );
434 textbox->SetItalic( m_lastTextItalic );
436 schIUScale.MilsToIU( settings->m_Defaults.text_size ) ) );
437 textbox->SetTextAngle( m_lastTextAngle );
439
440 item = textbox;
441 }
442 else
443 {
444 item = new LIB_SHAPE( symbol, type, lineWidth, m_lastFillStyle );
445 }
446
447 item->SetStroke( m_lastStroke );
449
450 item->SetFlags( IS_NEW );
451 item->BeginEdit( VECTOR2I( cursorPos.x, -cursorPos.y ) );
452
454 item->SetUnit( m_frame->GetUnit() );
455
457 item->SetConvert( m_frame->GetConvert() );
458
460 }
461 else if( item && ( evt->IsClick( BUT_LEFT )
462 || evt->IsDblClick( BUT_LEFT )
463 || isSyntheticClick
464 || evt->IsAction( &EE_ACTIONS::finishDrawing ) ) )
465 {
466 if( symbol != m_frame->GetCurSymbol() )
467 {
468 symbol = m_frame->GetCurSymbol();
469 item->SetParent( symbol );
470 }
471
472 if( evt->IsDblClick( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::finishDrawing )
473 || !item->ContinueEdit( VECTOR2I( cursorPos.x, -cursorPos.y ) ) )
474 {
475 item->EndEdit();
476 item->ClearEditFlags();
477
478 if( isTextBox )
479 {
480 LIB_TEXTBOX* textbox = static_cast<LIB_TEXTBOX*>( item );
481 DIALOG_LIB_TEXTBOX_PROPERTIES dlg( m_frame, static_cast<LIB_TEXTBOX*>( item ) );
482
483 if( dlg.ShowQuasiModal() != wxID_OK )
484 {
485 cleanup();
486 continue;
487 }
488
489 m_lastTextBold = textbox->IsBold();
490 m_lastTextItalic = textbox->IsItalic();
491 m_lastTextAngle = textbox->GetTextAngle();
492 m_lastTextJust = textbox->GetHorizJustify();
493 }
494
495 m_lastStroke = item->GetStroke();
498
500
501 m_frame->SaveCopyInUndoList( symbol );
502 symbol->AddDrawItem( item );
503 item = nullptr;
504
506 m_frame->OnModify();
508 }
509 }
510 else if( item && ( evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsMotion() ) )
511 {
512 item->CalcEdit( VECTOR2I( cursorPos.x, -cursorPos.y ) );
514 m_view->AddToPreview( item->Clone() );
515 }
516 else if( evt->IsDblClick( BUT_LEFT ) && !item )
517 {
519 }
520 else if( evt->IsClick( BUT_RIGHT ) )
521 {
522 // Warp after context menu only if dragging...
523 if( !item )
525
527 }
528 else
529 {
530 evt->SetPassEvent();
531 }
532
533 // Enable autopanning and cursor capture only when there is a shape being drawn
534 getViewControls()->SetAutoPan( item != nullptr );
535 getViewControls()->CaptureCursor( item != nullptr );
536 }
537
538 getViewControls()->SetAutoPan( false );
539 getViewControls()->CaptureCursor( false );
541 return 0;
542}
constexpr EDA_IU_SCALE schIUScale
Definition: base_units.h:111
static TOOL_ACTION activatePointEditor
Definition: actions.h:173
static TOOL_ACTION refreshPreview
Definition: actions.h:110
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition: eda_item.h:139
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
Definition: eda_item.h:382
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:100
void ClearEditFlags()
Definition: eda_item.h:158
FILL_T GetFillMode() const
Definition: eda_shape.h:101
void SetFillColor(const COLOR4D &aColor)
Definition: eda_shape.h:106
COLOR4D GetFillColor() const
Definition: eda_shape.h:105
bool IsItalic() const
Definition: eda_text.h:130
const EDA_ANGLE & GetTextAngle() const
Definition: eda_text.h:120
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:149
void SetBold(bool aBold)
Definition: eda_text.cpp:211
bool IsBold() const
Definition: eda_text.h:133
void SetTextSize(const VECTOR2I &aNewSize)
Definition: eda_text.cpp:349
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
Definition: eda_text.cpp:195
void SetItalic(bool aItalic)
Definition: eda_text.cpp:203
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
Definition: eda_text.cpp:242
static TOOL_ACTION properties
Definition: ee_actions.h:128
static TOOL_ACTION clearSelection
Clears the current selection.
Definition: ee_actions.h:56
static TOOL_ACTION drawSymbolTextBox
Definition: ee_actions.h:111
static TOOL_ACTION finishDrawing
Definition: ee_actions.h:114
EE_SELECTION & GetSelection()
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:191
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
void AddToPreview(EDA_ITEM *aItem, bool aTakeOwnership=true)
Definition: view.cpp:1635
void ClearPreview()
Definition: view.cpp:1613
void SetConvert(int aConvert)
Definition: lib_item.h:275
void SetUnit(int aUnit)
Definition: lib_item.h:272
STROKE_PARAMS GetStroke() const
Definition: lib_shape.h:52
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
Definition: lib_shape.h:72
void SetStroke(const STROKE_PARAMS &aStroke)
Definition: lib_shape.h:53
void EndEdit() override
End an object editing action.
Definition: lib_shape.h:76
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: lib_shape.cpp:64
bool ContinueEdit(const VECTOR2I &aPosition) override
Continue an edit in progress at aPosition.
Definition: lib_shape.h:73
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
Definition: lib_shape.h:74
Define a library symbol object.
Definition: lib_symbol.h:99
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
int AddItemToSel(const TOOL_EVENT &aEvent)
T * GetAppSettings(bool aLoadNow=true)
Returns a handle to the a given settings by type If the settings have already been loaded,...
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
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.
virtual void PopTool(const TOOL_EVENT &aEvent)
Pops a tool from the stack.
virtual void PushTool(const TOOL_EVENT &aEvent)
NB: the definition of "tool" is different at the user level.
KIGFX::VIEW_CONTROLS * getViewControls() const
Return the instance of VIEW_CONTROLS object used in the application.
Definition: tool_base.cpp:42
Generic, UI-independent tool event.
Definition: tool_event.h:156
bool HasPosition() const
Definition: tool_event.h:243
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:442
const VECTOR2D Position() const
Returns the point where dragging has started.
Definition: tool_event.h:266
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:81
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
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 Activate()
Run the tool.
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Run the specified action.
Definition: tool_manager.h:142
void DeactivateTool()
Deactivate the currently active tool.
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...
void VetoContextMenuMouseWarp()
Disable mouse warping after the current context menu is closed.
Definition: tool_manager.h:424
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:57
#define IS_NEW
New item, just created.
SHAPE_T
Definition: eda_shape.h:41
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:111
constexpr int MilsToIU(int mils) const
Definition: base_units.h:94
@ BUT_LEFT
Definition: tool_event.h:127
@ BUT_RIGHT
Definition: tool_event.h:128
VECTOR2< int > VECTOR2I
Definition: vector2d.h:590

References TOOL_INTERACTIVE::Activate(), ACTIONS::activatePointEditor, SELECTION_TOOL::AddItemToSel(), KIGFX::VIEW::AddToPreview(), ARROW, LIB_SHAPE::BeginEdit(), BUT_LEFT, BUT_RIGHT, LIB_SHAPE::CalcEdit(), KIGFX::VIEW_CONTROLS::CaptureCursor(), EDA_ITEM::ClearEditFlags(), KIGFX::VIEW::ClearPreview(), EE_ACTIONS::clearSelection, LIB_SHAPE::Clone(), LIB_SHAPE::ContinueEdit(), TOOL_MANAGER::DeactivateTool(), EE_ACTIONS::drawSymbolTextBox, LIB_SHAPE::EndEdit(), EE_ACTIONS::finishDrawing, SETTINGS_MANAGER::GetAppSettings(), SCH_BASE_FRAME::GetCanvas(), SYMBOL_EDIT_FRAME::GetConvert(), KIGFX::VIEW_CONTROLS::GetCursorPosition(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EDA_SHAPE::GetFillColor(), EDA_SHAPE::GetFillMode(), EDA_TEXT::GetHorizJustify(), EE_SELECTION_TOOL::GetSelection(), LIB_SHAPE::GetStroke(), EDA_TEXT::GetTextAngle(), SYMBOL_EDIT_FRAME::GetUnit(), TOOL_BASE::getViewControls(), TOOL_EVENT::HasPosition(), IS_NEW, TOOL_EVENT::IsAction(), EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), SYMBOL_EDITOR_SETTINGS::DEFAULTS::line_width, SYMBOL_EDITOR_SETTINGS::m_Defaults, m_drawSpecificConvert, m_drawSpecificUnit, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, m_inDrawShape, m_lastFillColor, m_lastFillStyle, m_lastStroke, m_lastTextAngle, m_lastTextBold, m_lastTextItalic, m_lastTextJust, TOOL_INTERACTIVE::m_menu, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool, TOOL_BASE::m_toolMgr, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_view, EDA_ITEM::Matches(), EDA_IU_SCALE::MilsToIU(), SYMBOL_EDIT_FRAME::OnModify(), TOOL_EVENT::Parameter(), PENCIL, Pgm(), TOOLS_HOLDER::PopTool(), TOOL_EVENT::Position(), TOOL_MANAGER::PrimeTool(), EE_ACTIONS::properties, TOOLS_HOLDER::PushTool(), SYMBOL_EDIT_FRAME::RebuildView(), ACTIONS::refreshPreview, TOOL_MANAGER::RunAction(), SYMBOL_EDIT_FRAME::SaveCopyInUndoList(), schIUScale, KIGFX::VIEW_CONTROLS::SetAutoPan(), EDA_TEXT::SetBold(), LIB_ITEM::SetConvert(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), EDA_SHAPE::SetFillColor(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), EDA_ITEM::SetParent(), LIB_SHAPE::SetStroke(), EDA_TEXT::SetTextAngle(), EDA_TEXT::SetTextSize(), LIB_ITEM::SetUnit(), TOOL_MENU::ShowContextMenu(), KIGFX::VIEW_CONTROLS::ShowCursor(), DIALOG_SHIM::ShowQuasiModal(), SYMBOL_EDITOR_SETTINGS::DEFAULTS::text_size, 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

Definition at line 59 of file symbol_editor_drawing_tools.h.

59{ return m_drawSpecificConvert; }

References m_drawSpecificConvert.

◆ GetDrawSpecificUnit()

bool SYMBOL_EDITOR_DRAWING_TOOLS::GetDrawSpecificUnit ( ) const
inline

Definition at line 62 of file symbol_editor_drawing_tools.h.

62{ return m_drawSpecificUnit; }

References m_drawSpecificUnit.

◆ getEditFrame()

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

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

Definition at line 185 of file tool_base.h.

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

References TOOL_BASE::getToolHolderInt().

Referenced by ZONE_CREATE_HELPER::createNewZone(), and ZONE_CREATE_HELPER::setUniquePriority().

◆ 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 121 of file tool_base.h.

122 {
123 return m_toolId;
124 }

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()

EDA_ANGLE SYMBOL_EDITOR_DRAWING_TOOLS::GetLastTextAngle ( ) const
inline

Definition at line 56 of file symbol_editor_drawing_tools.h.

56{ return m_lastTextAngle; }

References m_lastTextAngle.

◆ GetManager()

TOOL_MANAGER * TOOL_BASE::GetManager ( ) const
inlineinherited

◆ 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 197 of file tool_base.h.

References TOOL_BASE::getModelInt().

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

◆ getModelInt()

EDA_ITEM * TOOL_BASE::getModelInt ( ) const
privateinherited

Definition at line 54 of file tool_base.cpp.

55{
56 return m_toolMgr->GetModel();
57}
EDA_ITEM * GetModel() const
Definition: tool_manager.h:292

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

Referenced by TOOL_BASE::getModel().

◆ 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 134 of file tool_base.h.

135 {
136 return m_toolName;
137 }
std::string m_toolName
Definition: tool_base.h:214

References TOOL_BASE::m_toolName.

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

◆ getToolHolderInt()

TOOLS_HOLDER * TOOL_BASE::getToolHolderInt ( ) const
privateinherited

Definition at line 48 of file tool_base.cpp.

49{
50 return m_toolMgr->GetToolHolder();
51}
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:296

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

Referenced by TOOL_BASE::getEditFrame().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Return the type of the tool.

Returns
The type of the tool.

Definition at line 109 of file tool_base.h.

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

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:285

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(), SCH_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), EDIT_TOOL::DeleteItems(), PL_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SELECTION_TOOL::doSelectionMenu(), COMMON_TOOLS::doZoomFit(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), EE_SELECTION_TOOL::GetNode(), ROUTER_TOOL::getStartLayer(), PCB_CONTROL::GridResetOrigin(), PCB_CONTROL::GridSetOrigin(), EE_SELECTION_TOOL::GuessSelectionCandidates(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), ROUTER_TOOL::handleCommonEvents(), EE_SELECTION_TOOL::highlight(), PL_SELECTION_TOOL::highlight(), PCB_SELECTION_TOOL::highlight(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::highlightNet(), PNS::TOOL_BASE::highlightNets(), PCB_SELECTION_TOOL::hitTestDistance(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineDrag(), EE_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), PL_EDIT_TOOL::moveItem(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), ROUTER_TOOL::performRouting(), PNS::TOOL_BASE::pickSingleItem(), BOARD_EDITOR_CONTROL::PlaceFootprint(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), ROUTER_TOOL::prepareInteractive(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EE_SELECTION_TOOL::Reset(), EE_TOOL_BASE< T >::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), PNS::TOOL_BASE::Reset(), BOARD_EDITOR_CONTROL::Reset(), DRAWING_TOOL::Reset(), PCB_CONTROL::Reset(), PCB_SELECTION_TOOL::Reset(), SCH_EDIT_TOOL::Rotate(), GERBVIEW_SELECTION_TOOL::select(), PCB_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectionContains(), PCB_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), EE_SELECTION_TOOL::selectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDITOR_CONTROL::ToggleERCErrors(), SCH_EDITOR_CONTROL::ToggleERCExclusions(), SCH_EDITOR_CONTROL::ToggleERCWarnings(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), SCH_EDITOR_CONTROL::ToggleOPCurrents(), SCH_EDITOR_CONTROL::ToggleOPVoltages(), SCH_DRAWING_TOOLS::TwoClickPlace(), TwoClickPlace(), EE_SELECTION_TOOL::unhighlight(), PL_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_FIND_REPLACE_TOOL::UpdateFind(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< T >::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_SELECTION_TOOL::view(), PCB_TOOL_BASE::view(), PCB_VIEWER_TOOLS::view(), EE_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox(), 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}
KIGFX::VIEW_CONTROLS * GetViewControls() const
Definition: tool_manager.h:287

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

Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), EE_SELECTION_TOOL::autostartEvent(), SCH_EDIT_TOOL::BreakWire(), PCB_SELECTION_TOOL::controls(), PCB_TOOL_BASE::controls(), EDIT_TOOL::copyToClipboard(), COMMON_TOOLS::CursorControl(), EDIT_TOOL::DeleteItems(), 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(), SCH_DRAWING_TOOLS::DrawShape(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), ROUTER_TOOL::performDragging(), LENGTH_TUNER_TOOL::performTuning(), PlaceAnchor(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), DRAWING_TOOL::Reset(), PCB_POINT_EDITOR::Reset(), COMMON_TOOLS::ResetLocalCoords(), ROUTER_TOOL::RouteSelected(), PCB_SELECTION_TOOL::selectCursor(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::SelectNode(), ZOOM_TOOL::selectRegion(), ALIGN_DISTRIBUTE_TOOL::selectTarget(), PICKER_TOOL::setControls(), PCB_PICKER_TOOL::setControls(), EE_POINT_EDITOR::setEditedPoint(), PL_POINT_EDITOR::setEditedPoint(), PCB_POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), 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}
void goInternal(TOOL_STATE_FUNC &aState, const TOOL_EVENT_LIST &aConditions)
std::function< int(const TOOL_EVENT &)> TOOL_STATE_FUNC
Definition: tool_base.h:58

References TOOL_INTERACTIVE::goInternal().

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

◆ goInternal()

void TOOL_INTERACTIVE::goInternal ( TOOL_STATE_FUNC aState,
const TOOL_EVENT_LIST aConditions 
)
privateinherited

Definition at line 70 of file tool_interactive.cpp.

71{
72 m_toolMgr->ScheduleNextState( this, aState, aConditions );
73}
void ScheduleNextState(TOOL_BASE *aTool, TOOL_STATE_FUNC &aHandler, const TOOL_EVENT_LIST &aConditions)
Define a state transition.

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

Referenced by TOOL_INTERACTIVE::Go().

◆ 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 60 of file symbol_editor_drawing_tools.cpp.

61{
63
64 auto isDrawingCondition =
65 [] ( const SELECTION& aSel )
66 {
67 LIB_ITEM* item = (LIB_ITEM*) aSel.Front();
68 return item && item->IsNew();
69 };
70
71 m_menu.GetMenu().AddItem( EE_ACTIONS::finishDrawing, isDrawingCondition, 2 );
72
73 return true;
74}
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.
bool IsNew() const
Definition: eda_item.h:103
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:66
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:44

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{
34}
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(), 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 545 of file symbol_editor_drawing_tools.cpp.

546{
547 m_frame->PushTool( aEvent );
548
549 auto setCursor =
550 [&]()
551 {
553 };
554
555 Activate();
556 // Must be done after Activate() so that it gets set into the correct context
557 getViewControls()->ShowCursor( true );
558 // Set initial cursor
559 setCursor();
560
561 // Main loop: keep receiving events
562 while( TOOL_EVENT* evt = Wait() )
563 {
564 setCursor();
565
566 if( evt->IsCancelInteractive() )
567 {
568 m_frame->PopTool( aEvent );
569 break;
570 }
571 else if( evt->IsActivate() )
572 {
573 m_frame->PopTool( aEvent );
574 break;
575 }
576 else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
577 {
578 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
579
580 if( !symbol )
581 continue;
582
583 VECTOR2I cursorPos = getViewControls()->GetCursorPosition( !evt->DisableGridSnapping() );
584 VECTOR2I offset( -cursorPos.x, cursorPos.y );
585
586 symbol->SetOffset( offset );
587
588 // Refresh the view without changing the viewport
589 auto center = m_view->GetCenter();
590 center.x += offset.x;
591 center.y -= offset.y;
592 m_view->SetCenter( center );
594 m_frame->OnModify();
595 }
596 else if( evt->IsClick( BUT_RIGHT ) )
597 {
599 }
600 else
601 {
602 evt->SetPassEvent();
603 }
604 }
605
607 return 0;
608}
const VECTOR2D & GetCenter() const
Return the center point of this VIEW (in world space coordinates).
Definition: view.h:339
void RecacheAllItems()
Rebuild GAL display lists.
Definition: view.cpp:1384
void SetCenter(const VECTOR2D &aCenter)
Set the center point of the VIEW (i.e.
Definition: view.cpp:577
void SetOffset(const VECTOR2I &aOffset)
Move the symbol aOffset.

References TOOL_INTERACTIVE::Activate(), ARROW, BULLSEYE, BUT_LEFT, BUT_RIGHT, SCH_BASE_FRAME::GetCanvas(), KIGFX::VIEW::GetCenter(), 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 611 of file symbol_editor_drawing_tools.cpp.

612{
614 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
615 LIB_PIN* sourcePin = nullptr;
616
617 if( !symbol )
618 return 0;
619
620 // See if we have a pin matching our weak ptr
621 std::vector<LIB_PIN*> pins = symbol->GetAllLibPins();
622
623 for( LIB_PIN* test : pins )
624 {
625 if( (void*) test == g_lastPinWeakPtr )
626 {
627 sourcePin = test;
628 break;
629 }
630 }
631
632 if( sourcePin )
633 {
634 LIB_PIN* pin = pinTool->RepeatPin( sourcePin );
636
638
639 if( pin )
641 }
642
643 return 0;
644}
static TOOL_ACTION addItemToSel
Selects an item (specified as the event parameter).
Definition: ee_actions.h:59
LIB_PIN * RepeatPin(const LIB_PIN *aSourcePin)
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 }
The symbol library editor main window.
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36

◆ resetTransitions()

void TOOL_INTERACTIVE::resetTransitions ( )
privateinherited

Clear the current transition map and restores the default one created by setTransitions().

Definition at line 63 of file tool_interactive.cpp.

64{
67}
virtual void setTransitions()=0
This method is meant to be overridden in order to specify handlers for events.
void ClearTransitions(TOOL_BASE *aTool)
Clear the state transition map for a tool.

References TOOL_MANAGER::ClearTransitions(), TOOL_BASE::m_toolMgr, and TOOL_INTERACTIVE::setTransitions().

◆ 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}
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,
bool  aDirtyConnectivity = true 
)
inlineprotectedinherited

Definition at line 134 of file ee_tool_base.h.

136 {
137 wxASSERT( aItem );
138
139 KICAD_T itemType = aItem->Type();
140 bool selected = aItem->IsSelected();
141
142 // IS_SELECTED flag should not be set on undo items which were added for
143 // a drag operation.
144 if( selected && aItem->HasFlag( SELECTED_BY_DRAG ) )
145 aItem->ClearSelected();
146
147 if( m_isSymbolEditor )
148 {
149 SYMBOL_EDIT_FRAME* editFrame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_frame );
150 wxCHECK_RET( editFrame, wxT( "editFrame is null" ) );
151
152 editFrame->SaveCopyInUndoList( static_cast<LIB_ITEM*>( aItem ), aType, aAppend );
153 }
154 else
155 {
156 SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
157 wxASSERT( editFrame );
158
159 if( editFrame )
160 {
161 if( itemType == SCH_FIELD_T )
162 {
163 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
164 static_cast<SCH_ITEM*>( aItem->GetParent() ),
165 UNDO_REDO::CHANGED, aAppend,
166 false );
167 }
168 else if( itemType == SCH_PIN_T || itemType == SCH_SHEET_PIN_T )
169 {
170 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
171 static_cast<SCH_ITEM*>( aItem->GetParent() ),
172 UNDO_REDO::CHANGED, aAppend,
173 aDirtyConnectivity );
174 }
175 else
176 {
177 editFrame->SaveCopyInUndoList( editFrame->GetScreen(),
178 static_cast<SCH_ITEM*>( aItem ), aType,
179 aAppend, aDirtyConnectivity );
180 }
181 }
182 }
183
184 if( selected && aItem->HasFlag( SELECTED_BY_DRAG ) )
185 aItem->SetSelected();
186 }
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
void ClearSelected()
Definition: eda_item.h:118
bool IsSelected() const
Definition: eda_item.h:106
void SetSelected()
Definition: eda_item.h:115
EDA_ITEM * GetParent() const
Definition: eda_item.h:99
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
Definition: eda_item.h:143
Schematic editor (Eeschema) main window.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend, bool aDirtyConnectivity=true)
Create a copy of the current schematic item, and put it in the undo list.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
#define SELECTED_BY_DRAG
Item was algorithmically selected as a dragged item.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_FIELD_T
Definition: typeinfo.h:155
@ SCH_SHEET_PIN_T
Definition: typeinfo.h:157
@ SCH_PIN_T
Definition: typeinfo.h:159

◆ 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}
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.
@ CMENU_OFF
Definition: tool_event.h:149

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

Referenced by SELECTION_TOOL::doSelectionMenu(), TOOL_MENU::ShowContextMenu(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ SetDrawSpecificConvert()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificConvert ( bool  aSpecific)
inline

Definition at line 58 of file symbol_editor_drawing_tools.h.

58{ m_drawSpecificConvert = aSpecific; }

References m_drawSpecificConvert.

Referenced by SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties().

◆ SetDrawSpecificUnit()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetDrawSpecificUnit ( bool  aSpecific)
inline

Definition at line 61 of file symbol_editor_drawing_tools.h.

61{ m_drawSpecificUnit = aSpecific; }

References m_drawSpecificUnit.

Referenced by SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties().

◆ SetLastTextAngle()

void SYMBOL_EDITOR_DRAWING_TOOLS::SetLastTextAngle ( const EDA_ANGLE aAngle)
inline

Definition at line 55 of file symbol_editor_drawing_tools.h.

55{ m_lastTextAngle = aAngle; }

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 647 of file symbol_editor_drawing_tools.cpp.

648{
658}
static TOOL_ACTION placeSymbolAnchor
Definition: ee_actions.h:113
static TOOL_ACTION drawCircle
Definition: ee_actions.h:96
static TOOL_ACTION placeSymbolText
Definition: ee_actions.h:110
static TOOL_ACTION drawRectangle
Definition: ee_actions.h:95
static TOOL_ACTION drawSymbolLines
Definition: ee_actions.h:112
static TOOL_ACTION drawArc
Definition: ee_actions.h:97
static TOOL_ACTION repeatDrawItem
Definition: ee_actions.h:122
static TOOL_ACTION placeSymbolPin
Definition: ee_actions.h:109
int PlaceAnchor(const TOOL_EVENT &aEvent)
int RepeatDrawItem(const TOOL_EVENT &aEvent)
int DrawShape(const TOOL_EVENT &aEvent)
int TwoClickPlace(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).

References EE_ACTIONS::drawArc, EE_ACTIONS::drawCircle, EE_ACTIONS::drawRectangle, DrawShape(), EE_ACTIONS::drawSymbolLines, EE_ACTIONS::drawSymbolTextBox, TOOL_INTERACTIVE::Go(), PlaceAnchor(), EE_ACTIONS::placeSymbolAnchor, EE_ACTIONS::placeSymbolPin, EE_ACTIONS::placeSymbolText, EE_ACTIONS::repeatDrawItem, RepeatDrawItem(), and TwoClickPlace().

◆ TwoClickPlace()

int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace ( const TOOL_EVENT aEvent)

Definition at line 77 of file symbol_editor_drawing_tools.cpp.

78{
79 KICAD_T type = aEvent.Parameter<KICAD_T>();
80 auto* settings = Pgm().GetSettingsManager().GetAppSettings<SYMBOL_EDITOR_SETTINGS>();
81 auto* pinTool = type == LIB_PIN_T ? m_toolMgr->GetTool<SYMBOL_EDITOR_PIN_TOOL>() : nullptr;
82
84 return 0;
85
87
90 VECTOR2I cursorPos;
91 bool ignorePrimePosition = false;
92 LIB_ITEM* item = nullptr;
93 bool isText = aEvent.IsAction( &EE_ACTIONS::placeSymbolText );
94 COMMON_SETTINGS* common_settings = Pgm().GetCommonSettings();
95
97
98 m_frame->PushTool( aEvent );
99
100 auto setCursor =
101 [&]()
102 {
103 if( item )
105 else if( isText )
107 else
109 };
110
111 auto cleanup =
112 [&] ()
113 {
116 delete item;
117 item = nullptr;
118 };
119
120 Activate();
121 // Must be done after Activate() so that it gets set into the correct context
122 controls->ShowCursor( true );
123 // Set initial cursor
124 setCursor();
125
126 if( aEvent.HasPosition() )
127 {
128 m_toolMgr->PrimeTool( aEvent.Position() );
129 }
130 else if( common_settings->m_Input.immediate_actions && !aEvent.IsReactivate() )
131 {
132 m_toolMgr->PrimeTool( { 0, 0 } );
133 ignorePrimePosition = true;
134 }
135
136 // Main loop: keep receiving events
137 while( TOOL_EVENT* evt = Wait() )
138 {
139 setCursor();
140 grid.SetSnap( !evt->Modifier( MD_SHIFT ) );
141 grid.SetUseGrid( getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
142
143 cursorPos = grid.Align( controls->GetMousePosition() );
144 controls->ForceCursorPosition( true, cursorPos );
145
146 // The tool hotkey is interpreted as a click when drawing
147 bool isSyntheticClick = item && evt->IsActivate() && evt->HasPosition()
148 && evt->Matches( aEvent );
149
150 if( evt->IsCancelInteractive() )
151 {
153
154 if( item )
155 {
156 cleanup();
157 }
158 else
159 {
160 m_frame->PopTool( aEvent );
161 break;
162 }
163 }
164 else if( evt->IsActivate() && !isSyntheticClick )
165 {
166 if( item && evt->IsMoveTool() )
167 {
168 // we're already moving our own item; ignore the move tool
169 evt->SetPassEvent( false );
170 continue;
171 }
172
173 if( item )
174 {
175 m_frame->ShowInfoBarMsg( _( "Press <ESC> to cancel item creation." ) );
176 evt->SetPassEvent( false );
177 continue;
178 }
179
180 if( evt->IsPointEditor() )
181 {
182 // don't exit (the point editor runs in the background)
183 }
184 else if( evt->IsMoveTool() )
185 {
186 break;
187 }
188 else
189 {
190 m_frame->PopTool( aEvent );
191 break;
192 }
193 }
194 else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) || isSyntheticClick )
195 {
196 LIB_SYMBOL* symbol = m_frame->GetCurSymbol();
197
198 if( !symbol )
199 continue;
200
201 // First click creates...
202 if( !item )
203 {
205
206 switch( type )
207 {
208 case LIB_PIN_T:
209 {
210 item = pinTool->CreatePin( VECTOR2I( cursorPos.x, -cursorPos.y ), symbol );
211 g_lastPinWeakPtr = item;
212 break;
213 }
214 case LIB_TEXT_T:
215 {
216 LIB_TEXT* text = new LIB_TEXT( symbol );
217
219 text->SetUnit( m_frame->GetUnit() );
220
222 text->SetConvert( m_frame->GetConvert() );
223
224 text->SetPosition( VECTOR2I( cursorPos.x, -cursorPos.y ) );
225 text->SetTextSize( VECTOR2I( schIUScale.MilsToIU( settings->m_Defaults.text_size ),
226 schIUScale.MilsToIU( settings->m_Defaults.text_size ) ) );
227 text->SetTextAngle( m_lastTextAngle );
228
230
231 if( dlg.ShowModal() != wxID_OK || NoPrintableChars( text->GetText() ) )
232 delete text;
233 else
234 item = text;
235
236 break;
237 }
238 default:
239 wxFAIL_MSG( "TwoClickPlace(): unknown type" );
240 }
241
242 // If we started with a hotkey which has a position then warp back to that.
243 // Otherwise update to the current mouse position pinned inside the autoscroll
244 // boundaries.
245 if( evt->IsPrime() && !ignorePrimePosition )
246 {
247 cursorPos = grid.Align( evt->Position() );
248 getViewControls()->WarpMouseCursor( cursorPos, true );
249 }
250 else
251 {
253 cursorPos = getViewControls()->GetMousePosition();
254 }
255
256 if( item )
257 {
258 item->SetPosition( VECTOR2I( cursorPos.x, -cursorPos.y ) );
259
260 item->SetFlags( IS_NEW | IS_MOVING );
262 m_view->AddToPreview( item->Clone() );
264
265 // update the cursor so it looks correct before another event
266 setCursor();
267 }
268
269 controls->SetCursorPosition( cursorPos, false );
270 }
271 // ... and second click places:
272 else
273 {
274 m_frame->SaveCopyInUndoList( symbol );
275
276 switch( item->Type() )
277 {
278 case LIB_PIN_T:
279 pinTool->PlacePin( (LIB_PIN*) item );
280 break;
281 case LIB_TEXT_T:
282 symbol->AddDrawItem( (LIB_TEXT*) item );
283 break;
284 default:
285 wxFAIL_MSG( "TwoClickPlace(): unknown type" );
286 }
287
288 item->ClearEditFlags();
289 item = nullptr;
291
293 m_frame->OnModify();
294 }
295 }
296 else if( evt->IsClick( BUT_RIGHT ) )
297 {
298 // Warp after context menu only if dragging...
299 if( !item )
301
303 }
304 else if( item && ( evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsMotion() ) )
305 {
306 item->SetPosition( VECTOR2I( cursorPos.x, -cursorPos.y ) );
308 m_view->AddToPreview( item->Clone() );
309 }
310 else
311 {
312 evt->SetPassEvent();
313 }
314
315 // Enable autopanning and cursor capture only when there is an item to be placed
316 controls->SetAutoPan( item != nullptr );
317 controls->CaptureCursor( item != nullptr );
318 }
319
320 controls->SetAutoPan( false );
321 controls->CaptureCursor( false );
322 controls->ForceCursorPosition( false );
324 return 0;
325}
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...
WX_INFOBAR * GetInfoBar()
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
Definition: eda_item.cpp:82
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void WarpMouseCursor(const VECTOR2D &aPosition, bool aWorldCoordinates=false, bool aWarpView=false)=0
If enabled (.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true, bool aTriggeredByArrows=false, long aArrowCommand=0)=0
Move cursor to the requested position expressed in world coordinates.
virtual void PinCursorInsideNonAutoscrollArea(bool aWarpMouseCursor)=0
void SetPosition(const VECTOR2I &aPosition) override
Definition: lib_item.h:234
void SetPosition(const VECTOR2I &aPos) override
Definition: lib_pin.h:229
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: lib_pin.cpp:966
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:820
Define a symbol library graphical text item.
Definition: lib_text.h:40
bool IsReactivate() const
Definition: tool_event.h:255
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Definition: wx_infobar.cpp:175
#define _(s)
#define IS_MOVING
Item being moved.
bool NoPrintableChars(const wxString &aString)
Return true if the string is empty or contains only whitespace.
@ MD_SHIFT
Definition: tool_event.h:138
@ LIB_TEXT_T
Definition: typeinfo.h:200
@ LIB_PIN_T
Definition: typeinfo.h:202

References _, TOOL_INTERACTIVE::Activate(), LIB_SYMBOL::AddDrawItem(), SELECTION_TOOL::AddItemToSel(), KIGFX::VIEW::AddToPreview(), ARROW, BUT_LEFT, BUT_RIGHT, KIGFX::VIEW_CONTROLS::CaptureCursor(), EDA_ITEM::ClearEditFlags(), KIGFX::VIEW::ClearPreview(), EE_ACTIONS::clearSelection, EDA_ITEM::Clone(), WX_INFOBAR::Dismiss(), KIGFX::VIEW_CONTROLS::ForceCursorPosition(), g_lastPinWeakPtr, SCH_BASE_FRAME::GetCanvas(), SYMBOL_EDIT_FRAME::GetConvert(), SYMBOL_EDIT_FRAME::GetCurSymbol(), EDA_BASE_FRAME::GetInfoBar(), KIGFX::VIEW_CONTROLS::GetMousePosition(), EE_SELECTION_TOOL::GetSelection(), TOOL_MANAGER::GetTool(), SYMBOL_EDIT_FRAME::GetUnit(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), grid, TOOL_EVENT::HasPosition(), COMMON_SETTINGS::INPUT::immediate_actions, IS_MOVING, IS_NEW, TOOL_EVENT::IsAction(), TOOL_EVENT::IsReactivate(), LIB_PIN_T, LIB_TEXT_T, m_drawSpecificConvert, m_drawSpecificUnit, EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame, COMMON_SETTINGS::m_Input, m_inTwoClickPlace, 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, EDA_ITEM::Matches(), MD_SHIFT, EDA_IU_SCALE::MilsToIU(), NoPrintableChars(), SYMBOL_EDIT_FRAME::OnModify(), TOOL_EVENT::Parameter(), PENCIL, Pgm(), KIGFX::VIEW_CONTROLS::PinCursorInsideNonAutoscrollArea(), 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(), schIUScale, KIGFX::VIEW_CONTROLS::SetAutoPan(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), KIGFX::VIEW_CONTROLS::SetCursorPosition(), EDA_ITEM::SetFlags(), LIB_ITEM::SetPosition(), TOOL_MENU::ShowContextMenu(), KIGFX::VIEW_CONTROLS::ShowCursor(), EDA_BASE_FRAME::ShowInfoBarMsg(), text, TEXT, EDA_ITEM::Type(), TOOL_MANAGER::VetoContextMenuMouseWarp(), TOOL_INTERACTIVE::Wait(), KIGFX::VIEW_CONTROLS::WarpMouseCursor(), 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_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 SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_DRAWING_TOOLS::DrawShape(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDA_3D_CONTROLLER::Main(), CVPCB_CONTROL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), EDIT_TOOL::pickReferencePoint(), PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), 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

Re-entrancy guards.

Definition at line 76 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape(), GetDrawSpecificUnit(), SetDrawSpecificUnit(), and TwoClickPlace().

◆ m_frame

SYMBOL_EDIT_FRAME * EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_frame
protectedinherited

Definition at line 189 of file ee_tool_base.h.

◆ m_inDrawShape

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_inDrawShape
private

Definition at line 79 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_inTwoClickPlace

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_inTwoClickPlace
private

Definition at line 80 of file symbol_editor_drawing_tools.h.

Referenced by TwoClickPlace().

◆ m_isSymbolEditor

bool EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_isSymbolEditor
protectedinherited

Definition at line 192 of file ee_tool_base.h.

◆ m_lastFillColor

COLOR4D SYMBOL_EDITOR_DRAWING_TOOLS::m_lastFillColor
private

Definition at line 73 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastFillStyle

FILL_T SYMBOL_EDITOR_DRAWING_TOOLS::m_lastFillStyle
private

Definition at line 72 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastStroke

STROKE_PARAMS SYMBOL_EDITOR_DRAWING_TOOLS::m_lastStroke
private

Definition at line 74 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastTextAngle

EDA_ANGLE SYMBOL_EDITOR_DRAWING_TOOLS::m_lastTextAngle
private

◆ m_lastTextBold

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_lastTextBold
private

Definition at line 68 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastTextItalic

bool SYMBOL_EDITOR_DRAWING_TOOLS::m_lastTextItalic
private

Definition at line 69 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ m_lastTextJust

GR_TEXT_H_ALIGN_T SYMBOL_EDITOR_DRAWING_TOOLS::m_lastTextJust
private

Definition at line 71 of file symbol_editor_drawing_tools.h.

Referenced by DrawShape().

◆ 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(), SCH_DRAWING_TOOLS::DrawShape(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), EDA_3D_CONTROLLER::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< T >::Init(), SCH_DRAWING_TOOLS::Init(), SCH_EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), Init(), GERBVIEW_SELECTION_TOOL::Init(), PICKER_TOOL::Init(), ZOOM_TOOL::Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), PL_SELECTION_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), ROUTER_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), DRAWING_TOOL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), PCB_TOOL_BASE::Init(), PCB_VIEWER_TOOLS::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDA_3D_CONTROLLER::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_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::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and TwoClickPlace().

◆ m_selectionTool

EE_SELECTION_TOOL* EE_TOOL_BASE< SYMBOL_EDIT_FRAME >::m_selectionTool
protectedinherited

Definition at line 191 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 210 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 215 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), SELECTION_TOOL::AddItemsToSel(), SELECTION_TOOL::AddItemToSel(), SCH_MOVE_TOOL::AlignElements(), SCH_EDITOR_CONTROL::AssignNetclass(), BOARD_EDITOR_CONTROL::AssignNetclass(), CVPCB_ASSOCIATION_TOOL::Associate(), TOOL_BASE::attachManager(), SCH_EDIT_TOOL::AutoplaceFields(), EE_SELECTION_TOOL::autostartEvent(), SCH_EDIT_TOOL::BreakWire(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), ROUTER_TOOL::CanInlineDrag(), SCH_EDITOR_CONTROL::ChangeLineMode(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), GERBVIEW_CONTROL::ClearAllLayers(), SCH_EDITOR_CONTROL::ClearHighlight(), BOARD_INSPECTION_TOOL::ClearHighlight(), GERBVIEW_SELECTION_TOOL::clearSelection(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), PL_EDIT_TOOL::Copy(), PAD_TOOL::copyPadSettings(), EDIT_TOOL::copyToClipboard(), EDIT_TOOL::CreateArray(), MICROWAVE_TOOL::createInductorBetween(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), COMMON_TOOLS::CursorControl(), SCH_EDITOR_CONTROL::Cut(), SCH_EDIT_TOOL::DeleteItemCursor(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), EDIT_TOOL::DeleteItems(), SCH_EDITOR_CONTROL::doCopy(), BOARD_EDITOR_CONTROL::doCrossProbePcbToSch(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SCH_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PCB_SELECTION_TOOL::doSyncSelection(), 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(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SCH_DRAWING_TOOLS::DrawShape(), DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::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(), PCB_SELECTION_TOOL::EnterGroup(), GROUP_TOOL::EnterGroup(), SCH_NAVIGATE_TOOL::EnterSheet(), PAD_TOOL::EnumeratePads(), EE_INSPECTION_TOOL::ExcludeMarker(), PCB_SELECTION_TOOL::ExitGroup(), 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(), PCB_SELECTION_TOOL::grabUnconnected(), COMMON_TOOLS::GridNext(), COMMON_TOOLS::GridPreset(), COMMON_TOOLS::GridPrev(), PCB_CONTROL::GridSetOrigin(), GROUP_TOOL::Group(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::HighlightItem(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PL_EDIT_TOOL::ImportDrawingSheetContent(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), EE_TOOL_BASE< T >::Init(), SCH_EDIT_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), PL_POINT_EDITOR::Init(), ROUTER_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), BOARD_INSPECTION_TOOL::Init(), BOARD_REANNOTATE_TOOL::Init(), CONVERT_TOOL::Init(), DRAWING_TOOL::Init(), EDIT_TOOL::Init(), GLOBAL_EDIT_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), PCB_POINT_EDITOR::Init(), PCB_SELECTION_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), POSITION_RELATIVE_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(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EDA_3D_CONTROLLER::Main(), CVPCB_CONTROL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SCH_EDITOR_CONTROL::NextLineMode(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), SELECTION_TOOL::onDisambiguationExpire(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::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::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), GERBVIEW_CONTROL::Print(), PCB_CONTROL::Print(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), EDIT_TOOL::rebuildConnectivity(), ZONE_FILLER_TOOL::rebuildConnectivity(), EE_SELECTION_TOOL::RebuildSelection(), PAD_TOOL::RecombinePad(), SCH_EDITOR_CONTROL::Redo(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), PCB_POINT_EDITOR::removeCorner(), GROUP_TOOL::RemoveFromGroup(), SELECTION_TOOL::RemoveItemFromSel(), SELECTION_TOOL::RemoveItemsFromSel(), SCH_EDIT_TOOL::RepeatDrawItem(), RepeatDrawItem(), PCB_SELECTION_TOOL::RequestSelection(), EE_SELECTION_TOOL::RequestSelection(), EDA_3D_CONTROLLER::Reset(), COMMON_TOOLS::Reset(), PNS::TOOL_BASE::Reset(), PAD_TOOL::Reset(), COMMON_TOOLS::ResetLocalCoords(), TOOL_INTERACTIVE::resetTransitions(), SCH_EDITOR_CONTROL::Revert(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), TOOL_INTERACTIVE::RunMainStack(), DRC_TOOL::RunTests(), EE_SELECTION_TOOL::Selectable(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::SelectConnection(), PCB_TOOL_BASE::selection(), COMMON_TOOLS::SelectionTool(), GERBVIEW_SELECTION_TOOL::SelectItem(), GERBVIEW_SELECTION_TOOL::SelectItems(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectNet(), GERBVIEW_SELECTION_TOOL::selectPoint(), PL_SELECTION_TOOL::SelectPoint(), PCB_SELECTION_TOOL::selectPoint(), EE_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(), SCH_EDIT_TOOL::Swap(), EE_SELECTION_TOOL::SyncSelection(), COMMON_TOOLS::ToggleCursor(), COMMON_TOOLS::ToggleCursorStyle(), EDA_3D_CONTROLLER::ToggleVisibility(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), SCH_MOVE_TOOL::trimDanglingLines(), SCH_DRAWING_TOOLS::TwoClickPlace(), TwoClickPlace(), SCH_EDITOR_CONTROL::Undo(), SYMBOL_EDITOR_EDIT_TOOL::Undo(), GROUP_TOOL::Ungroup(), PCB_SELECTION_TOOL::unrouteSelected(), GERBVIEW_SELECTION_TOOL::UnselectItem(), GERBVIEW_SELECTION_TOOL::UnselectItems(), PNS::TOOL_BASE::updateEndItem(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), EE_POINT_EDITOR::updateParentItem(), 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 214 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 207 of file tool_base.h.

Referenced by TOOL_BASE::GetType().

◆ m_view

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

Definition at line 190 of file ee_tool_base.h.


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