KiCad PCB EDA Suite
panel_fp_properties_3d_model_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_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 )
15 {
16  bSizerMain3D = new wxBoxSizer( wxVERTICAL );
17 
18  wxStaticBoxSizer* sbSizer3;
19  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );
20 
21  m_modelsGrid = new WX_GRID( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
22 
23  // Grid
24  m_modelsGrid->CreateGrid( 3, 3 );
25  m_modelsGrid->EnableEditing( true );
26  m_modelsGrid->EnableGridLines( false );
27  m_modelsGrid->EnableDragGridSize( false );
28  m_modelsGrid->SetMargins( 0, 0 );
29 
30  // Columns
31  m_modelsGrid->SetColSize( 0, 20 );
32  m_modelsGrid->SetColSize( 1, 650 );
33  m_modelsGrid->SetColSize( 2, 65 );
34  m_modelsGrid->EnableDragColMove( false );
35  m_modelsGrid->EnableDragColSize( false );
37  m_modelsGrid->SetColLabelValue( 0, wxEmptyString );
38  m_modelsGrid->SetColLabelValue( 1, _("3D Model(s)") );
39  m_modelsGrid->SetColLabelValue( 2, _("Show") );
40  m_modelsGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
41 
42  // Rows
43  m_modelsGrid->EnableDragRowSize( false );
44  m_modelsGrid->SetRowLabelSize( 0 );
45  m_modelsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
46 
47  // Label Appearance
48 
49  // Cell Defaults
50  m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
51  sbSizer3->Add( m_modelsGrid, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
52 
53  wxBoxSizer* bSizer3DButtons;
54  bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
55 
56  m_button3DShapeAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
57  bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
58 
59  m_button3DShapeBrowse = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
60  bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
61 
62 
63  bSizer3DButtons->Add( 20, 0, 0, 0, 5 );
64 
65  m_button3DShapeRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
66  bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 );
67 
68 
69  bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
70 
71  m_buttonConfig3DPaths = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
72  bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 );
73 
74 
75  sbSizer3->Add( bSizer3DButtons, 0, wxEXPAND, 5 );
76 
77 
78  bSizerMain3D->Add( sbSizer3, 4, wxEXPAND|wxRIGHT|wxLEFT, 5 );
79 
80  bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
81 
82 
83  bSizerMain3D->Add( bLowerSizer3D, 11, wxEXPAND, 5 );
84 
85 
86  this->SetSizer( bSizerMain3D );
87  this->Layout();
88  bSizerMain3D->Fit( this );
89 
90  // Connect Events
91  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) );
92  m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this );
93  m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this );
94  m_button3DShapeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this );
95  m_button3DShapeBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this );
96  m_button3DShapeRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this );
97  m_buttonConfig3DPaths->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::Cfg3DPath ), NULL, this );
98 }
99 
101 {
102  // Disconnect Events
103  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) );
104  m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this );
105  m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this );
106  m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this );
107  m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this );
108  m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this );
109  m_buttonConfig3DPaths->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::Cfg3DPath ), NULL, this );
110 
111 }
PANEL_FP_PROPERTIES_3D_MODEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void On3DModelSelected(wxGridEvent &event)
virtual void Cfg3DPath(wxCommandEvent &event)
#define _(s)
virtual void OnAdd3DModel(wxCommandEvent &event)
virtual void OnRemove3DModel(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnAdd3DRow(wxCommandEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:53
virtual void On3DModelCellChanged(wxGridEvent &event)