KiCad PCB EDA Suite
TOOLS_HOLDER Class Referenceabstract

#include <tools_holder.h>

Inheritance diagram for TOOLS_HOLDER:
EDA_BASE_FRAME PANEL_PREV_3D KICAD_MANAGER_FRAME KIWAY_PLAYER BM2CMP_FRAME_BASE CVPCB_MAINFRAME EDA_3D_VIEWER EDA_DRAW_FRAME MOCK_PLAYER PCB_CALCULATOR_FRAME_BASE SIM_PLOT_FRAME_BASE BM2CMP_FRAME GERBVIEW_FRAME PCB_BASE_FRAME PL_EDITOR_FRAME SCH_BASE_FRAME PCB_CALCULATOR_FRAME SIM_PLOT_FRAME DISPLAY_FOOTPRINTS_FRAME FOOTPRINT_VIEWER_FRAME PCB_BASE_EDIT_FRAME SCH_EDIT_FRAME SYMBOL_EDIT_FRAME SYMBOL_VIEWER_FRAME FOOTPRINT_EDIT_FRAME FOOTPRINT_WIZARD_FRAME PCB_EDIT_FRAME

Public Member Functions

 TOOLS_HOLDER ()
 
virtual ~TOOLS_HOLDER ()
 
TOOL_MANAGERGetToolManager () const
 Return the MVC controller. More...
 
