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