KiCad PCB EDA Suite
PANEL_PREV_3D Class Reference

#include <panel_prev_3d.h>

Inheritance diagram for PANEL_PREV_3D:
EDA_3D_BOARD_HOLDER TOOLS_HOLDER PANEL_PREV_3D_BASE

Public Member Functions

 PANEL_PREV_3D (wxWindow *aParent, PCB_BASE_FRAME *aFrame, MODULE *aModule, std::vector< MODULE_3D_SETTINGS > *aParentModelList)
 
 ~PANEL_PREV_3D ()
 
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
 
CCAMERAGetCurrentCamera () override
 
void SetSelectedModel (int idx)
 SetModelDataIdx - Sets the currently selected index in the model list so that the scale/rotation/offset controls can be updated. More...
 
void UpdateDummyModule (bool aRelaodRequired=true)
 UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the copy of module that is on the preview dummy board. More...
 
TOOL_MANAGERGetToolManager () const
 Return the MVC controller. 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)
 
bool GetDoImmediateActions () const
 Indicates that hotkeys should perform an immediate action even if another tool is currently active. More...
 
bool GetDragSelects () const
 Indicates that a drag should draw a selection rectangle, even when started over an item. More...
 
bool GetMoveWarpsCursor () const
 Indicates that a move operation should warp the mouse pointer to the origin of the move object. More...
 
virtual void CommonSettingsChanged (bool aEnvVarsChanged)
 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
 
std::vector< std::string > m_toolStack
 
bool m_immediateActions
 
bool m_dragSelects
 
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 loadCommonSettings ()
 Load 3D relevant settings from the user configuration. More...
 
void updateOrientation (wxCommandEvent &event) override
 updateOrientation - 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
 
BOARD_ADAPTER m_boardAdapter
 
CCAMERAm_currentCamera
 
CTRACK_BALL m_trackBallCamera
 
BOARDm_dummyBoard
 
MODULEm_dummyModule
 
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
 
int m_selected
 
EDA_UNITS m_userUnits
 Index into m_parentInfoList. More...
 

Detailed Description

Definition at line 73 of file panel_prev_3d.h.

Constructor & Destructor Documentation

◆ PANEL_PREV_3D()

PANEL_PREV_3D::PANEL_PREV_3D ( wxWindow *  aParent,
PCB_BASE_FRAME aFrame,
MODULE aModule,
std::vector< MODULE_3D_SETTINGS > *  aParentModelList 
)

Definition at line 43 of file panel_prev_3d.cpp.

44  :
45  PANEL_PREV_3D_BASE( aParent, wxID_ANY ),
46  m_previewPane( nullptr ),
50 {
51  m_userUnits = aFrame->GetUserUnits();
52 
53  m_dummyBoard = new BOARD();
54  m_selected = -1;
55 
56  // Set the bitmap of 3D view buttons:
57  m_bpvTop->SetBitmap( KiBitmap( axis3d_top_xpm ) );
58  m_bpvFront->SetBitmap( KiBitmap( axis3d_front_xpm ) );
59  m_bpvBack->SetBitmap( KiBitmap( axis3d_back_xpm ) );
60  m_bpvLeft->SetBitmap( KiBitmap( axis3d_left_xpm ) );
61  m_bpvRight->SetBitmap( KiBitmap( axis3d_right_xpm ) );
62  m_bpvBottom->SetBitmap( KiBitmap( axis3d_bottom_xpm ) );
63  m_bpvISO->SetBitmap( KiBitmap( ortho_xpm ) );
64  m_bpUpdate->SetBitmap( KiBitmap( reload_xpm ) );
65 
66  // Set the min and max values of spin buttons (mandatory on Linux)
67  // They are not used, so they are set to min and max 32 bits int values
68  // (the min and max values supported by a wxSpinButton)
69  // It avoids blocking the up or down arrows when reaching this limit after
70  // a few clicks.
71  wxSpinButton* spinButtonList[] =
72  {
76  };
77 
78  for( wxSpinButton* button : spinButtonList )
79  button->SetRange(INT_MIN, INT_MAX );
80 
81  m_parentModelList = aParentModelList;
82 
83  m_dummyModule = new MODULE( *aModule );
85 
86  // Create the 3D canvas
89  aFrame->Prj().Get3DCacheManager() );
90 
92 
93  // Create the manager
95  m_toolManager->SetEnvironment( m_dummyBoard, nullptr, nullptr, nullptr, this );
96 
97  m_actions = new EDA_3D_ACTIONS();
100 
101  // Register tools
104 
105  // Run the viewer control tool, it is supposed to be always active
106  m_toolManager->InvokeTool( "3DViewer.Control" );
107 
108  m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
109 
110  for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
111  Connect( eventType, wxMenuEventHandler( PANEL_PREV_3D::OnMenuEvent ), NULL, this );
112 
113 #ifdef __WXOSX__
114  // Call layout once to get the proper button sizes after the bitmaps have been set
115  Layout();
116 
117  // The rounded-button style used has a small border on the left/right sides.
118  // This is automatically fixed in wx for buttons with a bitmap < 20, but not
119  // when the bitmap is set to be 26x26.
120  wxSize borderFix = wxSize(4, 4);
121 
122  m_bpvTop->SetMinSize( m_bpvTop->GetSize() + borderFix );
123  m_bpvFront->SetMinSize( m_bpvFront->GetSize() + borderFix );
124  m_bpvBack->SetMinSize( m_bpvBack->GetSize() + borderFix );
125  m_bpvLeft->SetMinSize( m_bpvLeft->GetSize() + borderFix );
126  m_bpvRight->SetMinSize( m_bpvRight->GetSize() + borderFix );
127  m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix );
128  m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix );
129  m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix );
130 #endif
131 }
wxBitmapButton * m_bpvTop
wxBitmapButton * m_bpvBottom
wxSpinButton * m_spinZoffset
const BITMAP_OPAQUE axis3d_front_xpm[1]
wxSpinButton * m_spinYoffset
wxBitmapButton * m_bpvBack
wxBitmapButton * m_bpvLeft
EDA_3D_ACTIONS.
Definition: 3d_actions.h:41
wxBitmapButton * m_bpUpdate
EDA_UNITS m_userUnits
Index into m_parentInfoList.
Definition: panel_prev_3d.h:93
const BITMAP_OPAQUE ortho_xpm[1]
Definition: ortho.cpp:55
Implement a canvas based on a wxGLCanvas.
Definition: eda_3d_canvas.h:47
wxBoxSizer * m_SizerPanelView
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
Definition: panel_prev_3d.h:90
bool InvokeTool(TOOL_ID aToolId)
Function InvokeTool() Calls a tool by sending a tool activation event to tool of given ID.
const BITMAP_OPAQUE reload_xpm[1]
Definition: reload.cpp:71
wxBitmapButton * m_bpvRight
TOOL_MANAGER.
Definition: tool_manager.h:51
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Construct a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:80
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
wxSpinButton * m_spinZrot
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Function SetEventDispatcher() Sets a dispatcher that processes events and forwards them to tools.
CCAMERA & m_currentCamera
Definition: panel_prev_3d.h:84
#define NULL
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
wxSpinButton * m_spinXoffset
MODULE * m_dummyModule
Definition: panel_prev_3d.h:88
const BITMAP_OPAQUE axis3d_left_xpm[1]
Definition: axis3d_left.cpp:98
void loadCommonSettings()
Load 3D relevant settings from the user configuration.
EDA_3D_CONTROLLER.
Definition: 3d_controller.h:39
void OnMenuEvent(wxMenuEvent &aEvent)
The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu events aren't ...
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
ACTIONS * m_actions
Definition: tools_holder.h:49
const BITMAP_OPAQUE axis3d_bottom_xpm[1]
wxSpinButton * m_spinYrot
PANEL_PREV_3D_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)
wxSpinButton * m_spinXrot
wxBitmapButton * m_bpvFront
wxSpinButton * m_spinZscale
wxSpinButton * m_spinXscale
TOOL_DISPATCHER * m_toolDispatcher
Definition: tools_holder.h:50
TOOL_DISPATCHER.
static const int * GetAttributesList(ANTIALIASING_MODE aAntiAliasingMode)
Get a list of attributes to pass to wxGLCanvas.
const BITMAP_OPAQUE axis3d_top_xpm[1]
Definition: axis3d_top.cpp:94
CTRACK_BALL m_trackBallCamera
Definition: panel_prev_3d.h:85
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:48
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:180
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, APP_SETTINGS_BASE *aSettings, TOOLS_HOLDER *aFrame)
Sets the work environment (model, view, view controls and the parent window).
wxBitmapButton * m_bpvISO
const BITMAP_OPAQUE axis3d_right_xpm[1]
void InitTools()
Function InitTools() Initializes all registered tools.
BOARD * m_dummyBoard
Definition: panel_prev_3d.h:87
#define RANGE_SCALE_3D
This defines the range that all coord will have to be rendered.
Definition: board_adapter.h:61
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
const BITMAP_OPAQUE axis3d_back_xpm[1]
Definition: axis3d_back.cpp:97
void RegisterTool(TOOL_BASE *aTool)
Function RegisterTool() Adds a tool to the manager set and sets it up.
BOARD_ADAPTER m_boardAdapter
Definition: panel_prev_3d.h:83
wxSpinButton * m_spinYscale

