KiCad PCB EDA Suite
EDA_3D_CONTROLLER Class Reference

EDA_3D_CONTROLLER. More...

#include <3d_controller.h>

Inheritance diagram for EDA_3D_CONTROLLER:
TOOL_INTERACTIVE TOOL_BASE

Public Types

enum  RESET_REASON { RUN, MODEL_RELOAD, GAL_SWITCH }
 

Determines the reason of reset for a tool

More...
 

Public Member Functions

 EDA_3D_CONTROLLER ()
 
 ~EDA_3D_CONTROLLER () override
 
bool Init () override
 Function Init() Init() is called once upon a registration of the tool. More...
 
void Reset (RESET_REASON aReason) override
 Function Reset() Brings 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 ToggleOrtho (const TOOL_EVENT &aEvent)
 
int ToggleVisibility (const TOOL_EVENT &aEvent)
 
void Activate ()
 Function Activate() Runs the tool. More...
 
TOOL_MENUGetToolMenu ()
 
void SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON)
 Function SetContextMenu() More...
 
void RunMainStack (std::function< void()> aFunc)
 Function RunMainStack() More...
 
template<class T >
void Go (int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
 Function Go() More...
 
TOOL_EVENTWait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
 Function Wait() More...
 
TOOL_TYPE GetType () const
 Function GetType() Returns the type of the tool. More...
 
TOOL_ID GetId () const
 Function GetId() Returns the unique identifier of the tool. More...
 
const std::string & GetName () const
 Function GetName() Returns the name of the tool. More...
 
TOOL_MANAGERGetManager () const
 Function GetManager() Returns the instance of TOOL_MANAGER that takes care of the tool. More...
 
bool IsToolActive () const
 

Protected Member Functions

void attachManager (TOOL_MANAGER *aManager)
 Function attachManager() More...
 
KIGFX::VIEWgetView () const
 Function getView() More...
 
KIGFX::VIEW_CONTROLSgetViewControls () const
 Function getViewControls() More...
 
template<typename T >
T * getEditFrame () const
 Function getEditFrame() More...
 
template<typename T >
T * getModel () const
 Function getModel() More...
 

Protected Attributes

TOOL_MENU m_menu
 functions below are not yet implemented - their interface may change More...
 
TOOL_TYPE m_type
 

Stores the type of the tool.

More...
 
TOOL_ID m_toolId
 

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

More...
 
std::string m_toolName
 

Name of the tool.

More...
 
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
 
CCAMERAm_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 3d_controller.h.

Member Enumeration Documentation

◆ RESET_REASON

enum TOOL_BASE::RESET_REASON
inherited

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

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

Constructor & Destructor Documentation

◆ EDA_3D_CONTROLLER()

EDA_3D_CONTROLLER::EDA_3D_CONTROLLER ( )
inline

Definition at line 42 of file 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)
Constructor.
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 3d_controller.h.

50 { }

Member Function Documentation

◆ Activate()

void TOOL_INTERACTIVE::Activate ( )
inherited

Function Activate() Runs 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:219
TOOL_ID m_toolId
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition: tool_base.h:214
bool InvokeTool(TOOL_ID aToolId)
Function InvokeTool() Calls 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(), LIB_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCBNEW_CONTROL::DeleteItemCursor(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PCB_EDITOR_CONTROL::DrillOrigin(), PAD_TOOL::EnumeratePads(), PCBNEW_CONTROL::GridSetOrigin(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PCB_INSPECTION_TOOL::HighlightNetTool(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PCB_INSPECTION_TOOL::LocalRatsnestTool(), PL_EDIT_TOOL::Main(), EE_POINT_EDITOR::Main(), LIB_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), PCBNEW_PICKER_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), LIB_TREE::onContextMenu(), POINT_EDITOR::OnSelectionChange(), LIB_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ attachManager()

void TOOL_BASE::attachManager ( TOOL_MANAGER aManager)
protectedinherited

Function attachManager()

Sets 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:219

References TOOL_BASE::m_toolMgr.

Referenced by TOOL_MANAGER::RegisterTool().

◆ doZoomInOut()

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

Definition at line 252 of file 3d_controller.cpp.

253 {
254  if( m_canvas )
255  {
256  m_canvas->SetView3D( aDirection ? WXK_F1 : WXK_F2 );
258  }
259 
260  return 0;
261 }
void DisplayStatus()
DisplayStatus - Update the status bar with the position information.
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
SetView3D - 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

Function getEditFrame()

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

Definition at line 187 of file tool_base.h.

188  {
189 #if !defined( QA_TEST ) // Dynamic casts give the linker a siezure in the test framework
190  wxASSERT( dynamic_cast<T*>( getToolHolderInt() ) );
191 #endif
192  return static_cast<T*>( getToolHolderInt() );
193  }
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

Function GetId() Returns 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  }
TOOL_ID m_toolId
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition: tool_base.h:214

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

Function GetManager() Returns the instance of TOOL_MANAGER that takes care of the tool.

Returns
Instance of the TOOL_MANAGER. If there is no TOOL_MANAGER associated, it returns NULL.

Definition at line 143 of file tool_base.h.

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

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

Function getModel()

Returns the model object if it matches the requested type.

Definition at line 201 of file tool_base.h.

202  {
203  EDA_ITEM* m = getModelInt();
204 #if !defined( QA_TEST ) // Dynamic casts give the linker a siezure in the test framework
205  wxASSERT( dynamic_cast<T*>( m ) );
206 #endif
207  return static_cast<T*>( m );
208  }
EDA_ITEM * getModelInt() const
Definition: tool_base.cpp:54
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159

References TOOL_BASE::getModelInt().

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

◆ GetName()

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

Function GetName() Returns 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 132 of file tool_base.h.

133  {
134  return m_toolName;
135  }
std::string m_toolName
Name of the tool.
Definition: tool_base.h:218

References TOOL_BASE::m_toolName.

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

◆ 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 3d_controller.h.

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

References m_rotationIncrement.

Referenced by DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow().

◆ GetToolMenu()

◆ GetType()

TOOL_TYPE TOOL_BASE::GetType ( ) const
inlineinherited

Function GetType() Returns the type of the tool.

Returns
The type of the tool.

Definition at line 110 of file tool_base.h.

111  {
112  return m_type;
113  }
TOOL_TYPE m_type
Stores the type of the tool.
Definition: tool_base.h:211

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

Function getView()

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:284
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:219

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::checkPart(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), COMMON_TOOLS::CursorControl(), LIB_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCBNEW_CONTROL::DeleteItemCursor(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PL_EDIT_TOOL::DoDelete(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), SELECTION_TOOL::doSelectionMenu(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), MICROWAVE_TOOL::drawMicrowaveInductor(), PL_DRAWING_TOOLS::DrawShape(), PCB_EDITOR_CONTROL::DrillOrigin(), LIB_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_EDITOR_CONTROL::FindComponentAndItem(), EE_SELECTION_TOOL::GetNode(), ROUTER_TOOL::getStartLayer(), PCBNEW_CONTROL::GridResetOrigin(), PCBNEW_CONTROL::GridSetOrigin(), SELECTION_TOOL::GuessSelectionCandidates(), PL_SELECTION_TOOL::highlight(), EE_SELECTION_TOOL::highlight(), SELECTION_TOOL::highlight(), GERBVIEW_CONTROL::HighlightControl(), PNS::TOOL_BASE::highlightNet(), PCB_INSPECTION_TOOL::highlightNet(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), PCB_VIEWER_TOOLS::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), SCH_MOVE_TOOL::moveItem(), PL_EDIT_TOOL::moveItem(), COMMON_TOOLS::OnGridChanged(), POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), LIB_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), PNS::TOOL_BASE::pickSingleItem(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EDIT_TOOL::Remove(), PCB_EDITOR_CONTROL::Reset(), PNS::TOOL_BASE::Reset(), PCBNEW_CONTROL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), DRAWING_TOOL::Reset(), EE_SELECTION_TOOL::Reset(), SELECTION_TOOL::Reset(), EE_TOOL_BASE< SCH_BASE_FRAME >::Reset(), SCH_EDIT_TOOL::Rotate(), GERBVIEW_SELECTION_TOOL::select(), GERBVIEW_SELECTION_TOOL::selectable(), SELECTION_TOOL::Selectable(), PL_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectionContains(), SELECTION_TOOL::selectionContains(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), EE_SELECTION_TOOL::SelectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), PL_EDITOR_CONTROL::ToggleBackgroundColor(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), PL_SELECTION_TOOL::unhighlight(), EE_SELECTION_TOOL::unhighlight(), SELECTION_TOOL::unhighlight(), GERBVIEW_SELECTION_TOOL::unselect(), GERBVIEW_SELECTION_TOOL::unselectVisually(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), POINT_EDITOR::updateEditedPoint(), SCH_EDITOR_CONTROL::UpdateFind(), EE_POINT_EDITOR::updateItem(), PL_POINT_EDITOR::updateItem(), POINT_EDITOR::updateItem(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), POINT_EDITOR::updatePoints(), SELECTION_TOOL::updateSelection(), PNS::TOOL_BASE::updateStartItem(), EE_TOOL_BASE< SCH_BASE_FRAME >::updateView(), PCB_VIEWER_TOOLS::view(), PCB_TOOL_BASE::view(), COMMON_TOOLS::ZoomFitScreen(), SELECTION_TOOL::zoomFitSelection(), EE_SELECTION_TOOL::~EE_SELECTION_TOOL(), GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL(), and SELECTION_TOOL::~SELECTION_TOOL().

◆ getViewControls()

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

Function getViewControls()

Returns 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:219
KIGFX::VIEW_CONTROLS * GetViewControls() const
Definition: tool_manager.h:286

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

