KiCad PCB EDA Suite
EDA_3D_CONTROLLER Class Reference

EDA_3D_CONTROLLER. More...

#include <eda_3d_controller.h>

Inheritance diagram for EDA_3D_CONTROLLER:
TOOL_INTERACTIVE TOOL_BASE

Public Types

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

Public Member Functions

 EDA_3D_CONTROLLER ()
 
 ~EDA_3D_CONTROLLER () override
 
bool Init () override
 Init() is called once upon a registration of the tool. More...
 
void Reset (RESET_REASON aReason) override
 Bring the tool to a known, initial state. More...
 
int UpdateMenu (const TOOL_EVENT &aEvent)
 
int Main (const TOOL_EVENT &aEvent)
 
void SetRotationIncrement (double aRotIncrement)
 Set the increment used by the RotateView actions. More...
 
double GetRotationIncrement ()
 Get the increment used by the RotateView actions. More...
 
int ZoomRedraw (const TOOL_EVENT &aEvent)
 
int ZoomInOut (const TOOL_EVENT &aEvent)
 
int ZoomInOutCenter (const TOOL_EVENT &aEvent)
 
int ZoomFitScreen (const TOOL_EVENT &aEvent)
 
int PanControl (const TOOL_EVENT &aEvent)
 
int ViewControl (const TOOL_EVENT &aEvent)
 
int RotateView (const TOOL_EVENT &aEvent)
 
int On3DGridSelection (const TOOL_EVENT &aEvent)
 
int SetMaterial (const TOOL_EVENT &aEvent)
 
int ToggleOrtho (const TOOL_EVENT &aEvent)
 
int ToggleVisibility (const TOOL_EVENT &aEvent)
 
void Activate ()
 Run the tool. More...
 
TOOL_MENUGetToolMenu ()
 
void SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON)
 Assign a context menu and tells when it should be activated. More...
 
void RunMainStack (std::function< void()> aFunc)
 Call a function using the main stack. More...
 
template<class T >
void Go (int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
 Define which state (aStateFunc) to go when a certain event arrives (aConditions). More...
 
TOOL_EVENTWait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
 Suspend execution of the tool until an event specified in aEventList arrives. More...
 
TOOL_TYPE GetType () const
 Return the type of the tool. More...
 
TOOL_ID GetId () const
 Return the unique identifier of the tool. More...
 
const std::string & GetName () const
 Return the name of the tool. More...
 
TOOL_MANAGERGetManager () const
 Return the instance of TOOL_MANAGER that takes care of the tool. More...
 
bool IsToolActive () const
 

Protected Member Functions

void attachManager (TOOL_MANAGER *aManager)
 Set the TOOL_MANAGER the tool will belong to. More...
 
KIGFX::VIEWgetView () const
 Returns the instance of #VIEW object used in the application. More...
 
KIGFX::VIEW_CONTROLSgetViewControls () const
 Return the instance of VIEW_CONTROLS object used in the application. More...
 
template<typename T >
T * getEditFrame () const
 Return the application window object, casted to requested user type. More...
 
template<typename T >
T * getModel () const
 Return the model object if it matches the requested type. More...
 

Protected Attributes

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

Private Member Functions

void setTransitions () override
 < Sets up handlers for various events. More...
 
int doZoomInOut (bool aDirection, bool aCenterOnCursor)
 

Private Attributes

EDA_3D_CANVASm_canvas
 
BOARD_ADAPTERm_boardAdapter
 
CAMERAm_camera
 
double m_rotationIncrement
 Rotation increment for the rotate actions (degrees) More...
 

Detailed Description

EDA_3D_CONTROLLER.

Handles view actions for various 3D canvases.

Definition at line 39 of file eda_3d_controller.h.

Member Enumeration Documentation

◆ RESET_REASON

enum TOOL_BASE::RESET_REASON
inherited

Determine the reason of reset for a tool.

Enumerator
RUN 

Tool is invoked after being inactive.

MODEL_RELOAD 

Model changes (required full reload)

GAL_SWITCH 

Rendering engine changes.

Definition at line 77 of file tool_base.h.

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

Constructor & Destructor Documentation

◆ EDA_3D_CONTROLLER()

EDA_3D_CONTROLLER::EDA_3D_CONTROLLER ( )
inline

Definition at line 42 of file eda_3d_controller.h.

43  : TOOL_INTERACTIVE( "3DViewer.Control" ),
44  m_canvas( nullptr ),
45  m_boardAdapter( nullptr ),
46  m_camera( nullptr ),
47  m_rotationIncrement( 10.0 )
48  { }
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)
TOOL_INTERACTIVE(TOOL_ID aId, const std::string &aName)
Create a tool with given id & name.
EDA_3D_CANVAS * m_canvas
BOARD_ADAPTER * m_boardAdapter

