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