References AA_8X, BOARD::Add(), axis3d_back_xpm, axis3d_bottom_xpm, axis3d_front_xpm, axis3d_left_xpm, axis3d_right_xpm, axis3d_top_xpm, COGL_ATT_LIST::GetAttributesList(), EDA_BASE_FRAME::GetUserUnits(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::InvokeTool(), KiBitmap(), loadCommonSettings(), TOOLS_HOLDER::m_actions, m_boardAdapter, PANEL_PREV_3D_BASE::m_bpUpdate, PANEL_PREV_3D_BASE::m_bpvBack, PANEL_PREV_3D_BASE::m_bpvBottom, PANEL_PREV_3D_BASE::m_bpvFront, PANEL_PREV_3D_BASE::m_bpvISO, PANEL_PREV_3D_BASE::m_bpvLeft, PANEL_PREV_3D_BASE::m_bpvRight, PANEL_PREV_3D_BASE::m_bpvTop, m_currentCamera, m_dummyBoard, m_dummyModule, m_parentModelList, m_previewPane, m_selected, PANEL_PREV_3D_BASE::m_SizerPanelView, PANEL_PREV_3D_BASE::m_spinXoffset, PANEL_PREV_3D_BASE::m_spinXrot, PANEL_PREV_3D_BASE::m_spinXscale, PANEL_PREV_3D_BASE::m_spinYoffset, PANEL_PREV_3D_BASE::m_spinYrot, PANEL_PREV_3D_BASE::m_spinYscale, PANEL_PREV_3D_BASE::m_spinZoffset, PANEL_PREV_3D_BASE::m_spinZrot, PANEL_PREV_3D_BASE::m_spinZscale, TOOLS_HOLDER::m_toolDispatcher, TOOLS_HOLDER::m_toolManager, m_userUnits, NULL, OnMenuEvent(), ortho_xpm, KIWAY_HOLDER::Prj(), TOOL_MANAGER::RegisterTool(), reload_xpm, TOOL_MANAGER::SetEnvironment(), and EDA_3D_CANVAS::SetEventDispatcher().

◆ ~PANEL_PREV_3D()

PANEL_PREV_3D::~PANEL_PREV_3D ( )

Definition at line 134 of file panel_prev_3d.cpp.

135 {
136  delete m_dummyBoard;
137  delete m_previewPane;
138 }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
BOARD * m_dummyBoard
Definition: panel_prev_3d.h:87

References m_dummyBoard, and m_previewPane.

Member Function Documentation

◆ CommonSettingsChanged()

void TOOLS_HOLDER::CommonSettingsChanged ( bool  aEnvVarsChanged)
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, GERBVIEW_FRAME, EDA_BASE_FRAME, LIB_EDIT_FRAME, PCB_BASE_FRAME, FOOTPRINT_EDIT_FRAME, SCH_BASE_FRAME, EDA_3D_VIEWER, KICAD_MANAGER_FRAME, FOOTPRINT_VIEWER_FRAME, EDA_DRAW_FRAME, and LIB_VIEW_FRAME.

Definition at line 117 of file tools_holder.cpp.

118 {
119  if( GetToolManager() )
121 
122  COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
123 
127 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:104
void UpdateHotKeys(bool aFullUpdate)
Function UpdateHotKeys() Optionally reads the hotkey config files and then rebuilds the internal hotk...
bool m_dragSelects
Definition: tools_holder.h:63
bool m_immediateActions
Definition: tools_holder.h:59
bool m_moveWarpsCursor
Definition: tools_holder.h:64
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:194
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:74

References TOOL_MANAGER::GetActionManager(), TOOLS_HOLDER::GetToolManager(), COMMON_SETTINGS::INPUT::immediate_actions, TOOLS_HOLDER::m_dragSelects, TOOLS_HOLDER::m_immediateActions, COMMON_SETTINGS::m_Input, TOOLS_HOLDER::m_moveWarpsCursor, Pgm(), COMMON_SETTINGS::INPUT::prefer_select_to_drag, 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 121 of file tools_holder.h.

121 { return wxEmptyString; }

Referenced by ACTION_MANAGER::UpdateHotKeys().

◆ CurrentToolName()

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

Definition at line 99 of file tools_holder.cpp.

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

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

Referenced by TOOL_MANAGER::processEvent().

◆ DisplayToolMsg()

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

Reimplemented in EDA_DRAW_FRAME.

Definition at line 89 of file tools_holder.h.

89 {};

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

◆ doIncrementOffset()

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

Definition at line 336 of file panel_prev_3d.cpp.

337 {
338  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
339 
340  wxTextCtrl * textCtrl = xoff;
341 
342  if( spinCtrl == m_spinYoffset )
343  textCtrl = yoff;
344  else if( spinCtrl == m_spinZoffset )
345  textCtrl = zoff;
346 
347  double step = OFFSET_INCREMENT_MM;
348 
350  step = OFFSET_INCREMENT_MIL/1000.0;
351 
352  double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
353 
354  curr_value += ( step * aSign );
355  curr_value = std::max( -MAX_OFFSET, curr_value );
356  curr_value = std::min( curr_value, MAX_OFFSET );
357 
358  textCtrl->SetValue( formatOffsetValue( curr_value ) );
359 }
wxSpinButton * m_spinZoffset
wxSpinButton * m_spinYoffset
EDA_UNITS m_userUnits
Index into m_parentInfoList.
Definition: panel_prev_3d.h:93
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatOffsetValue(double aValue)
#define OFFSET_INCREMENT_MIL
Definition: panel_prev_3d.h:62
#define MAX_OFFSET
Definition: panel_prev_3d.h:50
#define OFFSET_INCREMENT_MM
Definition: panel_prev_3d.h:59

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

Referenced by onDecrementOffset(), and onIncrementOffset().

◆ doIncrementRotation()

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

Definition at line 316 of file panel_prev_3d.cpp.

317 {
318  wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
319  wxTextCtrl* textCtrl = xrot;
320 
321  if( spinCtrl == m_spinYrot )
322  textCtrl = yrot;
323  else if( spinCtrl == m_spinZrot )
324  textCtrl = zrot;
325 
326  double curr_value = DoubleValueFromString( EDA_UNITS::DEGREES, textCtrl->GetValue() ) / 10.0;
327 
328  curr_value += ( ROTATION_INCREMENT * aSign );
329  curr_value = std::max( -MAX_ROTATION, curr_value );
330  curr_value = std::min( curr_value, MAX_ROTATION );
331 
332  textCtrl->SetValue( formatRotationValue( curr_value ) );
333 }
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatRotationValue(double aValue)
wxSpinButton * m_spinZrot
#define ROTATION_INCREMENT
Definition: panel_prev_3d.h:55
wxSpinButton * m_spinYrot
#define MAX_ROTATION
Definition: panel_prev_3d.h:49

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

Referenced by onDecrementRot(), and onIncrementRot().

◆ doIncrementScale()

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

Definition at line 295 of file panel_prev_3d.cpp.

296 {
297  wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
298 
299  wxTextCtrl * textCtrl = xscale;
300 
301  if( spinCtrl == m_spinYscale )
302  textCtrl = yscale;
303  else if( spinCtrl == m_spinZscale )
304  textCtrl = zscale;
305 
306  double curr_value = DoubleValueFromString( EDA_UNITS::UNSCALED, textCtrl->GetValue() );
307 
308  curr_value += ( SCALE_INCREMENT * aSign );
309  curr_value = std::max( 1/MAX_SCALE, curr_value );
310  curr_value = std::min( curr_value, MAX_SCALE );
311 
312  textCtrl->SetValue( formatScaleValue( curr_value ) );
313 }
#define MAX_SCALE
Definition: panel_prev_3d.h:48
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatScaleValue(double aValue)
#define SCALE_INCREMENT
Definition: panel_prev_3d.h:53
wxSpinButton * m_spinZscale
wxSpinButton * m_spinYscale

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

Referenced by onDecrementScale(), and onIncrementScale().

◆ formatOffsetValue()

wxString PANEL_PREV_3D::formatOffsetValue ( double  aValue)
private

Definition at line 200 of file panel_prev_3d.cpp.

201 {
202  // Convert from internal units (mm) to user units
204  aValue /= 25.4f;
205 
206  return wxString::Format( "%.4f %s", aValue, GetAbbreviatedUnitsLabel( m_userUnits ) );
207 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
Definition: panel_prev_3d.h:93
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, bool aUseMils, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:495
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

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

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

◆ formatRotationValue()

wxString PANEL_PREV_3D::formatRotationValue ( double  aValue)
private

Definition at line 194 of file panel_prev_3d.cpp.

195 {
196  return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
197 }
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, bool aUseMils, EDA_DATA_TYPE aType)
Get the units string for a given units type.
Definition: base_units.cpp:495
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

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

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

◆ formatScaleValue()

wxString PANEL_PREV_3D::formatScaleValue ( double  aValue)
private

Definition at line 188 of file panel_prev_3d.cpp.

189 {
190  return wxString::Format( "%.4f", aValue );
191 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

References Format().

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

◆ GetAdapter()

BOARD_ADAPTER& PANEL_PREV_3D::GetAdapter ( )
inlineoverridevirtual

Implements EDA_3D_BOARD_HOLDER.

Definition at line 198 of file panel_prev_3d.h.

198 { return m_boardAdapter; }
BOARD_ADAPTER m_boardAdapter
Definition: panel_prev_3d.h:83

References m_boardAdapter.

◆ GetCurrentCamera()

CCAMERA& PANEL_PREV_3D::GetCurrentCamera ( )
inlineoverridevirtual

Implements EDA_3D_BOARD_HOLDER.

Definition at line 199 of file panel_prev_3d.h.

199 { return m_currentCamera; }
CCAMERA & m_currentCamera
Definition: panel_prev_3d.h:84

References m_currentCamera.

◆ GetDoImmediateActions()

bool TOOLS_HOLDER::GetDoImmediateActions ( ) const
inlineinherited

Indicates 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 95 of file tools_holder.h.

95 { return m_immediateActions; }
bool m_immediateActions
Definition: tools_holder.h:59

References TOOLS_HOLDER::m_immediateActions.

◆ GetDragSelects()

bool TOOLS_HOLDER::GetDragSelects ( ) const
inlineinherited

Indicates that a drag should draw a selection rectangle, even when started over an item.

Definition at line 101 of file tools_holder.h.

101 { return m_dragSelects; }
bool m_dragSelects
Definition: tools_holder.h:63

References TOOLS_HOLDER::m_dragSelects.

Referenced by EE_SELECTION_TOOL::Main().

◆ GetMoveWarpsCursor()

bool TOOLS_HOLDER::GetMoveWarpsCursor ( ) const
inlineinherited

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

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

Definition at line 107 of file tools_holder.h.

107 { return m_moveWarpsCursor; }
bool m_moveWarpsCursor
Definition: tools_holder.h:64

References TOOLS_HOLDER::m_moveWarpsCursor.

Referenced by LIB_MOVE_TOOL::Main(), and SCH_MOVE_TOOL::Main().

◆ GetToolCanvas()

wxWindow* PANEL_PREV_3D::GetToolCanvas ( ) const
inlineoverridevirtual

Canvas access.

Implements TOOLS_HOLDER.

Definition at line 196 of file panel_prev_3d.h.

196 { return m_previewPane; }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82

References m_previewPane.

◆ GetToolManager()

TOOL_MANAGER* TOOLS_HOLDER::GetToolManager ( ) const
inlineinherited

Return the MVC controller.

Definition at line 74 of file tools_holder.h.

74 { return m_toolManager; }
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:48

References TOOLS_HOLDER::m_toolManager.

Referenced by DIALOG_GLOBAL_DELETION::AcceptPcbDelete(), TREEPROJECT_ITEM::Activate(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), LIB_CONTROL::AddSymbolToSchematic(), BOARD_COMMIT::BOARD_COMMIT(), FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList(), TOOLS_HOLDER::CommonSettingsChanged(), DIALOG_ERC::deleteAllMarkers(), DIALOG_DRC::deleteAllMarkers(), DIALOG_MIGRATE_BUSES::DIALOG_MIGRATE_BUSES(), PL_DRAW_PANEL_GAL::DisplayWorksheet(), DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup(), DIALOG_CLEANUP_GRAPHICS::doCleanup(), DRAWING_TOOL::DrawVia(), TRACK_WIDTH_MENU::eventHandler(), DIFF_PAIR_MENU::eventHandler(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), PCB_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(), KICAD_MANAGER_FRAME::InstallPreferences(), PL_EDITOR_FRAME::InstallPreferences(), FOOTPRINT_EDIT_FRAME::InstallPreferences(), LIB_EDIT_FRAME::InstallPreferences(), GERBVIEW_FRAME::InstallPreferences(), PCB_EDIT_FRAME::InstallPreferences(), SCH_EDIT_FRAME::InstallPreferences(), LIB_VIEW_FRAME::LIB_VIEW_FRAME(), LIB_EDIT_FRAME::LoadPart(), PCB_EDIT_FRAME::LoadProjectSettings(), PROPERTIES_FRAME::OnAcceptPrms(), DIALOG_INSPECTOR::onCellClicked(), SIM_PLOT_FRAME::onClose(), SYMBOL_TREE_PANE::onComponentSelected(), DIALOG_DRC::OnDeleteOneClick(), DIALOG_DRC::OnDRCItemRClick(), DIALOG_ERC::OnERCItemSelected(), FOOTPRINTS_LISTBOX::OnLeftDClick(), SIM_PLOT_FRAME::onProbe(), DIALOG_PLOT::onRunDRC(), HIERARCHY_NAVIG_DLG::onSelectSheetPath(), DIALOG_FIELDS_EDITOR_GLOBAL::OnTableCellClick(), SIM_PLOT_FRAME::onTune(), PANEL_SELECTION_FILTER::PANEL_SELECTION_FILTER(), DIALOG_PLOT::Plot(), TOOLS_HOLDER::PopTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), PL_EDITOR_FRAME::RollbackFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), PCB_EDIT_FRAME::SaveProjectSettings(), EDA_3D_VIEWER::SaveSettings(), DIALOG_FIND::search(), CVPCB_MAINFRAME::setupEventHandlers(), PCB_LAYER_WIDGET::SyncLayerAlphaIndicators(), DIALOG_GRID_SETTINGS::TransferDataFromWindow(), DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataFromWindow(), PANEL_SETUP_RULES::TransferDataFromWindow(), DIALOG_FIELDS_EDITOR_GLOBAL::TransferDataToWindow(), DIALOG_LIB_EDIT_TEXT::TransferDataToWindow(), DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), EDA_DRAW_FRAME::UpdateMsgPanel(), DIALOG_NETLIST::~DIALOG_NETLIST(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().

◆ IsCurrentTool()

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

Definition at line 108 of file tools_holder.cpp.

109 {
110  if( m_toolStack.empty() )
111  return &aAction == &ACTIONS::selectionTool;
112  else
113  return m_toolStack.back() == aAction.GetName();
114 }
std::vector< std::string > m_toolStack
Definition: tools_holder.h:52
static TOOL_ACTION selectionTool
Definition: actions.h:147
const std::string & GetName() const
Function GetName() Returns name of the action.
Definition: tool_action.h:78

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

Referenced by PCB_INSPECTION_TOOL::HighlightNetTool(), SCH_EDIT_TOOL::Init(), PCB_EDITOR_CONTROL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), DISPLAY_FOOTPRINTS_FRAME::SyncToolbars(), FOOTPRINT_VIEWER_FRAME::SyncToolbars(), and LIB_EDIT_FRAME::SyncToolbars().

