2014-07-23 10:28:48 +00:00
///////////////////////////////////////////////////////////////////////////
2018-04-23 17:56:47 +00:00
// C++ code generated with wxFormBuilder (version Apr 19 2018)
2014-07-23 10:28:48 +00:00
// http://www.wxformbuilder.org/
//
2017-12-27 17:09:27 +00:00
// PLEASE DO *NOT* EDIT THIS FILE!
2014-07-23 10:28:48 +00:00
///////////////////////////////////////////////////////////////////////////
# include "dialog_select_pretty_lib_base.h"
///////////////////////////////////////////////////////////////////////////
Modular KiCad Blueprint Milestone B), major portions:
*) When kicad.exe closes a project, close any open KIFACEs so that they cannot
get disassociated from their true PROJECT.
*) Allow loading eeschema library editor from kicad.exe
*) Allow loading pcbnew library editor from kicad.exe
*) Rename LIB_COMPONENT to LIB_PART.
*) Add class PART_LIBS, and PART_LIB.
*) Make PART_LIBS non-global, i.e. PROJECT specific.
*) Implement "data on demand" for PART_LIBS
*) Implement "data on demand" for schematic SEARCH_STACK.
*) Use RSTRINGs to retain eeschema editor's notion of last library and part being edited.
*) Get rid of library search on every SCH_COMPONENT::Draw() call, instead use
a weak pointer.
*) Remove all chdir() calls so projects don't need to be CWD.
*) Romove APPEND support from OpenProjectFiles().
*) Make OpenProjectFiles() robust, even for creating new projects.
*) Load EESCHEMA colors in the KIWAY::OnKiwayStart() rather in window open,
and save them in the .eeschema config file, not in the project file.
*) Fix bug with wxDir() while accessing protected dirs in kicad.exe
*) Consolidate template copying into PROJECT class, not in kicad.exe source.
*) Generally untangle eeschema, making its libraries not global but rather
held in the PROJECT.
2014-08-13 20:28:54 +00:00
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 )
2014-07-23 10:28:48 +00:00
{
2015-07-11 23:11:34 +00:00
this - > SetSizeHints ( wxSize ( - 1 , - 1 ) , wxDefaultSize ) ;
2014-07-23 10:28:48 +00:00
wxBoxSizer * bSizerMain ;
bSizerMain = new wxBoxSizer ( wxVERTICAL ) ;
2016-05-02 10:49:14 +00:00
m_messageInfo = new wxStaticText ( this , wxID_ANY , _ ( " The footprint library is a folder with a name ending with .pretty \n Footprints are .kicad_mod files inside this folder. " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_messageInfo - > Wrap ( - 1 ) ;
m_messageInfo - > SetFont ( wxFont ( wxNORMAL_FONT - > GetPointSize ( ) , wxFONTFAMILY_DEFAULT , wxFONTSTYLE_NORMAL , wxFONTWEIGHT_BOLD , false , wxEmptyString ) ) ;
2014-07-23 10:28:48 +00:00
2016-05-02 10:49:14 +00:00
bSizerMain - > Add ( m_messageInfo , 0 , wxALL | wxALIGN_CENTER_HORIZONTAL , 5 ) ;
2014-07-23 10:28:48 +00:00
2015-09-26 06:46:25 +00:00
m_staticText3 = new wxStaticText ( this , wxID_ANY , _ ( " Path base: " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_staticText3 - > Wrap ( - 1 ) ;
bSizerMain - > Add ( m_staticText3 , 0 , wxTOP | wxRIGHT | wxLEFT , 5 ) ;
2015-07-11 23:11:34 +00:00
m_dirCtrl = new wxDirPickerCtrl ( this , wxID_ANY , wxEmptyString , _ ( " Select a folder " ) , wxDefaultPosition , wxDefaultSize , wxDIRP_DEFAULT_STYLE ) ;
2015-09-26 06:46:25 +00:00
bSizerMain - > Add ( m_dirCtrl , 0 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2014-07-23 10:28:48 +00:00
2014-12-11 12:00:59 +00:00
m_SizerNewLibName = new wxBoxSizer ( wxVERTICAL ) ;
2018-04-23 17:56:47 +00:00
m_staticTextDirname = new wxStaticText ( this , wxID_ANY , _ ( " Library folder (.pretty will be added to name, if missing): " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
2014-07-23 10:28:48 +00:00
m_staticTextDirname - > Wrap ( - 1 ) ;
2014-12-11 12:00:59 +00:00
m_SizerNewLibName - > Add ( m_staticTextDirname , 0 , wxTOP | wxRIGHT | wxLEFT , 5 ) ;
2014-07-23 10:28:48 +00:00
m_libName = new wxTextCtrl ( this , wxID_ANY , wxEmptyString , wxDefaultPosition , wxDefaultSize , 0 ) ;
2015-09-26 06:46:25 +00:00
m_SizerNewLibName - > Add ( m_libName , 0 , wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT , 5 ) ;
2014-12-11 12:00:59 +00:00
bSizerMain - > Add ( m_SizerNewLibName , 0 , wxEXPAND , 5 ) ;
2014-07-23 10:28:48 +00:00
m_staticline1 = new wxStaticLine ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxLI_HORIZONTAL ) ;
2017-12-27 17:09:27 +00:00
bSizerMain - > Add ( m_staticline1 , 0 , wxEXPAND , 5 ) ;
2014-07-23 10:28:48 +00:00
m_sdbSizer = new wxStdDialogButtonSizer ( ) ;
m_sdbSizerOK = new wxButton ( this , wxID_OK ) ;
m_sdbSizer - > AddButton ( m_sdbSizerOK ) ;
m_sdbSizerCancel = new wxButton ( this , wxID_CANCEL ) ;
m_sdbSizer - > AddButton ( m_sdbSizerCancel ) ;
m_sdbSizer - > Realize ( ) ;
2015-07-11 23:11:34 +00:00
bSizerMain - > Add ( m_sdbSizer , 0 , wxALL | wxEXPAND , 5 ) ;
2014-07-23 10:28:48 +00:00
this - > SetSizer ( bSizerMain ) ;
this - > Layout ( ) ;
2017-12-27 17:09:27 +00:00
bSizerMain - > Fit ( this ) ;
2014-07-23 10:28:48 +00:00
this - > Centre ( wxBOTH ) ;
// Connect Events
2015-07-11 23:11:34 +00:00
m_dirCtrl - > Connect ( wxEVT_COMMAND_DIRPICKER_CHANGED , wxFileDirPickerEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
2015-09-26 06:46:25 +00:00
m_sdbSizerOK - > Connect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnOKButton ) , NULL , this ) ;
2014-07-23 10:28:48 +00:00
}
DIALOG_SELECT_PRETTY_LIB_BASE : : ~ DIALOG_SELECT_PRETTY_LIB_BASE ( )
{
// Disconnect Events
2015-07-11 23:11:34 +00:00
m_dirCtrl - > Disconnect ( wxEVT_COMMAND_DIRPICKER_CHANGED , wxFileDirPickerEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
2015-09-26 06:46:25 +00:00
m_sdbSizerOK - > Disconnect ( wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnOKButton ) , NULL , this ) ;
2014-07-23 10:28:48 +00:00
}