virtual void RegisterUIUpdateHandler (const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
 Register an action's update conditions with the UI layer to allow the UI to appropriately display the state of its controls. More...
 
virtual void RegisterUIUpdateHandler (int aID, const ACTION_CONDITIONS &aConditions)
 Register a UI update handler for the control with ID aID. More...
 
virtual void UnregisterUIUpdateHandler (const TOOL_ACTION &aAction)
 Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler. More...
 
virtual void UnregisterUIUpdateHandler (int aID)
 Unregister a UI handler for a given ID that was registered using RegisterUIUpdateHandler. More...
 
virtual SELECTIONGetCurrentSelection ()
 Get the current selection from the canvas area. More...
 
virtual void PushTool (const std::string &actionName)
 NB: the definition of "tool" is different at the user level. More...
 
virtual void PopTool (const std::string &actionName)
 
bool ToolStackIsEmpty ()
 
std::string CurrentToolName () const
 
bool IsCurrentTool (const TOOL_ACTION &aAction) const
 
virtual void DisplayToolMsg (const wxString &msg)
 
bool GetDoImmediateActions () const
 Indicate that hotkeys should perform an immediate action even if another tool is currently active. More...
 
MOUSE_DRAG_ACTION GetDragAction () const
 Indicates whether a drag should draw a selection rectangle or drag selected (or unselected) objects. More...
 
bool GetMoveWarpsCursor () const
 Indicate that a move operation should warp the mouse pointer to the origin of the move object. More...
 
virtual void CommonSettingsChanged (bool aEnvVarsChanged, bool aTextVarsChanged)
 Notification event that some of the common (suite-wide) settings have changed. More...
 
virtual wxWindow * GetToolCanvas () const =0
 Canvas access. More...
 
virtual void RefreshCanvas ()
 
virtual wxString ConfigBaseName ()
 

Protected Attributes

TOOL_MANAGERm_toolManager
 
ACTIONSm_actions
 
TOOL_DISPATCHERm_toolDispatcher
 
SELECTION m_dummySelection
 
std::vector< std::string > m_toolStack
 
bool m_immediateActions
 
MOUSE_DRAG_ACTION m_dragAction
 
bool m_moveWarpsCursor
 

Detailed Description

Definition at line 45 of file tools_holder.h.

Constructor & Destructor Documentation

◆ TOOLS_HOLDER()

TOOLS_HOLDER::TOOLS_HOLDER ( )

Definition at line 32 of file tools_holder.cpp.

32  :
33  m_toolManager( nullptr ),
34  m_actions( nullptr ),
35  m_toolDispatcher( nullptr ),
36  m_immediateActions( true ),
38  m_moveWarpsCursor( true )
39 { }
bool m_immediateActions
Definition: tools_holder.h:170
ACTIONS * m_actions
Definition: tools_holder.h:158
bool m_moveWarpsCursor
Definition: tools_holder.h:176
MOUSE_DRAG_ACTION m_dragAction
Definition: tools_holder.h:174
TOOL_DISPATCHER * m_toolDispatcher
Definition: tools_holder.h:159
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:157

References SELECT.

◆ ~TOOLS_HOLDER()

virtual TOOLS_HOLDER::~TOOLS_HOLDER ( )
inlinevirtual

Definition at line 50 of file tools_holder.h.

50 { }

Member Function Documentation

◆ CommonSettingsChanged()

void TOOLS_HOLDER::CommonSettingsChanged ( bool  aEnvVarsChanged,
bool  aTextVarsChanged 
)
virtual

Notification event that some of the common (suite-wide) settings have changed.

Update hotkeys, preferences, etc.

Reimplemented in SCH_EDIT_FRAME, PCB_EDIT_FRAME, EDA_BASE_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, SYMBOL_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, SCH_BASE_FRAME, EDA_DRAW_FRAME, EDA_3D_VIEWER, PL_EDITOR_FRAME, FOOTPRINT_VIEWER_FRAME, KICAD_MANAGER_FRAME, and SYMBOL_VIEWER_FRAME.

Definition at line 117 of file tools_holder.cpp.

118 {
119  if( GetToolManager() )
121 
122  COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
123 
125  m_dragAction = settings->m_Input.drag_left;
127 }
MOUSE_DRAG_ACTION drag_left
void UpdateHotKeys(bool aFullUpdate)
Optionally read the hotkey config files and then rebuilds the internal hotkey maps.
bool m_immediateActions
Definition: tools_holder.h:170
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
bool m_moveWarpsCursor
Definition: tools_holder.h:176
MOUSE_DRAG_ACTION m_dragAction
Definition: tools_holder.h:174
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:197
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55

References COMMON_SETTINGS::INPUT::drag_left, TOOL_MANAGER::GetActionManager(), GetToolManager(), COMMON_SETTINGS::INPUT::immediate_actions, m_dragAction, m_immediateActions, COMMON_SETTINGS::m_Input, m_moveWarpsCursor, Pgm(), ACTION_MANAGER::UpdateHotKeys(), and COMMON_SETTINGS::INPUT::warp_mouse_on_move.

Referenced by EDA_BASE_FRAME::CommonSettingsChanged(), and EDA_BASE_FRAME::LoadWindowSettings().

◆ ConfigBaseName()

virtual wxString TOOLS_HOLDER::ConfigBaseName ( )
inlinevirtual

Reimplemented in EDA_BASE_FRAME.

Definition at line 154 of file tools_holder.h.

154 { return wxEmptyString; }

Referenced by ACTION_MANAGER::UpdateHotKeys().

◆ CurrentToolName()

std::string TOOLS_HOLDER::CurrentToolName ( ) const

Definition at line 99 of file tools_holder.cpp.

100 {
101  if( m_toolStack.empty() )
102  return ACTIONS::selectionTool.GetName();
103  else
104  return m_toolStack.back();
105 }
std::vector< std::string > m_toolStack
Definition: tools_holder.h:163
static TOOL_ACTION selectionTool
Definition: actions.h:156

References m_toolStack, and ACTIONS::selectionTool.

Referenced by TOOL_MANAGER::processEvent().

◆ DisplayToolMsg()

virtual void TOOLS_HOLDER::DisplayToolMsg ( const wxString &  msg)
inlinevirtual

Reimplemented in EDA_DRAW_FRAME.

Definition at line 122 of file tools_holder.h.

122 {};

Referenced by PopTool(), and PushTool().

◆ GetCurrentSelection()

virtual SELECTION& TOOLS_HOLDER::GetCurrentSelection ( )
inlinevirtual

Get the current selection from the canvas area.

Returns
the current selection.

Reimplemented in PCB_EDIT_FRAME, GERBVIEW_FRAME, SYMBOL_VIEWER_FRAME, SCH_EDIT_FRAME, PL_EDITOR_FRAME, DISPLAY_FOOTPRINTS_FRAME, SYMBOL_EDIT_FRAME, FOOTPRINT_VIEWER_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 102 of file tools_holder.h.

103  {
104  return m_dummySelection;
105  }
SELECTION m_dummySelection
Definition: tools_holder.h:161

References m_dummySelection.

Referenced by EDA_BASE_FRAME::HandleUpdateUIEvent(), and ACTION_MANAGER::RunHotKey().

◆ GetDoImmediateActions()

bool TOOLS_HOLDER::GetDoImmediateActions ( ) const
inline

Indicate that hotkeys should perform an immediate action even if another tool is currently active.

If false, the first hotkey should select the relevant tool.

Definition at line 128 of file tools_holder.h.

128 { return m_immediateActions; }
bool m_immediateActions
Definition: tools_holder.h:170

References m_immediateActions.

◆ GetDragAction()

MOUSE_DRAG_ACTION TOOLS_HOLDER::GetDragAction ( ) const
inline

Indicates whether a drag should draw a selection rectangle or drag selected (or unselected) objects.

Definition at line 134 of file tools_holder.h.

134 { return m_dragAction; }
MOUSE_DRAG_ACTION m_dragAction
Definition: tools_holder.h:174

References m_dragAction.

Referenced by PL_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), and PCB_SELECTION_TOOL::Main().