◆ ~EDA_3D_CONTROLLER()

EDA_3D_CONTROLLER::~EDA_3D_CONTROLLER ( )
inlineoverride

Definition at line 50 of file eda_3d_controller.h.

50 { }

Member Function Documentation

◆ Activate()

void TOOL_INTERACTIVE::Activate ( )
inherited

Run the tool.

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

Definition at line 51 of file tool_interactive.cpp.

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

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

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

◆ attachManager()

void TOOL_BASE::attachManager ( TOOL_MANAGER aManager)
protectedinherited

Set the TOOL_MANAGER the tool will belong to.

Called by TOOL_MANAGER::RegisterTool()

Definition at line 60 of file tool_base.cpp.

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

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ doZoomInOut()

int EDA_3D_CONTROLLER::doZoomInOut ( bool  aDirection,
bool  aCenterOnCursor 
)
private

Definition at line 317 of file eda_3d_controller.cpp.

318 {
319  if( m_canvas )
320  {
321  m_canvas->SetView3D( aDirection ? WXK_F1 : WXK_F2 );
323  }
324 
325  return 0;
326 }
void DisplayStatus()
Update the status bar with the position information.
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
Helper function to call view commands.

References EDA_3D_CANVAS::DisplayStatus(), m_canvas, and EDA_3D_CANVAS::SetView3D().

Referenced by ZoomInOut(), and ZoomInOutCenter().

◆ getEditFrame()

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

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

Definition at line 184 of file tool_base.h.

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

References TOOL_BASE::getToolHolderInt().

Referenced by ZONE_CREATE_HELPER::createNewZone().

◆ GetId()

TOOL_ID TOOL_BASE::GetId ( ) const
inlineinherited

Return the unique identifier of the tool.

The identifier is set by an instance of TOOL_MANAGER.

Returns
Identifier of the tool.

Definition at line 120 of file tool_base.h.

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

References TOOL_BASE::m_toolId.

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

◆ GetManager()

TOOL_MANAGER* TOOL_BASE::GetManager ( ) const
inlineinherited

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

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

Definition at line 143 of file tool_base.h.

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

References TOOL_BASE::m_toolMgr.

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

◆ getModel()

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

Return the model object if it matches the requested type.

Store the type of the tool.

Definition at line 196 of file tool_base.h.

References TOOL_BASE::getModelInt().

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

◆ GetName()

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

Return the name of the tool.

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

Returns
The name of the tool.

Definition at line 133 of file tool_base.h.

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

References TOOL_BASE::m_toolName.

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

◆ GetRotationIncrement()

double EDA_3D_CONTROLLER::GetRotationIncrement ( )
inline

Get the increment used by the RotateView actions.

Returns
the rotation increment in degrees

Definition at line 77 of file eda_3d_controller.h.

78  {
79  return m_rotationIncrement;
80  }
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)

References m_rotationIncrement.

Referenced by PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Return the type of the tool.

Returns
The type of the tool.

Definition at line 108 of file tool_base.h.

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

References TOOL_BASE::m_type.

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

◆ getView()

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

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

It allows tools to draw.

Returns
The instance of VIEW.

Definition at line 36 of file tool_base.cpp.

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

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

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

◆ getViewControls()

KIGFX::VIEW_CONTROLS * TOOL_BASE::getViewControls ( ) const
protectedinherited

Return the instance of VIEW_CONTROLS object used in the application.

It allows tools to read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.).

Returns
The instance of VIEW_CONTROLS.

Definition at line 42 of file tool_base.cpp.

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

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

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

◆ Go()

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

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

No conditions means any event.

Definition at line 147 of file tool_interactive.h.

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

References TOOL_INTERACTIVE::goInternal().

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

◆ Init()

bool EDA_3D_CONTROLLER::Init ( )
overridevirtual

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

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

Reimplemented from TOOL_BASE.

Definition at line 36 of file eda_3d_controller.cpp.

