KiCad PCB EDA Suite
dialog_regulator_form_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_REGULATOR_FORM_BASE::DIALOG_REGULATOR_FORM_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( wxSize( -1,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  bSizerMain->SetMinSize( wxSize( 300,-1 ) );
20  wxFlexGridSizer* fgSizerPrms;
21  fgSizerPrms = new wxFlexGridSizer( 4, 3, 0, 0 );
22  fgSizerPrms->AddGrowableCol( 1 );
23  fgSizerPrms->AddGrowableRow( 0 );
24  fgSizerPrms->SetFlexibleDirection( wxHORIZONTAL );
25  fgSizerPrms->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
26 
27  m_staticTextName = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
28  m_staticTextName->Wrap( -1 );
29  fgSizerPrms->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
30 
31  m_textCtrlName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
32  fgSizerPrms->Add( m_textCtrlName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
33 
34 
35  fgSizerPrms->Add( 0, 0, 1, wxEXPAND, 5 );
36 
37  m_staticTextVref = new wxStaticText( this, wxID_ANY, _("Vref:"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_staticTextVref->Wrap( -1 );
39  fgSizerPrms->Add( m_staticTextVref, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
40 
41  m_textCtrlVref = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
42  fgSizerPrms->Add( m_textCtrlVref, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
43 
44  m_staticTextVrefUnit = new wxStaticText( this, wxID_ANY, _("Volt"), wxDefaultPosition, wxDefaultSize, 0 );
45  m_staticTextVrefUnit->Wrap( -1 );
46  fgSizerPrms->Add( m_staticTextVrefUnit, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
47 
48  m_staticTextType = new wxStaticText( this, wxID_ANY, _("Type:"), wxDefaultPosition, wxDefaultSize, 0 );
49  m_staticTextType->Wrap( -1 );
50  fgSizerPrms->Add( m_staticTextType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
51 
52  wxString m_choiceRegTypeChoices[] = { _("Separate sense pin"), _("3 terminals regulator") };
53  int m_choiceRegTypeNChoices = sizeof( m_choiceRegTypeChoices ) / sizeof( wxString );
54  m_choiceRegType = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceRegTypeNChoices, m_choiceRegTypeChoices, 0 );
55  m_choiceRegType->SetSelection( 0 );
56  fgSizerPrms->Add( m_choiceRegType, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
57 
58 
59  fgSizerPrms->Add( 0, 0, 1, wxEXPAND, 5 );
60 
61  m_RegulIadjTitle = new wxStaticText( this, wxID_ANY, _("Iadj:"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_RegulIadjTitle->Wrap( -1 );
63  fgSizerPrms->Add( m_RegulIadjTitle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
64 
65  m_RegulIadjValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66  fgSizerPrms->Add( m_RegulIadjValue, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
67 
68  m_IadjUnitLabel = new wxStaticText( this, wxID_ANY, _("uA"), wxDefaultPosition, wxDefaultSize, 0 );
69  m_IadjUnitLabel->Wrap( -1 );
70  fgSizerPrms->Add( m_IadjUnitLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
71 
72 
73  bSizerMain->Add( fgSizerPrms, 0, wxEXPAND, 5 );
74 
75 
76  bSizerMain->Add( 0, 0, 1, wxEXPAND, 5 );
77 
78  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
79  bSizerMain->Add( m_staticline, 0, wxEXPAND, 5 );
80 
81  m_sdbSizer = new wxStdDialogButtonSizer();
82  m_sdbSizerOK = new wxButton( this, wxID_OK );
83  m_sdbSizer->AddButton( m_sdbSizerOK );
84  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
85  m_sdbSizer->AddButton( m_sdbSizerCancel );
86  m_sdbSizer->Realize();
87 
88  bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
89 
90 
91  this->SetSizer( bSizerMain );
92  this->Layout();
93  bSizerMain->Fit( this );
94 
95  this->Centre( wxBOTH );
96 
97  // Connect Events
98  m_choiceRegType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_REGULATOR_FORM_BASE::OnRegTypeSelection ), NULL, this );
99  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_REGULATOR_FORM_BASE::OnOKClick ), NULL, this );
100 }
101 
103 {
104  // Disconnect Events
105  m_choiceRegType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_REGULATOR_FORM_BASE::OnRegTypeSelection ), NULL, this );
106  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_REGULATOR_FORM_BASE::OnOKClick ), NULL, this );
107 
108 }
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnRegTypeSelection(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define NULL
DIALOG_REGULATOR_FORM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Regulator Parameters"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOKClick(wxCommandEvent &event)
#define _(s)
Definition: 3d_actions.cpp:33