KiCad PCB EDA Suite
dialog_dxf_import_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 5 2014)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
10 #include "dialog_dxf_import_base.h"
11 
13 
14 DIALOG_DXF_IMPORT_BASE::DIALOG_DXF_IMPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15 {
16  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bSizerMain;
19  bSizerMain = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bSizerFile;
22  bSizerFile = new wxBoxSizer( wxHORIZONTAL );
23 
24  m_staticText37 = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
25  m_staticText37->Wrap( -1 );
26  bSizerFile->Add( m_staticText37, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
27 
28  m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
29  m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) );
30 
31  bSizerFile->Add( m_textCtrlFileName, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
32 
33  m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
34  bSizerFile->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
35 
36 
37  bSizerMain->Add( bSizerFile, 0, wxALL|wxEXPAND, 5 );
38 
39  wxBoxSizer* bSizer3;
40  bSizer3 = new wxBoxSizer( wxHORIZONTAL );
41 
42  wxString m_rbOffsetOptionChoices[] = { _("Center of page"), _("Upper left corner of page"), _("Center left side of page"), _("Lower left corner of page"), _("User defined position") };
43  int m_rbOffsetOptionNChoices = sizeof( m_rbOffsetOptionChoices ) / sizeof( wxString );
44  m_rbOffsetOption = new wxRadioBox( this, wxID_ORIGIN_SELECT, _("Place DXF origin (0,0) point:"), wxDefaultPosition, wxDefaultSize, m_rbOffsetOptionNChoices, m_rbOffsetOptionChoices, 1, wxRA_SPECIFY_COLS );
45  m_rbOffsetOption->SetSelection( 0 );
46  bSizer3->Add( m_rbOffsetOption, 0, wxALL|wxEXPAND, 5 );
47 
48  wxBoxSizer* bSizer4;
49  bSizer4 = new wxBoxSizer( wxVERTICAL );
50 
51  wxBoxSizer* bSizer6;
52  bSizer6 = new wxBoxSizer( wxHORIZONTAL );
53 
54  m_staticText4 = new wxStaticText( this, wxID_ANY, _("X Position:"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_staticText4->Wrap( -1 );
56  bSizer6->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
57 
58  m_DXFPCBXCoord = new wxTextCtrl( this, wxID_ANY, _("0.0"), wxDefaultPosition, wxDefaultSize, 0 );
59  m_DXFPCBXCoord->SetMaxLength( 10 );
60  m_DXFPCBXCoord->SetToolTip( _("DXF origin on PCB Grid, X Coordinate") );
61 
62  bSizer6->Add( m_DXFPCBXCoord, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
63 
64 
65  bSizer4->Add( bSizer6, 1, wxEXPAND, 5 );
66 
67  wxBoxSizer* bSizer7;
68  bSizer7 = new wxBoxSizer( wxHORIZONTAL );
69 
70  m_staticText5 = new wxStaticText( this, wxID_ANY, _("Y Position:"), wxDefaultPosition, wxDefaultSize, 0 );
71  m_staticText5->Wrap( -1 );
72  bSizer7->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
73 
74  m_DXFPCBYCoord = new wxTextCtrl( this, wxID_ANY, _("0.0"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_DXFPCBYCoord->SetMaxLength( 10 );
76  m_DXFPCBYCoord->SetToolTip( _("DXF origin on PCB Grid, Y Coordinate") );
77 
78  bSizer7->Add( m_DXFPCBYCoord, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
79 
80 
81  bSizer4->Add( bSizer7, 1, wxEXPAND, 5 );
82 
83  wxBoxSizer* bSizer5;
84  bSizer5 = new wxBoxSizer( wxHORIZONTAL );
85 
86  m_staticText3 = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
87  m_staticText3->Wrap( -1 );
88  bSizer5->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
89 
90  wxString m_DXFPCBGridUnitsChoices[] = { _("mm"), _("inch") };
91  int m_DXFPCBGridUnitsNChoices = sizeof( m_DXFPCBGridUnitsChoices ) / sizeof( wxString );
92  m_DXFPCBGridUnits = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_DXFPCBGridUnitsNChoices, m_DXFPCBGridUnitsChoices, 0 );
93  m_DXFPCBGridUnits->SetSelection( 0 );
94  m_DXFPCBGridUnits->SetToolTip( _("Select PCB grid units") );
95 
96  bSizer5->Add( m_DXFPCBGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
97 
98 
99  bSizer4->Add( bSizer5, 1, wxEXPAND, 5 );
100 
101 
102  bSizer3->Add( bSizer4, 1, 0, 5 );
103 
104 
105  bSizerMain->Add( bSizer3, 1, wxALL|wxEXPAND, 5 );
106 
107  wxBoxSizer* bSizer8;
108  bSizer8 = new wxBoxSizer( wxHORIZONTAL );
109 
110  m_staticTextBrdlayer = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
111  m_staticTextBrdlayer->Wrap( -1 );
112  bSizer8->Add( m_staticTextBrdlayer, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
113 
114  m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
115  bSizer8->Add( m_SelLayerBox, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
116 
117 
118  bSizerMain->Add( bSizer8, 0, wxALL|wxEXPAND, 5 );
119 
120  m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
121  bSizerMain->Add( m_staticline8, 0, wxALL|wxEXPAND, 5 );
122 
123  m_sdbSizer1 = new wxStdDialogButtonSizer();
124  m_sdbSizer1OK = new wxButton( this, wxID_OK );
125  m_sdbSizer1->AddButton( m_sdbSizer1OK );
126  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
127  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
128  m_sdbSizer1->Realize();
129 
130  bSizerMain->Add( m_sdbSizer1, 0, wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
131 
132 
133  this->SetSizer( bSizerMain );
134  this->Layout();
135  bSizerMain->Fit( this );
136 
137  this->Centre( wxBOTH );
138 
139  // Connect Events
140  m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnBrowseDxfFiles ), NULL, this );
141  m_rbOffsetOption->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DXF_IMPORT_BASE::OriginOptionOnUpdateUI ), NULL, this );
142  m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnCancelClick ), NULL, this );
143  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnOKClick ), NULL, this );
144 }
145 
147 {
148  // Disconnect Events
149  m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnBrowseDxfFiles ), NULL, this );
150  m_rbOffsetOption->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_DXF_IMPORT_BASE::OriginOptionOnUpdateUI ), NULL, this );
151  m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnCancelClick ), NULL, this );
152  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnOKClick ), NULL, this );
153 
154 }
virtual void OnCancelClick(wxCommandEvent &event)
Class to display a pcb layer list in a wxBitmapComboBox.
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
DIALOG_DXF_IMPORT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Import DXF File"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOKClick(wxCommandEvent &event)
virtual void OriginOptionOnUpdateUI(wxUpdateUIEvent &event)
#define wxID_ORIGIN_SELECT
virtual void OnBrowseDxfFiles(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer1