KiCad PCB EDA Suite
dialog_select_pretty_lib_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version May 2 2016)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_SELECT_PRETTY_LIB_BASE::DIALOG_SELECT_PRETTY_LIB_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  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  m_messageInfo = new wxStaticText( this, wxID_ANY, _("The footprint library is a folder with a name ending with .pretty\nFootprints are .kicad_mod files inside this folder."), wxDefaultPosition, wxDefaultSize, 0 );
20  m_messageInfo->Wrap( -1 );
21  m_messageInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
22 
23  bSizerMain->Add( m_messageInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
24 
25  m_staticText3 = new wxStaticText( this, wxID_ANY, _("Path base:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticText3->Wrap( -1 );
27  bSizerMain->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
28 
29  m_dirCtrl = new wxDirPickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE );
30  bSizerMain->Add( m_dirCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
31 
32  m_SizerNewLibName = new wxBoxSizer( wxVERTICAL );
33 
34  m_staticTextDirname = new wxStaticText( this, wxID_ANY, _("Library folder (.pretty will be added to name, if missing)"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticTextDirname->Wrap( -1 );
36  m_SizerNewLibName->Add( m_staticTextDirname, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
37 
38  m_libName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
39  m_SizerNewLibName->Add( m_libName, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
40 
41 
42  bSizerMain->Add( m_SizerNewLibName, 0, wxEXPAND, 5 );
43 
44  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
45  bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 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, wxALL|wxEXPAND, 5 );
55 
56 
57  this->SetSizer( bSizerMain );
58  this->Layout();
59 
60  this->Centre( wxBOTH );
61 
62  // Connect Events
63  m_dirCtrl->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this );
64  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnOKButton ), NULL, this );
65 }
66 
68 {
69  // Disconnect Events
70  m_dirCtrl->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnSelectFolder ), NULL, this );
71  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_PRETTY_LIB_BASE::OnOKButton ), NULL, this );
72 
73 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void OnOKButton(wxCommandEvent &event)
DIALOG_SELECT_PRETTY_LIB_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Select Footprint Library Folder"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(401, 206), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnSelectFolder(wxFileDirPickerEvent &event)