37 {
38  CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
39 
42 
43  ctxMenu.AddSeparator();
46 
47  ctxMenu.AddSeparator();
50 
51  ctxMenu.AddSeparator();
54 
55  ctxMenu.AddSeparator();
57 
58  ctxMenu.AddSeparator();
63 
64  return true;
65 }
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
static TOOL_ACTION zoomInCenter
Definition: actions.h:93
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:46
static TOOL_ACTION zoomOutCenter
Definition: actions.h:94
static TOOL_ACTION flipView
static TOOL_ACTION viewRight
static TOOL_ACTION viewLeft
static TOOL_ACTION moveLeft
static TOOL_ACTION viewBottom
static TOOL_ACTION viewTop
static TOOL_ACTION viewBack
void AddSeparator(int aOrder=ANY_ORDER)
Add a separator to the menu.
static TOOL_ACTION moveDown
static TOOL_ACTION viewFront
static TOOL_ACTION moveUp
static TOOL_ACTION moveRight
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Add a menu entry to run a TOOL_ACTION on selected items.

References CONDITIONAL_MENU::AddItem(), CONDITIONAL_MENU::AddSeparator(), EDA_3D_ACTIONS::flipView, TOOL_MENU::GetMenu(), TOOL_INTERACTIVE::m_menu, EDA_3D_ACTIONS::moveDown, EDA_3D_ACTIONS::moveLeft, EDA_3D_ACTIONS::moveRight, EDA_3D_ACTIONS::moveUp, SELECTION_CONDITIONS::ShowAlways(), EDA_3D_ACTIONS::viewBack, EDA_3D_ACTIONS::viewBottom, EDA_3D_ACTIONS::viewFront, EDA_3D_ACTIONS::viewLeft, EDA_3D_ACTIONS::viewRight, EDA_3D_ACTIONS::viewTop, ACTIONS::zoomInCenter, and ACTIONS::zoomOutCenter.

◆ IsToolActive()

bool TOOL_BASE::IsToolActive ( ) const
inherited

Definition at line 31 of file tool_base.cpp.

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

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

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

◆ Main()

int EDA_3D_CONTROLLER::Main ( const TOOL_EVENT aEvent)

Definition at line 112 of file eda_3d_controller.cpp.

