KiCad PCB EDA Suite
dialog_update_fields_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_UPDATE_FIELDS_BASE::DIALOG_UPDATE_FIELDS_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( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* m_mainSizer;
17  m_mainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bUpperSizer;
20  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxStaticBoxSizer* sbSizer2;
23  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields to Update:") ), wxVERTICAL );
24 
25  wxArrayString m_fieldsBoxChoices;
26  m_fieldsBox = new wxCheckListBox( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fieldsBoxChoices, wxLB_NEEDED_SB );
27  m_fieldsBox->SetMinSize( wxSize( -1,150 ) );
28 
29  sbSizer2->Add( m_fieldsBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
30 
31  wxBoxSizer* m_selBtnSizer;
32  m_selBtnSizer = new wxBoxSizer( wxHORIZONTAL );
33 
34  m_selAllBtn = new wxButton( sbSizer2->GetStaticBox(), wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_selBtnSizer->Add( m_selAllBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
36 
37  m_selNoneBtn = new wxButton( sbSizer2->GetStaticBox(), wxID_ANY, _("Select None"), wxDefaultPosition, wxDefaultSize, 0 );
38  m_selBtnSizer->Add( m_selNoneBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
39 
40 
41  sbSizer2->Add( m_selBtnSizer, 0, wxEXPAND, 5 );
42 
43 
44  bUpperSizer->Add( sbSizer2, 1, wxEXPAND|wxTOP|wxLEFT, 10 );
45 
46  wxStaticBoxSizer* sbSizer1;
47  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL );
48 
49  m_removeExtraBox = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Remove fields not in library"), wxDefaultPosition, wxDefaultSize, 0 );
50  m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") );
51 
52  sbSizer1->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
53 
54  m_resetEmpty = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Reset fields which are empty in library"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_resetEmpty->SetToolTip( _("Do not clear existing entries if library field is empty") );
56 
57  sbSizer1->Add( m_resetEmpty, 0, wxALL, 5 );
58 
59 
60  sbSizer1->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
61 
62  m_resetVisibility = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Reset field visibilities"), wxDefaultPosition, wxDefaultSize, 0 );
63  sbSizer1->Add( m_resetVisibility, 0, wxALL, 5 );
64 
65  m_resetSizeAndStyle = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Reset field text sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 );
66  sbSizer1->Add( m_resetSizeAndStyle, 0, wxALL, 5 );
67 
68  m_resetPosition = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Reset field positions"), wxDefaultPosition, wxDefaultSize, 0 );
69  sbSizer1->Add( m_resetPosition, 0, wxALL, 5 );
70 
71 
72  bUpperSizer->Add( sbSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
73 
74 
75  m_mainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
76 
77  m_sdbSizer = new wxStdDialogButtonSizer();
78  m_sdbSizerOK = new wxButton( this, wxID_OK );
79  m_sdbSizer->AddButton( m_sdbSizerOK );
80  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
81  m_sdbSizer->AddButton( m_sdbSizerCancel );
82  m_sdbSizer->Realize();
83 
84  m_mainSizer->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
85 
86 
87  this->SetSizer( m_mainSizer );
88  this->Layout();
89  m_mainSizer->Fit( this );
90 
91  this->Centre( wxBOTH );
92 
93  // Connect Events
94  m_selAllBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FIELDS_BASE::onSelectAll ), NULL, this );
95  m_selNoneBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FIELDS_BASE::onSelectNone ), NULL, this );
96 }
97 
99 {
100  // Disconnect Events
101  m_selAllBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FIELDS_BASE::onSelectAll ), NULL, this );
102  m_selNoneBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FIELDS_BASE::onSelectNone ), NULL, this );
103 
104 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
DIALOG_UPDATE_FIELDS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Update Symbol Fields"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onSelectAll(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void onSelectNone(wxCommandEvent &event)