KiCad PCB EDA Suite
dialog_imported_layers_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_IMPORTED_LAYERS_BASE::DIALOG_IMPORTED_LAYERS_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  bSizerMain = new wxBoxSizer( wxVERTICAL );
17 
18  wxBoxSizer* bSizerTop;
19  bSizerTop = new wxBoxSizer( wxHORIZONTAL );
20 
21  wxStaticBoxSizer* sbSizer1;
22  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Unmatched Layers") ), wxHORIZONTAL );
23 
24  wxFlexGridSizer* fgSizer1;
25  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
26  fgSizer1->AddGrowableCol( 0 );
27  fgSizer1->AddGrowableCol( 1 );
28  fgSizer1->AddGrowableRow( 1 );
29  fgSizer1->SetFlexibleDirection( wxVERTICAL );
30  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 
32  m_lblImportedLayers = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Imported Layers"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_lblImportedLayers->Wrap( -1 );
34  fgSizer1->Add( m_lblImportedLayers, 0, wxALL, 5 );
35 
36  m_lblKicadLayers = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("KiCad Layers"), wxDefaultPosition, wxDefaultSize, 0 );
37  m_lblKicadLayers->Wrap( -1 );
38  fgSizer1->Add( m_lblKicadLayers, 0, wxALL, 5 );
39 
40  m_unmatched_layers_list = new wxListCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_NO_HEADER|wxLC_REPORT );
41  m_unmatched_layers_list->SetMinSize( wxSize( 120,-1 ) );
42 
43  fgSizer1->Add( m_unmatched_layers_list, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
44 
45  m_kicad_layers_list = new wxListCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_NO_HEADER|wxLC_REPORT|wxLC_SINGLE_SEL );
46  m_kicad_layers_list->SetMinSize( wxSize( 120,-1 ) );
47 
48  fgSizer1->Add( m_kicad_layers_list, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
49 
50 
51  sbSizer1->Add( fgSizer1, 1, wxEXPAND, 5 );
52 
53 
54  bSizerTop->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
55 
56  wxBoxSizer* bSizer6;
57  bSizer6 = new wxBoxSizer( wxVERTICAL );
58 
59  m_button_add = new wxButton( this, wxID_ANY, _(">"), wxDefaultPosition, wxSize( 36,100 ), 0 );
60  m_button_add->SetFont( wxFont( 9, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
61  m_button_add->SetToolTip( _("Add selected layers to matched layers list.") );
62 
63  bSizer6->Add( m_button_add, 0, wxALL, 5 );
64 
65  m_button_remove = new wxButton( this, wxID_ANY, _("<"), wxDefaultPosition, wxSize( 36,100 ), 0 );
66  m_button_remove->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
67  m_button_remove->SetToolTip( _("Remove selected layers from matched layers list.") );
68 
69  bSizer6->Add( m_button_remove, 0, wxALL, 5 );
70 
71  m_button_removeall = new wxButton( this, wxID_ANY, _("<<"), wxDefaultPosition, wxSize( 36,50 ), 0 );
72  m_button_removeall->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
73  m_button_removeall->SetToolTip( _("Remove all matched layers.") );
74 
75  bSizer6->Add( m_button_removeall, 0, wxALL, 5 );
76 
77 
78  bSizerTop->Add( bSizer6, 0, wxEXPAND|wxTOP, 10 );
79 
80  wxStaticBoxSizer* sbSizer3;
81  sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Matched Layers") ), wxHORIZONTAL );
82 
83  m_matched_layers_list = new wxListCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT );
84  m_matched_layers_list->SetMinSize( wxSize( 120,-1 ) );
85 
86  sbSizer3->Add( m_matched_layers_list, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
87 
88 
89  bSizerTop->Add( sbSizer3, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
90 
91 
92  bSizerMain->Add( bSizerTop, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
93 
94  wxBoxSizer* bSizerBottom;
95  bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
96 
97  m_button_automatch = new wxButton( this, wxID_ANY, _("Auto-Match Layers"), wxDefaultPosition, wxDefaultSize, 0 );
98  m_button_automatch->SetToolTip( _("Automatically match any unmatched layers to their KiCad equivalent.") );
99 
100  bSizerBottom->Add( m_button_automatch, 0, wxALL, 5 );
101 
102  m_sdbSizer = new wxStdDialogButtonSizer();
103  m_sdbSizerOK = new wxButton( this, wxID_OK );
104  m_sdbSizer->AddButton( m_sdbSizerOK );
105  m_sdbSizer->Realize();
106 
107  bSizerBottom->Add( m_sdbSizer, 1, wxEXPAND, 5 );
108 
109 
110  bSizerMain->Add( bSizerBottom, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
111 
112 
113  this->SetSizer( bSizerMain );
114  this->Layout();
115  bSizerMain->Fit( this );
116 
117  // Connect Events
118  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnClose ) );
119  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUpdateUI ) );
120  m_unmatched_layers_list->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUnMatchedDoubleClick ), NULL, this );
121  m_kicad_layers_list->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUnMatchedDoubleClick ), NULL, this );
122  m_button_add->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnAddClicked ), NULL, this );
123  m_button_remove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnRemoveClicked ), NULL, this );
124  m_button_removeall->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnRemoveAllClicked ), NULL, this );
125  m_matched_layers_list->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnMatchedDoubleClick ), NULL, this );
126  m_button_automatch->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnAutoMatchLayersClicked ), NULL, this );
127 }
128 
130 {
131  // Disconnect Events
132  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnClose ) );
133  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUpdateUI ) );
134  m_unmatched_layers_list->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUnMatchedDoubleClick ), NULL, this );
135  m_kicad_layers_list->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnUnMatchedDoubleClick ), NULL, this );
136  m_button_add->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnAddClicked ), NULL, this );
137  m_button_remove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnRemoveClicked ), NULL, this );
138  m_button_removeall->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnRemoveAllClicked ), NULL, this );
139  m_matched_layers_list->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnMatchedDoubleClick ), NULL, this );
140  m_button_automatch->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORTED_LAYERS_BASE::OnAutoMatchLayersClicked ), NULL, this );
141 
142 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnMatchedDoubleClick(wxListEvent &event)
virtual void OnAddClicked(wxCommandEvent &event)
#define NULL
virtual void OnRemoveAllClicked(wxCommandEvent &event)
virtual void OnClose(wxCloseEvent &event)
virtual void OnAutoMatchLayersClicked(wxCommandEvent &event)
#define _(s)
Definition: 3d_actions.cpp:33
DIALOG_IMPORTED_LAYERS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Mapping of Imported Layers"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnUnMatchedDoubleClick(wxListEvent &event)
virtual void OnRemoveClicked(wxCommandEvent &event)