KiCad PCB EDA Suite
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|wxALIGN_RIGHT|wxLEFT|wxTOP, 5 );
34 
35  m_GridOriginXCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36  fgSizerGridOrigin->Add( m_GridOriginXCtrl, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 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|wxTOP, 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|wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxTOP, 5 );
45 
46  m_GridOriginYCtrl = new wxTextCtrl( sbLeftSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
47  fgSizerGridOrigin->Add( m_GridOriginYCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 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, 1, wxALL|wxEXPAND, 5 );
55 
56  m_buttonReset = new wxButton( sbLeftSizer->GetStaticBox(), wxID_ANY, _("Reset Grid Origin"), wxDefaultPosition, wxDefaultSize, 0 );
57  sbLeftSizer->Add( m_buttonReset, 0, wxALL|wxEXPAND, 5 );
58 
59 
60  bUpperSizer->Add( sbLeftSizer, 0, wxEXPAND|wxALL, 5 );
61 
62  wxBoxSizer* bRightSizer;
63  bRightSizer = new wxBoxSizer( wxVERTICAL );
64 
65  wxStaticBoxSizer* sbUserGridSizer;
66  sbUserGridSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Defined Grid") ), wxVERTICAL );
67 
68  wxFlexGridSizer* fgSizer31;
69  fgSizer31 = new wxFlexGridSizer( 2, 3, 0, 0 );
70  fgSizer31->AddGrowableCol( 1 );
71  fgSizer31->SetFlexibleDirection( wxBOTH );
72  fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
73 
74  m_staticTextSizeX = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_staticTextSizeX->Wrap( -1 );
76  fgSizer31->Add( m_staticTextSizeX, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
77 
78  m_OptGridSizeX = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
79  fgSizer31->Add( m_OptGridSizeX, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
80 
81  m_TextSizeXUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
82  m_TextSizeXUnits->Wrap( -1 );
83  fgSizer31->Add( m_TextSizeXUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
84 
85  m_staticTextSizeY = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 );
86  m_staticTextSizeY->Wrap( -1 );
87  fgSizer31->Add( m_staticTextSizeY, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
88 
89  m_OptGridSizeY = new wxTextCtrl( sbUserGridSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
90  fgSizer31->Add( m_OptGridSizeY, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
91 
92  m_TextSizeYUnits = new wxStaticText( sbUserGridSizer->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
93  m_TextSizeYUnits->Wrap( -1 );
94  fgSizer31->Add( m_TextSizeYUnits, 0, wxALIGN_CENTER_VERTICAL, 5 );
95 
96 
97  sbUserGridSizer->Add( fgSizer31, 0, wxALL|wxEXPAND, 5 );
98 
99 
100  bRightSizer->Add( sbUserGridSizer, 0, wxALL|wxEXPAND, 5 );
101 
102  wxStaticBoxSizer* sbFastSwitchSizer;
103  sbFastSwitchSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fast Switching") ), wxVERTICAL );
104 
105  wxFlexGridSizer* fgSizer3;
106  fgSizer3 = new wxFlexGridSizer( 2, 2, 0, 0 );
107  fgSizer3->AddGrowableCol( 1 );
108  fgSizer3->SetFlexibleDirection( wxBOTH );
109  fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
110 
111  m_staticTextGrid1 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 1:"), wxDefaultPosition, wxDefaultSize, 0 );
112  m_staticTextGrid1->Wrap( -1 );
113  fgSizer3->Add( m_staticTextGrid1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
114 
115  m_comboBoxGrid1 = new wxComboBox( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
116  fgSizer3->Add( m_comboBoxGrid1, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
117 
118  m_staticTextGrid2 = new wxStaticText( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, _("Grid 2:"), wxDefaultPosition, wxDefaultSize, 0 );
119  m_staticTextGrid2->Wrap( -1 );
120  fgSizer3->Add( m_staticTextGrid2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT, 5 );
121 
122  m_comboBoxGrid2 = new wxComboBox( sbFastSwitchSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
123  fgSizer3->Add( m_comboBoxGrid2, 1, wxALL|wxEXPAND, 5 );
124 
125 
126  sbFastSwitchSizer->Add( fgSizer3, 0, wxEXPAND, 5 );
127 
128 
129  bRightSizer->Add( sbFastSwitchSizer, 0, wxALL|wxEXPAND, 5 );
130 
131 
132  bUpperSizer->Add( bRightSizer, 1, wxEXPAND, 5 );
133 
134 
135  bSizerMain->Add( bUpperSizer, 1, wxEXPAND, 5 );
136 
137  m_sdbSizer = new wxStdDialogButtonSizer();
138  m_sdbSizerOK = new wxButton( this, wxID_OK );
139  m_sdbSizer->AddButton( m_sdbSizerOK );
140  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
141  m_sdbSizer->AddButton( m_sdbSizerCancel );
142  m_sdbSizer->Realize();
143 
144  bSizerMain->Add( m_sdbSizer, 0, wxEXPAND, 5 );
145 
146 
147  this->SetSizer( bSizerMain );
148  this->Layout();
149  bSizerMain->Fit( this );
150 
151  // Connect Events
152  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SET_GRID_BASE::OnInitDlg ) );
153  m_buttonReset->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnResetGridOrgClick ), NULL, this );
154  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnCancelClick ), NULL, this );
155  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnOkClick ), NULL, this );
156 }
157 
159 {
160  // Disconnect Events
161  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SET_GRID_BASE::OnInitDlg ) );
162  m_buttonReset->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnResetGridOrgClick ), NULL, this );
163  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnCancelClick ), NULL, this );
164  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SET_GRID_BASE::OnOkClick ), NULL, this );
165 
166 }
wxStaticText * m_TextSizeXUnits
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|wxRESIZE_BORDER)
wxStaticText * m_staticTextGrid1
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
wxStaticText * m_TextSizeYUnits
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
virtual void OnCancelClick(wxCommandEvent &event)
virtual void OnResetGridOrgClick(wxCommandEvent &event)