Referenced by EE_POINT_EDITOR::addCorner(), POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), SCH_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_TOOL::BreakWire(), PCB_TOOL_BASE::controls(), COMMON_TOOLS::CursorControl(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomToPreset(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), LIB_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), PCB_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), PCB_INSPECTION_TOOL::HighlightNetTool(), FOOTPRINT_EDITOR_TOOLS::ImportFootprint(), PL_EDIT_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), LIB_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PCBNEW_PICKER_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), COMMON_TOOLS::OnGridChanged(), POINT_EDITOR::OnSelectionChange(), LIB_EDIT_TOOL::Paste(), ROUTER_TOOL::performDragging(), LIB_DRAWING_TOOLS::PlaceAnchor(), PCBNEW_CONTROL::placeBoardItems(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_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(), POINT_EDITOR::Reset(), DRAWING_TOOL::Reset(), COMMON_TOOLS::ResetLocalCoords(), GERBVIEW_SELECTION_TOOL::selectCursor(), SELECTION_TOOL::selectCursor(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::SelectNode(), ZOOM_TOOL::selectRegion(), ALIGN_DISTRIBUTE_TOOL::selectTarget(), PICKER_TOOL::setControls(), PCBNEW_PICKER_TOOL::setControls(), EE_POINT_EDITOR::setEditedPoint(), PL_POINT_EDITOR::setEditedPoint(), POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), POINT_EDITOR::updateEditedPoint(), LIB_MOVE_TOOL::updateModificationPoint(), PL_EDIT_TOOL::updateModificationPoint(), 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

Function Go()

Defines which state (aStateFunc) to go when a certain event arrives (aConditions). No conditions means any event.

Definition at line 129 of file tool_interactive.h.

131 {
132  TOOL_STATE_FUNC sptr = std::bind( aStateFunc, static_cast<T*>( this ), std::placeholders::_1 );
133 
134  goInternal( sptr, aConditions );
135 }
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 LENGTH_TUNER_TOOL::setTransitions(), ZOOM_TOOL::setTransitions(), AUTOPLACE_TOOL::setTransitions(), ROUTER_TOOL::setTransitions(), LIB_PIN_TOOL::setTransitions(), EE_INSPECTION_TOOL::setTransitions(), PL_DRAWING_TOOLS::setTransitions(), EE_POINT_EDITOR::setTransitions(), ZONE_FILLER_TOOL::setTransitions(), PL_POINT_EDITOR::setTransitions(), COMMON_CONTROL::setTransitions(), KICAD_MANAGER_CONTROL::setTransitions(), LIB_MOVE_TOOL::setTransitions(), MICROWAVE_TOOL::setTransitions(), PCB_VIEWER_TOOLS::setTransitions(), POINT_EDITOR::setTransitions(), LIB_DRAWING_TOOLS::setTransitions(), SCH_MOVE_TOOL::setTransitions(), GLOBAL_EDIT_TOOL::setTransitions(), GERBVIEW_CONTROL::setTransitions(), SCH_DRAWING_TOOLS::setTransitions(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::setTransitions(), PL_EDITOR_CONTROL::setTransitions(), LIB_EDIT_TOOL::setTransitions(), LIB_CONTROL::setTransitions(), PAD_TOOL::setTransitions(), PL_EDIT_TOOL::setTransitions(), FOOTPRINT_EDITOR_TOOLS::setTransitions(), SCH_EDIT_TOOL::setTransitions(), POSITION_RELATIVE_TOOL::setTransitions(), GERBVIEW_SELECTION_TOOL::setTransitions(), COMMON_TOOLS::setTransitions(), setTransitions(), PCBNEW_CONTROL::setTransitions(), ALIGN_DISTRIBUTE_TOOL::setTransitions(), PCB_INSPECTION_TOOL::setTransitions(), SCH_LINE_WIRE_BUS_TOOL::setTransitions(), CVPCB_CONTROL::setTransitions(), CVPCB_ASSOCIATION_TOOL::setTransitions(), PCBNEW_PICKER_TOOL::setTransitions(), PICKER_TOOL::setTransitions(), PCB_EDITOR_CONTROL::setTransitions(), DRC::setTransitions(), EDIT_TOOL::setTransitions(), DRAWING_TOOL::setTransitions(), SELECTION_TOOL::setTransitions(), PL_SELECTION_TOOL::setTransitions(), SCH_EDITOR_CONTROL::setTransitions(), and EE_SELECTION_TOOL::setTransitions().

◆ Init()

bool EDA_3D_CONTROLLER::Init ( )
overridevirtual

Function Init() 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 35 of file 3d_controller.cpp.

36 {
37  CONDITIONAL_MENU& ctxMenu = m_menu.GetMenu();
38 
41 
42  ctxMenu.AddSeparator();
45 
46  ctxMenu.AddSeparator();
49 
50  ctxMenu.AddSeparator();
53 
54  ctxMenu.AddSeparator();
56 
57  ctxMenu.AddSeparator();
62 
63  return true;
64 }
static bool ShowAlways(const SELECTION &aSelection)
Function ShowAlways The default condition function (always returns true).
TOOL_MENU m_menu
functions below are not yet implemented - their interface may change
CONDITIONAL_MENU & GetMenu()
Function GetMenu.
Definition: tool_menu.cpp:46
static TOOL_ACTION flipView
Definition: 3d_actions.h:59
static TOOL_ACTION viewRight
Definition: 3d_actions.h:65
static TOOL_ACTION viewLeft
Definition: 3d_actions.h:64
static TOOL_ACTION moveLeft
Definition: 3d_actions.h:53
static TOOL_ACTION viewBottom
Definition: 3d_actions.h:67
static TOOL_ACTION viewTop
Definition: 3d_actions.h:66
static TOOL_ACTION viewBack
Definition: 3d_actions.h:63
void AddSeparator(int aOrder=ANY_ORDER)
Function AddSeparator()
static TOOL_ACTION moveDown
Definition: 3d_actions.h:56
static TOOL_ACTION viewFront
Definition: 3d_actions.h:62
static TOOL_ACTION moveUp
Definition: 3d_actions.h:55
static TOOL_ACTION zoomIn
Definition: actions.h:88
static TOOL_ACTION zoomOut
Definition: actions.h:89
static TOOL_ACTION moveRight
Definition: 3d_actions.h:54
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Function AddItem()

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::zoomIn, and ACTIONS::zoomOut.

◆ 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:219
TOOL_ID m_toolId
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition: tool_base.h:214
bool IsToolActive(TOOL_ID aId) const
Function IsToolActive() Returns 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 ROUTER_TOOL::onViaCommand().

◆ Main()

int EDA_3D_CONTROLLER::Main ( const TOOL_EVENT aEvent)

Definition at line 111 of file 3d_controller.cpp.

112 {
113  // Main loop: keep receiving events
114  while( TOOL_EVENT* evt = Wait() )
115  {
116  if( evt->IsClick( BUT_RIGHT ) )
118  else
119  evt->SetPassEvent();
120  }
121 
122  return 0;
123 }
TOOL_MENU m_menu
functions below are not yet implemented - their interface may change
TOOL_EVENT * Wait(const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY))
Function Wait()
TOOL_EVENT.
Definition: tool_event.h:171
void ShowContextMenu(SELECTION &aSelection)
Function ShowContextMenu.
Definition: tool_menu.cpp:59

References BUT_RIGHT, TOOL_INTERACTIVE::m_menu, TOOL_MENU::ShowContextMenu(), and TOOL_INTERACTIVE::Wait().

Referenced by setTransitions().

◆ On3DGridSelection()

int EDA_3D_CONTROLLER::On3DGridSelection ( const TOOL_EVENT aEvent)

Definition at line 219 of file 3d_controller.cpp.

220 {
221  GRID3D_TYPE grid = aEvent.Parameter<GRID3D_TYPE>();
222  m_boardAdapter->GridSet( grid );
223 
224  if( m_canvas )
226 
227  return 0;
228 }
void GridSet(GRID3D_TYPE aGridType) noexcept
GridSet - set the current grid.
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
EDA_3D_CANVAS * m_canvas
GRID3D_TYPE
Grid types.
Definition: 3d_enums.h:83
BOARD_ADAPTER * m_boardAdapter

References BOARD_ADAPTER::GridSet(), m_boardAdapter, m_canvas, 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 134 of file 3d_controller.cpp.

135 {
136  switch( aEvent.Parameter<intptr_t>() )
137  {
138  case ACTIONS::CURSOR_UP: m_canvas->SetView3D( WXK_UP ); break;
139  case ACTIONS::CURSOR_DOWN: m_canvas->SetView3D( WXK_DOWN ); break;
140  case ACTIONS::CURSOR_LEFT: m_canvas->SetView3D( WXK_LEFT ); break;
141  case ACTIONS::CURSOR_RIGHT: m_canvas->SetView3D( WXK_RIGHT ); break;
142  default: wxFAIL; break;
143  }
144 
145  return 0;
146 }
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
SetView3D - 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

Function Reset() Brings 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 67 of file 3d_controller.cpp.

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

Definition at line 149 of file 3d_controller.cpp.

150 {
151  double rotIncrement = glm::radians( m_rotationIncrement );
152 
153  switch( aEvent.Parameter<intptr_t>() )
154  {
155  case ID_ROTATE3D_X_NEG: m_camera->RotateX( -rotIncrement ); break;
156  case ID_ROTATE3D_X_POS: m_camera->RotateX( rotIncrement ); break;
157  case ID_ROTATE3D_Y_NEG: m_camera->RotateY( -rotIncrement ); break;
158  case ID_ROTATE3D_Y_POS: m_camera->RotateY( rotIncrement ); break;
159  case ID_ROTATE3D_Z_NEG: m_camera->RotateZ( -rotIncrement ); break;
160  case ID_ROTATE3D_Z_POS: m_camera->RotateZ( rotIncrement ); break;
161  default: wxFAIL; break;
162  }
163 
166  else
168 
169  return 0;
170 }
double m_rotationIncrement
Rotation increment for the rotate actions (degrees)
void RotateY(float aAngleInRadians)
Definition: ccamera.cpp:523
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
void RotateZ(float aAngleInRadians)
Definition: ccamera.cpp:530
void RotateX(float aAngleInRadians)
Definition: ccamera.cpp:516
void RenderRaytracingRequest()
RenderRaytracingRequest - Request to render the current view in Raytracing mode.
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
RENDER_ENGINE RenderEngineGet() const noexcept
RenderEngineGet.
EDA_3D_CANVAS * m_canvas
BOARD_ADAPTER * m_boardAdapter

References ID_ROTATE3D_X_NEG, ID_ROTATE3D_X_POS, ID_ROTATE3D_Y_NEG, ID_ROTATE3D_Y_POS, ID_ROTATE3D_Z_NEG, ID_ROTATE3D_Z_POS, m_boardAdapter, m_camera, m_canvas, m_rotationIncrement, OPENGL_LEGACY, TOOL_EVENT::Parameter(), BOARD_ADAPTER::RenderEngineGet(), EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), CCAMERA::RotateX(), CCAMERA::RotateY(), and CCAMERA::RotateZ().

