2014-07-23 10:28:48 +00:00
///////////////////////////////////////////////////////////////////////////
2014-12-11 12:00:59 +00:00
// C++ code generated with wxFormBuilder (version Jun 5 2014)
2014-07-23 10:28:48 +00:00
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
# 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 ) ;
2015-07-11 23:11:34 +00:00
m_staticText = 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 ) ;
2014-07-23 10:28:48 +00:00
m_staticText - > Wrap ( - 1 ) ;
m_staticText - > SetFont ( wxFont ( wxNORMAL_FONT - > GetPointSize ( ) , 70 , 90 , 92 , false , wxEmptyString ) ) ;
bSizerMain - > Add ( m_staticText , 0 , wxALL | wxALIGN_CENTER_HORIZONTAL , 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 ) ;
bSizerMain - > Add ( m_dirCtrl , 0 , wxALL | wxEXPAND , 5 ) ;
2014-07-23 10:28:48 +00:00
2014-12-11 12:00:59 +00:00
m_SizerNewLibName = new wxBoxSizer ( wxVERTICAL ) ;
2015-07-11 23:11:34 +00:00
m_staticTextDirname = new wxStaticText ( this , wxID_ANY , _ ( " Library Path (.pretty will be appended to folder) " ) , 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 ) ;
2014-12-11 12:00:59 +00:00
m_SizerNewLibName - > Add ( m_libName , 0 , wxALL | wxEXPAND , 5 ) ;
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 ) ;
bSizerMain - > Add ( m_staticline1 , 0 , wxEXPAND | wxALL , 5 ) ;
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 ( ) ;
2015-07-11 23:11:34 +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 ) ;
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 ) ;
2014-07-23 10:28:48 +00:00
}