113 {
114  // Main loop: keep receiving events
115  while( TOOL_EVENT* evt = Wait() )
116  {
117  if( evt->IsCancelInteractive() )
118  {
119  wxWindow* canvas = m_toolMgr->GetToolHolder()->GetToolCanvas();
120  wxWindow* topLevelParent = canvas->GetParent();
121 
122  while( topLevelParent && !topLevelParent->IsTopLevel() )
123  topLevelParent = topLevelParent->GetParent();
124 
125  if( topLevelParent && dynamic_cast<DIALOG_SHIM*>( topLevelParent ) )
126  {
127  DIALOG_SHIM* dialog = static_cast<DIALOG_SHIM*>( topLevelParent );
128 
129  if( dialog->IsQuasiModal() )
130  dialog->EndQuasiModal( wxID_CANCEL );
131  else
132  dialog->EndModal( wxID_CANCEL );
133  }
134  else
135  {
136  evt->SetPassEvent();
137  }
138  }
139  else if( evt->IsClick( BUT_RIGHT ) )
140  {
142  }
143  else
144  {
145  evt->SetPassEvent();
146  }
147  }
148 
149  return 0;
150 }
TOOL_MENU m_menu
The functions below are not yet implemented - their interface may change.
TOOL_EVENT * Wait(const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
Suspend execution of the tool until an event specified in aEventList arrives.
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
bool IsQuasiModal() const
Definition: dialog_shim.h:106
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual wxWindow * GetToolCanvas() const =0
Canvas access.
Generic, UI-independent tool event.
Definition: tool_event.h:152
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:294
void EndQuasiModal(int retCode)
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:59

References BUT_RIGHT, DIALOG_SHIM::EndQuasiModal(), TOOLS_HOLDER::GetToolCanvas(), TOOL_MANAGER::GetToolHolder(), DIALOG_SHIM::IsQuasiModal(), TOOL_INTERACTIVE::m_menu, TOOL_BASE::m_toolMgr, TOOL_MENU::ShowContextMenu(), and TOOL_INTERACTIVE::Wait().

Referenced by setTransitions().

◆ On3DGridSelection()

int EDA_3D_CONTROLLER::On3DGridSelection ( const TOOL_EVENT aEvent)

Definition at line 284 of file eda_3d_controller.cpp.

285 {
288 
289  if( m_canvas )
291 
292  return 0;
293 }
void SetGridType(GRID3D_TYPE aGridType) noexcept
Set the current grid.
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
EDA_3D_CANVAS * m_canvas
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:99
BOARD_ADAPTER * m_boardAdapter

References grid, m_boardAdapter, m_canvas, TOOL_EVENT::Parameter(), EDA_3D_CANVAS::Request_refresh(), and BOARD_ADAPTER::SetGridType().

Referenced by setTransitions().

◆ PanControl()

int EDA_3D_CONTROLLER::PanControl ( const TOOL_EVENT aEvent)

Definition at line 161 of file eda_3d_controller.cpp.

162 {
163  switch( aEvent.Parameter<intptr_t>() )
164  {
165  case ACTIONS::CURSOR_UP: m_canvas->SetView3D( WXK_UP ); break;
166  case ACTIONS::CURSOR_DOWN: m_canvas->SetView3D( WXK_DOWN ); break;
167  case ACTIONS::CURSOR_LEFT: m_canvas->SetView3D( WXK_LEFT ); break;
168  case ACTIONS::CURSOR_RIGHT: m_canvas->SetView3D( WXK_RIGHT ); break;
169  default: wxFAIL; break;
170  }
171 
172  return 0;
173 }
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ACTIONS::CURSOR_DOWN, ACTIONS::CURSOR_LEFT, ACTIONS::CURSOR_RIGHT, ACTIONS::CURSOR_UP, m_canvas, TOOL_EVENT::Parameter(), and EDA_3D_CANVAS::SetView3D().

Referenced by setTransitions().

◆ Reset()

void EDA_3D_CONTROLLER::Reset ( RESET_REASON  aReason)
overridevirtual

Bring the tool to a known, initial state.

If the tool claimed anything from the model or the view, it must release it when its reset.

Parameters
aReasoncontains information about the reason of tool reset.

Implements TOOL_BASE.

Definition at line 68 of file eda_3d_controller.cpp.

69 {
71 
72  wxASSERT( holder );
73 
74  m_canvas = nullptr;
75  m_boardAdapter = nullptr;
76  m_camera = nullptr;
77 
78  if( holder )
79  {
80  m_canvas = dynamic_cast<EDA_3D_CANVAS*>( holder->GetToolCanvas() );
81 
82  EDA_3D_BOARD_HOLDER* holder3d =
83  dynamic_cast<EDA_3D_BOARD_HOLDER*>( holder );
84 
85  wxASSERT( holder3d );
86 
87  if( holder3d )
88  {
89  m_boardAdapter = &holder3d->GetAdapter();
90  m_camera = &holder3d->GetCurrentCamera();
91  }
92  }
93 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
virtual wxWindow * GetToolCanvas() const =0
Canvas access.
EDA_3D_CANVAS * m_canvas
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:294
BOARD_ADAPTER * m_boardAdapter

References TOOLS_HOLDER::GetToolCanvas(), TOOL_MANAGER::GetToolHolder(), m_boardAdapter, m_camera, m_canvas, and TOOL_BASE::m_toolMgr.

◆ RotateView()

int EDA_3D_CONTROLLER::RotateView ( const TOOL_EVENT aEvent)

Y rotations are backward b/c the RHR has Y pointing into the screen

Definition at line 176 of file eda_3d_controller.cpp.

177 {
178  double rotIncrement = glm::radians( m_rotationIncrement );
179 
180  switch( aEvent.Parameter<ROTATION_DIR>() )
181  {
182  case ROTATION_DIR::X_CW: m_camera->RotateX( -rotIncrement ); break;
183  case ROTATION_DIR::X_CCW: m_camera->RotateX( rotIncrement ); break;
185  case ROTATION_DIR::Y_CW: m_camera->RotateY( rotIncrement ); break;
186  case ROTATION_DIR::Y_CCW: m_camera->RotateY( -rotIncrement ); break;
187  case ROTATION_DIR::Z_CW: m_camera->RotateZ( -rotIncrement ); break;
188  case ROTATION_DIR::Z_CCW: m_camera->RotateZ( rotIncrement ); break;
189  default: wxFAIL; break;
190  }
191 
194  else
196 
197  return 0;
198 }
void RotateX(float aAngleInRadians)
Definition: camera.cpp:519
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
RENDER_ENGINE GetRenderEngine() const noexcept
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
void RotateY(float aAngleInRadians)
Definition: camera.cpp:526
EDA_3D_CANVAS * m_canvas
ROTATION_DIR
Rotation direction for the 3d canvas.
Definition: 3d_enums.h:80
BOARD_ADAPTER * m_boardAdapter
void RotateZ(float aAngleInRadians)
Definition: camera.cpp:533

References BOARD_ADAPTER::GetRenderEngine(), m_boardAdapter, m_camera, m_canvas, m_rotationIncrement, OPENGL, TOOL_EVENT::Parameter(), EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), CAMERA::RotateX(), CAMERA::RotateY(), CAMERA::RotateZ(), X_CCW, X_CW, Y_CCW, Y_CW, Z_CCW, and Z_CW.

Referenced by setTransitions().

◆ RunMainStack()

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

Call a function using the main stack.

Parameters
aFuncis the function to be calls.

Definition at line 87 of file tool_interactive.cpp.

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

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

Referenced by DRAWING_TOOL::PlaceText().

◆ SetContextMenu()

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

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

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

Definition at line 76 of file tool_interactive.cpp.

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

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

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

◆ SetMaterial()

int EDA_3D_CONTROLLER::SetMaterial ( const TOOL_EVENT aEvent)

Definition at line 201 of file eda_3d_controller.cpp.

202 {
203  MATERIAL_MODE mode = aEvent.Parameter<MATERIAL_MODE>();
204 
206 
207  if( auto* viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
208  viewer->NewDisplay( true );
209  else
211 
212  return 0;
213 }
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
void SetMaterialMode(MATERIAL_MODE aMaterialMode) noexcept
EDA_3D_CANVAS * m_canvas
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:118
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:294
BOARD_ADAPTER * m_boardAdapter

References TOOL_MANAGER::GetToolHolder(), m_boardAdapter, m_canvas, TOOL_BASE::m_toolMgr, TOOL_EVENT::Parameter(), EDA_3D_CANVAS::Request_refresh(), and BOARD_ADAPTER::SetMaterialMode().

Referenced by setTransitions().

◆ SetRotationIncrement()

void EDA_3D_CONTROLLER::SetRotationIncrement ( double  aRotIncrement)
inline

Set the increment used by the RotateView actions.

Parameters
aRotIncrementis the rotation increment in degrees

Definition at line 67 of file eda_3d_controller.h.

68  {
69  m_rotationIncrement = aRotIncrement;
70  }
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)

References m_rotationIncrement.

Referenced by PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow().

◆ setTransitions()

void EDA_3D_CONTROLLER::setTransitions ( )
overrideprivatevirtual

< Sets up handlers for various events.

Implements TOOL_INTERACTIVE.

Definition at line 341 of file eda_3d_controller.cpp.

342 {
345 
346  // Pan control
355 
356  // View rotation
373 
374  // Zoom control
379  // zoom in/out at cursor does not exist in 3D viewer but because F1 and F2 keys generate
380  // a zoomIn/zoomOut event, these events must be captured to use these hot keys. The actual
381  // zoom is the same as ZoomInOutCenter
384 
385  // Grid
391 
392  // Material
396 
397  // Visibility
413 }
static TOOL_ACTION rotateXCW
int ZoomFitScreen(const TOOL_EVENT &aEvent)
static TOOL_ACTION homeView
int ToggleOrtho(const TOOL_EVENT &aEvent)
static TOOL_ACTION zoomInCenter
Definition: actions.h:93
static TOOL_ACTION show10mmGrid
int ZoomInOutCenter(const TOOL_EVENT &aEvent)
static TOOL_ACTION materialCAD
static TOOL_ACTION pivotCenter
static TOOL_ACTION toggleAdhesive
int SetMaterial(const TOOL_EVENT &aEvent)
static TOOL_ACTION zoomFitScreen
Definition: actions.h:96
static TOOL_ACTION toggleSilk
static TOOL_ACTION toggleSolderMask
int ZoomRedraw(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
static TOOL_ACTION panLeft
Definition: actions.h:129
int On3DGridSelection(const TOOL_EVENT &aEvent)
static TOOL_ACTION resetView
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
static TOOL_ACTION controlActivate
static TOOL_ACTION showBBoxes
static TOOL_ACTION zoomOutCenter
Definition: actions.h:94
static TOOL_ACTION flipView
static TOOL_ACTION toggleZones
static TOOL_ACTION viewRight
static TOOL_ACTION viewLeft
static TOOL_ACTION toggleECO
static TOOL_ACTION showSMD
static TOOL_ACTION showVirtual
static TOOL_ACTION moveLeft
static TOOL_ACTION toggleComments
static TOOL_ACTION show5mmGrid
int ViewControl(const TOOL_EVENT &aEvent)
static TOOL_ACTION showTHT
static TOOL_ACTION panDown
Definition: actions.h:128
static TOOL_ACTION toggleSolderPaste
static TOOL_ACTION rotateYCW
static TOOL_ACTION panRight
Definition: actions.h:130
int ZoomInOut(const TOOL_EVENT &aEvent)
int PanControl(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateXCCW
static TOOL_ACTION materialNormal
static TOOL_ACTION viewBottom
static TOOL_ACTION rotateZCCW
static TOOL_ACTION updateMenu
Definition: actions.h:167
static TOOL_ACTION showAxis
int ToggleVisibility(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateZCW
static TOOL_ACTION viewTop
static TOOL_ACTION viewBack
static TOOL_ACTION materialDiffuse
static TOOL_ACTION toggleRealisticMode
static TOOL_ACTION moveDown
int Main(const TOOL_EVENT &aEvent)
static TOOL_ACTION show2_5mmGrid
static TOOL_ACTION show1mmGrid
static TOOL_ACTION viewFront
int RotateView(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateYCCW
static TOOL_ACTION zoomRedraw
Definition: actions.h:90
static TOOL_ACTION moveUp
static TOOL_ACTION noGrid
static TOOL_ACTION panUp
Definition: actions.h:127
static TOOL_ACTION zoomIn
Definition: actions.h:91
static TOOL_ACTION zoomOut
Definition: actions.h:92
static TOOL_ACTION toggleOrtho
static TOOL_ACTION moveRight
static TOOL_ACTION toggleBoardBody

References EDA_3D_ACTIONS::controlActivate, EDA_3D_ACTIONS::flipView, TOOL_INTERACTIVE::Go(), EDA_3D_ACTIONS::homeView, Main(), EDA_3D_ACTIONS::materialCAD, EDA_3D_ACTIONS::materialDiffuse, EDA_3D_ACTIONS::materialNormal, EDA_3D_ACTIONS::moveDown, EDA_3D_ACTIONS::moveLeft, EDA_3D_ACTIONS::moveRight, EDA_3D_ACTIONS::moveUp, EDA_3D_ACTIONS::noGrid, On3DGridSelection(), PanControl(), ACTIONS::panDown, ACTIONS::panLeft, ACTIONS::panRight, ACTIONS::panUp, EDA_3D_ACTIONS::pivotCenter, EDA_3D_ACTIONS::resetView, RotateView(), EDA_3D_ACTIONS::rotateXCCW, EDA_3D_ACTIONS::rotateXCW, EDA_3D_ACTIONS::rotateYCCW, EDA_3D_ACTIONS::rotateYCW, EDA_3D_ACTIONS::rotateZCCW, EDA_3D_ACTIONS::rotateZCW, SetMaterial(), EDA_3D_ACTIONS::show10mmGrid, EDA_3D_ACTIONS::show1mmGrid, EDA_3D_ACTIONS::show2_5mmGrid, EDA_3D_ACTIONS::show5mmGrid, EDA_3D_ACTIONS::showAxis, EDA_3D_ACTIONS::showBBoxes, EDA_3D_ACTIONS::showSMD, EDA_3D_ACTIONS::showTHT, EDA_3D_ACTIONS::showVirtual, EDA_3D_ACTIONS::toggleAdhesive, EDA_3D_ACTIONS::toggleBoardBody, EDA_3D_ACTIONS::toggleComments, EDA_3D_ACTIONS::toggleECO, EDA_3D_ACTIONS::toggleOrtho, ToggleOrtho(), EDA_3D_ACTIONS::toggleRealisticMode, EDA_3D_ACTIONS::toggleSilk, EDA_3D_ACTIONS::toggleSolderMask, EDA_3D_ACTIONS::toggleSolderPaste, ToggleVisibility(), EDA_3D_ACTIONS::toggleZones, UpdateMenu(), ACTIONS::updateMenu, EDA_3D_ACTIONS::viewBack, EDA_3D_ACTIONS::viewBottom, ViewControl(), EDA_3D_ACTIONS::viewFront, EDA_3D_ACTIONS::viewLeft, EDA_3D_ACTIONS::viewRight, EDA_3D_ACTIONS::viewTop, ZoomFitScreen(), ACTIONS::zoomFitScreen, ACTIONS::zoomIn, ACTIONS::zoomInCenter, ZoomInOut(), ZoomInOutCenter(), ACTIONS::zoomOut, ACTIONS::zoomOutCenter, ZoomRedraw(), and ACTIONS::zoomRedraw.

◆ ToggleOrtho()

int EDA_3D_CONTROLLER::ToggleOrtho ( const TOOL_EVENT aEvent)

Definition at line 216 of file eda_3d_controller.cpp.

217 {
219 
222  else
224 
225  return 0;
226 }
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
RENDER_ENGINE GetRenderEngine() const noexcept
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.
EDA_3D_CANVAS * m_canvas
BOARD_ADAPTER * m_boardAdapter
void ToggleProjection()
Definition: camera.cpp:445

References BOARD_ADAPTER::GetRenderEngine(), m_boardAdapter, m_camera, m_canvas, OPENGL, EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), and CAMERA::ToggleProjection().

Referenced by setTransitions().

◆ ToggleVisibility()

int EDA_3D_CONTROLLER::ToggleVisibility ( const TOOL_EVENT aEvent)

Definition at line 229 of file eda_3d_controller.cpp.

230 {
232 
234 
235  switch( flag )
236  {
237  // These commands do not request a 3D scene rebuild (and do not exist in raytracing):
239  case FL_AXIS:
241  break;
242 
243  // These commands do not request a 3D scene rebuild and exist in raytracing:
250  else
252 
253  break;
254 
258  // Loading 3D shapes can be needed if not yet loaded
260  {
261  RENDER_3D_OPENGL* render = static_cast<RENDER_3D_OPENGL*>( m_canvas->GetCurrentRender() );
262  render->Load3dModelsIfNeeded();
264  }
265  else
267 
268  break;
269 
270  default:
271  {
272  if( auto viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
273  viewer->NewDisplay( true );
274  else
276  break;
277  }
278  }
279 
280  return 0;
281 }
bool GetFlag(DISPLAY3D_FLG aFlag) const
Get a configuration status of a flag.
Object to render the board using openGL.
void Load3dModelsIfNeeded()
Load footprint models if they are not already loaded, i.e.
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
Set the status of a flag.
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:214
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
RENDER_ENGINE GetRenderEngine() const noexcept
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
EDA_3D_CANVAS * m_canvas
DISPLAY3D_FLG
Flags used in rendering options.
Definition: 3d_enums.h:34
TOOLS_HOLDER * GetToolHolder() const
Definition: tool_manager.h:294
BOARD_ADAPTER * m_boardAdapter
RENDER_3D_BASE * GetCurrentRender() const

References FL_AXIS, FL_FP_ATTRIBUTES_NORMAL, FL_FP_ATTRIBUTES_NORMAL_INSERT, FL_FP_ATTRIBUTES_VIRTUAL, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, flag, EDA_3D_CANVAS::GetCurrentRender(), BOARD_ADAPTER::GetFlag(), BOARD_ADAPTER::GetRenderEngine(), TOOL_MANAGER::GetToolHolder(), RENDER_3D_OPENGL::Load3dModelsIfNeeded(), m_boardAdapter, m_canvas, TOOL_BASE::m_toolMgr, OPENGL, TOOL_EVENT::Parameter(), EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), and BOARD_ADAPTER::SetFlag().

Referenced by setTransitions().

◆ UpdateMenu()

int EDA_3D_CONTROLLER::UpdateMenu ( const TOOL_EVENT aEvent)

Definition at line 96 of file eda_3d_controller.cpp.

97 {
98  ACTION_MENU* actionMenu = aEvent.Parameter<ACTION_MENU*>();
99  CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( actionMenu );
100  SELECTION dummySel;
101 
102  if( conditionalMenu )
103  conditionalMenu->Evaluate( dummySel );
104 
105  if( actionMenu )
106  actionMenu->UpdateAll();
107 
108  return 0;
109 }
Defines the structure of a menu based on ACTIONs.
Definition: action_menu.h:48
void UpdateAll()
Run update handlers for the menu and its submenus.
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432

References TOOL_EVENT::Parameter(), and ACTION_MENU::UpdateAll().

Referenced by setTransitions().

◆ ViewControl()

int EDA_3D_CONTROLLER::ViewControl ( const TOOL_EVENT aEvent)

Definition at line 153 of file eda_3d_controller.cpp.

154 {
155  m_canvas->SetView3D( aEvent.Parameter<intptr_t>() );
156 
157  return 0;
158 }
T Parameter() const
Return a non-standard parameter assigned to the event.
Definition: tool_event.h:432
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
Helper function to call view commands.

References m_canvas, TOOL_EVENT::Parameter(), and EDA_3D_CANVAS::SetView3D().

Referenced by setTransitions().

◆ Wait()

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

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

No parameters means waiting for any event.

Definition at line 57 of file tool_interactive.cpp.

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

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

Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), CVPCB_CONTROL::Main(), PL_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_SELECTION_TOOL::Main(), Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), 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(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ ZoomFitScreen()

int EDA_3D_CONTROLLER::ZoomFitScreen ( const TOOL_EVENT aEvent)

Definition at line 329 of file eda_3d_controller.cpp.

330 {
331  if( m_canvas )
332  {
333  m_canvas->SetView3D( WXK_HOME );
335  }
336 
337  return 0;
338 }
void DisplayStatus()
Update the status bar with the position information.
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
Helper function to call view commands.

References EDA_3D_CANVAS::DisplayStatus(), m_canvas, and EDA_3D_CANVAS::SetView3D().

Referenced by setTransitions().

◆ ZoomInOut()

int EDA_3D_CONTROLLER::ZoomInOut ( const TOOL_EVENT aEvent)

Definition at line 303 of file eda_3d_controller.cpp.

304 {
305  bool direction = aEvent.IsAction( &ACTIONS::zoomIn );
306  return doZoomInOut( direction, true );
307 }
int doZoomInOut(bool aDirection, bool aCenterOnCursor)
bool IsAction(const TOOL_ACTION *aAction) const
Test if the event contains an action issued upon activation of the given TOOL_ACTION.
Definition: tool_event.cpp:88
static TOOL_ACTION zoomIn
Definition: actions.h:91

References doZoomInOut(), TOOL_EVENT::IsAction(), and ACTIONS::zoomIn.

Referenced by setTransitions().

◆ ZoomInOutCenter()

int EDA_3D_CONTROLLER::ZoomInOutCenter ( const TOOL_EVENT aEvent)

Definition at line 310 of file eda_3d_controller.cpp.

311 {
312  bool direction = aEvent.IsAction( &ACTIONS::zoomInCenter );
313  return doZoomInOut( direction, false );
314 }
static TOOL_ACTION zoomInCenter
Definition: actions.h:93
int doZoomInOut(bool aDirection, bool aCenterOnCursor)
bool IsAction(const TOOL_ACTION *aAction) const
Test if the event contains an action issued upon activation of the given TOOL_ACTION.
Definition: tool_event.cpp:88

References doZoomInOut(), TOOL_EVENT::IsAction(), and ACTIONS::zoomInCenter.

Referenced by setTransitions().

◆ ZoomRedraw()

int EDA_3D_CONTROLLER::ZoomRedraw ( const TOOL_EVENT aEvent)

Definition at line 296 of file eda_3d_controller.cpp.

297 {
299  return 0;
300 }
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
EDA_3D_CANVAS * m_canvas

References m_canvas, and EDA_3D_CANVAS::Request_refresh().

Referenced by setTransitions().

Member Data Documentation

◆ m_boardAdapter

BOARD_ADAPTER* EDA_3D_CONTROLLER::m_boardAdapter
private

◆ m_camera

CAMERA* EDA_3D_CONTROLLER::m_camera
private

Definition at line 108 of file eda_3d_controller.h.

Referenced by Reset(), RotateView(), and ToggleOrtho().

◆ m_canvas

◆ m_menu

TOOL_MENU TOOL_INTERACTIVE::m_menu
protectedinherited

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

Definition at line 125 of file tool_interactive.h.

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), ROUTER_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), PAD_TOOL::Init(), PL_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_CONTROL::Init(), PCB_VIEWER_TOOLS::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PL_SELECTION_TOOL::Init(), SCH_DRAWING_TOOLS::Init(), BOARD_EDITOR_CONTROL::Init(), GERBVIEW_SELECTION_TOOL::Init(), Init(), DRAWING_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), PCB_SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), PCB_TOOL_BASE::Init(), PICKER_TOOL::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), PCB_PICKER_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), Main(), PL_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), 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(), and SCH_DRAWING_TOOLS::TwoClickPlace().

◆ m_rotationIncrement

double EDA_3D_CONTROLLER::m_rotationIncrement
private

Rotation increment for the rotate actions (degrees)

Definition at line 109 of file eda_3d_controller.h.

Referenced by GetRotationIncrement(), RotateView(), and SetRotationIncrement().

◆ m_toolId

TOOL_ID TOOL_BASE::m_toolId
protectedinherited

Name of the tool.

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

Definition at line 209 of file tool_base.h.

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

◆ m_toolMgr

TOOL_MANAGER* TOOL_BASE::m_toolMgr
protectedinherited

Definition at line 214 of file tool_base.h.

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

◆ m_toolName

std::string TOOL_BASE::m_toolName
protectedinherited

Definition at line 213 of file tool_base.h.

Referenced by TOOL_BASE::GetName().

◆ m_type

TOOL_TYPE TOOL_BASE::m_type
protectedinherited

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

Definition at line 206 of file tool_base.h.

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


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