◆ GetMoveWarpsCursor()

bool TOOLS_HOLDER::GetMoveWarpsCursor ( ) const
inline

Indicate that a move operation should warp the mouse pointer to the origin of the move object.

This improves snapping, but some users are allergic to mouse warping.

Definition at line 140 of file tools_holder.h.

140 { return m_moveWarpsCursor; }
bool m_moveWarpsCursor
Definition: tools_holder.h:176

References m_moveWarpsCursor.

Referenced by EDIT_TOOL::doMoveSelection(), ROUTER_TOOL::InlineDrag(), SYMBOL_EDITOR_MOVE_TOOL::Main(), and SCH_MOVE_TOOL::Main().

◆ GetToolCanvas()

◆ GetToolManager()

TOOL_MANAGER* TOOLS_HOLDER::GetToolManager ( ) const
inline

Return the MVC controller.

Definition at line 55 of file tools_holder.h.

55 { return m_toolManager; }
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:157

References m_toolManager.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), BOARD_COMMIT::BOARD_COMMIT(), FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList(), CommonSettingsChanged(), DIALOG_FOOTPRINT_CHECKER::deleteAllMarkers(), DIALOG_ERC::deleteAllMarkers(), DIALOG_DRC::deleteAllMarkers(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES(), PL_DRAW_PANEL_GAL::DisplayWorksheet(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), SIM_PLOT_FRAME::doCloseWindow(), DIALOG_GLOBAL_DELETION::doGlobalDeletions(), SCH_FIELD::DoHypertextMenu(), DRAWING_TOOL::DrawVia(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), GERBVIEW_FRAME::GERBVIEW_FRAME(), FP_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), SCH_NAVIGATE_TOOL::HypertextCommand(), ROUTER_TOOL::InlineBreakTrack(), KICAD_MANAGER_FRAME::InstallPreferences(), PL_EDITOR_FRAME::InstallPreferences(), FOOTPRINT_EDIT_FRAME::InstallPreferences(), SYMBOL_EDIT_FRAME::InstallPreferences(), GERBVIEW_FRAME::InstallPreferences(), PCB_EDIT_FRAME::InstallPreferences(), SCH_EDIT_FRAME::InstallPreferences(), SYMBOL_EDIT_FRAME::LoadPart(), PCB_EDIT_FRAME::LoadProjectSettings(), FOOTPRINT_EDIT_FRAME::LoadSettings(), PROPERTIES_FRAME::OnAcceptPrms(), DIALOG_DRC::OnActivateDlg(), DIALOG_FOOTPRINT_CHECKER::OnCancelClick(), DIALOG_DRC::OnCancelClick(), DIALOG_INSPECTOR::onCellClicked(), DIALOG_ERC::OnCloseErcDialog(), SYMBOL_TREE_PANE::onComponentSelected(), DIALOG_FOOTPRINT_CHECKER::OnDeleteOneClick(), DIALOG_DRC::OnDeleteOneClick(), DIALOG_ERC::OnERCItemSelected(), DIALOG_CONSTRAINTS_REPORTER::OnErrorLinkClicked(), DIALOG_INSPECTION_REPORTER::OnErrorLinkClicked(), KICAD_MANAGER_FRAME::OnIdle(), FOOTPRINTS_LISTBOX::OnLeftDClick(), APPEARANCE_CONTROLS::onNetclassContextMenu(), APPEARANCE_CONTROLS::onNetContextMenu(), SIM_PLOT_FRAME::onProbe(), DIALOG_PLOT::onRunDRC(), DIALOG_DRC::OnRunDRCClick(), HIERARCHY_NAVIG_DLG::onSelectSheetPath(), SCH_EDIT_FRAME::onSize(), DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick(), SIM_PLOT_FRAME::onTune(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), DIALOG_PLOT::Plot(), PopTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), PL_EDITOR_FRAME::RollbackFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), PCB_EDIT_FRAME::SaveProjectSettings(), FOOTPRINT_EDIT_FRAME::SaveSettings(), EDA_3D_VIEWER::SaveSettings(), DIALOG_FIND::search(), CVPCB_MAINFRAME::setupEventHandlers(), APPEARANCE_CONTROLS::showNetclass(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), DIALOG_GRID_SETTINGS::TransferDataFromWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), EDA_DRAW_FRAME::UpdateMsgPanel(), NET_GRID_TABLE::updateNetVisibility(), DIALOG_NETLIST::~DIALOG_NETLIST(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().

◆ IsCurrentTool()

bool TOOLS_HOLDER::IsCurrentTool ( const TOOL_ACTION aAction) const

Definition at line 108 of file tools_holder.cpp.

109 {
110  if( m_toolStack.empty() )
111  return &aAction == &ACTIONS::selectionTool;
112  else
113  return m_toolStack.back() == aAction.GetName();
114 }
std::vector< std::string > m_toolStack
Definition: tools_holder.h:163
static TOOL_ACTION selectionTool
Definition: actions.h:156
const std::string & GetName() const
Return name of the action.
Definition: tool_action.h:83

References TOOL_ACTION::GetName(), m_toolStack, and ACTIONS::selectionTool.

Referenced by BOARD_INSPECTION_TOOL::HighlightNetTool(), SCH_EDIT_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), and EDITOR_CONDITIONS::toolFunc().

