KiCad PCB EDA Suite
dialog_update_pcb_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 
8 #include "wx_html_report_panel.h"
9 
10 #include "dialog_update_pcb_base.h"
11 
13 
14 DIALOG_UPDATE_PCB_BASE::DIALOG_UPDATE_PCB_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( wxSize( -1,-1 ), wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxFlexGridSizer* fgSizer2;
22  fgSizer2 = new wxFlexGridSizer( 0, 3, 0, 0 );
23  fgSizer2->SetFlexibleDirection( wxBOTH );
24  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
25 
26  m_staticText1 = new wxStaticText( this, wxID_ANY, _("Match footprints by:"), wxDefaultPosition, wxDefaultSize, 0 );
27  m_staticText1->Wrap( -1 );
28  fgSizer2->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
29 
30  m_matchByReference = new wxRadioButton( this, wxID_ANY, _("Reference"), wxDefaultPosition, wxDefaultSize, 0 );
31  fgSizer2->Add( m_matchByReference, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
32 
33  m_matchByTimestamp = new wxRadioButton( this, wxID_ANY, _("Timestamp"), wxDefaultPosition, wxDefaultSize, 0 );
34  fgSizer2->Add( m_matchByTimestamp, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
35 
36 
37  bMainSizer->Add( fgSizer2, 0, wxEXPAND|wxALL, 5 );
38 
39  wxBoxSizer* bLowerSizer;
40  bLowerSizer = new wxBoxSizer( wxVERTICAL );
41 
42  bLowerSizer->SetMinSize( wxSize( 500,300 ) );
43  m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
44  bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
45 
46 
47  bMainSizer->Add( bLowerSizer, 1, wxALL|wxEXPAND, 5 );
48 
49  wxFlexGridSizer* fgSizer1;
50  fgSizer1 = new wxFlexGridSizer( 1, 5, 0, 0 );
51  fgSizer1->AddGrowableCol( 0 );
52  fgSizer1->SetFlexibleDirection( wxBOTH );
53  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
54 
55  m_btnCancel = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
56  fgSizer1->Add( m_btnCancel, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
57 
58  m_btnPerformUpdate = new wxButton( this, wxID_ANY, _("Update PCB"), wxDefaultPosition, wxDefaultSize, 0 );
59  m_btnPerformUpdate->SetMinSize( wxSize( 140,-1 ) );
60 
61  fgSizer1->Add( m_btnPerformUpdate, 0, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5 );
62 
63 
64  bMainSizer->Add( fgSizer1, 0, wxALL|wxEXPAND, 5 );
65 
66 
67  this->SetSizer( bMainSizer );
68  this->Layout();
69  bMainSizer->Fit( this );
70 
71  // Connect Events
72  m_matchByReference->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
73  m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
74  m_btnPerformUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
75 }
76 
78 {
79  // Disconnect Events
80  m_matchByReference->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
81  m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChange ), NULL, this );
82  m_btnPerformUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
83 
84 }
wxRadioButton * m_matchByReference
wxRadioButton * m_matchByTimestamp
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:70
WX_HTML_REPORT_PANEL * m_messagePanel
DIALOG_UPDATE_PCB_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Update PCB from Schematic"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnMatchChange(wxCommandEvent &event)
virtual void OnUpdateClick(wxCommandEvent &event)
Class WX_HTML_REPORT_PANEL.