◆ loadCommonSettings()

void PANEL_PREV_3D::loadCommonSettings ( )
private

Load 3D relevant settings from the user configuration.

Definition at line 150 of file panel_prev_3d.cpp.

151 {
152  wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
153 
154  COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
155 
156  const DPI_SCALING dpi{ settings, this };
157  m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
158 
159  // TODO(JE) use all control options
161 }
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:104
void SetFlag(DISPLAY3D_FLG aFlag, bool aState)
SetFlag - set the status of a flag.
Class to handle configuration and automatic determination of the DPI scale to use for canvases.
Definition: dpi_scaling.h:36
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
void SetScaleFactor(double aFactor)
Set the canvas scale factor, probably for a hi-DPI display.
BOARD_ADAPTER m_boardAdapter
Definition: panel_prev_3d.h:83

References FL_MOUSEWHEEL_PANNING, m_boardAdapter, COMMON_SETTINGS::m_Input, m_previewPane, Pgm(), COMMON_SETTINGS::INPUT::scroll_modifier_zoom, BOARD_ADAPTER::SetFlag(), and HIDPI_GL_CANVAS::SetScaleFactor().

Referenced by PANEL_PREV_3D().

◆ onDecrementOffset()

void PANEL_PREV_3D::onDecrementOffset ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 132 of file panel_prev_3d.h.

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

