KiCad PCB EDA Suite
PANEL_FP_PROPERTIES_3D_MODEL_BASE Class Reference

Class PANEL_FP_PROPERTIES_3D_MODEL_BASE. More...

#include <panel_fp_properties_3d_model_base.h>

Inheritance diagram for PANEL_FP_PROPERTIES_3D_MODEL_BASE:
PANEL_FP_PROPERTIES_3D_MODEL

Public Member Functions

 PANEL_FP_PROPERTIES_3D_MODEL_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(778, 286), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_FP_PROPERTIES_3D_MODEL_BASE ()
 

Protected Member Functions

virtual void OnGridSize (wxSizeEvent &event)
 
virtual void OnUpdateUI (wxUpdateUIEvent &event)
 
virtual void On3DModelCellChanged (wxGridEvent &event)
 
virtual void On3DModelSelected (wxGridEvent &event)
 
virtual void OnAdd3DRow (wxCommandEvent &event)
 
virtual void OnAdd3DModel (wxCommandEvent &event)
 
virtual void OnRemove3DModel (wxCommandEvent &event)
 
virtual void Cfg3DPath (wxCommandEvent &event)
 

Protected Attributes

wxBoxSizer * bSizerMain3D
 
WX_GRIDm_modelsGrid
 
wxBitmapButton * m_button3DShapeAdd
 
wxBitmapButton * m_button3DShapeBrowse
 
wxBitmapButton * m_button3DShapeRemove
 
wxButton * m_buttonConfig3DPaths
 
wxBoxSizer * m_LowerSizer3D
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_FP_PROPERTIES_3D_MODEL_BASE()

PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 778,286 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 14 of file panel_fp_properties_3d_model_base.cpp.

14 : wxPanel( parent, id, pos, size, style, name )
15{
16 bSizerMain3D = new wxBoxSizer( wxVERTICAL );
17
18 m_modelsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
19
20 // Grid
21 m_modelsGrid->CreateGrid( 3, 3 );
22 m_modelsGrid->EnableEditing( true );
23 m_modelsGrid->EnableGridLines( false );
24 m_modelsGrid->EnableDragGridSize( false );
25 m_modelsGrid->SetMargins( 0, 0 );
26
27 // Columns
28 m_modelsGrid->SetColSize( 0, 20 );
29 m_modelsGrid->SetColSize( 1, 650 );
30 m_modelsGrid->SetColSize( 2, 65 );
31 m_modelsGrid->EnableDragColMove( false );
32 m_modelsGrid->EnableDragColSize( false );
33 m_modelsGrid->SetColLabelValue( 0, wxEmptyString );
34 m_modelsGrid->SetColLabelValue( 1, _("3D Model(s)") );
35 m_modelsGrid->SetColLabelValue( 2, _("Show") );
37 m_modelsGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
38
39 // Rows
40 m_modelsGrid->EnableDragRowSize( false );
41 m_modelsGrid->SetRowLabelSize( 0 );
42 m_modelsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43
44 // Label Appearance
45
46 // Cell Defaults
47 m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
48 bSizerMain3D->Add( m_modelsGrid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
49
50 wxBoxSizer* bSizer3DButtons;
51 bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
52
53 m_button3DShapeAdd = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
54 bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
55
56 m_button3DShapeBrowse = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
57 bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
58
59
60 bSizer3DButtons->Add( 20, 0, 0, 0, 5 );
61
62 m_button3DShapeRemove = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
63 bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 );
64
65
66 bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
67
68 m_buttonConfig3DPaths = new wxButton( this, wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
69 bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 );
70
71
72 bSizerMain3D->Add( bSizer3DButtons, 0, wxEXPAND, 5 );
73
74 m_LowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
75
76
77 bSizerMain3D->Add( m_LowerSizer3D, 0, wxEXPAND, 5 );
78
79
80 this->SetSizer( bSizerMain3D );
81 this->Layout();
82
83 // Connect Events
84 this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ) );
85 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) );
86 m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this );
87 m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this );
88 m_button3DShapeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this );
89 m_button3DShapeBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this );
90 m_button3DShapeRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this );
91 m_buttonConfig3DPaths->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::Cfg3DPath ), NULL, this );
92}
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnRemove3DModel(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void Cfg3DPath(wxCommandEvent &event)
virtual void On3DModelSelected(wxGridEvent &event)
virtual void OnAdd3DModel(wxCommandEvent &event)
virtual void OnAdd3DRow(wxCommandEvent &event)
virtual void On3DModelCellChanged(wxGridEvent &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:76
#define _(s)

References _, bSizerMain3D, Cfg3DPath(), m_button3DShapeAdd, m_button3DShapeBrowse, m_button3DShapeRemove, m_buttonConfig3DPaths, m_LowerSizer3D, m_modelsGrid, On3DModelCellChanged(), On3DModelSelected(), OnAdd3DModel(), OnAdd3DRow(), OnGridSize(), OnRemove3DModel(), OnUpdateUI(), and WX_GRID::SetColLabelSize().

◆ ~PANEL_FP_PROPERTIES_3D_MODEL_BASE()

PANEL_FP_PROPERTIES_3D_MODEL_BASE::~PANEL_FP_PROPERTIES_3D_MODEL_BASE ( )

Definition at line 94 of file panel_fp_properties_3d_model_base.cpp.

95{
96 // Disconnect Events
97 this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ) );
98 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ) );
99 m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ), NULL, this );
100 m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ), NULL, this );
101 m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ), NULL, this );
102 m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ), NULL, this );
103 m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ), NULL, this );
104 m_buttonConfig3DPaths->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::Cfg3DPath ), NULL, this );
105
106}

References Cfg3DPath(), m_button3DShapeAdd, m_button3DShapeBrowse, m_button3DShapeRemove, m_buttonConfig3DPaths, m_modelsGrid, On3DModelCellChanged(), On3DModelSelected(), OnAdd3DModel(), OnAdd3DRow(), OnGridSize(), OnRemove3DModel(), and OnUpdateUI().

Member Function Documentation

◆ Cfg3DPath()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::Cfg3DPath ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 56 of file panel_fp_properties_3d_model_base.h.

56{ event.Skip(); }

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

◆ On3DModelCellChanged()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelCellChanged ( wxGridEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 51 of file panel_fp_properties_3d_model_base.h.

51{ event.Skip(); }

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

◆ On3DModelSelected()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::On3DModelSelected ( wxGridEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 52 of file panel_fp_properties_3d_model_base.h.

52{ event.Skip(); }

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

◆ OnAdd3DModel()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DModel ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 54 of file panel_fp_properties_3d_model_base.h.

54{ event.Skip(); }

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

◆ OnAdd3DRow()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnAdd3DRow ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 53 of file panel_fp_properties_3d_model_base.h.

53{ event.Skip(); }

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

◆ OnGridSize()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnGridSize ( wxSizeEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 49 of file panel_fp_properties_3d_model_base.h.

49{ event.Skip(); }

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

◆ OnRemove3DModel()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnRemove3DModel ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 55 of file panel_fp_properties_3d_model_base.h.

55{ event.Skip(); }

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

◆ OnUpdateUI()

virtual void PANEL_FP_PROPERTIES_3D_MODEL_BASE::OnUpdateUI ( wxUpdateUIEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_FP_PROPERTIES_3D_MODEL.

Definition at line 50 of file panel_fp_properties_3d_model_base.h.

50{ event.Skip(); }

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

Member Data Documentation

◆ bSizerMain3D

wxBoxSizer* PANEL_FP_PROPERTIES_3D_MODEL_BASE::bSizerMain3D
protected

◆ m_button3DShapeAdd

wxBitmapButton* PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_button3DShapeAdd
protected

◆ m_button3DShapeBrowse

wxBitmapButton* PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_button3DShapeBrowse
protected

◆ m_button3DShapeRemove

wxBitmapButton* PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_button3DShapeRemove
protected

◆ m_buttonConfig3DPaths

wxButton* PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_buttonConfig3DPaths
protected

◆ m_LowerSizer3D

wxBoxSizer* PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_LowerSizer3D
protected

◆ m_modelsGrid


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