2020-04-30 17:49:41 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2020-11-16 12:29:07 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020)
|
2020-04-30 17:49:41 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dlg_select_3dmodel_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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizerMain;
|
|
|
|
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizerUpper;
|
|
|
|
bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
bSizerUpper->SetMinSize( wxSize( -1,400 ) );
|
|
|
|
m_splitterWin = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
|
2020-11-16 12:29:07 +00:00
|
|
|
m_splitterWin->SetSashGravity( 0.35 );
|
2020-04-30 17:49:41 +00:00
|
|
|
m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DLG_SELECT_3D_MODELE_BASE::m_splitterWinOnIdle ), NULL, this );
|
|
|
|
|
|
|
|
m_panelLeft = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bSizerLeft;
|
|
|
|
bSizerLeft = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2020-11-16 12:29:07 +00:00
|
|
|
m_FileTree = new wxGenericDirCtrl( m_panelLeft, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_EDIT_LABELS|wxDIRCTRL_SELECT_FIRST|wxDIRCTRL_SHOW_FILTERS|wxBORDER_DEFAULT, wxEmptyString, 0 );
|
2020-04-30 17:49:41 +00:00
|
|
|
|
|
|
|
m_FileTree->ShowHidden( false );
|
|
|
|
m_FileTree->SetMinSize( wxSize( 300,-1 ) );
|
|
|
|
|
|
|
|
bSizerLeft->Add( m_FileTree, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_panelLeft->SetSizer( bSizerLeft );
|
|
|
|
m_panelLeft->Layout();
|
|
|
|
bSizerLeft->Fit( m_panelLeft );
|
|
|
|
m_pane3Dviewer = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
m_Sizer3Dviewer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
|
|
|
|
m_pane3Dviewer->SetSizer( m_Sizer3Dviewer );
|
|
|
|
m_pane3Dviewer->Layout();
|
|
|
|
m_Sizer3Dviewer->Fit( m_pane3Dviewer );
|
2020-11-16 12:29:07 +00:00
|
|
|
m_splitterWin->SplitVertically( m_panelLeft, m_pane3Dviewer, 300 );
|
2020-04-30 17:49:41 +00:00
|
|
|
bSizerUpper->Add( m_splitterWin, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizerLower;
|
|
|
|
bSizerLower = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_stDirChoice = new wxStaticText( this, wxID_ANY, _("Available paths:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_stDirChoice->Wrap( -1 );
|
|
|
|
bSizerLower->Add( m_stDirChoice, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
|
|
|
|
|
|
|
wxArrayString m_dirChoicesChoices;
|
|
|
|
m_dirChoices = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dirChoicesChoices, 0 );
|
|
|
|
m_dirChoices->SetSelection( 0 );
|
|
|
|
bSizerLower->Add( m_dirChoices, 1, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
m_cfgPathsButt = new wxButton( this, wxID_ANY, _("Configure Paths"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerLower->Add( m_cfgPathsButt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizerMain->Add( bSizerLower, 0, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerOK );
|
|
|
|
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
|
|
|
m_sdbSizer->Realize();
|
|
|
|
|
|
|
|
bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bSizerMain );
|
|
|
|
this->Layout();
|
2020-11-16 12:29:07 +00:00
|
|
|
bSizerMain->Fit( this );
|
2020-04-30 17:49:41 +00:00
|
|
|
|
|
|
|
this->Centre( wxBOTH );
|
|
|
|
|
|
|
|
// Connect Events
|
|
|
|
m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this );
|
|
|
|
m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this );
|
|
|
|
m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this );
|
|
|
|
m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DLG_SELECT_3D_MODELE_BASE::~DLG_SELECT_3D_MODELE_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this );
|
|
|
|
m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this );
|
|
|
|
m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this );
|
|
|
|
m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this );
|
|
|
|
|
|
|
|
}
|