References doIncrementOffset().

◆ onDecrementRot()

void PANEL_PREV_3D::onDecrementRot ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 116 of file panel_prev_3d.h.

117  {
118  doIncrementRotation( event, -1.0 );
119  }
void doIncrementRotation(wxSpinEvent &aEvent, double aSign)

References doIncrementRotation().

◆ onDecrementScale()

void PANEL_PREV_3D::onDecrementScale ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 124 of file panel_prev_3d.h.

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

References doIncrementScale().

◆ onIncrementOffset()

void PANEL_PREV_3D::onIncrementOffset ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 128 of file panel_prev_3d.h.

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

References doIncrementOffset().

◆ onIncrementRot()

void PANEL_PREV_3D::onIncrementRot ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 112 of file panel_prev_3d.h.

113  {
114  doIncrementRotation( event, 1.0 );
115  }
void doIncrementRotation(wxSpinEvent &aEvent, double aSign)

References doIncrementRotation().

◆ onIncrementScale()

void PANEL_PREV_3D::onIncrementScale ( wxSpinEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 120 of file panel_prev_3d.h.

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

References doIncrementScale().

◆ OnMenuEvent()

void PANEL_PREV_3D::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 141 of file panel_prev_3d.cpp.

142 {
143  if( !m_toolDispatcher )
144  aEvent.Skip();
145  else
147 }
virtual void DispatchWxEvent(wxEvent &aEvent)
Function DispatchWxEvent() Processes wxEvents (mostly UI events), translates them to TOOL_EVENTs,...
TOOL_DISPATCHER * m_toolDispatcher
Definition: tools_holder.h:50

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

Referenced by PANEL_PREV_3D().

◆ onMouseWheelOffset()

void PANEL_PREV_3D::onMouseWheelOffset ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 406 of file panel_prev_3d.cpp.

407 {
408  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
409 
410  double step = OFFSET_INCREMENT_MM;
411 
412  if( event.ShiftDown( ) )
414 
416  {
417  step = OFFSET_INCREMENT_MIL/1000.0;
418 
419  if( event.ShiftDown( ) )
420  step = OFFSET_INCREMENT_MIL_FINE/1000.0;
421  }
422 
423  if( event.GetWheelRotation() >= 0 )
424  step = -step;
425 
426  double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
427 
428  curr_value += step;
429  curr_value = std::max( -MAX_OFFSET, curr_value );
430  curr_value = std::min( curr_value, MAX_OFFSET );
431 
432  textCtrl->SetValue( formatOffsetValue( curr_value ) );
433 }
EDA_UNITS m_userUnits
Index into m_parentInfoList.
Definition: panel_prev_3d.h:93
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatOffsetValue(double aValue)
#define OFFSET_INCREMENT_MM_FINE
Definition: panel_prev_3d.h:60
#define OFFSET_INCREMENT_MIL
Definition: panel_prev_3d.h:62
#define OFFSET_INCREMENT_MIL_FINE
Definition: panel_prev_3d.h:63
#define MAX_OFFSET
Definition: panel_prev_3d.h:50
#define OFFSET_INCREMENT_MM
Definition: panel_prev_3d.h:59

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

◆ onMouseWheelRot()

void PANEL_PREV_3D::onMouseWheelRot ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 384 of file panel_prev_3d.cpp.

385 {
386  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
387 
388  double step = ROTATION_INCREMENT_WHEEL;
389 
390  if( event.ShiftDown( ) )
392 
393  if( event.GetWheelRotation() >= 0 )
394  step = -step;
395 
396  double curr_value = DoubleValueFromString( EDA_UNITS::DEGREES, textCtrl->GetValue() ) / 10.0;
397 
398  curr_value += step;
399  curr_value = std::max( -MAX_ROTATION, curr_value );
400  curr_value = std::min( curr_value, MAX_ROTATION );
401 
402  textCtrl->SetValue( formatRotationValue( curr_value ) );
403 }
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatRotationValue(double aValue)
#define ROTATION_INCREMENT_WHEEL
Definition: panel_prev_3d.h:56
#define ROTATION_INCREMENT_WHEEL_FINE
Definition: panel_prev_3d.h:57
#define MAX_ROTATION
Definition: panel_prev_3d.h:49

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

◆ onMouseWheelScale()

void PANEL_PREV_3D::onMouseWheelScale ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 362 of file panel_prev_3d.cpp.

363 {
364  wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
365 
366  double step = SCALE_INCREMENT;
367 
368  if( event.ShiftDown( ) )
369  step = SCALE_INCREMENT_FINE;
370 
371  if( event.GetWheelRotation() >= 0 )
372  step = -step;
373 
374  double curr_value = DoubleValueFromString( EDA_UNITS::UNSCALED, textCtrl->GetValue() );
375 
376  curr_value += step;
377  curr_value = std::max( 1/MAX_SCALE, curr_value );
378  curr_value = std::min( curr_value, MAX_SCALE );
379 
380  textCtrl->SetValue( formatScaleValue( curr_value ) );
381 }
#define MAX_SCALE
Definition: panel_prev_3d.h:48
#define SCALE_INCREMENT_FINE
Definition: panel_prev_3d.h:52
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
wxString formatScaleValue(double aValue)
#define SCALE_INCREMENT
Definition: panel_prev_3d.h:53

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

◆ onOpacitySlider()

void PANEL_PREV_3D::onOpacitySlider ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 280 of file panel_prev_3d.cpp.

281 {
282  if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
283  {
284  // Write settings back to the parent
285  MODULE_3D_SETTINGS* modelInfo = &m_parentModelList->at( (unsigned) m_selected );
286 
287  modelInfo->m_Opacity = m_opacity->GetValue() / 100.0;
288 
289  // Update the dummy module for the preview
290  UpdateDummyModule( false );
291  }
292 }
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
Definition: panel_prev_3d.h:90

References PANEL_PREV_3D_BASE::m_opacity, MODULE_3D_SETTINGS::m_Opacity, m_parentModelList, m_selected, and UpdateDummyModule().

◆ 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  GetToolManager()->PostEvent( evt );
88  }
89  }
90  else
92 
93  return;
94  }
95  }
96 }
virtual void DisplayToolMsg(const wxString &msg)
Definition: tools_holder.h:89
TOOL_ACTION * FindAction(const std::string &aActionName) const
Function FindAction() Finds an action with a given name (if there is one available).
TOOL_EVENT.
Definition: tool_event.h:171
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:48
std::vector< std::string > m_toolStack
Definition: tools_holder.h:52
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:194
TOOL_ACTION.
Definition: tool_action.h:46
TOOL_EVENT MakeEvent() const
Function MakeEvent() Returns the event associated with the action (i.e.
Definition: tool_action.h:107
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:74
void PostEvent(const TOOL_EVENT &aEvent)
Puts an event to the event queue to be processed at the end of event processing cycle.
Definition: tool_manager.h:268
static TOOL_ACTION selectionTool
Definition: actions.h:147
void SetHasPosition(bool aHasPosition)
Definition: tool_event.h:261

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, and TOOL_EVENT::SetHasPosition().

Referenced by 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(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), LIB_MOVE_TOOL::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_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(), 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:89
TOOL_ACTION * FindAction(const std::string &aActionName) const
Function FindAction() Finds an action with a given name (if there is one available).
wxString GetLabel() const
Definition: tool_action.cpp:69
TOOL_MANAGER * m_toolManager
Definition: tools_holder.h:48
std::vector< std::string > m_toolStack
Definition: tools_holder.h:52
ACTION_MANAGER * GetActionManager()
Definition: tool_manager.h:194
TOOL_ACTION.
Definition: tool_action.h:46

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

Referenced by 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(), LIB_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), LIB_MOVE_TOOL::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_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(), 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 119 of file tools_holder.h.

