KiCad PCB EDA Suite
dialog_select_3d_model_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_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 )
13{
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15
16 wxBoxSizer* bSizerMain;
17 bSizerMain = new wxBoxSizer( wxVERTICAL );
18
19 wxBoxSizer* bSizerUpper;
20 bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
21
22 bSizerUpper->SetMinSize( wxSize( -1,400 ) );
23 m_splitterWin = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
24 m_splitterWin->SetSashGravity( 0.35 );
25 m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SELECT_3D_MODEL_BASE::m_splitterWinOnIdle ), NULL, this );
26
27 m_panelLeft = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
28 wxBoxSizer* bSizerLeft;
29 bSizerLeft = new wxBoxSizer( wxVERTICAL );
30
31 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 );
32
33 m_FileTree->ShowHidden( false );
34 m_FileTree->SetMinSize( wxSize( 300,-1 ) );
35
36 bSizerLeft->Add( m_FileTree, 1, wxALL|wxEXPAND, 5 );
37
38
39 m_panelLeft->SetSizer( bSizerLeft );
40 m_panelLeft->Layout();
41 bSizerLeft->Fit( m_panelLeft );
42 m_pane3Dviewer = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
43 m_Sizer3Dviewer = new wxBoxSizer( wxVERTICAL );
44
45
47 m_pane3Dviewer->Layout();
49 m_splitterWin->SplitVertically( m_panelLeft, m_pane3Dviewer, 300 );
50 bSizerUpper->Add( m_splitterWin, 1, wxEXPAND, 5 );
51
52
53 bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
54
55 wxBoxSizer* bSizerLower;
56 bSizerLower = new wxBoxSizer( wxHORIZONTAL );
57
58 m_stDirChoice = new wxStaticText( this, wxID_ANY, _("Available paths:"), wxDefaultPosition, wxDefaultSize, 0 );
59 m_stDirChoice->Wrap( -1 );
60 bSizerLower->Add( m_stDirChoice, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
61
62 wxArrayString m_dirChoicesChoices;
63 m_dirChoices = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dirChoicesChoices, 0 );
64 m_dirChoices->SetSelection( 0 );
65 bSizerLower->Add( m_dirChoices, 1, wxTOP|wxBOTTOM|wxRIGHT, 5 );
66
67 m_cfgPathsButt = new wxButton( this, wxID_ANY, _("Configure Paths"), wxDefaultPosition, wxDefaultSize, 0 );
68 bSizerLower->Add( m_cfgPathsButt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
69
70
71 bSizerMain->Add( bSizerLower, 0, wxEXPAND, 5 );
72
73 m_sdbSizer = new wxStdDialogButtonSizer();
74 m_sdbSizerOK = new wxButton( this, wxID_OK );
75 m_sdbSizer->AddButton( m_sdbSizerOK );
76 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
77 m_sdbSizer->AddButton( m_sdbSizerCancel );
78 m_sdbSizer->Realize();
79
80 bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
81
82
83 this->SetSizer( bSizerMain );
84 this->Layout();
85 bSizerMain->Fit( this );
86
87 this->Centre( wxBOTH );
88
89 // Connect Events
90 m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this );
91 m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this );
92 m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this );
93 m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this );
94}
95
97{
98 // Disconnect Events
99 m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this );
100 m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this );
101 m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this );
102 m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this );
103
104}
virtual void OnFileActivated(wxCommandEvent &event)
virtual void SetRootDir(wxCommandEvent &event)
virtual void Cfg3DPaths(wxCommandEvent &event)
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)
virtual void OnSelectionChanged(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define _(s)