KiCad PCB EDA Suite
PANEL_PREVIEW_3D_MODEL Class Reference

#include <panel_preview_3d_model.h>

Inheritance diagram for PANEL_PREVIEW_3D_MODEL:
EDA_3D_BOARD_HOLDER TOOLS_HOLDER PANEL_PREVIEW_3D_MODEL_BASE

Public Member Functions

 PANEL_PREVIEW_3D_MODEL (wxWindow *aParent, PCB_BASE_FRAME *aFrame, FOOTPRINT *aFootprint, std::vector< FP_3DMODEL > *aParentModelList)
 
 ~PANEL_PREVIEW_3D_MODEL ()
 
void OnMenuEvent (wxMenuEvent &aEvent)
 The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu events aren't captured by the menus themselves. More...
 
wxWindow * GetToolCanvas () const override
 Canvas access. More...
 
BOARD_ADAPTERGetAdapter () override
 
CAMERAGetCurrentCamera () override
 
void SetSelectedModel (int idx)
 Set the currently selected index in the model list so that the scale/rotation/offset controls can be updated. More...
 
void UpdateDummyFootprint (bool aRelaodRequired=true)
 Copy shapes from the current shape list which are flagged for preview to the copy of footprint that is on the preview dummy board. More...
 
TOOL_MANAGERGetToolManager () const
 Return the MVC controller. More...
 
virtual void RegisterUIUpdateHandler (const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
 Register an action's update conditions with the UI layer to allow the UI to appropriately display the state of its controls. More...
 
virtual void RegisterUIUpdateHandler (int aID, const ACTION_CONDITIONS &aConditions)
 Register a UI update handler for the control with ID aID. More...
 
virtual void UnregisterUIUpdateHandler (const TOOL_ACTION &aAction)
 Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler. More...
 
virtual void UnregisterUIUpdateHandler (int aID)
 Unregister a UI handler for a given ID that was registered using RegisterUIUpdateHandler. More...
 
virtual SELECTIONGetCurrentSelection ()
 Get the current selection from the canvas area. More...
 
virtual void PushTool (const std::string &actionName)
 NB: the definition of "tool" is different at the user level. More...
 
virtual void PopTool (const std::string &actionName)
 
bool ToolStackIsEmpty ()
 
std::string CurrentToolName () const
 
bool IsCurrentTool (const TOOL_ACTION &aAction) const
 
virtual void DisplayToolMsg (const wxString &msg)
 
virtual void ShowChangedLanguage ()
 
bool GetDoImmediateActions () const
 Indicate that hotkeys should perform an immediate action even if another tool is currently active. More...
 
MOUSE_DRAG_ACTION GetDragAction () const
 Indicates whether a drag should draw a selection rectangle or drag selected (or unselected) objects. More...
 
bool GetMoveWarpsCursor () const
 Indicate that a move operation should warp the mouse pointer to the origin of the move object. More...
 
virtual void CommonSettingsChanged (bool aEnvVarsChanged, bool aTextVarsChanged)
 Notification event that some of the common (suite-wide) settings have changed. More...
 
virtual void RefreshCanvas ()
 
virtual wxString ConfigBaseName ()
 

Public Attributes

wxTextCtrl * yoff
 

Protected Attributes

TOOL_MANAGERm_toolManager
 
ACTIONSm_actions
 
TOOL_DISPATCHERm_toolDispatcher
 
SELECTION m_dummySelection
 
std::vector< std::string > m_toolStack
 
bool m_immediateActions
 
MOUSE_DRAG_ACTION m_dragAction
 
bool m_moveWarpsCursor
 
wxStaticText * m_staticText1
 
wxTextCtrl * xscale
 
wxSpinButton * m_spinXscale
 
wxStaticText * m_staticText2
 
wxTextCtrl * yscale
 
wxSpinButton * m_spinYscale
 
wxStaticText * m_staticText3
 
wxTextCtrl * zscale
 
wxSpinButton * m_spinZscale
 
wxStaticText * m_staticText11
 
wxTextCtrl * xrot
 
wxSpinButton * m_spinXrot
 
wxStaticText * m_staticText21
 
wxTextCtrl * yrot
 
wxSpinButton * m_spinYrot
 
wxStaticText * m_staticText31
 
wxTextCtrl * zrot
 
wxSpinButton * m_spinZrot
 
wxStaticText * m_staticText12
 
wxTextCtrl * xoff
 
wxSpinButton * m_spinXoffset
 
wxStaticText * m_staticText22
 
wxSpinButton * m_spinYoffset
 
wxStaticText * m_staticText32
 
wxTextCtrl * zoff
 
wxSpinButton * m_spinZoffset
 
wxSlider * m_opacity
 
wxBoxSizer * m_SizerPanelView
 
wxBitmapButton * m_bpvISO
 
wxBitmapButton * m_bpvLeft
 
wxBitmapButton * m_bpvRight
 
wxBitmapButton * m_bpvFront
 
wxBitmapButton * m_bpvBack
 
wxBitmapButton * m_bpvTop
 
wxBitmapButton * m_bpvBottom
 
wxBitmapButton * m_bpUpdate
 

Private Member Functions

void loadSettings ()
 Load 3D relevant settings from the user configuration. More...
 
void updateOrientation (wxCommandEvent &event) override
 It will receive the events from editing the fields. More...
 
void onMouseWheelScale (wxMouseEvent &event) override
 
void onMouseWheelRot (wxMouseEvent &event) override
 
void onMouseWheelOffset (wxMouseEvent &event) override
 
void onIncrementRot (wxSpinEvent &event) override
 
void onDecrementRot (wxSpinEvent &event) override
 
void onIncrementScale (wxSpinEvent &event) override
 
void onDecrementScale (wxSpinEvent &event) override
 
void onIncrementOffset (wxSpinEvent &event) override
 
void onDecrementOffset (wxSpinEvent &event) override
 
void onOpacitySlider (wxCommandEvent &event) override
 
void doIncrementScale (wxSpinEvent &aEvent, double aSign)
 
void doIncrementRotation (wxSpinEvent &aEvent, double aSign)
 
void doIncrementOffset (wxSpinEvent &aEvent, double aSign)
 
wxString formatScaleValue (double aValue)
 
wxString formatRotationValue (double aValue)
 
wxString formatOffsetValue (double aValue)
 
void View3DISO (wxCommandEvent &event) override
 
void View3DLeft (wxCommandEvent &event) override
 
void View3DFront (wxCommandEvent &event) override
 
void View3DTop (wxCommandEvent &event) override
 
void View3DUpdate (wxCommandEvent &event) override
 
void View3DRight (wxCommandEvent &event) override
 
void View3DBack (wxCommandEvent &event) override
 
void View3DBottom (wxCommandEvent &event) override
 

Private Attributes

EDA_3D_CANVASm_previewPane
 
WX_INFOBARm_infobar
 
BOARD_ADAPTER m_boardAdapter
 
CAMERAm_currentCamera
 
TRACK_BALL m_trackBallCamera
 
BOARDm_dummyBoard
 
FOOTPRINTm_dummyFootprint
 
std::vector< FP_3DMODEL > * m_parentModelList
 
int m_selected
 
EDA_UNITS m_userUnits
 Index into m_parentInfoList. More...
 

Detailed Description

Definition at line 74 of file panel_preview_3d_model.h.

Constructor & Destructor Documentation

◆ PANEL_PREVIEW_3D_MODEL()

PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL ( wxWindow *  aParent,
PCB_BASE_FRAME aFrame,
FOOTPRINT aFootprint,
std::vector< FP_3DMODEL > *  aParentModelList 
)

Definition at line 44 of file panel_preview_3d_model.cpp.

46  :
47  PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ),
48  m_previewPane( nullptr ),
49  m_infobar( nullptr ),
53 {
54  m_userUnits = aFrame->GetUserUnits();
55 
56  m_dummyBoard = new BOARD();
57 
58  // This board will only be used to hold a footprint for viewing
60 
61  m_selected = -1;
62 
63  // Set the bitmap of 3D view buttons:
64  m_bpvTop->SetBitmap( KiBitmap( BITMAPS::axis3d_top ) );
65  m_bpvFront->SetBitmap( KiBitmap( BITMAPS::axis3d_front ) );
66  m_bpvBack->SetBitmap( KiBitmap( BITMAPS::axis3d_back ) );
67  m_bpvLeft->SetBitmap( KiBitmap( BITMAPS::axis3d_left ) );
68  m_bpvRight->SetBitmap( KiBitmap( BITMAPS::axis3d_right ) );
70  m_bpvISO->SetBitmap( KiBitmap( BITMAPS::ortho ) );
71  m_bpUpdate->SetBitmap( KiBitmap( BITMAPS::reload ) );
72 
73  // Set the min and max values of spin buttons (mandatory on Linux)
74  // They are not used, so they are set to min and max 32 bits int values
75  // (the min and max values supported by a wxSpinButton)
76  // It avoids blocking the up or down arrows when reaching this limit after
77  // a few clicks.
78  wxSpinButton* spinButtonList[] =
79  {
83  };
84 
85  for( wxSpinButton* button : spinButtonList )
86  button->SetRange(INT_MIN, INT_MAX );
87 
88  m_parentModelList = aParentModelList;
89 
90  m_dummyFootprint = new FOOTPRINT( *aFootprint );
92 
93  // Create the 3D canvas
94  m_previewPane = new EDA_3D_CANVAS( this,
97  aFrame->Prj().Get3DCacheManager() );
98 
100  loadSettings();
101 
104 
105  // Create the manager
107  m_toolManager->SetEnvironment( m_dummyBoard, nullptr, nullptr, nullptr, this );
108 
109  m_actions = new EDA_3D_ACTIONS();
112 
113  // Register tools
116 
117  // Run the viewer control tool, it is supposed to be always active
118  m_toolManager->InvokeTool( "3DViewer.Control" );
119 
120  m_infobar = new WX_INFOBAR( this );
122 
123  m_SizerPanelView->Add( m_infobar, 0, wxEXPAND, 0 );
124  m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
125 
126  for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
127  {
128  Connect( eventType, wxMenuEventHandler( PANEL_PREVIEW_3D_MODEL::OnMenuEvent ), nullptr,
129  this );
130  }
131 
132 #ifdef __WXOSX__
133  // Call layout once to get the proper button sizes after the bitmaps have been set
134  Layout();
135 
136  // The rounded-button style used has a small border on the left/right sides.
137  // This is automatically fixed in wx for buttons with a bitmap < 20, but not
138  // when the bitmap is set to be 26x26.
139  wxSize borderFix = wxSize( 4, 4 );
140 
141  m_bpvTop->SetMinSize( m_bpvTop->GetSize() + borderFix );
142  m_bpvFront->SetMinSize( m_bpvFront->GetSize() + borderFix );
143  m_bpvBack->SetMinSize( m_bpvBack->GetSize() + borderFix );
144  m_bpvLeft->SetMinSize( m_bpvLeft->GetSize() + borderFix );
145  m_bpvRight->SetMinSize( m_bpvRight->GetSize() + borderFix );
146  m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix );
147  m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix );
148  m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix );
149 #endif
150 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
Set the status of a flag.
EDA_3D_ACTIONS.
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:48
std::vector< FP_3DMODEL > * m_parentModelList
static const int * GetAttributesList(ANTIALIASING_MODE aAntiAliasingMode)
Get a list of attributes to pass to wxGLCanvas.
bool InvokeTool(TOOL_ID aToolId)
Call a tool by sending a tool activation event to tool of given ID.
void SetBoard(BOARD *aBoard) noexcept
Set current board to be rendered.
Master controller class:
Definition: tool_manager.h:54
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Definition: board.cpp:608
PANEL_PREVIEW_3D_MODEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
void SetInfoBar(WX_INFOBAR *aInfoBar)
Definition: eda_3d_canvas.h:79
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
EDA_3D_CONTROLLER.
ACTIONS * m_actions
Definition: tools_holder.h:159
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
TOOL_DISPATCHER * m_toolDispatcher
Definition: tools_holder.h:160
A modified version of the wxInfoBar class that allows us to:
Definition: infobar.h:73
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:158
void loadSettings()
Load 3D relevant settings from the user configuration.
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:191
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, APP_SETTINGS_BASE *aSettings, TOOLS_HOLDER *aFrame)
Set the work environment (model, view, view controls and the parent window).
void OnMenuEvent(wxMenuEvent &aEvent)
The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu events aren't ...
void InitTools()
Initializes all registered tools.
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
Definition: board_adapter.h:62
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
void SetBoardUse(BOARD_USE aUse)
Set what the board is going to be used for.
Definition: board.h:204
void RegisterTool(TOOL_BASE *aTool)
Add a tool to the manager set and sets it up.