◆ PopTool()

void TOOLS_HOLDER::PopTool ( const std::string &  actionName)
virtual

Definition at line 60 of file tools_holder.cpp.

61 {
62  // Push/pop events can get out of order (such as when they're generated by the Simulator
63  // frame but not processed until the mouse is back in the Schematic frame), so make sure
64  // we're popping the right stack frame.
65 
66  for( int i = (int) m_toolStack.size() - 1; i >= 0; --i )
67  {
68  if( m_toolStack[ i ] == actionName )
69  {
70  m_toolStack.erase( m_toolStack.begin() + i );
71 
72  // If there's something underneath us, and it's now the top of the stack, then
73  // re-activate it
74  if( ( --i ) >= 0 && i == (int)m_toolStack.size() - 1 )
75  {
76  std::string back = m_toolStack[ i ];
78 
79  if( action )
80  {
81  // Pop the action as running it will push it back onto the stack
82  m_toolStack.pop_back();
83 
84  TOOL_EVENT evt = action->MakeEvent();
85  evt.SetHasPosition( false );
86  evt.SetReactivate( true );
87  GetToolManager()->PostEvent( evt );
88  }
89  }
90  else
92 
93  return;
94  }
95  }
96 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:122
void SetReactivate(bool aReactivate=true)
Returns information about difference between current mouse cursor position and the place where draggi...
Definition: tool_event.h:274
TOOL_ACTION * FindAction(const std::string &aActionName) const
Find an action with a given name (if there is one available).
Generic, UI-independent tool event.
Definition: tool_event.h:173
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:157
std::vector< std::string > m_toolStack
Definition: tools_holder.h:163
Represent a single user action.
Definition: tool_action.h:49
TOOL_EVENT MakeEvent() const
Return the event associated with the action (i.e.
Definition: tool_action.h:123
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:197
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:55
void PostEvent(const TOOL_EVENT &aEvent)
Put an event to the event queue to be processed at the end of event processing cycle.
Definition: tool_manager.h:267
static TOOL_ACTION selectionTool
Definition: actions.h:156
void SetHasPosition(bool aHasPosition)
Returns if the action associated with this event should be treated as immediate regardless of the cur...
Definition: tool_event.h:262

References DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), GetToolManager(), m_toolManager, m_toolStack, TOOL_ACTION::MakeEvent(), TOOL_MANAGER::PostEvent(), ACTIONS::selectionTool, TOOL_EVENT::SetHasPosition(), and TOOL_EVENT::SetReactivate().

Referenced by EDIT_TOOL::copyToClipboard(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_DRAWING_TOOLS::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(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ PushTool()

void TOOLS_HOLDER::PushTool ( const std::string &  actionName)
virtual

NB: the definition of "tool" is different at the user level.

The implementation uses a single TOOL_BASE derived class to implement several user "tools", such as rectangle and circle, or wire and bus. So each user-level tool is actually a TOOL_ACTION.

Definition at line 43 of file tools_holder.cpp.

44 {
45  m_toolStack.push_back( actionName );
46 
47  // Human cognitive stacking is very shallow; deeper tool stacks just get annoying
48  if( m_toolStack.size() > 3 )
49  m_toolStack.erase( m_toolStack.begin() );
50 
51  TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( actionName );
52 
53  if( action )
54  DisplayToolMsg( action->GetLabel() );
55  else
56  DisplayToolMsg( actionName );
57 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:122
TOOL_ACTION * FindAction(const std::string &aActionName) const
Find an action with a given name (if there is one available).
wxString GetLabel() const
Definition: tool_action.cpp:70
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:157
std::vector< std::string > m_toolStack
Definition: tools_holder.h:163
Represent a single user action.
Definition: tool_action.h:49
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:197

References DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), TOOL_ACTION::GetLabel(), m_toolManager, and m_toolStack.

Referenced by EDIT_TOOL::copyToClipboard(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_DRAWING_TOOLS::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(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ RefreshCanvas()

virtual void TOOLS_HOLDER::RefreshCanvas ( )
inlinevirtual

Reimplemented in EDA_DRAW_FRAME.

Definition at line 152 of file tools_holder.h.

152 { }

Referenced by TOOL_MANAGER::ProcessEvent().

◆ RegisterUIUpdateHandler() [1/2]

virtual void TOOLS_HOLDER::RegisterUIUpdateHandler ( const TOOL_ACTION aAction,
const ACTION_CONDITIONS aConditions 
)
inlinevirtual

Register an action's update conditions with the UI layer to allow the UI to appropriately display the state of its controls.

Parameters
aActionis the action to register.
aConditionsare the UI conditions to use for the control states.

Definition at line 64 of file tools_holder.h.

66  {
67  RegisterUIUpdateHandler( aAction.GetUIId(), aConditions );
68  }
int GetUIId() const
Definition: tool_action.h:112
virtual void RegisterUIUpdateHandler(const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
Register an action's update conditions with the UI layer to allow the UI to appropriately display the...
Definition: tools_holder.h:64

References TOOL_ACTION::GetUIId().

Referenced by ACTION_TOOLBAR::doSelectAction(), and ACTION_MANAGER::SetConditions().

◆ RegisterUIUpdateHandler() [2/2]

virtual void TOOLS_HOLDER::RegisterUIUpdateHandler ( int  aID,
const ACTION_CONDITIONS aConditions 
)
inlinevirtual

Register a UI update handler for the control with ID aID.

Parameters
aIDis the control ID to register the handler for.
aConditionsare the UI conditions to use for the control states.

Reimplemented in EDA_BASE_FRAME.

Definition at line 76 of file tools_holder.h.

77  {}

◆ ToolStackIsEmpty()

◆ UnregisterUIUpdateHandler() [1/2]

virtual void TOOLS_HOLDER::UnregisterUIUpdateHandler ( const TOOL_ACTION aAction)
inlinevirtual

Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler.

Parameters
aActionis the action to unregister the handler for.

Definition at line 84 of file tools_holder.h.

85  {
87  }
int GetUIId() const
Definition: tool_action.h:112
virtual void UnregisterUIUpdateHandler(const TOOL_ACTION &aAction)
Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler.
Definition: tools_holder.h:84

References TOOL_ACTION::GetUIId().

Referenced by ACTION_TOOLBAR::doSelectAction(), and ACTION_MANAGER::SetConditions().

◆ UnregisterUIUpdateHandler() [2/2]

virtual void TOOLS_HOLDER::UnregisterUIUpdateHandler ( int  aID)
inlinevirtual

Unregister a UI handler for a given ID that was registered using RegisterUIUpdateHandler.

Parameters
aIDis the control ID to unregister the handler for.

Reimplemented in EDA_BASE_FRAME.

Definition at line 94 of file tools_holder.h.

95  {}

Member Data Documentation

◆ m_actions

◆ m_dragAction

MOUSE_DRAG_ACTION TOOLS_HOLDER::m_dragAction
protected

Definition at line 174 of file tools_holder.h.

Referenced by CommonSettingsChanged(), and GetDragAction().

◆ m_dummySelection

SELECTION TOOLS_HOLDER::m_dummySelection
protected

Definition at line 161 of file tools_holder.h.

Referenced by GetCurrentSelection().

◆ m_immediateActions

bool TOOLS_HOLDER::m_immediateActions
protected

Definition at line 170 of file tools_holder.h.

Referenced by CommonSettingsChanged(), and GetDoImmediateActions().

◆ m_moveWarpsCursor

bool TOOLS_HOLDER::m_moveWarpsCursor
protected

Definition at line 176 of file tools_holder.h.

Referenced by CommonSettingsChanged(), and GetMoveWarpsCursor().

◆ m_toolDispatcher

◆ m_toolManager

TOOL_MANAGER* TOOLS_HOLDER::m_toolManager
protected

Definition at line 157 of file tools_holder.h.

Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), SCH_EDIT_FRAME::AddJunction(), EDA_BASE_FRAME::AddStandardHelpMenu(), EDA_DRAW_FRAME::AddStandardSubMenus(), SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::CheckAnnotate(), GERBVIEW_FRAME::Clear_DrawLayers(), SCH_EDIT_FRAME::ConvertPart(), EDA_3D_VIEWER::CreateMenuBar(), SYMBOL_EDIT_FRAME::CreateNewPart(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), SYMBOL_VIEWER_FRAME::DClickOnCmpList(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDIT_FRAME::DeleteJunction(), SCH_EDIT_FRAME::DisplayCurrentSheet(), GERBVIEW_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), SYMBOL_EDIT_FRAME::emptyScreen(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), FOOTPRINT_EDIT_FRAME::GetCurrentSelection(), FOOTPRINT_VIEWER_FRAME::GetCurrentSelection(), SYMBOL_EDIT_FRAME::GetCurrentSelection(), DISPLAY_FOOTPRINTS_FRAME::GetCurrentSelection(), PL_EDITOR_FRAME::GetCurrentSelection(), SCH_EDIT_FRAME::GetCurrentSelection(), SYMBOL_VIEWER_FRAME::GetCurrentSelection(), GERBVIEW_FRAME::GetCurrentSelection(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), GetToolManager(), EDA_DRAW_FRAME::GetUnitPair(), PL_EDITOR_FRAME::HardRedraw(), SYMBOL_EDIT_FRAME::HardRedraw(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::initScreenZoom(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::LoadOneLibraryPartAux(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), PCB_EDIT_FRAME::OnEditItemRequest(), SCH_EDIT_FRAME::OnFindDialogClose(), PL_EDITOR_FRAME::OnNewPageLayout(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), EDA_DRAW_FRAME::OnSelectGrid(), SYMBOL_EDIT_FRAME::OnSelectUnit(), EDA_DRAW_FRAME::OnSelectZoom(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D::PANEL_PREV_3D(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), PopTool(), PushTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SYMBOL_VIEWER_FRAME::ReCreateMenuBar(), SYMBOL_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), PL_EDITOR_FRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar(), SCH_EDIT_FRAME::ReCreateOptToolbar(), SYMBOL_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateVToolbar(), CVPCB_MAINFRAME::refreshAfterSymbolSearch(), SCH_BASE_FRAME::RefreshSelection(), FOOTPRINT_WIZARD_FRAME::ReloadFootprint(), SYMBOL_EDIT_FRAME::RollbackSymbolFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SYMBOL_EDIT_FRAME::saveLibrary(), EDA_DRAW_FRAME::SaveSettings(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), SCH_BASE_FRAME::SCH_BASE_FRAME(), SCH_EDIT_FRAME::SchematicCleanUp(), GERBVIEW_FRAME::SetActiveLayer(), PCB_BASE_EDIT_FRAME::SetBoard(), SYMBOL_EDIT_FRAME::SetCurPart(), SCH_EDIT_FRAME::SetScreen(), SYMBOL_VIEWER_FRAME::SetSelectedSymbol(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), KICAD_MANAGER_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), CVPCB_MAINFRAME::setupTools(), GERBVIEW_FRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), PL_EDITOR_FRAME::setupUIConditions(), CVPCB_MAINFRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), SYMBOL_VIEWER_FRAME::setupUIConditions(), KICAD_MANAGER_FRAME::setupUIConditions(), EDA_3D_VIEWER::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), GERBVIEW_FRAME::setupUIConditions(), EDA_DRAW_FRAME::setupUnits(), PCB_BASE_FRAME::ShowPadPropertiesDialog(), PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event(), EDA_DRAW_FRAME::unitsChangeRefresh(), PCB_EDIT_FRAME::UpdateViaSizeSelectBox(), DISPLAY_FOOTPRINTS_FRAME::updateView(), FOOTPRINT_WIZARD_FRAME::updateView(), FOOTPRINT_VIEWER_FRAME::updateView(), FOOTPRINT_EDIT_FRAME::UpdateView(), EDA_DRAW_FRAME::Zoom_Automatique(), CVPCB_MAINFRAME::~CVPCB_MAINFRAME(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), EDA_DRAW_FRAME::~EDA_DRAW_FRAME(), FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME(), FOOTPRINT_VIEWER_FRAME::~FOOTPRINT_VIEWER_FRAME(), FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME(), PL_EDITOR_FRAME::~PL_EDITOR_FRAME(), SCH_EDIT_FRAME::~SCH_EDIT_FRAME(), SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME(), and SYMBOL_VIEWER_FRAME::~SYMBOL_VIEWER_FRAME().

◆ m_toolStack

std::vector<std::string> TOOLS_HOLDER::m_toolStack
protected

Definition at line 163 of file tools_holder.h.

Referenced by CurrentToolName(), IsCurrentTool(), PopTool(), PushTool(), and ToolStackIsEmpty().


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