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

Private Attributes

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.

REDRAW 

Full drawing refresh.

Definition at line 77 of file tool_base.h.

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

Constructor & Destructor Documentation

◆ 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 ),
48 { }
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)
EDA_3D_CANVAS * m_canvas
BOARD_ADAPTER * m_boardAdapter
TOOL_INTERACTIVE(TOOL_ID aId, const std::string &aName)
Create a tool with given id & name.

◆ ~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:215
TOOL_ID m_toolId
Name of the tool.
Definition: tool_base.h:210
bool InvokeTool(TOOL_ID aToolId)
Call a tool by sending a tool activation event to tool of given ID.

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

Referenced by AUTOPLACE_TOOL::autoplace(), EDIT_TOOL::copyToClipboard(), SCH_EDIT_TOOL::DeleteItemCursor(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SCH_DRAWING_TOOLS::DrawShape(), 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(), EE_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PCB_PICKER_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), ROUTER_TOOL::RouteSelected(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_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}

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ doZoomInOut()

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

Definition at line 354 of file eda_3d_controller.cpp.

355{
356 if( m_canvas )
357 {
358 m_canvas->SetView3D( aDirection ? WXK_F1 : WXK_F2 );
360 }
361
362 return 0;
363}
bool SetView3D(int aKeycode)
Helper function to call view commands.
void DisplayStatus()
Update the status bar with the position information.

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

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

References TOOL_BASE::getToolHolderInt().

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

◆ GetId()

TOOL_ID TOOL_BASE::GetId ( ) const
inlineinherited

Return the unique identifier of the tool.

The identifier is set by an instance of TOOL_MANAGER.

Returns
Identifier of the tool.

Definition at line 121 of file tool_base.h.

122 {
123 return m_toolId;
124 }

References TOOL_BASE::m_toolId.

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

◆ GetManager()

TOOL_MANAGER * TOOL_BASE::GetManager ( ) const
inlineinherited

◆ getModel()

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

Return the model object if it matches the requested type.

Store the type of the tool.

Definition at line 197 of file tool_base.h.

References TOOL_BASE::getModelInt().

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

◆ getModelInt()

EDA_ITEM * TOOL_BASE::getModelInt ( ) const
privateinherited

Definition at line 54 of file tool_base.cpp.

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

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

Referenced by TOOL_BASE::getModel().

◆ GetName()

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

Return the name of the tool.

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

Returns
The name of the tool.

Definition at line 134 of file tool_base.h.

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

References TOOL_BASE::m_toolName.

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

◆ 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 {
80 }

References m_rotationIncrement.

◆ getToolHolderInt()

TOOLS_HOLDER * TOOL_BASE::getToolHolderInt ( ) const
privateinherited

Definition at line 48 of file tool_base.cpp.

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

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

Referenced by TOOL_BASE::getEditFrame().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Return the type of the tool.

Returns
The type of the tool.

Definition at line 109 of file tool_base.h.

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

References TOOL_BASE::m_type.

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

◆ getView()

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

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

It allows tools to draw.

Returns
The instance of VIEW.

Definition at line 36 of file tool_base.cpp.

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

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

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

◆ getViewControls()

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

Return the instance of VIEW_CONTROLS object used in the application.

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

Returns
The instance of VIEW_CONTROLS.

Definition at line 42 of file tool_base.cpp.

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

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

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

References TOOL_INTERACTIVE::goInternal().

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

◆ goInternal()

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

Definition at line 70 of file tool_interactive.cpp.

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

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

Referenced by TOOL_INTERACTIVE::Go().

◆ Init()

bool 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 TOOL_ACTION zoomOutCenter
Definition: actions.h:97
static TOOL_ACTION zoomInCenter
Definition: actions.h:96
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.
void AddSeparator(int aOrder=ANY_ORDER)
Add a separator to the menu.
static TOOL_ACTION viewTop
static TOOL_ACTION moveLeft
static TOOL_ACTION viewLeft
static TOOL_ACTION viewBack
static TOOL_ACTION viewRight
static TOOL_ACTION moveUp
static TOOL_ACTION flipView
static TOOL_ACTION moveDown
static TOOL_ACTION viewBottom
static TOOL_ACTION moveRight
static TOOL_ACTION viewFront
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:44

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{
34}
bool IsToolActive(TOOL_ID aId) const
Return true if a tool with given id is active (executing)

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

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