References AA_8X, BOARD::Add(), axis3d_back, axis3d_bottom, axis3d_front, axis3d_left, axis3d_right, axis3d_top, FL_HIGHLIGHT_ROLLOVER_ITEM, FL_USE_SELECTION, FPHOLDER, OGL_ATT_LIST::GetAttributesList(), EDA_BASE_FRAME::GetUserUnits(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::InvokeTool(), KiBitmap(), loadSettings(), TOOLS_HOLDER::m_actions, m_boardAdapter, PANEL_PREVIEW_3D_MODEL_BASE::m_bpUpdate, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvBack, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvBottom, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvFront, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvISO, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvLeft, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvRight, PANEL_PREVIEW_3D_MODEL_BASE::m_bpvTop, m_currentCamera, m_dummyBoard, m_dummyFootprint, m_infobar, m_parentModelList, m_previewPane, m_selected, PANEL_PREVIEW_3D_MODEL_BASE::m_SizerPanelView, PANEL_PREVIEW_3D_MODEL_BASE::m_spinXoffset, PANEL_PREVIEW_3D_MODEL_BASE::m_spinXrot, PANEL_PREVIEW_3D_MODEL_BASE::m_spinXscale, PANEL_PREVIEW_3D_MODEL_BASE::m_spinYoffset, PANEL_PREVIEW_3D_MODEL_BASE::m_spinYrot, PANEL_PREVIEW_3D_MODEL_BASE::m_spinYscale, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZoffset, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZrot, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZscale, TOOLS_HOLDER::m_toolDispatcher, TOOLS_HOLDER::m_toolManager, m_userUnits, OnMenuEvent(), ortho, KIWAY_HOLDER::Prj(), TOOL_MANAGER::RegisterTool(), reload, BOARD_ADAPTER::SetBoard(), BOARD::SetBoardUse(), TOOL_MANAGER::SetEnvironment(), EDA_3D_CANVAS::SetEventDispatcher(), BOARD_ADAPTER::SetFlag(), and EDA_3D_CANVAS::SetInfoBar().

◆ ~PANEL_PREVIEW_3D_MODEL()

PANEL_PREVIEW_3D_MODEL::~PANEL_PREVIEW_3D_MODEL ( )

Definition at line 153 of file panel_preview_3d_model.cpp.

154 {
155  delete m_dummyBoard;
156  delete m_previewPane;
157 }

References m_dummyBoard, and m_previewPane.

Member Function Documentation

◆ CommonSettingsChanged()

void TOOLS_HOLDER::CommonSettingsChanged ( bool  aEnvVarsChanged,
bool  aTextVarsChanged 
)
virtualinherited

Notification event that some of the common (suite-wide) settings have changed.

Update hotkeys, preferences, etc.

Reimplemented in SCH_EDIT_FRAME, PCB_EDIT_FRAME, EDA_BASE_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, SYMBOL_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, SCH_BASE_FRAME, EDA_DRAW_FRAME, FOOTPRINT_VIEWER_FRAME, KICAD_MANAGER_FRAME, PL_EDITOR_FRAME, EDA_3D_VIEWER_FRAME, and SYMBOL_VIEWER_FRAME.

Definition at line 128 of file tools_holder.cpp.

129 {
130  if( GetToolManager() )
132 
133  COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
134 
136  m_dragAction = settings->m_Input.drag_left;
138 }
MOUSE_DRAG_ACTION drag_left
void UpdateHotKeys(bool aFullUpdate)
Optionally read the hotkey config files and then rebuilds the internal hotkey maps.
bool m_immediateActions
Definition: tools_holder.h:171
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
bool m_moveWarpsCursor
Definition: tools_holder.h:177
MOUSE_DRAG_ACTION m_dragAction
Definition: tools_holder.h:175
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:199
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54

References COMMON_SETTINGS::INPUT::drag_left, TOOL_MANAGER::GetActionManager(), TOOLS_HOLDER::GetToolManager(), COMMON_SETTINGS::INPUT::immediate_actions, TOOLS_HOLDER::m_dragAction, TOOLS_HOLDER::m_immediateActions, COMMON_SETTINGS::m_Input, TOOLS_HOLDER::m_moveWarpsCursor, Pgm(), ACTION_MANAGER::UpdateHotKeys(), and COMMON_SETTINGS::INPUT::warp_mouse_on_move.

Referenced by EDA_BASE_FRAME::CommonSettingsChanged(), and EDA_BASE_FRAME::LoadWindowSettings().

◆ ConfigBaseName()

virtual wxString TOOLS_HOLDER::ConfigBaseName ( )
inlinevirtualinherited

Reimplemented in EDA_BASE_FRAME.

Definition at line 155 of file tools_holder.h.

155 { return wxEmptyString; }

Referenced by ACTION_MANAGER::UpdateHotKeys().

◆ CurrentToolName()

std::string TOOLS_HOLDER::CurrentToolName ( ) const
inherited

Definition at line 100 of file tools_holder.cpp.

101 {
102  if( m_toolStack.empty() )
103  return ACTIONS::selectionTool.GetName();
104  else
105  return m_toolStack.back();
106 }
std::vector< std::string > m_toolStack
Definition: tools_holder.h:164
static TOOL_ACTION selectionTool
Definition: actions.h:153

References TOOLS_HOLDER::m_toolStack, and ACTIONS::selectionTool.

Referenced by TOOL_MANAGER::processEvent(), and TOOLS_HOLDER::ShowChangedLanguage().

◆ DisplayToolMsg()

virtual void TOOLS_HOLDER::DisplayToolMsg ( const wxString &  msg)
inlinevirtualinherited

Reimplemented in EDA_DRAW_FRAME.

Definition at line 121 of file tools_holder.h.

121 {};

Referenced by TOOLS_HOLDER::PopTool(), TOOLS_HOLDER::PushTool(), and TOOLS_HOLDER::ShowChangedLanguage().

◆ doIncrementOffset()

void PANEL_PREVIEW_3D_MODEL::doIncrementOffset ( wxSpinEvent &  aEvent,
double  aSign 
)
private

Definition at line 398 of file panel_preview_3d_model.cpp.

399 {
400  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
401 
402  wxTextCtrl * textCtrl = xoff;
403 
404  if( spinCtrl == m_spinYoffset )
405  textCtrl = yoff;
406  else if( spinCtrl == m_spinZoffset )
407  textCtrl = zoff;
408 
409  double step_mm = OFFSET_INCREMENT_MM;
410  double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
411 
413  {
414  step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
415  }
416 
417  curr_value_mm += ( step_mm * aSign );
418  curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
419  curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
420 
421  textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
422 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
static constexpr double IU_PER_MM
Mock up a conversion function.
wxString formatOffsetValue(double aValue)
#define OFFSET_INCREMENT_MM
#define OFFSET_INCREMENT_MIL
#define MAX_OFFSET
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307

References DoubleValueFromString(), formatOffsetValue(), INCHES, IU_PER_MM, PANEL_PREVIEW_3D_MODEL_BASE::m_spinYoffset, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZoffset, m_userUnits, MAX_OFFSET, MILS, OFFSET_INCREMENT_MIL, OFFSET_INCREMENT_MM, PANEL_PREVIEW_3D_MODEL_BASE::xoff, PANEL_PREVIEW_3D_MODEL_BASE::yoff, and PANEL_PREVIEW_3D_MODEL_BASE::zoff.

Referenced by onDecrementOffset(), and onIncrementOffset().

◆ doIncrementRotation()

void PANEL_PREVIEW_3D_MODEL::doIncrementRotation ( wxSpinEvent &  aEvent,
double  aSign 
)
private

Definition at line 378 of file panel_preview_3d_model.cpp.

379 {
380  wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
381  wxTextCtrl* textCtrl = xrot;
382 
383  if( spinCtrl == m_spinYrot )
384  textCtrl = yrot;
385  else if( spinCtrl == m_spinZrot )
386  textCtrl = zrot;
387 
388  double curr_value = DoubleValueFromString( EDA_UNITS::DEGREES, textCtrl->GetValue() ) / 10.0;
389 
390  curr_value += ( ROTATION_INCREMENT * aSign );
391  curr_value = std::max( -MAX_ROTATION, curr_value );
392  curr_value = std::min( curr_value, MAX_ROTATION );
393 
394  textCtrl->SetValue( formatRotationValue( curr_value ) );
395 }
#define ROTATION_INCREMENT
wxString formatRotationValue(double aValue)
#define MAX_ROTATION
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307

References DEGREES, DoubleValueFromString(), formatRotationValue(), PANEL_PREVIEW_3D_MODEL_BASE::m_spinYrot, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZrot, MAX_ROTATION, ROTATION_INCREMENT, PANEL_PREVIEW_3D_MODEL_BASE::xrot, PANEL_PREVIEW_3D_MODEL_BASE::yrot, and PANEL_PREVIEW_3D_MODEL_BASE::zrot.

Referenced by onDecrementRot(), and onIncrementRot().

◆ doIncrementScale()

void PANEL_PREVIEW_3D_MODEL::doIncrementScale ( wxSpinEvent &  aEvent,
double  aSign 
)
private

Definition at line 357 of file panel_preview_3d_model.cpp.

358 {
359  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
360 
361  wxTextCtrl * textCtrl = xscale;
362 
363  if( spinCtrl == m_spinYscale )
364  textCtrl = yscale;
365  else if( spinCtrl == m_spinZscale )
366  textCtrl = zscale;
367 
368  double curr_value = DoubleValueFromString( EDA_UNITS::UNSCALED, textCtrl->GetValue() );
369 
370  curr_value += ( SCALE_INCREMENT * aSign );
371  curr_value = std::max( 1/MAX_SCALE, curr_value );
372  curr_value = std::min( curr_value, MAX_SCALE );
373 
374  textCtrl->SetValue( formatScaleValue( curr_value ) );
375 }
wxString formatScaleValue(double aValue)
#define MAX_SCALE
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307
#define SCALE_INCREMENT

References DoubleValueFromString(), formatScaleValue(), PANEL_PREVIEW_3D_MODEL_BASE::m_spinYscale, PANEL_PREVIEW_3D_MODEL_BASE::m_spinZscale, MAX_SCALE, SCALE_INCREMENT, UNSCALED, PANEL_PREVIEW_3D_MODEL_BASE::xscale, PANEL_PREVIEW_3D_MODEL_BASE::yscale, and PANEL_PREVIEW_3D_MODEL_BASE::zscale.

Referenced by onDecrementScale(), and onIncrementScale().

◆ formatOffsetValue()

wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue ( double  aValue)
private

Definition at line 259 of file panel_preview_3d_model.cpp.

260 {
261  // Convert from internal units (mm) to user units
263  aValue /= 25.4;
264  else if( m_userUnits == EDA_UNITS::MILS )
265  aValue /= 25.4 / 1e3;
266 
267  return wxString::Format( wxT( "%.6f %s" ),
268  aValue,
270 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:424
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format(), GetAbbreviatedUnitsLabel(), INCHES, m_userUnits, and MILS.

Referenced by doIncrementOffset(), onMouseWheelOffset(), and SetSelectedModel().

◆ formatRotationValue()

wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue ( double  aValue)
private

Definition at line 251 of file panel_preview_3d_model.cpp.

252 {
253  return wxString::Format( wxT( "%.2f %s" ),
254  aValue,
256 }
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:424
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References DEGREES, Format(), and GetAbbreviatedUnitsLabel().

Referenced by doIncrementRotation(), onMouseWheelRot(), and SetSelectedModel().

◆ formatScaleValue()

wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue ( double  aValue)
private

Definition at line 244 of file panel_preview_3d_model.cpp.

245 {
246  return wxString::Format( wxT( "%.4f" ),
247  aValue );
248 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References Format().

Referenced by doIncrementScale(), onMouseWheelScale(), and SetSelectedModel().

◆ GetAdapter()

BOARD_ADAPTER& PANEL_PREVIEW_3D_MODEL::GetAdapter ( )
inlineoverridevirtual

Implements EDA_3D_BOARD_HOLDER.

Definition at line 90 of file panel_preview_3d_model.h.

90 { return m_boardAdapter; }

References m_boardAdapter.

◆ GetCurrentCamera()

CAMERA& PANEL_PREVIEW_3D_MODEL::GetCurrentCamera ( )
inlineoverridevirtual

Implements EDA_3D_BOARD_HOLDER.

Definition at line 91 of file panel_preview_3d_model.h.

References m_currentCamera.

◆ GetCurrentSelection()

virtual SELECTION& TOOLS_HOLDER::GetCurrentSelection ( )
inlinevirtualinherited

Get the current selection from the canvas area.

Returns
the current selection.

Reimplemented in PCB_EDIT_FRAME, GERBVIEW_FRAME, SYMBOL_VIEWER_FRAME, SCH_EDIT_FRAME, SYMBOL_EDIT_FRAME, DISPLAY_FOOTPRINTS_FRAME, PL_EDITOR_FRAME, FOOTPRINT_VIEWER_FRAME, and FOOTPRINT_EDIT_FRAME.

Definition at line 101 of file tools_holder.h.

102  {
103  return m_dummySelection;
104  }
SELECTION m_dummySelection
Definition: tools_holder.h:162

References TOOLS_HOLDER::m_dummySelection.

Referenced by EDA_BASE_FRAME::HandleUpdateUIEvent(), and ACTION_MANAGER::RunHotKey().

◆ GetDoImmediateActions()

bool TOOLS_HOLDER::GetDoImmediateActions ( ) const
inlineinherited

Indicate that hotkeys should perform an immediate action even if another tool is currently active.

If false, the first hotkey should select the relevant tool.

Definition at line 129 of file tools_holder.h.

129 { return m_immediateActions; }
bool m_immediateActions
Definition: tools_holder.h:171

References TOOLS_HOLDER::m_immediateActions.

◆ GetDragAction()

MOUSE_DRAG_ACTION TOOLS_HOLDER::GetDragAction ( ) const
inlineinherited

Indicates whether a drag should draw a selection rectangle or drag selected (or unselected) objects.

Definition at line 135 of file tools_holder.h.

135 { return m_dragAction; }
MOUSE_DRAG_ACTION m_dragAction
Definition: tools_holder.h:175

References TOOLS_HOLDER::m_dragAction.

Referenced by PL_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), and PCB_SELECTION_TOOL::Main().

◆ GetMoveWarpsCursor()

bool TOOLS_HOLDER::GetMoveWarpsCursor ( ) const
inlineinherited

Indicate that a move operation should warp the mouse pointer to the origin of the move object.

This improves snapping, but some users are allergic to mouse warping.

Definition at line 141 of file tools_holder.h.

141 { return m_moveWarpsCursor; }
bool m_moveWarpsCursor
Definition: tools_holder.h:177

References TOOLS_HOLDER::m_moveWarpsCursor.

Referenced by EDIT_TOOL::doMoveSelection(), ROUTER_TOOL::InlineDrag(), SYMBOL_EDITOR_MOVE_TOOL::Main(), and SCH_MOVE_TOOL::Main().

◆ GetToolCanvas()

wxWindow* PANEL_PREVIEW_3D_MODEL::GetToolCanvas ( ) const
inlineoverridevirtual

Canvas access.

Implements TOOLS_HOLDER.

Definition at line 88 of file panel_preview_3d_model.h.

88 { return m_previewPane; }

References m_previewPane.

◆ GetToolManager()

TOOL_MANAGER* TOOLS_HOLDER::GetToolManager ( ) const
inlineinherited

Return the MVC controller.

Definition at line 54 of file tools_holder.h.

54 { return m_toolManager; }
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:158

References TOOLS_HOLDER::m_toolManager.

Referenced by PROJECT_TREE_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), SYMBOL_EDITOR_CONTROL::AddSymbolToSchematic(), APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), BOARD_COMMIT::BOARD_COMMIT(), FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList(), TOOLS_HOLDER::CommonSettingsChanged(), DIALOG_FOOTPRINT_CHECKER::deleteAllMarkers(), DIALOG_ERC::deleteAllMarkers(), DIALOG_DRC::deleteAllMarkers(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), SIM_PLOT_FRAME::doCloseWindow(), DIALOG_GLOBAL_DELETION::DoGlobalDeletions(), SCH_FIELD::DoHypertextMenu(), DRAWING_TOOL::DrawVia(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), GERBVIEW_FRAME::GERBVIEW_FRAME(), FP_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetContextMenuTool(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), SCH_NAVIGATE_TOOL::HypertextCommand(), DIALOG_PAD_PROPERTIES::initValues(), ROUTER_TOOL::InlineBreakTrack(), EDA_3D_VIEWER_FRAME::InstallPreferences(), KICAD_MANAGER_FRAME::InstallPreferences(), PL_EDITOR_FRAME::InstallPreferences(), FOOTPRINT_EDIT_FRAME::InstallPreferences(), SYMBOL_EDIT_FRAME::InstallPreferences(), GERBVIEW_FRAME::InstallPreferences(), PCB_EDIT_FRAME::InstallPreferences(), SCH_EDIT_FRAME::InstallPreferences(), PCB_EDIT_FRAME::LoadProjectSettings(), FOOTPRINT_EDIT_FRAME::LoadSettings(), SYMBOL_EDIT_FRAME::LoadSymbol(), PROPERTIES_FRAME::OnAcceptPrms(), DIALOG_DRC::OnActivateDlg(), DIALOG_FOOTPRINT_CHECKER::OnCancelClick(), DIALOG_DRC::OnCancelClick(), DIALOG_INSPECTOR::onCellClicked(), DIALOG_ERC::OnCloseErcDialog(), DIALOG_FOOTPRINT_CHECKER::OnDeleteOneClick(), DIALOG_DRC::OnDeleteOneClick(), DIALOG_ABOUT::onDonateClick(), DIALOG_DRC::OnDRCItemRClick(), DIALOG_ERC::OnERCItemSelected(), DIALOG_CONSTRAINTS_REPORTER::OnErrorLinkClicked(), KICAD_MANAGER_FRAME::OnIdle(), FOOTPRINTS_LISTBOX::OnLeftDClick(), APPEARANCE_CONTROLS::onNetclassContextMenu(), APPEARANCE_CONTROLS::onNetContextMenu(), PANEL_PCBNEW_ACTION_PLUGINS::OnOpenDirectoryButtonClick(), SIM_PLOT_FRAME::onProbe(), PANEL_PCBNEW_ACTION_PLUGINS::OnReloadButtonClick(), DIALOG_ABOUT::onReportBug(), DIALOG_PLOT::onRunDRC(), DIALOG_DRC::OnRunDRCClick(), HIERARCHY_NAVIG_DLG::onSelectSheetPath(), SCH_EDIT_FRAME::onSize(), SYMBOL_TREE_PANE::onSymbolSelected(), DIALOG_SYMBOL_FIELDS_TABLE::OnTableCellClick(), SIM_PLOT_FRAME::onTune(), PANEL_KICAD_LAUNCHER::PANEL_KICAD_LAUNCHER(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), DIALOG_UPDATE_PCB::PerformUpdate(), DIALOG_PLOT::Plot(), TOOLS_HOLDER::PopTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), FOOTPRINT_WIZARD_FRAME::PythonPluginsReload(), Refresh(), PL_EDITOR_FRAME::RollbackFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), PCB_EDIT_FRAME::SaveProjectSettings(), FOOTPRINT_EDIT_FRAME::SaveSettings(), EDA_3D_VIEWER_FRAME::SaveSettings(), DIALOG_FIND::search(), CVPCB_MAINFRAME::setupEventHandlers(), APPEARANCE_CONTROLS::showNetclass(), SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME(), DIALOG_GRID_SETTINGS::TransferDataFromWindow(), PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataFromWindow(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow(), DIALOG_SYMBOL_PROPERTIES::TransferDataFromWindow(), DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow(), DIALOG_PAD_PROPERTIES::TransferDataFromWindow(), DIALOG_LIB_TEXT_PROPERTIES::TransferDataToWindow(), PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), EDA_DRAW_FRAME::UpdateMsgPanel(), NET_GRID_TABLE::updateNetVisibility(), DIALOG_NETLIST_IMPORT::~DIALOG_NETLIST_IMPORT(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().

◆ IsCurrentTool()

bool TOOLS_HOLDER::IsCurrentTool ( const TOOL_ACTION aAction) const
inherited

Definition at line 109 of file tools_holder.cpp.

110 {
111  if( m_toolStack.empty() )
112  return &aAction == &ACTIONS::selectionTool;
113  else
114  return m_toolStack.back() == aAction.GetName();
115 }
std::vector< std::string > m_toolStack
Definition: tools_holder.h:164
static TOOL_ACTION selectionTool
Definition: actions.h:153
const std::string & GetName() const
Return name of the action.
Definition: tool_action.h:101

References TOOL_ACTION::GetName(), TOOLS_HOLDER::m_toolStack, and ACTIONS::selectionTool.

Referenced by SCH_EDIT_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), and EDITOR_CONDITIONS::toolFunc().

◆ loadSettings()

void PANEL_PREVIEW_3D_MODEL::loadSettings ( )
private

Load 3D relevant settings from the user configuration.

Definition at line 169 of file panel_preview_3d_model.cpp.

170 {
171  wxCHECK_RET( m_previewPane, wxT( "Cannot load settings to null canvas" ) );
172 
173  COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
174 
175  const DPI_SCALING dpi{ settings, this };
176  m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
177 
178  // TODO(JE) use all control options
180 
181  COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
182 
183  if( colors )
184  {
185  auto set =
186  [] ( const COLOR4D& aColor, SFVEC4F& aTarget )
187  {
188  aTarget.r = aColor.r;
189  aTarget.g = aColor.g;
190  aTarget.b = aColor.b;
191  aTarget.a = aColor.a;
192  };
193 
203  }
204 
205  EDA_3D_VIEWER_SETTINGS* cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
206 
207  if( cfg )
208  {
211  m_boardAdapter.SetMaterialMode( static_cast<MATERIAL_MODE>( cfg->m_Render.material_mode ) );
212 
216  }
217 }
SFVEC4F m_SilkScreenColorBot
in realistic mode: SilkScreen color ( bot )
glm::vec4 SFVEC4F
Definition: xv3d_types.h:46
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
Set the status of a flag.
SFVEC4F m_SolderMaskColorTop
in realistic mode: solder mask color ( top )
void SetProjectionMode(int aMode)
SFVEC4F m_BoardBodyColor
in realistic mode: FR4 board color
SFVEC4F m_SolderPasteColor
in realistic mode: solder paste color
double g
Green component.
Definition: color4d.h:385
SFVEC4F m_SolderMaskColorBot
in realistic mode: solder mask color ( bot )
void SetAnimationEnabled(bool aEnable)
Enable or disable camera animation when switching to a pre-defined view.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:106
Class to handle configuration and automatic determination of the DPI scale to use for canvases.
Definition: dpi_scaling.h:36
double b
Blue component.
Definition: color4d.h:386
double a
Alpha component.
Definition: color4d.h:387
SFVEC4F m_BgColorTop
background top color
void SetMaterialMode(MATERIAL_MODE aMaterialMode) noexcept
SFVEC4F m_BgColorBot
background bottom color
void SetMovingSpeedMultiplier(int aMultiplier)
Set the camera animation moving speed multiplier option.
void SetRenderEngine(RENDER_ENGINE aRenderEngine) noexcept
COLOR4D GetColor(int aLayer) const
SFVEC4F m_CopperColor
in realistic mode: copper color
void SetScaleFactor(double aFactor)
Set the canvas scale factor, probably for a hi-DPI display.
Color settings are a bit different than most of the settings objects in that there can be more than o...
SFVEC4F m_SilkScreenColorTop
in realistic mode: SilkScreen color ( top )
double r
Red component.
Definition: color4d.h:384
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103

References KIGFX::COLOR4D::a, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::animation_enabled, KIGFX::COLOR4D::b, FL_MOUSEWHEEL_PANNING, FL_USE_REALISTIC_MODE, KIGFX::COLOR4D::g, COLOR_SETTINGS::GetColor(), LAYER_3D_BACKGROUND_BOTTOM, LAYER_3D_BACKGROUND_TOP, LAYER_3D_BOARD, LAYER_3D_COPPER, LAYER_3D_SILKSCREEN_BOTTOM, LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SOLDERMASK_BOTTOM, LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERPASTE, BOARD_ADAPTER::m_BgColorBot, BOARD_ADAPTER::m_BgColorTop, m_boardAdapter, BOARD_ADAPTER::m_BoardBodyColor, EDA_3D_VIEWER_SETTINGS::m_Camera, BOARD_ADAPTER::m_CopperColor, COMMON_SETTINGS::m_Input, m_previewPane, EDA_3D_VIEWER_SETTINGS::m_Render, BOARD_ADAPTER::m_SilkScreenColorBot, BOARD_ADAPTER::m_SilkScreenColorTop, BOARD_ADAPTER::m_SolderMaskColorBot, BOARD_ADAPTER::m_SolderMaskColorTop, BOARD_ADAPTER::m_SolderPasteColor, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::material_mode, EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::moving_speed_multiplier, OPENGL, Pgm(), EDA_3D_VIEWER_SETTINGS::CAMERA_SETTINGS::projection_mode, KIGFX::COLOR4D::r, EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::realistic, COMMON_SETTINGS::INPUT::scroll_modifier_zoom, EDA_3D_CANVAS::SetAnimationEnabled(), BOARD_ADAPTER::SetFlag(), BOARD_ADAPTER::SetMaterialMode(), EDA_3D_CANVAS::SetMovingSpeedMultiplier(), EDA_3D_CANVAS::SetProjectionMode(), BOARD_ADAPTER::SetRenderEngine(), and HIDPI_GL_CANVAS::SetScaleFactor().

Referenced by PANEL_PREVIEW_3D_MODEL().

◆ onDecrementOffset()

void PANEL_PREVIEW_3D_MODEL::onDecrementOffset ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 140 of file panel_preview_3d_model.h.

141  {
142  doIncrementOffset( event, -1.0 );
143  }
void doIncrementOffset(wxSpinEvent &aEvent, double aSign)

References doIncrementOffset().

◆ onDecrementRot()

void PANEL_PREVIEW_3D_MODEL::onDecrementRot ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 124 of file panel_preview_3d_model.h.

125  {
126  doIncrementRotation( event, -1.0 );
127  }
void doIncrementRotation(wxSpinEvent &aEvent, double aSign)

References doIncrementRotation().

◆ onDecrementScale()

void PANEL_PREVIEW_3D_MODEL::onDecrementScale ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 132 of file panel_preview_3d_model.h.

133  {
134  doIncrementScale( event, -1.0 );
135  }
void doIncrementScale(wxSpinEvent &aEvent, double aSign)

References doIncrementScale().

◆ onIncrementOffset()

void PANEL_PREVIEW_3D_MODEL::onIncrementOffset ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 136 of file panel_preview_3d_model.h.

137  {
138  doIncrementOffset( event, 1.0 );
139  }
void doIncrementOffset(wxSpinEvent &aEvent, double aSign)

References doIncrementOffset().

◆ onIncrementRot()

void PANEL_PREVIEW_3D_MODEL::onIncrementRot ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 120 of file panel_preview_3d_model.h.

121  {
122  doIncrementRotation( event, 1.0 );
123  }
void doIncrementRotation(wxSpinEvent &aEvent, double aSign)

References doIncrementRotation().

◆ onIncrementScale()

void PANEL_PREVIEW_3D_MODEL::onIncrementScale ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 128 of file panel_preview_3d_model.h.

129  {
130  doIncrementScale( event, 1.0 );
131  }
void doIncrementScale(wxSpinEvent &aEvent, double aSign)

References doIncrementScale().

◆ OnMenuEvent()

void PANEL_PREVIEW_3D_MODEL::OnMenuEvent ( wxMenuEvent &  aEvent)

The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu events aren't captured by the menus themselves.

Definition at line 160 of file panel_preview_3d_model.cpp.

161 {
162  if( !m_toolDispatcher )
163  aEvent.Skip();
164  else
166 }
virtual void DispatchWxEvent(wxEvent &aEvent)
Process wxEvents (mostly UI events), translate them to TOOL_EVENTs, and make tools handle those.
TOOL_DISPATCHER * m_toolDispatcher
Definition: tools_holder.h:160

References TOOL_DISPATCHER::DispatchWxEvent(), and TOOLS_HOLDER::m_toolDispatcher.

Referenced by PANEL_PREVIEW_3D_MODEL().

◆ onMouseWheelOffset()

void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 469 of file panel_preview_3d_model.cpp.

470 {
471  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
472 
473  double step_mm = OFFSET_INCREMENT_MM;
474 
475  if( event.ShiftDown( ) )
476  step_mm = OFFSET_INCREMENT_MM_FINE;
477 
479  {
480  step_mm = 25.4*OFFSET_INCREMENT_MIL/1000.0;
481 
482  if( event.ShiftDown( ) )
483  step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000.0;
484  }
485 
486  if( event.GetWheelRotation() >= 0 )
487  step_mm = -step_mm;
488 
489  double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
490 
491  curr_value_mm += step_mm;
492  curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
493  curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
494 
495  textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
496 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
#define OFFSET_INCREMENT_MM_FINE
#define OFFSET_INCREMENT_MIL_FINE
static constexpr double IU_PER_MM
Mock up a conversion function.
wxString formatOffsetValue(double aValue)
#define OFFSET_INCREMENT_MM
#define OFFSET_INCREMENT_MIL
#define MAX_OFFSET
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307

References DoubleValueFromString(), formatOffsetValue(), INCHES, IU_PER_MM, m_userUnits, MAX_OFFSET, MILS, OFFSET_INCREMENT_MIL, OFFSET_INCREMENT_MIL_FINE, OFFSET_INCREMENT_MM, and OFFSET_INCREMENT_MM_FINE.

◆ onMouseWheelRot()

void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 447 of file panel_preview_3d_model.cpp.

448 {
449  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
450 
451  double step = ROTATION_INCREMENT_WHEEL;
452 
453  if( event.ShiftDown( ) )
455 
456  if( event.GetWheelRotation() >= 0 )
457  step = -step;
458 
459  double curr_value = DoubleValueFromString( EDA_UNITS::DEGREES, textCtrl->GetValue() ) / 10.0;
460 
461  curr_value += step;
462  curr_value = std::max( -MAX_ROTATION, curr_value );
463  curr_value = std::min( curr_value, MAX_ROTATION );
464 
465  textCtrl->SetValue( formatRotationValue( curr_value ) );
466 }
#define ROTATION_INCREMENT_WHEEL_FINE
wxString formatRotationValue(double aValue)
#define MAX_ROTATION
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307
#define ROTATION_INCREMENT_WHEEL

References DEGREES, DoubleValueFromString(), formatRotationValue(), MAX_ROTATION, ROTATION_INCREMENT_WHEEL, and ROTATION_INCREMENT_WHEEL_FINE.

◆ onMouseWheelScale()

void PANEL_PREVIEW_3D_MODEL::onMouseWheelScale ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 425 of file panel_preview_3d_model.cpp.

426 {
427  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
428 
429  double step = SCALE_INCREMENT;
430 
431  if( event.ShiftDown( ) )
432  step = SCALE_INCREMENT_FINE;
433 
434  if( event.GetWheelRotation() >= 0 )
435  step = -step;
436 
437  double curr_value = DoubleValueFromString( EDA_UNITS::UNSCALED, textCtrl->GetValue() );
438 
439  curr_value += step;
440  curr_value = std::max( 1/MAX_SCALE, curr_value );
441  curr_value = std::min( curr_value, MAX_SCALE );
442 
443  textCtrl->SetValue( formatScaleValue( curr_value ) );
444 }
wxString formatScaleValue(double aValue)
#define MAX_SCALE
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307
#define SCALE_INCREMENT_FINE
#define SCALE_INCREMENT

References DoubleValueFromString(), formatScaleValue(), MAX_SCALE, SCALE_INCREMENT, SCALE_INCREMENT_FINE, and UNSCALED.

◆ onOpacitySlider()

void PANEL_PREVIEW_3D_MODEL::onOpacitySlider ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 342 of file panel_preview_3d_model.cpp.

343 {
344  if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
345  {
346  // Write settings back to the parent
347  FP_3DMODEL* modelInfo = &m_parentModelList->at( (unsigned) m_selected );
348 
349  modelInfo->m_Opacity = m_opacity->GetValue() / 100.0;
350 
351  // Update the dummy footprint for the preview
352  UpdateDummyFootprint( false );
353  }
354 }
void UpdateDummyFootprint(bool aRelaodRequired=true)
Copy shapes from the current shape list which are flagged for preview to the copy of footprint that i...
std::vector< FP_3DMODEL > * m_parentModelList
double m_Opacity
Definition: footprint.h:97

References PANEL_PREVIEW_3D_MODEL_BASE::m_opacity, FP_3DMODEL::m_Opacity, m_parentModelList, m_selected, and UpdateDummyFootprint().

◆ PopTool()

void TOOLS_HOLDER::PopTool ( const std::string &  actionName)
virtualinherited

Definition at line 61 of file tools_holder.cpp.

62 {
63  // Push/pop events can get out of order (such as when they're generated by the Simulator
64  // frame but not processed until the mouse is back in the Schematic frame), so make sure
65  // we're popping the right stack frame.
66 
67  for( int i = (int) m_toolStack.size() - 1; i >= 0; --i )
68  {
69  if( m_toolStack[ i ] == actionName )
70  {
71  m_toolStack.erase( m_toolStack.begin() + i );
72 
73  // If there's something underneath us, and it's now the top of the stack, then
74  // re-activate it
75  if( ( --i ) >= 0 && i == (int)m_toolStack.size() - 1 )
76  {
77  std::string back = m_toolStack[ i ];
79 
80  if( action )
81  {
82  // Pop the action as running it will push it back onto the stack
83  m_toolStack.pop_back();
84 
85  TOOL_EVENT evt = action->MakeEvent();
86  evt.SetHasPosition( false );
87  evt.SetReactivate( true );
88  GetToolManager()->PostEvent( evt );
89  }
90  }
91  else
93 
94  return;
95  }
96  }
97 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:121
void SetReactivate(bool aReactivate=true)
Returns information about difference between current mouse cursor position and the place where draggi...
Definition: tool_event.h:253
TOOL_ACTION * FindAction(const std::string &aActionName) const
Find an action with a given name (if there is one available).
Generic, UI-independent tool event.
Definition: tool_event.h:152
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:158
std::vector< std::string > m_toolStack
Definition: tools_holder.h:164
Represent a single user action.
Definition: tool_action.h:67
TOOL_EVENT MakeEvent() const
Return the event associated with the action (i.e.
Definition: tool_action.cpp:72
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:199
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
void PostEvent(const TOOL_EVENT &aEvent)
Put an event to the event queue to be processed at the end of event processing cycle.
static TOOL_ACTION selectionTool
Definition: actions.h:153
void SetHasPosition(bool aHasPosition)
Returns if the action associated with this event should be treated as immediate regardless of the cur...
Definition: tool_event.h:241

References TOOLS_HOLDER::DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), TOOLS_HOLDER::GetToolManager(), TOOLS_HOLDER::m_toolManager, TOOLS_HOLDER::m_toolStack, TOOL_ACTION::MakeEvent(), TOOL_MANAGER::PostEvent(), ACTIONS::selectionTool, TOOL_EVENT::SetHasPosition(), and TOOL_EVENT::SetReactivate().

Referenced by EDIT_TOOL::copyToClipboard(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ PushTool()

void TOOLS_HOLDER::PushTool ( const std::string &  actionName)
virtualinherited

NB: the definition of "tool" is different at the user level.

The implementation uses a single TOOL_BASE derived class to implement several user "tools", such as rectangle and circle, or wire and bus. So each user-level tool is actually a TOOL_ACTION.

Definition at line 44 of file tools_holder.cpp.

45 {
46  m_toolStack.push_back( actionName );
47 
48  // Human cognitive stacking is very shallow; deeper tool stacks just get annoying
49  if( m_toolStack.size() > 3 )
50  m_toolStack.erase( m_toolStack.begin() );
51 
52  TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( actionName );
53 
54  if( action )
55  DisplayToolMsg( action->GetLabel() );
56  else
57  DisplayToolMsg( actionName );
58 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:121
TOOL_ACTION * FindAction(const std::string &aActionName) const
Find an action with a given name (if there is one available).
wxString GetLabel() const
Definition: tool_action.cpp:83
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:158
std::vector< std::string > m_toolStack
Definition: tools_holder.h:164
Represent a single user action.
Definition: tool_action.h:67
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:199

References TOOLS_HOLDER::DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), TOOL_ACTION::GetLabel(), TOOLS_HOLDER::m_toolManager, and TOOLS_HOLDER::m_toolStack.

Referenced by EDIT_TOOL::copyToClipboard(), 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(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().

◆ RefreshCanvas()

virtual void TOOLS_HOLDER::RefreshCanvas ( )
inlinevirtualinherited

Reimplemented in EDA_DRAW_FRAME.

Definition at line 153 of file tools_holder.h.

153 { }

Referenced by ACTION_TOOLBAR::onPaletteEvent(), ACTION_TOOLBAR::onToolEvent(), and TOOL_MANAGER::ProcessEvent().

◆ RegisterUIUpdateHandler() [1/2]

virtual void TOOLS_HOLDER::RegisterUIUpdateHandler ( const TOOL_ACTION aAction,
const ACTION_CONDITIONS aConditions 
)
inlinevirtualinherited

Register an action's update conditions with the UI layer to allow the UI to appropriately display the state of its controls.

Parameters
aActionis the action to register.
aConditionsare the UI conditions to use for the control states.

Definition at line 63 of file tools_holder.h.

65  {
66  RegisterUIUpdateHandler( aAction.GetUIId(), aConditions );
67  }
int GetUIId() const
Definition: tool_action.h:130
virtual void RegisterUIUpdateHandler(const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
Register an action's update conditions with the UI layer to allow the UI to appropriately display the...
Definition: tools_holder.h:63

References TOOL_ACTION::GetUIId().

Referenced by ACTION_TOOLBAR::doSelectAction(), and ACTION_MANAGER::SetConditions().

◆ RegisterUIUpdateHandler() [2/2]

virtual void TOOLS_HOLDER::RegisterUIUpdateHandler ( int  aID,
const ACTION_CONDITIONS aConditions 
)
inlinevirtualinherited

Register a UI update handler for the control with ID aID.

Parameters
aIDis the control ID to register the handler for.
aConditionsare the UI conditions to use for the control states.

Reimplemented in EDA_BASE_FRAME.

Definition at line 75 of file tools_holder.h.

76  {}

◆ SetSelectedModel()

void PANEL_PREVIEW_3D_MODEL::SetSelectedModel ( int  idx)

Set the currently selected index in the model list so that the scale/rotation/offset controls can be updated.

Definition at line 273 of file panel_preview_3d_model.cpp.

274 {
275  if( m_parentModelList && idx >= 0 && idx < (int) m_parentModelList->size() )
276  {
277  m_selected = idx;
278  const FP_3DMODEL& modelInfo = m_parentModelList->at( (unsigned) m_selected );
279 
280  // Use ChangeValue() instead of SetValue(). It's not the user making the change, so we
281  // don't want to generate wxEVT_GRID_CELL_CHANGED events.
282  xscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.x ) );
283  yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
284  zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
285 
286  xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
287  yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
288  zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
289 
290  xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
291  yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
292  zoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.z ) );
293 
294  m_opacity->SetValue( modelInfo.m_Opacity * 100.0 );
295  }
296  else
297  {
298  m_selected = -1;
299 
300  xscale->ChangeValue( wxEmptyString );
301  yscale->ChangeValue( wxEmptyString );
302  zscale->ChangeValue( wxEmptyString );
303 
304  xrot->ChangeValue( wxEmptyString );
305  yrot->ChangeValue( wxEmptyString );
306  zrot->ChangeValue( wxEmptyString );
307 
308  xoff->ChangeValue( wxEmptyString );
309  yoff->ChangeValue( wxEmptyString );
310  zoff->ChangeValue( wxEmptyString );
311 
312  m_opacity->SetValue( 100 );
313  }
314 }
wxString formatOffsetValue(double aValue)
std::vector< FP_3DMODEL > * m_parentModelList
VECTOR3D m_Offset
3D model offset (mm)
Definition: footprint.h:96
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: footprint.h:94
wxString formatRotationValue(double aValue)
double m_Opacity
Definition: footprint.h:97
wxString formatScaleValue(double aValue)
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: footprint.h:95

References formatOffsetValue(), formatRotationValue(), formatScaleValue(), FP_3DMODEL::m_Offset, PANEL_PREVIEW_3D_MODEL_BASE::m_opacity, FP_3DMODEL::m_Opacity, m_parentModelList, FP_3DMODEL::m_Rotation, FP_3DMODEL::m_Scale, m_selected, FP_3DMODEL::VECTOR3D::x, PANEL_PREVIEW_3D_MODEL_BASE::xoff, PANEL_PREVIEW_3D_MODEL_BASE::xrot, PANEL_PREVIEW_3D_MODEL_BASE::xscale, FP_3DMODEL::VECTOR3D::y, PANEL_PREVIEW_3D_MODEL_BASE::yoff, PANEL_PREVIEW_3D_MODEL_BASE::yrot, PANEL_PREVIEW_3D_MODEL_BASE::yscale, FP_3DMODEL::VECTOR3D::z, PANEL_PREVIEW_3D_MODEL_BASE::zoff, PANEL_PREVIEW_3D_MODEL_BASE::zrot, and PANEL_PREVIEW_3D_MODEL_BASE::zscale.

Referenced by PANEL_FP_PROPERTIES_3D_MODEL::select3DModel().

◆ ShowChangedLanguage()

void TOOLS_HOLDER::ShowChangedLanguage ( )
virtualinherited

Reimplemented in SCH_EDIT_FRAME, PCB_EDIT_FRAME, EDA_BASE_FRAME, SYMBOL_EDIT_FRAME, FOOTPRINT_EDIT_FRAME, GERBVIEW_FRAME, PCB_BASE_FRAME, CVPCB_MAINFRAME, and KICAD_MANAGER_FRAME.

Definition at line 118 of file tools_holder.cpp.

119 {
120  std::string actionName = CurrentToolName();
121  TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( actionName );
122 
123  if( action )
124  DisplayToolMsg( action->GetLabel() );
125 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:121
TOOL_ACTION * FindAction(const std::string &aActionName) const
Find an action with a given name (if there is one available).
std::string CurrentToolName() const
wxString GetLabel() const
Definition: tool_action.cpp:83
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:158
Represent a single user action.
Definition: tool_action.h:67
ACTION_MANAGER * GetActionManager() const
Definition: tool_manager.h:199

References TOOLS_HOLDER::CurrentToolName(), TOOLS_HOLDER::DisplayToolMsg(), ACTION_MANAGER::FindAction(), TOOL_MANAGER::GetActionManager(), TOOL_ACTION::GetLabel(), and TOOLS_HOLDER::m_toolManager.

Referenced by EDA_BASE_FRAME::ShowChangedLanguage().

◆ ToolStackIsEmpty()

◆ UnregisterUIUpdateHandler() [1/2]

virtual void TOOLS_HOLDER::UnregisterUIUpdateHandler ( const TOOL_ACTION aAction)
inlinevirtualinherited

Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler.

Parameters
aActionis the action to unregister the handler for.

Definition at line 83 of file tools_holder.h.

84  {
86  }
int GetUIId() const
Definition: tool_action.h:130
virtual void UnregisterUIUpdateHandler(const TOOL_ACTION &aAction)
Unregister a UI handler for an action that was registered using RegisterUIUpdateHandler.
Definition: tools_holder.h:83

References TOOL_ACTION::GetUIId().

Referenced by ACTION_TOOLBAR::doSelectAction(), and ACTION_MANAGER::SetConditions().

◆ UnregisterUIUpdateHandler() [2/2]

virtual void TOOLS_HOLDER::UnregisterUIUpdateHandler ( int  aID)
inlinevirtualinherited

Unregister a UI handler for a given ID that was registered using RegisterUIUpdateHandler.

Parameters
aIDis the control ID to unregister the handler for.

Reimplemented in EDA_BASE_FRAME.

Definition at line 93 of file tools_holder.h.

94  {}

◆ UpdateDummyFootprint()

void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint ( bool  aRelaodRequired = true)

Copy shapes from the current shape list which are flagged for preview to the copy of footprint that is on the preview dummy board.

Definition at line 499 of file panel_preview_3d_model.cpp.

500 {
501  m_dummyFootprint->Models().clear();
502 
503  for( FP_3DMODEL& model : *m_parentModelList )
504  {
505  if( model.m_Show )
506  m_dummyFootprint->Models().push_back( model );
507  }
508 
509  if( aReloadRequired )
511 
513 }
std::list< FP_3DMODEL > & Models()
Definition: footprint.h:183
std::vector< FP_3DMODEL > * m_parentModelList
void Request_refresh(bool aRedrawImmediately=true)
Schedule a refresh update of the canvas.
void ReloadRequest(BOARD *aBoard=nullptr, S3D_CACHE *aCachePointer=nullptr)

References m_dummyFootprint, m_parentModelList, m_previewPane, FOOTPRINT::Models(), EDA_3D_CANVAS::ReloadRequest(), and EDA_3D_CANVAS::Request_refresh().

Referenced by PANEL_FP_PROPERTIES_3D_MODEL::Cfg3DPath(), PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged(), PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel(), onOpacitySlider(), PANEL_FP_PROPERTIES_3D_MODEL::OnRemove3DModel(), PANEL_FP_PROPERTIES_3D_MODEL::ReloadModelsFromFootprint(), and updateOrientation().

◆ updateOrientation()

void PANEL_PREVIEW_3D_MODEL::updateOrientation ( wxCommandEvent &  event)
overrideprivatevirtual

It will receive the events from editing the fields.

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 317 of file panel_preview_3d_model.cpp.

318 {
319  if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
320  {
321  // Write settings back to the parent
322  FP_3DMODEL* modelInfo = &m_parentModelList->at( (unsigned) m_selected );
323 
324  modelInfo->m_Scale.x = DoubleValueFromString( EDA_UNITS::UNSCALED, xscale->GetValue() );
325  modelInfo->m_Scale.y = DoubleValueFromString( EDA_UNITS::UNSCALED, yscale->GetValue() );
326  modelInfo->m_Scale.z = DoubleValueFromString( EDA_UNITS::UNSCALED, zscale->GetValue() );
327 
328  modelInfo->m_Rotation.x = rotationFromString( xrot->GetValue() );
329  modelInfo->m_Rotation.y = rotationFromString( yrot->GetValue() );
330  modelInfo->m_Rotation.z = rotationFromString( zrot->GetValue() );
331 
332  modelInfo->m_Offset.x = DoubleValueFromString( m_userUnits, xoff->GetValue() ) / IU_PER_MM;
333  modelInfo->m_Offset.y = DoubleValueFromString( m_userUnits, yoff->GetValue() ) / IU_PER_MM;
334  modelInfo->m_Offset.z = DoubleValueFromString( m_userUnits, zoff->GetValue() ) / IU_PER_MM;
335 
336  // Update the dummy footprint for the preview
337  UpdateDummyFootprint( false );
338  }
339 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
void UpdateDummyFootprint(bool aRelaodRequired=true)
Copy shapes from the current shape list which are flagged for preview to the copy of footprint that i...
static constexpr double IU_PER_MM
Mock up a conversion function.
std::vector< FP_3DMODEL > * m_parentModelList
VECTOR3D m_Offset
3D model offset (mm)
Definition: footprint.h:96
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: footprint.h:94
static double rotationFromString(const wxString &aValue)
Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION.
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: footprint.h:95
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:307

References DoubleValueFromString(), IU_PER_MM, FP_3DMODEL::m_Offset, m_parentModelList, FP_3DMODEL::m_Rotation, FP_3DMODEL::m_Scale, m_selected, m_userUnits, rotationFromString(), UNSCALED, UpdateDummyFootprint(), FP_3DMODEL::VECTOR3D::x, PANEL_PREVIEW_3D_MODEL_BASE::xoff, PANEL_PREVIEW_3D_MODEL_BASE::xrot, PANEL_PREVIEW_3D_MODEL_BASE::xscale, FP_3DMODEL::VECTOR3D::y, PANEL_PREVIEW_3D_MODEL_BASE::yoff, PANEL_PREVIEW_3D_MODEL_BASE::yrot, PANEL_PREVIEW_3D_MODEL_BASE::yscale, FP_3DMODEL::VECTOR3D::z, PANEL_PREVIEW_3D_MODEL_BASE::zoff, PANEL_PREVIEW_3D_MODEL_BASE::zrot, and PANEL_PREVIEW_3D_MODEL_BASE::zscale.

◆ View3DBack()

void PANEL_PREVIEW_3D_MODEL::View3DBack ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 187 of file panel_preview_3d_model.h.

188  {
190  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_BACK, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DBottom()

void PANEL_PREVIEW_3D_MODEL::View3DBottom ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 192 of file panel_preview_3d_model.h.

193  {
195  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_BOTTOM, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DFront()

void PANEL_PREVIEW_3D_MODEL::View3DFront ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 166 of file panel_preview_3d_model.h.

167  {
169  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_FRONT, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DISO()

void PANEL_PREVIEW_3D_MODEL::View3DISO ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 155 of file panel_preview_3d_model.h.

156  {
158  m_previewPane->Refresh();
159  }
void ToggleProjection()
Definition: camera.cpp:445

References m_currentCamera, m_previewPane, and CAMERA::ToggleProjection().

◆ View3DLeft()

void PANEL_PREVIEW_3D_MODEL::View3DLeft ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 161 of file panel_preview_3d_model.h.

162  {
164  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_LEFT, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DRight()

void PANEL_PREVIEW_3D_MODEL::View3DRight ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 182 of file panel_preview_3d_model.h.

183  {
185  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_RIGHT, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DTop()

void PANEL_PREVIEW_3D_MODEL::View3DTop ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 171 of file panel_preview_3d_model.h.

172  {
174  }
bool SetView3D(int aKeycode)
Helper function to call view commands.

References ID_VIEW3D_TOP, m_previewPane, and EDA_3D_CANVAS::SetView3D().

◆ View3DUpdate()

void PANEL_PREVIEW_3D_MODEL::View3DUpdate ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREVIEW_3D_MODEL_BASE.

Definition at line 176 of file panel_preview_3d_model.h.

177  {
179  m_previewPane->Refresh();
180  }
void ReloadRequest(BOARD *aBoard=nullptr, S3D_CACHE *aCachePointer=nullptr)

References m_previewPane, and EDA_3D_CANVAS::ReloadRequest().

Member Data Documentation

◆ m_actions

◆ m_boardAdapter

BOARD_ADAPTER PANEL_PREVIEW_3D_MODEL::m_boardAdapter
private

Definition at line 200 of file panel_preview_3d_model.h.

Referenced by GetAdapter(), loadSettings(), and PANEL_PREVIEW_3D_MODEL().

◆ m_bpUpdate

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpUpdate
protectedinherited

◆ m_bpvBack

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvBack
protectedinherited

◆ m_bpvBottom

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvBottom
protectedinherited

◆ m_bpvFront

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvFront
protectedinherited

◆ m_bpvISO

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvISO
protectedinherited

◆ m_bpvLeft

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvLeft
protectedinherited

◆ m_bpvRight

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvRight
protectedinherited

◆ m_bpvTop

wxBitmapButton* PANEL_PREVIEW_3D_MODEL_BASE::m_bpvTop
protectedinherited

◆ m_currentCamera

CAMERA& PANEL_PREVIEW_3D_MODEL::m_currentCamera
private

Definition at line 201 of file panel_preview_3d_model.h.

Referenced by GetCurrentCamera(), PANEL_PREVIEW_3D_MODEL(), and View3DISO().

◆ m_dragAction

MOUSE_DRAG_ACTION TOOLS_HOLDER::m_dragAction
protectedinherited

◆ m_dummyBoard

BOARD* PANEL_PREVIEW_3D_MODEL::m_dummyBoard
private

Definition at line 204 of file panel_preview_3d_model.h.

Referenced by PANEL_PREVIEW_3D_MODEL(), and ~PANEL_PREVIEW_3D_MODEL().

◆ m_dummyFootprint

FOOTPRINT* PANEL_PREVIEW_3D_MODEL::m_dummyFootprint
private

Definition at line 205 of file panel_preview_3d_model.h.

Referenced by PANEL_PREVIEW_3D_MODEL(), and UpdateDummyFootprint().

◆ m_dummySelection

SELECTION TOOLS_HOLDER::m_dummySelection
protectedinherited

Definition at line 162 of file tools_holder.h.

Referenced by TOOLS_HOLDER::GetCurrentSelection().

◆ m_immediateActions

bool TOOLS_HOLDER::m_immediateActions
protectedinherited

◆ m_infobar

WX_INFOBAR* PANEL_PREVIEW_3D_MODEL::m_infobar
private

Definition at line 199 of file panel_preview_3d_model.h.

Referenced by PANEL_PREVIEW_3D_MODEL().

◆ m_moveWarpsCursor

bool TOOLS_HOLDER::m_moveWarpsCursor
protectedinherited

◆ m_opacity

wxSlider* PANEL_PREVIEW_3D_MODEL_BASE::m_opacity
protectedinherited

◆ m_parentModelList

std::vector<FP_3DMODEL>* PANEL_PREVIEW_3D_MODEL::m_parentModelList
private

◆ m_previewPane

◆ m_selected

int PANEL_PREVIEW_3D_MODEL::m_selected
private

◆ m_SizerPanelView

wxBoxSizer* PANEL_PREVIEW_3D_MODEL_BASE::m_SizerPanelView
protectedinherited

◆ m_spinXoffset

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinXoffset
protectedinherited

◆ m_spinXrot

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinXrot
protectedinherited

◆ m_spinXscale

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinXscale
protectedinherited

◆ m_spinYoffset

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinYoffset
protectedinherited

◆ m_spinYrot

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinYrot
protectedinherited

◆ m_spinYscale

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinYscale
protectedinherited

◆ m_spinZoffset

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinZoffset
protectedinherited

◆ m_spinZrot

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinZrot
protectedinherited

◆ m_spinZscale

wxSpinButton* PANEL_PREVIEW_3D_MODEL_BASE::m_spinZscale
protectedinherited

◆ m_staticText1

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText1
protectedinherited

◆ m_staticText11

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText11
protectedinherited

◆ m_staticText12

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText12
protectedinherited

◆ m_staticText2

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText2
protectedinherited

◆ m_staticText21

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText21
protectedinherited

◆ m_staticText22

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText22
protectedinherited

◆ m_staticText3

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText3
protectedinherited

◆ m_staticText31

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText31
protectedinherited

◆ m_staticText32

wxStaticText* PANEL_PREVIEW_3D_MODEL_BASE::m_staticText32
protectedinherited

◆ m_toolDispatcher

◆ m_toolManager

TOOL_MANAGER* TOOLS_HOLDER::m_toolManager
protectedinherited

Definition at line 158 of file tools_holder.h.

Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), SCH_EDIT_FRAME::AddJunction(), EDA_BASE_FRAME::AddStandardHelpMenu(), EDA_DRAW_FRAME::AddStandardSubMenus(), SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_FRAME::canCloseWindow(), SCH_EDIT_FRAME::CheckAnnotate(), GERBVIEW_FRAME::Clear_DrawLayers(), EDA_DRAW_FRAME::CommonSettingsChanged(), SCH_EDIT_FRAME::ConvertPart(), EDA_3D_VIEWER_FRAME::CreateMenuBar(), SYMBOL_EDIT_FRAME::CreateNewSymbol(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), SYMBOL_VIEWER_FRAME::DClickOnCmpList(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDIT_FRAME::DeleteJunction(), SCH_EDIT_FRAME::DisplayCurrentSheet(), GERBVIEW_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), SYMBOL_EDIT_FRAME::emptyScreen(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDIT_FRAME::FixupJunctions(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), FOOTPRINT_EDIT_FRAME::GetCurrentSelection(), FOOTPRINT_VIEWER_FRAME::GetCurrentSelection(), PL_EDITOR_FRAME::GetCurrentSelection(), DISPLAY_FOOTPRINTS_FRAME::GetCurrentSelection(), SYMBOL_EDIT_FRAME::GetCurrentSelection(), SCH_EDIT_FRAME::GetCurrentSelection(), SYMBOL_VIEWER_FRAME::GetCurrentSelection(), GERBVIEW_FRAME::GetCurrentSelection(), SYMBOL_EDIT_FRAME::GetSymbolFromRedoList(), SYMBOL_EDIT_FRAME::GetSymbolFromUndoList(), TOOLS_HOLDER::GetToolManager(), EDA_DRAW_FRAME::GetUnitPair(), PL_EDITOR_FRAME::HardRedraw(), SYMBOL_EDIT_FRAME::HardRedraw(), SCH_EDIT_FRAME::importFile(), SCH_EDIT_FRAME::initScreenZoom(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux(), SYMBOL_EDIT_FRAME::LoadSymbolFromCurrentLib(), PCB_EDIT_FRAME::OnEditItemRequest(), SCH_EDIT_FRAME::OnFindDialogClose(), SCH_EDIT_FRAME::OnImportProject(), PL_EDITOR_FRAME::OnNewDrawingSheet(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), EDA_DRAW_FRAME::OnSelectGrid(), SYMBOL_EDIT_FRAME::OnSelectUnit(), EDA_DRAW_FRAME::OnSelectZoom(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_PREVIEW_3D_MODEL(), PCB_BASE_EDIT_FRAME::PCB_BASE_EDIT_FRAME(), TOOLS_HOLDER::PopTool(), TOOLS_HOLDER::PushTool(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), SYMBOL_VIEWER_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), SYMBOL_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), PL_EDITOR_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar(), SCH_EDIT_FRAME::ReCreateOptToolbar(), SYMBOL_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateVToolbar(), CVPCB_MAINFRAME::refreshAfterSymbolSearch(), SCH_BASE_FRAME::RefreshSelection(), FOOTPRINT_WIZARD_FRAME::ReloadFootprint(), SCH_EDIT_FRAME::RollbackSchematicFromUndo(), SYMBOL_EDIT_FRAME::RollbackSymbolFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprint(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), SYMBOL_EDIT_FRAME::saveLibrary(), EDA_DRAW_FRAME::SaveSettings(), SCH_BASE_FRAME::SCH_BASE_FRAME(), SCH_EDIT_FRAME::SchematicCleanUp(), GERBVIEW_FRAME::SetActiveLayer(), PCB_BASE_EDIT_FRAME::SetBoard(), SYMBOL_EDIT_FRAME::SetCurSymbol(), SCH_EDIT_FRAME::SetScreen(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), KICAD_MANAGER_FRAME::setupTools(), CVPCB_MAINFRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), EDA_3D_VIEWER_FRAME::setupUIConditions(), SYMBOL_VIEWER_FRAME::setupUIConditions(), KICAD_MANAGER_FRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), CVPCB_MAINFRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), GERBVIEW_FRAME::setupUIConditions(), EDA_DRAW_FRAME::setupUnits(), TOOLS_HOLDER::ShowChangedLanguage(), EDA_DRAW_FRAME::ToggleUserUnits(), PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event(), EDA_DRAW_FRAME::unitsChangeRefresh(), SYMBOL_VIEWER_FRAME::updatePreviewSymbol(), PCB_EDIT_FRAME::UpdateViaSizeSelectBox(), DISPLAY_FOOTPRINTS_FRAME::updateView(), FOOTPRINT_WIZARD_FRAME::updateView(), FOOTPRINT_VIEWER_FRAME::updateView(), FOOTPRINT_EDIT_FRAME::UpdateView(), EDA_DRAW_FRAME::Zoom_Automatique(), CVPCB_MAINFRAME::~CVPCB_MAINFRAME(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), EDA_DRAW_FRAME::~EDA_DRAW_FRAME(), FOOTPRINT_EDIT_FRAME::~FOOTPRINT_EDIT_FRAME(), FOOTPRINT_VIEWER_FRAME::~FOOTPRINT_VIEWER_FRAME(), FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), KICAD_MANAGER_FRAME::~KICAD_MANAGER_FRAME(), PL_EDITOR_FRAME::~PL_EDITOR_FRAME(), SCH_EDIT_FRAME::~SCH_EDIT_FRAME(), SYMBOL_EDIT_FRAME::~SYMBOL_EDIT_FRAME(), and SYMBOL_VIEWER_FRAME::~SYMBOL_VIEWER_FRAME().

◆ m_toolStack

std::vector<std::string> TOOLS_HOLDER::m_toolStack
protectedinherited

◆ m_trackBallCamera

TRACK_BALL PANEL_PREVIEW_3D_MODEL::m_trackBallCamera
private

Definition at line 202 of file panel_preview_3d_model.h.

◆ m_userUnits

EDA_UNITS PANEL_PREVIEW_3D_MODEL::m_userUnits
private

Index into m_parentInfoList.

Definition at line 210 of file panel_preview_3d_model.h.

Referenced by doIncrementOffset(), formatOffsetValue(), onMouseWheelOffset(), PANEL_PREVIEW_3D_MODEL(), and updateOrientation().

◆ xoff

◆ xrot

◆ xscale

◆ yoff

◆ yrot

◆ yscale

◆ zoff

◆ zrot

◆ zscale


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