KiCad PCB EDA Suite
dialog_cleanup_graphics_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_CLEANUP_GRAPHICS_BASE::DIALOG_CLEANUP_GRAPHICS_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* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerUpper;
20  bSizerUpper = new wxBoxSizer( wxVERTICAL );
21 
22  m_createRectanglesOpt = new wxCheckBox( this, wxID_ANY, _("Merge lines into rectangles"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_createRectanglesOpt->SetToolTip( _("remove track segments connecting nodes belonging to different nets (short circuit)") );
24 
25  bSizerUpper->Add( m_createRectanglesOpt, 0, wxALL, 5 );
26 
27  m_deleteRedundantOpt = new wxCheckBox( this, wxID_ANY, _("Delete redundant graphics"), wxDefaultPosition, wxDefaultSize, 0 );
28  bSizerUpper->Add( m_deleteRedundantOpt, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
29 
30 
31  bSizerMain->Add( bSizerUpper, 0, wxEXPAND|wxALL, 5 );
32 
33  wxBoxSizer* bLowerSizer;
34  bLowerSizer = new wxBoxSizer( wxVERTICAL );
35 
36  bLowerSizer->SetMinSize( wxSize( 660,250 ) );
37  staticChangesLabel = new wxStaticText( this, wxID_ANY, _("Changes To Be Applied:"), wxDefaultPosition, wxDefaultSize, 0 );
38  staticChangesLabel->Wrap( -1 );
39  bLowerSizer->Add( staticChangesLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
40 
41  m_changesDataView = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
42  bLowerSizer->Add( m_changesDataView, 1, wxALL|wxEXPAND, 5 );
43 
44 
45  bSizerMain->Add( bLowerSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
46 
47  m_sdbSizer = new wxStdDialogButtonSizer();
48  m_sdbSizerOK = new wxButton( this, wxID_OK );
49  m_sdbSizer->AddButton( m_sdbSizerOK );
50  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
51  m_sdbSizer->AddButton( m_sdbSizerCancel );
52  m_sdbSizer->Realize();
53 
54  bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
55 
56 
57  this->SetSizer( bSizerMain );
58  this->Layout();
59  bSizerMain->Fit( this );
60 
61  this->Centre( wxBOTH );
62 
63  // Connect Events
64  m_createRectanglesOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnCheckBox ), NULL, this );
65  m_changesDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnSelectItem ), NULL, this );
66  m_changesDataView->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnLeftDClickItem ), NULL, this );
67 }
68 
70 {
71  // Disconnect Events
72  m_createRectanglesOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnCheckBox ), NULL, this );
73  m_changesDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnSelectItem ), NULL, this );
74  m_changesDataView->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( DIALOG_CLEANUP_GRAPHICS_BASE::OnLeftDClickItem ), NULL, this );
75 
76 }
virtual void OnLeftDClickItem(wxMouseEvent &event)
virtual void OnSelectItem(wxDataViewEvent &event)
DIALOG_CLEANUP_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Cleanup Graphics"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void OnCheckBox(wxCommandEvent &event)
#define NULL
#define _(s)
Definition: 3d_actions.cpp:33