kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #16054
footprint library table wizard: need testers
Hello,
I wrote a wizard to manage the footprint library table.
It is intended to help users to easily add footprint libraries to the
library table.
Attached a patch (zip file) to test this wizard.
It is not finalized, and the library table dialog and the wizard still
needs some refinements, but it works.
It is accessible via the "preferences:library tables" menu
It allows:
the selection of plugin (library type)
the selection of type of default path (project/env var/absolute path)
the selection of a list of libraries (and add them to the current
library table)
It should work with any plugin type, including github type.
When using github option, the wxWidget webview kit is used.
To select .pretty libraries and add them, you have to use the context
menu and the "copy link" command (with the mouse cursor on a .pretty
link) to add this lib to the fp lib table.
Note the context menu is not handled by wXWidgets but by the OS, so
"copy link" could have different label depending on the OS and the locale.
The wizard is not fully finished and the "Add Environment Variable"
button can be used, but the newly created variable is not (yet) stored.
I need:
- a feedback about this wizard (usability, bugs ...).
- a test on OSX and Linux (I tested it only on Kubuntu 10.04) to know
issues.
To build Kicad after patching, the wxWidgets webkit/webview library is
needed.
To know if it is available, try to build the wxWidgets webview sample.
On windows, I am thinking there is no problem.
On Linux, if the webkit/webview library, you have to install the
libwebkitgtk-dev tool (sudo apt-get install libwebkitgtk-dev) and
rebuild wxWidgets after running configure --with-opengl.
On OSX I don't know the status, but webkit/webview library is buildable.
Thanks.
--
Jean-Pierre CHARRAS
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-11-28 17:34:00 +0000
+++ CMakeLists.txt 2014-12-10 16:37:38 +0000
@@ -403,7 +403,7 @@
# See line 41 of CMakeModules/FindwxWidgets.cmake
set( wxWidgets_CONFIG_OPTIONS --static=no )
-find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml REQUIRED )
+find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml webview stc REQUIRED )
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
=== modified file 'cvpcb/CMakeLists.txt'
--- cvpcb/CMakeLists.txt 2014-10-28 15:15:39 +0000
+++ cvpcb/CMakeLists.txt 2014-12-11 10:40:12 +0000
@@ -29,6 +29,9 @@
../pcbnew/dialogs/dialog_fp_lib_table_base.cpp
../pcbnew/dialogs/dialog_fp_plugin_options.cpp
../pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
+ ../pcbnew/dialogs/wizard_add_fplib_base.cpp
+ ../pcbnew/dialogs/wizard_add_fplib.cpp
+ ../webviewer/webviewer.cpp
)
set( CVPCB_SRCS
=== modified file 'pcbnew/CMakeLists.txt'
--- pcbnew/CMakeLists.txt 2014-10-26 19:54:48 +0000
+++ pcbnew/CMakeLists.txt 2014-12-11 10:39:50 +0000
@@ -41,6 +41,7 @@
)
set( PCBNEW_DIALOGS
+ ../webviewer/webviewer.cpp
dialogs/dialog_block_options_base.cpp
dialogs/dialog_cleaning_options_base.cpp
dialogs/dialog_cleaning_options.cpp
@@ -129,6 +130,8 @@
footprint_wizard_frame.cpp
dialogs/dialog_footprint_wizard_list_base.cpp
dialogs/dialog_footprint_wizard_list.cpp
+ dialogs/wizard_add_fplib_base.cpp
+ dialogs/wizard_add_fplib.cpp
)
set( PCBNEW_IMPORT_DXF
=== modified file 'pcbnew/dialogs/dialog_fp_lib_table.cpp'
--- pcbnew/dialogs/dialog_fp_lib_table.cpp 2014-09-22 09:37:22 +0000
+++ pcbnew/dialogs/dialog_fp_lib_table.cpp 2014-12-08 16:42:36 +0000
@@ -43,6 +43,8 @@
#include <invoke_pcb_dialog.h>
#include <grid_tricks.h>
#include <confirm.h>
+#include <wizard_add_fplib.h>
+
/// grid column order is established by this sequence
enum COL_ORDER
@@ -623,6 +625,8 @@
}
}
+ void OnClickLibraryWizard( wxCommandEvent& event );
+
void onCancelButtonClick( wxCommandEvent& event )
{
EndModal( 0 );
@@ -719,7 +723,7 @@
// the current project.
unique.insert( PROJECT_VAR_NAME );
unique.insert( FP_LIB_TABLE::GlobalPathEnvVariableName() );
- // This special environment variable is used to locad 3d shapes
+ // This special environment variable is used to locate 3d shapes
unique.insert( KISYS3DMOD );
unique.insert( FP_LIB_TABLE::GlobalPathEnvVariableName() );
@@ -757,6 +761,48 @@
int DIALOG_FP_LIB_TABLE::m_pageNdx = 0;
+void DIALOG_FP_LIB_TABLE::OnClickLibraryWizard( wxCommandEvent& event )
+{
+ wxArrayString envVariableList;
+
+ // Build the environment variables in use:
+ for( int ii = 0; ii < m_path_subs_grid->GetTable()->GetRowsCount(); ii ++ )
+ envVariableList.Add( m_path_subs_grid->GetCellValue( wxGridCellCoords( ii, 0 ) ) );
+
+ WIZARD_FPLIB_TABLE dlg( this, envVariableList );
+
+ if( ! dlg.RunWizard( dlg.GetFirstPage() ) )
+ return; // Aborted by user
+
+ wxGrid* libgrid = m_cur_grid;
+ FP_TBL_MODEL* tbl = (FP_TBL_MODEL*) libgrid->GetTable();
+
+ // Import fp library list
+ int idx = 0;
+ wxArrayString libDescr; // Will contain nickname, URI, plugin
+
+ while( dlg.GetLibDescr( idx++, libDescr ) )
+ {
+ if( ! libDescr[0].IsEmpty() && m_cur_grid->AppendRows( 1 ) )
+ {
+ int last_row = libgrid->GetNumberRows() - 1;
+
+ // Add the nickname: currently make it from filename
+ tbl->SetValue( last_row, COL_NICKNAME, libDescr[0] );
+ // Add the full path:
+ tbl->SetValue( last_row, COL_URI, libDescr[1] );
+ // Add the plugin name:
+ tbl->SetValue( last_row, COL_TYPE, libDescr[2] );
+
+ libgrid->MakeCellVisible( last_row, 0 );
+ libgrid->SetGridCursor( last_row, 0 );
+ }
+
+ libDescr.Clear();
+ }
+}
+
+
int InvokePcbLibTableEditor( wxTopLevelWindow* aParent, FP_LIB_TABLE* aGlobal, FP_LIB_TABLE* aProject )
{
DIALOG_FP_LIB_TABLE dlg( aParent, aGlobal, aProject );
=== modified file 'pcbnew/dialogs/dialog_fp_lib_table_base.cpp'
--- pcbnew/dialogs/dialog_fp_lib_table_base.cpp 2014-09-22 07:51:06 +0000
+++ pcbnew/dialogs/dialog_fp_lib_table_base.cpp 2014-12-07 16:54:38 +0000
@@ -103,6 +103,9 @@
bSizer51->Add( m_append_button, 0, wxALL, 5 );
+ m_buttonWizard = new wxButton( this, wxID_ANY, _("Append with Wizard"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer51->Add( m_buttonWizard, 0, wxALL, 5 );
+
m_delete_button = new wxButton( this, wxID_ANY, _("Remove Library"), wxDefaultPosition, wxDefaultSize, 0 );
m_delete_button->SetToolTip( _("Remove a PCB library from this library table") );
@@ -194,6 +197,7 @@
this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
m_append_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
+ m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
m_delete_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_move_up_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
@@ -209,6 +213,7 @@
this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
m_append_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
+ m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
m_delete_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
m_move_up_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
m_move_down_button->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
=== modified file 'pcbnew/dialogs/dialog_fp_lib_table_base.fbp'
--- pcbnew/dialogs/dialog_fp_lib_table_base.fbp 2014-09-22 07:51:06 +0000
+++ pcbnew/dialogs/dialog_fp_lib_table_base.fbp 2014-12-07 16:54:43 +0000
@@ -751,6 +751,94 @@
<event name="OnUpdateUI"></event>
</object>
</object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Append with Wizard</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_buttonWizard</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnClickLibraryWizard</event>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
=== modified file 'pcbnew/dialogs/dialog_fp_lib_table_base.h'
--- pcbnew/dialogs/dialog_fp_lib_table_base.h 2014-09-22 07:51:06 +0000
+++ pcbnew/dialogs/dialog_fp_lib_table_base.h 2014-12-05 08:36:48 +0000
@@ -47,6 +47,7 @@
wxPanel* m_project_panel;
wxGrid* m_project_grid;
wxButton* m_append_button;
+ wxButton* m_buttonWizard;
wxButton* m_delete_button;
wxButton* m_move_up_button;
wxButton* m_move_down_button;
@@ -61,6 +62,7 @@
virtual void onKeyDown( wxKeyEvent& event ) = 0;
virtual void pageChangedHandler( wxAuiNotebookEvent& event ) = 0;
virtual void appendRowHandler( wxMouseEvent& event ) = 0;
+ virtual void OnClickLibraryWizard( wxCommandEvent& event ) = 0;
virtual void deleteRowHandler( wxMouseEvent& event ) = 0;
virtual void moveUpHandler( wxMouseEvent& event ) = 0;
virtual void moveDownHandler( wxMouseEvent& event ) = 0;
=== added file 'pcbnew/dialogs/dialog_select_dirlist_base.cpp'
--- pcbnew/dialogs/dialog_select_dirlist_base.cpp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/dialog_select_dirlist_base.cpp 2014-12-08 14:35:43 +0000
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_select_dirlist_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxSize( 400,300 ), wxDefaultSize );
+
+ wxBoxSizer* bSizerMain;
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText = new wxStaticText( this, wxID_ANY, _("The footprint library is a folde.\nFootprints are 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|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS|wxSUNKEN_BORDER, _("*.pretty|*"), 0 );
+
+ m_dirCtrl->ShowHidden( false );
+ bSizerMain->Add( m_dirCtrl, 1, wxEXPAND | wxALL, 5 );
+
+ 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_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+ m_dirCtrl->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+}
+
+DIALOG_SELECT_DIRLIST_BASE::~DIALOG_SELECT_DIRLIST_BASE()
+{
+ // Disconnect Events
+ m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+ m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+
+}
=== added file 'pcbnew/dialogs/dialog_select_dirlist_base.fbp'
--- pcbnew/dialogs/dialog_select_dirlist_base.fbp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/dialog_select_dirlist_base.fbp 2014-12-08 14:35:42 +0000
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+ <FileVersion major="1" minor="13" />
+ <object class="Project" expanded="1">
+ <property name="class_decoration"></property>
+ <property name="code_generation">C++</property>
+ <property name="disconnect_events">1</property>
+ <property name="disconnect_mode">source_name</property>
+ <property name="disconnect_php_events">0</property>
+ <property name="disconnect_python_events">0</property>
+ <property name="embedded_files_path">res</property>
+ <property name="encoding">UTF-8</property>
+ <property name="event_generation">connect</property>
+ <property name="file">dialog_select_dirlist_base</property>
+ <property name="first_id">1000</property>
+ <property name="help_provider">none</property>
+ <property name="internationalize">1</property>
+ <property name="name">dialog_select_dirlist_base</property>
+ <property name="namespace"></property>
+ <property name="path">.</property>
+ <property name="precompiled_header"></property>
+ <property name="relative_path">1</property>
+ <property name="skip_lua_events">1</property>
+ <property name="skip_php_events">1</property>
+ <property name="skip_python_events">1</property>
+ <property name="ui_table">UI</property>
+ <property name="use_enum">0</property>
+ <property name="use_microsoft_bom">0</property>
+ <object class="Dialog" expanded="1">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size">400,300</property>
+ <property name="name">DIALOG_SELECT_DIRLIST_BASE</property>
+ <property name="pos"></property>
+ <property name="size">400,300</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+ <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
+ <property name="title">Select Footprint Library Folder</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerMain</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font">,90,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">The footprint library is a folde.
Footprints are files inside this folder.</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticText</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxGenericDirCtrl" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="defaultfilter">0</property>
+ <property name="defaultfolder"></property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="filter">*.pretty|*</property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_dirCtrl</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="show_hidden">0</property>
+ <property name="size"></property>
+ <property name="style">wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxSUNKEN_BORDER</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnTreeBeginDrag"></event>
+ <event name="OnTreeBeginLabelEdit"></event>
+ <event name="OnTreeBeginRDrag"></event>
+ <event name="OnTreeDeleteItem"></event>
+ <event name="OnTreeEndDrag"></event>
+ <event name="OnTreeEndLabelEdit"></event>
+ <event name="OnTreeItemActivated">OnSelectFolder</event>
+ <event name="OnTreeItemCollapsed"></event>
+ <event name="OnTreeItemCollapsing"></event>
+ <event name="OnTreeItemExpanded"></event>
+ <event name="OnTreeItemExpanding"></event>
+ <event name="OnTreeItemMenu"></event>
+ <event name="OnTreeItemMiddleClick"></event>
+ <event name="OnTreeItemRightClick"></event>
+ <event name="OnTreeKeyDown"></event>
+ <event name="OnTreeSelChanged">OnSelectFolder</event>
+ <event name="OnTreeSelChanging"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticLine" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticline1</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxLI_HORIZONTAL</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_RIGHT</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="1">
+ <property name="Apply">0</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick"></event>
+ <event name="OnCancelButtonClick"></event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick"></event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</wxFormBuilder_Project>
=== added file 'pcbnew/dialogs/dialog_select_dirlist_base.h'
--- pcbnew/dialogs/dialog_select_dirlist_base.h 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/dialog_select_dirlist_base.h 2014-12-08 14:35:43 +0000
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_SELECT_DIRLIST_BASE_H__
+#define __DIALOG_SELECT_DIRLIST_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class DIALOG_SHIM;
+
+#include "dialog_shim.h"
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/dirctrl.h>
+#include <wx/statline.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_SELECT_DIRLIST_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_SELECT_DIRLIST_BASE : public DIALOG_SHIM
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticText;
+ wxGenericDirCtrl* m_dirCtrl;
+ wxStaticLine* m_staticline1;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnSelectFolder( wxTreeEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Footprint Library Folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,300 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ ~DIALOG_SELECT_DIRLIST_BASE();
+
+};
+
+#endif //__DIALOG_SELECT_DIRLIST_BASE_H__
=== added file 'pcbnew/dialogs/wizard_add_fplib.cpp'
--- pcbnew/dialogs/wizard_add_fplib.cpp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/wizard_add_fplib.cpp 2014-12-11 20:22:20 +0000
@@ -0,0 +1,639 @@
+/**
+ * @file wizard_add_fplib.cpp
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <wx/wx.h>
+#include <wx/url.h>
+#include <dialog_helpers.h>
+#include <project.h> // For PROJECT_VAR_NAME definition
+#include <io_mgr.h>
+#include <wizard_add_fplib.h>
+
+
+WIZARD_FPLIB_TABLE::WIZARD_FPLIB_TABLE( wxWindow* aParent, wxArrayString& aEnvVariableList )
+ : WIZARD_FPLIB_TABLE_BASE( aParent )
+{
+ initDlg( aEnvVariableList );
+
+ // Gives a minimal size to the dialog, which allows displaying any page
+ wxSize minsize;
+
+ for( int ii = 0; ii < 3; ii++ )
+ {
+ wxSize size = m_pages[ii]->GetSizer()->CalcMin();
+ minsize.x = std::max( minsize.x, size.x );
+ minsize.y = std::max( minsize.y, size.y );
+ }
+
+ SetMinSize( minsize );
+ SetPageSize( minsize );
+ GetSizer()->SetSizeHints( this );
+ Center();
+}
+
+
+void WIZARD_FPLIB_TABLE::initDlg( wxArrayString& aEnvVariableList )
+{
+ m_currLibDescr = NULL;
+
+ SetBitmap( KiBitmap( wizard_add_fplib_icon_xpm ) );
+
+ // KIGITHUB is frequently used (examples in docs, and other place)
+ // So add it if it not yet in list, and if it is defined in env var
+ if( aEnvVariableList.Index( wxT("KIGITHUB"), false ) == wxNOT_FOUND )
+ {
+ wxString evValue;
+ wxGetEnv( wxT("KIGITHUB"), &evValue );
+
+ // Not yet in use in lib table, but it exists, so add it
+ if( ! evValue.IsEmpty() )
+ aEnvVariableList.Add( wxT("KIGITHUB") );
+ }
+
+ rowPrjEnvVarPosition = 0;
+ m_predefinedEnvVar = aEnvVariableList.GetCount();
+
+ for( int row = 0; row < m_predefinedEnvVar; row++ )
+ {
+ if( GetEnvVarCount() <= row )
+ m_gridEnvironmentVariablesList->AppendRows(1);
+
+ m_gridEnvironmentVariablesList->SetCellValue( row, 0, aEnvVariableList[row] );
+
+ if( aEnvVariableList[row] == PROJECT_VAR_NAME )
+ rowPrjEnvVarPosition = row;
+
+ wxString evValue;
+
+ if( wxGetEnv( aEnvVariableList[row], &evValue ) )
+ m_gridEnvironmentVariablesList->SetCellValue( row, 1, evValue );
+
+ // All these env var are defined outside the wizard,
+ // and cannot be modified in this dialog
+ m_gridEnvironmentVariablesList->SetReadOnly( row, 0, true );
+ m_gridEnvironmentVariablesList->SetReadOnly( row, 1, true );
+ }
+
+ m_gridEnvironmentVariablesList->Fit();
+
+ m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVar );
+ m_gridEnvironmentVariablesList->AutoSizeColumns();
+
+ wxCommandEvent event;
+ updateFromPlugingChoice();
+ OnPathManagementSelection( event );
+}
+
+
+bool WIZARD_FPLIB_TABLE::ValidateOptions()
+{
+ // Some choices can be conficting or do not work.
+ // Warn the user when this is the case
+ wxString msg;
+
+ if( GetSelectedEnvVarValue().IsEmpty() )
+ {
+ // PROJECT_PATH option cannot be used with empty local path
+ if( m_rbPathManagement->GetSelection() == PROJECT_PATH )
+ {
+ msg = _("The project path is empty and this option is not valid.\n"
+ "Looks like you are running the wizard outside a project.");
+ wxMessageBox( msg );
+ return false;
+ }
+ else if( m_rbPathManagement->GetSelection() != ABSOLUTE_PATH )
+ {
+ wxMessageBox( wxString::Format(
+ _("The default path defined by env var \"%s\" is empty.\nCannot use it"),
+ GetChars( GetSelectedEnvVar() ) ) );
+ return false;
+ }
+ }
+ else
+ {
+ if( IsGithubPlugin() )
+ {
+ // Github plugin cannot be used with local path; Need absolute path or valid URL
+ if( !GetSelectedEnvVarValue().Lower().StartsWith( "http" ) )
+ {
+ msg = _("Github Plugin uses a valid Internet URL starting by http.\n"
+ "Cannot be used as URL");
+ wxMessageBox( msg );
+ return false;
+ }
+ }
+ else
+ {
+ if( GetSelectedEnvVarValue().Lower().StartsWith( "http" ) )
+ {
+ msg = _("This default path looks strange.\n"
+ "Cannot be used for a file path");
+ wxMessageBox( msg );
+ return false;
+ }
+ }
+ }
+
+ // Other conficts: TODO
+
+ return true;
+}
+
+
+void WIZARD_FPLIB_TABLE::OnPluginSelection( wxCommandEvent& event )
+{
+ updateFromPlugingChoice();
+}
+
+void WIZARD_FPLIB_TABLE::updateFromPlugingChoice()
+{
+ // update dialog options and widgets depending on a plugin choice
+ // Project path has no sense for GITHUB_PLUGIN
+ bool enablePrjPathOpt = not IsGithubPlugin();
+
+ // Project path cannot be used if unknown
+ if( m_gridEnvironmentVariablesList->GetCellValue(
+ wxGridCellCoords( rowPrjEnvVarPosition, 1 ) ).IsEmpty() )
+ enablePrjPathOpt = false;
+
+ m_rbPathManagement->Enable( PROJECT_PATH, enablePrjPathOpt );
+
+ if( m_rbPathManagement->GetSelection() == PROJECT_PATH && !enablePrjPathOpt )
+ m_rbPathManagement->SetSelection( ABSOLUTE_PATH );
+}
+
+
+void WIZARD_FPLIB_TABLE::OnPathManagementSelection( wxCommandEvent& event )
+{
+ // Disable irrevant options, and enable others.
+ int row_count = GetEnvVarCount();
+
+ switch( m_rbPathManagement->GetSelection() )
+ {
+ case PROJECT_PATH: // Choice = path relative to the project
+ m_gridEnvironmentVariablesList->Enable( true );
+ m_buttonAddEV->Enable( false );
+ m_gridEnvironmentVariablesList->ShowRow( PROJECT_PATH );
+
+ for( int row = 0; row < row_count; row++ )
+ {
+ if( row == PROJECT_PATH )
+ continue;
+
+ m_gridEnvironmentVariablesList->HideRow( row );
+ }
+ break;
+
+ case ENV_VAR_PATH: // Choice = path relative to env var
+ m_gridEnvironmentVariablesList->Enable( true );
+ m_buttonAddEV->Enable( true );
+
+ for( int row = 0; row < row_count; row++ )
+ m_gridEnvironmentVariablesList->ShowRow( row );
+
+ break;
+
+ case ABSOLUTE_PATH: // Choice = path relative to the project
+ m_gridEnvironmentVariablesList->Enable( false );
+ m_buttonAddEV->Enable( false );
+ break;
+ }
+}
+
+void WIZARD_FPLIB_TABLE::OnAddEVariable( wxCommandEvent& event )
+{
+ m_gridEnvironmentVariablesList->AppendRows( 1 );
+ m_gridEnvironmentVariablesList->AutoSizeColumns();
+ m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVar );
+}
+
+void WIZARD_FPLIB_TABLE::OnRemoveEVariable( wxCommandEvent& event )
+{
+ wxArrayInt selectedRows = m_gridEnvironmentVariablesList->GetSelectedRows();
+
+ for( int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
+ {
+ int row = selectedRows[ii];
+
+ if( row > m_predefinedEnvVar-1 ) // the first env var. are existing in lib table,
+ // don't remove them
+ m_gridEnvironmentVariablesList->DeleteRows( row, 1 );
+ }
+
+ m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVar );
+}
+
+void WIZARD_FPLIB_TABLE::OnSelectEnvVarCell( wxGridEvent& event )
+{
+ // Ensure the selected row is also the row which have the focus.
+ // useful when the user want to delete a row, and select it by the mouse
+ m_gridEnvironmentVariablesList->SelectRow( event.GetRow() );
+}
+
+wxString WIZARD_FPLIB_TABLE::GetSelectedEnvVar()
+{
+ wxString envVar;
+ wxArrayInt selectedRows = m_gridEnvironmentVariablesList->GetSelectedRows();
+ int row = selectedRows.GetCount() ? selectedRows[0] :
+ m_gridEnvironmentVariablesList->GetGridCursorRow();
+
+ switch( m_rbPathManagement->GetSelection() )
+ {
+ case ENV_VAR_PATH: // Choice = path relative to env var
+ envVar = m_gridEnvironmentVariablesList->GetCellValue(
+ wxGridCellCoords( row, 0 ) );
+ break;
+
+ case PROJECT_PATH: // Choice = path relative to the project
+ envVar = PROJECT_VAR_NAME;
+ break;
+
+ case ABSOLUTE_PATH: // Choice = absolute path
+ default:
+ break;
+ }
+
+ return envVar;
+}
+
+
+wxString WIZARD_FPLIB_TABLE::GetSelectedEnvVarValue()
+{
+ wxString envVarValue;
+ wxArrayInt selectedRows = m_gridEnvironmentVariablesList->GetSelectedRows();
+ int row = selectedRows.GetCount() ? selectedRows[0] :
+ m_gridEnvironmentVariablesList->GetGridCursorRow();
+
+ switch( m_rbPathManagement->GetSelection() )
+ {
+ case ENV_VAR_PATH: // Choice = path relative tp env var
+ envVarValue = m_gridEnvironmentVariablesList->GetCellValue(
+ wxGridCellCoords( row, 1 ) );
+ break;
+
+ case PROJECT_PATH: // Choice = path relative to the project
+ envVarValue = m_gridEnvironmentVariablesList->GetCellValue(
+ wxGridCellCoords( rowPrjEnvVarPosition, 1 ) );
+ break;
+
+ case ABSOLUTE_PATH: // Choice = absolute path
+ default:
+ break;
+ }
+
+ return envVarValue;
+}
+
+void WIZARD_FPLIB_TABLE::OnPageChanged( wxWizardEvent& event )
+{
+ if( GetCurrentPage() == m_pages[2] )
+ setLastPage();
+ else if( GetCurrentPage() == m_pages[1] )
+ setSecondPage();
+}
+
+void WIZARD_FPLIB_TABLE::OnPageChanging( wxWizardEvent& event )
+{
+ if( !( GetCurrentPage() == m_pages[1] && event.GetDirection() ) )
+ return;
+
+ if( ! ValidateOptions() )
+ {
+ event.Veto();
+ return;
+ }
+
+ if( ( m_rbPathManagement->GetSelection() != ABSOLUTE_PATH ) &&
+ ( IsGithubPlugin() ) )
+ {
+ wxURI uri( GetSelectedEnvVarValue() );
+
+ // We cannot use wxURL to test the validity of the url, because
+ // wxURL does not know https protocol we are using, and aways returns
+ // error for url starting by https
+ bool badurl = !uri.HasPath();
+
+ if( badurl )
+ {
+ wxMessageBox( wxString::Format(
+ _("The URL defined by env var \"%s\" is an incorrect URL.\nCannot use it"),
+ GetChars( GetSelectedEnvVar() ) ) );
+ event.Veto();
+ }
+ }
+}
+
+bool WIZARD_FPLIB_TABLE::setSecondPage()
+{
+ // Init parameters for the second wizard page: this is only
+ // the current library description.
+ updateFromPlugingChoice();
+
+ delete m_currLibDescr;
+ m_currLibDescr = NULL;
+
+ switch( m_rbFpLibFormat->GetSelection() )
+ {
+ case 0: // Kicad lib type
+ m_currLibDescr = new LIB_DESCR_KICAD;
+ break;
+
+ case 1: // Github lib type
+ m_currLibDescr = new LIB_DESCR_GITHUB;
+ break;
+
+ case 2: // Legacy lib type
+ m_currLibDescr = new LIB_DESCR_LEGACY;
+ break;
+
+ case 3: // Eagle V6 lib type
+ m_currLibDescr = new LIB_DESCR_EAGLE;
+ break;
+
+ case 4: // Geda lib type
+ m_currLibDescr = new LIB_DESCR_GEDA;
+ break;
+ }
+
+ return m_currLibDescr!= NULL;
+}
+
+bool WIZARD_FPLIB_TABLE::setLastPage() // Init prms for the last wizard page
+{
+ // Update texts in last wizard page
+ m_textPluginType->SetLabel( m_rbFpLibFormat->GetStringSelection() );
+
+ switch( m_rbPathManagement->GetSelection() )
+ {
+ case ENV_VAR_PATH: // Choice = path relative env var
+ case PROJECT_PATH: // Choice = path relative to the project
+ m_currLibDescr->m_EnvVarName = GetSelectedEnvVar();
+ m_currLibDescr->m_DefaultPath = GetSelectedEnvVarValue();
+ m_currLibDescr->m_IsAbsolutePath = false;
+
+ m_textOption->SetLabel( wxString::Format( wxT("%s (%s)"),
+ m_rbPathManagement->GetStringSelection().GetData(),
+ GetSelectedEnvVar().GetData() ) );
+
+ m_textPath->SetLabel( GetSelectedEnvVarValue() );
+ break;
+
+ case ABSOLUTE_PATH: // Choice = absolute path
+ m_currLibDescr->m_IsAbsolutePath = true;
+
+ m_textOption->SetLabel( m_rbPathManagement->GetStringSelection() );
+
+ if( IsGithubPlugin() )
+ m_textPath->SetLabel( _("Full URL") );
+ else
+ m_textPath->SetLabel( _("Full filename") );
+ break;
+ }
+
+ return true;
+}
+
+
+
+void WIZARD_FPLIB_TABLE::OnAddFpLibs( wxCommandEvent& event )
+{
+ if( m_currLibDescr->m_IsFile )
+ selectLibsFiles();
+ else if( m_currLibDescr->m_IsGitHub )
+ selectLibsGithub();
+ else
+ selectLibsFolders();
+}
+
+void WIZARD_FPLIB_TABLE::selectLibsFiles() // select a set of library files
+{
+ wxString msk = wxT("*.") + m_currLibDescr->m_Ext;
+
+ wxFileDialog dlg( this, _("Select Library Files"), m_currLibDescr->m_DefaultPath,
+ wxEmptyString, msk,
+ wxFD_DEFAULT_STYLE|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE );
+
+ dlg.ShowModal();
+
+ wxArrayString filepaths;
+ dlg.GetPaths( filepaths );
+
+ // Create the nickname: currently make it from the filename
+ wxArrayString nicknames;
+ wxFileName fn;
+
+ for( unsigned ii = 0; ii < filepaths.GetCount(); ii++ )
+ {
+ fn = filepaths[ii];
+ nicknames.Add( fn.GetName() );
+
+ if( m_currLibDescr->m_IsAbsolutePath || m_currLibDescr->m_DefaultPath.IsEmpty() )
+ {
+ filepaths[ii] = fn.GetPathWithSep();
+ }
+ else
+ {
+ if( ! fn.MakeRelativeTo( m_currLibDescr->m_DefaultPath ) )
+ filepaths[ii] = fn.GetFullPath();
+ else
+ filepaths[ii].Printf( wxT("${%s}%c%s"),
+ GetChars( m_currLibDescr->m_EnvVarName ),
+ fn.GetPathSeparator(),
+ GetChars( fn.GetFullPath() ) );
+ }
+#ifdef __WINDOWS__
+ // We store paths using Unix notation, which also works fine on Windows
+ filepaths[ii].Replace( wxT("\\"), wxT("/") );
+#endif
+ }
+
+ populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
+}
+
+
+void WIZARD_FPLIB_TABLE::populateLibList( const wxArrayString& aNickNames,
+ const wxArrayString& aPaths,
+ const wxString& aPluginName )
+{
+ if( aPaths.GetCount() <= 0 )
+ return;
+
+ // Ensure there is room for selected libs
+ int first_row = m_gridFpListLibs->GetTable()->GetRowsCount();
+ m_gridFpListLibs->AppendRows( aPaths.GetCount() );
+
+ // Populates the library list
+ for( unsigned ii = 0; ii < aPaths.GetCount(); ii++ )
+ {
+ int jj = first_row + ii;
+ // Add the nickname: currently make it from filename
+ m_gridFpListLibs->SetCellValue( jj, 0, aNickNames[ii] );
+ // Add the full path:
+ m_gridFpListLibs->SetCellValue( jj, 1, aPaths[ii] );
+ // Add the plugin name:
+ m_gridFpListLibs->SetCellValue( jj, 2, aPluginName );
+ m_gridFpListLibs->SetReadOnly( jj, 2, true );
+ }
+
+ m_gridFpListLibs->Fit();
+}
+
+
+// A helper dialog to show and select a set of directories
+class DIALOG_SELECT_DIRLIST : public DIALOG_SELECT_DIRLIST_BASE
+{
+public:
+ DIALOG_SELECT_DIRLIST( wxWindow* parent,
+ const wxString& aDefaultPath ):
+ DIALOG_SELECT_DIRLIST_BASE( parent, wxID_ANY )
+ {
+ if( !aDefaultPath.IsEmpty() )
+ m_dirCtrl->SetPath( aDefaultPath );
+ }
+
+ ~DIALOG_SELECT_DIRLIST() {};
+
+ void GetPaths( wxArrayString& aPaths ) { m_dirCtrl->GetPaths( aPaths ); }
+};
+
+void WIZARD_FPLIB_TABLE::selectLibsFolders() // select a set of library folders
+{
+ DIALOG_SELECT_DIRLIST dlg( this, m_currLibDescr->m_DefaultPath );
+
+ if( dlg.ShowModal() != wxID_OK )
+ return;
+
+ wxArrayString filepaths;
+
+ dlg.GetPaths( filepaths );
+
+ // Create the nickname: currently make it from the filename
+ wxArrayString nicknames;
+ wxFileName fn;
+
+ for( unsigned ii = 0; ii < filepaths.GetCount(); ii++ )
+ {
+ fn = filepaths[ii];
+ nicknames.Add( fn.GetName() );
+
+ fn.AssignDir( filepaths[ii] );
+
+ if( m_currLibDescr->m_IsAbsolutePath || m_currLibDescr->m_DefaultPath.IsEmpty() )
+ {
+ filepaths[ii] = fn.GetFullPath();
+ }
+ else
+ {
+ if( ! fn.MakeRelativeTo( m_currLibDescr->m_DefaultPath ) )
+ filepaths[ii] = fn.GetFullPath();
+ else
+ filepaths[ii].Printf( wxT("${%s}%c%s"),
+ GetChars( m_currLibDescr->m_EnvVarName ),
+ fn.GetPathSeparator(),
+ GetChars( fn.GetFullPath() ) );
+ }
+#ifdef __WINDOWS__
+ // We store paths using Unix notation, which also works fine on Windows
+ filepaths[ii].Replace( wxT("\\"), wxT("/") );
+#endif
+ // Remove trailing path separator, if any.
+ if( filepaths[ii].EndsWith( wxT("/") ) )
+ filepaths[ii].RemoveLast();
+ }
+
+ populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
+}
+
+// A helper function to run the wen viewer (see webviewer.cpp)
+extern int RunWebViewer( wxWindow * aParent, const wxString& aUrlOnStart,
+ wxArrayString* aUrlListSelection = NULL );
+
+void WIZARD_FPLIB_TABLE::selectLibsGithub() // select a set of library on Github
+{
+ // A string array to store the URLs selected from the web viewer:
+ wxArrayString urls;
+
+ // Run the web viewer and open the default URL: the default path
+ // or our github library depos
+ wxString defaultURL = m_currLibDescr->m_DefaultPath;
+
+ if( defaultURL.IsEmpty() )
+ defaultURL = wxT( "https://github.com/kicad" );
+
+ RunWebViewer( this, defaultURL, &urls );
+
+ // Create the nickname: currently make it from the url
+ wxArrayString filepaths;
+ wxArrayString nicknames;
+
+ for( unsigned ii = 0; ii < urls.GetCount(); ii++ )
+ {
+ wxString urlstring( urls[ii] );
+
+ wxURI uri( urlstring );
+
+ // We cannot use wxURL to test the validity of the url, because
+ // wxURL does not know https protocol we are using, and aways returns
+ // error for URLs starting by https. Hope this test is enough
+ if( uri.HasPath() )
+ nicknames.Add( uri.GetPath().AfterLast( '/').BeforeLast( '.' ).Lower() );
+ else
+ continue; // Should not happen: bad URL
+
+ if( m_currLibDescr->m_IsAbsolutePath ||
+ m_currLibDescr->m_DefaultPath.IsEmpty() )
+ {
+ filepaths.Add( urls[ii] ); // use the full URL
+ }
+ else
+ {
+ wxString shortURI;
+ if( urls[ii].Lower().StartsWith(
+ m_currLibDescr->m_DefaultPath.Lower(), &shortURI ) )
+ {
+ shortURI.Prepend( wxT("${") + m_currLibDescr->m_EnvVarName + wxT("}") );
+ filepaths.Add( shortURI );
+ }
+ else // keep the full URL
+ filepaths.Add( urls[ii] ); // use the full URL
+ }
+ }
+
+ populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
+}
+
+
+void WIZARD_FPLIB_TABLE::OnRemoveFpLibs( wxCommandEvent& event )
+{
+ wxArrayInt selectedRows = m_gridFpListLibs->GetSelectedRows();
+
+ for( int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
+ {
+ int row = selectedRows[ii];
+ m_gridFpListLibs->DeleteRows( row, 1 );
+ }
+}
=== added file 'pcbnew/dialogs/wizard_add_fplib.h'
--- pcbnew/dialogs/wizard_add_fplib.h 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/wizard_add_fplib.h 2014-12-09 19:33:10 +0000
@@ -0,0 +1,209 @@
+/**
+ * @file wizard_add_fplib.h
+ */
+
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you may find one here:
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+ * or you may search the http://www.gnu.org website for the version 2 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <wx/wx.h>
+#include <dialog_helpers.h>
+#include <wizard_add_fplib_base.h>
+
+// A helper class to handle the different types of lib depending
+// on the plugin: ext, type of lib: files/folders ... and info
+// needed to populate the main fp lib table
+class LIB_DESCR
+{
+public:
+ wxString m_PluginName; // The "official" name of the plugin (see fp lib table dialog)
+ wxString m_Ext; // standard extension (.mod, .pretty ...)
+ wxString m_EnvVarName; // the environment var if selected, or empty
+ wxString m_DefaultPath;
+ bool m_IsAbsolutePath; // true if absolue path is selected
+ bool m_IsFile; // true for libs which are single files,
+ // false for libs which are directories containing footprints
+ bool m_IsGitHub; // true only for GitHub plugin
+
+ LIB_DESCR()
+ {
+ m_IsAbsolutePath = true;
+ m_IsFile = true;
+ m_IsGitHub = false;
+ }
+};
+
+class LIB_DESCR_KICAD: public LIB_DESCR
+{
+public:
+ LIB_DESCR_KICAD(): LIB_DESCR()
+ {
+ m_PluginName = IO_MGR::ShowType( IO_MGR::KICAD );
+ m_Ext = wxT("pretty");
+ m_IsFile = false;
+ }
+};
+
+
+class LIB_DESCR_GITHUB: public LIB_DESCR
+{
+public:
+ LIB_DESCR_GITHUB(): LIB_DESCR()
+ {
+ m_PluginName = IO_MGR::ShowType( IO_MGR::GITHUB );
+ m_Ext = wxT("pretty");
+ m_IsFile = false;
+ m_IsGitHub = true;
+ }
+};
+
+class LIB_DESCR_LEGACY: public LIB_DESCR
+{
+public:
+ LIB_DESCR_LEGACY(): LIB_DESCR()
+ {
+ m_PluginName = IO_MGR::ShowType( IO_MGR::LEGACY );
+ m_Ext = wxT("mod");
+ }
+};
+
+
+class LIB_DESCR_EAGLE: public LIB_DESCR
+{
+public:
+ LIB_DESCR_EAGLE(): LIB_DESCR()
+ {
+ m_PluginName = IO_MGR::ShowType( IO_MGR::EAGLE );
+ m_Ext = wxT("lbr");
+ m_IsFile = true;
+ }
+};
+
+
+class LIB_DESCR_GEDA: public LIB_DESCR
+{
+public:
+ // No specific extension known for folders
+ LIB_DESCR_GEDA(): LIB_DESCR()
+ {
+ m_PluginName = IO_MGR::ShowType( IO_MGR::GEDA_PCB );
+ m_IsFile = false;
+ }
+};
+
+
+
+class WIZARD_FPLIB_TABLE : public WIZARD_FPLIB_TABLE_BASE
+{
+ int rowPrjEnvVarPosition; // the row of the PROJECT_VAR_NAME
+ int m_predefinedEnvVar; // number of predefined env var when callind the wizard
+ // at least 3 are always defined
+ LIB_DESCR * m_currLibDescr;
+
+ // This enum must have the same order than m_rbPathManagement
+ enum OPT_PATH {
+ PROJECT_PATH,
+ ENV_VAR_PATH,
+ ABSOLUTE_PATH
+ };
+
+ // This enum must have the same order than m_rbFpLibFormat
+ enum OPT_PLUGIN {
+ KICAD_PLUGIN,
+ GITHUB_PLUGIN,
+ LEGACY_PLUGIN,
+ EAGLE_PLUGIN,
+ GEDA_PCB_PLUGIN
+ };
+
+public:
+ WIZARD_FPLIB_TABLE( wxWindow* aParent, wxArrayString& aEnvVariableList );
+ wxWizardPage* GetFirstPage() { return m_pages[0]; }
+
+ ~WIZARD_FPLIB_TABLE()
+ {
+ delete m_currLibDescr;
+ }
+
+ /**
+ * Return info on lib at line aIdx in aLibDescr
+ * @param aLibDescr = a wxArrayString to return the nickname, the lib URI and the lin type
+ * @return true if aIdx lin exists
+ */
+ bool GetLibDescr( int aIdx, wxArrayString& aLibDescr )
+ {
+ int count = m_gridFpListLibs->GetTable()->GetRowsCount();
+
+ if( aIdx >= count )
+ return false;
+
+ // Return info
+ // Add the nickname:
+ aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 0 ) );
+ // Add the full path:
+ aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 1 ) );
+ // Add the plugin name:
+ aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 2 ) );
+
+ return true;
+ }
+
+private:
+ void initDlg( wxArrayString& aEnvVariableList );
+ wxString GetSelectedEnvVar(); // return the selected env variable
+ wxString GetSelectedEnvVarValue(); // return the selected env variable value
+ bool setSecondPage(); // Init prms for the second wizard page
+ bool setLastPage(); // Init prms for the last wizard page
+ void selectLibsFiles(); // select a set of library files
+ void selectLibsFolders(); // select a set of library folders
+ void selectLibsGithub(); // select a set of library on Github
+ void updateFromPlugingChoice(); // update dialog options and widgets
+ // depending on the plugin choice
+ int GetEnvVarCount() // Get the number of rows in env var table
+ {
+ return m_gridEnvironmentVariablesList->GetTable()->GetRowsCount();
+ }
+
+ bool IsGithubPlugin() // Helper funct, return true if
+ { // the Github plugin is the choice
+ return m_rbFpLibFormat->GetSelection() == GITHUB_PLUGIN;
+ }
+
+ // Populate the library list with the currently selected libs
+ void populateLibList( const wxArrayString& aNickNames,
+ const wxArrayString& aPaths,
+ const wxString& aPluginName );
+
+ // Virtual event functions, from WIZARD_FPLIB_TABLE_BASE
+ void OnFinish( wxWizardEvent& event ) { event.Skip(); }
+ void OnPageChanged( wxWizardEvent& event );
+ void OnPageChanging( wxWizardEvent& event );
+ void OnAddEVariable( wxCommandEvent& event );
+ void OnRemoveEVariable( wxCommandEvent& event );
+ void OnAddFpLibs( wxCommandEvent& event );
+ void OnRemoveFpLibs( wxCommandEvent& event );
+ void OnPathManagementSelection( wxCommandEvent& event );
+ void OnSelectEnvVarCell( wxGridEvent& event );
+ void OnPluginSelection( wxCommandEvent& event );
+ bool ValidateOptions();
+};
=== added file 'pcbnew/dialogs/wizard_add_fplib_base.cpp'
--- pcbnew/dialogs/wizard_add_fplib_base.cpp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/wizard_add_fplib_base.cpp 2014-12-09 08:52:23 +0000
@@ -0,0 +1,289 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wizard_add_fplib_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+WIZARD_FPLIB_TABLE_BASE::WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxBitmap& bitmap, const wxPoint& pos, long style )
+{
+ this->Create( parent, id, title, bitmap, pos, style );
+ this->SetSizeHints( wxSize( 450,-1 ), wxDefaultSize );
+
+ wxWizardPageSimple* m_wizPage1 = new wxWizardPageSimple( this );
+ m_pages.Add( m_wizPage1 );
+
+ m_wizPage1->SetMinSize( wxSize( 500,-1 ) );
+
+ wxBoxSizer* bSizerPage1;
+ bSizerPage1 = new wxBoxSizer( wxVERTICAL );
+
+ wxString m_rbFpLibFormatChoices[] = { _("KiCad (*.Pretty folder containing .kicad_mod files)"), _("GitHub (.Pretty lib stored on GitHub depos)"), _("Legacy ( old *.mod lib file)"), _("Eagle V6 xml library file"), _("Geda footprint folder (folder containing *.fp files)") };
+ int m_rbFpLibFormatNChoices = sizeof( m_rbFpLibFormatChoices ) / sizeof( wxString );
+ m_rbFpLibFormat = new wxRadioBox( m_wizPage1, wxID_ANY, _("Library Format:"), wxDefaultPosition, wxDefaultSize, m_rbFpLibFormatNChoices, m_rbFpLibFormatChoices, 1, wxRA_SPECIFY_COLS );
+ m_rbFpLibFormat->SetSelection( 0 );
+ bSizerPage1->Add( m_rbFpLibFormat, 0, wxALL|wxEXPAND, 5 );
+
+
+ m_wizPage1->SetSizer( bSizerPage1 );
+ m_wizPage1->Layout();
+ bSizerPage1->Fit( m_wizPage1 );
+ wxWizardPageSimple* m_wizPage2 = new wxWizardPageSimple( this );
+ m_pages.Add( m_wizPage2 );
+
+ m_wizPage2->SetMinSize( wxSize( 450,-1 ) );
+
+ wxBoxSizer* bSizerPage2;
+ bSizerPage2 = new wxBoxSizer( wxVERTICAL );
+
+ wxString m_rbPathManagementChoices[] = { _("Use path relative to the project"), _("Use environment variable in path"), _("Use absolute path") };
+ int m_rbPathManagementNChoices = sizeof( m_rbPathManagementChoices ) / sizeof( wxString );
+ m_rbPathManagement = new wxRadioBox( m_wizPage2, wxID_ANY, _("Path management:"), wxDefaultPosition, wxDefaultSize, m_rbPathManagementNChoices, m_rbPathManagementChoices, 1, wxRA_SPECIFY_COLS );
+ m_rbPathManagement->SetSelection( 1 );
+ bSizerPage2->Add( m_rbPathManagement, 0, wxALL|wxEXPAND, 5 );
+
+ m_staticText1 = new wxStaticText( m_wizPage2, wxID_ANY, _("Environment variables:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText1->Wrap( -1 );
+ bSizerPage2->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ m_gridEnvironmentVariablesList = new wxGrid( m_wizPage2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridEnvironmentVariablesList->CreateGrid( 3, 2 );
+ m_gridEnvironmentVariablesList->EnableEditing( true );
+ m_gridEnvironmentVariablesList->EnableGridLines( true );
+ m_gridEnvironmentVariablesList->EnableDragGridSize( false );
+ m_gridEnvironmentVariablesList->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridEnvironmentVariablesList->SetColSize( 0, 125 );
+ m_gridEnvironmentVariablesList->SetColSize( 1, 154 );
+ m_gridEnvironmentVariablesList->AutoSizeColumns();
+ m_gridEnvironmentVariablesList->EnableDragColMove( false );
+ m_gridEnvironmentVariablesList->EnableDragColSize( true );
+ m_gridEnvironmentVariablesList->SetColLabelSize( 30 );
+ m_gridEnvironmentVariablesList->SetColLabelValue( 0, _("Environment Variable") );
+ m_gridEnvironmentVariablesList->SetColLabelValue( 1, _("Path Segment") );
+ m_gridEnvironmentVariablesList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridEnvironmentVariablesList->AutoSizeRows();
+ m_gridEnvironmentVariablesList->EnableDragRowSize( false );
+ m_gridEnvironmentVariablesList->SetRowLabelSize( 40 );
+ m_gridEnvironmentVariablesList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridEnvironmentVariablesList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ bSizerPage2->Add( m_gridEnvironmentVariablesList, 1, wxALL|wxEXPAND, 5 );
+
+ wxBoxSizer* bSizerButs;
+ bSizerButs = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonAddEV = new wxButton( m_wizPage2, wxID_ANY, _("Add Environment Variable"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButs->Add( m_buttonAddEV, 0, wxALL, 5 );
+
+ m_buttonRemoveEV = new wxButton( m_wizPage2, wxID_ANY, _("Remove Environment Variable"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizerButs->Add( m_buttonRemoveEV, 0, wxALL, 5 );
+
+
+ bSizerPage2->Add( bSizerButs, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_wizPage2->SetSizer( bSizerPage2 );
+ m_wizPage2->Layout();
+ bSizerPage2->Fit( m_wizPage2 );
+ wxWizardPageSimple* m_wizPage3 = new wxWizardPageSimple( this );
+ m_pages.Add( m_wizPage3 );
+
+ m_wizPage3->SetMinSize( wxSize( 450,-1 ) );
+
+ wxBoxSizer* bSizerPage3;
+ bSizerPage3 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer1;
+ sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_wizPage3, wxID_ANY, _("Options") ), wxVERTICAL );
+
+ wxFlexGridSizer* fgSizer1;
+ fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer1->AddGrowableCol( 1 );
+ fgSizer1->SetFlexibleDirection( wxBOTH );
+ fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ m_textPluginTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Plugin type:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textPluginTitle->Wrap( -1 );
+ fgSizer1->Add( m_textPluginTitle, 0, wxALL, 5 );
+
+ m_textPluginType = new wxStaticText( m_wizPage3, wxID_ANY, _("KiCad"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textPluginType->Wrap( -1 );
+ fgSizer1->Add( m_textPluginType, 1, wxALL, 5 );
+
+ m_textOptionTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Option:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textOptionTitle->Wrap( -1 );
+ fgSizer1->Add( m_textOptionTitle, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_textOption = new wxStaticText( m_wizPage3, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textOption->Wrap( -1 );
+ fgSizer1->Add( m_textOption, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_stPathTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Path:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_stPathTitle->Wrap( -1 );
+ fgSizer1->Add( m_stPathTitle, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+ m_textPath = new wxStaticText( m_wizPage3, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_textPath->Wrap( -1 );
+ fgSizer1->Add( m_textPath, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+ sbSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
+
+
+ bSizerPage3->Add( sbSizer1, 0, wxEXPAND|wxBOTTOM, 5 );
+
+ m_staticText2 = new wxStaticText( m_wizPage3, wxID_ANY, _("Library list to add in Fp table:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText2->Wrap( -1 );
+ bSizerPage3->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+ wxBoxSizer* bSizer6;
+ bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+ m_gridFpListLibs = new wxGrid( m_wizPage3, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+
+ // Grid
+ m_gridFpListLibs->CreateGrid( 0, 3 );
+ m_gridFpListLibs->EnableEditing( true );
+ m_gridFpListLibs->EnableGridLines( true );
+ m_gridFpListLibs->EnableDragGridSize( false );
+ m_gridFpListLibs->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridFpListLibs->EnableDragColMove( false );
+ m_gridFpListLibs->EnableDragColSize( true );
+ m_gridFpListLibs->SetColLabelSize( 30 );
+ m_gridFpListLibs->SetColLabelValue( 0, _("NickName") );
+ m_gridFpListLibs->SetColLabelValue( 1, _("Path") );
+ m_gridFpListLibs->SetColLabelValue( 2, _("Plugin") );
+ m_gridFpListLibs->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridFpListLibs->EnableDragRowSize( true );
+ m_gridFpListLibs->SetRowLabelSize( 30 );
+ m_gridFpListLibs->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridFpListLibs->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ bSizer6->Add( m_gridFpListLibs, 1, wxALL|wxEXPAND, 5 );
+
+
+ bSizerPage3->Add( bSizer6, 1, wxEXPAND, 5 );
+
+ wxBoxSizer* bSizer5;
+ bSizer5 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_buttonAddLib = new wxButton( m_wizPage3, wxID_ANY, _("Add FP Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer5->Add( m_buttonAddLib, 0, wxALL, 5 );
+
+ m_buttonRemoveLib = new wxButton( m_wizPage3, wxID_ANY, _("Remove FP Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer5->Add( m_buttonRemoveLib, 0, wxALL, 5 );
+
+
+ bSizerPage3->Add( bSizer5, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+ m_wizPage3->SetSizer( bSizerPage3 );
+ m_wizPage3->Layout();
+ bSizerPage3->Fit( m_wizPage3 );
+
+ this->Centre( wxBOTH );
+
+ for ( unsigned int i = 1; i < m_pages.GetCount(); i++ )
+ {
+ m_pages.Item( i )->SetPrev( m_pages.Item( i - 1 ) );
+ m_pages.Item( i - 1 )->SetNext( m_pages.Item( i ) );
+ }
+
+ // Connect Events
+ this->Connect( wxID_ANY, wxEVT_WIZARD_FINISHED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnFinish ) );
+ this->Connect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanged ) );
+ this->Connect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanging ) );
+ m_rbFpLibFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPluginSelection ), NULL, this );
+ m_rbPathManagement->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPathManagementSelection ), NULL, this );
+ m_gridEnvironmentVariablesList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectEnvVarCell ), NULL, this );
+ m_buttonAddEV->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddEVariable ), NULL, this );
+ m_buttonRemoveEV->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveEVariable ), NULL, this );
+ m_buttonAddLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddFpLibs ), NULL, this );
+ m_buttonRemoveLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveFpLibs ), NULL, this );
+}
+
+WIZARD_FPLIB_TABLE_BASE::~WIZARD_FPLIB_TABLE_BASE()
+{
+ // Disconnect Events
+ this->Disconnect( wxID_ANY, wxEVT_WIZARD_FINISHED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnFinish ) );
+ this->Disconnect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanged ) );
+ this->Disconnect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanging ) );
+ m_rbFpLibFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPluginSelection ), NULL, this );
+ m_rbPathManagement->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPathManagementSelection ), NULL, this );
+ m_gridEnvironmentVariablesList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectEnvVarCell ), NULL, this );
+ m_buttonAddEV->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddEVariable ), NULL, this );
+ m_buttonRemoveEV->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveEVariable ), NULL, this );
+ m_buttonAddLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddFpLibs ), NULL, this );
+ m_buttonRemoveLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveFpLibs ), NULL, this );
+
+ m_pages.Clear();
+}
+
+DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizerMain;
+ bSizerMain = new wxBoxSizer( wxVERTICAL );
+
+ m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("The footprint library is a folder.\nFootprints are files inside this folder."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
+ m_staticTextInfo->Wrap( -1 );
+ m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+ bSizerMain->Add( m_staticTextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+ m_dirCtrl = new wxGenericDirCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE|wxSUNKEN_BORDER, wxEmptyString, 0 );
+
+ m_dirCtrl->ShowHidden( false );
+ bSizerMain->Add( m_dirCtrl, 1, wxEXPAND | wxALL, 5 );
+
+ 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, wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizerMain );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnOKClick ), NULL, this );
+}
+
+DIALOG_SELECT_DIRLIST_BASE::~DIALOG_SELECT_DIRLIST_BASE()
+{
+ // Disconnect Events
+ m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnOKClick ), NULL, this );
+
+}
=== added file 'pcbnew/dialogs/wizard_add_fplib_base.fbp'
--- pcbnew/dialogs/wizard_add_fplib_base.fbp 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/wizard_add_fplib_base.fbp 2014-12-09 08:52:13 +0000
@@ -0,0 +1,2152 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+ <FileVersion major="1" minor="13" />
+ <object class="Project" expanded="1">
+ <property name="class_decoration"></property>
+ <property name="code_generation">C++</property>
+ <property name="disconnect_events">1</property>
+ <property name="disconnect_mode">source_name</property>
+ <property name="disconnect_php_events">0</property>
+ <property name="disconnect_python_events">0</property>
+ <property name="embedded_files_path">res</property>
+ <property name="encoding">UTF-8</property>
+ <property name="event_generation">connect</property>
+ <property name="file">wizard_add_fplib_base</property>
+ <property name="first_id">1000</property>
+ <property name="help_provider">none</property>
+ <property name="internationalize">1</property>
+ <property name="name">wizard_add_fplib_base</property>
+ <property name="namespace"></property>
+ <property name="path">.</property>
+ <property name="precompiled_header"></property>
+ <property name="relative_path">1</property>
+ <property name="skip_lua_events">1</property>
+ <property name="skip_php_events">1</property>
+ <property name="skip_python_events">1</property>
+ <property name="ui_table">UI</property>
+ <property name="use_enum">0</property>
+ <property name="use_microsoft_bom">0</property>
+ <object class="Wizard" expanded="1">
+ <property name="bg"></property>
+ <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size">450,-1</property>
+ <property name="name">WIZARD_FPLIB_TABLE_BASE</property>
+ <property name="pos"></property>
+ <property name="size">450,389</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+ <property name="subclass"></property>
+ <property name="title">Footprint Library Wizard</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <event name="OnWizardCancel"></event>
+ <event name="OnWizardFinished">OnFinish</event>
+ <event name="OnWizardHelp"></event>
+ <event name="OnWizardPageChanged">OnPageChanged</event>
+ <event name="OnWizardPageChanging">OnPageChanging</event>
+ <object class="WizardPageSimple" expanded="1">
+ <property name="bg"></property>
+ <property name="bitmap"></property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size">500,-1</property>
+ <property name="name">m_wizPage1</property>
+ <property name="permission">public</property>
+ <property name="pos"></property>
+ <property name="size"></property>
+ <property name="subclass"></property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxSUNKEN_BORDER</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerPage1</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxRadioBox" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="choices">"KiCad (*.Pretty folder containing .kicad_mod files)" "GitHub (.Pretty lib stored on GitHub depos)" "Legacy ( old *.mod lib file)" "Eagle V6 xml library file" "Geda footprint folder (folder containing *.fp files)"</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Library Format:</property>
+ <property name="majorDimension">1</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_rbFpLibFormat</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="selection">0</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxRA_SPECIFY_COLS</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRadioBox">OnPluginSelection</event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="WizardPageSimple" expanded="1">
+ <property name="bg"></property>
+ <property name="bitmap"></property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size">450,-1</property>
+ <property name="name">m_wizPage2</property>
+ <property name="permission">public</property>
+ <property name="pos"></property>
+ <property name="size"></property>
+ <property name="subclass"></property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxSUNKEN_BORDER</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size">-1,-1</property>
+ <property name="name">bSizerPage2</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxRadioBox" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="choices">"Use path relative to the project" "Use environment variable in path" "Use absolute path"</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Path management:</property>
+ <property name="majorDimension">1</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_rbPathManagement</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="selection">1</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxRA_SPECIFY_COLS</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRadioBox">OnPathManagementSelection</event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Environment variables:</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticText1</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxGrid" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="autosize_cols">1</property>
+ <property name="autosize_rows">1</property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="cell_bg"></property>
+ <property name="cell_font"></property>
+ <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
+ <property name="cell_text"></property>
+ <property name="cell_vert_alignment">wxALIGN_TOP</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="col_label_size">30</property>
+ <property name="col_label_values">"Environment Variable" "Path Segment"</property>
+ <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="cols">2</property>
+ <property name="column_sizes">125,154</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="drag_col_move">0</property>
+ <property name="drag_col_size">1</property>
+ <property name="drag_grid_size">0</property>
+ <property name="drag_row_size">0</property>
+ <property name="editing">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="grid_line_color"></property>
+ <property name="grid_lines">1</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label_bg"></property>
+ <property name="label_font"></property>
+ <property name="label_text"></property>
+ <property name="margin_height">0</property>
+ <property name="margin_width">0</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_gridEnvironmentVariablesList</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="row_label_size">40</property>
+ <property name="row_label_values"></property>
+ <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="row_sizes"></property>
+ <property name="rows">3</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnGridCellChange"></event>
+ <event name="OnGridCellLeftClick"></event>
+ <event name="OnGridCellLeftDClick"></event>
+ <event name="OnGridCellRightClick"></event>
+ <event name="OnGridCellRightDClick"></event>
+ <event name="OnGridCmdCellChange"></event>
+ <event name="OnGridCmdCellLeftClick"></event>
+ <event name="OnGridCmdCellLeftDClick"></event>
+ <event name="OnGridCmdCellRightClick"></event>
+ <event name="OnGridCmdCellRightDClick"></event>
+ <event name="OnGridCmdColSize"></event>
+ <event name="OnGridCmdEditorCreated"></event>
+ <event name="OnGridCmdEditorHidden"></event>
+ <event name="OnGridCmdEditorShown"></event>
+ <event name="OnGridCmdLabelLeftClick"></event>
+ <event name="OnGridCmdLabelLeftDClick"></event>
+ <event name="OnGridCmdLabelRightClick"></event>
+ <event name="OnGridCmdLabelRightDClick"></event>
+ <event name="OnGridCmdRangeSelect"></event>
+ <event name="OnGridCmdRowSize"></event>
+ <event name="OnGridCmdSelectCell"></event>
+ <event name="OnGridColSize"></event>
+ <event name="OnGridEditorCreated"></event>
+ <event name="OnGridEditorHidden"></event>
+ <event name="OnGridEditorShown"></event>
+ <event name="OnGridLabelLeftClick"></event>
+ <event name="OnGridLabelLeftDClick"></event>
+ <event name="OnGridLabelRightClick"></event>
+ <event name="OnGridLabelRightDClick"></event>
+ <event name="OnGridRangeSelect"></event>
+ <event name="OnGridRowSize"></event>
+ <event name="OnGridSelectCell">OnSelectEnvVarCell</event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerButs</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Add Environment Variable</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_buttonAddEV</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnAddEVariable</event>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Remove Environment Variable</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_buttonRemoveEV</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnRemoveEVariable</event>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="WizardPageSimple" expanded="1">
+ <property name="bg"></property>
+ <property name="bitmap"></property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size">450,-1</property>
+ <property name="name">m_wizPage3</property>
+ <property name="permission">public</property>
+ <property name="pos"></property>
+ <property name="size"></property>
+ <property name="subclass"></property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxSUNKEN_BORDER</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size">-1,-1</property>
+ <property name="name">bSizerPage3</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND|wxBOTTOM</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticBoxSizer" expanded="1">
+ <property name="id">wxID_ANY</property>
+ <property name="label">Options</property>
+ <property name="minimum_size"></property>
+ <property name="name">sbSizer1</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <event name="OnUpdateUI"></event>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxFlexGridSizer" expanded="1">
+ <property name="cols">2</property>
+ <property name="flexible_direction">wxBOTH</property>
+ <property name="growablecols">1</property>
+ <property name="growablerows"></property>
+ <property name="hgap">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">fgSizer1</property>
+ <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+ <property name="permission">none</property>
+ <property name="rows">0</property>
+ <property name="vgap">0</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Plugin type:</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_textPluginTitle</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">KiCad</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_textPluginType</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Option:</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_textOptionTitle</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+ <property name="proportion">1</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">dummy</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_textOption</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Path:</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_stPathTitle</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+ <property name="proportion">1</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">dummy</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_textPath</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Library list to add in Fp table:</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticText2</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer6</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxGrid" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="autosize_cols">0</property>
+ <property name="autosize_rows">0</property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="cell_bg"></property>
+ <property name="cell_font"></property>
+ <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
+ <property name="cell_text"></property>
+ <property name="cell_vert_alignment">wxALIGN_TOP</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="col_label_size">30</property>
+ <property name="col_label_values">"NickName" "Path" "Plugin"</property>
+ <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="cols">3</property>
+ <property name="column_sizes"></property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="drag_col_move">0</property>
+ <property name="drag_col_size">1</property>
+ <property name="drag_grid_size">0</property>
+ <property name="drag_row_size">1</property>
+ <property name="editing">1</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="grid_line_color"></property>
+ <property name="grid_lines">1</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label_bg"></property>
+ <property name="label_font"></property>
+ <property name="label_text"></property>
+ <property name="margin_height">0</property>
+ <property name="margin_width">0</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_gridFpListLibs</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
+ <property name="row_label_size">30</property>
+ <property name="row_label_values"></property>
+ <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="row_sizes"></property>
+ <property name="rows">0</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnGridCellChange"></event>
+ <event name="OnGridCellLeftClick"></event>
+ <event name="OnGridCellLeftDClick"></event>
+ <event name="OnGridCellRightClick"></event>
+ <event name="OnGridCellRightDClick"></event>
+ <event name="OnGridCmdCellChange"></event>
+ <event name="OnGridCmdCellLeftClick"></event>
+ <event name="OnGridCmdCellLeftDClick"></event>
+ <event name="OnGridCmdCellRightClick"></event>
+ <event name="OnGridCmdCellRightDClick"></event>
+ <event name="OnGridCmdColSize"></event>
+ <event name="OnGridCmdEditorCreated"></event>
+ <event name="OnGridCmdEditorHidden"></event>
+ <event name="OnGridCmdEditorShown"></event>
+ <event name="OnGridCmdLabelLeftClick"></event>
+ <event name="OnGridCmdLabelLeftDClick"></event>
+ <event name="OnGridCmdLabelRightClick"></event>
+ <event name="OnGridCmdLabelRightDClick"></event>
+ <event name="OnGridCmdRangeSelect"></event>
+ <event name="OnGridCmdRowSize"></event>
+ <event name="OnGridCmdSelectCell"></event>
+ <event name="OnGridColSize"></event>
+ <event name="OnGridEditorCreated"></event>
+ <event name="OnGridEditorHidden"></event>
+ <event name="OnGridEditorShown"></event>
+ <event name="OnGridLabelLeftClick"></event>
+ <event name="OnGridLabelLeftDClick"></event>
+ <event name="OnGridLabelRightClick"></event>
+ <event name="OnGridLabelRightDClick"></event>
+ <event name="OnGridRangeSelect"></event>
+ <event name="OnGridRowSize"></event>
+ <event name="OnGridSelectCell"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer5</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Add FP Libraries</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_buttonAddLib</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnAddFpLibs</event>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">Remove FP Libraries</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_buttonRemoveLib</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnButtonClick">OnRemoveFpLibs</event>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="Dialog" expanded="1">
+ <property name="aui_managed">0</property>
+ <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+ <property name="bg"></property>
+ <property name="center">wxBOTH</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="enabled">1</property>
+ <property name="event_handler">impl_virtual</property>
+ <property name="extra_style"></property>
+ <property name="fg"></property>
+ <property name="font"></property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">DIALOG_SELECT_DIRLIST_BASE</property>
+ <property name="pos"></property>
+ <property name="size">346,325</property>
+ <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+ <property name="subclass"></property>
+ <property name="title">Select Footprint Library Folder</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnActivate"></event>
+ <event name="OnActivateApp"></event>
+ <event name="OnAuiFindManager"></event>
+ <event name="OnAuiPaneButton"></event>
+ <event name="OnAuiPaneClose"></event>
+ <event name="OnAuiPaneMaximize"></event>
+ <event name="OnAuiPaneRestore"></event>
+ <event name="OnAuiRender"></event>
+ <event name="OnChar"></event>
+ <event name="OnClose"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnHibernate"></event>
+ <event name="OnIconize"></event>
+ <event name="OnIdle"></event>
+ <event name="OnInitDialog"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizerMain</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font">,90,92,-1,70,0</property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">The footprint library is a folder.
Footprints are files inside this folder.</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticTextInfo</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxALIGN_CENTRE</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxGenericDirCtrl" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="defaultfilter">0</property>
+ <property name="defaultfolder"></property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="filter"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_dirCtrl</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="show_hidden">0</property>
+ <property name="size"></property>
+ <property name="style">wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxSUNKEN_BORDER</property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnTreeBeginDrag"></event>
+ <event name="OnTreeBeginLabelEdit"></event>
+ <event name="OnTreeBeginRDrag"></event>
+ <event name="OnTreeDeleteItem"></event>
+ <event name="OnTreeEndDrag"></event>
+ <event name="OnTreeEndLabelEdit"></event>
+ <event name="OnTreeItemActivated"></event>
+ <event name="OnTreeItemCollapsed"></event>
+ <event name="OnTreeItemCollapsing"></event>
+ <event name="OnTreeItemExpanded"></event>
+ <event name="OnTreeItemExpanding"></event>
+ <event name="OnTreeItemMenu"></event>
+ <event name="OnTreeItemMiddleClick"></event>
+ <event name="OnTreeItemRightClick"></event>
+ <event name="OnTreeKeyDown"></event>
+ <event name="OnTreeSelChanged"></event>
+ <event name="OnTreeSelChanging"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticLine" expanded="1">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">m_staticline1</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style">wxLI_HORIZONTAL</property>
+ <property name="subclass"></property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxStdDialogButtonSizer" expanded="1">
+ <property name="Apply">0</property>
+ <property name="Cancel">1</property>
+ <property name="ContextHelp">0</property>
+ <property name="Help">0</property>
+ <property name="No">0</property>
+ <property name="OK">1</property>
+ <property name="Save">0</property>
+ <property name="Yes">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">m_sdbSizer</property>
+ <property name="permission">protected</property>
+ <event name="OnApplyButtonClick"></event>
+ <event name="OnCancelButtonClick">OnCancelClick</event>
+ <event name="OnContextHelpButtonClick"></event>
+ <event name="OnHelpButtonClick"></event>
+ <event name="OnNoButtonClick"></event>
+ <event name="OnOKButtonClick">OnOKClick</event>
+ <event name="OnSaveButtonClick"></event>
+ <event name="OnYesButtonClick"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</wxFormBuilder_Project>
=== added file 'pcbnew/dialogs/wizard_add_fplib_base.h'
--- pcbnew/dialogs/wizard_add_fplib_base.h 1970-01-01 00:00:00 +0000
+++ pcbnew/dialogs/wizard_add_fplib_base.h 2014-12-09 08:52:23 +0000
@@ -0,0 +1,111 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Jun 5 2014)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __WIZARD_ADD_FPLIB_BASE_H__
+#define __WIZARD_ADD_FPLIB_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+#include <wx/string.h>
+#include <wx/radiobox.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/stattext.h>
+#include <wx/grid.h>
+#include <wx/button.h>
+#include <wx/statbox.h>
+#include <wx/wizard.h>
+#include <wx/dynarray.h>
+WX_DEFINE_ARRAY_PTR( wxWizardPageSimple*, WizardPages );
+#include <wx/dirctrl.h>
+#include <wx/statline.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class WIZARD_FPLIB_TABLE_BASE
+///////////////////////////////////////////////////////////////////////////////
+class WIZARD_FPLIB_TABLE_BASE : public wxWizard
+{
+ private:
+
+ protected:
+ wxRadioBox* m_rbFpLibFormat;
+ wxRadioBox* m_rbPathManagement;
+ wxStaticText* m_staticText1;
+ wxGrid* m_gridEnvironmentVariablesList;
+ wxButton* m_buttonAddEV;
+ wxButton* m_buttonRemoveEV;
+ wxStaticText* m_textPluginTitle;
+ wxStaticText* m_textPluginType;
+ wxStaticText* m_textOptionTitle;
+ wxStaticText* m_textOption;
+ wxStaticText* m_stPathTitle;
+ wxStaticText* m_textPath;
+ wxStaticText* m_staticText2;
+ wxGrid* m_gridFpListLibs;
+ wxButton* m_buttonAddLib;
+ wxButton* m_buttonRemoveLib;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnFinish( wxWizardEvent& event ) { event.Skip(); }
+ virtual void OnPageChanged( wxWizardEvent& event ) { event.Skip(); }
+ virtual void OnPageChanging( wxWizardEvent& event ) { event.Skip(); }
+ virtual void OnPluginSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnPathManagementSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSelectEnvVarCell( wxGridEvent& event ) { event.Skip(); }
+ virtual void OnAddEVariable( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveEVariable( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAddFpLibs( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnRemoveFpLibs( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Library Wizard"), const wxBitmap& bitmap = wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ), const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ WizardPages m_pages;
+ ~WIZARD_FPLIB_TABLE_BASE();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DIALOG_SELECT_DIRLIST_BASE
+///////////////////////////////////////////////////////////////////////////////
+class DIALOG_SELECT_DIRLIST_BASE : public wxDialog
+{
+ private:
+
+ protected:
+ wxStaticText* m_staticTextInfo;
+ wxGenericDirCtrl* m_dirCtrl;
+ wxStaticLine* m_staticline1;
+ wxStdDialogButtonSizer* m_sdbSizer;
+ wxButton* m_sdbSizerOK;
+ wxButton* m_sdbSizerCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Footprint Library Folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 346,325 ), long style = wxDEFAULT_DIALOG_STYLE );
+ ~DIALOG_SELECT_DIRLIST_BASE();
+
+};
+
+#endif //__WIZARD_ADD_FPLIB_BASE_H__
=== added directory 'webviewer'
=== added file 'webviewer/webviewer.cpp'
--- webviewer/webviewer.cpp 1970-01-01 00:00:00 +0000
+++ webviewer/webviewer.cpp 2014-12-11 11:33:07 +0000
@@ -0,0 +1,1096 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name: webview.cpp
+// Purpose: wxWebView sample
+// Author: Marianne Gagnon
+// Copyright: (c) 2010 Marianne Gagnon, Steven Lamerton
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/*
+ * This code comes from wxWebView sample webview.cpp and is modified to be used in Kicad
+ * add runs in a dialog to allows an user to select a list of URLs which are .pretty library
+ * folder accessible from http or https using the Github plugin.
+ *
+ * The Wen viewer just return a list of URLs selected from the context menu (command copy link)
+ * when mouse cursor in on a http link.
+ * URLs strings are filtered
+ * Only URLs starting by "http" and ending by ".pretty" can be currently selected and stored in fp lib list
+ */
+
+#include "wx/wx.h"
+
+#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_IE
+#error "A wxWebView backend is required by this sample"
+#endif
+
+#include "wx/artprov.h"
+#include "wx/cmdline.h"
+#include "wx/notifmsg.h"
+#include "wx/settings.h"
+#include "wx/webview.h"
+#include "wx/webviewarchivehandler.h"
+#include "wx/webviewfshandler.h"
+#include "wx/infobar.h"
+#include "wx/filesys.h"
+#include "wx/fs_arc.h"
+#include <wx/clipbrd.h>
+
+#if wxUSE_STC
+#include "wx/stc/stc.h"
+#else
+#error "wxStyledTextControl is needed by this sample"
+#endif
+
+
+// We map menu items to their history items
+WX_DECLARE_HASH_MAP( int, wxSharedPtr<wxWebViewHistoryItem>,
+ wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap );
+
+
+class WEB_NAVIGATOR : public wxDialog
+{
+ wxArrayString* urlListSelection;
+
+public:
+ WEB_NAVIGATOR( wxWindow* aParent,
+ const wxString& aUrlOnStart,
+ wxArrayString* aUrlListSelection = NULL );
+ virtual ~WEB_NAVIGATOR();
+
+private:
+ void UpdateState();
+ void OnIdle( wxIdleEvent& evt );
+ void OnUrl( wxCommandEvent& evt );
+ void OnBack( wxCommandEvent& evt );
+ void OnForward( wxCommandEvent& evt );
+ void OnStop( wxCommandEvent& evt );
+ void OnReload( wxCommandEvent& evt );
+ void OnClearHistory( wxCommandEvent& evt );
+ void OnEnableHistory( wxCommandEvent& evt );
+ void OnNavigationRequest( wxWebViewEvent& evt );
+ void OnNavigationComplete( wxWebViewEvent& evt );
+ void OnDocumentLoaded( wxWebViewEvent& evt );
+ void OnNewWindow( wxWebViewEvent& evt );
+ void OnTitleChanged( wxWebViewEvent& evt );
+ void OnViewSourceRequest( wxCommandEvent& evt );
+ void OnViewTextRequest( wxCommandEvent& evt );
+ void OnToolsClicked( wxCommandEvent& evt );
+ void OnSetZoom( wxCommandEvent& evt );
+ void OnError( wxWebViewEvent& evt );
+ void OnPrint( wxCommandEvent& evt );
+ void OnCut( wxCommandEvent& evt );
+ void OnCopy( wxCommandEvent& evt );
+ void OnPaste( wxCommandEvent& evt );
+ void OnUndo( wxCommandEvent& evt );
+ void OnRedo( wxCommandEvent& evt );
+ void OnMode( wxCommandEvent& evt );
+ void OnZoomLayout( wxCommandEvent& evt );
+ void OnHistory( wxCommandEvent& evt );
+
+ void OnScrollLineUp( wxCommandEvent& ) { m_browser->LineUp(); }
+ void OnScrollLineDown( wxCommandEvent& ) { m_browser->LineDown(); }
+ void OnScrollPageUp( wxCommandEvent& ) { m_browser->PageUp(); }
+ void OnScrollPageDown( wxCommandEvent& ) { m_browser->PageDown(); }
+ void OnRunScript( wxCommandEvent& evt );
+ void OnClearSelection( wxCommandEvent& evt );
+ void OnDeleteSelection( wxCommandEvent& evt );
+ void OnSelectAll( wxCommandEvent& evt );
+ void OnFind( wxCommandEvent& evt );
+ void OnFindDone( wxCommandEvent& evt );
+ void OnFindText( wxCommandEvent& evt );
+ void OnFindOptions( wxCommandEvent& evt );
+ void OnEnableContextMenu( wxCommandEvent& evt );
+
+ // only for fp lib wizard called if there is a non null
+ // aUrlListSelection from idle event, to see if a valid
+ // footprint lib was selected by user, from the context menu
+ // (command copy link)
+ void TestAndStoreFootprintLibLink();
+
+private:
+ wxTextCtrl* m_url;
+ wxWebView* m_browser;
+
+ wxToolBar* m_toolbar;
+ wxToolBarToolBase* m_toolbar_back;
+ wxToolBarToolBase* m_toolbar_forward;
+ wxToolBarToolBase* m_toolbar_stop;
+ wxToolBarToolBase* m_toolbar_reload;
+ wxToolBarToolBase* m_toolbar_tools;
+
+ wxToolBarToolBase* m_find_toolbar_done;
+ wxToolBarToolBase* m_find_toolbar_next;
+ wxToolBarToolBase* m_find_toolbar_previous;
+ wxToolBarToolBase* m_find_toolbar_options;
+ wxMenuItem* m_find_toolbar_wrap;
+ wxMenuItem* m_find_toolbar_highlight;
+ wxMenuItem* m_find_toolbar_matchcase;
+ wxMenuItem* m_find_toolbar_wholeword;
+
+ wxMenu* m_tools_menu;
+ wxMenu* m_tools_history_menu;
+ wxMenuItem* m_tools_layout;
+ wxMenuItem* m_tools_tiny;
+ wxMenuItem* m_tools_small;
+ wxMenuItem* m_tools_medium;
+ wxMenuItem* m_tools_large;
+ wxMenuItem* m_tools_largest;
+ wxMenuItem* m_tools_handle_navigation;
+ wxMenuItem* m_tools_handle_new_window;
+ wxMenuItem* m_tools_enable_history;
+ wxMenuItem* m_edit_cut;
+ wxMenuItem* m_edit_copy;
+ wxMenuItem* m_edit_paste;
+ wxMenuItem* m_edit_undo;
+ wxMenuItem* m_edit_redo;
+ wxMenuItem* m_edit_mode;
+ wxMenuItem* m_scroll_line_up;
+ wxMenuItem* m_scroll_line_down;
+ wxMenuItem* m_scroll_page_up;
+ wxMenuItem* m_scroll_page_down;
+ wxMenuItem* m_selection_clear;
+ wxMenuItem* m_selection_delete;
+ wxMenuItem* m_find;
+ wxMenuItem* m_context_menu;
+
+ wxInfoBar* m_info;
+ wxStaticText* m_info_text;
+ wxTextCtrl* m_find_ctrl;
+ wxToolBar* m_find_toolbar;
+
+ wxMenuHistoryMap m_histMenuItems;
+ wxString m_findText;
+ int m_findFlags, m_findCount;
+};
+
+class SourceViewDialog : public wxDialog
+{
+public:
+ SourceViewDialog( wxWindow* parent, wxString source );
+};
+
+// Helper function to run the web viewer from an other dialog or frame:
+int RunWebViewer( wxWindow* aParent, const wxString& aUrlOnStart, wxArrayString* aUrlListSelection )
+{
+ WEB_NAVIGATOR dlg( aParent, aUrlOnStart, aUrlListSelection );
+
+ return dlg.ShowModal();
+}
+
+
+WEB_NAVIGATOR::WEB_NAVIGATOR( wxWindow* aParent,
+ const wxString& aUrlOnStart,
+ wxArrayString* aUrlListSelection ) :
+ wxDialog( aParent, wxID_ANY, "Web Viewer", wxDefaultPosition, wxDefaultSize,
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
+{
+ urlListSelection = aUrlListSelection;
+
+ // To collect URLs, the Web Viewer uses the clipboard.
+ // Clear it before running the viewer
+ // For an unknown reason, wxTheClipboard->Clear() does not work,
+ // so use a trick
+ if( wxTheClipboard->Open() )
+ {
+ wxTheClipboard->SetData( new wxTextDataObject( "" ) );
+ wxTheClipboard->Close();
+ }
+
+ wxBoxSizer* topsizer = new wxBoxSizer( wxVERTICAL );
+
+ // Create the toolbar
+ m_toolbar = new wxToolBar( this, wxID_ANY ); // CreateToolBar(wxTB_TEXT);
+ m_toolbar->SetToolBitmapSize( wxSize( 32, 32 ) );
+ topsizer->Add( m_toolbar );
+
+ wxBitmap back = wxArtProvider::GetBitmap( wxART_GO_BACK, wxART_TOOLBAR );
+ wxBitmap forward = wxArtProvider::GetBitmap( wxART_GO_FORWARD, wxART_TOOLBAR );
+ wxBitmap stop = wxArtProvider::GetBitmap( wxART_ERROR, wxART_TOOLBAR );
+ wxBitmap refresh = wxArtProvider::GetBitmap( wxART_REDO, wxART_TOOLBAR );
+ wxBitmap logo = wxArtProvider::GetBitmap( wxART_HELP_FOLDER, wxART_TOOLBAR );
+
+
+ m_toolbar_back = m_toolbar->AddTool( wxID_ANY, _( "Back" ), back );
+ m_toolbar_forward = m_toolbar->AddTool( wxID_ANY, _( "Forward" ), forward );
+ m_toolbar_stop = m_toolbar->AddTool( wxID_ANY, _( "Stop" ), stop );
+ m_toolbar_reload = m_toolbar->AddTool( wxID_ANY, _( "Reload" ), refresh );
+ m_url = new wxTextCtrl( m_toolbar, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 400,
+ -1 ), wxTE_PROCESS_ENTER );
+ m_toolbar->AddControl( m_url, _( "URL" ) );
+ m_toolbar_tools = m_toolbar->AddTool( wxID_ANY, _( "Menu" ), logo );
+
+ m_toolbar->Realize();
+
+ // Set find values.
+ m_findFlags = wxWEBVIEW_FIND_DEFAULT;
+ m_findText = wxEmptyString;
+ m_findCount = 0;
+
+ // Create panel for find toolbar.
+ wxPanel* panel = new wxPanel( this );
+ topsizer->Add( panel, wxSizerFlags().Expand() );
+
+ // Create sizer for panel.
+ wxBoxSizer* panel_sizer = new wxBoxSizer( wxVERTICAL );
+ panel->SetSizer( panel_sizer );
+
+ // Create the find toolbar.
+ m_find_toolbar = new wxToolBar( panel,
+ wxID_ANY,
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxTB_HORIZONTAL | wxTB_TEXT | wxTB_HORZ_LAYOUT );
+ m_find_toolbar->Hide();
+ panel_sizer->Add( m_find_toolbar, wxSizerFlags().Expand() );
+
+ // Create find control.
+ m_find_ctrl = new wxTextCtrl( m_find_toolbar,
+ wxID_ANY,
+ wxEmptyString,
+ wxDefaultPosition,
+ wxSize( 140, -1 ),
+ wxTE_PROCESS_ENTER );
+
+
+ // Find options menu
+ wxMenu* findmenu = new wxMenu;
+ m_find_toolbar_wrap = findmenu->AppendCheckItem( wxID_ANY, "Wrap" );
+ m_find_toolbar_matchcase = findmenu->AppendCheckItem( wxID_ANY, "Match Case" );
+ m_find_toolbar_wholeword = findmenu->AppendCheckItem( wxID_ANY, "Entire Word" );
+ m_find_toolbar_highlight = findmenu->AppendCheckItem( wxID_ANY, "Highlight" );
+ // Add find toolbar tools.
+ m_find_toolbar->SetToolSeparation( 7 );
+ m_find_toolbar_done =
+ m_find_toolbar->AddTool( wxID_ANY, "Close", wxArtProvider::GetBitmap( wxART_CROSS_MARK ) );
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar->AddControl( m_find_ctrl, "Find" );
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar_next =
+ m_find_toolbar->AddTool( wxID_ANY, "Next",
+ wxArtProvider::GetBitmap( wxART_GO_DOWN, wxART_TOOLBAR, wxSize( 16, 16 ) ) );
+ m_find_toolbar_previous = m_find_toolbar->AddTool( wxID_ANY, "Previous", wxArtProvider::GetBitmap(
+ wxART_GO_UP, wxART_TOOLBAR, wxSize( 16,
+ 16 ) ) );
+ m_find_toolbar->AddSeparator();
+ m_find_toolbar_options =
+ m_find_toolbar->AddTool( wxID_ANY, "Options",
+ wxArtProvider::GetBitmap( wxART_PLUS, wxART_TOOLBAR, wxSize( 16,
+ 16 ) ), "", wxITEM_DROPDOWN );
+ m_find_toolbar_options->SetDropdownMenu( findmenu );
+ m_find_toolbar->Realize();
+
+ // Create the info panel
+ m_info = new wxInfoBar( this );
+ topsizer->Add( m_info, wxSizerFlags().Expand() );
+
+ // Create the webview
+ if( aUrlOnStart.IsEmpty() )
+ m_browser = wxWebView::New( this, wxID_ANY );
+ else
+ m_browser = wxWebView::New( this, wxID_ANY, aUrlOnStart );
+
+ topsizer->Add( m_browser, wxSizerFlags().Expand().Proportion( 1 ) );
+
+ SetSizer( topsizer );
+
+ // Set a more sensible size for web browsing
+ SetSize( wxSize( 800, 600 ) );
+
+ // Create the Tools menu
+ m_tools_menu = new wxMenu();
+ wxMenuItem* print = m_tools_menu->Append( wxID_ANY, _( "Print" ) );
+ wxMenuItem* viewSource = m_tools_menu->Append( wxID_ANY, _( "View Source" ) );
+ wxMenuItem* viewText = m_tools_menu->Append( wxID_ANY, _( "View Text" ) );
+ m_tools_menu->AppendSeparator();
+ m_tools_layout = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Use Layout Zoom" ) );
+ m_tools_tiny = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Tiny" ) );
+ m_tools_small = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Small" ) );
+ m_tools_medium = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Medium" ) );
+ m_tools_large = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Large" ) );
+ m_tools_largest = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Largest" ) );
+ m_tools_menu->AppendSeparator();
+ m_tools_handle_navigation =
+ m_tools_menu->AppendCheckItem( wxID_ANY, _( "Handle Navigation" ) );
+ m_tools_handle_new_window =
+ m_tools_menu->AppendCheckItem( wxID_ANY, _( "Handle New Windows" ) );
+ m_tools_menu->AppendSeparator();
+
+ // Find
+ m_find = m_tools_menu->Append( wxID_ANY, _( "Find" ) );
+ m_tools_menu->AppendSeparator();
+
+ // History menu
+ m_tools_history_menu = new wxMenu();
+ wxMenuItem* clearhist = m_tools_history_menu->Append( wxID_ANY, _( "Clear History" ) );
+ m_tools_enable_history =
+ m_tools_history_menu->AppendCheckItem( wxID_ANY, _( "Enable History" ) );
+ m_tools_history_menu->AppendSeparator();
+
+ m_tools_menu->AppendSubMenu( m_tools_history_menu, "History" );
+
+ // Create an editing menu
+ wxMenu* editmenu = new wxMenu();
+ m_edit_cut = editmenu->Append( wxID_ANY, _( "Cut" ) );
+ m_edit_copy = editmenu->Append( wxID_ANY, _( "Copy" ) );
+ m_edit_paste = editmenu->Append( wxID_ANY, _( "Paste" ) );
+ editmenu->AppendSeparator();
+ m_edit_undo = editmenu->Append( wxID_ANY, _( "Undo" ) );
+ m_edit_redo = editmenu->Append( wxID_ANY, _( "Redo" ) );
+ editmenu->AppendSeparator();
+ m_edit_mode = editmenu->AppendCheckItem( wxID_ANY, _( "Edit Mode" ) );
+
+ m_tools_menu->AppendSeparator();
+ m_tools_menu->AppendSubMenu( editmenu, "Edit" );
+
+ wxMenu* scroll_menu = new wxMenu;
+ m_scroll_line_up = scroll_menu->Append( wxID_ANY, "Line &up" );
+ m_scroll_line_down = scroll_menu->Append( wxID_ANY, "Line &down" );
+ m_scroll_page_up = scroll_menu->Append( wxID_ANY, "Page u&p" );
+ m_scroll_page_down = scroll_menu->Append( wxID_ANY, "Page d&own" );
+ m_tools_menu->AppendSubMenu( scroll_menu, "Scroll" );
+
+ wxMenuItem* script = m_tools_menu->Append( wxID_ANY, _( "Run Script" ) );
+
+ // Selection menu
+ wxMenu* selection = new wxMenu();
+ m_selection_clear = selection->Append( wxID_ANY, _( "Clear Selection" ) );
+ m_selection_delete = selection->Append( wxID_ANY, _( "Delete Selection" ) );
+ wxMenuItem* selectall = selection->Append( wxID_ANY, _( "Select All" ) );
+
+ editmenu->AppendSubMenu( selection, "Selection" );
+
+ m_context_menu = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Enable Context Menu" ) );
+
+ // By default we want to handle navigation and new windows
+ m_tools_handle_navigation->Check();
+ m_tools_handle_new_window->Check();
+ m_tools_enable_history->Check();
+
+ if( !m_browser->CanSetZoomType( wxWEBVIEW_ZOOM_TYPE_LAYOUT ) )
+ m_tools_layout->Enable( false );
+
+
+ // Connect the toolbar events
+ Connect( m_toolbar_back->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnBack ), NULL, this );
+ Connect( m_toolbar_forward->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnForward ), NULL, this );
+ Connect( m_toolbar_stop->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnStop ), NULL, this );
+ Connect( m_toolbar_reload->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnReload ), NULL, this );
+ Connect( m_toolbar_tools->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnToolsClicked ), NULL, this );
+
+ Connect( m_url->GetId(), wxEVT_TEXT_ENTER,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnUrl ), NULL, this );
+
+ // Connect find toolbar events.
+ Connect( m_find_toolbar_done->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFindDone ), NULL, this );
+ Connect( m_find_toolbar_next->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
+ Connect( m_find_toolbar_previous->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
+
+ // Connect find control events.
+ Connect( m_find_ctrl->GetId(), wxEVT_TEXT,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
+ Connect( m_find_ctrl->GetId(), wxEVT_TEXT_ENTER,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
+
+ // Connect the webview events
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATING,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnNavigationRequest ), NULL, this );
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATED,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnNavigationComplete ), NULL, this );
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_LOADED,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnDocumentLoaded ), NULL, this );
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_ERROR,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnError ), NULL, this );
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_NEWWINDOW,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnNewWindow ), NULL, this );
+ Connect( m_browser->GetId(), wxEVT_WEBVIEW_TITLE_CHANGED,
+ wxWebViewEventHandler( WEB_NAVIGATOR::OnTitleChanged ), NULL, this );
+
+ // Connect the menu events
+ Connect( viewSource->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnViewSourceRequest ), NULL, this );
+ Connect( viewText->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnViewTextRequest ), NULL, this );
+ Connect( print->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnPrint ), NULL, this );
+ Connect( m_tools_layout->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnZoomLayout ), NULL, this );
+ Connect( m_tools_tiny->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
+ Connect( m_tools_small->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
+ Connect( m_tools_medium->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
+ Connect( m_tools_large->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
+ Connect( m_tools_largest->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
+ Connect( clearhist->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnClearHistory ), NULL, this );
+ Connect( m_tools_enable_history->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnEnableHistory ), NULL, this );
+ Connect( m_edit_cut->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnCut ), NULL, this );
+ Connect( m_edit_copy->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnCopy ), NULL, this );
+ Connect( m_edit_paste->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnPaste ), NULL, this );
+ Connect( m_edit_undo->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnUndo ), NULL, this );
+ Connect( m_edit_redo->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnRedo ), NULL, this );
+ Connect( m_edit_mode->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnMode ), NULL, this );
+ Connect( m_scroll_line_up->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnScrollLineUp ), NULL, this );
+ Connect( m_scroll_line_down->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnScrollLineDown ), NULL, this );
+ Connect( m_scroll_page_up->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnScrollPageUp ), NULL, this );
+ Connect( m_scroll_page_down->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnScrollPageDown ), NULL, this );
+ Connect( script->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnRunScript ), NULL, this );
+ Connect( m_selection_clear->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnClearSelection ), NULL, this );
+ Connect( m_selection_delete->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnDeleteSelection ), NULL, this );
+ Connect( selectall->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnSelectAll ), NULL, this );
+ Connect( m_find->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnFind ), NULL, this );
+ Connect( m_context_menu->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnEnableContextMenu ), NULL, this );
+
+ // Connect the idle events
+ Connect( wxID_ANY, wxEVT_IDLE, wxIdleEventHandler( WEB_NAVIGATOR::OnIdle ), NULL, this );
+}
+
+
+WEB_NAVIGATOR::~WEB_NAVIGATOR()
+{
+ delete m_tools_menu;
+}
+
+
+/**
+ * Method that retrieves the current state from the web control and updates the GUI
+ * the reflect this current state.
+ */
+void WEB_NAVIGATOR::UpdateState()
+{
+ m_toolbar->EnableTool( m_toolbar_back->GetId(), m_browser->CanGoBack() );
+ m_toolbar->EnableTool( m_toolbar_forward->GetId(), m_browser->CanGoForward() );
+
+ if( m_browser->IsBusy() )
+ {
+ m_toolbar->EnableTool( m_toolbar_stop->GetId(), true );
+ }
+ else
+ {
+ m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
+ }
+
+ SetTitle( m_browser->GetCurrentTitle() );
+ m_url->SetValue( m_browser->GetCurrentURL() );
+}
+
+
+void WEB_NAVIGATOR::OnIdle( wxIdleEvent& WXUNUSED( evt ) )
+{
+ if( m_browser->IsBusy() )
+ {
+ wxSetCursor( wxCURSOR_ARROWWAIT );
+ m_toolbar->EnableTool( m_toolbar_stop->GetId(), true );
+ }
+ else
+ {
+ wxSetCursor( wxNullCursor );
+ m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
+
+ if( urlListSelection )
+ TestAndStoreFootprintLibLink();
+ }
+}
+
+
+// only for fp lib wizard called if there is a non null
+// aUrlListSelection from idle event, to see if a valid
+// footprint lib was selected by user, from the context menu
+// (command copy link)
+void WEB_NAVIGATOR::TestAndStoreFootprintLibLink()
+{
+ if( !urlListSelection )
+ return;
+
+ if( wxTheClipboard->Open() )
+ {
+ if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
+ {
+ wxTextDataObject data;
+
+ if( wxTheClipboard->GetData( data ) )
+ {
+ // A valid text data is found
+ const wxString& text = data.GetText();
+
+ // Be sure it is a valid data for us, i.e. a valid
+ // kicad url
+ bool validURL = text.Length() > 12
+ && text.StartsWith( "http" )
+ && text.EndsWith( ".pretty" );
+
+ if( validURL )
+ {
+ urlListSelection->Add( text );
+ wxTheClipboard->SetData( new wxTextDataObject( wxEmptyString ) );
+ }
+ }
+
+ wxTheClipboard->Close();
+ }
+ }
+}
+
+
+/**
+ * Callback invoked when user entered an URL and pressed enter
+ */
+void WEB_NAVIGATOR::OnUrl( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->LoadURL( m_url->GetValue() );
+ m_browser->SetFocus();
+ UpdateState();
+}
+
+
+/**
+ * Callback invoked when user pressed the "back" button
+ */
+void WEB_NAVIGATOR::OnBack( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->GoBack();
+ UpdateState();
+}
+
+
+/**
+ * Callback invoked when user pressed the "forward" button
+ */
+void WEB_NAVIGATOR::OnForward( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->GoForward();
+ UpdateState();
+}
+
+
+/**
+ * Callback invoked when user pressed the "stop" button
+ */
+void WEB_NAVIGATOR::OnStop( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Stop();
+ UpdateState();
+}
+
+
+/**
+ * Callback invoked when user pressed the "reload" button
+ */
+void WEB_NAVIGATOR::OnReload( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Reload();
+ UpdateState();
+}
+
+
+void WEB_NAVIGATOR::OnClearHistory( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->ClearHistory();
+ UpdateState();
+}
+
+
+void WEB_NAVIGATOR::OnEnableHistory( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->EnableHistory( m_tools_enable_history->IsChecked() );
+ UpdateState();
+}
+
+
+void WEB_NAVIGATOR::OnCut( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Cut();
+}
+
+
+void WEB_NAVIGATOR::OnCopy( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Copy();
+}
+
+
+void WEB_NAVIGATOR::OnPaste( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Paste();
+}
+
+
+void WEB_NAVIGATOR::OnUndo( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Undo();
+}
+
+
+void WEB_NAVIGATOR::OnRedo( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Redo();
+}
+
+
+void WEB_NAVIGATOR::OnMode( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->SetEditable( m_edit_mode->IsChecked() );
+}
+
+
+void WEB_NAVIGATOR::OnEnableContextMenu( wxCommandEvent& evt )
+{
+ m_browser->EnableContextMenu( evt.IsChecked() );
+}
+
+
+void WEB_NAVIGATOR::OnFind( wxCommandEvent& WXUNUSED( evt ) )
+{
+ wxString value = m_browser->GetSelectedText();
+
+ if( value.Len() > 150 )
+ {
+ value.Truncate( 150 );
+ }
+
+ m_find_ctrl->SetValue( value );
+
+ if( !m_find_toolbar->IsShown() )
+ {
+ m_find_toolbar->Show( true );
+ SendSizeEvent();
+ }
+
+ m_find_ctrl->SelectAll();
+}
+
+
+void WEB_NAVIGATOR::OnFindDone( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Find( "" );
+ m_find_toolbar->Show( false );
+ SendSizeEvent();
+}
+
+
+void WEB_NAVIGATOR::OnFindText( wxCommandEvent& evt )
+{
+ int flags = 0;
+
+ if( m_find_toolbar_wrap->IsChecked() )
+ flags |= wxWEBVIEW_FIND_WRAP;
+
+ if( m_find_toolbar_wholeword->IsChecked() )
+ flags |= wxWEBVIEW_FIND_ENTIRE_WORD;
+
+ if( m_find_toolbar_matchcase->IsChecked() )
+ flags |= wxWEBVIEW_FIND_MATCH_CASE;
+
+ if( m_find_toolbar_highlight->IsChecked() )
+ flags |= wxWEBVIEW_FIND_HIGHLIGHT_RESULT;
+
+ if( m_find_toolbar_previous->GetId() == evt.GetId() )
+ flags |= wxWEBVIEW_FIND_BACKWARDS;
+
+ wxString find_text = m_find_ctrl->GetValue();
+ long count = m_browser->Find( find_text, flags );
+
+ if( m_findText != find_text )
+ {
+ m_findCount = count;
+ m_findText = find_text;
+ }
+
+ if( count != wxNOT_FOUND || find_text.IsEmpty() )
+ {
+ m_find_ctrl->SetBackgroundColour( *wxWHITE );
+ }
+ else
+ {
+ m_find_ctrl->SetBackgroundColour( wxColour( 255, 101, 101 ) );
+ }
+
+ m_find_ctrl->Refresh();
+
+ // Log the result, note that count is zero indexed.
+ if( count != m_findCount )
+ {
+ count++;
+ }
+
+// wxLogMessage("Searching for:%s current match:%i/%i", m_findText.c_str(), count, m_findCount);
+}
+
+
+/**
+ * Callback invoked when there is a request to load a new page (for instance
+ * when the user clicks a link)
+ */
+void WEB_NAVIGATOR::OnNavigationRequest( wxWebViewEvent& evt )
+{
+ if( m_info->IsShown() )
+ {
+ m_info->Dismiss();
+ }
+
+ wxASSERT( m_browser->IsBusy() );
+
+ // If we don't want to handle navigation then veto the event and navigation
+ // will not take place, we also need to stop the loading animation
+ if( !m_tools_handle_navigation->IsChecked() )
+ {
+ evt.Veto();
+ m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
+ }
+ else
+ {
+ UpdateState();
+ }
+}
+
+
+/**
+ * Callback invoked when a navigation request was accepted
+ */
+void WEB_NAVIGATOR::OnNavigationComplete( wxWebViewEvent& evt )
+{
+ UpdateState();
+}
+
+
+/**
+ * Callback invoked when a page is finished loading
+ */
+void WEB_NAVIGATOR::OnDocumentLoaded( wxWebViewEvent& evt )
+{
+ // Only notify if the document is the main frame, not a subframe
+ if( evt.GetURL() == m_browser->GetCurrentURL() )
+ {
+// wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'");
+ }
+
+ UpdateState();
+}
+
+
+/**
+ * On new window, we veto to stop extra windows appearing
+ */
+void WEB_NAVIGATOR::OnNewWindow( wxWebViewEvent& evt )
+{
+ // If we handle new window events then just load them in this window as we
+ // are a single window browser
+ if( m_tools_handle_new_window->IsChecked() )
+ m_browser->LoadURL( evt.GetURL() );
+
+ UpdateState();
+}
+
+
+void WEB_NAVIGATOR::OnTitleChanged( wxWebViewEvent& evt )
+{
+ SetTitle( evt.GetString() );
+}
+
+
+/**
+ * Invoked when user selects the "View Source" menu item
+ */
+void WEB_NAVIGATOR::OnViewSourceRequest( wxCommandEvent& WXUNUSED( evt ) )
+{
+ SourceViewDialog dlg( this, m_browser->GetPageSource() );
+
+ dlg.ShowModal();
+}
+
+
+/**
+ * Invoked when user selects the "View Text" menu item
+ */
+void WEB_NAVIGATOR::OnViewTextRequest( wxCommandEvent& WXUNUSED( evt ) )
+{
+ wxDialog textViewDialog( this, wxID_ANY, "Page Text",
+ wxDefaultPosition, wxSize( 700, 500 ),
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER );
+ wxStyledTextCtrl* text = new wxStyledTextCtrl( &textViewDialog, wxID_ANY );
+
+ text->SetText( m_browser->GetPageText() );
+ wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
+ sizer->Add( text, 1, wxEXPAND );
+ SetSizer( sizer );
+ textViewDialog.ShowModal();
+}
+
+
+/**
+ * Invoked when user selects the "Menu" item
+ */
+void WEB_NAVIGATOR::OnToolsClicked( wxCommandEvent& WXUNUSED( evt ) )
+{
+ if( m_browser->GetCurrentURL() == "" )
+ return;
+
+ m_tools_tiny->Check( false );
+ m_tools_small->Check( false );
+ m_tools_medium->Check( false );
+ m_tools_large->Check( false );
+ m_tools_largest->Check( false );
+
+ wxWebViewZoom zoom = m_browser->GetZoom();
+
+ switch( zoom )
+ {
+ case wxWEBVIEW_ZOOM_TINY:
+ m_tools_tiny->Check();
+ break;
+
+ case wxWEBVIEW_ZOOM_SMALL:
+ m_tools_small->Check();
+ break;
+
+ case wxWEBVIEW_ZOOM_MEDIUM:
+ m_tools_medium->Check();
+ break;
+
+ case wxWEBVIEW_ZOOM_LARGE:
+ m_tools_large->Check();
+ break;
+
+ case wxWEBVIEW_ZOOM_LARGEST:
+ m_tools_largest->Check();
+ break;
+ }
+
+ m_edit_cut->Enable( m_browser->CanCut() );
+ m_edit_copy->Enable( m_browser->CanCopy() );
+ m_edit_paste->Enable( m_browser->CanPaste() );
+
+ m_edit_undo->Enable( m_browser->CanUndo() );
+ m_edit_redo->Enable( m_browser->CanRedo() );
+
+ m_selection_clear->Enable( m_browser->HasSelection() );
+ m_selection_delete->Enable( m_browser->HasSelection() );
+
+ m_context_menu->Check( m_browser->IsContextMenuEnabled() );
+
+ // Firstly we clear the existing menu items, then we add the current ones
+ wxMenuHistoryMap::const_iterator it;
+
+ for( it = m_histMenuItems.begin(); it != m_histMenuItems.end(); ++it )
+ {
+ m_tools_history_menu->Destroy( it->first );
+ }
+
+ m_histMenuItems.clear();
+
+ wxVector<wxSharedPtr<wxWebViewHistoryItem> > back = m_browser->GetBackwardHistory();
+ wxVector<wxSharedPtr<wxWebViewHistoryItem> > forward = m_browser->GetForwardHistory();
+
+ wxMenuItem* item;
+
+ unsigned int i;
+
+ for( i = 0; i < back.size(); i++ )
+ {
+ item = m_tools_history_menu->AppendRadioItem( wxID_ANY, back[i]->GetTitle() );
+ m_histMenuItems[item->GetId()] = back[i];
+ Connect( item->GetId(), wxEVT_MENU,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnHistory ), NULL, this );
+ }
+
+ wxString title = m_browser->GetCurrentTitle();
+
+ if( title.empty() )
+ title = "(untitled)";
+
+ item = m_tools_history_menu->AppendRadioItem( wxID_ANY, title );
+ item->Check();
+
+ // No need to connect the current item
+ m_histMenuItems[item->GetId()] =
+ wxSharedPtr<wxWebViewHistoryItem>( new wxWebViewHistoryItem( m_browser->GetCurrentURL(),
+ m_browser->GetCurrentTitle() ) );
+
+ for( i = 0; i < forward.size(); i++ )
+ {
+ item = m_tools_history_menu->AppendRadioItem( wxID_ANY, forward[i]->GetTitle() );
+ m_histMenuItems[item->GetId()] = forward[i];
+ Connect( item->GetId(), wxEVT_TOOL,
+ wxCommandEventHandler( WEB_NAVIGATOR::OnHistory ), NULL, this );
+ }
+
+ wxPoint position = ScreenToClient( wxGetMousePosition() );
+ PopupMenu( m_tools_menu, position.x, position.y );
+}
+
+
+/**
+ * Invoked when user selects the zoom size in the menu
+ */
+void WEB_NAVIGATOR::OnSetZoom( wxCommandEvent& evt )
+{
+ if( evt.GetId() == m_tools_tiny->GetId() )
+ {
+ m_browser->SetZoom( wxWEBVIEW_ZOOM_TINY );
+ }
+ else if( evt.GetId() == m_tools_small->GetId() )
+ {
+ m_browser->SetZoom( wxWEBVIEW_ZOOM_SMALL );
+ }
+ else if( evt.GetId() == m_tools_medium->GetId() )
+ {
+ m_browser->SetZoom( wxWEBVIEW_ZOOM_MEDIUM );
+ }
+ else if( evt.GetId() == m_tools_large->GetId() )
+ {
+ m_browser->SetZoom( wxWEBVIEW_ZOOM_LARGE );
+ }
+ else if( evt.GetId() == m_tools_largest->GetId() )
+ {
+ m_browser->SetZoom( wxWEBVIEW_ZOOM_LARGEST );
+ }
+ else
+ {
+ wxFAIL;
+ }
+}
+
+
+void WEB_NAVIGATOR::OnZoomLayout( wxCommandEvent& WXUNUSED( evt ) )
+{
+ if( m_tools_layout->IsChecked() )
+ m_browser->SetZoomType( wxWEBVIEW_ZOOM_TYPE_LAYOUT );
+ else
+ m_browser->SetZoomType( wxWEBVIEW_ZOOM_TYPE_TEXT );
+}
+
+
+void WEB_NAVIGATOR::OnHistory( wxCommandEvent& evt )
+{
+ m_browser->LoadHistoryItem( m_histMenuItems[evt.GetId()] );
+}
+
+
+void WEB_NAVIGATOR::OnRunScript( wxCommandEvent& WXUNUSED( evt ) )
+{
+ wxTextEntryDialog dialog( this,
+ "Enter JavaScript to run.",
+ wxGetTextFromUserPromptStr,
+ "",
+ wxOK | wxCANCEL | wxCENTRE | wxTE_MULTILINE );
+
+ if( dialog.ShowModal() == wxID_OK )
+ {
+ m_browser->RunScript( dialog.GetValue() );
+ }
+}
+
+
+void WEB_NAVIGATOR::OnClearSelection( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->ClearSelection();
+}
+
+
+void WEB_NAVIGATOR::OnDeleteSelection( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->DeleteSelection();
+}
+
+
+void WEB_NAVIGATOR::OnSelectAll( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->SelectAll();
+}
+
+
+/**
+ * Callback invoked when a loading error occurs
+ */
+void WEB_NAVIGATOR::OnError( wxWebViewEvent& evt )
+{
+#define WX_ERROR_CASE( type ) \
+case type: \
+ category = # type; \
+ break;
+
+ wxString category;
+
+ switch( evt.GetInt() )
+ {
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_CONNECTION );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_CERTIFICATE );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_AUTH );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_SECURITY );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_NOT_FOUND );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_REQUEST );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_USER_CANCELLED );
+ WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_OTHER );
+ }
+
+ // Show the info bar with an error
+ m_info->ShowMessage( _( "An error occurred loading " ) + evt.GetURL() + "\n" +
+ "'" + category + "'", wxICON_ERROR );
+
+ UpdateState();
+}
+
+
+/**
+ * Invoked when user selects "Print" from the menu
+ */
+void WEB_NAVIGATOR::OnPrint( wxCommandEvent& WXUNUSED( evt ) )
+{
+ m_browser->Print();
+}
+
+
+SourceViewDialog::SourceViewDialog( wxWindow* parent, wxString source ) :
+ wxDialog( parent, wxID_ANY, "Source Code",
+ wxDefaultPosition, wxSize( 700, 500 ),
+ wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
+{
+ wxStyledTextCtrl* text = new wxStyledTextCtrl( this, wxID_ANY );
+
+ text->SetMarginWidth( 1, 30 );
+ text->SetMarginType( 1, wxSTC_MARGIN_NUMBER );
+ text->SetText( source );
+
+ text->StyleClearAll();
+ text->SetLexer( wxSTC_LEX_HTML );
+ text->StyleSetForeground( wxSTC_H_DOUBLESTRING, wxColour( 255, 0, 0 ) );
+ text->StyleSetForeground( wxSTC_H_SINGLESTRING, wxColour( 255, 0, 0 ) );
+ text->StyleSetForeground( wxSTC_H_ENTITY, wxColour( 255, 0, 0 ) );
+ text->StyleSetForeground( wxSTC_H_TAG, wxColour( 0, 150, 0 ) );
+ text->StyleSetForeground( wxSTC_H_TAGUNKNOWN, wxColour( 0, 150, 0 ) );
+ text->StyleSetForeground( wxSTC_H_ATTRIBUTE, wxColour( 0, 0, 150 ) );
+ text->StyleSetForeground( wxSTC_H_ATTRIBUTEUNKNOWN, wxColour( 0, 0, 150 ) );
+ text->StyleSetForeground( wxSTC_H_COMMENT, wxColour( 150, 150, 150 ) );
+
+ wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
+ sizer->Add( text, 1, wxEXPAND );
+ SetSizer( sizer );
+}
Follow ups