Referenced by setTransitions().

◆ RunMainStack()

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

Function RunMainStack()

Calls 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:219
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

Function SetContextMenu()

Assigns 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:219
void SetTool(TOOL_INTERACTIVE *aTool)
Function SetTool() Sets a tool that is the creator of the menu.
void ScheduleContextMenu(TOOL_BASE *aTool, ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger)
Sets behaviour 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(), SELECTION_TOOL::doSelectionMenu(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), TOOL_MENU::ShowContextMenu(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ 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 3d_controller.h.

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

References m_rotationIncrement.

Referenced by DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow().

◆ setTransitions()

void EDA_3D_CONTROLLER::setTransitions ( )
overrideprivatevirtual

Sets up handlers for various events.

Implements TOOL_INTERACTIVE.

Definition at line 276 of file 3d_controller.cpp.

277 {
280 
281  // Pan control
290 
291  // View rotation
308 
309  // Zoom control
316 
317  // Grid
323 
324  // Visibility
347 }
static TOOL_ACTION rotateXCW
Definition: 3d_actions.h:47
int ZoomFitScreen(const TOOL_EVENT &aEvent)
static TOOL_ACTION homeView
Definition: 3d_actions.h:57
int ToggleOrtho(const TOOL_EVENT &aEvent)
static TOOL_ACTION zoomInCenter
Definition: actions.h:90
static TOOL_ACTION show10mmGrid
Definition: 3d_actions.h:70
int ZoomInOutCenter(const TOOL_EVENT &aEvent)
static TOOL_ACTION pivotCenter
Definition: 3d_actions.h:46
static TOOL_ACTION showBoundingBoxes
Definition: 3d_actions.h:79
static TOOL_ACTION toggleAdhesive
Definition: 3d_actions.h:91
static TOOL_ACTION zoomFitScreen
Definition: actions.h:93
static TOOL_ACTION attributesVirtual
Definition: 3d_actions.h:78
static TOOL_ACTION toggleSilk
Definition: 3d_actions.h:92
static TOOL_ACTION toggleSolderMask
Definition: 3d_actions.h:93
static TOOL_ACTION showRefractions
Definition: 3d_actions.h:83
int ZoomRedraw(const TOOL_EVENT &aEvent)
int UpdateMenu(const TOOL_EVENT &aEvent)
static TOOL_ACTION panLeft
Definition: actions.h:125
int On3DGridSelection(const TOOL_EVENT &aEvent)
static TOOL_ACTION resetView
Definition: 3d_actions.h:58
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Function Go()
static TOOL_ACTION controlActivate
Definition: 3d_actions.h:44
static TOOL_ACTION zoomOutCenter
Definition: actions.h:91
static TOOL_ACTION flipView
Definition: 3d_actions.h:59
static TOOL_ACTION toggleZones
Definition: 3d_actions.h:90
static TOOL_ACTION viewRight
Definition: 3d_actions.h:65
static TOOL_ACTION viewLeft
Definition: 3d_actions.h:64
static TOOL_ACTION toggleECO
Definition: 3d_actions.h:96
static TOOL_ACTION antiAliasing
Definition: 3d_actions.h:85
static TOOL_ACTION moveLeft
Definition: 3d_actions.h:53
static TOOL_ACTION toggleComments
Definition: 3d_actions.h:95
static TOOL_ACTION show5mmGrid
Definition: 3d_actions.h:71
int ViewControl(const TOOL_EVENT &aEvent)
static TOOL_ACTION panDown
Definition: actions.h:124
static TOOL_ACTION toggleSolderPaste
Definition: 3d_actions.h:94
static TOOL_ACTION rotateYCW
Definition: 3d_actions.h:49
static TOOL_ACTION panRight
Definition: actions.h:126
int ZoomInOut(const TOOL_EVENT &aEvent)
int PanControl(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateXCCW
Definition: 3d_actions.h:48
static TOOL_ACTION viewBottom
Definition: 3d_actions.h:67
static TOOL_ACTION rotateZCCW
Definition: 3d_actions.h:52
static TOOL_ACTION updateMenu
Definition: actions.h:163
static TOOL_ACTION addFloor
Definition: 3d_actions.h:82
static TOOL_ACTION showAxis
Definition: 3d_actions.h:89
int ToggleVisibility(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateZCW
Definition: 3d_actions.h:51
static TOOL_ACTION viewTop
Definition: 3d_actions.h:66
static TOOL_ACTION viewBack
Definition: 3d_actions.h:63
static TOOL_ACTION attributesSMD
Definition: 3d_actions.h:77
static TOOL_ACTION toggleRealisticMode
Definition: 3d_actions.h:87
static TOOL_ACTION moveDown
Definition: 3d_actions.h:56
int Main(const TOOL_EVENT &aEvent)
static TOOL_ACTION proceduralTextures
Definition: 3d_actions.h:81
static TOOL_ACTION show2_5mmGrid
Definition: 3d_actions.h:72
static TOOL_ACTION show1mmGrid
Definition: 3d_actions.h:73
static TOOL_ACTION attributesTHT
Definition: 3d_actions.h:76
static TOOL_ACTION viewFront
Definition: 3d_actions.h:62
int RotateView(const TOOL_EVENT &aEvent)
static TOOL_ACTION rotateYCCW
Definition: 3d_actions.h:50
static TOOL_ACTION zoomRedraw
Definition: actions.h:87
static TOOL_ACTION postProcessing
Definition: 3d_actions.h:86
static TOOL_ACTION moveUp
Definition: 3d_actions.h:55
static TOOL_ACTION noGrid
Definition: 3d_actions.h:69
static TOOL_ACTION panUp
Definition: actions.h:123
static TOOL_ACTION zoomIn
Definition: actions.h:88
static TOOL_ACTION zoomOut
Definition: actions.h:89
static TOOL_ACTION showReflections
Definition: 3d_actions.h:84
static TOOL_ACTION toggleOrtho
Definition: 3d_actions.h:60
static TOOL_ACTION renderShadows
Definition: 3d_actions.h:80
static TOOL_ACTION moveRight
Definition: 3d_actions.h:54
static TOOL_ACTION toggleBoardBody
Definition: 3d_actions.h:88

References EDA_3D_ACTIONS::addFloor, EDA_3D_ACTIONS::antiAliasing, EDA_3D_ACTIONS::attributesSMD, EDA_3D_ACTIONS::attributesTHT, EDA_3D_ACTIONS::attributesVirtual, EDA_3D_ACTIONS::controlActivate, EDA_3D_ACTIONS::flipView, TOOL_INTERACTIVE::Go(), EDA_3D_ACTIONS::homeView, Main(), 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::postProcessing, EDA_3D_ACTIONS::proceduralTextures, EDA_3D_ACTIONS::renderShadows, 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, EDA_3D_ACTIONS::show10mmGrid, EDA_3D_ACTIONS::show1mmGrid, EDA_3D_ACTIONS::show2_5mmGrid, EDA_3D_ACTIONS::show5mmGrid, EDA_3D_ACTIONS::showAxis, EDA_3D_ACTIONS::showBoundingBoxes, EDA_3D_ACTIONS::showReflections, EDA_3D_ACTIONS::showRefractions, 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 173 of file 3d_controller.cpp.

174 {
176 
179  else
181 
182  return 0;
183 }
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
void RenderRaytracingRequest()
RenderRaytracingRequest - Request to render the current view in Raytracing mode.
void ToggleProjection()
Definition: ccamera.cpp:437
RENDER_ENGINE RenderEngineGet() const noexcept
RenderEngineGet.
EDA_3D_CANVAS * m_canvas
BOARD_ADAPTER * m_boardAdapter

References m_boardAdapter, m_camera, m_canvas, OPENGL_LEGACY, BOARD_ADAPTER::RenderEngineGet(), EDA_3D_CANVAS::RenderRaytracingRequest(), EDA_3D_CANVAS::Request_refresh(), and CCAMERA::ToggleProjection().

Referenced by setTransitions().

◆ ToggleVisibility()

int EDA_3D_CONTROLLER::ToggleVisibility ( const TOOL_EVENT aEvent)

Definition at line 186 of file 3d_controller.cpp.

187 {
188  DISPLAY3D_FLG flag = aEvent.Parameter<DISPLAY3D_FLG>();
189 
190  m_boardAdapter->SetFlag( flag, !m_boardAdapter->GetFlag( flag ) );
191 
192  switch( flag )
193  {
199  case FL_AXIS:
201  break;
202 
203  default:
204  {
205  EDA_3D_VIEWER* viewer = dynamic_cast<EDA_3D_VIEWER*>( m_toolMgr->GetToolHolder() );
206 
207  if( viewer )
208  viewer->NewDisplay( true );
209  else
211  break;
212  }
213  }
214 
215  return 0;
216 }
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:219
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
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:295
BOARD_ADAPTER * m_boardAdapter
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
Definition: eda_3d_viewer.h:65
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.

References FL_AXIS, FL_RENDER_OPENGL_SHOW_MODEL_BBOX, FL_RENDER_RAYTRACING_ANTI_ALIASING, FL_RENDER_RAYTRACING_REFLECTIONS, FL_RENDER_RAYTRACING_REFRACTIONS, FL_RENDER_RAYTRACING_SHADOWS, BOARD_ADAPTER::GetFlag(), TOOL_MANAGER::GetToolHolder(), m_boardAdapter, m_canvas, TOOL_BASE::m_toolMgr, EDA_3D_VIEWER::NewDisplay(), TOOL_EVENT::Parameter(), 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 95 of file 3d_controller.cpp.

96 {
97  ACTION_MENU* actionMenu = aEvent.Parameter<ACTION_MENU*>();
98  CONDITIONAL_MENU* conditionalMenu = dynamic_cast<CONDITIONAL_MENU*>( actionMenu );
99  SELECTION dummySel;
100 
101  if( conditionalMenu )
102  conditionalMenu->Evaluate( dummySel );
103 
104  if( actionMenu )
105  actionMenu->UpdateAll();
106 
107  return 0;
108 }
ACTION_MENU.
Definition: action_menu.h:44
void UpdateAll()
Function UpdateAll() Runs update handlers for the menu and its submenus.
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435

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

Referenced by setTransitions().

◆ ViewControl()

int EDA_3D_CONTROLLER::ViewControl ( const TOOL_EVENT aEvent)

Definition at line 126 of file 3d_controller.cpp.

127 {
128  m_canvas->SetView3D( aEvent.Parameter<intptr_t>() );
129 
130  return 0;
131 }
T Parameter() const
Function Parameter() Returns a non-standard parameter assigned to the event.
Definition: tool_event.h:435
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
SetView3D - 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

Function Wait()

Suspends 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:219
TOOL_EVENT * ScheduleWait(TOOL_BASE *aTool, const TOOL_EVENT_LIST &aConditions)
Pauses 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(), SELECTION_TOOL::doSelectionMenu(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), CVPCB_CONTROL::Main(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), LIB_MOVE_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), PCBNEW_PICKER_TOOL::Main(), Main(), PICKER_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SELECTION_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), EDIT_TOOL::pickReferencePoint(), LIB_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_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 264 of file 3d_controller.cpp.

265 {
266  if( m_canvas )
267  {
268  m_canvas->SetView3D( WXK_HOME );
270  }
271 
272  return 0;
273 }
void DisplayStatus()
DisplayStatus - Update the status bar with the position information.
EDA_3D_CANVAS * m_canvas
bool SetView3D(int aKeycode)
SetView3D - 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 238 of file 3d_controller.cpp.

239 {
240  bool direction = aEvent.IsAction( &ACTIONS::zoomIn );
241  return doZoomInOut( direction, true );
242 }
int doZoomInOut(bool aDirection, bool aCenterOnCursor)
bool IsAction(const TOOL_ACTION *aAction) const
Function IsAction() Tests if the event contains an action issued upon activation of the given TOOL_AC...
Definition: tool_event.cpp:67
static TOOL_ACTION zoomIn
Definition: actions.h:88

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

Referenced by setTransitions().

◆ ZoomInOutCenter()

int EDA_3D_CONTROLLER::ZoomInOutCenter ( const TOOL_EVENT aEvent)

Definition at line 245 of file 3d_controller.cpp.

246 {
247  bool direction = aEvent.IsAction( &ACTIONS::zoomInCenter );
248  return doZoomInOut( direction, false );
249 }
static TOOL_ACTION zoomInCenter
Definition: actions.h:90
int doZoomInOut(bool aDirection, bool aCenterOnCursor)
bool IsAction(const TOOL_ACTION *aAction) const
Function IsAction() Tests if the event contains an action issued upon activation of the given TOOL_AC...
Definition: tool_event.cpp:67

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

Referenced by setTransitions().

◆ ZoomRedraw()

int EDA_3D_CONTROLLER::ZoomRedraw ( const TOOL_EVENT aEvent)

Definition at line 231 of file 3d_controller.cpp.

232 {
234  return 0;
235 }
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - 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

Definition at line 105 of file 3d_controller.h.

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

◆ m_camera

CCAMERA* EDA_3D_CONTROLLER::m_camera
private

Definition at line 106 of file 3d_controller.h.

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

◆ m_canvas

◆ m_menu

TOOL_MENU TOOL_INTERACTIVE::m_menu
protectedinherited

functions below are not yet implemented - their interface may change

Definition at line 108 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(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), PICKER_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), LIB_DRAWING_TOOLS::Init(), PCB_VIEWER_TOOLS::Init(), FOOTPRINT_EDITOR_TOOLS::Init(), PL_DRAWING_TOOLS::Init(), LIB_CONTROL::Init(), PCB_EDITOR_CONTROL::Init(), SCH_DRAWING_TOOLS::Init(), Init(), GERBVIEW_SELECTION_TOOL::Init(), PL_SELECTION_TOOL::Init(), DRAWING_TOOL::Init(), EE_SELECTION_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), PCB_TOOL_BASE::Init(), PL_EDIT_TOOL::Main(), LIB_MOVE_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), PCBNEW_PICKER_TOOL::Main(), Main(), PICKER_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PL_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SELECTION_TOOL::Main(), PCB_VIEWER_TOOLS::MeasureTool(), GERBVIEW_SELECTION_TOOL::MeasureTool(), LIB_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), LIB_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 107 of file 3d_controller.h.

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

