KiCad PCB EDA Suite
dialog_update_symbol_fields_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_UPDATE_SYMBOL_FIELDS_BASE::DIALOG_UPDATE_SYMBOL_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  m_mainSizer = new wxBoxSizer( wxVERTICAL );
17 
18  m_newIdSizer = new wxBoxSizer( wxHORIZONTAL );
19 
20  wxStaticText* m_parentSymbolLabel;
21  m_parentSymbolLabel = new wxStaticText( this, wxID_ANY, _("Parent symbol:"), wxDefaultPosition, wxDefaultSize, 0 );
22  m_parentSymbolLabel->Wrap( -1 );
23  m_newIdSizer->Add( m_parentSymbolLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
24 
25  m_parentSymbolReadOnly = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
26  m_parentSymbolReadOnly->Enable( false );
27 
28  m_newIdSizer->Add( m_parentSymbolReadOnly, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
29 
30 
31  m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
32 
33  wxBoxSizer* bSizerUpdate;
34  bSizerUpdate = new wxBoxSizer( wxHORIZONTAL );
35 
36  m_updateFieldsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update/reset Fields") ), wxVERTICAL );
37 
38  wxArrayString m_fieldsBoxChoices;
39  m_fieldsBox = new wxCheckListBox( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fieldsBoxChoices, wxLB_NEEDED_SB );
40  m_fieldsBox->SetMinSize( wxSize( -1,120 ) );
41 
42  m_updateFieldsSizer->Add( m_fieldsBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
43 
44  wxBoxSizer* m_selBtnSizer;
45  m_selBtnSizer = new wxBoxSizer( wxHORIZONTAL );
46 
47  m_selAllBtn = new wxButton( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, _("Select All"), wxDefaultPosition, wxDefaultSize, 0 );
48  m_selBtnSizer->Add( m_selAllBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
49 
50  m_selNoneBtn = new wxButton( m_updateFieldsSizer->GetStaticBox(), wxID_ANY, _("Select None"), wxDefaultPosition, wxDefaultSize, 0 );
51  m_selBtnSizer->Add( m_selNoneBtn, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
52 
53 
54  m_updateFieldsSizer->Add( m_selBtnSizer, 0, wxEXPAND, 5 );
55 
56 
57  bSizerUpdate->Add( m_updateFieldsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
58 
59  m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL );
60 
61  m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields if not in parent symbol"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") );
63 
64  m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 4 );
65 
66  m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields if empty in parent symbol"), wxDefaultPosition, wxDefaultSize, 0 );
67  m_updateOptionsSizer->Add( m_resetEmptyFields, 0, wxBOTTOM|wxRIGHT, 4 );
68 
69 
70  m_updateOptionsSizer->Add( 0, 15, 0, wxEXPAND, 5 );
71 
72  m_resetFieldText = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field text"), wxDefaultPosition, wxDefaultSize, 0 );
73  m_updateOptionsSizer->Add( m_resetFieldText, 0, wxBOTTOM|wxRIGHT, 4 );
74 
75  m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field visibilities"), wxDefaultPosition, wxDefaultSize, 0 );
76  m_updateOptionsSizer->Add( m_resetFieldVisibilities, 0, wxBOTTOM|wxRIGHT, 4 );
77 
78  m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 );
79  m_updateOptionsSizer->Add( m_resetFieldEffects, 0, wxBOTTOM|wxRIGHT, 4 );
80 
81  m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset field positions"), wxDefaultPosition, wxDefaultSize, 0 );
82  m_updateOptionsSizer->Add( m_resetFieldPositions, 0, wxBOTTOM|wxRIGHT, 4 );
83 
84 
85  bSizerUpdate->Add( m_updateOptionsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
86 
87 
88  m_mainSizer->Add( bSizerUpdate, 0, wxEXPAND, 5 );
89 
90  m_sdbSizer = new wxStdDialogButtonSizer();
91  m_sdbSizerOK = new wxButton( this, wxID_OK );
92  m_sdbSizer->AddButton( m_sdbSizerOK );
93  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
94  m_sdbSizer->AddButton( m_sdbSizerCancel );
95  m_sdbSizer->Realize();
96 
97  m_mainSizer->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
98 
99 
100  this->SetSizer( m_mainSizer );
101  this->Layout();
102  m_mainSizer->Fit( this );
103 
104  this->Centre( wxBOTH );
105 
106  // Connect Events
107  m_selAllBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onSelectAll ), NULL, this );
108  m_selNoneBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onSelectNone ), NULL, this );
109  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onOkButtonClicked ), NULL, this );
110 }
111 
113 {
114  // Disconnect Events
115  m_selAllBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onSelectAll ), NULL, this );
116  m_selNoneBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onSelectNone ), NULL, this );
117  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_SYMBOL_FIELDS_BASE::onOkButtonClicked ), NULL, this );
118 
119 }
virtual void onSelectAll(wxCommandEvent &event)
virtual void onOkButtonClicked(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void onSelectNone(wxCommandEvent &event)
#define NULL
#define _(s)
DIALOG_UPDATE_SYMBOL_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)