119 { }

Referenced by TOOL_MANAGER::ProcessEvent().

◆ SetSelectedModel()

void PANEL_PREV_3D::SetSelectedModel ( int  idx)

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

Definition at line 210 of file panel_prev_3d.cpp.

211 {
212  if( m_parentModelList && idx >= 0 && idx < (int) m_parentModelList->size() )
213  {
214  m_selected = idx;
215  const MODULE_3D_SETTINGS& modelInfo = m_parentModelList->at( (unsigned) m_selected );
216 
217  // Use ChangeValue() instead of SetValue(). It's not the user making the change, so we
218  // don't want to generate wxEVT_GRID_CELL_CHANGED events.
219 
220  xscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.x ) );
221  yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
222  zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
223 
224  xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
225  yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
226  zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
227 
228  xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
229  yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
230  zoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.z ) );
231 
232  m_opacity->SetValue( modelInfo.m_Opacity * 100.0 );
233  }
234  else
235  {
236  m_selected = -1;
237 
238  xscale->ChangeValue( wxEmptyString );
239  yscale->ChangeValue( wxEmptyString );
240  zscale->ChangeValue( wxEmptyString );
241 
242  xrot->ChangeValue( wxEmptyString );
243  yrot->ChangeValue( wxEmptyString );
244  zrot->ChangeValue( wxEmptyString );
245 
246  xoff->ChangeValue( wxEmptyString );
247  yoff->ChangeValue( wxEmptyString );
248  zoff->ChangeValue( wxEmptyString );
249 
250  m_opacity->SetValue( 100 );
251  }
252 }
wxString formatRotationValue(double aValue)
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
Definition: panel_prev_3d.h:90
wxString formatScaleValue(double aValue)
VECTOR3D m_Offset
3D model offset (mm)
Definition: class_module.h:94
wxString formatOffsetValue(double aValue)
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: class_module.h:93
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: class_module.h:92

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