◆ m_toolId

TOOL_ID TOOL_BASE::m_toolId
protectedinherited

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

Definition at line 214 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 219 of file tool_base.h.

Referenced by TOOL_INTERACTIVE::Activate(), PL_SELECTION_TOOL::AddItemsToSel(), EE_SELECTION_TOOL::AddItemsToSel(), PL_SELECTION_TOOL::AddItemToSel(), EE_SELECTION_TOOL::AddItemToSel(), SELECTION_TOOL::AddItemToSel(), SCH_EDITOR_CONTROL::AssignNetclass(), CVPCB_ASSOCIATION_TOOL::Associate(), TOOL_BASE::attachManager(), SCH_EDIT_TOOL::AutoplaceFields(), PCB_INSPECTION_TOOL::calculateSelectionRatsnest(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), PCB_INSPECTION_TOOL::ClearHighlight(), SCH_EDITOR_CONTROL::ClearHighlight(), SELECTION_TOOL::ClearSelection(), PL_SELECTION_TOOL::ClearSelection(), GERBVIEW_SELECTION_TOOL::clearSelection(), EE_SELECTION_TOOL::ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), LIB_EDIT_TOOL::Copy(), PL_EDIT_TOOL::Copy(), PAD_TOOL::copyPadSettings(), MICROWAVE_TOOL::createInductorBetween(), PCB_INSPECTION_TOOL::CrossProbePcbToSch(), COMMON_TOOLS::CursorControl(), ROUTER_TOOL::CustomTrackWidthDialog(), SCH_EDITOR_CONTROL::Cut(), LIB_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCBNEW_CONTROL::DeleteItemCursor(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), LIB_EDIT_TOOL::DoDelete(), SCH_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_INSPECTION_TOOL::doHideNet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawRectangle(), DRAWING_TOOL::drawSegment(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PCB_EDITOR_CONTROL::DrillOrigin(), LIB_EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::Duplicate(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), PCB_EDITOR_CONTROL::EditFpInFpEditor(), LIB_EDIT_TOOL::editGraphicProperties(), PAD_TOOL::EditPad(), LIB_EDIT_TOOL::editSymbolProperties(), SCH_EDITOR_CONTROL::EditWithLibEdit(), SCH_EDITOR_CONTROL::EnterSheet(), PAD_TOOL::EnumeratePads(), GLOBAL_EDIT_TOOL::ExchangeFootprints(), SELECTION_TOOL::expandConnection(), PAD_TOOL::explodePad(), SELECTION_TOOL::filterSelection(), SELECTION_TOOL::findCallback(), SCH_EDITOR_CONTROL::FindComponentAndItem(), POINT_EDITOR::finishItem(), 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(), PCBNEW_CONTROL::GridSetOrigin(), GERBVIEW_CONTROL::HighlightControl(), PCB_INSPECTION_TOOL::HighlightItem(), PCB_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), PCB_INSPECTION_TOOL::highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PCB_INSPECTION_TOOL::HighlightNetTool(), FOOTPRINT_EDITOR_TOOLS::ImportFootprint(), PL_EDIT_TOOL::ImportWorksheetContent(), LIB_EDIT_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), PCB_INSPECTION_TOOL::Init(), GLOBAL_EDIT_TOOL::Init(), PAD_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), PL_DRAWING_TOOLS::Init(), LIB_CONTROL::Init(), PL_POINT_EDITOR::Init(), POINT_EDITOR::Init(), PCB_EDITOR_CONTROL::Init(), POSITION_RELATIVE_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), EDIT_TOOL::invokeInlineRouter(), EDIT_TOOL::isInteractiveDragEnabled(), TOOL_BASE::IsToolActive(), SCH_EDITOR_CONTROL::LeaveSheet(), COMMON_CONTROL::ListHotKeys(), PCB_INSPECTION_TOOL::LocalRatsnestTool(), PL_EDIT_TOOL::Main(), CVPCB_CONTROL::Main(), LIB_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PCBNEW_PICKER_TOOL::Main(), PL_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), SELECTION_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), LIB_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), PCB_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), LIB_CONTROL::OnDeMorgan(), COMMON_TOOLS::OnGridChanged(), POINT_EDITOR::OnSelectionChange(), LIB_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), PAD_TOOL::pastePadProperties(), EDIT_TOOL::pickReferencePoint(), LIB_EDIT_TOOL::PinTable(), PCBNEW_CONTROL::placeBoardItems(), SCH_DRAWING_TOOLS::PlaceComponent(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), PCB_EDITOR_CONTROL::PlaceModule(), PCB_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PCBNEW_CONTROL::Print(), GERBVIEW_CONTROL::Print(), LIB_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), EE_SELECTION_TOOL::RebuildSelection(), LIB_EDIT_TOOL::Redo(), SCH_EDITOR_CONTROL::Redo(), SCH_EDIT_TOOL::RefreshSymbolFromLibrary(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), POINT_EDITOR::removeCorner(), PL_SELECTION_TOOL::RemoveItemFromSel(), EE_SELECTION_TOOL::RemoveItemFromSel(), SELECTION_TOOL::RemoveItemFromSel(), PL_SELECTION_TOOL::RemoveItemsFromSel(), EE_SELECTION_TOOL::RemoveItemsFromSel(), SCH_EDIT_TOOL::RepeatDrawItem(), LIB_DRAWING_TOOLS::RepeatDrawItem(), EE_SELECTION_TOOL::RequestSelection(), SELECTION_TOOL::RequestSelection(), COMMON_TOOLS::Reset(), PNS::TOOL_BASE::Reset(), Reset(), COMMON_TOOLS::ResetLocalCoords(), TOOL_INTERACTIVE::resetTransitions(), LIB_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), TOOL_INTERACTIVE::RunMainStack(), DRC::RunTests(), EE_SELECTION_TOOL::SelectConnection(), PCB_TOOL_BASE::selection(), COMMON_TOOLS::SelectionTool(), GERBVIEW_SELECTION_TOOL::SelectItem(), GERBVIEW_SELECTION_TOOL::SelectItems(), SELECTION_TOOL::SelectItems(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectMultiple(), SELECTION_TOOL::selectNet(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), EE_SELECTION_TOOL::SelectPoint(), SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), SELECTION_TOOL::selectSameSheet(), SELECTION_TOOL::selectSheetContents(), DRAWING_TOOL::SetAnchor(), TOOL_INTERACTIVE::SetContextMenu(), DRC::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), ToggleVisibility(), PCB_EDITOR_CONTROL::TrackWidthDec(), PCB_EDITOR_CONTROL::TrackWidthInc(), LIB_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), LIB_EDIT_TOOL::Undo(), SCH_EDITOR_CONTROL::Undo(), GERBVIEW_SELECTION_TOOL::UnselectItem(), GERBVIEW_SELECTION_TOOL::UnselectItems(), SELECTION_TOOL::UnselectItems(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCBNEW_CONTROL::UpdateMessagePanel(), PCB_INSPECTION_TOOL::UpdateSelectionRatsnest(), PCB_EDITOR_CONTROL::ViaSizeDec(), PCB_EDITOR_CONTROL::ViaSizeInc(), TOOL_INTERACTIVE::Wait(), PCB_EDITOR_CONTROL::ZoneDuplicate(), and PCB_EDITOR_CONTROL::ZoneMerge().

◆ m_toolName

std::string TOOL_BASE::m_toolName
protectedinherited

Name of the tool.

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

Definition at line 218 of file tool_base.h.

Referenced by TOOL_BASE::GetName().

◆ m_type

TOOL_TYPE TOOL_BASE::m_type
protectedinherited

Stores the type of the tool.

Definition at line 211 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: