| 
    KiCad PCB EDA Suite
    
   | 
 
Struct describing the current execution state of a TOOL. More...
Public Member Functions | |
| TOOL_STATE (TOOL_BASE *aTool) | |
| TOOL_STATE (const TOOL_STATE &aState) | |
| ~TOOL_STATE () | |
| TOOL_STATE & | operator= (const TOOL_STATE &aState) | 
| bool | operator== (const TOOL_MANAGER::TOOL_STATE &aRhs) const | 
| bool | operator!= (const TOOL_MANAGER::TOOL_STATE &aRhs) const | 
| void | Push () | 
| Store the current state of the tool on stack.   | |
| bool | Pop () | 
| Restore state of the tool from stack.   | |
Public Attributes | |
| TOOL_BASE * | theTool | 
| The tool itself.   | |
| bool | idle | 
| Is the tool active (pending execution) or disabled at the moment.   | |
| bool | shutdown | 
| Should the tool shutdown during next execution.   | |
| bool | pendingWait | 
| Flag defining if the tool is waiting for any event (i.e.   | |
| bool | pendingContextMenu | 
| Is there a context menu being displayed.   | |
| ACTION_MENU * | contextMenu | 
| Context menu currently used by the tool.   | |
| CONTEXT_MENU_TRIGGER | contextMenuTrigger | 
| Defines when the context menu is opened.   | |
| COROUTINE< int, const TOOL_EVENT & > * | cofunc | 
| Tool execution context.   | |
| TOOL_EVENT | initialEvent | 
| The first event that triggered activation of the tool.   | |
| TOOL_EVENT | wakeupEvent | 
| The event that triggered the execution/wakeup of the tool after Wait() call.   | |
| TOOL_EVENT_LIST | waitEvents | 
| List of events the tool is currently waiting for.   | |
| std::vector< TRANSITION > | transitions | 
| List of possible transitions (ie.   | |
| KIGFX::VC_SETTINGS | vcSettings | 
| VIEW_CONTROLS settings to preserve settings when the tools are switched.   | |
Private Member Functions | |
| void | clear () | 
| Restores the initial state.   | |
Private Attributes | |
| std::stack< std::unique_ptr< TOOL_STATE > > | stateStack | 
| Stack preserving previous states of a TOOL.   | |
Struct describing the current execution state of a TOOL.
Definition at line 54 of file tool_manager.cpp.
      
  | 
  inline | 
Definition at line 56 of file tool_manager.cpp.
References clear(), and theTool.
Referenced by operator=(), and TOOL_STATE().
      
  | 
  inline | 
Definition at line 62 of file tool_manager.cpp.
References cofunc, contextMenu, contextMenuTrigger, idle, initialEvent, pendingContextMenu, pendingWait, shutdown, theTool, TOOL_STATE(), transitions, vcSettings, waitEvents, and wakeupEvent.
      
  | 
  inline | 
Definition at line 80 of file tool_manager.cpp.
References stateStack.
      
  | 
  inlineprivate | 
Restores the initial state.
Definition at line 195 of file tool_manager.cpp.
References CMENU_OFF, cofunc, contextMenu, contextMenuTrigger, idle, pendingContextMenu, pendingWait, shutdown, transitions, and vcSettings.
Referenced by Push(), and TOOL_STATE().
      
  | 
  inline | 
Definition at line 151 of file tool_manager.cpp.
References theTool.
      
  | 
  inline | 
Definition at line 126 of file tool_manager.cpp.
References cofunc, contextMenu, contextMenuTrigger, idle, initialEvent, pendingContextMenu, pendingWait, shutdown, theTool, TOOL_STATE(), transitions, vcSettings, waitEvents, and wakeupEvent.
      
  | 
  inline | 
Definition at line 146 of file tool_manager.cpp.
References theTool.
      
  | 
  inline | 
Restore state of the tool from stack.
Stacks are stored internally and are not shared between different TOOL_STATE objects.
Definition at line 173 of file tool_manager.cpp.
References cofunc, and stateStack.
Referenced by TOOL_MANAGER::finishTool().
      
  | 
  inline | 
Store the current state of the tool on stack.
Stacks are stored internally and are not shared between different TOOL_STATE objects.
Definition at line 160 of file tool_manager.cpp.
References clear(), and stateStack.
Referenced by TOOL_MANAGER::dispatchInternal().
| COROUTINE<int, const TOOL_EVENT&>* TOOL_MANAGER::TOOL_STATE::cofunc | 
Tool execution context.
Definition at line 108 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::DispatchContextMenu(), TOOL_MANAGER::dispatchInternal(), operator=(), Pop(), TOOL_MANAGER::RunMainStack(), TOOL_MANAGER::ScheduleWait(), TOOL_MANAGER::ShutdownTool(), and TOOL_STATE().
| ACTION_MENU* TOOL_MANAGER::TOOL_STATE::contextMenu | 
Context menu currently used by the tool.
Definition at line 102 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::DispatchContextMenu(), operator=(), TOOL_MANAGER::ScheduleContextMenu(), and TOOL_STATE().
| CONTEXT_MENU_TRIGGER TOOL_MANAGER::TOOL_STATE::contextMenuTrigger | 
Defines when the context menu is opened.
Definition at line 105 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::DispatchContextMenu(), operator=(), TOOL_MANAGER::ScheduleContextMenu(), and TOOL_STATE().
| bool TOOL_MANAGER::TOOL_STATE::idle | 
Is the tool active (pending execution) or disabled at the moment.
Definition at line 89 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::dispatchInternal(), TOOL_MANAGER::finishTool(), operator=(), and TOOL_STATE().
| TOOL_EVENT TOOL_MANAGER::TOOL_STATE::initialEvent | 
The first event that triggered activation of the tool.
Definition at line 111 of file tool_manager.cpp.
Referenced by TOOL_MANAGER::dispatchInternal(), operator=(), and TOOL_STATE().
| bool TOOL_MANAGER::TOOL_STATE::pendingContextMenu | 
Is there a context menu being displayed.
Definition at line 99 of file tool_manager.cpp.
Referenced by clear(), operator=(), and TOOL_STATE().
| bool TOOL_MANAGER::TOOL_STATE::pendingWait | 
Flag defining if the tool is waiting for any event (i.e.
if it issued a Wait() call).
Definition at line 96 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::DispatchContextMenu(), TOOL_MANAGER::dispatchInternal(), operator=(), TOOL_MANAGER::ScheduleWait(), TOOL_MANAGER::ShutdownTool(), and TOOL_STATE().
| bool TOOL_MANAGER::TOOL_STATE::shutdown | 
Should the tool shutdown during next execution.
Definition at line 92 of file tool_manager.cpp.
Referenced by clear(), operator=(), TOOL_MANAGER::ScheduleWait(), TOOL_MANAGER::ShutdownTool(), and TOOL_STATE().
      
  | 
  private | 
Stack preserving previous states of a TOOL.
Definition at line 192 of file tool_manager.cpp.
Referenced by Pop(), Push(), and ~TOOL_STATE().
| TOOL_BASE* TOOL_MANAGER::TOOL_STATE::theTool | 
The tool itself.
Definition at line 86 of file tool_manager.cpp.
Referenced by TOOL_MANAGER::dispatchInternal(), TOOL_MANAGER::finishTool(), operator!=(), operator=(), operator==(), TOOL_MANAGER::RegisterTool(), TOOL_MANAGER::saveViewControls(), TOOL_MANAGER::ShutdownTool(), TOOL_STATE(), and TOOL_STATE().
| std::vector<TRANSITION> TOOL_MANAGER::TOOL_STATE::transitions | 
List of possible transitions (ie.
association of events and state handlers that are executed upon the event reception
Definition at line 121 of file tool_manager.cpp.
Referenced by clear(), TOOL_MANAGER::dispatchInternal(), operator=(), TOOL_MANAGER::ScheduleNextState(), and TOOL_STATE().
| KIGFX::VC_SETTINGS TOOL_MANAGER::TOOL_STATE::vcSettings | 
VIEW_CONTROLS settings to preserve settings when the tools are switched.
Definition at line 124 of file tool_manager.cpp.
Referenced by TOOL_MANAGER::applyViewControls(), clear(), TOOL_MANAGER::DispatchContextMenu(), TOOL_MANAGER::dispatchInternal(), operator=(), TOOL_MANAGER::saveViewControls(), and TOOL_STATE().
| TOOL_EVENT_LIST TOOL_MANAGER::TOOL_STATE::waitEvents | 
List of events the tool is currently waiting for.
Definition at line 117 of file tool_manager.cpp.
Referenced by TOOL_MANAGER::DispatchContextMenu(), TOOL_MANAGER::dispatchInternal(), operator=(), TOOL_MANAGER::ScheduleWait(), TOOL_MANAGER::ShutdownTool(), and TOOL_STATE().
| TOOL_EVENT TOOL_MANAGER::TOOL_STATE::wakeupEvent | 
The event that triggered the execution/wakeup of the tool after Wait() call.
Definition at line 114 of file tool_manager.cpp.
Referenced by TOOL_MANAGER::dispatchInternal(), operator=(), TOOL_MANAGER::ScheduleWait(), and TOOL_STATE().