Referenced by DIALOG_FOOTPRINT_FP_EDITOR::select3DModel(), and DIALOG_FOOTPRINT_BOARD_EDITOR::select3DModel().

◆ ToolStackIsEmpty()

◆ UpdateDummyModule()

void PANEL_PREV_3D::UpdateDummyModule ( bool  aRelaodRequired = true)

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

Definition at line 436 of file panel_prev_3d.cpp.

437 {
438  m_dummyModule->Models().clear();
439 
440  for( MODULE_3D_SETTINGS& model : *m_parentModelList)
441  {
442  if( model.m_Show )
443  m_dummyModule->Models().push_back( model );
444  }
445 
446  if( aReloadRequired )
448 
450 }
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
Definition: panel_prev_3d.h:90
void Request_refresh(bool aRedrawImmediately=true)
Request_refresh - Schedule a refresh update of the canvas.
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
MODULE * m_dummyModule
Definition: panel_prev_3d.h:88
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
std::list< MODULE_3D_SETTINGS > & Models()
Definition: class_module.h:201

References m_dummyModule, m_parentModelList, m_previewPane, MODULE::Models(), EDA_3D_CANVAS::ReloadRequest(), and EDA_3D_CANVAS::Request_refresh().

Referenced by DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_BOARD_EDITOR::Cfg3DPath(), DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_BOARD_EDITOR::On3DModelCellChanged(), DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnAdd3DModel(), onOpacitySlider(), DIALOG_FOOTPRINT_FP_EDITOR::OnRemove3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::OnRemove3DModel(), DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow(), and updateOrientation().

◆ updateOrientation()

void PANEL_PREV_3D::updateOrientation ( wxCommandEvent &  event)
overrideprivatevirtual

updateOrientation - it will receive the events from editing the fields

Parameters
event

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 255 of file panel_prev_3d.cpp.

256 {
257  if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
258  {
259  // Write settings back to the parent
260  MODULE_3D_SETTINGS* modelInfo = &m_parentModelList->at( (unsigned) m_selected );
261 
262  modelInfo->m_Scale.x = DoubleValueFromString( EDA_UNITS::UNSCALED, xscale->GetValue() );
263  modelInfo->m_Scale.y = DoubleValueFromString( EDA_UNITS::UNSCALED, yscale->GetValue() );
264  modelInfo->m_Scale.z = DoubleValueFromString( EDA_UNITS::UNSCALED, zscale->GetValue() );
265 
266  modelInfo->m_Rotation.x = rotationFromString( xrot->GetValue() );
267  modelInfo->m_Rotation.y = rotationFromString( yrot->GetValue() );
268  modelInfo->m_Rotation.z = rotationFromString( zrot->GetValue() );
269 
270  modelInfo->m_Offset.x = DoubleValueFromString( m_userUnits, xoff->GetValue() ) / IU_PER_MM;
271  modelInfo->m_Offset.y = DoubleValueFromString( m_userUnits, yoff->GetValue() ) / IU_PER_MM;
272  modelInfo->m_Offset.z = DoubleValueFromString( m_userUnits, zoff->GetValue() ) / IU_PER_MM;
273 
274  // Update the dummy module for the preview
275  UpdateDummyModule( false );
276  }
277 }
static double rotationFromString(const wxString &aValue)
rotationFromString Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION aRotation will be normalized betw...
EDA_UNITS m_userUnits
Index into m_parentInfoList.
Definition: panel_prev_3d.h:93
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, bool aUseMils, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
Definition: base_units.cpp:346
void UpdateDummyModule(bool aRelaodRequired=true)
UpdateModelInfoList - copy shapes from the current shape list which are flagged for preview to the co...
std::vector< MODULE_3D_SETTINGS > * m_parentModelList
Definition: panel_prev_3d.h:90
VECTOR3D m_Offset
3D model offset (mm)
Definition: class_module.h:94
VECTOR3D m_Rotation
3D model rotation (degrees)
Definition: class_module.h:93
VECTOR3D m_Scale
3D model scaling factor (dimensionless)
Definition: class_module.h:92

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

◆ View3DBack()

void PANEL_PREV_3D::View3DBack ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 179 of file panel_prev_3d.h.

