KiCad PCB EDA Suite
dialog_design_inspector_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 1 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_INSPECTOR_BASE::DIALOG_INSPECTOR_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  m_panelList = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
20  wxBoxSizer* bSizerListMain;
21  bSizerListMain = new wxBoxSizer( wxVERTICAL );
22 
23  m_gridListItems = new wxGrid( m_panelList, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
24 
25  // Grid
26  m_gridListItems->CreateGrid( 1, 5 );
27  m_gridListItems->EnableEditing( true );
28  m_gridListItems->EnableGridLines( true );
29  m_gridListItems->EnableDragGridSize( false );
30  m_gridListItems->SetMargins( 0, 0 );
31 
32  // Columns
33  m_gridListItems->EnableDragColMove( false );
34  m_gridListItems->EnableDragColSize( true );
35  m_gridListItems->SetColLabelSize( 30 );
36  m_gridListItems->SetColLabelValue( 0, _("-") );
37  m_gridListItems->SetColLabelValue( 1, _("Type") );
38  m_gridListItems->SetColLabelValue( 2, _("Count") );
39  m_gridListItems->SetColLabelValue( 3, _("Comment") );
40  m_gridListItems->SetColLabelValue( 4, _("Text") );
41  m_gridListItems->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
42 
43  // Rows
44  m_gridListItems->EnableDragRowSize( true );
45  m_gridListItems->SetRowLabelSize( 40 );
46  m_gridListItems->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47 
48  // Label Appearance
49 
50  // Cell Defaults
51  m_gridListItems->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52  bSizerListMain->Add( m_gridListItems, 1, wxALL|wxEXPAND, 5 );
53 
54 
55  m_panelList->SetSizer( bSizerListMain );
56  m_panelList->Layout();
57  bSizerListMain->Fit( m_panelList );
58  bSizerMain->Add( m_panelList, 1, wxEXPAND, 5 );
59 
60  m_sdbSizer = new wxStdDialogButtonSizer();
61  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
62  m_sdbSizer->AddButton( m_sdbSizerCancel );
63  m_sdbSizer->Realize();
64 
65  bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
66 
67 
68  this->SetSizer( bSizerMain );
69  this->Layout();
70 
71  this->Centre( wxBOTH );
72 
73  // Connect Events
74  m_gridListItems->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_INSPECTOR_BASE::onCellClicked ), NULL, this );
75 }
76 
78 {
79  // Disconnect Events
80  m_gridListItems->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_INSPECTOR_BASE::onCellClicked ), NULL, this );
81 
82 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void onCellClicked(wxGridEvent &event)
#define NULL
#define _(s)
Definition: 3d_actions.cpp:33
DIALOG_INSPECTOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(423, 293), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer