KiCad PCB EDA Suite
dialog_dimension_editor_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Apr 19 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
10 
12 
14 
15 DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16 {
17  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 
19  wxBoxSizer* bSizerMain;
20  bSizerMain = new wxBoxSizer( wxVERTICAL );
21 
22  m_staticTextDim = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_staticTextDim->Wrap( -1 );
24  bSizerMain->Add( m_staticTextDim, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
25 
26  m_Name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
27  m_Name->SetMinSize( wxSize( 400,-1 ) );
28 
29  bSizerMain->Add( m_Name, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
30 
31  wxBoxSizer* bSizerUpper;
32  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
33 
34  wxBoxSizer* bSizerLeft;
35  bSizerLeft = new wxBoxSizer( wxVERTICAL );
36 
37  m_staticTextSizeX = new wxStaticText( this, wxID_ANY, _("Text width:"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_staticTextSizeX->Wrap( -1 );
39  bSizerLeft->Add( m_staticTextSizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
40 
41  m_TxtSizeXCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
42  bSizerLeft->Add( m_TxtSizeXCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
43 
44  m_staticTextSizeY = new wxStaticText( this, wxID_ANY, _("Text height:"), wxDefaultPosition, wxDefaultSize, 0 );
45  m_staticTextSizeY->Wrap( -1 );
46  bSizerLeft->Add( m_staticTextSizeY, 0, wxRIGHT|wxLEFT, 5 );
47 
48  m_TxtSizeYCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
49  bSizerLeft->Add( m_TxtSizeYCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
50 
51  m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Text thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
52  m_staticTextWidth->Wrap( -1 );
53  bSizerLeft->Add( m_staticTextWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
54 
55  m_TxtWidthCtrl = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
56  bSizerLeft->Add( m_TxtWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
57 
58  m_staticTextPosX = new wxStaticText( this, wxID_ANY, _("Text position X:"), wxDefaultPosition, wxDefaultSize, 0 );
59  m_staticTextPosX->Wrap( -1 );
60  bSizerLeft->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
61 
62  m_textCtrlPosX = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
63  bSizerLeft->Add( m_textCtrlPosX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
64 
65  m_staticTextPosY = new wxStaticText( this, wxID_ANY, _("Text position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
66  m_staticTextPosY->Wrap( -1 );
67  bSizerLeft->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
68 
69  m_textCtrlPosY = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
70  bSizerLeft->Add( m_textCtrlPosY, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
71 
72 
73  bSizerUpper->Add( bSizerLeft, 1, wxEXPAND, 5 );
74 
75  wxBoxSizer* bSizerRight;
76  bSizerRight = new wxBoxSizer( wxVERTICAL );
77 
78  wxString m_rbMirrorChoices[] = { _("Normal"), _("Mirror") };
79  int m_rbMirrorNChoices = sizeof( m_rbMirrorChoices ) / sizeof( wxString );
80  m_rbMirror = new wxRadioBox( this, wxID_ANY, _("Display:"), wxDefaultPosition, wxDefaultSize, m_rbMirrorNChoices, m_rbMirrorChoices, 1, wxRA_SPECIFY_COLS );
81  m_rbMirror->SetSelection( 0 );
82  bSizerRight->Add( m_rbMirror, 0, wxALL|wxEXPAND, 5 );
83 
84  m_staticTextLayer = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
85  m_staticTextLayer->Wrap( -1 );
86  bSizerRight->Add( m_staticTextLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
87 
88  m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
89  bSizerRight->Add( m_SelLayerBox, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
90 
91 
92  bSizerUpper->Add( bSizerRight, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
93 
94 
95  bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
96 
97  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
98  bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
99 
100  m_sdbSizerBts = new wxStdDialogButtonSizer();
101  m_sdbSizerBtsOK = new wxButton( this, wxID_OK );
102  m_sdbSizerBts->AddButton( m_sdbSizerBtsOK );
103  m_sdbSizerBtsCancel = new wxButton( this, wxID_CANCEL );
104  m_sdbSizerBts->AddButton( m_sdbSizerBtsCancel );
105  m_sdbSizerBts->Realize();
106 
107  bSizerMain->Add( m_sdbSizerBts, 0, wxALL|wxEXPAND, 5 );
108 
109 
110  this->SetSizer( bSizerMain );
111  this->Layout();
112  bSizerMain->Fit( this );
113 
114  this->Centre( wxBOTH );
115 
116  // Connect Events
117  m_TxtSizeXCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
118  m_TxtSizeYCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
119  m_TxtWidthCtrl->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
120  m_textCtrlPosX->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
121  m_textCtrlPosY->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
122  m_sdbSizerBtsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
123 }
124 
126 {
127  // Disconnect Events
128  m_TxtSizeXCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
129  m_TxtSizeYCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
130  m_TxtWidthCtrl->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
131  m_textCtrlPosX->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
132  m_textCtrlPosY->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
133  m_sdbSizerBtsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DIMENSION_EDITOR_BASE::OnOKClick ), NULL, this );
134 
135 }
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:70
DIALOG_DIMENSION_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Dimension Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxTextCtrl wrapper to handle math expression evaluation.
virtual void OnOKClick(wxCommandEvent &event)