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
{
this - > SetSizeHints ( wxSize ( 400 , 300 ) , wxDefaultSize ) ;
wxBoxSizer * bSizerMain ;
bSizerMain = new wxBoxSizer ( wxVERTICAL ) ;
m_staticText = new wxStaticText ( this , wxID_ANY , _ ( " The footprint library is a folder with a name ending by .pretty \n Footprints are .kicad_mod files inside this folder. " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
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 ) ;
m_dirCtrl = new wxGenericDirCtrl ( this , wxID_ANY , wxEmptyString , wxDefaultPosition , wxDefaultSize , wxDIRCTRL_3D_INTERNAL | wxDIRCTRL_DIR_ONLY | wxSUNKEN_BORDER , wxEmptyString , 0 ) ;
m_dirCtrl - > ShowHidden ( false ) ;
bSizerMain - > Add ( m_dirCtrl , 1 , wxEXPAND | wxALL , 5 ) ;
2014-12-11 12:00:59 +00:00
m_SizerNewLibName = new wxBoxSizer ( wxVERTICAL ) ;
2014-07-23 10:28:48 +00:00
m_staticTextDirname = new wxStaticText ( this , wxID_ANY , _ ( " Library (.pretty folder) " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
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 ( ) ;
bSizerMain - > Add ( m_sdbSizer , 0 , wxALIGN_RIGHT , 5 ) ;
this - > SetSizer ( bSizerMain ) ;
this - > Layout ( ) ;
this - > Centre ( wxBOTH ) ;
// Connect Events
m_dirCtrl - > Connect ( wxEVT_COMMAND_TREE_ITEM_ACTIVATED , wxTreeEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
m_dirCtrl - > Connect ( wxEVT_COMMAND_TREE_SEL_CHANGED , wxTreeEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
}
DIALOG_SELECT_PRETTY_LIB_BASE : : ~ DIALOG_SELECT_PRETTY_LIB_BASE ( )
{
// Disconnect Events
m_dirCtrl - > Disconnect ( wxEVT_COMMAND_TREE_ITEM_ACTIVATED , wxTreeEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
m_dirCtrl - > Disconnect ( wxEVT_COMMAND_TREE_SEL_CHANGED , wxTreeEventHandler ( DIALOG_SELECT_PRETTY_LIB_BASE : : OnSelectFolder ) , NULL , this ) ;
}