KiCad PCB EDA Suite
dialog_grid_settings_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 
9 
11 
12 DIALOG_GRID_SETTINGS_BASE::DIALOG_GRID_SETTINGS_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  m_book = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23  wxPanel* gridOriginPage;
24  gridOriginPage = new wxPanel( m_book, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
25  wxStaticBoxSizer* sbLeftSizer;
26  sbLeftSizer = new wxStaticBoxSizer( new wxStaticBox( gridOriginPage, wxID_ANY, _("Grid Origin") ), wxVERTICAL );
27 
28  wxFlexGridSizer* fgSizerGridOrigin;
29  fgSizerGridOrigin = new wxFlexGridSizer( 2, 3, 0, 0 );
30  fgSizerGridOrigin->AddGrowableCol( 1 );
31  fgSizerGridOrigin->SetFlexibleDirection( wxBOTH );
32  fgSizerGridOrigin->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
33 
34  m_staticTextGridPosX = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticTextGridPosX->Wrap( -1 );
36  fgSizerGridOrigin->Add( m_staticTextGridPosX, 0, wxALIGN_CENTER_VERTICAL, 5 );
37 
38  m_GridOriginXCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
39  fgSizerGridOrigin->Add( m_GridOriginXCtrl, 0, wxEXPAND|wxLEFT, 5 );
40 
41  m_TextPosXUnits = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
42  m_TextPosXUnits->Wrap( -1 );
43  fgSizerGridOrigin->Add( m_TextPosXUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 5 );
44 
45  m_staticTextGridPosY = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
46  m_staticTextGridPosY->Wrap( -1 );
47  fgSizerGridOrigin->Add( m_staticTextGridPosY, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
48 
49  m_GridOriginYCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
50  fgSizerGridOrigin->Add( m_GridOriginYCtrl, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
51 
52  m_TextPosYUnits = new wxStaticText( sbLeftSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
53  m_TextPosYUnits->Wrap( -1 );
54  fgSizerGridOrigin->Add( m_TextPosYUnits, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 5 );
55 
56 
57  sbLeftSizer->Add( fgSizerGridOrigin, 0, wxEXPAND|wxALL, 5 );
58 
59 
60  gridOriginPage->SetSizer( sbLeftSizer );
61  gridOriginPage->Layout();
62  sbLeftSizer->Fit( gridOriginPage );
63  m_book->AddPage( gridOriginPage, _("a page"), false );
64  wxPanel* currentGridPage;
65  currentGridPage = new wxPanel( m_book, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
66  wxStaticBoxSizer* sbSizer5;
67  sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( currentGridPage, wxID_ANY, _("Current Grid") ), wxVERTICAL );
68 
69  wxArrayString m_currentGridCtrlChoices;
70  m_currentGridCtrl = new wxChoice( sbSizer5->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_currentGridCtrlChoices, 0 );
71  m_currentGridCtrl->SetSelection( 0 );
72  sbSizer5->Add( m_currentGridCtrl, 0, wxALL|wxEXPAND, 5 );
73 
74 
75  currentGridPage->SetSizer( sbSizer5 );
76  currentGridPage->Layout();
77  sbSizer5->Fit( currentGridPage );
78  m_book->AddPage( currentGridPage, _("a page"), false );
79 
80  bUpperSizer->Add( m_book, 1, wxEXPAND | wxALL, 5 );
81 
82  wxStaticBoxSizer* sbUserGridSizer;
83  sbUserGridSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Defined Grid") ), wxVERTICAL );
84 
85  wxFlexGridSizer* fgSizer31;
86  fgSizer31 = new wxFlexGridSizer( 2, 3, 0, 0 );
87  fgSizer31->AddGrowableCol( 1 );
88  fgSizer31->SetFlexibleDirection( wxBOTH );
89  fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
90 
91  m_staticTextSizeX = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
92  m_staticTextSizeX->Wrap( -1 );
93  fgSizer31->Add( m_staticTextSizeX, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
94 
95  m_OptGridSizeX = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
96  fgSizer31->Add( m_OptGridSizeX, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
97 
98  m_TextSizeXUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
99  m_TextSizeXUnits->Wrap( -1 );
100  fgSizer31->Add( m_TextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
101 
102  m_staticTextSizeY = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
103  m_staticTextSizeY->Wrap( -1 );
104  fgSizer31->Add( m_staticTextSizeY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
105 
106  m_OptGridSizeY = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
107  fgSizer31->Add( m_OptGridSizeY, 0, wxEXPAND|wxLEFT, 5 );
108 
109  m_TextSizeYUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
110  m_TextSizeYUnits->Wrap( -1 );
111  fgSizer31->Add( m_TextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
112 
113 
114  sbUserGridSizer->Add( fgSizer31, 0, wxEXPAND|wxALL, 5 );
115 
116 
117  bUpperSizer->Add( sbUserGridSizer, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
118 
119 
120  bSizerMain->Add( bUpperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
121 
122  wxStaticBoxSizer* sbFastSwitchSizer;
123  sbFastSwitchSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fast Switching") ), wxVERTICAL );
124 
125  wxFlexGridSizer* fgSizer3;
126  fgSizer3 = new wxFlexGridSizer( 2, 3, 0, 5 );
127  fgSizer3->AddGrowableCol( 1 );
128  fgSizer3->SetFlexibleDirection( wxBOTH );
129  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
130 
131  m_staticTextGrid1 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 1:"), wxDefaultPosition, wxDefaultSize, 0 );
132  m_staticTextGrid1->Wrap( -1 );
133  fgSizer3->Add( m_staticTextGrid1, 0, wxALIGN_CENTER_VERTICAL, 5 );
134 
135  wxArrayString m_grid1CtrlChoices;
136  m_grid1Ctrl = new wxChoice( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_grid1CtrlChoices, 0 );
137  m_grid1Ctrl->SetSelection( 0 );
138  m_grid1Ctrl->SetMinSize( wxSize( 240,-1 ) );
139 
140  fgSizer3->Add( m_grid1Ctrl, 1, wxALL|wxEXPAND, 5 );
141 
142  m_grid1HotKey = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
143  m_grid1HotKey->Wrap( -1 );
144  fgSizer3->Add( m_grid1HotKey, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
145 
146  m_staticTextGrid2 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 2:"), wxDefaultPosition, wxDefaultSize, 0 );
147  m_staticTextGrid2->Wrap( -1 );
148  fgSizer3->Add( m_staticTextGrid2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
149 
150  wxArrayString m_grid2CtrlChoices;
151  m_grid2Ctrl = new wxChoice( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_grid2CtrlChoices, 0 );
152  m_grid2Ctrl->SetSelection( 0 );
153  m_grid2Ctrl->SetMinSize( wxSize( 240,-1 ) );
154 
155  fgSizer3->Add( m_grid2Ctrl, 1, wxALL|wxEXPAND, 5 );
156 
157  m_grid2HotKey = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("(hotkey)"), wxDefaultPosition, wxDefaultSize, 0 );
158  m_grid2HotKey->Wrap( -1 );
159  fgSizer3->Add( m_grid2HotKey, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
160 
161 
162  sbFastSwitchSizer->Add( fgSizer3, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
163 
164 
165  bSizerMain->Add( sbFastSwitchSizer, 0, wxEXPAND|wxALL, 10 );
166 
167  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
168  bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
169 
170  wxBoxSizer* bButtonSizer;
171  bButtonSizer = new wxBoxSizer( wxHORIZONTAL );
172 
173  m_buttonResetOrigin = new wxButton( this, wxID_ANY, _("Reset Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
174  bButtonSizer->Add( m_buttonResetOrigin, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
175 
176  m_buttonResetSizes = new wxButton( this, wxID_ANY, _("Reset Grid Sizes"), wxDefaultPosition, wxDefaultSize, 0 );
177  m_buttonResetSizes->Hide();
178  m_buttonResetSizes->SetToolTip( _("Resets the list of grid sizes to default values") );
179 
180  bButtonSizer->Add( m_buttonResetSizes, 0, wxALL, 5 );
181 
182 
183  bButtonSizer->Add( 0, 0, 1, wxEXPAND, 5 );
184 
185  m_sdbSizer = new wxStdDialogButtonSizer();
186  m_sdbSizerOK = new wxButton( this, wxID_OK );
187  m_sdbSizer->AddButton( m_sdbSizerOK );
188  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
189  m_sdbSizer->AddButton( m_sdbSizerCancel );
190  m_sdbSizer->Realize();
191 
192  bButtonSizer->Add( m_sdbSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
193 
194 
195  bSizerMain->Add( bButtonSizer, 0, wxEXPAND|wxLEFT, 10 );
196 
197 
198  this->SetSizer( bSizerMain );
199  this->Layout();
200  bSizerMain->Fit( this );
201 
202  // Connect Events
203  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GRID_SETTINGS_BASE::OnInitDlg ) );
204  m_buttonResetOrigin->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnResetGridOriginClick ), NULL, this );
205  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnCancelClick ), NULL, this );
206  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnOkClick ), NULL, this );
207 }
208 
210 {
211  // Disconnect Events
212  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GRID_SETTINGS_BASE::OnInitDlg ) );
213  m_buttonResetOrigin->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnResetGridOriginClick ), NULL, this );
214  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnCancelClick ), NULL, this );
215  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GRID_SETTINGS_BASE::OnOkClick ), NULL, this );
216 
217 }
virtual void OnOkClick(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
DIALOG_GRID_SETTINGS_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|wxRESIZE_BORDER)
virtual void OnInitDlg(wxInitDialogEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void OnResetGridOriginClick(wxCommandEvent &event)
#define _(s)
virtual void OnCancelClick(wxCommandEvent &event)