KiCad PCB EDA Suite
pcbnew/dialogs/dialog_set_grid_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_set_grid_base.h"
9 
11 
12 DIALOG_SET_GRID_BASE::DIALOG_SET_GRID_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* bUpperSizer;
20  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxStaticBoxSizer* sbLeftSizer;
23  sbLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Grid Origin") ), wxVERTICAL );
24 
25  wxFlexGridSizer* fgSizerGridOrigin;
26  fgSizerGridOrigin = new wxFlexGridSizer( 2, 3, 0, 0 );
27  fgSizerGridOrigin->AddGrowableCol( 1 );
28  fgSizerGridOrigin->SetFlexibleDirection( wxBOTH );
29  fgSizerGridOrigin->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
30 
31  m_staticTextGridPosX = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
32  m_staticTextGridPosX->Wrap( -1 );
33  fgSizerGridOrigin->Add( m_staticTextGridPosX, 0, wxALIGN_CENTER_VERTICAL, 5 );
34 
35  m_GridOriginXCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36  fgSizerGridOrigin->Add( m_GridOriginXCtrl, 0, wxEXPAND|wxLEFT, 5 );
37 
38  m_TextPosXUnits = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
39  m_TextPosXUnits->Wrap( -1 );
40  fgSizerGridOrigin->Add( m_TextPosXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
41 
42  m_staticTextGridPosY = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
43  m_staticTextGridPosY->Wrap( -1 );
44  fgSizerGridOrigin->Add( m_staticTextGridPosY, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
45 
46  m_GridOriginYCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
47  fgSizerGridOrigin->Add( m_GridOriginYCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
48 
49  m_TextPosYUnits = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
50  m_TextPosYUnits->Wrap( -1 );
51  fgSizerGridOrigin->Add( m_TextPosYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT, 5 );
52 
53 
54  sbLeftSizer->Add( fgSizerGridOrigin, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
55 
56 
57  bUpperSizer->Add( sbLeftSizer, 0, wxEXPAND|wxALL, 5 );
58 
59  wxStaticBoxSizer* sbUserGridSizer;
60  sbUserGridSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Defined Grid") ), wxVERTICAL );
61 
62  wxFlexGridSizer* fgSizer31;
63  fgSizer31 = new wxFlexGridSizer( 2, 3, 0, 0 );
64  fgSizer31->AddGrowableCol( 1 );
65  fgSizer31->SetFlexibleDirection( wxBOTH );
66  fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
67 
68  m_staticTextSizeX = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
69  m_staticTextSizeX->Wrap( -1 );
70  fgSizer31->Add( m_staticTextSizeX, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
71 
72  m_OptGridSizeX = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
73  fgSizer31->Add( m_OptGridSizeX, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
74 
75  m_TextSizeXUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_TextSizeXUnits->Wrap( -1 );
77  fgSizer31->Add( m_TextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
78 
79  m_staticTextSizeY = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
80  m_staticTextSizeY->Wrap( -1 );
81  fgSizer31->Add( m_staticTextSizeY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
82 
83  m_OptGridSizeY = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
84  fgSizer31->Add( m_OptGridSizeY, 0, wxEXPAND|wxLEFT, 5 );
85 
86  m_TextSizeYUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
87  m_TextSizeYUnits->Wrap( -1 );
88  fgSizer31->Add( m_TextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
89 
90 
91  sbUserGridSizer->Add( fgSizer31, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
92 
93 
94  bUpperSizer->Add( sbUserGridSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
95 
96 
97  bSizerMain->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
98 
99  wxStaticBoxSizer* sbFastSwitchSizer;
100  sbFastSwitchSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fast Switching") ), wxVERTICAL );
101 
102  wxFlexGridSizer* fgSizer3;
103  fgSizer3 = new wxFlexGridSizer( 2, 3, 0, 5 );
104  fgSizer3->AddGrowableCol( 1 );
105  fgSizer3->SetFlexibleDirection( wxBOTH );
106  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
107 
108  m_staticTextGrid1 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 1:"), wxDefaultPosition, wxDefaultSize, 0 );
109  m_staticTextGrid1->Wrap( -1 );
110  fgSizer3->Add( m_staticTextGrid1, 0, wxALIGN_CENTER_VERTICAL, 5 );
111 
112  m_comboBoxGrid1 = new wxComboBox( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
113  m_comboBoxGrid1->SetMinSize( wxSize( 240,-1 ) );
114 
115  fgSizer3->Add( m_comboBoxGrid1, 0, wxEXPAND, 5 );
116 
117  m_grid1HotKey = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
118  m_grid1HotKey->Wrap( -1 );
119  fgSizer3->Add( m_grid1HotKey, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
120 
121  m_staticTextGrid2 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 2:"), wxDefaultPosition, wxDefaultSize, 0 );
122  m_staticTextGrid2->Wrap( -1 );
123  fgSizer3->Add( m_staticTextGrid2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
124 
125  m_comboBoxGrid2 = new wxComboBox( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
126  m_comboBoxGrid2->SetMinSize( wxSize( 240,-1 ) );
127 
128  fgSizer3->Add( m_comboBoxGrid2, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
129 
130  m_grid2HotKey = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
131  m_grid2HotKey->Wrap( -1 );
132  fgSizer3->Add( m_grid2HotKey, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
133 
134 
135  sbFastSwitchSizer->Add( fgSizer3, 0, wxEXPAND|wxLEFT, 5 );
136 
137 
138  bSizerMain->Add( sbFastSwitchSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
139 
140  wxBoxSizer* bButtonSizer;
141  bButtonSizer = new wxBoxSizer( wxHORIZONTAL );
142 
143  m_buttonReset = new wxButton( this, wxID_ANY, _("Reset Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
144  bButtonSizer->Add( m_buttonReset, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
145 
146 
147  bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
148 
149  m_sdbSizer = new wxStdDialogButtonSizer();
150  m_sdbSizerOK = new wxButton( this, wxID_OK );
151  m_sdbSizer->AddButton( m_sdbSizerOK );
152  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
153  m_sdbSizer->AddButton( m_sdbSizerCancel );
154  m_sdbSizer->Realize();
155 
156  bButtonSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
157 
158 
159  bSizerMain->Add( bButtonSizer, 0, wxEXPAND|wxLEFT, 10 );
160 
161 
162  this->SetSizer( bSizerMain );
163  this->Layout();
164  bSizerMain->Fit( this );
165 
166  // Connect Events
167  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SET_GRID_BASE::OnInitDlg ) );
168  m_buttonReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnResetGridOrgClick ), NULL, this );
169  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnCancelClick ), NULL, this );
170  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnOkClick ), NULL, this );
171 }
172 
174 {
175  // Disconnect Events
176  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SET_GRID_BASE::OnInitDlg ) );
177  m_buttonReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnResetGridOrgClick ), NULL, this );
178  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnCancelClick ), NULL, this );
179  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnOkClick ), NULL, this );
180 
181 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
DIALOG_SET_GRID_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Grid Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE)
virtual void OnInitDlg(wxInitDialogEvent &event)
virtual void OnOkClick(wxCommandEvent &event)
virtual void OnCancelClick(wxCommandEvent &event)
virtual void OnResetGridOrgClick(wxCommandEvent &event)