180  {
182  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DBottom()

void PANEL_PREV_3D::View3DBottom ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 184 of file panel_prev_3d.h.

185  {
187  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DFront()

void PANEL_PREV_3D::View3DFront ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 158 of file panel_prev_3d.h.

159  {
161  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DISO()

void PANEL_PREV_3D::View3DISO ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 147 of file panel_prev_3d.h.

148  {
150  m_previewPane->Refresh();
151  }
CCAMERA & m_currentCamera
Definition: panel_prev_3d.h:84
void ToggleProjection()
Definition: ccamera.cpp:437
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82

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

◆ View3DLeft()

void PANEL_PREV_3D::View3DLeft ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 153 of file panel_prev_3d.h.

154  {
156  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DRight()

void PANEL_PREV_3D::View3DRight ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 174 of file panel_prev_3d.h.

175  {
177  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DTop()

void PANEL_PREV_3D::View3DTop ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 163 of file panel_prev_3d.h.

164  {
166  }
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82
bool SetView3D(int aKeycode)
SetView3D - Helper function to call view commands.

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

◆ View3DUpdate()

void PANEL_PREV_3D::View3DUpdate ( wxCommandEvent &  event)
inlineoverrideprivatevirtual

Reimplemented from PANEL_PREV_3D_BASE.

Definition at line 168 of file panel_prev_3d.h.

169  {
171  m_previewPane->Refresh();
172  }
void ReloadRequest(BOARD *aBoard=NULL, S3D_CACHE *aCachePointer=NULL)
EDA_3D_CANVAS * m_previewPane
Definition: panel_prev_3d.h:82

References m_previewPane, and EDA_3D_CANVAS::ReloadRequest().

Member Data Documentation

◆ m_actions

◆ m_boardAdapter

BOARD_ADAPTER PANEL_PREV_3D::m_boardAdapter
private

Definition at line 83 of file panel_prev_3d.h.

Referenced by GetAdapter(), loadCommonSettings(), and PANEL_PREV_3D().

◆ m_bpUpdate

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpUpdate
protectedinherited

◆ m_bpvBack

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvBack
protectedinherited

◆ m_bpvBottom

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvBottom
protectedinherited

◆ m_bpvFront

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvFront
protectedinherited

◆ m_bpvISO

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvISO
protectedinherited

◆ m_bpvLeft

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvLeft
protectedinherited

◆ m_bpvRight

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvRight
protectedinherited

◆ m_bpvTop

wxBitmapButton* PANEL_PREV_3D_BASE::m_bpvTop
protectedinherited

◆ m_currentCamera

CCAMERA& PANEL_PREV_3D::m_currentCamera
private

Definition at line 84 of file panel_prev_3d.h.

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

◆ m_dragSelects

bool TOOLS_HOLDER::m_dragSelects
protectedinherited

◆ m_dummyBoard

BOARD* PANEL_PREV_3D::m_dummyBoard
private

Definition at line 87 of file panel_prev_3d.h.

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

◆ m_dummyModule

MODULE* PANEL_PREV_3D::m_dummyModule
private

Definition at line 88 of file panel_prev_3d.h.

Referenced by PANEL_PREV_3D(), and UpdateDummyModule().

◆ m_immediateActions

bool TOOLS_HOLDER::m_immediateActions
protectedinherited

◆ m_moveWarpsCursor

bool TOOLS_HOLDER::m_moveWarpsCursor
protectedinherited

◆ m_opacity

wxSlider* PANEL_PREV_3D_BASE::m_opacity
protectedinherited

◆ m_parentModelList

std::vector<MODULE_3D_SETTINGS>* PANEL_PREV_3D::m_parentModelList
private

◆ m_previewPane

◆ m_selected

int PANEL_PREV_3D::m_selected
private

◆ m_SizerPanelView

wxBoxSizer* PANEL_PREV_3D_BASE::m_SizerPanelView
protectedinherited

Definition at line 69 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D(), and PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_spinXoffset

wxSpinButton* PANEL_PREV_3D_BASE::m_spinXoffset
protectedinherited

◆ m_spinXrot

wxSpinButton* PANEL_PREV_3D_BASE::m_spinXrot
protectedinherited

◆ m_spinXscale

wxSpinButton* PANEL_PREV_3D_BASE::m_spinXscale
protectedinherited

◆ m_spinYoffset

wxSpinButton* PANEL_PREV_3D_BASE::m_spinYoffset
protectedinherited

◆ m_spinYrot

wxSpinButton* PANEL_PREV_3D_BASE::m_spinYrot
protectedinherited

◆ m_spinYscale

wxSpinButton* PANEL_PREV_3D_BASE::m_spinYscale
protectedinherited

◆ m_spinZoffset

wxSpinButton* PANEL_PREV_3D_BASE::m_spinZoffset
protectedinherited

◆ m_spinZrot

wxSpinButton* PANEL_PREV_3D_BASE::m_spinZrot
protectedinherited

◆ m_spinZscale

wxSpinButton* PANEL_PREV_3D_BASE::m_spinZscale
protectedinherited

◆ m_staticText1

wxStaticText* PANEL_PREV_3D_BASE::m_staticText1
protectedinherited

Definition at line 42 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText11

wxStaticText* PANEL_PREV_3D_BASE::m_staticText11
protectedinherited

Definition at line 51 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText12

wxStaticText* PANEL_PREV_3D_BASE::m_staticText12
protectedinherited

Definition at line 60 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText2

wxStaticText* PANEL_PREV_3D_BASE::m_staticText2
protectedinherited

Definition at line 45 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText21

wxStaticText* PANEL_PREV_3D_BASE::m_staticText21
protectedinherited

Definition at line 54 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText22

wxStaticText* PANEL_PREV_3D_BASE::m_staticText22
protectedinherited

Definition at line 63 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText3

wxStaticText* PANEL_PREV_3D_BASE::m_staticText3
protectedinherited

Definition at line 48 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText31

wxStaticText* PANEL_PREV_3D_BASE::m_staticText31
protectedinherited

Definition at line 57 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_staticText32

wxStaticText* PANEL_PREV_3D_BASE::m_staticText32
protectedinherited

Definition at line 65 of file panel_prev_3d_base.h.

Referenced by PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE().

◆ m_toolDispatcher

◆ m_toolManager

TOOL_MANAGER* TOOLS_HOLDER::m_toolManager
protectedinherited

Definition at line 48 of file tools_holder.h.

Referenced by PCB_BASE_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ActivateGalCanvas(), SCH_EDIT_FRAME::AddJunction(), EDA_BASE_FRAME::AddStandardHelpMenu(), EDA_DRAW_FRAME::AddStandardSubMenus(), SCH_EDIT_FRAME::AppendSchematic(), GERBVIEW_FRAME::Clear_DrawLayers(), SCH_EDIT_FRAME::ConvertPart(), EDA_3D_VIEWER::CreateMenuBar(), LIB_EDIT_FRAME::CreateNewPart(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), LIB_VIEW_FRAME::DClickOnCmpList(), SCH_EDIT_FRAME::DeleteJunction(), SCH_EDIT_FRAME::DisplayCurrentSheet(), LIB_EDIT_FRAME::emptyScreen(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), SCH_EDIT_FRAME::ExecuteRemoteCommand(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), LIB_EDIT_FRAME::GetComponentFromRedoList(), LIB_EDIT_FRAME::GetComponentFromUndoList(), TOOLS_HOLDER::GetToolManager(), PL_EDITOR_FRAME::HardRedraw(), LIB_EDIT_FRAME::HardRedraw(), SCH_EDIT_FRAME::importFile(), PCB_BASE_FRAME::InstallPadOptionsFrame(), SCH_EDIT_FRAME::KiwayMailIn(), PCB_EDIT_FRAME::KiwayMailIn(), LIB_EDIT_FRAME::LoadComponentFromCurrentLib(), LIB_EDIT_FRAME::LoadOneLibraryPartAux(), LIB_EDIT_FRAME::LoadOneSymbol(), SCH_EDIT_FRAME::OnCloseWindow(), GERBVIEW_FRAME::OnCloseWindow(), LIB_EDIT_FRAME::OnExportBody(), LIB_EDIT_FRAME::OnImportBody(), PL_EDITOR_FRAME::OnNewPageLayout(), KICAD_MANAGER_FRAME::OnOpenFileInTextEditor(), EDA_DRAW_FRAME::OnSelectGrid(), LIB_EDIT_FRAME::OnSelectUnit(), EDA_DRAW_FRAME::OnSelectZoom(), SCH_EDIT_FRAME::OpenProjectFiles(), PANEL_PREV_3D(), TOOLS_HOLDER::PopTool(), TOOLS_HOLDER::PushTool(), SCH_EDIT_FRAME::PutDataInPreviousState(), LIB_VIEW_FRAME::ReCreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), PL_EDITOR_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), SCH_EDIT_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateVToolbar(), CVPCB_MAINFRAME::refreshAfterComponentSearch(), SCH_BASE_FRAME::RefreshSelection(), FOOTPRINT_WIZARD_FRAME::ReloadFootprint(), LIB_EDIT_FRAME::RollbackPartFromUndo(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), LIB_EDIT_FRAME::saveLibrary(), SCH_EDIT_FRAME::SchematicCleanUp(), GERBVIEW_FRAME::SetActiveLayer(), PCB_BASE_EDIT_FRAME::SetBoard(), LIB_EDIT_FRAME::SetCurPart(), LIB_VIEW_FRAME::SetSelectedComponent(), PL_EDITOR_FRAME::setupTools(), FOOTPRINT_EDIT_FRAME::setupTools(), LIB_VIEW_FRAME::setupTools(), GERBVIEW_FRAME::setupTools(), LIB_EDIT_FRAME::setupTools(), CVPCB_MAINFRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), PCB_BASE_FRAME::unitsChangeRefresh(), 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(), LIB_EDIT_FRAME::~LIB_EDIT_FRAME(), LIB_VIEW_FRAME::~LIB_VIEW_FRAME(), PL_EDITOR_FRAME::~PL_EDITOR_FRAME(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().

◆ m_toolStack

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

◆ m_trackBallCamera

CTRACK_BALL PANEL_PREV_3D::m_trackBallCamera
private

Definition at line 85 of file panel_prev_3d.h.

◆ m_userUnits

EDA_UNITS PANEL_PREV_3D::m_userUnits
private

Index into m_parentInfoList.

Definition at line 93 of file panel_prev_3d.h.

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

◆ xoff

wxTextCtrl* PANEL_PREV_3D_BASE::xoff
protectedinherited

◆ xrot

wxTextCtrl* PANEL_PREV_3D_BASE::xrot
protectedinherited

◆ xscale

wxTextCtrl* PANEL_PREV_3D_BASE::xscale
protectedinherited

◆ yoff

◆ yrot

wxTextCtrl* PANEL_PREV_3D_BASE::yrot
protectedinherited

◆ yscale

wxTextCtrl* PANEL_PREV_3D_BASE::yscale
protectedinherited

◆ zoff

wxTextCtrl* PANEL_PREV_3D_BASE::zoff
protectedinherited

◆ zrot

wxTextCtrl* PANEL_PREV_3D_BASE::zrot
protectedinherited

◆ zscale

wxTextCtrl* PANEL_PREV_3D_BASE::zscale
protectedinherited

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