KiCad PCB EDA Suite
|
Master controller class: More...
#include <tool_manager.h>
Classes | |
struct | TOOL_STATE |
Struct describing the current execution state of a TOOL. More... | |
Public Types | |
typedef std::map< TOOL_BASE *, TOOL_STATE * > | TOOL_STATE_MAP |
typedef std::map< std::string, TOOL_STATE * > | NAME_STATE_MAP |
typedef std::map< TOOL_ID, TOOL_STATE * > | ID_STATE_MAP |
typedef std::list< TOOL_ID > | ID_LIST |
Public Member Functions | |
TOOL_MANAGER () | |
~TOOL_MANAGER () | |
void | RegisterTool (TOOL_BASE *aTool) |
Add a tool to the manager set and sets it up. | |
bool | InvokeTool (TOOL_ID aToolId) |
Call a tool by sending a tool activation event to tool of given ID. | |
bool | InvokeTool (const std::string &aToolName) |
Call a tool by sending a tool activation event to tool of given name. | |
void | ShutdownAllTools () |
Shutdown all tools with a currently registered event loop in this tool manager by waking them up with a null event. | |
void | ShutdownTool (TOOL_BASE *aTool) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop. | |
void | ShutdownTool (TOOL_ID aToolId) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop. | |
void | ShutdownTool (const std::string &aToolName) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop. | |
template<typename T , std::enable_if_t<!std::is_convertible_v< T *, COMMIT * > > * = nullptr> | |
bool | RunAction (const std::string &aActionName, T aParam) |
Run the specified action immediately, pausing the current action to run the new one. | |
bool | RunAction (const std::string &aActionName) |
template<typename T , std::enable_if_t<!std::is_convertible_v< T, COMMIT * > > * = nullptr> | |
bool | RunAction (const TOOL_ACTION &aAction, T aParam) |
Run the specified action immediately, pausing the current action to run the new one. | |
template<typename T > | |
bool | RunSynchronousAction (const TOOL_ACTION &aAction, COMMIT *aCommit, T aParam) |
Run the specified action immediately, pausing the current action to run the new one. | |
bool | RunSynchronousAction (const TOOL_ACTION &aAction, COMMIT *aCommit) |
bool | RunAction (const TOOL_ACTION &aAction) |
template<typename T > | |
bool | PostAction (const std::string &aActionName, T aParam) |
Run the specified action after the current action (coroutine) ends. | |
bool | PostAction (const std::string &aActionName) |
template<typename T > | |
bool | PostAction (const TOOL_ACTION &aAction, T aParam) |
Run the specified action after the current action (coroutine) ends. | |
void | PostAction (const TOOL_ACTION &aAction) |
bool | PostAction (const TOOL_ACTION &aAction, COMMIT *aCommit) |
void | CancelTool () |
Send a cancel event to the tool currently at the top of the tool stack. | |
void | PrimeTool (const VECTOR2D &aPosition) |
"Prime" a tool by sending a cursor left-click event with the mouse position set to the passed in position. | |
int | GetHotKey (const TOOL_ACTION &aAction) const |
ACTION_MANAGER * | GetActionManager () const |
TOOL_BASE * | FindTool (int aId) const |
Search for a tool with given ID. | |
TOOL_BASE * | FindTool (const std::string &aName) const |
Search for a tool with given name. | |
template<typename T > | |
T * | GetTool () |
std::vector< TOOL_BASE * > | Tools () |
void | DeactivateTool () |
Deactivate the currently active tool. | |
bool | IsToolActive (TOOL_ID aId) const |
Return true if a tool with given id is active (executing) | |
void | ResetTools (TOOL_BASE::RESET_REASON aReason) |
Reset all tools (i.e. | |
void | InitTools () |
Initializes all registered tools. | |
bool | ProcessEvent (const TOOL_EVENT &aEvent) |
Propagate an event to tools that requested events of matching type(s). | |
void | PostEvent (const TOOL_EVENT &aEvent) |
Put an event to the event queue to be processed at the end of event processing cycle. | |
void | SetEnvironment (EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, APP_SETTINGS_BASE *aSettings, TOOLS_HOLDER *aFrame) |
Set the work environment (model, view, view controls and the parent window). | |
KIGFX::VIEW * | GetView () const |
KIGFX::VIEW_CONTROLS * | GetViewControls () const |
VECTOR2D | GetMousePosition () const |
VECTOR2D | GetCursorPosition () const |
EDA_ITEM * | GetModel () const |
APP_SETTINGS_BASE * | GetSettings () const |
TOOLS_HOLDER * | GetToolHolder () const |
int | GetCurrentToolId () const |
Return id of the tool that is on the top of the active tools stack (was invoked the most recently). | |
TOOL_BASE * | GetCurrentTool () const |
Return the tool that is on the top of the active tools stack (was invoked the most recently). | |
TOOL_STATE * | GetCurrentToolState () const |
Return the #TOOL_STATE object representing the state of the active tool. | |
int | GetPriority (int aToolId) const |
Return priority of a given tool. | |
void | ScheduleNextState (TOOL_BASE *aTool, TOOL_STATE_FUNC &aHandler, const TOOL_EVENT_LIST &aConditions) |
Define a state transition. | |
void | ClearTransitions (TOOL_BASE *aTool) |
Clear the state transition map for a tool. | |
void | RunMainStack (TOOL_BASE *aTool, std::function< void()> aFunc) |
void | UpdateUI (const TOOL_EVENT &aEvent) |
Update the status bar and synchronizes toolbars. | |
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. | |
void | ScheduleContextMenu (TOOL_BASE *aTool, ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger) |
Set behavior of the tool's context popup menu. | |
const KIGFX::VC_SETTINGS & | GetCurrentToolVC () const |
Return the view controls settings for the current tool or the general settings if there is no active tool. | |
bool | IsContextMenuActive () const |
True while processing a context menu. | |
void | VetoContextMenuMouseWarp () |
Disable mouse warping after the current context menu is closed. | |
void | DispatchContextMenu (const TOOL_EVENT &aEvent) |
Handle context menu related events. | |
bool | DispatchHotKey (const TOOL_EVENT &aEvent) |
Handle specific events, that are intended for TOOL_MANAGER rather than tools. | |
VECTOR2D | GetMenuCursorPos () const |
Static Public Member Functions | |
static TOOL_ID | MakeToolId (const std::string &aToolName) |
Generates a unique ID from for a tool with given name. | |
Private Types | |
typedef std::pair< TOOL_EVENT_LIST, TOOL_STATE_FUNC > | TRANSITION |
Private Member Functions | |
bool | doRunAction (const TOOL_ACTION &aAction, bool aNow, const std::any &aParam, COMMIT *aCommit) |
Helper function to actually run an action. | |
bool | doRunAction (const std::string &aActionName, bool aNow, const std::any &aParam, COMMIT *aCommit) |
bool | dispatchInternal (TOOL_EVENT &aEvent) |
Pass an event at first to the active tools, then to all others. | |
bool | dispatchActivation (const TOOL_EVENT &aEvent) |
Check if it is a valid activation event and invokes a proper tool. | |
bool | invokeTool (TOOL_BASE *aTool) |
Invoke a tool by sending a proper event (in contrary to runTool, which makes the tool run for real). | |
bool | runTool (TOOL_BASE *aTool) |
Make a tool active, so it can receive events and react to them. | |
ID_LIST::iterator | finishTool (TOOL_STATE *aState) |
Deactivate a tool and does the necessary clean up. | |
bool | isRegistered (TOOL_BASE *aTool) const |
Return information about a tool registration status. | |
bool | isActive (TOOL_BASE *aTool) const |
Return information about a tool activation status. | |
void | saveViewControls (TOOL_STATE *aState) |
Save the #VIEW_CONTROLS settings to the tool state object. | |
void | applyViewControls (const TOOL_STATE *aState) |
Apply #VIEW_CONTROLS settings stored in a #TOOL_STATE object. | |
bool | processEvent (const TOOL_EVENT &aEvent) |
Main function for event processing. | |
void | setActiveState (TOOL_STATE *aState) |
Save the previous active state and sets a new one. | |
Private Attributes | |
std::vector< TOOL_BASE * > | m_toolOrder |
< List of tools in the order they were registered | |
TOOL_STATE_MAP | m_toolState |
Index of the registered tools current states, associated by tools' names. | |
NAME_STATE_MAP | m_toolNameIndex |
Index of the registered tools current states, associated by tools' ID numbers. | |
ID_STATE_MAP | m_toolIdIndex |
Index of the registered tools to easily lookup by their type. | |
std::map< const char *, TOOL_BASE * > | m_toolTypes |
Stack of the active tools. | |
ID_LIST | m_activeTools |
Instance of ACTION_MANAGER that handles TOOL_ACTIONs. | |
ACTION_MANAGER * | m_actionMgr |
Original cursor position, if overridden by the context menu handler. | |
std::map< TOOL_ID, std::optional< VECTOR2D > > | m_cursorSettings |
EDA_ITEM * | m_model |
KIGFX::VIEW * | m_view |
KIGFX::VIEW_CONTROLS * | m_viewControls |
TOOLS_HOLDER * | m_frame |
APP_SETTINGS_BASE * | m_settings |
Queue that stores events to be processed at the end of the event processing cycle. | |
std::list< TOOL_EVENT > | m_eventQueue |
Right click context menu position. | |
VECTOR2D | m_menuCursor |
bool | m_warpMouseAfterContextMenu |
Flag indicating whether a context menu is currently displayed. | |
bool | m_menuActive |
Tool currently displaying a popup menu. It is negative when there is no menu displayed. | |
TOOL_ID | m_menuOwner |
Pointer to the state object corresponding to the currently executed tool. | |
TOOL_STATE * | m_activeState |
True if the tool manager is shutting down (don't process additional events) | |
bool | m_shuttingDown |
Master controller class:
Definition at line 61 of file tool_manager.h.
typedef std::list<TOOL_ID> TOOL_MANAGER::ID_LIST |
Definition at line 75 of file tool_manager.h.
typedef std::map<TOOL_ID, TOOL_STATE*> TOOL_MANAGER::ID_STATE_MAP |
Definition at line 74 of file tool_manager.h.
typedef std::map<std::string, TOOL_STATE*> TOOL_MANAGER::NAME_STATE_MAP |
Definition at line 73 of file tool_manager.h.
typedef std::map<TOOL_BASE*, TOOL_STATE*> TOOL_MANAGER::TOOL_STATE_MAP |
Definition at line 72 of file tool_manager.h.
|
private |
Definition at line 535 of file tool_manager.h.
TOOL_MANAGER::TOOL_MANAGER | ( | ) |
Definition at line 209 of file tool_manager.cpp.
References m_actionMgr.
TOOL_MANAGER::~TOOL_MANAGER | ( | ) |
Definition at line 225 of file tool_manager.cpp.
References m_actionMgr, and m_toolState.
|
private |
Apply #VIEW_CONTROLS settings stored in a #TOOL_STATE object.
Definition at line 1132 of file tool_manager.cpp.
References KIGFX::VIEW_CONTROLS::ApplySettings(), m_viewControls, and TOOL_MANAGER::TOOL_STATE::vcSettings.
Referenced by setActiveState().
void TOOL_MANAGER::CancelTool | ( | ) |
Send a cancel event to the tool currently at the top of the tool stack.
Definition at line 392 of file tool_manager.cpp.
References processEvent(), TA_CANCEL_TOOL, and TC_COMMAND.
Referenced by ACTION_TOOLBAR::onToolEvent().
void TOOL_MANAGER::ClearTransitions | ( | TOOL_BASE * | aTool | ) |
Clear the state transition map for a tool.
aTool | is the tool that should have the transition map cleared. |
Definition at line 693 of file tool_manager.cpp.
References m_toolState.
Referenced by TOOL_INTERACTIVE::resetTransitions().
void TOOL_MANAGER::DeactivateTool | ( | ) |
Deactivate the currently active tool.
Definition at line 606 of file tool_manager.cpp.
References processEvent(), TA_CANCEL_TOOL, and TC_COMMAND.
Referenced by GERBVIEW_FRAME::doCloseWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), SCH_DRAWING_TOOLS::DrawRuleArea(), SCH_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), DIALOG_UPDATE_PCB::PerformUpdate(), ResetTools(), and FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME().
|
private |
Check if it is a valid activation event and invokes a proper tool.
aEvent | is an event to be tested. |
Definition at line 871 of file tool_manager.cpp.
References TOOL_EVENT::Format(), TOOL_EVENT::getCommandStr(), TOOL_EVENT::IsActivate(), kicadTraceToolStack, m_toolNameIndex, and runTool().
Referenced by processEvent().
void TOOL_MANAGER::DispatchContextMenu | ( | const TOOL_EVENT & | aEvent | ) |
Handle context menu related events.
Definition at line 894 of file tool_manager.cpp.
References BUT_RIGHT, ACTION_MENU::Clone(), CMENU_BUTTON, CMENU_NOW, CMENU_OFF, TOOL_MANAGER::TOOL_STATE::cofunc, TOOL_MANAGER::TOOL_STATE::contextMenu, TOOL_MANAGER::TOOL_STATE::contextMenuTrigger, dispatchInternal(), KIGFX::VIEW_CONTROLS::ForceCursorPosition(), KIGFX::VIEW_CONTROLS::GetCursorPosition(), TOOL_EVENT::IsClick(), m_activeTools, m_cursorSettings, KIGFX::VC_SETTINGS::m_forceCursorPosition, KIGFX::VC_SETTINGS::m_forcedPosition, m_frame, m_menuActive, m_menuCursor, m_menuOwner, m_toolIdIndex, m_viewControls, m_warpMouseAfterContextMenu, TOOL_MANAGER::TOOL_STATE::pendingWait, TOOL_EVENT::SetHasPosition(), TOOL_EVENT::SetParameter(), TA_ANY, TA_CHOICE_MENU_CHOICE, TA_CHOICE_MENU_CLOSED, TC_ANY, TC_COMMAND, TOOL_MANAGER::TOOL_STATE::vcSettings, TOOL_MANAGER::TOOL_STATE::waitEvents, and KIGFX::VIEW_CONTROLS::WarpMouseCursor().
Referenced by processEvent().
bool TOOL_MANAGER::DispatchHotKey | ( | const TOOL_EVENT & | aEvent | ) |
Handle specific events, that are intended for TOOL_MANAGER rather than tools.
aEvent | is the event to be processed. |
Definition at line 862 of file tool_manager.cpp.
References TOOL_EVENT::Action(), TOOL_EVENT::KeyCode(), m_actionMgr, TOOL_EVENT::Modifier(), ACTION_MANAGER::RunHotKey(), and TA_KEY_PRESSED.
Referenced by processEvent().
|
private |
Pass an event at first to the active tools, then to all others.
Definition at line 732 of file tool_manager.cpp.
References COROUTINE< ReturnType, ArgType >::Call(), TOOL_EVENT::Category(), TOOL_EVENT_LIST::clear(), TOOL_MANAGER::TOOL_STATE::cofunc, finishTool(), TOOL_EVENT::FirstResponder(), TOOL_EVENT::Format(), TOOL_BASE::GetName(), TOOL_MANAGER::TOOL_STATE::idle, TOOL_MANAGER::TOOL_STATE::initialEvent, TOOL_EVENT::IsChoiceMenu(), kicadTraceToolStack, m_activeTools, m_menuOwner, m_toolIdIndex, m_toolState, TOOL_EVENT_LIST::Matches(), TOOL_EVENT::PassEvent(), TOOL_MANAGER::TOOL_STATE::pendingWait, TOOL_MANAGER::TOOL_STATE::Push(), COROUTINE< ReturnType, ArgType >::Resume(), COROUTINE< ReturnType, ArgType >::Running(), setActiveState(), TOOL_EVENT::SetFirstResponder(), TC_MESSAGE, TOOL_MANAGER::TOOL_STATE::theTool, TOOL_MANAGER::TOOL_STATE::transitions, TOOL_MANAGER::TOOL_STATE::vcSettings, TOOL_MANAGER::TOOL_STATE::waitEvents, and TOOL_MANAGER::TOOL_STATE::wakeupEvent.
Referenced by DispatchContextMenu(), and processEvent().
|
private |
Definition at line 293 of file tool_manager.cpp.
References doRunAction(), ACTION_MANAGER::FindAction(), and m_actionMgr.
|
private |
Helper function to actually run an action.
Definition at line 328 of file tool_manager.cpp.
References GetCursorPosition(), m_activeState, m_shuttingDown, TOOL_ACTION::MakeEvent(), PostEvent(), processEvent(), setActiveState(), STS_CANCELLED, STS_FINISHED, STS_RUNNING, TC_COMMAND, and UpdateUI().
Referenced by doRunAction(), PostAction(), RunAction(), and RunSynchronousAction().
TOOL_BASE * TOOL_MANAGER::FindTool | ( | const std::string & | aName | ) | const |
Search for a tool with given name.
aName | is the name of the requested tool. |
Definition at line 595 of file tool_manager.cpp.
References m_toolNameIndex.
TOOL_BASE * TOOL_MANAGER::FindTool | ( | int | aId | ) | const |
Search for a tool with given ID.
aId | is the ID number of the requested tool. |
Definition at line 584 of file tool_manager.cpp.
References m_toolIdIndex.
Referenced by GetCurrentTool(), InvokeTool(), ACTION_MANAGER::RunHotKey(), PCB_TEST_FRAME_BASE::SetSelectionHook(), and ShutdownTool().
|
private |
Deactivate a tool and does the necessary clean up.
aState | is the state variable of the tool to be stopped. |
Definition at line 996 of file tool_manager.cpp.
References TOOL_BASE::GetId(), TOOL_MANAGER::TOOL_STATE::idle, m_activeState, m_activeTools, TOOL_MANAGER::TOOL_STATE::Pop(), setActiveState(), and TOOL_MANAGER::TOOL_STATE::theTool.
Referenced by dispatchInternal(), and ShutdownTool().
|
inline |
Definition at line 302 of file tool_manager.h.
References m_actionMgr.
Referenced by TOOLS_HOLDER::CommonSettingsChanged(), ACTION_TOOLBAR::doSelectAction(), ACTION_MENU::OnMenuEvent(), TOOLS_HOLDER::PopTool(), TOOLS_HOLDER::PushTool(), NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand(), NL_SCHEMATIC_PLUGIN_IMPL::SetActiveCommand(), NL_GERBVIEW_PLUGIN_IMPL::SetActiveCommand(), NL_PL_EDITOR_PLUGIN_IMPL::SetActiveCommand(), NL_PCBNEW_PLUGIN_IMPL::SetActiveCommand(), EDA_3D_VIEWER_FRAME::setupUIConditions(), CVPCB_MAINFRAME::setupUIConditions(), DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), SIMULATOR_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), SYMBOL_VIEWER_FRAME::setupUIConditions(), GERBVIEW_FRAME::setupUIConditions(), KICAD_MANAGER_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), PCB_EDIT_FRAME::setupUIConditions(), and TOOLS_HOLDER::ShowChangedLanguage().
|
inline |
Return the tool that is on the top of the active tools stack (was invoked the most recently).
Definition at line 421 of file tool_manager.h.
References FindTool(), and GetCurrentToolId().
Referenced by PCB_GRID_HELPER::queryVisible().
|
inline |
Return id of the tool that is on the top of the active tools stack (was invoked the most recently).
Definition at line 410 of file tool_manager.h.
References m_activeTools.
Referenced by GetCurrentTool(), and GetCurrentToolState().
|
inline |
Return the #TOOL_STATE object representing the state of the active tool.
If there are no tools active, it returns nullptr.
Definition at line 430 of file tool_manager.h.
References GetCurrentToolId(), and m_toolIdIndex.
Referenced by GetCurrentToolVC(), invokeTool(), and ProcessEvent().
const KIGFX::VC_SETTINGS & TOOL_MANAGER::GetCurrentToolVC | ( | ) | const |
Return the view controls settings for the current tool or the general settings if there is no active tool.
Definition at line 1053 of file tool_manager.cpp.
References GetCurrentToolState(), KIGFX::VIEW_CONTROLS::GetSettings(), and m_viewControls.
Referenced by COMMON_TOOLS::ResetLocalCoords().
VECTOR2D TOOL_MANAGER::GetCursorPosition | ( | ) | const |
Definition at line 319 of file tool_manager.cpp.
References KIGFX::VIEW_CONTROLS::GetCursorPosition(), KIPLATFORM::UI::GetMousePosition(), m_viewControls, and ToVECTOR2D().
Referenced by doRunAction(), and invokeTool().
int TOOL_MANAGER::GetHotKey | ( | const TOOL_ACTION & | aAction | ) | const |
Definition at line 431 of file tool_manager.cpp.
References ACTION_MANAGER::GetHotKey(), and m_actionMgr.
Referenced by ACTION_MENU::updateHotKeys().
|
inline |
Definition at line 529 of file tool_manager.h.
References m_menuCursor.
Referenced by ROUTER_TOOL::InlineBreakTrack().
|
inline |
Definition at line 398 of file tool_manager.h.
References m_model.
Referenced by BOARD_INSPECTION_TOOL::ClearHighlight(), BOARD_COMMIT::dirtyIntersectingZones(), DIALOG_POSITION_RELATIVE::getAnchorPos(), BOARD_COMMIT::GetBoard(), TOOL_BASE::getModelInternal(), BOARD_INSPECTION_TOOL::highlightNet(), BOARD_COMMIT::Push(), BOARD_COMMIT::Revert(), and GROUP_CONTEXT_MENU::update().
VECTOR2D TOOL_MANAGER::GetMousePosition | ( | ) | const |
Definition at line 310 of file tool_manager.cpp.
References KIPLATFORM::UI::GetMousePosition(), KIGFX::VIEW_CONTROLS::GetMousePosition(), m_viewControls, and ToVECTOR2D().
Referenced by PCB_TUNING_PATTERN::GetPreviewItems(), EE_SELECTION_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), ACTION_MENU::OnMenuEvent(), and SYMBOL_EDITOR_EDIT_TOOL::Properties().
int TOOL_MANAGER::GetPriority | ( | int | aToolId | ) | const |
Return priority of a given tool.
Higher number means that the tool is closer to the beginning of the active tools queue (i.e. receives events earlier, tools with lower priority receive events later).
aToolId | is the id of queried tool. |
Definition at line 668 of file tool_manager.cpp.
References m_activeTools.
Referenced by ACTION_MANAGER::RunHotKey().
|
inline |
Definition at line 400 of file tool_manager.h.
References m_settings.
Referenced by SIMULATOR_FRAME::CommonSettingsChanged(), EDA_DRAW_FRAME::DisplayGridMsg(), PNS_KICAD_IFACE::DisplayItem(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EE_GRID_HELPER::GetGridSize(), PCB_GRID_HELPER::GetGridSize(), PNS_KICAD_IFACE::GetUnits(), COMMON_TOOLS::GridFastCycle(), SCH_EDITOR_CONTROL::GridFeedback(), COMMON_TOOLS::GridNext(), COMMON_TOOLS::GridPreset(), COMMON_TOOLS::GridPrev(), COMMON_TOOLS::OnGridChanged(), COMMON_TOOLS::Reset(), COMMON_TOOLS::ToggleCursor(), COMMON_TOOLS::ToggleCursorStyle(), and PCB_TUNING_PATTERN::Update().
|
inline |
Definition at line 324 of file tool_manager.h.
References m_toolTypes, and name.
Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), EDA_BASE_FRAME::AddStandardHelpMenu(), EDA_DRAW_FRAME::AddStandardSubMenus(), SCH_PROPERTIES_PANEL::AfterCommit(), PCB_PROPERTIES_PANEL::AfterCommit(), SCH_MOVE_TOOL::AlignToGrid(), SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDITOR_CONTROL::AssignNetclass(), BOARD_EDITOR_CONTROL::AssignNetclass(), EE_SELECTION_TOOL::autostartEvent(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), PCB_EDIT_FRAME::CanAcceptApiCommands(), PCB_EDIT_FRAME::canCloseWindow(), FOOTPRINT_EDIT_FRAME::canCloseWindow(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_FRAME::CheckAnnotate(), PCB_EDIT_FRAME::CommonSettingsChanged(), SCH_EDITOR_CONTROL::CopyAsText(), SYMBOL_EDITOR_EDIT_TOOL::CopyAsText(), PAD_TOOL::copyPadSettings(), ARRAY_TOOL::CreateArray(), ZONE_CREATE_HELPER::createNewZone(), EE_INSPECTION_TOOL::CrossProbe(), DRC_TOOL::CrossProbe(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDIT_FRAME::DeleteJunction(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), BOARD_INSPECTION_TOOL::DiffFootprint(), BOARD_COMMIT::dirtyIntersectingZones(), SCH_EDIT_FRAME::DisplayCurrentSheet(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), SCH_EDITOR_CONTROL::doCopy(), BOARD_EDITOR_CONTROL::doCrossProbePcbToSch(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), SCH_FIELD::DoHypertextAction(), SCH_TEXT::DoHypertextAction(), SCH_TEXTBOX::DoHypertextAction(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), EDA_3D_VIEWER_FRAME::doReCreateMenuBar(), BITMAP2CMP_FRAME::doReCreateMenuBar(), CVPCB_MAINFRAME::doReCreateMenuBar(), SCH_EDIT_FRAME::doReCreateMenuBar(), SIMULATOR_FRAME::doReCreateMenuBar(), SYMBOL_EDIT_FRAME::doReCreateMenuBar(), SYMBOL_VIEWER_FRAME::doReCreateMenuBar(), GERBVIEW_FRAME::doReCreateMenuBar(), KICAD_MANAGER_FRAME::doReCreateMenuBar(), PL_EDITOR_FRAME::doReCreateMenuBar(), PCB_CALCULATOR_FRAME::doReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::doReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::doReCreateMenuBar(), PCB_EDIT_FRAME::doReCreateMenuBar(), SCH_DRAWING_TOOLS::doSyncSheetsPins(), EDIT_TOOL::Drag(), DRAWING_TOOL::DrawVia(), BOARD_EDITOR_CONTROL::DrillOrigin(), EDIT_TOOL::Duplicate(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), PAD_TOOL::EditPad(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), GROUP_TOOL::EnterGroup(), SCH_NAVIGATE_TOOL::EnterSheet(), EE_INSPECTION_TOOL::ExcludeMarker(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), EDIT_TOOL::GetAndPlace(), DESIGN_BLOCK_TREE_MODEL_ADAPTER::GetContextMenuTool(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), FP_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), DISPLAY_FOOTPRINTS_FRAME::GetCurrentSelection(), SCH_EDIT_FRAME::GetCurrentSelection(), SYMBOL_EDIT_FRAME::GetCurrentSelection(), SYMBOL_VIEWER_FRAME::GetCurrentSelection(), GERBVIEW_FRAME::GetCurrentSelection(), PL_EDITOR_FRAME::GetCurrentSelection(), FOOTPRINT_EDIT_FRAME::GetCurrentSelection(), FOOTPRINT_VIEWER_FRAME::GetCurrentSelection(), PCB_EDIT_FRAME::GetCurrentSelection(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), SCH_PROPERTIES_PANEL::getPropertyFromEvent(), PCB_PROPERTIES_PANEL::getPropertyFromEvent(), DRAWING_TOOL::getSourceZoneForAction(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), PCB_EDIT_TABLE_TOOL::getTableCellSelection(), EDA_DRAW_FRAME::GetUnitPair(), PCB_CONTROL::GridPlaceOrigin(), GROUP_TOOL::Group(), API_HANDLER_PCB::handleInteractiveMoveItems(), API_HANDLER_PCB::handleSaveSelectionToString(), SCH_EDIT_FRAME::HardRedraw(), SYMBOL_EDIT_FRAME::HardRedraw(), PL_EDITOR_FRAME::HardRedraw(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::highlightNet(), highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), SCH_DRAWING_TOOLS::ImportSheet(), EE_TOOL_BASE< T >::Init(), SCH_DESIGN_BLOCK_CONTROL::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(), BOARD_EDITOR_CONTROL::Init(), BOARD_INSPECTION_TOOL::Init(), BOARD_REANNOTATE_TOOL::Init(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), GENERATOR_TOOL::Init(), GLOBAL_EDIT_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), PCB_EDIT_TABLE_TOOL::Init(), PCB_POINT_EDITOR::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), POSITION_RELATIVE_TOOL::Init(), DIALOG_PAD_PROPERTIES::initValues(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), SCH_EDIT_TOOL::InteractiveDelete(), SYMBOL_EDITOR_EDIT_TOOL::InteractiveDelete(), PL_EDIT_TOOL::InteractiveDelete(), PCB_CONTROL::InteractiveDelete(), EDIT_TOOL::invokeInlineRouter(), EDIT_TOOL::isRouterActive(), SCH_EDIT_FRAME::KiwayMailIn(), GROUP_TOOL::LeaveGroup(), SCH_EDIT_FRAME::LoadProjectSettings(), PCB_EDIT_FRAME::LoadProjectSettings(), FOOTPRINT_EDIT_FRAME::LoadSettings(), SYMBOL_EDIT_FRAME::LoadSymbol(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), EE_SELECTION_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), makeShapeModificationMenu(), GRAPHICS_CLEANER::mergePads(), SCH_EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), PROPERTIES_FRAME::OnAcceptPrms(), DIALOG_DRC::OnActivateDlg(), PCB_EDIT_FRAME::onBoardLoaded(), DIALOG_DRC::OnCancelClick(), DIALOG_FOOTPRINT_CHECKER::OnCancelClick(), DIALOG_GENERATORS::OnCancelClick(), DIALOG_INSPECTOR::onCellClicked(), DIALOG_POSITION_RELATIVE::OnClear(), ARRAY_TOOL::onDialogClosed(), DIALOG_DRC::OnDRCItemRClick(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), DIALOG_ERC::OnERCItemRClick(), SCH_EDIT_FRAME::OnImportProject(), PCB_EDIT_FRAME::OnNetlistChanged(), DIALOG_POSITION_RELATIVE::OnOkClick(), DIALOG_EXCHANGE_FOOTPRINTS::OnOKClicked(), DIALOG_PLOT::onRunDRC(), DIALOG_DRC::OnRunDRCClick(), DIALOG_CREATE_ARRAY::OnSelectCenterButton(), DIALOG_POSITION_RELATIVE::OnSelectItemClick(), DIALOG_POSITION_RELATIVE::OnSelectPointClick(), DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_SCH_SELECTION_FILTER::PANEL_SCH_SELECTION_FILTER(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), SCH_EDITOR_CONTROL::Paste(), PAD_TOOL::pastePadProperties(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), PCB_CONTROL::placeBoardItems(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceTuningPattern(), DIALOG_PLOT::Plot(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), SCH_PRINTOUT::PrintPage(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), BOARD_COMMIT::Push(), PAD_TOOL::pushPadSettings(), SCH_COMMIT::pushSchEdit(), SYMBOL_EDIT_FRAME::PushSymbolToUndoList(), PCB_BASE_EDIT_FRAME::PutDataInPreviousState(), PCB_EDIT_FRAME::RebuildAndRefresh(), SCH_EDIT_FRAME::ReCreateOptToolbar(), SYMBOL_EDIT_FRAME::ReCreateOptToolbar(), PL_EDITOR_FRAME::ReCreateOptToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateOptToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateVToolbar(), PCB_EDIT_FRAME::ReCreateVToolbar(), SCH_EDITOR_CONTROL::Redo(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SCH_BASE_FRAME::RefreshZoomDependentItems(), GENERATOR_TOOL::RegenerateSelected(), GROUP_TOOL::RemoveFromGroup(), FOOTPRINT_EDITOR_CONTROL::RenameFootprint(), SYMBOL_EDITOR_CONTROL::RenameSymbol(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), SCH_COMMIT::Revert(), BOARD_COMMIT::Revert(), SCH_COMMIT::revertLibEdit(), PL_EDITOR_FRAME::RollbackFromUndo(), SCH_EDIT_FRAME::RollbackSchematicFromUndo(), SCH_EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), DRC_TOOL::RunTests(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SCH_EDIT_FRAME::SaveProjectLocalSettings(), PCB_EDIT_FRAME::saveProjectSettings(), SCH_EDIT_FRAME::SaveSelectionAsDesignBlock(), SYMBOL_EDIT_FRAME::SaveSettings(), EDA_DRAW_FRAME::SaveSettings(), FOOTPRINT_EDIT_FRAME::SaveSettings(), SCH_BASE_FRAME::SCH_BASE_FRAME(), SCH_EDIT_FRAME::SchematicCleanUp(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), PCB_TOOL_BASE::selection(), PCB_PICKER_TOOL::SelectItemInteractively(), CVPCB_MAINFRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), SCH_EDIT_FRAME::setupUIConditions(), PCB_EDIT_FRAME::setupUIConditions(), EDA_DRAW_FRAME::setupUnits(), PCB_EDIT_FRAME::ShowFindDialog(), SCH_EDIT_FRAME::ShowFindReplaceDialog(), BOARD_INSPECTION_TOOL::ShowFootprintLinks(), PCB_BASE_EDIT_FRAME::ShowGraphicItemPropertiesDialog(), PCB_TUNING_PATTERN::ShowPropertiesDialog(), SCH_EDITOR_CONTROL::SimProbe(), SCH_EDITOR_CONTROL::SimTune(), EDA_DRAW_FRAME::ToggleUserUnits(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_EDITOR_CONTROL::Undo(), SYMBOL_EDITOR_EDIT_TOOL::Undo(), GROUP_TOOL::Ungroup(), SYMBOL_UNIT_MENU::update(), BODY_STYLE_MENU::update(), ALT_PIN_FUNCTION_MENU::update(), PIN_TRICKS_MENU::update(), HIGHLIGHT_MENU::update(), GROUP_CONTEXT_MENU::update(), SCH_PROPERTIES_PANEL::UpdateData(), PCB_PROPERTIES_PANEL::UpdateData(), DIALOG_DRC::updateDisplayedCounts(), SCH_EDIT_FRAME::UpdateHierarchyNavigator(), PCB_POINT_EDITOR::updateItem(), BOARD_INSPECTION_TOOL::UpdateLocalRatsnest(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCB_CONTROL::UpdateMessagePanel(), PCB_EDIT_FRAME::UpdateViaSizeSelectBox(), SCH_PROPERTIES_PANEL::valueChanged(), PCB_PROPERTIES_PANEL::valueChanged(), SCH_PROPERTIES_PANEL::valueChanging(), PCB_PROPERTIES_PANEL::valueChanging(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), ZONE_FILLER_TOOL::ZoneFill(), BOARD_EDITOR_CONTROL::ZoneMerge(), GLOBAL_EDIT_TOOL::ZonesManager(), and ZONE_FILLER_TOOL::ZoneUnfill().
|
inline |
Definition at line 402 of file tool_manager.h.
References m_frame.
Referenced by BOARD_COMMIT::BOARD_COMMIT(), TOOL_DISPATCHER::DispatchWxEvent(), ACTION_TOOLBAR::doSelectAction(), VIA_SIZE_MENU::eventHandler(), DIALOG_POSITION_RELATIVE::getAnchorPos(), TOOL_BASE::getToolHolderInternal(), highlightNet(), EDA_3D_CONTROLLER::Main(), SCH_COMMIT::makeImage(), ACTION_TOOLBAR::onPaletteEvent(), ACTION_TOOLBAR::onToolEvent(), SCH_COMMIT::parentObject(), ACTION_TOOLBAR::popupPalette(), processEvent(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), SCH_COMMIT::pushSchEdit(), EDA_3D_CONTROLLER::Reset(), SCH_COMMIT::Revert(), SCH_COMMIT::revertLibEdit(), ACTION_MANAGER::RunHotKey(), SCH_COMMIT::SCH_COMMIT(), NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand(), NL_SCHEMATIC_PLUGIN_IMPL::SetActiveCommand(), NL_GERBVIEW_PLUGIN_IMPL::SetActiveCommand(), NL_PL_EDITOR_PLUGIN_IMPL::SetActiveCommand(), NL_PCBNEW_PLUGIN_IMPL::SetActiveCommand(), ACTION_MANAGER::SetConditions(), EDA_3D_CONTROLLER::SetMaterial(), EDA_3D_CONTROLLER::ToggleLayersManager(), EDA_3D_CONTROLLER::ToggleVisibility(), VIA_SIZE_MENU::update(), ACTION_MANAGER::UpdateHotKeys(), and UpdateUI().
|
inline |
Definition at line 391 of file tool_manager.h.
References m_view.
Referenced by PCB_GRID_HELPER::Align(), EE_GRID_HELPER::BestDragOrigin(), PCB_GRID_HELPER::BestDragOrigin(), PCB_GRID_HELPER::BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::canUseGrid(), BOARD_INSPECTION_TOOL::ClearHighlight(), PCB_GRID_HELPER::computeAnchors(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), EDIT_TOOL::doMoveSelection(), PCB_TUNING_PATTERN::EditPush(), PCB_TUNING_PATTERN::EditRevert(), EE_GRID_HELPER::EE_GRID_HELPER(), GRID_HELPER::enableAndGetAnchorDebug(), PAD_TOOL::EnumeratePads(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), GRID_HELPER::GetGrid(), GRID_HELPER::GetGridSize(), EE_GRID_HELPER::GetGridSize(), PCB_GRID_HELPER::GetGridSize(), GRID_HELPER::GetOrigin(), TOOL_DISPATCHER::getView(), TOOL_BASE::getView(), GRID_HELPER::GetVisibleGrid(), GRID_HELPER::GRID_HELPER(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), ROUTER_TOOL::Init(), DRAWING_TOOL::Init(), PCB_SELECTION_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PCB_GRID_HELPER::PCB_GRID_HELPER(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), SCH_COMMIT::pushSchEdit(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), SCH_COMMIT::Revert(), BOARD_COMMIT::Revert(), GRID_HELPER::SetAuxAxes(), GRID_HELPER::showConstructionGeometry(), SCH_MOVE_TOOL::trimDanglingLines(), PCB_TUNING_PATTERN::Update(), PNS::TOOL_BASE::updateEndItem(), GRID_HELPER::updateSnapPoint(), PNS::TOOL_BASE::updateStartItem(), EE_GRID_HELPER::~EE_GRID_HELPER(), and PCB_GRID_HELPER::~PCB_GRID_HELPER().
|
inline |
Definition at line 393 of file tool_manager.h.
References m_viewControls.
Referenced by ZONE_CREATE_HELPER::createNewZone(), TOOL_DISPATCHER::DispatchWxEvent(), and TOOL_BASE::getViewControls().
void TOOL_MANAGER::InitTools | ( | ) |
Initializes all registered tools.
If a tool fails during the initialization, it is deactivated and becomes unavailable for further use. Initialization should be done only once.
Definition at line 635 of file tool_manager.cpp.
References TOOL_BASE::GetId(), TOOL_BASE::GetName(), TOOL_BASE::Init(), kicadTraceToolStack, m_actionMgr, m_toolIdIndex, m_toolNameIndex, m_toolOrder, m_toolState, m_toolTypes, ResetTools(), TOOL_BASE::RUN, setActiveState(), and ACTION_MANAGER::UpdateHotKeys().
Referenced by PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PCB_TEST_FRAME_BASE::SetBoard(), CVPCB_MAINFRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), SIMULATOR_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), KICAD_MANAGER_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), and PCB_EDIT_FRAME::setupTools().
bool TOOL_MANAGER::InvokeTool | ( | const std::string & | aToolName | ) |
Call a tool by sending a tool activation event to tool of given name.
aToolName | is the name of the requested tool. |
Definition at line 279 of file tool_manager.cpp.
References FindTool(), TOOL_BASE::GetType(), INTERACTIVE, invokeTool(), and kicadTraceToolStack.
|
private |
Invoke a tool by sending a proper event (in contrary to runTool, which makes the tool run for real).
aTool | is the tool to be invoked. |
Definition at line 437 of file tool_manager.cpp.
References GetCurrentToolState(), GetCursorPosition(), TOOL_BASE::GetName(), processEvent(), setActiveState(), TOOL_EVENT::SetMousePosition(), TA_ACTIVATE, and TC_COMMAND.
Referenced by InvokeTool().
bool TOOL_MANAGER::InvokeTool | ( | TOOL_ID | aToolId | ) |
Call a tool by sending a tool activation event to tool of given ID.
aToolId | is the ID number of the requested tool. |
Definition at line 265 of file tool_manager.cpp.
References FindTool(), TOOL_BASE::GetType(), INTERACTIVE, invokeTool(), and kicadTraceToolStack.
Referenced by TOOL_INTERACTIVE::Activate(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PCB_TEST_FRAME_BASE::SetBoard(), SYMBOL_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), and PCB_EDIT_FRAME::setupTools().
|
private |
Return information about a tool activation status.
aTool | is the tool to be checked. |
Definition at line 1082 of file tool_manager.cpp.
References alg::contains(), TOOL_BASE::GetId(), isRegistered(), and m_activeTools.
Referenced by runTool(), and ShutdownTool().
|
inline |
True while processing a context menu.
Definition at line 500 of file tool_manager.h.
References m_menuActive.
Referenced by DIALOG_SHIM::DIALOG_SHIM(), and ROUTER_TOOL::InlineBreakTrack().
|
inlineprivate |
Return information about a tool registration status.
aTool | is the tool to be checked. |
Definition at line 590 of file tool_manager.h.
References m_toolState.
Referenced by isActive(), and runTool().
bool TOOL_MANAGER::IsToolActive | ( | TOOL_ID | aId | ) | const |
Return true if a tool with given id is active (executing)
Definition at line 1197 of file tool_manager.cpp.
References m_toolIdIndex.
Referenced by TOOL_BASE::IsToolActive().
|
static |
Generates a unique ID from for a tool with given name.
Definition at line 1062 of file tool_manager.cpp.
|
inline |
Definition at line 243 of file tool_manager.h.
References doRunAction().
|
inline |
Run the specified action after the current action (coroutine) ends.
The common format for action names is "application.ToolName.Action".
Note: The type of the optional parameter must match exactly with the type the consuming action is expecting, otherwise an assert will occur when reading the paramter.
aActionName | is the name of action to be invoked. |
aParam | is an optional parameter that might be used by the invoked action. Its meaning depends on the action. |
Definition at line 235 of file tool_manager.h.
References doRunAction().
Referenced by FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), CVPCB_ASSOCIATION_TOOL::Associate(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_EDITOR_CONTROL::ChangeLineMode(), COMMON_TOOLS::CursorControl(), SIMULATOR_FRAME::doCloseWindow(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), SCH_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), SIMULATOR_CONTROL::ExportPlotToSchematic(), EDIT_TOOL::Flip(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDIT_TOOL::GetAndPlace(), API_HANDLER_PCB::handleInteractiveMoveItems(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_EDIT_TOOL::InteractiveDelete(), SYMBOL_EDITOR_EDIT_TOOL::InteractiveDelete(), PL_EDIT_TOOL::InteractiveDelete(), EDIT_TOOL::JustifyText(), CVPCB_CONTROL::Main(), EE_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SCH_EDITOR_CONTROL::NextLineMode(), PCB_POINT_EDITOR::OnSelectionChange(), PL_EDIT_TOOL::Paste(), ROUTER_TOOL::performDragging(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::PlaceNextSymbolUnit(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), SIMULATOR_CONTROL::Probe(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), BOARD_COMMIT::Push(), SCH_EDIT_FRAME::PutDataInPreviousState(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), GERBVIEW_FRAME::SetActiveLayer(), PCB_EDIT_FRAME::SetActiveLayer(), SCH_EDIT_FRAME::setupTools(), SCH_EDITOR_CONTROL::SimProbe(), SCH_EDITOR_CONTROL::SimTune(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDIT_TOOL::Swap(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), SIMULATOR_CONTROL::Tune(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
inline |
Definition at line 270 of file tool_manager.h.
References doRunAction().
|
inline |
Definition at line 278 of file tool_manager.h.
References doRunAction().
|
inline |
Run the specified action after the current action (coroutine) ends.
Note: The type of the optional parameter must match exactly with the type the consuming action is expecting, otherwise an assert will occur when reading the paramter.
aAction | is the action to be invoked. |
aParam | is an optional parameter that might be used by the invoked action. Its meaning depends on the action. |
Definition at line 262 of file tool_manager.h.
References doRunAction().
void TOOL_MANAGER::PostEvent | ( | const TOOL_EVENT & | aEvent | ) |
Put an event to the event queue to be processed at the end of event processing cycle.
aEvent | is the event to be put into the queue. |
Definition at line 420 of file tool_manager.cpp.
References TOOL_EVENT::IsSimulator(), and m_eventQueue.
Referenced by SYMBOL_EDITOR_MOVE_TOOL::AlignElements(), SCH_MOVE_TOOL::AlignToGrid(), PCB_CONTROL::CycleLayerPresets(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddColumnAfter(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddColumnBefore(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddRowAbove(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doAddRowBelow(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteColumns(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doDeleteRows(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doMergeCells(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), doRunAction(), EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::doUnmergeCells(), PCB_TUNING_PATTERN::EditStart(), GROUP_TOOL::Group(), PCB_CONTROL::HighContrastModeCycle(), PL_EDIT_TOOL::Main(), BOARD_EDITOR_CONTROL::modifyLockSelected(), COMMON_TOOLS::OnGridChanged(), TOOLS_HOLDER::PopTool(), PrimeTool(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), SCH_COMMIT::pushSchEdit(), PCB_BASE_FRAME::rebuildConnectivity(), EDIT_TOOL::rebuildConnectivity(), ZONE_FILLER_TOOL::rebuildConnectivity(), GROUP_TOOL::RemoveFromGroup(), PCB_BASE_EDIT_FRAME::RestoreCopyFromRedoList(), PCB_BASE_EDIT_FRAME::RestoreCopyFromUndoList(), BOARD_COMMIT::Revert(), PCB_BASE_EDIT_FRAME::ShowReferenceImagePropertiesDialog(), PCB_CONTROL::SnapMode(), GROUP_TOOL::Ungroup(), and PCB_BASE_EDIT_FRAME::unitsChangeRefresh().
void TOOL_MANAGER::PrimeTool | ( | const VECTOR2D & | aPosition | ) |
"Prime" a tool by sending a cursor left-click event with the mouse position set to the passed in position.
aPosition | is the mouse position to use in the event |
Return the hot key associated with a given action or 0 if there is none.
aAction | is the queried action. |
Definition at line 400 of file tool_manager.cpp.
References BUT_LEFT, PostEvent(), TOOL_EVENT::SetMousePosition(), TA_PRIME, and TC_MOUSE.
Referenced by SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), SCH_DRAWING_TOOLS::DrawRuleArea(), SCH_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), DRAWING_TOOL::DrawZone(), SCH_DRAWING_TOOLS::ImportSheet(), DRAWING_TOOL::InteractivePlaceWithPreview(), ROUTER_TOOL::MainLoop(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
bool TOOL_MANAGER::ProcessEvent | ( | const TOOL_EVENT & | aEvent | ) |
Propagate an event to tools that requested events of matching type(s).
aEvent | is the event to be processed. |
Definition at line 1016 of file tool_manager.cpp.
References GetCurrentToolState(), KIGFX::VIEW::IsDirty(), m_shuttingDown, m_view, processEvent(), setActiveState(), and UpdateUI().
Referenced by SELECTION_TOOL::AddItemsToSel(), SELECTION_TOOL::AddItemToSel(), BOARD_EDITOR_CONTROL::AssignNetclass(), EDIT_TOOL::ChangeTrackWidth(), GERBVIEW_SELECTION_TOOL::clearSelection(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), COMMON_TOOLS::CursorControl(), TOOL_DISPATCHER::DispatchWxEvent(), PCB_TOOL_BASE::doInteractiveItemPlacement(), PCB_SELECTION_TOOL::doSyncSelection(), SCH_EDIT_FRAME::EditSheetProperties(), PCB_SELECTION_TOOL::EnterGroup(), PCB_SELECTION_TOOL::ExitGroup(), PCB_SELECTION_TOOL::expandConnection(), PCB_SELECTION_TOOL::filterSelection(), PCB_SELECTION_TOOL::FindItem(), EDIT_TOOL::Flip(), TOOL_DISPATCHER::handleMouseButton(), EDIT_TOOL::JustifyText(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EDIT_TOOL::Mirror(), EDIT_TOOL::Move(), EDIT_TOOL::MoveExact(), SELECTION_TOOL::onDisambiguationExpire(), PANEL_KICAD_LAUNCHER::onLauncherButtonClick(), ACTION_MENU::OnMenuEvent(), ACTION_TOOLBAR::onPaletteEvent(), ACTION_TOOLBAR::onToolEvent(), PAD_TOOL::pastePadProperties(), PCB_CONTROL::placeBoardItems(), EDIT_TOOL::Properties(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), PAD_TOOL::pushPadSettings(), SCH_COMMIT::pushSchEdit(), EE_SELECTION_TOOL::RebuildSelection(), SCH_EDITOR_CONTROL::Redo(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), SELECTION_TOOL::RemoveItemFromSel(), SELECTION_TOOL::RemoveItemsFromSel(), EE_SELECTION_TOOL::RequestSelection(), PCB_BASE_EDIT_FRAME::RestoreCopyFromRedoList(), PCB_BASE_EDIT_FRAME::RestoreCopyFromUndoList(), EDIT_TOOL::Rotate(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::SelectColumns(), PCB_SELECTION_TOOL::SelectColumns(), EE_SELECTION_TOOL::SelectConnection(), 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(), PCB_TEST_SELECTION_TOOL::selectPoint(), PL_SELECTION_TOOL::SelectPoint(), PCB_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::SelectRows(), PCB_SELECTION_TOOL::SelectRows(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), EE_SELECTION_TOOL::SelectTable(), PCB_SELECTION_TOOL::SelectTable(), PCB_SELECTION_TOOL::selectTableCells(), EE_SELECTION_TOOL::selectTableCells(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), EDIT_TOOL::Swap(), EE_SELECTION_TOOL::SyncSelection(), SCH_EDITOR_CONTROL::Undo(), EE_SELECTION_TOOL::UnselectAll(), PCB_SELECTION_TOOL::UnselectAll(), GERBVIEW_SELECTION_TOOL::UnselectItem(), and GERBVIEW_SELECTION_TOOL::UnselectItems().
|
private |
Main function for event processing.
Definition at line 1138 of file tool_manager.cpp.
References dispatchActivation(), DispatchContextMenu(), DispatchHotKey(), dispatchInternal(), TOOL_EVENT::ForceImmediate(), TOOL_EVENT::Format(), TOOL_EVENT::getCommandStr(), GetToolHolder(), kicadTraceToolStack, m_eventQueue, processEvent(), and TOOL_EVENT::SetHasPosition().
Referenced by CancelTool(), DeactivateTool(), doRunAction(), invokeTool(), ProcessEvent(), and processEvent().
void TOOL_MANAGER::RegisterTool | ( | TOOL_BASE * | aTool | ) |
Add a tool to the manager set and sets it up.
Called once for each tool during application initialization.
aTool | tool to be added. Ownership is transferred. |
Definition at line 240 of file tool_manager.cpp.
References TOOL_BASE::attachManager(), TOOL_BASE::GetId(), TOOL_BASE::GetName(), kicadTraceToolStack, m_toolIdIndex, m_toolNameIndex, m_toolOrder, m_toolState, m_toolTypes, and TOOL_MANAGER::TOOL_STATE::theTool.
Referenced by BOOST_FIXTURE_TEST_CASE(), KI_TEST::FillZones(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PCB_TEST_FRAME_BASE::SetBoard(), CVPCB_MAINFRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), SIMULATOR_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), KICAD_MANAGER_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), and PCB_EDIT_FRAME::setupTools().
void TOOL_MANAGER::ResetTools | ( | TOOL_BASE::RESET_REASON | aReason | ) |
Reset all tools (i.e.
calls their Reset() method).
Definition at line 614 of file tool_manager.cpp.
References DeactivateTool(), TOOL_BASE::GetName(), TOOL_BASE::GetType(), INTERACTIVE, kicadTraceToolStack, m_toolState, TOOL_BASE::REDRAW, TOOL_BASE::Reset(), and setActiveState().
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::Clear_DrawLayers(), FOOTPRINT_EDIT_FRAME::Clear_Pcb(), PCB_EDIT_FRAME::Clear_Pcb(), SCH_EDIT_FRAME::DisplayCurrentSheet(), KIGFX::SCH_VIEW::DisplaySheet(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), COMMON_TOOLS::GridOrigin(), InitTools(), SYMBOL_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), PCB_BASE_FRAME::OnFpChangeDebounceTimer(), PCB_EDIT_FRAME::RebuildAndRefresh(), SYMBOL_EDIT_FRAME::RebuildView(), FOOTPRINT_WIZARD_FRAME::RegenerateFootprint(), SCH_COMMIT::revertLibEdit(), PCB_BASE_EDIT_FRAME::SetBoard(), PCB_TEST_FRAME_BASE::SetBoard(), SYMBOL_EDIT_FRAME::SetCurSymbol(), SCH_EDIT_FRAME::SetScreen(), SYMBOL_EDIT_FRAME::SetScreen(), SYMBOL_EDIT_FRAME::SetUnit(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), EDA_BASE_FRAME::ShowPreferences(), SCH_BASE_FRAME::SyncView(), DISPLAY_FOOTPRINTS_FRAME::updateView(), FOOTPRINT_EDIT_FRAME::UpdateView(), FOOTPRINT_VIEWER_FRAME::updateView(), and FOOTPRINT_WIZARD_FRAME::updateView().
|
inline |
Definition at line 158 of file tool_manager.h.
References doRunAction().
|
inline |
Run the specified action immediately, pausing the current action to run the new one.
The common format for action names is "application.ToolName.Action".
Note: The type of the optional parameter must match exactly with the type the consuming action is expecting, otherwise an assert will occur when reading the paramter.
aActionName | is the name of action to be invoked. |
aParam | is an optional parameter that might be used by the invoked action. Its meaning depends on the action. |
Definition at line 150 of file tool_manager.h.
References doRunAction().
Referenced by PROJECT_TREE_ITEM::Activate(), SCH_SEARCH_HANDLER::ActivateItem(), PCB_SEARCH_HANDLER::ActivateItem(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), BOARD_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_NAVIGATE_TOOL::Back(), SCH_EDIT_FRAME::canCloseWindow(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeBodyStyle(), SCH_NAVIGATE_TOOL::changeSheet(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), GERBVIEW_CONTROL::ClearAllLayers(), SCH_EDIT_TABLE_TOOL::clearSelection(), PCB_EDIT_TABLE_TOOL::clearSelection(), PCB_SELECTION_TOOL::ClearSelection(), RULE_AREA_CREATE_HELPER::commitRuleArea(), ZONE_CREATE_HELPER::commitZone(), EDA_DRAW_FRAME::CommonSettingsChanged(), SCH_EDITOR_CONTROL::CopyAsText(), SYMBOL_EDITOR_EDIT_TOOL::CopyAsText(), MICROWAVE_TOOL::createInductorBetween(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), SCH_EDITOR_CONTROL::Cut(), SYMBOL_VIEWER_FRAME::DClickOnSymbolList(), SCH_EDIT_TOOL::DdAppendFile(), DIALOG_FOOTPRINT_CHECKER::deleteAllMarkers(), DIALOG_ERC::deleteAllMarkers(), DIALOG_DRC::deleteAllMarkers(), EDIT_TOOL::DeleteItems(), DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES(), SCH_EDIT_FRAME::DisplayCurrentSheet(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), SCH_DRAWING_TOOLS::doSyncSheetsPins(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), EDA_BASE_FRAME::DoWithAcceptedFiles(), GERBVIEW_FRAME::DoWithAcceptedFiles(), KICAD_MANAGER_FRAME::DoWithAcceptedFiles(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawRuleArea(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SCH_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), BOARD_EDITOR_CONTROL::DrillOrigin(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), PAD_TOOL::EditPad(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SCH_EDIT_TABLE_TOOL::EditTable(), PCB_EDIT_TABLE_TOOL::EditTable(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), SYMBOL_EDIT_FRAME::emptyScreen(), PAD_TOOL::EnumeratePads(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), EDIT_TOOL::Flip(), SCH_EDIT_FRAME::FlipBodyStyle(), SCH_NAVIGATE_TOOL::Forward(), GERBVIEW_FRAME::GERBVIEW_FRAME(), EDIT_TOOL::GetAndPlace(), DRAWING_TOOL::getSourceZoneForAction(), PCB_SELECTION_TOOL::grabUnconnected(), COMMON_TOOLS::GridOrigin(), PCB_CONTROL::GridPlaceOrigin(), API_HANDLER_PCB::handleInteractiveMoveItems(), API_HANDLER_PCB::handleRefillZones(), BOARD_INSPECTION_TOOL::HighlightItem(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PL_EDIT_TOOL::ImportDrawingSheetContent(), SCH_EDIT_FRAME::importFile(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SCH_DRAWING_TOOLS::ImportSheet(), SCH_EDIT_FRAME::initScreenZoom(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectDRCError(), EE_INSPECTION_TOOL::InspectERCError(), SCH_EDIT_TOOL::InteractiveDelete(), SYMBOL_EDITOR_EDIT_TOOL::InteractiveDelete(), PL_EDIT_TOOL::InteractiveDelete(), PCB_CONTROL::InteractiveDelete(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDIT_TOOL::invokeInlineRouter(), SCH_EDIT_TOOL::JustifyText(), EDIT_TOOL::JustifyText(), SCH_EDIT_FRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), ROUTER_TOOL::MainLoop(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), DIALOG_GROUP_PROPERTIES::OnAddMember(), DIALOG_DRC::OnDeleteOneClick(), DIALOG_ERC::OnDeleteOneClick(), DIALOG_FOOTPRINT_CHECKER::OnDeleteOneClick(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), ARRAY_TOOL::onDialogClosed(), DIALOG_DRC::OnDRCItemSelected(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), PCB_EDIT_FRAME::OnEditItemRequest(), DIALOG_ERC::OnERCItemRClick(), DIALOG_ERC::OnERCItemSelected(), SCH_EDIT_FRAME::OnFindDialogClose(), RULE_AREA_CREATE_HELPER::OnFirstPoint(), ZONE_CREATE_HELPER::OnFirstPoint(), PCB_BASE_FRAME::OnFpChangeDebounceTimer(), KICAD_MANAGER_FRAME::OnIdle(), DIALOG_GENERATORS::OnItemSelected(), FOOTPRINTS_LISTBOX::OnLeftDClick(), ACTION_MENU::OnMenuEvent(), APPEARANCE_CONTROLS::onNetclassContextMenu(), APPEARANCE_CONTROLS::onNetContextMenu(), PCB_EDIT_FRAME::OnNetlistChanged(), SCH_EDIT_FRAME::onNetNavigatorSelection(), PL_EDITOR_FRAME::OnNewDrawingSheet(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), GERBER_LAYER_WIDGET::onPopupSelection(), DIALOG_GENERATORS::OnRebuildAllClick(), DIALOG_GENERATORS::OnRebuildTypeClick(), DIALOG_CREATE_ARRAY::OnSelectCenterButton(), EDA_DRAW_FRAME::OnSelectGrid(), DIALOG_POSITION_RELATIVE::OnSelectItemClick(), DIALOG_POSITION_RELATIVE::OnSelectPointClick(), HIERARCHY_PANE::onSelectSheetPath(), EDA_DRAW_FRAME::OnSelectZoom(), SCH_EDIT_FRAME::onSize(), PCB_EDIT_FRAME::onSize(), SYMBOL_TREE_PANE::onSymbolSelected(), SCH_EDIT_FRAME::OpenProjectFiles(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDITOR_CONTROL::Paste(), ROUTER_TOOL::performRouting(), DIALOG_UPDATE_PCB::PerformUpdate(), ZONE_CREATE_HELPER::performZoneCutout(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::PlaceTuningPattern(), GERBVIEW_CONTROL::Print(), PCB_CONTROL::Print(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), SCH_EDIT_FRAME::RecalculateConnections(), PAD_TOOL::RecombinePad(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), FOOTPRINT_EDIT_FRAME::ReloadFootprint(), EDIT_TOOL::Remove(), PCB_POINT_EDITOR::removeCorner(), GROUP_TOOL::RemoveFromGroup(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), MULTICHANNEL_TOOL::repeatLayout(), PCB_SELECTION_TOOL::RequestSelection(), ROUTER_TOOL::restoreSelection(), SCH_EDITOR_CONTROL::Revert(), PL_EDITOR_FRAME::RollbackFromUndo(), SCH_EDIT_TOOL::Rotate(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), ROUTER_TOOL::RouteSelected(), ACTION_MANAGER::RunHotKey(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SYMBOL_EDIT_FRAME::saveLibrary(), DIALOG_FIND::search(), PCB_PICKER_TOOL::SelectItemInteractively(), SCH_SEARCH_HANDLER::SelectItems(), PCB_SEARCH_HANDLER::SelectItems(), EE_SELECTION_TOOL::selectPoint(), NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand(), NL_SCHEMATIC_PLUGIN_IMPL::SetActiveCommand(), NL_GERBVIEW_PLUGIN_IMPL::SetActiveCommand(), NL_PL_EDITOR_PLUGIN_IMPL::SetActiveCommand(), NL_PCBNEW_PLUGIN_IMPL::SetActiveCommand(), FOOTPRINT_EDIT_FRAME::SetActiveLayer(), DRAWING_TOOL::SetAnchor(), SYMBOL_EDIT_FRAME::SetCurSymbol(), SCH_EDIT_FRAME::SetScreen(), SYMBOL_EDIT_FRAME::SetUnit(), CVPCB_MAINFRAME::setupEventHandlers(), FOOTPRINT_EDIT_FRAME::setupTools(), EDA_DRAW_FRAME::setupUnits(), DRC_TOOL::ShowDRCDialog(), APPEARANCE_CONTROLS::showNetclass(), SCH_EDITOR_CONTROL::SimProbe(), SCH_EDITOR_CONTROL::SimTune(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDIT_TOOL::Swap(), SYMBOL_EDITOR_EDIT_TOOL::Swap(), SYMBOL_DIFF_FRAME::SYMBOL_DIFF_FRAME(), PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), DIALOG_GROUP_PROPERTIES::TransferDataFromWindow(), PANEL_SETUP_LAYERS::TransferDataFromWindow(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), GROUP_TOOL::Ungroup(), EDA_DRAW_FRAME::unitsChangeRefresh(), PCB_SELECTION_TOOL::unrouteSelected(), CVPCB_MAINFRAME::updateFootprintViewerOnIdle(), NET_GRID_TABLE::updateNetVisibility(), MULTICHANNEL_TOOL::UpdatePickedItem(), SYMBOL_VIEWER_FRAME::updatePreviewSymbol(), DISPLAY_FOOTPRINTS_FRAME::updateView(), FOOTPRINT_VIEWER_FRAME::updateView(), FOOTPRINT_WIZARD_FRAME::updateView(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), BOARD_EDITOR_CONTROL::ZoneMerge(), EDA_DRAW_FRAME::Zoom_Automatique(), DIALOG_IMPORT_NETLIST::~DIALOG_IMPORT_NETLIST(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().
|
inline |
Definition at line 213 of file tool_manager.h.
References doRunAction().
|
inline |
Run the specified action immediately, pausing the current action to run the new one.
Note: The type of the optional parameter must match exactly with the type the consuming action is expecting, otherwise an assert will occur when reading the paramter.
aAction | is the action to be invoked. |
aParam | is an optional parameter that might be used by the invoked action. Its meaning depends on the action. |
Definition at line 178 of file tool_manager.h.
References doRunAction().
void TOOL_MANAGER::RunMainStack | ( | TOOL_BASE * | aTool, |
std::function< void()> | aFunc | ||
) |
Definition at line 699 of file tool_manager.cpp.
References TOOL_MANAGER::TOOL_STATE::cofunc, m_toolState, COROUTINE< ReturnType, ArgType >::RunMainStack(), and setActiveState().
Referenced by TOOL_INTERACTIVE::RunMainStack().
|
inline |
Definition at line 205 of file tool_manager.h.
References doRunAction().
|
inline |
Run the specified action immediately, pausing the current action to run the new one.
Note: The type of the optional parameter must match exactly with the type the consuming action is expecting, otherwise an assert will occur when reading the paramter.
aAction | is the action to be invoked. |
aCommit | is the commit object the tool handling the action should add the new edits to |
Definition at line 197 of file tool_manager.h.
References doRunAction().
Referenced by SCH_EDIT_TOOL::BreakWire(), EDIT_TOOL::DeleteItems(), EDIT_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), SCH_DRAWING_TOOLS::ImportSheet(), EE_SELECTION_TOOL::Main(), PCB_POINT_EDITOR::OnSelectionChange(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PCB_CONTROL::placeBoardItems(), SCH_EDIT_TOOL::RepeatDrawItem(), and PCB_POINT_EDITOR::updateItem().
|
private |
Make a tool active, so it can receive events and react to them.
The activated tool is pushed on the active tools stack, so the last activated tool receives events first.
aTool | is the tool to be run. |
Definition at line 452 of file tool_manager.cpp.
References TOOL_BASE::GetId(), TOOL_BASE::GetName(), TOOL_BASE::GetType(), INTERACTIVE, isActive(), isRegistered(), kicadTraceToolStack, m_activeTools, m_toolIdIndex, TOOL_BASE::Reset(), TOOL_BASE::RUN, and setActiveState().
Referenced by dispatchActivation().
|
private |
Save the #VIEW_CONTROLS settings to the tool state object.
If #VIEW_CONTROLS settings are affected by TOOL_MANAGER, the original settings are saved.
Definition at line 1092 of file tool_manager.cpp.
References cursor, TOOL_BASE::GetId(), KIGFX::VIEW_CONTROLS::GetSettings(), m_cursorSettings, KIGFX::VC_SETTINGS::m_forceCursorPosition, KIGFX::VC_SETTINGS::m_forcedPosition, m_menuActive, m_menuCursor, m_viewControls, TOOL_MANAGER::TOOL_STATE::theTool, and TOOL_MANAGER::TOOL_STATE::vcSettings.
Referenced by setActiveState().
void TOOL_MANAGER::ScheduleContextMenu | ( | TOOL_BASE * | aTool, |
ACTION_MENU * | aMenu, | ||
CONTEXT_MENU_TRIGGER | aTrigger | ||
) |
Set behavior of the tool's context popup menu.
aTool | is the parent tool. |
aMenu | is the menu structure, defined by the tool. |
aTrigger | determines when the menu is activated: CMENU_NOW: opens the menu right now CMENU_BUTTON: opens the menu when RMB is pressed CMENU_OFF: menu is disabled. May be called from a coroutine context. |
Definition at line 1043 of file tool_manager.cpp.
References TOOL_MANAGER::TOOL_STATE::contextMenu, TOOL_MANAGER::TOOL_STATE::contextMenuTrigger, and m_toolState.
Referenced by TOOL_INTERACTIVE::SetContextMenu().
void TOOL_MANAGER::ScheduleNextState | ( | TOOL_BASE * | aTool, |
TOOL_STATE_FUNC & | aHandler, | ||
const TOOL_EVENT_LIST & | aConditions | ||
) |
Define a state transition.
The events that cause a given handler method in the tool to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context.
Definition at line 684 of file tool_manager.cpp.
References m_toolState, and TOOL_MANAGER::TOOL_STATE::transitions.
Referenced by TOOL_INTERACTIVE::goInternal().
TOOL_EVENT * TOOL_MANAGER::ScheduleWait | ( | TOOL_BASE * | aTool, |
const TOOL_EVENT_LIST & | aConditions | ||
) |
Pause execution of a given tool until one or more events matching aConditions arrives.
The pause/resume operation is done through COROUTINE object. Called only from coroutines.
Definition at line 708 of file tool_manager.cpp.
References TOOL_MANAGER::TOOL_STATE::cofunc, COROUTINE< ReturnType, ArgType >::KiYield(), m_toolState, TOOL_MANAGER::TOOL_STATE::pendingWait, TOOL_MANAGER::TOOL_STATE::shutdown, TOOL_MANAGER::TOOL_STATE::waitEvents, and TOOL_MANAGER::TOOL_STATE::wakeupEvent.
Referenced by TOOL_INTERACTIVE::Wait().
|
private |
Save the previous active state and sets a new one.
aState | is the new active state. Might be null to indicate there is no new active state. |
Definition at line 1185 of file tool_manager.cpp.
References applyViewControls(), m_activeState, m_viewControls, and saveViewControls().
Referenced by dispatchInternal(), doRunAction(), finishTool(), InitTools(), invokeTool(), ProcessEvent(), ResetTools(), RunMainStack(), runTool(), and ShutdownTool().
void TOOL_MANAGER::SetEnvironment | ( | EDA_ITEM * | aModel, |
KIGFX::VIEW * | aView, | ||
KIGFX::VIEW_CONTROLS * | aViewControls, | ||
APP_SETTINGS_BASE * | aSettings, | ||
TOOLS_HOLDER * | aFrame | ||
) |
Set the work environment (model, view, view controls and the parent window).
These are made available to the tool. Called by the parent frame when it is set up.
Definition at line 1070 of file tool_manager.cpp.
References m_frame, m_model, m_settings, m_view, and m_viewControls.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), BITMAP2CMP_FRAME::BITMAP2CMP_FRAME(), BOOST_FIXTURE_TEST_CASE(), DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME(), EVT_GRID_CMD_CELL_CHANGED(), EVT_TOOL_RANGE(), KI_TEST::FillZones(), PCBNEW_JOBS_HANDLER::JobExportDrc(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PCB_CALCULATOR_FRAME::PCB_CALCULATOR_FRAME(), PCB_BASE_EDIT_FRAME::SetBoard(), PCB_TEST_FRAME_BASE::SetBoard(), CVPCB_MAINFRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), SIMULATOR_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), KICAD_MANAGER_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), and PCB_EDIT_FRAME::setupTools().
void TOOL_MANAGER::ShutdownAllTools | ( | ) |
Shutdown all tools with a currently registered event loop in this tool manager by waking them up with a null event.
Definition at line 497 of file tool_manager.cpp.
References m_activeTools, m_shuttingDown, m_toolIdIndex, and ShutdownTool().
Referenced by SCH_EDIT_FRAME::doCloseWindow(), CVPCB_MAINFRAME::~CVPCB_MAINFRAME(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME(), FOOTPRINT_VIEWER_FRAME::~FOOTPRINT_VIEWER_FRAME(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME(), PCB_EDIT_FRAME::~PCB_EDIT_FRAME(), PL_EDITOR_FRAME::~PL_EDITOR_FRAME(), SYMBOL_DIFF_FRAME::~SYMBOL_DIFF_FRAME(), SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME(), and SYMBOL_VIEWER_FRAME::~SYMBOL_VIEWER_FRAME().
void TOOL_MANAGER::ShutdownTool | ( | const std::string & | aToolName | ) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop.
aToolName | is name of the tool to shutdown |
Definition at line 534 of file tool_manager.cpp.
References FindTool(), TOOL_BASE::GetType(), INTERACTIVE, kicadTraceToolStack, and ShutdownTool().
void TOOL_MANAGER::ShutdownTool | ( | TOOL_BASE * | aTool | ) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop.
aTool | is the tool to shutdown |
Definition at line 546 of file tool_manager.cpp.
References TOOL_EVENT_LIST::clear(), TOOL_MANAGER::TOOL_STATE::cofunc, finishTool(), TOOL_BASE::GetId(), TOOL_BASE::GetName(), isActive(), kicadTraceToolStack, m_activeTools, m_toolIdIndex, TOOL_MANAGER::TOOL_STATE::pendingWait, COROUTINE< ReturnType, ArgType >::Resume(), setActiveState(), TOOL_MANAGER::TOOL_STATE::shutdown, TOOL_MANAGER::TOOL_STATE::theTool, and TOOL_MANAGER::TOOL_STATE::waitEvents.
Referenced by ShutdownAllTools(), and ShutdownTool().
void TOOL_MANAGER::ShutdownTool | ( | TOOL_ID | aToolId | ) |
Shutdown the specified tool by waking it up with a null event to terminate the processing loop.
aToolId | is the ID of the tool to shutdown |
Definition at line 522 of file tool_manager.cpp.
References FindTool(), TOOL_BASE::GetType(), INTERACTIVE, kicadTraceToolStack, and ShutdownTool().
|
inline |
Definition at line 337 of file tool_manager.h.
References m_toolOrder.
Referenced by PCB_TEST_FRAME_BASE::SetBoard(), FOOTPRINT_EDIT_FRAME::setupTools(), and PCB_EDIT_FRAME::setupTools().
void TOOL_MANAGER::UpdateUI | ( | const TOOL_EVENT & | aEvent | ) |
Update the status bar and synchronizes toolbars.
Definition at line 1208 of file tool_manager.cpp.
References GetToolHolder(), and EDA_BASE_FRAME::UpdateStatusBar().
Referenced by doRunAction(), and ProcessEvent().
|
inline |
Disable mouse warping after the current context menu is closed.
This must be called before invoking each context menu. It's a good idea to call this from non-modal dialogs (e.g. DRC window).
Definition at line 511 of file tool_manager.h.
References m_warpMouseAfterContextMenu.
Referenced by DIALOG_SHIM::DIALOG_SHIM(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), SCH_DRAWING_TOOLS::DrawRuleArea(), SCH_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), DRAWING_TOOL::DrawZone(), SCH_DRAWING_TOOLS::ImportSheet(), PCB_SELECTION_TOOL::Main(), SCH_DRAWING_TOOLS::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().
|
private |
Original cursor position, if overridden by the context menu handler.
Definition at line 650 of file tool_manager.h.
Referenced by DispatchHotKey(), doRunAction(), GetActionManager(), GetHotKey(), InitTools(), TOOL_MANAGER(), and ~TOOL_MANAGER().
|
private |
True if the tool manager is shutting down (don't process additional events)
Definition at line 676 of file tool_manager.h.
Referenced by doRunAction(), finishTool(), and setActiveState().
|
private |
Instance of ACTION_MANAGER that handles TOOL_ACTIONs.
Definition at line 647 of file tool_manager.h.
Referenced by DispatchContextMenu(), dispatchInternal(), finishTool(), GetCurrentToolId(), GetPriority(), isActive(), runTool(), ShutdownAllTools(), and ShutdownTool().
Definition at line 653 of file tool_manager.h.
Referenced by DispatchContextMenu(), and saveViewControls().
|
private |
Right click context menu position.
Definition at line 662 of file tool_manager.h.
Referenced by PostEvent(), and processEvent().
|
private |
Definition at line 658 of file tool_manager.h.
Referenced by DispatchContextMenu(), GetToolHolder(), and SetEnvironment().
|
private |
Tool currently displaying a popup menu. It is negative when there is no menu displayed.
Definition at line 670 of file tool_manager.h.
Referenced by DispatchContextMenu(), IsContextMenuActive(), and saveViewControls().
|
private |
Definition at line 665 of file tool_manager.h.
Referenced by DispatchContextMenu(), GetMenuCursorPos(), and saveViewControls().
|
private |
Pointer to the state object corresponding to the currently executed tool.
Definition at line 673 of file tool_manager.h.
Referenced by DispatchContextMenu(), and dispatchInternal().
|
private |
Definition at line 655 of file tool_manager.h.
Referenced by GetModel(), and SetEnvironment().
|
private |
Queue that stores events to be processed at the end of the event processing cycle.
Definition at line 659 of file tool_manager.h.
Referenced by GetSettings(), and SetEnvironment().
|
private |
Definition at line 679 of file tool_manager.h.
Referenced by doRunAction(), ProcessEvent(), and ShutdownAllTools().
|
private |
Index of the registered tools to easily lookup by their type.
Definition at line 641 of file tool_manager.h.
Referenced by DispatchContextMenu(), dispatchInternal(), FindTool(), GetCurrentToolState(), InitTools(), IsToolActive(), RegisterTool(), runTool(), ShutdownAllTools(), and ShutdownTool().
|
private |
Index of the registered tools current states, associated by tools' ID numbers.
Definition at line 638 of file tool_manager.h.
Referenced by dispatchActivation(), FindTool(), InitTools(), and RegisterTool().
|
private |
< List of tools in the order they were registered
Index of registered tools current states, associated by tools' objects.
Definition at line 632 of file tool_manager.h.
Referenced by InitTools(), RegisterTool(), and Tools().
|
private |
Index of the registered tools current states, associated by tools' names.
Definition at line 635 of file tool_manager.h.
Referenced by ClearTransitions(), dispatchInternal(), InitTools(), isRegistered(), RegisterTool(), ResetTools(), RunMainStack(), ScheduleContextMenu(), ScheduleNextState(), ScheduleWait(), and ~TOOL_MANAGER().
|
private |
Stack of the active tools.
Definition at line 644 of file tool_manager.h.
Referenced by GetTool(), InitTools(), and RegisterTool().
|
private |
Definition at line 656 of file tool_manager.h.
Referenced by GetView(), ProcessEvent(), and SetEnvironment().
|
private |
Definition at line 657 of file tool_manager.h.
Referenced by applyViewControls(), DispatchContextMenu(), GetCurrentToolVC(), GetCursorPosition(), GetMousePosition(), GetViewControls(), saveViewControls(), setActiveState(), and SetEnvironment().
|
private |
Flag indicating whether a context menu is currently displayed.
Definition at line 667 of file tool_manager.h.
Referenced by DispatchContextMenu(), and VetoContextMenuMouseWarp().