◆ 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}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
bool IsQuasiModal() const
Definition: dialog_shim.h:106
void EndQuasiModal(int retCode)
virtual wxWindow * GetToolCanvas() const =0
Canvas access.
Generic, UI-independent tool event.
Definition: tool_event.h:156
TOOL_EVENT * Wait(const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
Suspend execution of the tool until an event specified in aEventList arrives.
void ShowContextMenu(SELECTION &aSelection)
Helper function to set and immediately show a CONDITIONAL_MENU in concert with the given SELECTION.
Definition: tool_menu.cpp:57
@ BUT_RIGHT
Definition: tool_event.h:128

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 322 of file eda_3d_controller.cpp.

323{
325
326 if( m_canvas )
328
329 return 0;
330}
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:54
EDA_3D_VIEWER_SETTINGS * m_Cfg
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:442

References EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, m_boardAdapter, m_canvas, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, TOOL_EVENT::Parameter(), and EDA_3D_CANVAS::Request_refresh().

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}
@ CURSOR_RIGHT
Definition: actions.h:191
@ CURSOR_LEFT
Definition: actions.h:191
@ CURSOR_UP
Definition: actions.h:191
@ CURSOR_DOWN
Definition: actions.h:191

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}
virtual BOARD_ADAPTER & GetAdapter()=0
virtual CAMERA & GetCurrentCamera()=0
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:49

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

◆ resetTransitions()

void TOOL_INTERACTIVE::resetTransitions ( )
privateinherited

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

Definition at line 63 of file tool_interactive.cpp.

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

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

◆ 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}
ROTATION_DIR
Rotation direction for the 3d canvas.
Definition: 3d_enums.h:35
void RotateY(float aAngleInRadians)
Definition: camera.cpp:598
void RotateX(float aAngleInRadians)
Definition: camera.cpp:591
void RotateZ(float aAngleInRadians)
Definition: camera.cpp:605
void RenderRaytracingRequest()
Request to render the current view in Raytracing mode.

References EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::engine, m_boardAdapter, m_camera, m_canvas, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, 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}
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}
void SetTool(TOOL_INTERACTIVE *aTool)
Set a tool that is the creator of the menu.
void ScheduleContextMenu(TOOL_BASE *aTool, ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger)
Set behavior of the tool's context popup menu.
@ CMENU_OFF
Definition: tool_event.h:149

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

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

◆ SetMaterial()

int EDA_3D_CONTROLLER::SetMaterial ( const TOOL_EVENT aEvent)

Definition at line 201 of file eda_3d_controller.cpp.

202{
204
205 if( auto* viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
206 viewer->NewDisplay( true );
207 else
209
210 return 0;
211}
MATERIAL_MODE
Render 3d model shape materials mode.
Definition: 3d_enums.h:71
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.

References TOOL_MANAGER::GetToolHolder(), m_boardAdapter, m_canvas, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, TOOL_BASE::m_toolMgr, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::material_mode, TOOL_EVENT::Parameter(), and EDA_3D_CANVAS::Request_refresh().

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 }

References m_rotationIncrement.

◆ setTransitions()

void EDA_3D_CONTROLLER::setTransitions ( )
overrideprivatevirtual

< Sets up handlers for various events.

Implements TOOL_INTERACTIVE.

Definition at line 378 of file eda_3d_controller.cpp.

379{
382
383 // Pan control
392
393 // View rotation
410
411 // Zoom control
416 // zoom in/out at cursor does not exist in 3D viewer but because F1 and F2 keys generate
417 // a zoomIn/zoomOut event, these events must be captured to use these hot keys. The actual
418 // zoom is the same as ZoomInOutCenter
421
422 // Grid
428
429 // Material
433
434 // Visibility
452}
static TOOL_ACTION zoomRedraw
Definition: actions.h:93
static TOOL_ACTION zoomIn
Definition: actions.h:94
static TOOL_ACTION zoomOut
Definition: actions.h:95
static TOOL_ACTION panDown
Definition: actions.h:132
static TOOL_ACTION panLeft
Definition: actions.h:133
static TOOL_ACTION updateMenu
Definition: actions.h:172
static TOOL_ACTION zoomFitScreen
Definition: actions.h:99
static TOOL_ACTION panUp
Definition: actions.h:131
static TOOL_ACTION panRight
Definition: actions.h:134
static TOOL_ACTION resetView
static TOOL_ACTION toggleSolderMask
static TOOL_ACTION toggleBoardBody
static TOOL_ACTION rotateXCCW
static TOOL_ACTION showNotInPosFile
static TOOL_ACTION showTHT
static TOOL_ACTION noGrid
static TOOL_ACTION toggleComments
static TOOL_ACTION show2_5mmGrid
static TOOL_ACTION rotateZCCW
static TOOL_ACTION rotateZCW
static TOOL_ACTION toggleSilk
static TOOL_ACTION rotateYCCW
static TOOL_ACTION rotateXCW
static TOOL_ACTION show1mmGrid
static TOOL_ACTION toggleZones
static TOOL_ACTION toggleOrtho
static TOOL_ACTION show10mmGrid
static TOOL_ACTION show5mmGrid
static TOOL_ACTION showSMD
static TOOL_ACTION homeView
static TOOL_ACTION materialDiffuse
static TOOL_ACTION toggleAdhesive
static TOOL_ACTION pivotCenter
static TOOL_ACTION controlActivate
static TOOL_ACTION showVirtual
static TOOL_ACTION rotateYCW
static TOOL_ACTION materialCAD
static TOOL_ACTION toggleRealisticMode
static TOOL_ACTION showBBoxes
static TOOL_ACTION toggleECO
static TOOL_ACTION materialNormal
static TOOL_ACTION showAxis
static TOOL_ACTION toggleSolderPaste
int On3DGridSelection(const TOOL_EVENT &aEvent)
int ZoomFitScreen(const TOOL_EVENT &aEvent)
int Main(const TOOL_EVENT &aEvent)
int ZoomRedraw(const TOOL_EVENT &aEvent)
int ToggleOrtho(const TOOL_EVENT &aEvent)
int PanControl(const TOOL_EVENT &aEvent)
int ToggleVisibility(const TOOL_EVENT &aEvent)
int RotateView(const TOOL_EVENT &aEvent)
int SetMaterial(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
int ViewControl(const TOOL_EVENT &aEvent)
int ZoomInOutCenter(const TOOL_EVENT &aEvent)
int ZoomInOut(const TOOL_EVENT &aEvent)
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).

References 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::showNotInPosFile, 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()

◆ ToggleVisibility()

int EDA_3D_CONTROLLER::ToggleVisibility ( const TOOL_EVENT aEvent)

Definition at line 226 of file eda_3d_controller.cpp.

227{
228 bool reload = false;
229
230#define FLIP( x ) x = !x
231
232 if( aEvent.IsAction( &EDA_3D_ACTIONS::showTHT ) )
233 {
235 reload = true;
236 }
237 else if( aEvent.IsAction( &EDA_3D_ACTIONS::showSMD ) )
238 {
240 reload = true;
241 }
242 else if( aEvent.IsAction( &EDA_3D_ACTIONS::showVirtual ) )
243 {
245 reload = true;
246 }
247 else if( aEvent.IsAction( &EDA_3D_ACTIONS::showNotInPosFile ) )
248 {
250 reload = true;
251 }
252 else if( aEvent.IsAction( &EDA_3D_ACTIONS::showBBoxes ) )
253 {
255 }
257 {
259 }
260 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleBoardBody ) )
261 {
263 }
264 else if( aEvent.IsAction( &EDA_3D_ACTIONS::showAxis ) )
265 {
267 }
268 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleZones ) )
269 {
271 }
272 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleAdhesive ) )
273 {
275 }
276 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSilk ) )
277 {
279 }
280 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSolderMask ) )
281 {
283 }
284 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleSolderPaste ) )
285 {
287 }
288 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleComments ) )
289 {
291 }
292 else if( aEvent.IsAction( &EDA_3D_ACTIONS::toggleECO ) )
293 {
295 }
296
297 if( reload )
298 {
300 {
301 auto* renderer = static_cast<RENDER_3D_OPENGL*>( m_canvas->GetCurrentRender() );
302 renderer->Load3dModelsIfNeeded();
304 }
305 else
306 {
308 }
309 }
310 else
311 {
312 if( auto viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
313 viewer->NewDisplay( true );
314 else
316 }
317
318 return 0;
319}
RENDER_3D_BASE * GetCurrentRender() const
Object to render the board using openGL.
void Load3dModelsIfNeeded()
Load footprint models if they are not already loaded, i.e.
bool IsAction(const TOOL_ACTION *aAction) const
Test if the event contains an action issued upon activation of the given TOOL_ACTION.
Definition: tool_event.cpp:81
#define FLIP(x)

References EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::engine, FLIP, EDA_3D_CANVAS::GetCurrentRender(), TOOL_MANAGER::GetToolHolder(), TOOL_EVENT::IsAction(), RENDER_3D_OPENGL::Load3dModelsIfNeeded(), m_boardAdapter, m_canvas, BOARD_ADAPTER::m_Cfg, EDA_3D_VIEWER_SETTINGS::m_Render, TOOL_BASE::m_toolMgr, OPENGL, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::opengl_show_model_bbox, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, reload, EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_adhesive, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_axis, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_board_body, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_comments, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_eco, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_insert, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_normal, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_not_in_posfile, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_footprints_virtual, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_silkscreen, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_soldermask, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_solderpaste, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::show_zones, EDA_3D_ACTIONS::showAxis, EDA_3D_ACTIONS::showBBoxes, EDA_3D_ACTIONS::showNotInPosFile, 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::toggleRealisticMode, EDA_3D_ACTIONS::toggleSilk, EDA_3D_ACTIONS::toggleSolderMask, EDA_3D_ACTIONS::toggleSolderPaste, and EDA_3D_ACTIONS::toggleZones.

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:49
void UpdateAll()
Run update handlers for the menu and its submenus.

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}

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_EVENT * ScheduleWait(TOOL_BASE *aTool, const TOOL_EVENT_LIST &aConditions)
Pause execution of a given tool until one or more events matching aConditions arrives.

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

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), Main(), CVPCB_CONTROL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_POINT_EDITOR::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_POINT_EDITOR::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ ZoomFitScreen()

int EDA_3D_CONTROLLER::ZoomFitScreen ( const TOOL_EVENT aEvent)

Definition at line 366 of file eda_3d_controller.cpp.

367{
368 if( m_canvas )
369 {
370 m_canvas->SetView3D( WXK_HOME );
372 }
373
374 return 0;
375}

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 340 of file eda_3d_controller.cpp.

341{
342 bool direction = aEvent.IsAction( &ACTIONS::zoomIn );
343 return doZoomInOut( direction, true );
344}
int doZoomInOut(bool aDirection, bool aCenterOnCursor)

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

Referenced by setTransitions().

◆ ZoomInOutCenter()

int EDA_3D_CONTROLLER::ZoomInOutCenter ( const TOOL_EVENT aEvent)

Definition at line 347 of file eda_3d_controller.cpp.

348{
349 bool direction = aEvent.IsAction( &ACTIONS::zoomInCenter );
350 return doZoomInOut( direction, false );
351}

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

Referenced by setTransitions().

◆ ZoomRedraw()

int EDA_3D_CONTROLLER::ZoomRedraw ( const TOOL_EVENT aEvent)

Definition at line 333 of file eda_3d_controller.cpp.

334{
336 return 0;
337}

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(), SCH_DRAWING_TOOLS::DrawShape(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< T >::Init(), SCH_DRAWING_TOOLS::Init(), SCH_EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), SYMBOL_EDITOR_DRAWING_TOOLS::Init(), GERBVIEW_SELECTION_TOOL::Init(), PICKER_TOOL::Init(), ZOOM_TOOL::Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), PL_SELECTION_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), ROUTER_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), DRAWING_TOOL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), PCB_TOOL_BASE::Init(), PCB_VIEWER_TOOLS::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_PICKER_TOOL::Main(), PCB_SELECTION_TOOL::Main(), LENGTH_TUNER_TOOL::MainLoop(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_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 210 of file tool_base.h.

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

◆ m_toolMgr

TOOL_MANAGER* TOOL_BASE::m_toolMgr
protectedinherited

Definition at line 215 of file tool_base.h.

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

◆ m_toolName

std::string TOOL_BASE::m_toolName
protectedinherited

Definition at line 214 of file tool_base.h.

Referenced by TOOL_BASE::GetName().

◆ m_type

TOOL_TYPE TOOL_BASE::m_type
protectedinherited

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

Definition at line 207 of file tool_base.h.

Referenced by TOOL_BASE::GetType().


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