Naming conventions.
This commit is contained in:
parent
afc75fa873
commit
89718dd3ba
|
@ -27,7 +27,7 @@
|
||||||
#include "3d_info.h"
|
#include "3d_info.h"
|
||||||
#include "3d_cache.h"
|
#include "3d_cache.h"
|
||||||
#include "3d_cache_dialogs.h"
|
#include "3d_cache_dialogs.h"
|
||||||
#include "dlg_select_3dmodel.h"
|
#include "dialog_select_3d_model.h"
|
||||||
|
|
||||||
|
|
||||||
bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevModelSelectDir,
|
bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevModelSelectDir,
|
||||||
|
@ -36,7 +36,7 @@ bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevMod
|
||||||
if( NULL == aModel )
|
if( NULL == aModel )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
DLG_SELECT_3DMODEL dm( aParent, aCache, aModel, prevModelSelectDir, prevModelWildcard );
|
DIALOG_SELECT_3DMODEL dm( aParent, aCache, aModel, prevModelSelectDir, prevModelWildcard );
|
||||||
|
|
||||||
// Use QuasiModal so that Configure3DPaths (and its help window) will work
|
// Use QuasiModal so that Configure3DPaths (and its help window) will work
|
||||||
return dm.ShowQuasiModal() == wxID_OK;
|
return dm.ShowQuasiModal() == wxID_OK;
|
||||||
|
|
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include "dlg_select_3dmodel.h"
|
#include "dialog_select_3d_model.h"
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
#include "3d_cache/3d_info.h"
|
#include "3d_cache/3d_info.h"
|
||||||
#include "3d_cache/3d_cache.h"
|
#include "3d_cache/3d_cache.h"
|
||||||
#include "3d_cache_dialogs.h"
|
#include "3d_cache_dialogs.h"
|
||||||
#include <3d_model_viewer/3d_model_viewer.h>
|
#include <3d_model_viewer/eda_3d_model_viewer.h>
|
||||||
#include <common_ogl/ogl_attr_list.h>
|
#include <common_ogl/ogl_attr_list.h>
|
||||||
#include <filename_resolver.h>
|
#include <filename_resolver.h>
|
||||||
#include <pcbnew/footprint.h>
|
#include <pcbnew/footprint.h>
|
||||||
|
@ -40,25 +40,19 @@
|
||||||
#include <kiplatform/ui.h>
|
#include <kiplatform/ui.h>
|
||||||
|
|
||||||
|
|
||||||
DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager,
|
DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager,
|
||||||
FP_3DMODEL* aModelItem, wxString& prevModelSelectDir,
|
FP_3DMODEL* aModelItem, wxString& prevModelSelectDir,
|
||||||
int& prevModelWildcard ) :
|
int& prevModelWildcard ) :
|
||||||
DLG_SELECT_3D_MODELE_BASE( aParent ),
|
DIALOG_SELECT_3D_MODEL_BASE( aParent ),
|
||||||
m_model( aModelItem ), m_cache( aCacheManager ), m_previousDir( prevModelSelectDir ),
|
m_model( aModelItem ),
|
||||||
m_previousFilterIndex( prevModelWildcard )
|
m_cache( aCacheManager ),
|
||||||
|
m_resolver( aCacheManager ? aCacheManager->GetResolver() : nullptr ),
|
||||||
|
m_previousDir( prevModelSelectDir ),
|
||||||
|
m_modelViewer( nullptr )
|
||||||
{
|
{
|
||||||
if( NULL != m_cache )
|
m_modelViewer = new EDA_3D_MODEL_VIEWER( m_pane3Dviewer,
|
||||||
m_resolver = m_cache->GetResolver();
|
OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
||||||
else
|
m_cache );
|
||||||
m_resolver = NULL;
|
|
||||||
|
|
||||||
// set to NULL to avoid segfaults when m_FileTree is instantiated
|
|
||||||
// and wxGenericDirCtrl events are posted
|
|
||||||
m_modelViewer = NULL;
|
|
||||||
|
|
||||||
m_modelViewer = new C3D_MODEL_VIEWER( m_pane3Dviewer,
|
|
||||||
OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
|
||||||
m_cache );
|
|
||||||
m_modelViewer->SetMinSize( wxSize( 400, -1 ) );
|
m_modelViewer->SetMinSize( wxSize( 400, -1 ) );
|
||||||
m_Sizer3Dviewer->Add( m_modelViewer, 1, wxEXPAND|wxRIGHT, 5 );
|
m_Sizer3Dviewer->Add( m_modelViewer, 1, wxEXPAND|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
@ -102,13 +96,19 @@ DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheMana
|
||||||
m_FileTree->SetFilter( full_filter );
|
m_FileTree->SetFilter( full_filter );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_FileTree->SetFilter( filter );
|
m_FileTree->SetFilter( filter );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
m_FileTree->SetFilter( wxFileSelectorDefaultWildcardStr );
|
m_FileTree->SetFilter( wxFileSelectorDefaultWildcardStr );
|
||||||
|
}
|
||||||
|
|
||||||
if( prevModelWildcard >= 0 && prevModelWildcard < (int)fl->size() )
|
if( prevModelWildcard >= 0 && prevModelWildcard < (int)fl->size() )
|
||||||
|
{
|
||||||
m_FileTree->SetFilterIndex( prevModelWildcard );
|
m_FileTree->SetFilterIndex( prevModelWildcard );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
prevModelWildcard = 0;
|
prevModelWildcard = 0;
|
||||||
|
@ -138,7 +138,7 @@ DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheMana
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DLG_SELECT_3DMODEL::TransferDataFromWindow()
|
bool DIALOG_SELECT_3DMODEL::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
if( !m_model || !m_FileTree )
|
if( !m_model || !m_FileTree )
|
||||||
return true;
|
return true;
|
||||||
|
@ -160,7 +160,6 @@ bool DLG_SELECT_3DMODEL::TransferDataFromWindow()
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
m_previousDir = m_FileTree->GetPath();
|
m_previousDir = m_FileTree->GetPath();
|
||||||
m_previousFilterIndex = m_FileTree->GetFilterIndex();
|
|
||||||
|
|
||||||
// file selection mode: retrieve the filename and specify a
|
// file selection mode: retrieve the filename and specify a
|
||||||
// path relative to one of the config paths
|
// path relative to one of the config paths
|
||||||
|
@ -172,14 +171,14 @@ bool DLG_SELECT_3DMODEL::TransferDataFromWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DLG_SELECT_3DMODEL::OnSelectionChanged( wxCommandEvent& event )
|
void DIALOG_SELECT_3DMODEL::OnSelectionChanged( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( m_modelViewer )
|
if( m_modelViewer )
|
||||||
m_modelViewer->Set3DModel( m_FileTree->GetFilePath() );
|
m_modelViewer->Set3DModel( m_FileTree->GetFilePath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DLG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event )
|
void DIALOG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( m_modelViewer )
|
if( m_modelViewer )
|
||||||
m_modelViewer->Set3DModel( m_FileTree->GetFilePath() );
|
m_modelViewer->Set3DModel( m_FileTree->GetFilePath() );
|
||||||
|
@ -188,21 +187,21 @@ void DLG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DLG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event )
|
void DIALOG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( m_FileTree && m_dirChoices->GetSelection() > 0 )
|
if( m_FileTree && m_dirChoices->GetSelection() > 0 )
|
||||||
m_FileTree->SetPath( m_dirChoices->GetString( m_dirChoices->GetSelection() ) );
|
m_FileTree->SetPath( m_dirChoices->GetString( m_dirChoices->GetSelection() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DLG_SELECT_3DMODEL::Cfg3DPaths( wxCommandEvent& event )
|
void DIALOG_SELECT_3DMODEL::Cfg3DPaths( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( S3D::Configure3DPaths( this, m_resolver ) )
|
if( S3D::Configure3DPaths( this, m_resolver ) )
|
||||||
updateDirChoiceList();
|
updateDirChoiceList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DLG_SELECT_3DMODEL::updateDirChoiceList( void )
|
void DIALOG_SELECT_3DMODEL::updateDirChoiceList( void )
|
||||||
{
|
{
|
||||||
if( !m_FileTree || !m_resolver || !m_dirChoices )
|
if( !m_FileTree || !m_resolver || !m_dirChoices )
|
||||||
return;
|
return;
|
|
@ -22,27 +22,21 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
#ifndef DIALOG_SELECT_3DMODEL_H
|
||||||
* @file dlg_select_3dmodel.h
|
#define DIALOG_SELECT_3DMODEL_H
|
||||||
* creates a dialog to select 3D model files
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
#include "dialog_select_3d_model_base.h"
|
||||||
#ifndef DLG_SELECT_3DMODEL_H
|
|
||||||
#define DLG_SELECT_3DMODEL_H
|
|
||||||
|
|
||||||
#include "dlg_select_3dmodel_base.h"
|
|
||||||
|
|
||||||
class FP_3DMODEL;
|
class FP_3DMODEL;
|
||||||
class S3D_CACHE;
|
class S3D_CACHE;
|
||||||
class FILENAME_RESOLVER;
|
class FILENAME_RESOLVER;
|
||||||
class C3D_MODEL_VIEWER;
|
class EDA_3D_MODEL_VIEWER;
|
||||||
|
|
||||||
class DLG_SELECT_3DMODEL : public DLG_SELECT_3D_MODELE_BASE
|
class DIALOG_SELECT_3DMODEL : public DIALOG_SELECT_3D_MODEL_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem,
|
DIALOG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem,
|
||||||
wxString& prevModelSelectDir, int& prevModelWildcard );
|
wxString& prevModelSelectDir, int& prevModelWildcard );
|
||||||
|
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
void OnSelectionChanged( wxCommandEvent& event )override;
|
void OnSelectionChanged( wxCommandEvent& event )override;
|
||||||
|
@ -53,14 +47,13 @@ public:
|
||||||
private:
|
private:
|
||||||
void updateDirChoiceList( void );
|
void updateDirChoiceList( void );
|
||||||
|
|
||||||
FP_3DMODEL* m_model; // data for the selected model
|
FP_3DMODEL* m_model; // data for the selected model
|
||||||
S3D_CACHE* m_cache; // cache manager
|
S3D_CACHE* m_cache; // cache manager
|
||||||
FILENAME_RESOLVER* m_resolver; // 3D filename resolver
|
FILENAME_RESOLVER* m_resolver; // 3D filename resolver
|
||||||
|
|
||||||
wxString& m_previousDir;
|
wxString& m_previousDir;
|
||||||
int& m_previousFilterIndex;
|
|
||||||
|
|
||||||
C3D_MODEL_VIEWER* m_modelViewer;
|
EDA_3D_MODEL_VIEWER* m_modelViewer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DLG_SELECT_3DMODEL_H
|
#endif // DIALOG_SELECT_3DMODEL_H
|
|
@ -1,15 +1,15 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "dlg_select_3dmodel_base.h"
|
#include "dialog_select_3d_model_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
DIALOG_SELECT_3D_MODEL_BASE::DIALOG_SELECT_3D_MODEL_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||||
{
|
{
|
||||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindow
|
||||||
bSizerUpper->SetMinSize( wxSize( -1,400 ) );
|
bSizerUpper->SetMinSize( wxSize( -1,400 ) );
|
||||||
m_splitterWin = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
|
m_splitterWin = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
|
||||||
m_splitterWin->SetSashGravity( 0.35 );
|
m_splitterWin->SetSashGravity( 0.35 );
|
||||||
m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DLG_SELECT_3D_MODELE_BASE::m_splitterWinOnIdle ), NULL, this );
|
m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SELECT_3D_MODEL_BASE::m_splitterWinOnIdle ), NULL, this );
|
||||||
|
|
||||||
m_panelLeft = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
m_panelLeft = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
wxBoxSizer* bSizerLeft;
|
wxBoxSizer* bSizerLeft;
|
||||||
|
@ -87,18 +87,18 @@ DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindow
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this );
|
m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this );
|
||||||
m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this );
|
m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this );
|
||||||
m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this );
|
m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this );
|
||||||
m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this );
|
m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
DLG_SELECT_3D_MODELE_BASE::~DLG_SELECT_3D_MODELE_BASE()
|
DIALOG_SELECT_3D_MODEL_BASE::~DIALOG_SELECT_3D_MODEL_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this );
|
m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this );
|
||||||
m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this );
|
m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this );
|
||||||
m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this );
|
m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this );
|
||||||
m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this );
|
m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this );
|
||||||
|
|
||||||
}
|
}
|
|
@ -11,13 +11,12 @@
|
||||||
<property name="embedded_files_path">res</property>
|
<property name="embedded_files_path">res</property>
|
||||||
<property name="encoding">UTF-8</property>
|
<property name="encoding">UTF-8</property>
|
||||||
<property name="event_generation">connect</property>
|
<property name="event_generation">connect</property>
|
||||||
<property name="file">dlg_select_3dmodel_base</property>
|
<property name="file">dialog_select_3d_model_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
<property name="image_path_wrapper_function_name"></property>
|
|
||||||
<property name="indent_with_spaces"></property>
|
<property name="indent_with_spaces"></property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">dlg_select_3dmodel_base</property>
|
<property name="name">dialog_select_3d_model_base</property>
|
||||||
<property name="namespace"></property>
|
<property name="namespace"></property>
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="precompiled_header"></property>
|
||||||
|
@ -26,7 +25,6 @@
|
||||||
<property name="skip_php_events">1</property>
|
<property name="skip_php_events">1</property>
|
||||||
<property name="skip_python_events">1</property>
|
<property name="skip_python_events">1</property>
|
||||||
<property name="ui_table">UI</property>
|
<property name="ui_table">UI</property>
|
||||||
<property name="use_array_enum">0</property>
|
|
||||||
<property name="use_enum">0</property>
|
<property name="use_enum">0</property>
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<object class="Dialog" expanded="1">
|
||||||
|
@ -45,7 +43,7 @@
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DLG_SELECT_3D_MODELE_BASE</property>
|
<property name="name">DIALOG_SELECT_3D_MODEL_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">-1,-1</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
|
@ -466,7 +464,6 @@
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
#include <wx/splitter.h>
|
#include <wx/splitter.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/bitmap.h>
|
#include <wx/bitmap.h>
|
||||||
#include <wx/image.h>
|
#include <wx/image.h>
|
||||||
#include <wx/icon.h>
|
#include <wx/icon.h>
|
||||||
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DLG_SELECT_3D_MODELE_BASE
|
/// Class DIALOG_SELECT_3D_MODEL_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class DLG_SELECT_3D_MODELE_BASE : public DIALOG_SHIM
|
class DIALOG_SELECT_3D_MODEL_BASE : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -60,13 +60,13 @@ class DLG_SELECT_3D_MODELE_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select 3D Model"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_SELECT_3D_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select 3D Model"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DLG_SELECT_3D_MODELE_BASE();
|
~DIALOG_SELECT_3D_MODEL_BASE();
|
||||||
|
|
||||||
void m_splitterWinOnIdle( wxIdleEvent& )
|
void m_splitterWinOnIdle( wxIdleEvent& )
|
||||||
{
|
{
|
||||||
m_splitterWin->SetSashPosition( 300 );
|
m_splitterWin->SetSashPosition( 300 );
|
||||||
m_splitterWin->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DLG_SELECT_3D_MODELE_BASE::m_splitterWinOnIdle ), NULL, this );
|
m_splitterWin->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SELECT_3D_MODEL_BASE::m_splitterWinOnIdle ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
|
@ -24,12 +24,12 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "panel_prev_3d.h"
|
#include "panel_preview_3d_model.h"
|
||||||
#include <3d_canvas/eda_3d_canvas.h>
|
#include <3d_canvas/eda_3d_canvas.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <tool/tool_dispatcher.h>
|
#include <tool/tool_dispatcher.h>
|
||||||
#include <tools/3d_actions.h>
|
#include <tools/eda_3d_actions.h>
|
||||||
#include <tools/3d_controller.h>
|
#include <tools/eda_3d_controller.h>
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
@ -41,9 +41,10 @@
|
||||||
#include <widgets/infobar.h>
|
#include <widgets/infobar.h>
|
||||||
|
|
||||||
|
|
||||||
PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint,
|
PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAME* aFrame,
|
||||||
std::vector<FP_3DMODEL>* aParentModelList ) :
|
FOOTPRINT* aFootprint,
|
||||||
PANEL_PREV_3D_BASE( aParent, wxID_ANY ),
|
std::vector<FP_3DMODEL>* aParentModelList ) :
|
||||||
|
PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ),
|
||||||
m_previewPane( nullptr ),
|
m_previewPane( nullptr ),
|
||||||
m_infobar( nullptr ),
|
m_infobar( nullptr ),
|
||||||
m_boardAdapter(),
|
m_boardAdapter(),
|
||||||
|
@ -122,7 +123,7 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI
|
||||||
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
|
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
|
for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
|
||||||
Connect( eventType, wxMenuEventHandler( PANEL_PREV_3D::OnMenuEvent ), NULL, this );
|
Connect( eventType, wxMenuEventHandler( PANEL_PREVIEW_3D_MODEL::OnMenuEvent ), NULL, this );
|
||||||
|
|
||||||
#ifdef __WXOSX__
|
#ifdef __WXOSX__
|
||||||
// Call layout once to get the proper button sizes after the bitmaps have been set
|
// Call layout once to get the proper button sizes after the bitmaps have been set
|
||||||
|
@ -145,14 +146,14 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PANEL_PREV_3D::~PANEL_PREV_3D()
|
PANEL_PREVIEW_3D_MODEL::~PANEL_PREVIEW_3D_MODEL()
|
||||||
{
|
{
|
||||||
delete m_dummyBoard;
|
delete m_dummyBoard;
|
||||||
delete m_previewPane;
|
delete m_previewPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::OnMenuEvent( wxMenuEvent& aEvent )
|
void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( !m_toolDispatcher )
|
if( !m_toolDispatcher )
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
|
@ -161,7 +162,7 @@ void PANEL_PREV_3D::OnMenuEvent( wxMenuEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::loadCommonSettings()
|
void PANEL_PREVIEW_3D_MODEL::loadCommonSettings()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
|
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
|
||||||
|
|
||||||
|
@ -199,19 +200,19 @@ static double rotationFromString( const wxString& aValue )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString PANEL_PREV_3D::formatScaleValue( double aValue )
|
wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
|
||||||
{
|
{
|
||||||
return wxString::Format( "%.4f", aValue );
|
return wxString::Format( "%.4f", aValue );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString PANEL_PREV_3D::formatRotationValue( double aValue )
|
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
|
||||||
{
|
{
|
||||||
return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxString PANEL_PREV_3D::formatOffsetValue( double aValue )
|
wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue )
|
||||||
{
|
{
|
||||||
// Convert from internal units (mm) to user units
|
// Convert from internal units (mm) to user units
|
||||||
if( m_userUnits == EDA_UNITS::INCHES )
|
if( m_userUnits == EDA_UNITS::INCHES )
|
||||||
|
@ -221,7 +222,7 @@ wxString PANEL_PREV_3D::formatOffsetValue( double aValue )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::SetSelectedModel( int idx )
|
void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
|
||||||
{
|
{
|
||||||
if( m_parentModelList && idx >= 0 && idx < (int) m_parentModelList->size() )
|
if( m_parentModelList && idx >= 0 && idx < (int) m_parentModelList->size() )
|
||||||
{
|
{
|
||||||
|
@ -265,7 +266,7 @@ void PANEL_PREV_3D::SetSelectedModel( int idx )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event )
|
void PANEL_PREVIEW_3D_MODEL::updateOrientation( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
|
if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
|
||||||
{
|
{
|
||||||
|
@ -290,7 +291,7 @@ void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::onOpacitySlider( wxCommandEvent& event )
|
void PANEL_PREVIEW_3D_MODEL::onOpacitySlider( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
|
if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() )
|
||||||
{
|
{
|
||||||
|
@ -305,7 +306,7 @@ void PANEL_PREV_3D::onOpacitySlider( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::doIncrementScale( wxSpinEvent& event, double aSign )
|
void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign )
|
||||||
{
|
{
|
||||||
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
|
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
|
||||||
|
|
||||||
|
@ -326,7 +327,7 @@ void PANEL_PREV_3D::doIncrementScale( wxSpinEvent& event, double aSign )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::doIncrementRotation( wxSpinEvent& aEvent, double aSign )
|
void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aSign )
|
||||||
{
|
{
|
||||||
wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
|
wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
|
||||||
wxTextCtrl* textCtrl = xrot;
|
wxTextCtrl* textCtrl = xrot;
|
||||||
|
@ -346,7 +347,7 @@ void PANEL_PREV_3D::doIncrementRotation( wxSpinEvent& aEvent, double aSign )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::doIncrementOffset( wxSpinEvent& event, double aSign )
|
void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign )
|
||||||
{
|
{
|
||||||
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
|
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
|
||||||
|
|
||||||
|
@ -372,7 +373,7 @@ void PANEL_PREV_3D::doIncrementOffset( wxSpinEvent& event, double aSign )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event )
|
void PANEL_PREVIEW_3D_MODEL::onMouseWheelScale( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@ void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event )
|
void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||||
|
|
||||||
|
@ -416,7 +417,7 @@ void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event )
|
void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
|
||||||
|
|
||||||
|
@ -446,7 +447,7 @@ void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PANEL_PREV_3D::UpdateDummyFootprint( bool aReloadRequired )
|
void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired )
|
||||||
{
|
{
|
||||||
m_dummyFootprint->Models().clear();
|
m_dummyFootprint->Models().clear();
|
||||||
|
|
|
@ -33,10 +33,10 @@
|
||||||
* to tune the positioning of the models without invoking a file selector dialog.
|
* to tune the positioning of the models without invoking a file selector dialog.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef PANEL_PREV_MODEL_H
|
#ifndef PANEL_PREVIEW_3D_MODEL_H
|
||||||
#define PANEL_PREV_MODEL_H
|
#define PANEL_PREVIEW_3D_MODEL_H
|
||||||
|
|
||||||
#include "panel_prev_3d_base.h"
|
#include "panel_preview_3d_model_base.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <tool/tools_holder.h>
|
#include <tool/tools_holder.h>
|
||||||
|
@ -71,13 +71,13 @@ class BOARD;
|
||||||
class BOARD_ADAPTER;
|
class BOARD_ADAPTER;
|
||||||
class FOOTPRINT;
|
class FOOTPRINT;
|
||||||
|
|
||||||
class PANEL_PREV_3D: public EDA_3D_BOARD_HOLDER, public TOOLS_HOLDER, public PANEL_PREV_3D_BASE
|
class PANEL_PREVIEW_3D_MODEL: public EDA_3D_BOARD_HOLDER, public TOOLS_HOLDER, public PANEL_PREVIEW_3D_MODEL_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint,
|
PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint,
|
||||||
std::vector<FP_3DMODEL>* aParentModelList );
|
std::vector<FP_3DMODEL>* aParentModelList );
|
||||||
|
|
||||||
~PANEL_PREV_3D();
|
~PANEL_PREVIEW_3D_MODEL();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu
|
* The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu
|
||||||
|
@ -210,4 +210,4 @@ private:
|
||||||
EDA_UNITS m_userUnits;
|
EDA_UNITS m_userUnits;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PANEL_PREV_MODEL_H
|
#endif // PANEL_PREVIEW_3D_MODEL_H
|
|
@ -5,11 +5,11 @@
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "panel_prev_3d_base.h"
|
#include "panel_preview_3d_model_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
||||||
{
|
{
|
||||||
wxBoxSizer* bSizermain;
|
wxBoxSizer* bSizermain;
|
||||||
bSizermain = new wxBoxSizer( wxHORIZONTAL );
|
bSizermain = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
@ -231,100 +231,100 @@ PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const w
|
||||||
bSizermain->Fit( this );
|
bSizermain->Fit( this );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREV_3D_BASE::onOpacitySlider ), NULL, this );
|
m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
|
||||||
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
|
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
|
||||||
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
|
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
|
||||||
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
|
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
|
||||||
m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
|
m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this );
|
||||||
m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
|
m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBack ), NULL, this );
|
||||||
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
|
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
|
||||||
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
|
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
|
||||||
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
|
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
PANEL_PREV_3D_BASE::~PANEL_PREV_3D_BASE()
|
PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
|
zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this );
|
||||||
zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
|
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this );
|
||||||
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
|
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this );
|
||||||
xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
|
zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this );
|
||||||
zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
|
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this );
|
||||||
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
|
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this );
|
||||||
xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
|
zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this );
|
||||||
zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
|
zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this );
|
||||||
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
|
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
|
||||||
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
|
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
|
||||||
m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREV_3D_BASE::onOpacitySlider ), NULL, this );
|
m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
|
||||||
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
|
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
|
||||||
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
|
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
|
||||||
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
|
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
|
||||||
m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
|
m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this );
|
||||||
m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
|
m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBack ), NULL, this );
|
||||||
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
|
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
|
||||||
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
|
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
|
||||||
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
|
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
|
||||||
|
|
||||||
}
|
}
|
|
@ -11,12 +11,12 @@
|
||||||
<property name="embedded_files_path">res</property>
|
<property name="embedded_files_path">res</property>
|
||||||
<property name="encoding">UTF-8</property>
|
<property name="encoding">UTF-8</property>
|
||||||
<property name="event_generation">connect</property>
|
<property name="event_generation">connect</property>
|
||||||
<property name="file">panel_prev_3d_base</property>
|
<property name="file">panel_preview_3d_model_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
<property name="indent_with_spaces"></property>
|
<property name="indent_with_spaces"></property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">panel_prev_3d_base</property>
|
<property name="name">panel_preview_3d_model_base</property>
|
||||||
<property name="namespace"></property>
|
<property name="namespace"></property>
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="precompiled_header"></property>
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">PANEL_PREV_3D_BASE</property>
|
<property name="name">PANEL_PREVIEW_3D_MODEL_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">-1,-1</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
|
@ -32,9 +32,9 @@
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class PANEL_PREV_3D_BASE
|
/// Class PANEL_PREVIEW_3D_MODEL_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
class PANEL_PREV_3D_BASE : public wxPanel
|
class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -101,8 +101,8 @@ class PANEL_PREV_3D_BASE : public wxPanel
|
||||||
public:
|
public:
|
||||||
wxTextCtrl* yoff;
|
wxTextCtrl* yoff;
|
||||||
|
|
||||||
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 );
|
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 );
|
||||||
~PANEL_PREV_3D_BASE();
|
~PANEL_PREVIEW_3D_MODEL_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "3d_rendering/legacy/3d_model.h"
|
#include "3d_rendering/legacy/3d_model.h"
|
||||||
#include "3d_model_viewer.h"
|
#include "eda_3d_model_viewer.h"
|
||||||
#include "../3d_rendering/legacy/ogl_legacy_utils.h"
|
#include "../3d_rendering/legacy/ogl_legacy_utils.h"
|
||||||
#include "../3d_cache/3d_cache.h"
|
#include "../3d_cache/3d_cache.h"
|
||||||
#include "common_ogl/ogl_utils.h"
|
#include "common_ogl/ogl_utils.h"
|
||||||
|
@ -52,27 +52,27 @@
|
||||||
*
|
*
|
||||||
* @ingroup trace_env_vars
|
* @ingroup trace_env_vars
|
||||||
*/
|
*/
|
||||||
const wxChar* C3D_MODEL_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_MODEL_VIEWER" );
|
const wxChar* EDA_3D_MODEL_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_MODEL_VIEWER" );
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( C3D_MODEL_VIEWER, wxGLCanvas )
|
BEGIN_EVENT_TABLE( EDA_3D_MODEL_VIEWER, wxGLCanvas )
|
||||||
EVT_PAINT( C3D_MODEL_VIEWER::OnPaint )
|
EVT_PAINT( EDA_3D_MODEL_VIEWER::OnPaint )
|
||||||
|
|
||||||
// mouse events
|
// mouse events
|
||||||
EVT_LEFT_DOWN( C3D_MODEL_VIEWER::OnLeftDown )
|
EVT_LEFT_DOWN( EDA_3D_MODEL_VIEWER::OnLeftDown )
|
||||||
EVT_LEFT_UP( C3D_MODEL_VIEWER::OnLeftUp )
|
EVT_LEFT_UP( EDA_3D_MODEL_VIEWER::OnLeftUp )
|
||||||
EVT_MIDDLE_UP( C3D_MODEL_VIEWER::OnMiddleUp )
|
EVT_MIDDLE_UP( EDA_3D_MODEL_VIEWER::OnMiddleUp )
|
||||||
EVT_MIDDLE_DOWN(C3D_MODEL_VIEWER::OnMiddleDown)
|
EVT_MIDDLE_DOWN( EDA_3D_MODEL_VIEWER::OnMiddleDown)
|
||||||
EVT_RIGHT_DOWN( C3D_MODEL_VIEWER::OnRightClick )
|
EVT_RIGHT_DOWN( EDA_3D_MODEL_VIEWER::OnRightClick )
|
||||||
EVT_MOUSEWHEEL( C3D_MODEL_VIEWER::OnMouseWheel )
|
EVT_MOUSEWHEEL( EDA_3D_MODEL_VIEWER::OnMouseWheel )
|
||||||
EVT_MOTION( C3D_MODEL_VIEWER::OnMouseMove )
|
EVT_MOTION( EDA_3D_MODEL_VIEWER::OnMouseMove )
|
||||||
|
|
||||||
#ifdef USE_OSX_MAGNIFY_EVENT
|
#ifdef USE_OSX_MAGNIFY_EVENT
|
||||||
EVT_MAGNIFY( C3D_MODEL_VIEWER::OnMagnify )
|
EVT_MAGNIFY( EDA_3D_MODEL_VIEWER::OnMagnify )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// other events
|
// other events
|
||||||
EVT_ERASE_BACKGROUND( C3D_MODEL_VIEWER::OnEraseBackground )
|
EVT_ERASE_BACKGROUND( EDA_3D_MODEL_VIEWER::OnEraseBackground )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,13 +82,13 @@ END_EVENT_TABLE()
|
||||||
#define RANGE_SCALE_3D 8.0f
|
#define RANGE_SCALE_3D 8.0f
|
||||||
|
|
||||||
|
|
||||||
C3D_MODEL_VIEWER::C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList,
|
EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList,
|
||||||
S3D_CACHE* aCacheManager ) :
|
S3D_CACHE* aCacheManager ) :
|
||||||
HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize,
|
HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize,
|
||||||
wxFULL_REPAINT_ON_RESIZE ),
|
wxFULL_REPAINT_ON_RESIZE ),
|
||||||
m_trackBallCamera( RANGE_SCALE_3D * 2.0f ), m_cacheManager( aCacheManager )
|
m_trackBallCamera( RANGE_SCALE_3D * 2.0f ), m_cacheManager( aCacheManager )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::C3D_MODEL_VIEWER" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER" ) );
|
||||||
|
|
||||||
m_ogl_initialized = false;
|
m_ogl_initialized = false;
|
||||||
m_reload_is_needed = false;
|
m_reload_is_needed = false;
|
||||||
|
@ -100,9 +100,9 @@ C3D_MODEL_VIEWER::C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER()
|
EDA_3D_MODEL_VIEWER::~EDA_3D_MODEL_VIEWER()
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWERWER" ) );
|
||||||
|
|
||||||
if( m_glRC )
|
if( m_glRC )
|
||||||
{
|
{
|
||||||
|
@ -117,9 +117,9 @@ C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel )
|
void EDA_3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::Set3DModel with a S3DMODEL" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::Set3DModel with a S3DMODEL" ) );
|
||||||
|
|
||||||
// Validate a3DModel pointers
|
// Validate a3DModel pointers
|
||||||
wxASSERT( a3DModel.m_Materials != nullptr );
|
wxASSERT( a3DModel.m_Materials != nullptr );
|
||||||
|
@ -144,9 +144,9 @@ void C3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::Set3DModel(const wxString& aModelPathName)
|
void EDA_3D_MODEL_VIEWER::Set3DModel( const wxString& aModelPathName)
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::Set3DModel with a wxString" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::Set3DModel with a wxString" ) );
|
||||||
|
|
||||||
if( m_cacheManager )
|
if( m_cacheManager )
|
||||||
{
|
{
|
||||||
|
@ -160,7 +160,7 @@ void C3D_MODEL_VIEWER::Set3DModel(const wxString& aModelPathName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::Clear3DModel()
|
void EDA_3D_MODEL_VIEWER::Clear3DModel()
|
||||||
{
|
{
|
||||||
// Delete the old model
|
// Delete the old model
|
||||||
m_reload_is_needed = false;
|
m_reload_is_needed = false;
|
||||||
|
@ -174,7 +174,7 @@ void C3D_MODEL_VIEWER::Clear3DModel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::ogl_initialize()
|
void EDA_3D_MODEL_VIEWER::ogl_initialize()
|
||||||
{
|
{
|
||||||
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
|
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
|
||||||
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
|
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
|
||||||
|
@ -206,7 +206,7 @@ void C3D_MODEL_VIEWER::ogl_initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::ogl_set_arrow_material()
|
void EDA_3D_MODEL_VIEWER::ogl_set_arrow_material()
|
||||||
{
|
{
|
||||||
glEnable( GL_COLOR_MATERIAL );
|
glEnable( GL_COLOR_MATERIAL );
|
||||||
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
|
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
|
||||||
|
@ -218,14 +218,14 @@ void C3D_MODEL_VIEWER::ogl_set_arrow_material()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip( false );
|
event.Skip( false );
|
||||||
|
|
||||||
// SwapBuffer requires the window to be shown before calling
|
// SwapBuffer requires the window to be shown before calling
|
||||||
if( !IsShownOnScreen() )
|
if( !IsShownOnScreen() )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnPaint !IsShown" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint !IsShown" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
|
||||||
|
|
||||||
if( m_reload_is_needed )
|
if( m_reload_is_needed )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnPaint m_reload_is_needed" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint m_reload_is_needed" ) );
|
||||||
|
|
||||||
m_reload_is_needed = false;
|
m_reload_is_needed = false;
|
||||||
m_ogl_3dmodel = new MODEL_3D( *m_3d_model, MATERIAL_MODE::NORMAL );
|
m_ogl_3dmodel = new MODEL_3D( *m_3d_model, MATERIAL_MODE::NORMAL );
|
||||||
|
@ -349,16 +349,16 @@ void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnEraseBackground( wxEraseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnEraseBackground( wxEraseEvent& event )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnEraseBackground" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnEraseBackground" ) );
|
||||||
// Do nothing, to avoid flashing.
|
// Do nothing, to avoid flashing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnMouseWheel" ) );
|
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnMouseWheel" ) );
|
||||||
|
|
||||||
if( event.ShiftDown() )
|
if( event.ShiftDown() )
|
||||||
{
|
{
|
||||||
|
@ -387,13 +387,13 @@ void C3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event )
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_OSX_MAGNIFY_EVENT
|
#ifdef USE_OSX_MAGNIFY_EVENT
|
||||||
void C3D_MODEL_VIEWER::OnMagnify( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnMagnify( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
m_trackBallCamera.SetCurWindowSize( GetClientSize() );
|
m_trackBallCamera.SetCurWindowSize( GetClientSize() );
|
||||||
|
|
||||||
|
@ -410,31 +410,31 @@ void C3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnLeftDown( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnLeftDown( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnLeftUp( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnLeftUp( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnMiddleDown( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnMiddleDown( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnMiddleUp( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnMiddleUp( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void C3D_MODEL_VIEWER::OnRightClick( wxMouseEvent& event )
|
void EDA_3D_MODEL_VIEWER::OnRightClick( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
|
@ -42,7 +42,7 @@ class MODEL_3D;
|
||||||
/**
|
/**
|
||||||
* Implement a canvas based on a wxGLCanvas.
|
* Implement a canvas based on a wxGLCanvas.
|
||||||
*/
|
*/
|
||||||
class C3D_MODEL_VIEWER : public HIDPI_GL_CANVAS
|
class EDA_3D_MODEL_VIEWER : public HIDPI_GL_CANVAS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
@ -51,10 +51,10 @@ public:
|
||||||
* @param aParent the parent creator of this canvas.
|
* @param aParent the parent creator of this canvas.
|
||||||
* @param aAttribList a list of openGL options created by #OGL_ATT_LIST::GetAttributesList.
|
* @param aAttribList a list of openGL options created by #OGL_ATT_LIST::GetAttributesList.
|
||||||
*/
|
*/
|
||||||
C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList = nullptr,
|
EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList = nullptr,
|
||||||
S3D_CACHE* aCacheManager = nullptr );
|
S3D_CACHE* aCacheManager = nullptr );
|
||||||
|
|
||||||
~C3D_MODEL_VIEWER();
|
~EDA_3D_MODEL_VIEWER();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this model to be displayed.
|
* Set this model to be displayed.
|
|
@ -29,15 +29,15 @@
|
||||||
#include <eda_3d_viewer.h>
|
#include <eda_3d_viewer.h>
|
||||||
#include <menus_helpers.h>
|
#include <menus_helpers.h>
|
||||||
#include <3d_viewer_id.h>
|
#include <3d_viewer_id.h>
|
||||||
#include <3d_viewer/tools/3d_actions.h>
|
#include <3d_viewer/tools/eda_3d_actions.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
#include <tool/common_control.h>
|
#include <tool/common_control.h>
|
||||||
#include <widgets/wx_menubar.h>
|
#include <widgets/wx_menubar.h>
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::CreateMenuBar()
|
void EDA_3D_VIEWER_FRAME::CreateMenuBar()
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CreateMenuBar" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CreateMenuBar" );
|
||||||
|
|
||||||
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
|
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
|
||||||
WX_MENUBAR* menuBar = new WX_MENUBAR();
|
WX_MENUBAR* menuBar = new WX_MENUBAR();
|
||||||
|
|
|
@ -30,12 +30,12 @@
|
||||||
#include <eda_3d_viewer.h>
|
#include <eda_3d_viewer.h>
|
||||||
#include <menus_helpers.h>
|
#include <menus_helpers.h>
|
||||||
#include <tool/action_toolbar.h>
|
#include <tool/action_toolbar.h>
|
||||||
#include <tools/3d_actions.h>
|
#include <tools/eda_3d_actions.h>
|
||||||
#include <3d_viewer_id.h>
|
#include <3d_viewer_id.h>
|
||||||
|
|
||||||
void EDA_3D_VIEWER::ReCreateMainToolbar()
|
void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::ReCreateMainToolbar" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" );
|
||||||
|
|
||||||
wxWindowUpdateLocker dummy( this );
|
wxWindowUpdateLocker dummy( this );
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include <board_stackup_manager/board_stackup.h>
|
#include <board_stackup_manager/board_stackup.h>
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
|
|
||||||
PANEL_3D_COLORS::PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
PANEL_3D_COLORS::PANEL_3D_COLORS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) :
|
||||||
PANEL_3D_COLORS_BASE( aParent ),
|
PANEL_3D_COLORS_BASE( aParent ),
|
||||||
m_settings( aFrame->GetAdapter() )
|
m_settings( aFrame->GetAdapter() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE
|
class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
explicit PANEL_3D_COLORS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent );
|
||||||
|
|
||||||
/// Automatically called when clicking on the OK button
|
/// Automatically called when clicking on the OK button
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
#include "panel_3D_display_options.h"
|
#include "panel_3D_display_options.h"
|
||||||
#include <3d_canvas/board_adapter.h>
|
#include <3d_canvas/board_adapter.h>
|
||||||
#include <3d_viewer/eda_3d_viewer.h>
|
#include <3d_viewer/eda_3d_viewer.h>
|
||||||
#include <3d_viewer/tools/3d_controller.h>
|
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
|
|
||||||
|
|
||||||
PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) :
|
||||||
PANEL_3D_DISPLAY_OPTIONS_BASE( aParent ),
|
PANEL_3D_DISPLAY_OPTIONS_BASE( aParent ),
|
||||||
m_frame( aFrame ),
|
m_frame( aFrame ),
|
||||||
m_settings( aFrame->GetAdapter() ),
|
m_settings( aFrame->GetAdapter() ),
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
class PANEL_3D_DISPLAY_OPTIONS : public PANEL_3D_DISPLAY_OPTIONS_BASE
|
class PANEL_3D_DISPLAY_OPTIONS : public PANEL_3D_DISPLAY_OPTIONS_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
explicit PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent );
|
||||||
|
|
||||||
void OnCheckEnableAnimation( wxCommandEvent& WXUNUSED( event ) ) override;
|
void OnCheckEnableAnimation( wxCommandEvent& WXUNUSED( event ) ) override;
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ public:
|
||||||
void TransferColorDataToWindow();
|
void TransferColorDataToWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EDA_3D_VIEWER* m_frame;
|
EDA_3D_VIEWER_FRAME* m_frame;
|
||||||
BOARD_ADAPTER& m_settings;
|
BOARD_ADAPTER& m_settings;
|
||||||
EDA_3D_CANVAS* m_canvas;
|
EDA_3D_CANVAS* m_canvas;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
#include <widgets/color_swatch.h>
|
#include <widgets/color_swatch.h>
|
||||||
#include <3d_canvas/board_adapter.h>
|
#include <3d_canvas/board_adapter.h>
|
||||||
#include <3d_viewer/eda_3d_viewer.h>
|
#include <3d_viewer/eda_3d_viewer.h>
|
||||||
#include <3d_viewer/tools/3d_controller.h>
|
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||||
|
|
||||||
PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) :
|
PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) :
|
||||||
PANEL_3D_OPENGL_OPTIONS_BASE( aParent ),
|
PANEL_3D_OPENGL_OPTIONS_BASE( aParent ),
|
||||||
m_settings( aFrame->GetAdapter() ),
|
m_settings( aFrame->GetAdapter() ),
|
||||||
m_canvas( aFrame->GetCanvas() )
|
m_canvas( aFrame->GetCanvas() )
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
class PANEL_3D_OPENGL_OPTIONS : public PANEL_3D_OPENGL_OPTIONS_BASE
|
class PANEL_3D_OPENGL_OPTIONS : public PANEL_3D_OPENGL_OPTIONS_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
explicit PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent );
|
||||||
|
|
||||||
/// Automatically called when clicking on the OK button
|
/// Automatically called when clicking on the OK button
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
#include "panel_3D_raytracing_options.h"
|
#include "panel_3D_raytracing_options.h"
|
||||||
#include <3d_canvas/board_adapter.h>
|
#include <3d_canvas/board_adapter.h>
|
||||||
#include <3d_viewer/eda_3d_viewer.h>
|
#include <3d_viewer/eda_3d_viewer.h>
|
||||||
#include <3d_viewer/tools/3d_controller.h>
|
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
|
|
||||||
PANEL_3D_RAYTRACING_OPTIONS::PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame,
|
PANEL_3D_RAYTRACING_OPTIONS::PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame,
|
||||||
wxWindow* aParent ) :
|
wxWindow* aParent ) :
|
||||||
PANEL_3D_RAYTRACING_OPTIONS_BASE( aParent ),
|
PANEL_3D_RAYTRACING_OPTIONS_BASE( aParent ),
|
||||||
m_settings( aFrame->GetAdapter() ),
|
m_settings( aFrame->GetAdapter() ),
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
class PANEL_3D_RAYTRACING_OPTIONS : public PANEL_3D_RAYTRACING_OPTIONS_BASE
|
class PANEL_3D_RAYTRACING_OPTIONS : public PANEL_3D_RAYTRACING_OPTIONS_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent );
|
explicit PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent );
|
||||||
|
|
||||||
void ResetPanel() override;
|
void ResetPanel() override;
|
||||||
|
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
#include <wx/filedlg.h>
|
#include <wx/filedlg.h>
|
||||||
#include <wx/treebook.h>
|
#include <wx/treebook.h>
|
||||||
#include "eda_3d_viewer.h"
|
#include "eda_3d_viewer.h"
|
||||||
#include <3d_viewer_settings.h>
|
#include <eda_3d_viewer_settings.h>
|
||||||
#include <3d_viewer_id.h>
|
#include <3d_viewer_id.h>
|
||||||
#include <3d_viewer/tools/3d_actions.h>
|
#include <3d_viewer/tools/eda_3d_actions.h>
|
||||||
#include <3d_viewer/tools/3d_controller.h>
|
#include <3d_viewer/tools/eda_3d_controller.h>
|
||||||
#include <3d_viewer/tools/3d_conditions.h>
|
#include <3d_viewer/tools/eda_3d_conditions.h>
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
#include <board_stackup_manager/board_stackup.h>
|
#include <board_stackup_manager/board_stackup.h>
|
||||||
|
@ -66,27 +66,27 @@
|
||||||
*
|
*
|
||||||
* @ingroup trace_env_vars
|
* @ingroup trace_env_vars
|
||||||
*/
|
*/
|
||||||
const wxChar* EDA_3D_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" );
|
const wxChar* EDA_3D_VIEWER_FRAME::m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" );
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE( EDA_3D_VIEWER, EDA_BASE_FRAME )
|
BEGIN_EVENT_TABLE( EDA_3D_VIEWER_FRAME, EDA_BASE_FRAME )
|
||||||
|
|
||||||
EVT_ACTIVATE( EDA_3D_VIEWER::OnActivate )
|
EVT_ACTIVATE( EDA_3D_VIEWER_FRAME::OnActivate )
|
||||||
EVT_SET_FOCUS( EDA_3D_VIEWER::OnSetFocus )
|
EVT_SET_FOCUS( EDA_3D_VIEWER_FRAME::OnSetFocus )
|
||||||
|
|
||||||
EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_MENU_COMMAND_END,
|
EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_MENU_COMMAND_END,
|
||||||
EDA_3D_VIEWER::Process_Special_Functions )
|
EDA_3D_VIEWER_FRAME::Process_Special_Functions )
|
||||||
|
|
||||||
EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER::Exit3DFrame )
|
EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER_FRAME::Exit3DFrame )
|
||||||
EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER::OnRenderEngineSelection )
|
EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER_FRAME::OnRenderEngineSelection )
|
||||||
EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER::OnDisableRayTracing )
|
EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER_FRAME::OnDisableRayTracing )
|
||||||
|
|
||||||
EVT_CLOSE( EDA_3D_VIEWER::OnCloseWindow )
|
EVT_CLOSE( EDA_3D_VIEWER_FRAME::OnCloseWindow )
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
|
||||||
EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxString &aTitle,
|
EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY *aKiway, PCB_BASE_FRAME *aParent,
|
||||||
long style ) :
|
const wxString &aTitle, long style ) :
|
||||||
KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition,
|
KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition,
|
||||||
wxDefaultSize, style, QUALIFIED_VIEWER3D_FRAMENAME( aParent ) ),
|
wxDefaultSize, style, QUALIFIED_VIEWER3D_FRAMENAME( aParent ) ),
|
||||||
m_mainToolBar( nullptr ),
|
m_mainToolBar( nullptr ),
|
||||||
|
@ -94,7 +94,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
|
||||||
m_currentCamera( m_trackBallCamera ),
|
m_currentCamera( m_trackBallCamera ),
|
||||||
m_trackBallCamera( RANGE_SCALE_3D )
|
m_trackBallCamera( RANGE_SCALE_3D )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::EDA_3D_VIEWER %s", aTitle );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s", aTitle );
|
||||||
|
|
||||||
m_disable_ray_tracing = false;
|
m_disable_ray_tracing = false;
|
||||||
m_aboutTitle = _( "KiCad 3D Viewer" );
|
m_aboutTitle = _( "KiCad 3D Viewer" );
|
||||||
|
@ -171,7 +171,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_3D_VIEWER::~EDA_3D_VIEWER()
|
EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME()
|
||||||
{
|
{
|
||||||
m_canvas->SetEventDispatcher( nullptr );
|
m_canvas->SetEventDispatcher( nullptr );
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ EDA_3D_VIEWER::~EDA_3D_VIEWER()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::setupUIConditions()
|
void EDA_3D_VIEWER_FRAME::setupUIConditions()
|
||||||
{
|
{
|
||||||
EDA_BASE_FRAME::setupUIConditions();
|
EDA_BASE_FRAME::setupUIConditions();
|
||||||
|
|
||||||
|
@ -227,7 +227,8 @@ void EDA_3D_VIEWER::setupUIConditions()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
|
void EDA_3D_VIEWER_FRAME::InstallPreferences( PAGED_DIALOG* aParent,
|
||||||
|
PANEL_HOTKEYS_EDITOR* aHotkeysPanel )
|
||||||
{
|
{
|
||||||
wxTreebook* book = aParent->GetTreebook();
|
wxTreebook* book = aParent->GetTreebook();
|
||||||
|
|
||||||
|
@ -241,7 +242,7 @@ void EDA_3D_VIEWER::InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::ReloadRequest()
|
void EDA_3D_VIEWER_FRAME::ReloadRequest()
|
||||||
{
|
{
|
||||||
// This will schedule a request to load later
|
// This will schedule a request to load later
|
||||||
if( m_canvas )
|
if( m_canvas )
|
||||||
|
@ -249,7 +250,7 @@ void EDA_3D_VIEWER::ReloadRequest()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw )
|
void EDA_3D_VIEWER_FRAME::NewDisplay( bool aForceImmediateRedraw )
|
||||||
{
|
{
|
||||||
ReloadRequest();
|
ReloadRequest();
|
||||||
|
|
||||||
|
@ -260,7 +261,7 @@ void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::Redraw()
|
void EDA_3D_VIEWER_FRAME::Redraw()
|
||||||
{
|
{
|
||||||
// Only update in OpenGL for an interactive interaction
|
// Only update in OpenGL for an interactive interaction
|
||||||
if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY )
|
if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY )
|
||||||
|
@ -268,7 +269,7 @@ void EDA_3D_VIEWER::Redraw()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::refreshRender()
|
void EDA_3D_VIEWER_FRAME::refreshRender()
|
||||||
{
|
{
|
||||||
if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY )
|
if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY )
|
||||||
m_canvas->Request_refresh();
|
m_canvas->Request_refresh();
|
||||||
|
@ -277,17 +278,17 @@ void EDA_3D_VIEWER::refreshRender()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::Exit3DFrame( wxCommandEvent &event )
|
void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::Exit3DFrame" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Exit3DFrame" );
|
||||||
|
|
||||||
Close( true );
|
Close( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event )
|
void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnCloseWindow" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnCloseWindow" );
|
||||||
|
|
||||||
if( m_canvas )
|
if( m_canvas )
|
||||||
m_canvas->Close();
|
m_canvas->Close();
|
||||||
|
@ -301,13 +302,14 @@ void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
int id = event.GetId();
|
int id = event.GetId();
|
||||||
bool isChecked = event.IsChecked();
|
bool isChecked = event.IsChecked();
|
||||||
|
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::Process_Special_Functions id %d isChecked %d",
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d isChecked %d",
|
||||||
id, isChecked );
|
id,
|
||||||
|
isChecked );
|
||||||
|
|
||||||
if( m_canvas == nullptr )
|
if( m_canvas == nullptr )
|
||||||
return;
|
return;
|
||||||
|
@ -338,13 +340,13 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER::Process_Special_Functions()" );
|
wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::OnRenderEngineSelection( wxCommandEvent &event )
|
void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
|
||||||
{
|
{
|
||||||
const RENDER_ENGINE old_engine = m_boardAdapter.GetRenderEngine();
|
const RENDER_ENGINE old_engine = m_boardAdapter.GetRenderEngine();
|
||||||
|
|
||||||
|
@ -353,27 +355,27 @@ void EDA_3D_VIEWER::OnRenderEngineSelection( wxCommandEvent &event )
|
||||||
else
|
else
|
||||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
||||||
|
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnRenderEngineSelection type %s ",
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ",
|
||||||
( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "Ray Trace" :
|
( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "Raytrace" :
|
||||||
"OpenGL Legacy" );
|
"OpenGL" );
|
||||||
|
|
||||||
if( old_engine != m_boardAdapter.GetRenderEngine() )
|
if( old_engine != m_boardAdapter.GetRenderEngine() )
|
||||||
RenderEngineChanged();
|
RenderEngineChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::OnDisableRayTracing( wxCommandEvent& aEvent )
|
void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::%s disabling ray tracing.", __WXFUNCTION__ );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::%s disabling ray tracing.", __WXFUNCTION__ );
|
||||||
|
|
||||||
m_disable_ray_tracing = true;
|
m_disable_ray_tracing = true;
|
||||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::OnActivate( wxActivateEvent &aEvent )
|
void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnActivate" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnActivate" );
|
||||||
|
|
||||||
if( aEvent.GetActive() && m_canvas )
|
if( aEvent.GetActive() && m_canvas )
|
||||||
{
|
{
|
||||||
|
@ -390,7 +392,7 @@ void EDA_3D_VIEWER::OnActivate( wxActivateEvent &aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::OnSetFocus( wxFocusEvent& aEvent )
|
void EDA_3D_VIEWER_FRAME::OnSetFocus( wxFocusEvent& aEvent )
|
||||||
{
|
{
|
||||||
// Activates again the focus of the canvas so it will catch mouse and key events
|
// Activates again the focus of the canvas so it will catch mouse and key events
|
||||||
if( m_canvas )
|
if( m_canvas )
|
||||||
|
@ -400,14 +402,14 @@ void EDA_3D_VIEWER::OnSetFocus( wxFocusEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
{
|
{
|
||||||
EDA_BASE_FRAME::LoadSettings( aCfg );
|
EDA_BASE_FRAME::LoadSettings( aCfg );
|
||||||
|
|
||||||
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
|
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
|
||||||
wxASSERT( cfg );
|
wxASSERT( cfg );
|
||||||
|
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::LoadSettings" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" );
|
||||||
|
|
||||||
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
|
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
|
||||||
|
|
||||||
|
@ -523,8 +525,8 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
#if 0
|
#if 0
|
||||||
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
|
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
|
||||||
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
|
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
|
||||||
"EDA_3D_VIEWER::LoadSettings render setting Ray Trace" :
|
"EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" :
|
||||||
"EDA_3D_VIEWER::LoadSettings render setting OpenGL" );
|
"EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" );
|
||||||
#else
|
#else
|
||||||
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY );
|
||||||
#endif
|
#endif
|
||||||
|
@ -540,13 +542,13 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
{
|
{
|
||||||
auto cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
|
auto cfg = Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>();
|
||||||
|
|
||||||
EDA_BASE_FRAME::SaveSettings( cfg );
|
EDA_BASE_FRAME::SaveSettings( cfg );
|
||||||
|
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::SaveSettings" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::SaveSettings" );
|
||||||
|
|
||||||
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
|
COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings();
|
||||||
|
|
||||||
|
@ -583,8 +585,8 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" );
|
Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" );
|
||||||
|
|
||||||
wxLogTrace( m_logTrace, m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ?
|
wxLogTrace( m_logTrace, m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ?
|
||||||
"EDA_3D_VIEWER::SaveSettings render setting Ray Trace" :
|
"EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" :
|
||||||
"EDA_3D_VIEWER::SaveSettings render setting OpenGL" );
|
"EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" );
|
||||||
|
|
||||||
if( cfg )
|
if( cfg )
|
||||||
{
|
{
|
||||||
|
@ -676,9 +678,9 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
|
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CommonSettingsChanged" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" );
|
||||||
|
|
||||||
// Regen menu bars, etc
|
// Regen menu bars, etc
|
||||||
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
||||||
|
@ -692,7 +694,7 @@ void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxString fullFileName;
|
wxString fullFileName;
|
||||||
bool fmt_is_jpeg = false;
|
bool fmt_is_jpeg = false;
|
||||||
|
@ -786,16 +788,16 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::RenderEngineChanged()
|
void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
|
||||||
{
|
{
|
||||||
wxLogTrace( m_logTrace, "EDA_3D_VIEWER::RenderEngineChanged()" );
|
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" );
|
||||||
|
|
||||||
if( m_canvas )
|
if( m_canvas )
|
||||||
m_canvas->RenderEngineChanged();
|
m_canvas->RenderEngineChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EDA_3D_VIEWER::loadCommonSettings()
|
void EDA_3D_VIEWER_FRAME::loadCommonSettings()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
|
||||||
|
|
||||||
|
|
|
@ -59,13 +59,13 @@ enum EDA_3D_VIEWER_STATUSBAR
|
||||||
/**
|
/**
|
||||||
* Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard
|
* Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard
|
||||||
*/
|
*/
|
||||||
class EDA_3D_VIEWER : public EDA_3D_BOARD_HOLDER, public KIWAY_PLAYER
|
class EDA_3D_VIEWER_FRAME : public EDA_3D_BOARD_HOLDER, public KIWAY_PLAYER
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EDA_3D_VIEWER( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle,
|
EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle,
|
||||||
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
|
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
|
||||||
|
|
||||||
~EDA_3D_VIEWER();
|
~EDA_3D_VIEWER_FRAME();
|
||||||
|
|
||||||
PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); }
|
PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); }
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <settings/parameters.h>
|
#include <settings/parameters.h>
|
||||||
#include <wx/config.h>
|
#include <wx/config.h>
|
||||||
|
|
||||||
#include "3d_viewer_settings.h"
|
#include "eda_3d_viewer_settings.h"
|
||||||
|
|
||||||
using KIGFX::COLOR4D;
|
using KIGFX::COLOR4D;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
#include <3d_viewer_id.h>
|
#include <3d_viewer_id.h>
|
||||||
#include <3d_enums.h>
|
#include <3d_enums.h>
|
||||||
#include "3d_actions.h"
|
#include "eda_3d_actions.h"
|
||||||
|
|
||||||
|
|
||||||
// Actions, being statically-defined, require specialized I18N handling. We continue to
|
// Actions, being statically-defined, require specialized I18N handling. We continue to
|
|
@ -23,7 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <3d_canvas/board_adapter.h>
|
#include <3d_canvas/board_adapter.h>
|
||||||
#include <3d_viewer/tools/3d_conditions.h>
|
#include <3d_viewer/tools/eda_3d_conditions.h>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
#include <eda_3d_viewer.h>
|
#include <eda_3d_viewer.h>
|
||||||
#include <id.h>
|
#include <id.h>
|
||||||
#include <kiface_i.h>
|
#include <kiface_i.h>
|
||||||
#include <3d_viewer_id.h>
|
#include <tools/eda_3d_controller.h>
|
||||||
#include <tools/3d_controller.h>
|
#include "eda_3d_actions.h"
|
||||||
#include "3d_actions.h"
|
|
||||||
|
|
||||||
|
|
||||||
bool EDA_3D_CONTROLLER::Init()
|
bool EDA_3D_CONTROLLER::Init()
|
||||||
|
@ -177,7 +176,7 @@ int EDA_3D_CONTROLLER::SetMaterial( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
m_boardAdapter->SetMaterialMode( mode );
|
m_boardAdapter->SetMaterialMode( mode );
|
||||||
|
|
||||||
if( EDA_3D_VIEWER* viewer = dynamic_cast<EDA_3D_VIEWER*>( m_toolMgr->GetToolHolder() ) )
|
if( auto* viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
|
||||||
viewer->NewDisplay( true );
|
viewer->NewDisplay( true );
|
||||||
else
|
else
|
||||||
m_canvas->Request_refresh();
|
m_canvas->Request_refresh();
|
||||||
|
@ -218,9 +217,7 @@ int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
EDA_3D_VIEWER* viewer = dynamic_cast<EDA_3D_VIEWER*>( m_toolMgr->GetToolHolder() );
|
if( auto* viewer = dynamic_cast<EDA_3D_VIEWER_FRAME*>( m_toolMgr->GetToolHolder() ) )
|
||||||
|
|
||||||
if( viewer )
|
|
||||||
viewer->NewDisplay( true );
|
viewer->NewDisplay( true );
|
||||||
else
|
else
|
||||||
m_canvas->Request_refresh();
|
m_canvas->Request_refresh();
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include <tool/tool_interactive.h>
|
#include <tool/tool_interactive.h>
|
||||||
|
|
||||||
class EDA_3D_VIEWER;
|
class EDA_3D_VIEWER_FRAME;
|
||||||
class BOARD_ADAPTER;
|
class BOARD_ADAPTER;
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,17 @@ set(3D-VIEWER_SRCS
|
||||||
3d_cache/3d_cache.cpp
|
3d_cache/3d_cache.cpp
|
||||||
3d_cache/3d_plugin_manager.cpp
|
3d_cache/3d_plugin_manager.cpp
|
||||||
${DIR_DLG}/3d_cache_dialogs.cpp
|
${DIR_DLG}/3d_cache_dialogs.cpp
|
||||||
${DIR_DLG}/dlg_select_3dmodel_base.cpp
|
${DIR_DLG}/dialog_select_3d_model_base.cpp
|
||||||
${DIR_DLG}/dlg_select_3dmodel.cpp
|
${DIR_DLG}/dialog_select_3d_model.cpp
|
||||||
${DIR_DLG}/panel_prev_3d_base.cpp
|
${DIR_DLG}/panel_preview_3d_model_base.cpp
|
||||||
${DIR_DLG}/panel_prev_3d.cpp
|
${DIR_DLG}/panel_preview_3d_model.cpp
|
||||||
3d_canvas/board_adapter.cpp
|
3d_canvas/board_adapter.cpp
|
||||||
3d_canvas/create_layer_items.cpp
|
3d_canvas/create_layer_items.cpp
|
||||||
3d_canvas/create_3Dgraphic_brd_items.cpp
|
3d_canvas/create_3Dgraphic_brd_items.cpp
|
||||||
3d_canvas/create_layer_poly.cpp
|
3d_canvas/create_layer_poly.cpp
|
||||||
3d_canvas/eda_3d_canvas.cpp
|
3d_canvas/eda_3d_canvas.cpp
|
||||||
3d_canvas/eda_3d_canvas_pivot.cpp
|
3d_canvas/eda_3d_canvas_pivot.cpp
|
||||||
3d_model_viewer/3d_model_viewer.cpp
|
3d_model_viewer/eda_3d_model_viewer.cpp
|
||||||
3d_rendering/legacy/3d_model.cpp
|
3d_rendering/legacy/3d_model.cpp
|
||||||
3d_rendering/legacy/ogl_legacy_utils.cpp
|
3d_rendering/legacy/ogl_legacy_utils.cpp
|
||||||
3d_rendering/legacy/create_scene.cpp
|
3d_rendering/legacy/create_scene.cpp
|
||||||
|
@ -95,11 +95,11 @@ set(3D-VIEWER_SRCS
|
||||||
3d_viewer/dialogs/panel_3D_opengl_options_base.cpp
|
3d_viewer/dialogs/panel_3D_opengl_options_base.cpp
|
||||||
3d_viewer/dialogs/panel_3D_raytracing_options.cpp
|
3d_viewer/dialogs/panel_3D_raytracing_options.cpp
|
||||||
3d_viewer/dialogs/panel_3D_raytracing_options_base.cpp
|
3d_viewer/dialogs/panel_3D_raytracing_options_base.cpp
|
||||||
3d_viewer/tools/3d_actions.cpp
|
3d_viewer/tools/eda_3d_actions.cpp
|
||||||
3d_viewer/tools/3d_conditions.cpp
|
3d_viewer/tools/eda_3d_conditions.cpp
|
||||||
3d_viewer/tools/3d_controller.cpp
|
3d_viewer/tools/eda_3d_controller.cpp
|
||||||
3d_viewer/eda_3d_viewer.cpp
|
3d_viewer/eda_3d_viewer.cpp
|
||||||
3d_viewer/3d_viewer_settings.cpp
|
3d_viewer/eda_3d_viewer_settings.cpp
|
||||||
common_ogl/ogl_attr_list.cpp
|
common_ogl/ogl_attr_list.cpp
|
||||||
common_ogl/ogl_utils.cpp
|
common_ogl/ogl_utils.cpp
|
||||||
3d_fastmath.cpp
|
3d_fastmath.cpp
|
||||||
|
|
|
@ -52,7 +52,7 @@ class BOARD_CONNECTED_ITEM;
|
||||||
class COLOR_SETTINGS;
|
class COLOR_SETTINGS;
|
||||||
class FOOTPRINT;
|
class FOOTPRINT;
|
||||||
class PAD;
|
class PAD;
|
||||||
class EDA_3D_VIEWER;
|
class EDA_3D_VIEWER_FRAME;
|
||||||
class GENERAL_COLLECTOR;
|
class GENERAL_COLLECTOR;
|
||||||
class GENERAL_COLLECTORS_GUIDE;
|
class GENERAL_COLLECTORS_GUIDE;
|
||||||
class BOARD_DESIGN_SETTINGS;
|
class BOARD_DESIGN_SETTINGS;
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @return a reference to the child 3D viewer frame, when exists, or NULL
|
* @return a reference to the child 3D viewer frame, when exists, or NULL
|
||||||
*/
|
*/
|
||||||
EDA_3D_VIEWER* Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* Get3DViewerFrame();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the 3D view, if the viewer is opened by this frame.
|
* Update the 3D view, if the viewer is opened by this frame.
|
||||||
|
@ -231,7 +231,7 @@ public:
|
||||||
*
|
*
|
||||||
* If it does not exist, it is created. If it exists, it is brought to the foreground.
|
* If it does not exist, it is created. If it exists, it is brought to the foreground.
|
||||||
*/
|
*/
|
||||||
EDA_3D_VIEWER* CreateAndShow3D_Frame();
|
EDA_3D_VIEWER_FRAME* CreateAndShow3D_Frame();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return global configuration options.
|
* @return global configuration options.
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
|
|
||||||
#include "3d_cache/dialogs/3d_cache_dialogs.h"
|
#include "3d_cache/dialogs/3d_cache_dialogs.h"
|
||||||
#include "3d_cache/dialogs/panel_prev_3d.h"
|
#include "3d_cache/dialogs/panel_preview_3d_model.h"
|
||||||
|
|
||||||
#include <dialog_footprint_properties.h>
|
#include <dialog_footprint_properties.h>
|
||||||
|
|
||||||
|
@ -52,15 +52,15 @@ int DIALOG_FOOTPRINT_PROPERTIES::m_page = 0; // remember the last open page
|
||||||
|
|
||||||
DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent,
|
DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent,
|
||||||
FOOTPRINT* aFootprint ) :
|
FOOTPRINT* aFootprint ) :
|
||||||
DIALOG_FOOTPRINT_PROPERTIES_BASE( aParent ),
|
DIALOG_FOOTPRINT_PROPERTIES_BASE( aParent ),
|
||||||
m_posX( aParent, m_XPosLabel, m_ModPositionX, m_XPosUnit ),
|
m_posX( aParent, m_XPosLabel, m_ModPositionX, m_XPosUnit ),
|
||||||
m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ),
|
m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ),
|
||||||
m_OrientValidator( 3, &m_OrientValue ),
|
m_orientValidator( 3, &m_orientValue ),
|
||||||
m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ),
|
m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ),
|
||||||
m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ),
|
m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ),
|
||||||
m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ),
|
m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ),
|
||||||
m_initialFocus( true ),
|
m_initialFocus( true ),
|
||||||
m_inSelect( false )
|
m_inSelect( false )
|
||||||
{
|
{
|
||||||
m_frame = aParent;
|
m_frame = aParent;
|
||||||
m_footprint = aFootprint;
|
m_footprint = aFootprint;
|
||||||
|
@ -119,15 +119,15 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen
|
||||||
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL );
|
||||||
m_modelsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
m_modelsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
|
||||||
|
|
||||||
m_OrientValidator.SetRange( -360.0, 360.0 );
|
m_orientValidator.SetRange( -360.0, 360.0 );
|
||||||
m_OrientValueCtrl->SetValidator( m_OrientValidator );
|
m_OrientValueCtrl->SetValidator( m_orientValidator );
|
||||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
m_orientValidator.SetWindow( m_OrientValueCtrl );
|
||||||
|
|
||||||
aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() );
|
aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() );
|
||||||
|
|
||||||
m_PreviewPane = new PANEL_PREV_3D( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list );
|
m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list );
|
||||||
|
|
||||||
bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 );
|
bLowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
// Set font size for items showing long strings:
|
// Set font size for items showing long strings:
|
||||||
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
||||||
|
@ -165,7 +165,7 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen
|
||||||
|
|
||||||
m_sdbSizerStdButtonsOK->SetDefault();
|
m_sdbSizerStdButtonsOK->SetDefault();
|
||||||
|
|
||||||
m_OrientValue = 0;
|
m_orientValue = 0;
|
||||||
|
|
||||||
// Configure button logos
|
// Configure button logos
|
||||||
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) );
|
||||||
|
@ -198,7 +198,7 @@ DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES()
|
||||||
m_page = m_NoteBook->GetSelection();
|
m_page = m_NoteBook->GetSelection();
|
||||||
m_NoteBook->SetSelection( 1 );
|
m_NoteBook->SetSelection( 1 );
|
||||||
|
|
||||||
delete m_PreviewPane;
|
delete m_previewPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -245,13 +245,13 @@ void DIALOG_FOOTPRINT_PROPERTIES::ChangeFootprint( wxCommandEvent& )
|
||||||
void DIALOG_FOOTPRINT_PROPERTIES::FootprintOrientEvent( wxCommandEvent& )
|
void DIALOG_FOOTPRINT_PROPERTIES::FootprintOrientEvent( wxCommandEvent& )
|
||||||
{
|
{
|
||||||
if( m_Orient0->GetValue() )
|
if( m_Orient0->GetValue() )
|
||||||
m_OrientValue = 0.0;
|
m_orientValue = 0.0;
|
||||||
else if( m_Orient90->GetValue() )
|
else if( m_Orient90->GetValue() )
|
||||||
m_OrientValue = 90.0;
|
m_orientValue = 90.0;
|
||||||
else if( m_Orient270->GetValue() )
|
else if( m_Orient270->GetValue() )
|
||||||
m_OrientValue = 270.0;
|
m_orientValue = 270.0;
|
||||||
else if( m_Orient180->GetValue() )
|
else if( m_Orient180->GetValue() )
|
||||||
m_OrientValue = 180.0;
|
m_orientValue = 180.0;
|
||||||
|
|
||||||
updateOrientationControl();
|
updateOrientationControl();
|
||||||
}
|
}
|
||||||
|
@ -312,15 +312,15 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow()
|
||||||
|
|
||||||
m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 );
|
m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 );
|
||||||
|
|
||||||
m_OrientValue = m_footprint->GetOrientation() / 10.0;
|
m_orientValue = m_footprint->GetOrientation() / 10.0;
|
||||||
|
|
||||||
if( m_OrientValue == 0.0 )
|
if( m_orientValue == 0.0 )
|
||||||
m_Orient0->SetValue( true );
|
m_Orient0->SetValue( true );
|
||||||
else if( m_OrientValue == 90.0 || m_OrientValue == -270.0 )
|
else if( m_orientValue == 90.0 || m_orientValue == -270.0 )
|
||||||
m_Orient90->SetValue( true );
|
m_Orient90->SetValue( true );
|
||||||
else if( m_OrientValue == 270.0 || m_OrientValue == -90.0 )
|
else if( m_orientValue == 270.0 || m_orientValue == -90.0 )
|
||||||
m_Orient270->SetValue( true );
|
m_Orient270->SetValue( true );
|
||||||
else if( m_OrientValue == 180.0 || m_OrientValue == -180.0 )
|
else if( m_orientValue == 180.0 || m_orientValue == -180.0 )
|
||||||
m_Orient180->SetValue( true );
|
m_Orient180->SetValue( true );
|
||||||
else
|
else
|
||||||
m_OrientOther->SetValue( true );
|
m_OrientOther->SetValue( true );
|
||||||
|
@ -402,7 +402,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
select3DModel( 0 ); // will clamp idx within bounds
|
select3DModel( 0 ); // will clamp idx within bounds
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
|
|
||||||
// Show the footprint's FPID.
|
// Show the footprint's FPID.
|
||||||
m_tcLibraryID->SetValue( m_footprint->GetFPID().Format() );
|
m_tcLibraryID->SetValue( m_footprint->GetFPID().Format() );
|
||||||
|
@ -452,7 +452,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::select3DModel( int aModelIdx )
|
||||||
m_modelsGrid->SetGridCursor( aModelIdx, 0 );
|
m_modelsGrid->SetGridCursor( aModelIdx, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PreviewPane->SetSelectedModel( aModelIdx );
|
m_previewPane->SetSelectedModel( aModelIdx );
|
||||||
|
|
||||||
m_inSelect = false;
|
m_inSelect = false;
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::On3DModelCellChanged( wxGridEvent& aEvent )
|
||||||
m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) );
|
m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -521,7 +521,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnRemove3DModel( wxCommandEvent& )
|
||||||
m_modelsGrid->DeleteRows( idx, 1 );
|
m_modelsGrid->DeleteRows( idx, 1 );
|
||||||
|
|
||||||
select3DModel( idx ); // will clamp idx within bounds
|
select3DModel( idx ); // will clamp idx within bounds
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnAdd3DModel( wxCommandEvent& )
|
||||||
m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) );
|
m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) );
|
||||||
|
|
||||||
select3DModel( idx );
|
select3DModel( idx );
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -753,9 +753,9 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow()
|
||||||
|
|
||||||
// Now, set orientation. Must be done after other changes because rotation changes field
|
// Now, set orientation. Must be done after other changes because rotation changes field
|
||||||
// positions on board (so that relative positions are held constant)
|
// positions on board (so that relative positions are held constant)
|
||||||
m_OrientValidator.TransferFromWindow();
|
m_orientValidator.TransferFromWindow();
|
||||||
|
|
||||||
double orient = m_OrientValue * 10;
|
double orient = m_orientValue * 10;
|
||||||
|
|
||||||
if( m_footprint->GetOrientation() != orient )
|
if( m_footprint->GetOrientation() != orient )
|
||||||
m_footprint->Rotate( m_footprint->GetPosition(), orient - m_footprint->GetOrientation() );
|
m_footprint->Rotate( m_footprint->GetPosition(), orient - m_footprint->GetOrientation() );
|
||||||
|
@ -852,7 +852,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnDeleteField( wxCommandEvent& )
|
||||||
void DIALOG_FOOTPRINT_PROPERTIES::Cfg3DPath( wxCommandEvent& )
|
void DIALOG_FOOTPRINT_PROPERTIES::Cfg3DPath( wxCommandEvent& )
|
||||||
{
|
{
|
||||||
if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) )
|
if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) )
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -967,5 +967,5 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnPageChange( wxNotebookEvent& aEvent )
|
||||||
|
|
||||||
void DIALOG_FOOTPRINT_PROPERTIES::updateOrientationControl()
|
void DIALOG_FOOTPRINT_PROPERTIES::updateOrientationControl()
|
||||||
{
|
{
|
||||||
KIUI::ValidatorTransferToWindowWithoutEvents( m_OrientValidator );
|
KIUI::ValidatorTransferToWindowWithoutEvents( m_orientValidator );
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
|
|
||||||
class PCB_EDIT_FRAME;
|
class PCB_EDIT_FRAME;
|
||||||
class PANEL_PREV_3D;
|
class PANEL_PREVIEW_3D_MODEL;
|
||||||
|
|
||||||
|
|
||||||
class DIALOG_FOOTPRINT_PROPERTIES: public DIALOG_FOOTPRINT_PROPERTIES_BASE
|
class DIALOG_FOOTPRINT_PROPERTIES: public DIALOG_FOOTPRINT_PROPERTIES_BASE
|
||||||
|
@ -93,6 +93,7 @@ private:
|
||||||
*/
|
*/
|
||||||
void updateOrientationControl();
|
void updateOrientationControl();
|
||||||
|
|
||||||
|
private:
|
||||||
PCB_EDIT_FRAME* m_frame;
|
PCB_EDIT_FRAME* m_frame;
|
||||||
FOOTPRINT* m_footprint;
|
FOOTPRINT* m_footprint;
|
||||||
|
|
||||||
|
@ -101,15 +102,15 @@ private:
|
||||||
FP_TEXT_GRID_TABLE* m_texts;
|
FP_TEXT_GRID_TABLE* m_texts;
|
||||||
UNIT_BINDER m_posX;
|
UNIT_BINDER m_posX;
|
||||||
UNIT_BINDER m_posY;
|
UNIT_BINDER m_posY;
|
||||||
wxFloatingPointValidator<double> m_OrientValidator;
|
wxFloatingPointValidator<double> m_orientValidator;
|
||||||
double m_OrientValue;
|
double m_orientValue;
|
||||||
|
|
||||||
UNIT_BINDER m_netClearance;
|
UNIT_BINDER m_netClearance;
|
||||||
UNIT_BINDER m_solderMask;
|
UNIT_BINDER m_solderMask;
|
||||||
UNIT_BINDER m_solderPaste;
|
UNIT_BINDER m_solderPaste;
|
||||||
|
|
||||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||||
PANEL_PREV_3D* m_PreviewPane;
|
PANEL_PREVIEW_3D_MODEL* m_previewPane;
|
||||||
|
|
||||||
wxString m_delayedErrorMessage;
|
wxString m_delayedErrorMessage;
|
||||||
wxGrid* m_delayedFocusGrid;
|
wxGrid* m_delayedFocusGrid;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <dialog_footprint_properties_fp_editor.h>
|
#include <dialog_footprint_properties_fp_editor.h>
|
||||||
#include "filename_resolver.h"
|
#include "filename_resolver.h"
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include "3d_cache/dialogs/panel_prev_3d.h"
|
#include "3d_cache/dialogs/panel_preview_3d_model.h"
|
||||||
#include "3d_cache/dialogs/3d_cache_dialogs.h"
|
#include "3d_cache/dialogs/3d_cache_dialogs.h"
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <tool/tool_manager.h>
|
#include <tool/tool_manager.h>
|
||||||
|
@ -109,9 +109,9 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FO
|
||||||
|
|
||||||
aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() );
|
aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() );
|
||||||
|
|
||||||
m_PreviewPane = new PANEL_PREV_3D( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list );
|
m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list );
|
||||||
|
|
||||||
bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 );
|
bLowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_FootprintNameCtrl->SetValidator( FOOTPRINT_NAME_VALIDATOR() );
|
m_FootprintNameCtrl->SetValidator( FOOTPRINT_NAME_VALIDATOR() );
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR()
|
||||||
m_page = m_NoteBook->GetSelection();
|
m_page = m_NoteBook->GetSelection();
|
||||||
m_NoteBook->SetSelection( 1 );
|
m_NoteBook->SetSelection( 1 );
|
||||||
|
|
||||||
delete m_PreviewPane;
|
delete m_previewPane;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
select3DModel( 0 ); // will clamp idx within bounds
|
select3DModel( 0 ); // will clamp idx within bounds
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
|
|
||||||
for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
|
for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
|
||||||
{
|
{
|
||||||
|
@ -357,7 +357,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::select3DModel( int aModelIdx )
|
||||||
m_modelsGrid->SetGridCursor( aModelIdx, 0 );
|
m_modelsGrid->SetGridCursor( aModelIdx, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PreviewPane->SetSelectedModel( aModelIdx );
|
m_previewPane->SetSelectedModel( aModelIdx );
|
||||||
|
|
||||||
m_inSelect = false;
|
m_inSelect = false;
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::On3DModelCellChanged( wxGridEvent& a
|
||||||
m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) );
|
m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -428,7 +428,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnRemove3DModel( wxCommandEvent& )
|
||||||
m_modelsGrid->DeleteRows( idx );
|
m_modelsGrid->DeleteRows( idx );
|
||||||
|
|
||||||
select3DModel( idx ); // will clamp idx within bounds
|
select3DModel( idx ); // will clamp idx within bounds
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,7 +496,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAdd3DModel( wxCommandEvent& )
|
||||||
m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) );
|
m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) );
|
||||||
|
|
||||||
select3DModel( idx );
|
select3DModel( idx );
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -803,7 +803,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnDeleteField( wxCommandEvent& event
|
||||||
void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Cfg3DPath( wxCommandEvent& event )
|
void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Cfg3DPath( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) )
|
if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) )
|
||||||
m_PreviewPane->UpdateDummyFootprint();
|
m_previewPane->UpdateDummyFootprint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <dialog_footprint_properties_fp_editor_base.h>
|
#include <dialog_footprint_properties_fp_editor_base.h>
|
||||||
|
|
||||||
|
|
||||||
class PANEL_PREV_3D;
|
class PANEL_PREVIEW_3D_MODEL;
|
||||||
class FOOTPRINT_EDIT_FRAME;
|
class FOOTPRINT_EDIT_FRAME;
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,19 +68,20 @@ private:
|
||||||
|
|
||||||
void adjustGridColumns( int aWidth );
|
void adjustGridColumns( int aWidth );
|
||||||
|
|
||||||
|
private:
|
||||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||||
FOOTPRINT* m_footprint;
|
FOOTPRINT* m_footprint;
|
||||||
|
|
||||||
static int m_page; // remember the last open page during session
|
static int m_page; // remember the last open page during session
|
||||||
|
|
||||||
FP_TEXT_GRID_TABLE* m_texts;
|
FP_TEXT_GRID_TABLE* m_texts;
|
||||||
|
|
||||||
UNIT_BINDER m_netClearance;
|
UNIT_BINDER m_netClearance;
|
||||||
UNIT_BINDER m_solderMask;
|
UNIT_BINDER m_solderMask;
|
||||||
UNIT_BINDER m_solderPaste;
|
UNIT_BINDER m_solderPaste;
|
||||||
|
|
||||||
std::vector<FP_3DMODEL> m_shapes3D_list;
|
std::vector<FP_3DMODEL> m_shapes3D_list;
|
||||||
PANEL_PREV_3D* m_PreviewPane;
|
PANEL_PREVIEW_3D_MODEL* m_previewPane;
|
||||||
|
|
||||||
wxControl* m_delayedFocusCtrl;
|
wxControl* m_delayedFocusCtrl;
|
||||||
int m_delayedFocusPage;
|
int m_delayedFocusPage;
|
||||||
|
|
|
@ -906,7 +906,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
||||||
onBoardLoaded();
|
onBoardLoaded();
|
||||||
|
|
||||||
// Refresh the 3D view, if any
|
// Refresh the 3D view, if any
|
||||||
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame();
|
||||||
|
|
||||||
if( draw3DFrame )
|
if( draw3DFrame )
|
||||||
draw3DFrame->NewDisplay();
|
draw3DFrame->NewDisplay();
|
||||||
|
|
|
@ -234,7 +234,7 @@ FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME()
|
||||||
if( m_toolManager )
|
if( m_toolManager )
|
||||||
m_toolManager->DeactivateTool();
|
m_toolManager->DeactivateTool();
|
||||||
|
|
||||||
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame();
|
||||||
|
|
||||||
if( draw3DFrame )
|
if( draw3DFrame )
|
||||||
draw3DFrame->Destroy();
|
draw3DFrame->Destroy();
|
||||||
|
|
|
@ -96,15 +96,16 @@ bool PCB_BASE_FRAME::canCloseWindow( wxCloseEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_3D_VIEWER* PCB_BASE_FRAME::Get3DViewerFrame()
|
EDA_3D_VIEWER_FRAME* PCB_BASE_FRAME::Get3DViewerFrame()
|
||||||
{
|
{
|
||||||
return dynamic_cast<EDA_3D_VIEWER*>( FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) ) );
|
wxWindow* frame = FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) );
|
||||||
|
return dynamic_cast<EDA_3D_VIEWER_FRAME*>( frame );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PCB_BASE_FRAME::Update3DView( bool aMarkDirty, bool aRefresh, const wxString* aTitle )
|
void PCB_BASE_FRAME::Update3DView( bool aMarkDirty, bool aRefresh, const wxString* aTitle )
|
||||||
{
|
{
|
||||||
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame();
|
||||||
|
|
||||||
if( draw3DFrame )
|
if( draw3DFrame )
|
||||||
{
|
{
|
||||||
|
@ -428,12 +429,12 @@ void PCB_BASE_FRAME::ShowChangedLanguage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EDA_3D_VIEWER* PCB_BASE_FRAME::CreateAndShow3D_Frame()
|
EDA_3D_VIEWER_FRAME* PCB_BASE_FRAME::CreateAndShow3D_Frame()
|
||||||
{
|
{
|
||||||
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame();
|
||||||
|
|
||||||
if( !draw3DFrame )
|
if( !draw3DFrame )
|
||||||
draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) );
|
draw3DFrame = new EDA_3D_VIEWER_FRAME( &Kiway(), this, _( "3D Viewer" ) );
|
||||||
|
|
||||||
// Raising the window does not show the window on Windows if iconized. This should work
|
// Raising the window does not show the window on Windows if iconized. This should work
|
||||||
// on any platform.
|
// on any platform.
|
||||||
|
@ -694,7 +695,7 @@ void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars
|
||||||
RecreateToolbars();
|
RecreateToolbars();
|
||||||
|
|
||||||
// The 3D viewer isn't in the Kiway, so send its update manually
|
// The 3D viewer isn't in the Kiway, so send its update manually
|
||||||
EDA_3D_VIEWER* viewer = Get3DViewerFrame();
|
EDA_3D_VIEWER_FRAME* viewer = Get3DViewerFrame();
|
||||||
|
|
||||||
if( viewer )
|
if( viewer )
|
||||||
viewer->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
viewer->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include <widgets/ui_common.h>
|
#include <widgets/ui_common.h>
|
||||||
#include <base_units.h>
|
#include <base_units.h>
|
||||||
|
|
||||||
#include "../3d-viewer/3d_viewer/3d_viewer_settings.h"
|
#include "../3d-viewer/3d_viewer/eda_3d_viewer_settings.h"
|
||||||
|
|
||||||
|
|
||||||
///! Update the schema version whenever a migration is required
|
///! Update the schema version whenever a migration is required
|
||||||
|
|
|
@ -62,7 +62,7 @@ void PCB_VIEWER_TOOLS::Reset( RESET_REASON aReason )
|
||||||
|
|
||||||
int PCB_VIEWER_TOOLS::Show3DViewer( const TOOL_EVENT& aEvent )
|
int PCB_VIEWER_TOOLS::Show3DViewer( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
EDA_3D_VIEWER* draw3DFrame = frame()->CreateAndShow3D_Frame();
|
EDA_3D_VIEWER_FRAME* draw3DFrame = frame()->CreateAndShow3D_Frame();
|
||||||
|
|
||||||
if( frame()->IsType( FRAME_FOOTPRINT_VIEWER )
|
if( frame()->IsType( FRAME_FOOTPRINT_VIEWER )
|
||||||
|| frame()->IsType( FRAME_FOOTPRINT_VIEWER_MODAL )
|
|| frame()->IsType( FRAME_FOOTPRINT_VIEWER_MODAL )
|
||||||
|
|
|
@ -32,7 +32,7 @@ add_executable( libeval_compiler_test
|
||||||
libeval_compiler_test.cpp
|
libeval_compiler_test.cpp
|
||||||
../qa_utils/mocks.cpp
|
../qa_utils/mocks.cpp
|
||||||
../../common/base_units.cpp
|
../../common/base_units.cpp
|
||||||
../../3d-viewer/3d_viewer/3d_viewer_settings.cpp
|
../../3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
include_directories( BEFORE ${INC_BEFORE} )
|
include_directories( BEFORE ${INC_BEFORE} )
|
||||||
|
|
Loading…
Reference in New Issue