KiCad PCB EDA Suite
dialog_edit_module_text_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Feb 6 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
10 
12 
14 
15 DialogEditModuleText_base::DialogEditModuleText_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* bMainSizer;
20  bMainSizer = new wxBoxSizer( wxVERTICAL );
21 
22 
23  bMainSizer->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
24 
25  m_ModuleInfoText = new wxStaticText( this, wxID_ANY, _("Footprint %s (%s) orientation %.1f"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_ModuleInfoText->Wrap( -1 );
27  m_ModuleInfoText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
28 
29  bMainSizer->Add( m_ModuleInfoText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
30 
31  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
32  bMainSizer->Add( m_staticline1, 0, wxALL|wxEXPAND, 5 );
33 
34  wxBoxSizer* bSizer9;
35  bSizer9 = new wxBoxSizer( wxVERTICAL );
36 
37  wxBoxSizer* bSizer10;
38  bSizer10 = new wxBoxSizer( wxHORIZONTAL );
39 
40  wxFlexGridSizer* fgSizer1;
41  fgSizer1 = new wxFlexGridSizer( 7, 2, 0, 0 );
42  fgSizer1->AddGrowableCol( 1 );
43  fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
44  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
45 
46  m_TextDataTitle = new wxStaticText( this, wxID_ANY, _("Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
47  m_TextDataTitle->Wrap( -1 );
48  fgSizer1->Add( m_TextDataTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
49 
50  m_Name = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
51  fgSizer1->Add( m_Name, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
52 
53  m_SizeXTitle = new wxStaticText( this, wxID_ANY, _("Width"), wxDefaultPosition, wxDefaultSize, 0 );
54  m_SizeXTitle->Wrap( -1 );
55  fgSizer1->Add( m_SizeXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
56 
57  m_TxtSizeCtrlX = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
58  fgSizer1->Add( m_TxtSizeCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
59 
60  m_SizeYTitle = new wxStaticText( this, wxID_ANY, _("Height"), wxDefaultPosition, wxDefaultSize, 0 );
61  m_SizeYTitle->Wrap( -1 );
62  fgSizer1->Add( m_SizeYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
63 
64  m_TxtSizeCtrlY = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
65  fgSizer1->Add( m_TxtSizeCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
66 
67  m_WidthTitle = new wxStaticText( this, wxID_ANY, _("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
68  m_WidthTitle->Wrap( -1 );
69  fgSizer1->Add( m_WidthTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
70 
71  m_TxtWidthCtlr = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
72  fgSizer1->Add( m_TxtWidthCtlr, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
73 
74  m_PosXTitle = new wxStaticText( this, wxID_ANY, _("Offset X"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_PosXTitle->Wrap( -1 );
76  fgSizer1->Add( m_PosXTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
77 
78  m_TxtPosCtrlX = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
79  fgSizer1->Add( m_TxtPosCtrlX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
80 
81  m_PosYTitle = new wxStaticText( this, wxID_ANY, _("Offset Y"), wxDefaultPosition, wxDefaultSize, 0 );
82  m_PosYTitle->Wrap( -1 );
83  fgSizer1->Add( m_PosYTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
84 
85  m_TxtPosCtrlY = new TEXT_CTRL_EVAL( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
86  fgSizer1->Add( m_TxtPosCtrlY, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
87 
88  m_LayerLabel = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
89  m_LayerLabel->Wrap( -1 );
90  fgSizer1->Add( m_LayerLabel, 0, wxALL, 5 );
91 
92  m_LayerSelectionCtrl = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
93  fgSizer1->Add( m_LayerSelectionCtrl, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
94 
95 
96  bSizer10->Add( fgSizer1, 3, wxALL|wxEXPAND, 5 );
97 
98  wxBoxSizer* bSizer4;
99  bSizer4 = new wxBoxSizer( wxVERTICAL );
100 
101  wxBoxSizer* bSizer5;
102  bSizer5 = new wxBoxSizer( wxHORIZONTAL );
103 
104  wxString m_ShowChoices[] = { _("Visible"), _("Invisible") };
105  int m_ShowNChoices = sizeof( m_ShowChoices ) / sizeof( wxString );
106  m_Show = new wxRadioBox( this, wxID_ANY, _("Display"), wxDefaultPosition, wxDefaultSize, m_ShowNChoices, m_ShowChoices, 1, wxRA_SPECIFY_COLS );
107  m_Show->SetSelection( 0 );
108  bSizer5->Add( m_Show, 1, wxEXPAND|wxRIGHT, 5 );
109 
110  wxString m_StyleChoices[] = { _("Normal"), _("Italic") };
111  int m_StyleNChoices = sizeof( m_StyleChoices ) / sizeof( wxString );
112  m_Style = new wxRadioBox( this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, m_StyleNChoices, m_StyleChoices, 1, wxRA_SPECIFY_COLS );
113  m_Style->SetSelection( 1 );
114  bSizer5->Add( m_Style, 1, wxEXPAND|wxLEFT, 5 );
115 
116 
117  bSizer4->Add( bSizer5, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
118 
119  wxString m_OrientChoices[] = { _("0.0"), _("+90.0"), _("-90.0"), _("180.0"), _("Other") };
120  int m_OrientNChoices = sizeof( m_OrientChoices ) / sizeof( wxString );
121  m_Orient = new wxRadioBox( this, wxID_ANY, _("Orientation"), wxDefaultPosition, wxDefaultSize, m_OrientNChoices, m_OrientChoices, 1, wxRA_SPECIFY_COLS );
122  m_Orient->SetSelection( 2 );
123  bSizer4->Add( m_Orient, 0, wxALL|wxEXPAND, 5 );
124 
125  m_staticTextRotation = new wxStaticText( this, wxID_ANY, _("Rotation (-180.0 to 180.0)"), wxDefaultPosition, wxDefaultSize, 0 );
126  m_staticTextRotation->Wrap( -1 );
127  bSizer4->Add( m_staticTextRotation, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
128 
129  m_OrientValueCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
130  bSizer4->Add( m_OrientValueCtrl, 0, wxALL|wxEXPAND, 5 );
131 
132  m_unlock = new wxCheckBox( this, wxID_ANY, _("Unlock text orientation"), wxDefaultPosition, wxDefaultSize, 0 );
133  m_unlock->SetToolTip( _("If orientation is locked, the text will always face near the bottom or right edge of the board.") );
134 
135  bSizer4->Add( m_unlock, 0, wxALL, 5 );
136 
137 
138  bSizer10->Add( bSizer4, 2, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
139 
140 
141  bSizer9->Add( bSizer10, 1, wxEXPAND, 5 );
142 
143 
144  bMainSizer->Add( bSizer9, 1, wxALL|wxEXPAND, 5 );
145 
146  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
147  bMainSizer->Add( m_staticline2, 0, wxEXPAND|wxALL, 5 );
148 
149  m_sdbSizer = new wxStdDialogButtonSizer();
150  m_sdbSizerOK = new wxButton( this, wxID_OK );
151  m_sdbSizer->AddButton( m_sdbSizerOK );
152  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
153  m_sdbSizer->AddButton( m_sdbSizerCancel );
154  m_sdbSizer->Realize();
155 
156  bMainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
157 
158 
159  this->SetSizer( bMainSizer );
160  this->Layout();
161 
162  // Connect Events
163  this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogEditModuleText_base::OnInitDlg ) );
164  m_Orient->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogEditModuleText_base::ModuleOrientEvent ), NULL, this );
165  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this );
166 }
167 
169 {
170  // Disconnect Events
171  this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogEditModuleText_base::OnInitDlg ) );
172  m_Orient->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DialogEditModuleText_base::ModuleOrientEvent ), NULL, this );
173  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogEditModuleText_base::OnOkClick ), NULL, this );
174 
175 }
PCB_LAYER_BOX_SELECTOR * m_LayerSelectionCtrl
wxStdDialogButtonSizer * m_sdbSizer
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
virtual void ModuleOrientEvent(wxCommandEvent &event)
wxTextCtrl wrapper to handle math expression evaluation.
virtual void OnInitDlg(wxInitDialogEvent &event)
DialogEditModuleText_base(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Footprint Text Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(607, 445), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOkClick(wxCommandEvent &event)