kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #26742
[PATCH] eeschema new tool/feature: Component spreadsheet tool
Hello everyone,
Thanks for the comments on this tool and the video.
Attached there is the first patch for the 'component spreadsheet' tool
(probably the temporary name for this "table based design entry", as
points out Clemens).
Once the spreadsheet view is visible is possible to:
-Filter on fields to display only some groups of components using
regular expressions or simpler buttons/searches (right click a cell and
from the popup menu select "Edit Field").
-Set a column filter to a cell value using a popup menu (right click on
a cell) (example: filter all the 100nF capacitors at once)
-Hide a column (right click on a column and select 'hide column')
-Move a column (click on the column label at the top and drag it)
-Edit a single field directly in the spreadsheet (i.e. it is possible to
manually annotate the schematic from that window)
-Clicking on a row or a cell the cursor in the schematic window goes to
the component/sheet of the clicked component.
-Selecting cells means 'select the components' and the right-click-popup
menu allows to copy the field under cursor to selected components
-Selecting cells means 'select the components' and the right-click-popup
menu allows to delete the field under cursor in selected components
(this may change in the future since the deleted field is now the one
under the cursor and the 'delgcc (Debian 4.9.2-10) 4.9.2ete' function
does not clear the selected cells but the clicked field on the
components selected (or not? can have sense not to delete the field but
just make it empty?).
-The operations made in the spreadsheet can be undone using the UNDO
function in the schematic frame window (either icon or menu)
-If the cells are purple means the field does not exist for that
component. To add the field and fill it just click on the cell and
insert the text.
The patch is usable, but there are still some points to improve (and
some annoyances to get rid of):
-UNDO: sometimes the 'undo' command in the schematic is grayed-out (it
re-appears if the current sheet is changed to another sheet), I'm
looking for a workaround for this that does not force me to add a 'undo'
button in the spreadsheet that could confuse the user.
-Enable CTRL-Z on the spreadsheet window for the UNDO function (and
discover if CTRL-Z is portable before doing something that works only on
my OS)
-Right click popup menu allows also to delete a field content. Since
empty fields are illegal in the main edit window, so the code to remove
the empty field if it is not one of the default fields is still to be
written (or empty fields should become legal in other edit windows too).
-Stabilize the tool and write a little bit of documentation on its use
to add to the users manual with also some tips on regular expressions.
-re-read the code and get rid of debug messages on std::cout
See the file eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp for
the 'TODO' list, known bugs-annoyances in this version and for the
'checklist' I used to test the function.
Also there are some points I will work on in the next days, as the
Doxygen comments in the headers still do not conform to the coding
style: I used the compact form, I'll change (or delete them) in the next
days.
At this point most of the work is in the 'compo_spreadsheet_frame.cpp'
file (I did not want to spread code in too many files at this point),
but a part of that will be moved in the future to the corresponding
class files.
Anyway I send the patch so that it can be tested/analyzed to understand
where to make it better and to let Orson look at the code to see if some
parts can be reused (but I'm not sure on this since the component
spreadsheet just edits the SCH_COMPONENT fields and at the moment the
code is not very 'generic', but who knows...
The patch has been compiled and tested on Linux (debian 8.6 (jessie),
wxWidgets 3.0.2+b1, gcc version: gcc (Debian 4.9.2-10) 4.9.2)
Bye, Dino.
>From 7e752d547169426f60d812f36eac5c489d0a9912 Mon Sep 17 00:00:00 2001
From: dino <dino.ghilardi@xxxxxxxx>
Date: Tue, 8 Nov 2016 00:30:05 +0100
Subject: [PATCH] Component spreadsheet view enabled
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.1.4"
This is a multi-part message in MIME format.
--------------2.1.4
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
uncrustified and merged local commits.
---
common/kiway.cpp | 1 +
eeschema/CMakeLists.txt | 8 +
eeschema/block.cpp | 23 +-
.../compo_spreadsheet/compo_spreadsheet_frame.cpp | 1161 +++++++++++++
.../compo_spreadsheet/compo_spreadsheet_frame.h | 181 +++
.../compo_spreadsheet_frame_base.cpp | 144 ++
.../compo_spreadsheet_frame_base.fbp | 451 ++++++
.../compo_spreadsheet_frame_base.h | 87 +
.../dialog_compo_spreadsheet_filter.cpp | 135 ++
.../dialog_compo_spreadsheet_filter.fbp | 1699 ++++++++++++++++++++
.../dialog_compo_spreadsheet_filter.h | 83 +
eeschema/controle.cpp | 10 +-
eeschema/dialogs/dialog_annotate.cpp | 8 +
.../dialogs/dialog_edit_component_in_schematic.cpp | 7 +
eeschema/dialogs/dialog_edit_one_field.cpp | 9 +
eeschema/eeschema.cpp | 9 +
eeschema/eeschema_id.h | 1 +
eeschema/find.cpp | 9 +-
eeschema/menubar.cpp | 5 +
eeschema/operations_on_items_lists.cpp | 10 +-
eeschema/schematic_undo_redo.cpp | 16 +
eeschema/schframe.cpp | 38 +-
eeschema/schframe.h | 11 +
include/frame_type.h | 2 +
24 files changed, 4099 insertions(+), 9 deletions(-)
create mode 100644 eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp
create mode 100644 eeschema/compo_spreadsheet/compo_spreadsheet_frame.h
create mode 100644 eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.cpp
create mode 100644 eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.fbp
create mode 100644 eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.h
create mode 100644 eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.cpp
create mode 100644 eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.fbp
create mode 100644 eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.h
--------------2.1.4
Content-Type: text/x-patch; name="0001-Component-spreadsheet-view-enabled.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Component-spreadsheet-view-enabled.patch"
diff --git a/common/kiway.cpp b/common/kiway.cpp
index 65f8cc5..c0b88ae 100644
--- a/common/kiway.cpp
+++ b/common/kiway.cpp
@@ -258,6 +258,7 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType )
case FRAME_SCH_VIEWER:
case FRAME_SCH_VIEWER_MODAL:
case FRAME_SIMULATOR:
+ case FRAME_COMPO_SPREADSHEET:
return FACE_SCH;
case FRAME_PCB:
diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 59e714e..6666456 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -220,6 +220,14 @@ if( KICAD_SPICE )
)
endif()
+ #Experimental new dialog/functions
+ set( EESCHEMA_SRCS
+ ${EESCHEMA_SRCS}
+ compo_spreadsheet/compo_spreadsheet_frame_base.cpp
+ compo_spreadsheet/compo_spreadsheet_frame.cpp
+ compo_spreadsheet/dialog_compo_spreadsheet_filter.cpp
+ )
+
if( MINGW )
# EESCHEMA_RESOURCES variable is set by the macro.
diff --git a/eeschema/block.cpp b/eeschema/block.cpp
index 7d8c2bf..3d721ed 100644
--- a/eeschema/block.cpp
+++ b/eeschema/block.cpp
@@ -48,6 +48,7 @@
#include <sch_sheet.h>
#include <sch_sheet_path.h>
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
// Imported functions:
extern void SetSchItemParent( SCH_ITEM* Struct, SCH_SCREEN* Screen );
extern void MoveItemsInList( PICKED_ITEMS_LIST& aItemsList, const wxPoint aMoveVector );
@@ -111,7 +112,7 @@ void SCH_EDIT_FRAME::InitBlockPasteInfos()
void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
-{
+{ bool updateCompoSpreadsheetGrid=false;
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
if( !m_canvas->IsMouseCaptured() )
@@ -143,6 +144,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
break;
case BLOCK_COPY: /* Copy */
+ updateCompoSpreadsheetGrid=true;
case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/
if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
@@ -156,6 +158,7 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
break;
case BLOCK_PASTE:
+ updateCompoSpreadsheetGrid=true;
if( m_canvas->IsMouseCaptured() )
m_canvas->CallMouseCapture( DC, wxDefaultPosition, false );
@@ -183,11 +186,20 @@ void SCH_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
m_canvas->EndMouseCapture( GetToolId(), m_canvas->GetCurrentCursor(), wxEmptyString, false );
m_canvas->Refresh();
+
+ // Update the compo spreadsheet frame (if it is open and needed)
+ if (updateCompoSpreadsheetGrid)
+ { COMPO_SPREADSHEET_FRAME* csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if ( csFrame )
+ csFrame->DataRefresh();
+ }
+
}
bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
{
+ bool updateCompoSpreadsheetGrid=false;
bool nextcmd = false;
bool zoom_command = false;
BLOCK_SELECTOR* block = &GetScreen()->m_BlockLocate;
@@ -288,6 +300,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
block->ClearItemsList();
GetScreen()->TestDanglingEnds();
m_canvas->Refresh();
+ updateCompoSpreadsheetGrid=true;
break;
case BLOCK_SAVE: // Save a copy of items in paste buffer
@@ -306,6 +319,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
case BLOCK_PASTE:
block->SetState( STATE_BLOCK_MOVE );
+ updateCompoSpreadsheetGrid=true;
break;
case BLOCK_ZOOM:
@@ -373,6 +387,13 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* aDC )
if( zoom_command )
Window_Zoom( GetScreen()->m_BlockLocate );
+ // Update the compo spreadsheet frame (if it is open and needed)
+ if (updateCompoSpreadsheetGrid)
+ { COMPO_SPREADSHEET_FRAME* csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if ( csFrame )
+ csFrame->DataRefresh();
+ }
+
return nextcmd;
}
diff --git a/eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp b/eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp
new file mode 100644
index 0000000..d4ebf7d
--- /dev/null
+++ b/eeschema/compo_spreadsheet/compo_spreadsheet_frame.cpp
@@ -0,0 +1,1161 @@
+
+#include <schframe.h>
+#include <eeschema_id.h>
+#include <kiway.h>
+#include <confirm.h>
+
+#include <widgets/tuner_slider.h>
+#include <dialogs/dialog_signal_list.h>
+#include <pgm_base.h>
+
+#include <menus_helpers.h>
+#include "compo_spreadsheet_frame.h"
+#include <sch_reference_list.h>
+#include <kiway_player.h>
+
+#include <algorithm>
+
+#include <fctsys.h>
+#include <class_drawpanel.h>
+#include <confirm.h>
+#include <schframe.h>
+
+
+#include <sch_reference_list.h>
+#include <class_library.h>
+
+
+#include <fctsys.h>
+#include <pgm_base.h>
+#include <kiface_i.h>
+#include <kiway_express.h>
+#include <macros.h>
+#include <eda_dde.h>
+#include <schframe.h>
+
+#include <general.h>
+#include <eeschema_id.h>
+#include <lib_draw_item.h>
+#include <lib_pin.h>
+#include <sch_component.h>
+
+
+#include <schframe.h>
+#include <eeschema_id.h>
+#include <kiway.h>
+#include <confirm.h>
+#include <bitmaps.h>
+
+#include <widgets/tuner_slider.h>
+#include <dialogs/dialog_signal_list.h>
+#include <pgm_base.h>
+
+#include <menus_helpers.h>
+#include <kicad_device_context.h>
+#include <template_fieldnames.h> // to have the field number.
+
+#include <limits>
+
+#include <wx/colour.h>
+
+COMPO_SPREADSHEET_FRAME::COMPO_SPREADSHEET_FRAME( KIWAY* aKiway, wxWindow* aParent )
+ : COMPO_SPREADSHEET_FRAME_BASE( aParent )
+{
+ m_disableNextSelection = true; // Disable annoying auto-selection on frame creation.
+// FIXME: use a color from user preferences/configuration.
+ m_emptyCellColor = wxColour( 0xCA, 0xCA, 0xFF, wxALPHA_OPAQUE );
+ m_filledCellColor = wxColour( 0xFF, 0xFF, 0xFF, wxALPHA_OPAQUE );
+
+ SetKiway( this, aKiway );
+ m_kiway = aKiway;
+ m_schematicFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false );
+
+ if( m_schematicFrame == NULL )
+ throw std::runtime_error( "There is no schematic window" );
+
+ // Give an icon
+ wxIcon icon;
+ icon.CopyFromBitmap( KiBitmap( simulator_xpm ) ); // FIXME: use another icon, don't steal the simulator one...
+ SetIcon( icon );
+
+ m_gridCompoSpreadSheet->ClearSelection(); // be sure nothing is selected.
+
+ // Delete all colums to be able to create the new grid.
+ if( m_gridCompoSpreadSheet->GetNumberCols()>0 )
+ m_gridCompoSpreadSheet->DeleteCols( 0, m_gridCompoSpreadSheet->GetNumberCols() );
+
+ if( m_columnFilters.find( "Reference" ) == m_columnFilters.end() )
+ {
+ // Add the default reference value to 'not commented'.
+ // It is the only one that does not default to 'everything', so it must be created here.
+ // Comment this out to have it to the 'everything' expression.
+ m_columnFilters["Reference"].regex = "^[^#].*"; // default.
+ }
+
+ DataRefresh(); // Refresh the grid data.
+ m_gridCompoSpreadSheet->ClearSelection(); // be sure nothing is selected.
+} // constructor.
+
+
+void COMPO_SPREADSHEET_FRAME::DisableNextCursorMoveOnSelection( void )
+{
+ m_disableNextSelection = true;
+}
+
+
+void COMPO_SPREADSHEET_FRAME::SelectComponentRow( SCH_COMPONENT* aComponent )
+{
+ SCH_REFERENCE item;
+ SCH_COMPONENT* component;
+ int row = -1; // -1= "not found".
+
+ for( unsigned int i = 0; i<m_componentsList.GetCount(); i++ )
+ {
+ item = m_componentsList.GetItem( i );
+ component = item.GetComp();
+
+ if( component==aComponent )
+ {
+ // std::cout<< "FOUND COMPONENT AT ROW "<<i<<"\n";
+ row = i;
+ m_gridCompoSpreadSheet->SelectRow( row, false );
+ m_gridCompoSpreadSheet->MakeCellVisible( row, 0 );
+ break;
+ }
+ }
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnShowAllMenuSelection( wxCommandEvent& event )
+{
+ for( std::map<wxString, t_filterColumn>::iterator it = m_columnFilters.begin();
+ it!=m_columnFilters.end();
+ ++it )
+ {
+ m_columnFilters[it->first].regex = ".*"; // Set to 'everything' regex.
+ }
+
+ DataRefresh(); // re-build the grid.
+}
+
+
+void COMPO_SPREADSHEET_FRAME::ResetFilters( void )
+{
+ for( std::map<wxString, t_filterColumn>::iterator it = m_columnFilters.begin();
+ it!=m_columnFilters.end();
+ ++it )
+ {
+ std::cout << "Column: " << it->first << " => " << it->second.regex << '\n';
+
+ if( it->first=="Reference" )
+ m_columnFilters[it->first].regex = "^[^#].*"; // On Reference column exclude items starting with '#' by default.
+ else
+ m_columnFilters[it->first].regex = ".*"; // Set to 'everything' regex.
+ }
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnMenuSelection_menuResetFilters( wxCommandEvent& event )
+{
+ ResetFilters();
+ DataRefresh(); // re-build the grid.
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnMenuSelectionShowHiddenColumns( wxCommandEvent& event )
+{
+ for( int col = 0; col<m_gridCompoSpreadSheet->GetNumberCols(); col++ )
+ m_gridCompoSpreadSheet->ShowCol( col );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnHideColumnMenuSelection( wxCommandEvent& event )
+{
+ std::cout << "Hiding column " << m_clickedColumn << "\n";
+ m_gridCompoSpreadSheet->HideCol( m_clickedColumn );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnSelectCell( wxGridEvent& event )
+{
+ int row = event.GetRow();
+ int column = event.GetCol();
+
+ // make the first 'select' signal unhandled since it is sent on grid creation.
+ if( m_disableNextSelection )
+ {
+ m_disableNextSelection = false;
+ return;
+ }
+
+ wxString part_ref = m_gridCompoSpreadSheet->GetCellValue( row, 0 ); // First field is always the reference.
+ // std::cout<< "Reference (from grid): "<< part_ref<<"\n";
+
+ std::cout << "Selected a cell...(Row=" << row << ", Column=" << column << ")\n";
+ std::cout << " Field: " << m_gridCompoSpreadSheet->GetColLabelValue( column ) << "\n";
+
+ SCH_REFERENCE item;
+ SCH_COMPONENT* component;
+ SCH_SHEET_PATH sheetPath;
+ SCH_SHEET_PATH* sheet = &sheetPath;
+ item = m_componentsList.GetItem( row );
+ component = item.GetComp();
+
+ sheetPath = item.GetSheetPath();
+
+ SCH_EDIT_FRAME* schFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false );
+
+ if( schFrame )
+ schFrame->setCursorOnComponent( component, sheet, false, component->GetPosition() );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnGridLabelRightClick( wxGridEvent& event )
+{
+ int column = event.GetCol();
+
+ if( column == -1 )
+ std::cout << "Selected a row (" << event.GetRow() << ")\n";
+
+ if( event.GetRow()==-1 )
+ {
+ std::cout << "Selected a column (" << event.GetCol() << ")\n";
+ m_clickedColumn = column; // save the clicked column.
+ PopupMenu( m_columnLabelMenu );
+ }
+
+ event.Skip();
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnGridCellRightClick( wxGridEvent& event )
+{
+ // save current column and row for the menu item call.
+ m_clickedColumn = event.GetCol();
+ m_clickedRow = event.GetRow();
+ PopupMenu( m_RightCellClickPopupMenu );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnMenuSelectionSetThisAsFilter( wxCommandEvent& event )
+{
+ wxString value = m_gridCompoSpreadSheet->GetCellValue( m_clickedRow, m_clickedColumn );
+
+ std::string checkedVal = "^"; // Start of string marker.
+
+ // CHECK FOR REGEX SPECIAL CHARS and escape them with backslash.
+ for( unsigned int i = 0; i<value.length(); i++ )
+ {
+ switch( (unsigned char) value[i] )
+ {
+ case '^':
+ case '$':
+ case '\\':
+ case '{':
+ case '}':
+ case '[':
+ case ']':
+ case '(':
+ case ')':
+ case '.':
+ case '*':
+ case '+':
+ case '?':
+ case '|':
+ case '<':
+ case '>':
+ case '-':
+ case '&':
+ checkedVal += '\\';
+ break;
+ }
+
+ checkedVal = checkedVal += value[i];
+ }
+
+ checkedVal += "$"; // End of string marker.
+ SetColumnFilter( m_clickedColumn, checkedVal );
+ DataRefresh();
+}
+
+
+void COMPO_SPREADSHEET_FRAME::SetLastClickedColumnFilter( wxString aValue )
+{
+ SetColumnFilter( m_clickedColumn, aValue );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::SetColumnFilter( int aColumn, wxString aValue )
+{
+ wxString key = m_gridCompoSpreadSheet->GetColLabelValue( aColumn ).BeforeFirst( '\n' );
+
+ std::cout << "Setting filter \"" << key << "\" to \"" << aValue << "\"\n";
+ m_columnFilters[key].regex = aValue;
+}
+
+
+// ANNOYANCE (minor): if an illegal reference is entered the error dialog appears twice.
+// ANNOYANCE: UNDO is disabled if the block operation was done while it was visible a different sheet fron the one
+// on screen when the operation was done. To re-enable it it is enough to change to the right sheet.
+// Changing to another sheet can re-enables the undo icon.
+
+
+// BUG or FEATURE? An invalid regex is silently ignored and set to 'accept all'.: handle exceptions and open an error dialog? (but the dialog will be an annoyance more than a feature).
+
+// TODO: enable hotkeys undo-redo also on the grid view (now it works only on the schematic frame and seems buggy sometimes.).
+// TODO: Enable 'del' key on multiple selection to empty fields (excluding reference that should not be deleted.)
+// TODO?: Implement copy-paste blocks? (as in a real spreadsheet).
+// TODO: Enable a flag/checkbox/menu on spreadsheet window to show only the current sheet components
+// TODO: Select a block and press 'DEL' key: the content should be deleted (if it does not contain References).
+// TODO: Select some rows and press 'DEL': They should NOT be deleted (since they contain References)
+// TODO: Select some cells with shift/ctrl click and press DEL: They should have their content deleted.
+
+/* SOFTWARE TEST CHECKLIST:
+ * Select a cell: the component on the schematic sheet should be centered under cursor,
+ * sheet and pan should change accordingly.
+ * Select a component on the schematic sheet: the corresponding row should be selected too.
+ * Edit a field in the spreadsheet view: The field should change also in the schematic and
+ * the schematic view should update
+ * Edit a field in the schematic: The field should change also in the spreadsheet view and
+ * the corresponding line in the grid selected/highlighted.
+ * Annotate the schematic: the spreadsheet view should update.
+ * Undo a field change made in the spreadsheet view: should work (use a command in the schematic window).
+ * Undo an operation: The spreadsheet view should be updated too.
+ * Delete a component in schematic: The grid should be updated.
+ * Add a component in schematic: The grid should update and the grid cursor on the new item.
+ * Hide a column using right-click on the column label.
+ * Show hidden columns using the menu.
+ * Generic filter, regular expression filter, common cases (R, C, Starts with, ends with...)
+ * Closing the schematic window the spreadsheet (if open) should close too.
+ * Refreshing the component spreadsheet should redraw also the scrollbars.
+ * Copy a block of components: the grid should update
+ * Save and paste a block: the grid should update.
+ * Select a block and right-click a cell outside the block. Check if the 'copy field on other compnents' is working.
+ * Select a block and use popup menu 'clear contents' to delete field content.
+ * Select some cells with ctrl-shift-etc and delete using popup menu.
+ * Select a single cella and use pop up menu to delete.
+ *
+ */
+
+// Regular expression syntax:
+// ^ is the 'char before start' marker (beginning of the string).
+// . is 'any char'.
+// * is 'previous char repeated anytime
+// $ is 'after last char' marker (end of the string)
+// EXAMPLES:
+// ^C.* means: Starts with C
+// ^R1.*5$ means: "Starts with R1 and ENDS with 5.
+// .*0805$ means: Ends with 0805
+// ^[0-9].* means: Does NOT start with a digit.
+// ^[^#].* means: that does NOT start with '#'.
+// More complex patterns are available studying the regular expression syntax.
+
+void COMPO_SPREADSHEET_FRAME::OnGridCmdCellChange( wxGridEvent& event )
+{
+ int row = event.GetRow();
+ int col = event.GetCol();
+
+ wxString newFieldText = m_gridCompoSpreadSheet->GetCellValue( row, col );
+ // std::cout<< "Grid cell changed (row: "<< row<<", col: "<< col <<")\n";
+ wxString fieldName = m_gridCompoSpreadSheet->GetColLabelValue( col ).BeforeFirst( '\n' );
+
+ AddOrUpdateField( row, fieldName, newFieldText );
+
+ m_schematicFrame->OnModify(); // mark the schematic as modified?.
+ m_schematicFrame->GetCanvas()->Refresh(); // Redraw the schematic
+}
+
+
+void COMPO_SPREADSHEET_FRAME::DataRefresh( void )
+{
+ if( !m_gridCompoSpreadSheet )
+ {
+ std::cout <<
+ "AAAAARGH!!! COMPO_SPREADSHEET_FRAME::DataRefresh(): MISSING GRID!!!! this should not happen and seems to be a bug!!\n";
+ return;
+ }
+
+ wxGridCellCoordsArray selectedCells = m_gridCompoSpreadSheet->GetSelectedCells();
+ wxArrayInt selectedCols = m_gridCompoSpreadSheet->GetSelectedCols();
+ wxArrayInt selectedRows = m_gridCompoSpreadSheet->GetSelectedRows();
+
+ // Clear the component list if it is not yet empty.
+ while( m_componentsList.GetCount()>0 )
+ {
+ m_componentsList.RemoveItem( 0 );
+ }
+
+ // build the screen list
+ SCH_SHEET_LIST sheetList( g_RootSheet );
+ // Build the list of components
+
+ // Commented out: extension in the case we want to filter components on a single sheet.
+ // if( !aOneSheetOnly )
+ sheetList.GetComponents( m_kiway->Prj().SchLibs(), m_componentsList );
+ // else //In the case only one sheet is required .
+ // m_CurrentSheet->GetComponents( Prj().SchLibs(), componentsList );
+
+ // Add a row for every component.
+ SCH_REFERENCE item;
+ SCH_COMPONENT* component;
+
+ // Cannot remove sub componens, since when changing a field in one subcomponent,
+ // it does not change on others (value, reference etc...) automatically.
+ // m_componentsList.RemoveSubComponentsFromList();
+
+ // std::cout<< "Component COUNT (Before FILTERS): "<<m_componentsList.GetCount()<<"\n";
+
+ // Exclude the filtered-out components from componentsList.
+ unsigned int compoIndex = 0;
+
+ while( compoIndex<m_componentsList.GetCount() )
+ {
+ bool incrementCompoIndex = true;
+ std::vector<SCH_FIELD*> fieldVector;
+ item = m_componentsList.GetItem( compoIndex );
+ component = item.GetComp();
+
+ if( component==NULL )
+ {
+ std::cout <<
+ "COMPO_SPREADSHEET_FRAME::DataRefresh A COMPONENT IN LIST IS NULL!! - exiting! (this may be a bug!)\n";
+ return;
+ }
+
+ // Check if the filters apply to the component or 'continue' to the next component.
+ component->GetFields( fieldVector, false );
+
+ // APPLY FILTERS to decide if the component is to be added to the grid.
+ for( unsigned int k = 0; k<fieldVector.size(); k++ )
+ {
+ wxString fieldName = fieldVector[k]->GetName();
+ wxString fieldValue = fieldVector[k]->GetText();
+ std::map<wxString, t_filterColumn>::iterator it = m_columnFilters.find( fieldName );
+
+ if( it!=m_columnFilters.end() )
+ {
+ // filter exists, remove components that do not match the regex.
+ // std::cout << "Testing if field \""<<fieldName<< "\" ("<<fieldValue<<")\" applies to regex \"" <<it->second.regex<<"\": ";
+ try
+ {
+ std::regex e( it->second.regex );
+ std::string str = std::string( fieldValue );
+
+ if( std::regex_search( str, e ) )
+ {
+ // std::cout<< "MATCHES!\n";
+ }
+ else
+ {
+ // std::cout<< "does not match: REMOVING COMPONENT.\n";
+ m_componentsList.RemoveItem( compoIndex );
+ incrementCompoIndex = false; // continue without incrementing compoIndex. Since item has been removed, the next one will have this same index.
+ break;
+ }
+ }
+ catch( std::exception& e )
+ {
+ std::cout << "Regex Exception caught!! (invalid regular expression?)\n";
+ }
+ }
+ } // for cycle on all fields of the component.
+
+ if( incrementCompoIndex )
+ compoIndex++;
+ } // Check all the components for filter..
+
+ std::cout << "Component COUNT (After FILTERS): " << m_componentsList.GetCount() << "\n";
+
+ m_componentsList.SortByRefAndValue();
+
+ // m_componentsList.SortByGenericField("Value"); -->TO BE IMPLEMENTED??.
+
+ // Delete all rows and re-generate them (if row count >0).
+ // if (m_gridCompoSpreadSheet->GetNumberRows()>0)
+ // m_gridCompoSpreadSheet->DeleteRows(0, m_gridCompoSpreadSheet->GetNumberRows(), false);
+ // Clean the existing grid without deleting rows or columns, so that the cursor does not move.
+ if( (m_gridCompoSpreadSheet->GetNumberRows()>0)&&(m_gridCompoSpreadSheet->GetNumberCols()>0) )
+ {
+ for( int i = 0; i<m_gridCompoSpreadSheet->GetNumberRows(); i++ )
+ {
+ for( int k = 0; k<m_gridCompoSpreadSheet->GetNumberCols(); k++ )
+ {
+ m_gridCompoSpreadSheet->SetCellValue( i, // row,
+ k, // int col,
+ "" // empty.
+ );
+ }
+ }
+ }
+
+ // Fill in grid components data.
+ for( int i = 0; i<(int) m_componentsList.GetCount(); i++ )
+ {
+ // unsigned int columnNumber=5;
+ std::vector<SCH_FIELD*> fieldVector;
+ item = m_componentsList.GetItem( i );
+ component = item.GetComp();
+
+ if( component==NULL )
+ {
+ std::cout << "A COMPONENT IN LIST IS NULL!! - exiting! (this may be a bug!)\n";
+ return;
+ }
+
+ component->GetFields( fieldVector, false );
+
+ // If there are not enough rows, append one.
+ if( m_gridCompoSpreadSheet->GetNumberRows()<=i )
+ m_gridCompoSpreadSheet->AppendRows( 1 ); // append the row for the current component
+
+ for( unsigned int k = 0; k<fieldVector.size(); k++ ) // Cycle on every field.
+ {
+ int writeToColumn = -1; // -1 means 'add a new column'.
+
+ // If the column requested does not exist, add it.
+ for( int col = 0; col < m_gridCompoSpreadSheet->GetNumberCols(); col++ )
+ {
+ if( m_gridCompoSpreadSheet->GetColLabelValue( col ).StartsWith( fieldVector[k]->
+ GetName() + "\n" ) )
+ {
+ // Found a field with that name (aka column exists).
+ writeToColumn = col;
+ break; // No need for further search.
+ }
+ }
+
+ if( writeToColumn==-1 )
+ {
+ // New columns needed... add it and set the head.
+ std::cout << "Adding new column...\n";
+ m_gridCompoSpreadSheet->AppendCols( 1 );
+
+ // Check if a filter exists. If there is no filter, add one with the default 'everything' value.
+ if( m_columnFilters.find( fieldVector[k]->GetName() )==m_columnFilters.end() )
+ {
+ // Filter does not exist, add it to the map.
+ std::cout << "ADDING NEW FILTER\n";
+ m_columnFilters[fieldVector[k]->GetName()].regex = ".*"; // default.
+ }
+
+ m_gridCompoSpreadSheet->SetColLabelValue(
+ (m_gridCompoSpreadSheet->GetNumberCols() - 1),
+ fieldVector[k]->GetName() + "\n" +
+ m_columnFilters[fieldVector[k]->GetName()].regex
+ );
+ writeToColumn = m_gridCompoSpreadSheet->GetNumberCols() - 1;
+ }
+
+ m_gridCompoSpreadSheet->SetCellValue( i, // row,
+ writeToColumn, // int col,
+ fieldVector[k]->GetText()
+ );
+ } // cycle on all fields.
+ } // Cycle on all components.
+
+// Delete unused rows if any.
+ if( (int) m_gridCompoSpreadSheet->GetNumberRows()>(int) m_componentsList.GetCount() )
+ m_gridCompoSpreadSheet->DeleteRows( m_componentsList.GetCount(),
+ m_gridCompoSpreadSheet->GetNumberRows() - m_componentsList.GetCount(),
+ false
+ );
+
+ // Reset cell background on "No field" color.
+ for( unsigned int i = 0; i<m_componentsList.GetCount(); i++ )
+ {
+ for( int k = 0; k<m_gridCompoSpreadSheet->GetNumberCols(); k++ )
+ {
+ m_gridCompoSpreadSheet->SetCellBackgroundColour( i, k, m_emptyCellColor );
+ }
+
+ std::vector<SCH_FIELD*> fieldVector;
+ item = m_componentsList.GetItem( i );
+ component = item.GetComp();
+ component->GetFields( fieldVector, false );
+
+ for( unsigned int k = 0; k<fieldVector.size(); k++ )
+ {
+ // Cycle on every field.
+ for( int col = 0; col < m_gridCompoSpreadSheet->GetNumberCols(); col++ )
+ {
+ if( m_gridCompoSpreadSheet->GetColLabelValue( col ).StartsWith( fieldVector[k]->
+ GetName() + "\n" ) )
+ {
+ // Column exists, write that field in the column.
+ // Found a field with that name.
+ m_gridCompoSpreadSheet->SetCellBackgroundColour(
+ i, k,
+ m_filledCellColor );
+ break; // No need for further search.
+ }
+ }
+ } // cycle on all fields for this component.
+ } // cycle on all components
+
+ m_gridCompoSpreadSheet->SetColLabelSize( wxGRID_AUTOSIZE );
+ m_gridCompoSpreadSheet->AutoSize();
+
+ // Update the column headers getting the right filter value.
+ long num_cols = m_gridCompoSpreadSheet->GetNumberCols();
+
+ for( int col = 0; col<num_cols; col++ )
+ {
+ // update column headers (filters)
+ wxString key = m_gridCompoSpreadSheet->GetColLabelValue( col ).BeforeFirst( '\n' );
+ wxString value = m_columnFilters[key].regex;
+ m_gridCompoSpreadSheet->SetColLabelValue( col, key + "\n" + value );
+ }
+
+ ;
+
+ // Stretch last column to fit well in the frame (to avoid 'empty' spaces at the right)
+ // If the grid overfills the frame it does nothing.
+ {
+ long width = m_gridCompoSpreadSheet->GetRowLabelSize();
+
+ for( int col = 0; col<num_cols - 1; col++ )
+ {
+ // update column headers (filters)
+ wxString key = m_gridCompoSpreadSheet->GetColLabelValue( col ).BeforeFirst( '\n' );
+ wxString value = m_columnFilters[key].regex;
+ // Autosize columns and calculate total width.
+ m_gridCompoSpreadSheet->AutoSizeColumn( col );
+ width += m_gridCompoSpreadSheet->GetColSize( col );
+ }
+
+ ;
+ width += m_gridCompoSpreadSheet->GetScrollThumb( wxVERTICAL );
+
+ if( num_cols>0 )
+ {
+ width = m_gridCompoSpreadSheet->GetClientSize().GetWidth() - width - 1;
+
+ if( width>0 )
+ m_gridCompoSpreadSheet->SetColSize( num_cols - 1, width );
+ else
+ {
+ m_gridCompoSpreadSheet->AutoSizeColumn( num_cols - 1 );
+ }
+ }
+
+ ;
+ } // End stretch and label update.
+
+ {
+ // workaround for a wxWidgets annoyance on redraw side scrollbars on the frame.
+ // Sometimes they are not re-drawn.
+ // Tested on Linux, wxWidgets V3.0.2 (debian Jessie)
+ // Hoping in the future it will not be needed anymore
+ int width, height;
+ GetSize( &width, &height );
+ SetSize( wxDefaultCoord, wxDefaultCoord, width + 1, height ); // resize by 1 pixel
+ SetSize( wxDefaultCoord, wxDefaultCoord, width, height ); // Return to previous size.
+ }
+}
+
+
+COMPO_SPREADSHEET_FRAME::~COMPO_SPREADSHEET_FRAME()
+{
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnColumnLabelClearFilterMenuSelection( wxCommandEvent& event )
+{
+ // Default: exclude from the list the 'commented' items, with a refdes starting with '#'
+ if( m_clickedColumn==0 )
+ SetColumnFilter( m_clickedColumn, "^[^#].*" ); // Set to 'everything but starting with #' regex.
+ else
+ SetColumnFilter( m_clickedColumn, ".*" ); // Set to 'everything' regex.
+
+ DataRefresh();
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnColumnLabelEditFilterMenuSelection( wxCommandEvent& event )
+{
+ std::cout << "EDIT FILTER SELECTED\n";
+ wxString key =
+ m_gridCompoSpreadSheet->GetColLabelValue( m_clickedColumn ).BeforeFirst( '\n' );
+ wxString regex = m_columnFilters[key].regex;
+ COMPO_SPREADSHEET_DIALOG_FILTER* m_dlgCompoRegex = new COMPO_SPREADSHEET_DIALOG_FILTER( this,
+ this,
+ regex );
+ m_dlgCompoRegex->Show( true );
+}
+
+
+void COMPO_SPREADSHEET_FRAME::AddOrUpdateField( int aRow,
+ wxString aFieldName,
+ wxString aNewFieldValue )
+{
+ SCH_REFERENCE item;
+ SCH_COMPONENT* component;
+ bool fieldIsReference = false;
+
+ item = m_componentsList.GetItem( aRow );
+ component = item.GetComp();
+
+ int foundField = -1; // Default: -1="not found".
+
+ // Look for the field selected.
+ for( int k = 0; k<component->GetFieldCount(); k++ )
+ {
+ // Search in the fields one that have the right name
+ // if (component->GetField(k)->GetName()==m_gridCompoSpreadSheet->GetColLabelValue(col))
+ if( aFieldName==component->GetField( k )->GetName() )
+ {
+ foundField = k;
+
+ if( !aFieldName.Cmp( "Reference" ) )
+ fieldIsReference = true;
+
+ // std::cout<<"FOUND THE FIELD to UPDATE IN COMPONENT!!("<< k<<")\n";
+ break;
+ }
+ }
+
+ if( fieldIsReference ) // Field is reference: check for valid reference.
+ {
+ if( !SCH_COMPONENT::IsReferenceStringValid( aNewFieldValue ) )
+ {
+ DisplayError( NULL,
+ _(
+ "AddOrUpdateField(): Illegal reference (A reference must start with a letter) Operation aborted." ) );
+ return;
+ }
+ }
+
+ // Save old version of the component in UNDO list.
+ m_schematicFrame->SaveCopyInUndoList( component, UR_CHANGED );
+
+ if( foundField==-1 )
+ {
+ // Field not found: should ADD a new field.
+ std::cout << "Update Field NOT FOUND in component\n" <<
+ "TO BE ADDED A NEW FIELD FOR THIS COMPONENT\n";
+ wxPoint pos = wxPoint( 0, 0 );
+ SCH_FIELD newField = SCH_FIELD( pos, component->GetFieldCount(), component, aFieldName );
+ newField.SetText( aNewFieldValue );
+ component->AddField( newField );
+ }
+ else
+ {
+ // Field found or added, update it.
+ SCH_FIELD* fieldToEdit = component->GetField( foundField );
+ std::cout << "CHANGING: \"" << fieldToEdit->GetName() << "\" Value: \"" <<
+ fieldToEdit->GetText() << "\" to change to \"" << aNewFieldValue << "\"\r\n";
+ fieldToEdit->SetText( aNewFieldValue );
+
+ // if ( foundField==REFERENCE )// seems to fail (when using enter to confirm cell value)
+ if( fieldIsReference )
+ {
+ std::cout << "***It is Reference: calling 'SetRef'\n";
+ // Problem: if the cell is confirmed using the ENTER key may be the current sheet is changed
+ // before calling this because of the 'cell select' callback.
+ // so the current sheet can be changed before getting here when using 'enter' on cell change val.
+ // component->SetRef ( &m_schematicFrame->GetCurrentSheet(),aNewFieldValue );
+ // better use this:
+ SCH_SHEET_PATH* sheetPath = new SCH_SHEET_PATH();
+ *sheetPath = item.GetSheetPath();
+ component->SetRef( sheetPath, aNewFieldValue );
+ // ...Does it create garbage in memory? Do we need to use something else?
+ }
+ else
+ {
+ std::cout << " ***FIELD IS NOT REFERENCE***\n";
+ }
+ }
+}
+
+
+void COMPO_SPREADSHEET_FRAME::EmptyField( int aRow, wxString aFieldName )
+{
+ SCH_REFERENCE item;
+ SCH_COMPONENT* component;
+
+ item = m_componentsList.GetItem( aRow );
+ component = item.GetComp();
+
+ int foundField = -1; // Default: -1="not found".
+
+ // Look for the field selected.
+ for( int k = 0; k<component->GetFieldCount(); k++ )
+ {
+ // Search in the fields one that have the right name
+ // if (component->GetField(k)->GetName()==m_gridCompoSpreadSheet->GetColLabelValue(col))
+ if( aFieldName==component->GetField( k )->GetName() )
+ {
+ foundField = k;
+ // std::cout<<"FOUND THE FIELD to UPDATE IN COMPONENT!!("<< k<<")\n";
+ break;
+ }
+ }
+
+ if( foundField==REFERENCE ) // A reference should never be empty.
+ {
+ DisplayError( NULL, _( "Reference cannot be empty, delete operation aborted." ) );
+ return;
+ }
+
+ // Save old version in UNDO list.
+ m_schematicFrame->SaveCopyInUndoList( component, UR_CHANGED );
+
+ if( foundField==-1 )
+ {
+ // Field not found: no need to create it empty.
+ }
+ else
+ {
+ // Field found or added, update it.
+ SCH_FIELD* fieldToEdit = component->GetField( foundField );
+ std::cout << "DELETING : \"" << fieldToEdit->GetName() << "\" Old value: \"" <<
+ fieldToEdit->GetText() << "\"\r\n";
+ fieldToEdit->SetText( "" );
+ }
+} // Empties the field.
+
+
+void COMPO_SPREADSHEET_FRAME::OnCompoSpreadSheetChar( wxKeyEvent& event )
+{
+ // CALLBACK to use to enable hotkeys on the grid.
+ // std::cout<<"KEY PRESSED: "<<event.GetKeyCode()<<"\n";
+ switch( event.GetKeyCode() )
+ {
+ case WXK_NUMPAD_DELETE:
+ case WXK_DELETE:
+ // std::cout<<"DELETE\n";
+ // DeleteSelectedFields()...TODO;
+ break;
+
+ case WXK_CONTROL_Z:
+ // std::cout<<"CTRL-Z --FIXME: ENABLE UNDO HERE!!\n";
+ break;
+ }
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnDeleteSelectedFieldsContent( wxCommandEvent& event )
+{
+ // Delete function.
+ std::cout << "Delete requested...\n";
+ // std::cout<<"Copying field on selected components/rows/fields.\n";
+ wxString fieldName = m_gridCompoSpreadSheet->GetColLabelValue( m_clickedColumn ).BeforeFirst(
+ '\n' );
+ wxGridCellCoordsArray selectedCells = m_gridCompoSpreadSheet->GetSelectedCells();
+ wxArrayInt selectedRows = m_gridCompoSpreadSheet->GetSelectedRows();
+
+ // Single selected cells.
+ for( unsigned int i = 0; i< selectedCells.Count(); i++ )
+ {
+ // std::cout << "UPDATING Selected: " << selectedCells[i].GetRow() << ", " << selectedCells[i].GetCol()<<"\n";
+ EmptyField( selectedCells[i].GetRow(), fieldName );
+ }
+
+ // Selected rows.
+ for( unsigned int i = 0; i<selectedRows.Count(); i++ )
+ {
+ // std::cout<<"Rows selected: " << selectedRows[i] << "\n";
+ EmptyField( selectedRows[i], fieldName );
+ }
+
+ // Block selection: FIXME: now is just used to select component, it should blank also other fields if selected.
+ wxGridCellCoordsArray blockSelectionTopLeft =
+ m_gridCompoSpreadSheet->GetSelectionBlockTopLeft();
+
+ if( blockSelectionTopLeft.Count()>0 )
+ {
+ unsigned int blockSelectionTopRow =
+ m_gridCompoSpreadSheet->GetSelectionBlockTopLeft()[0].GetRow();
+ unsigned int blockSelectionBottomRow =
+ m_gridCompoSpreadSheet->GetSelectionBlockBottomRight()[0].GetRow();
+
+ // std::cout << "Block selection from row "<<blockSelectionTopRow<<" to row "<< blockSelectionBottomRow<<"\n";
+ for( unsigned int row = blockSelectionTopRow; row<=blockSelectionBottomRow; row++ )
+ {
+ EmptyField( row, fieldName );
+ }
+ }
+ else
+ {
+ // std::cout << "No block selection\n";
+ }
+
+ m_schematicFrame->OnModify(); // mark the schematic as modified.
+ m_schematicFrame->GetCanvas()->Refresh(); // Redraw the schematic
+ DataRefresh();
+}
+
+
+void COMPO_SPREADSHEET_FRAME::SetSelectedComponentsField( wxString value )
+{
+ // Copy the field previously clicked on selected components (selected by highlighting a cell or a row).
+ // std::cout<<"Copying field on selected components/rows/fields.\n";
+ wxString fieldName = m_gridCompoSpreadSheet->GetColLabelValue( m_clickedColumn ).BeforeFirst(
+ '\n' );
+ wxGridCellCoordsArray selectedCells = m_gridCompoSpreadSheet->GetSelectedCells();
+ wxArrayInt selectedRows = m_gridCompoSpreadSheet->GetSelectedRows();
+
+ // Single selected cells.
+ for( unsigned int i = 0; i< selectedCells.Count(); i++ )
+ {
+ // std::cout << "UPDATING Selected: " << selectedCells[i].GetRow() << ", " << selectedCells[i].GetCol()<<"\n";
+ AddOrUpdateField( selectedCells[i].GetRow(), fieldName, value );
+ }
+
+ // Selected rows.
+ for( unsigned int i = 0; i<selectedRows.Count(); i++ )
+ {
+ // std::cout<<"Rows selected: " << selectedRows[i] << "\n";
+ AddOrUpdateField( selectedRows[i], fieldName, value );
+ }
+
+ // Block selection:
+ wxGridCellCoordsArray blockSelectionTopLeft =
+ m_gridCompoSpreadSheet->GetSelectionBlockTopLeft();
+
+ if( blockSelectionTopLeft.Count()>0 )
+ {
+ unsigned int blockSelectionTopRow =
+ m_gridCompoSpreadSheet->GetSelectionBlockTopLeft()[0].GetRow();
+ unsigned int blockSelectionBottomRow =
+ m_gridCompoSpreadSheet->GetSelectionBlockBottomRight()[0].GetRow();
+
+ // std::cout << "Block selection from row "<<blockSelectionTopRow<<" to row "<< blockSelectionBottomRow<<"\n";
+ for( unsigned int row = blockSelectionTopRow; row<=blockSelectionBottomRow; row++ )
+ {
+ AddOrUpdateField( row, fieldName, value );
+ }
+ }
+ else
+ {
+ // std::cout << "No block selection\n";
+ }
+
+ m_schematicFrame->OnModify(); // mark the schematic as modified.
+ m_schematicFrame->GetCanvas()->Refresh(); // Redraw the schematic
+ DataRefresh();
+}
+
+
+void COMPO_SPREADSHEET_FRAME::OnCopyThisOnSelectedMenuSelection( wxCommandEvent& event )
+{
+ wxString value = m_gridCompoSpreadSheet->GetCellValue( m_clickedRow, m_clickedColumn );
+
+ SetSelectedComponentsField( value );
+} // copyThisOnSelected.
+
+
+/*
+ * void COMPO_SPREADSHEET_FRAME::OnMenuSortAscendingSelection( wxCommandEvent& event )
+ * {
+ * if (m_clickedColumn<0) return; //Clicked on a row.
+ * wxString key=m_gridCompoSpreadSheet->GetColLabelValue(m_clickedColumn).BeforeFirst('\n');
+ * m_columnFilters[key].sortPriority=1; //set sort priority.
+ * m_columnFilters[key].sortType=SORT_UP;
+ * DataRefresh();
+ * }
+ * void COMPO_SPREADSHEET_FRAME::OnMenuSortDescendingSelection( wxCommandEvent& event )
+ * {
+ * if (m_clickedColumn<0) return; //Clicked on a row.
+ * wxString key=m_gridCompoSpreadSheet->GetColLabelValue(m_clickedColumn).BeforeFirst('\n');
+ * m_columnFilters[key].sortPriority=1; //set sort priority.
+ * m_columnFilters[key].sortType=SORT_DOWN;
+ * DataRefresh();
+ * }
+ *
+ */
+
+
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+
+// -------DIALOG FILTER---------??To be moved in another file under the eeschema/dialogs directory??
+
+COMPO_SPREADSHEET_DIALOG_FILTER::COMPO_SPREADSHEET_DIALOG_FILTER( wxWindow* aParent,
+ COMPO_SPREADSHEET_FRAME* aCsFrame,
+ wxString regex )
+ : COMPO_SPREADSHEET_DIALOG_FILTER_BASE( aParent )
+{
+ m_parent = aParent;
+ m_csFrame = aCsFrame;
+ m_FullRegex->SetValue( regex );
+}
+
+
+COMPO_SPREADSHEET_DIALOG_FILTER::~COMPO_SPREADSHEET_DIALOG_FILTER()
+{
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnCancelClicked( wxCommandEvent& event )
+{
+ Close(); // Show (false);
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnOKClicked( wxCommandEvent& event )
+{
+ int selectedPage = m_notebookRegexFilter->GetSelection();
+
+ // std::cout<< "Selected page: "<<selectedPage<<"\n";
+ switch( selectedPage )
+ {
+ case 0: // Advanced tab selected.
+ {
+ wxString regex;
+ regex = m_FullRegex->GetValue();
+ m_csFrame->SetLastClickedColumnFilter( regex );
+ // std::cout<<"Setting column filter to: "<<regex<<"\n";
+ m_csFrame->DataRefresh();
+ }
+ break;
+
+ case 1: // Simple tab selected
+ {
+ wxString simpleString = m_textCtrlSimpleRegex->GetValue();
+ wxString regex;
+
+ if( m_radioBtnStarts->GetValue() )
+ regex = "^" + simpleString + ".*";
+
+ if( m_radioBtnContains->GetValue() )
+ regex = ".*" + simpleString + ".*";
+
+ if( m_radioBtnEnds->GetValue() )
+ regex = ".*" + simpleString + "$";
+
+ m_csFrame->SetLastClickedColumnFilter( regex );
+ m_csFrame->DataRefresh();
+ }
+ break;
+
+ case 2: // Common tab selected: OK does nothing (there are callbacks for the keys).
+ break;
+
+ default:
+ break;
+ }
+
+ Close(); // Show (false);
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnEmptyFieldClick( wxCommandEvent& event )
+{
+ wxString regex = "^$"; // Regular expression for an empty string.
+
+ m_csFrame->SetLastClickedColumnFilter( regex );
+ m_csFrame->DataRefresh();
+ Close();
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnEndsWithQuestionMarkClicked( wxCommandEvent& event )
+{
+ wxString regex = ".*\\?$"; // Regular expression for "ending with question mark".
+
+ m_csFrame->SetLastClickedColumnFilter( regex );
+ m_csFrame->DataRefresh();
+ Close();
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::SetRegexStartWith( wxString start )
+{
+ wxString regex = "^" + start + ".*"; // Regex for 'start with.
+
+ m_csFrame->SetLastClickedColumnFilter( regex );
+ m_csFrame->DataRefresh();
+ Close();
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnStartsWithRClick( wxCommandEvent& event )
+{
+ SetRegexStartWith( "R" );
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnStartsWithCClicked( wxCommandEvent& event )
+{
+ SetRegexStartWith( "C" );
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnStartsWithLetterClick( wxCommandEvent& event )
+{
+ SetRegexStartWith( "[A-Za-z]" );
+}
+
+
+void COMPO_SPREADSHEET_DIALOG_FILTER::OnBtnDoesntStartWithLetterClick( wxCommandEvent& event )
+{
+ SetRegexStartWith( "([^A-Za-z])" );
+}
+
+
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+// ***************************************************************************************
+
+// FIXME: move to schframe.cpp??
+void SCH_EDIT_FRAME::setCursorOnComponent( const SCH_COMPONENT* aComponent,
+ SCH_SHEET_PATH* aSheetWithComponentFound,
+ bool aWarpMouse,
+ wxPoint aPos )
+{
+ bool centerAndRedraw = false;
+ wxPoint pos = aPos;
+
+ if( aComponent )
+ {
+ SCH_SHEET_PATH* sheet;
+ sheet = aSheetWithComponentFound;
+
+ if( *sheet != *m_CurrentSheet )
+ {
+ sheet->LastScreen()->SetZoom( GetScreen()->GetZoom() );
+ *m_CurrentSheet = *sheet;
+ m_CurrentSheet->UpdateAllScreenReferences();
+ centerAndRedraw = true;
+ }
+
+ wxPoint delta;
+ pos -= aComponent->GetPosition();
+ delta = aComponent->GetTransform().TransformCoordinate( pos );
+ pos = delta + aComponent->GetPosition();
+
+
+ /* There may be need to reframe the drawing */
+ if( !m_canvas->IsPointOnDisplay( pos ) )
+ {
+ centerAndRedraw = true;
+ }
+
+ if( centerAndRedraw )
+ {
+ SetCrossHairPosition( pos );
+ RedrawScreen( pos, aWarpMouse );
+ }
+ else
+ {
+ INSTALL_UNBUFFERED_DC( dc, m_canvas );
+
+ m_canvas->CrossHairOff( &dc );
+
+ if( aWarpMouse )
+ m_canvas->MoveCursor( pos );
+
+ SetCrossHairPosition( pos );
+
+ m_canvas->CrossHairOn( &dc );
+ }
+ }
+}
diff --git a/eeschema/compo_spreadsheet/compo_spreadsheet_frame.h b/eeschema/compo_spreadsheet/compo_spreadsheet_frame.h
new file mode 100644
index 0000000..0570bf4
--- /dev/null
+++ b/eeschema/compo_spreadsheet/compo_spreadsheet_frame.h
@@ -0,0 +1,181 @@
+/*
+ * This program source code file is part of KiCad, a free EDA CAD application.
+ *
+ * Copyright (C) 2016 CERN
+ * @author Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
+ * @author Maciej Suminski <maciej.suminski@xxxxxxx>
+ *
+ * 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 3
+ * 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:
+ * https://www.gnu.org/licenses/gpl-3.0.html
+ * or you may search the http://www.gnu.org website for the version 3 license,
+ * or you may write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __compo_spreadsheet_frame__
+#define __compo_spreadsheet_frame__
+
+
+/**
+ * @file Subclass of COMPO_SPREADSHEET_FRAME_BASE, which is generated by wxFormBuilder.
+ */
+
+#include "compo_spreadsheet_frame_base.h"
+#include "dialog_compo_spreadsheet_filter.h"
+// #include "sim_types.h"
+#include <kiway.h>
+#include <kiway_player.h>
+// #include <dialogs/dialog_sim_settings.h>
+
+#include <wx/event.h>
+
+#include <list>
+#include <memory>
+#include <map>
+// #include <sch_component.h>
+#include <sch_reference_list.h>
+
+#include <wx/colour.h>
+#include <regex>
+
+class SCH_EDIT_FRAME;
+class SCH_COMPONENT;
+
+/** Implementing COMPO_SPREADSHEET_FRAME */
+class COMPO_SPREADSHEET_FRAME : public COMPO_SPREADSHEET_FRAME_BASE
+{
+private:
+ typedef enum { SORT_UP, SORT_DOWN, SORT_NONE } t_sortType; ///< Sort type used in the column.
+ typedef struct
+ {
+ t_sortType sortType; ///< Sort type used in the column.
+ wxString regex; ///< String of the regular expression used in the column filter.
+ int sortPriority; ///< Sorting priority. 0 if no sorting is needed on this filter.
+ } t_filterColumn;
+
+ SCH_REFERENCE_LIST m_componentsList;
+ wxColour m_emptyCellColor; ///<Colour for a cell that does NOT have the field of the relative column.
+ wxColour m_filledCellColor; ///<Colour for a cell that has the field of the relative column.
+
+ bool m_disableNextSelection; ///< true if the next click on the grid will NOT select.
+ int m_clickedColumn; ///< Column right-clicked when the pop-up menu was enabled.
+ int m_clickedRow; ///< Row right-clicked when the pop-up menu was enabled.
+ std::map<wxString, t_filterColumn> m_columnFilters; ///< Filters on every column (regular expressions).
+
+
+ void AddOrUpdateField( int aRow, wxString aNewFieldName, wxString aNewFieldValue );
+
+ /// Sets a column filter.
+ void SetColumnFilter( int column, wxString value );
+
+ /// Resets all the column filters to default values.
+ void ResetFilters( void );
+
+ /// Empties a field of a selected compnent.
+ void EmptyField( int aRow, wxString aFieldName );
+
+protected:
+ /// Menu item selected callback: Edit filter.
+ void OnColumnLabelEditFilterMenuSelection( wxCommandEvent& event );
+
+ /// Set selected field in selected components.
+ void SetSelectedComponentsField( wxString value ); ///< Value to be set in all selected components in grid.
+
+public:
+ /** Constructor */
+ COMPO_SPREADSHEET_FRAME( KIWAY* aKiway, wxWindow* aParent );
+ ~COMPO_SPREADSHEET_FRAME();
+
+ /// Callback: A cell has been selected.
+ void OnSelectCell( wxGridEvent& event );
+
+ /// Callback: Copy field on selected components menu.
+ void OnCopyThisOnSelectedMenuSelection( wxCommandEvent& event );
+
+ /// Callback: Right click on a column or row label callback.
+ void OnGridLabelRightClick( wxGridEvent& event );
+
+ /// Callback: Right click on a cell.
+ void OnGridCellRightClick( wxGridEvent& event );
+
+ /// Callback: A cell value has been changed.
+ void OnGridCmdCellChange( wxGridEvent& event );
+
+ /// Refresh the component spreadsheet view and redraw the grid.
+ void DataRefresh( void );
+
+ /// Selects a row starting from a component.
+ void SelectComponentRow( SCH_COMPONENT* component );
+
+ /// Hides the selected column (on right click on the column label.
+ void OnHideColumnMenuSelection( wxCommandEvent& event );
+
+ /// Menu show hidden columns selected.
+ void OnMenuSelectionShowHiddenColumns( wxCommandEvent& event );
+
+ /// menu selected: reset all the column filters.
+ void OnMenuSelection_menuResetFilters( wxCommandEvent& event );
+
+ /// Popup menu on a cell, 'set this as filter' has been selected.
+ void OnMenuSelectionSetThisAsFilter( wxCommandEvent& event );
+
+ /// Popup menu 'clear filter' selected (column label)
+ void OnColumnLabelClearFilterMenuSelection( wxCommandEvent& event );
+
+ /// Callback:Show ALL in the 'view' menu item has been selected.
+ void OnShowAllMenuSelection( wxCommandEvent& event );
+
+ /// Pop up Menu callback: 'Delete selected field content'
+ void OnDeleteSelectedFieldsContent( wxCommandEvent& event );
+
+ // void OnMenuSortAscendingSelection( wxCommandEvent& event ); ///< Menu 'sort Ascending' clicked (right-button pop-up menu on column labels)
+ // void OnMenuSortDescendingSelection( wxCommandEvent& event ); ///< Menu 'sort Descending' clicked (right-button pop-up menu on column labels)
+
+ /// Disables the next automatic cursor movement on cell selection/move.
+ void DisableNextCursorMoveOnSelection( void );
+
+ /// Set column filter.
+ void SetLastClickedColumnFilter( wxString aValue );
+
+ /// Single key callback, to enable undo on ctrl-z. To be fully implemented.
+ void OnCompoSpreadSheetChar( wxKeyEvent& event );
+
+
+ SCH_EDIT_FRAME* m_schematicFrame;
+ KIWAY* m_kiway;
+};
+
+class COMPO_SPREADSHEET_DIALOG_FILTER : public COMPO_SPREADSHEET_DIALOG_FILTER_BASE
+{
+private:
+ int m_index; ///< FIXME. remove this.
+ COMPO_SPREADSHEET_FRAME* m_csFrame;
+ void SetRegexStartWith( wxString start );
+
+public:
+ COMPO_SPREADSHEET_DIALOG_FILTER( wxWindow* aParent,
+ COMPO_SPREADSHEET_FRAME* aCsFrame,
+ wxString regex );
+ ~COMPO_SPREADSHEET_DIALOG_FILTER();
+
+ void OnCancelClicked( wxCommandEvent& event );
+ void OnOKClicked( wxCommandEvent& event );
+ void OnBtnEmptyFieldClick( wxCommandEvent& event );
+ void OnBtnEndsWithQuestionMarkClicked( wxCommandEvent& event );
+ void OnBtnStartsWithCClicked( wxCommandEvent& event );
+ void OnBtnStartsWithRClick( wxCommandEvent& event );
+ void OnBtnStartsWithLetterClick( wxCommandEvent& event );
+ void OnBtnDoesntStartWithLetterClick( wxCommandEvent& event );
+};
+#endif // __compo_spreadsheet_frame__
diff --git a/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.cpp b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.cpp
new file mode 100644
index 0000000..6b7858a
--- /dev/null
+++ b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.cpp
@@ -0,0 +1,144 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 1 2016)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "compo_spreadsheet_frame_base.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+COMPO_SPREADSHEET_FRAME_BASE::COMPO_SPREADSHEET_FRAME_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : KIWAY_PLAYER( parent, id, title, pos, size, style, name )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer1;
+ bSizer1 = new wxBoxSizer( wxVERTICAL );
+
+ m_gridCompoSpreadSheet = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+
+ // Grid
+ m_gridCompoSpreadSheet->CreateGrid( 1, 1 );
+ m_gridCompoSpreadSheet->EnableEditing( true );
+ m_gridCompoSpreadSheet->EnableGridLines( true );
+ m_gridCompoSpreadSheet->EnableDragGridSize( true );
+ m_gridCompoSpreadSheet->SetMargins( 0, 0 );
+
+ // Columns
+ m_gridCompoSpreadSheet->AutoSizeColumns();
+ m_gridCompoSpreadSheet->EnableDragColMove( true );
+ m_gridCompoSpreadSheet->EnableDragColSize( true );
+ m_gridCompoSpreadSheet->SetColLabelSize( 30 );
+ m_gridCompoSpreadSheet->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Rows
+ m_gridCompoSpreadSheet->EnableDragRowSize( true );
+ m_gridCompoSpreadSheet->SetRowLabelSize( 80 );
+ m_gridCompoSpreadSheet->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+
+ // Label Appearance
+
+ // Cell Defaults
+ m_gridCompoSpreadSheet->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
+ m_RightCellClickPopupMenu = new wxMenu();
+ wxMenuItem* m_menuItemSetThisAsFilter;
+ m_menuItemSetThisAsFilter = new wxMenuItem( m_RightCellClickPopupMenu, wxID_SETFILTERONTHIS, wxString( _("Set column filter on this value") ) , wxEmptyString, wxITEM_NORMAL );
+ m_RightCellClickPopupMenu->Append( m_menuItemSetThisAsFilter );
+
+ m_RightCellClickPopupMenu->AppendSeparator();
+
+ wxMenuItem* m_menuItemCopyFieldToSelected;
+ m_menuItemCopyFieldToSelected = new wxMenuItem( m_RightCellClickPopupMenu, wxID_COPYFIELDTOSELECTED, wxString( _("Copy this field to SELECTED components") ) , wxEmptyString, wxITEM_NORMAL );
+ m_RightCellClickPopupMenu->Append( m_menuItemCopyFieldToSelected );
+
+ m_RightCellClickPopupMenu->AppendSeparator();
+
+ wxMenuItem* m_menuItemDeleteSelectedFieldsContent;
+ m_menuItemDeleteSelectedFieldsContent = new wxMenuItem( m_RightCellClickPopupMenu, wxID_ANY, wxString( _("Delete selected fields value") ) , wxEmptyString, wxITEM_NORMAL );
+ m_RightCellClickPopupMenu->Append( m_menuItemDeleteSelectedFieldsContent );
+
+ m_gridCompoSpreadSheet->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( COMPO_SPREADSHEET_FRAME_BASE::m_gridCompoSpreadSheetOnContextMenu ), NULL, this );
+
+ bSizer1->Add( m_gridCompoSpreadSheet, 1, wxALL|wxEXPAND, 5 );
+
+
+ this->SetSizer( bSizer1 );
+ this->Layout();
+ m_columnLabelMenu = new wxMenu();
+ wxMenuItem* m_columnLabelMenuFilter;
+ m_columnLabelMenuFilter = new wxMenuItem( m_columnLabelMenu, wxID_SETCOLFILTER, wxString( _("Edit Filter") ) , wxEmptyString, wxITEM_NORMAL );
+ m_columnLabelMenu->Append( m_columnLabelMenuFilter );
+
+ wxMenuItem* m_columnLabelClearFilter;
+ m_columnLabelClearFilter = new wxMenuItem( m_columnLabelMenu, wxID_CLEARFILTER, wxString( _("Reset Filter to default") ) , wxEmptyString, wxITEM_NORMAL );
+ m_columnLabelMenu->Append( m_columnLabelClearFilter );
+
+ wxMenuItem* m_columnLabelHideColumn;
+ m_columnLabelHideColumn = new wxMenuItem( m_columnLabelMenu, wxID_ANY, wxString( _("Hide column") ) , wxEmptyString, wxITEM_NORMAL );
+ m_columnLabelMenu->Append( m_columnLabelHideColumn );
+
+ this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( COMPO_SPREADSHEET_FRAME_BASE::COMPO_SPREADSHEET_FRAME_BASEOnContextMenu ), NULL, this );
+
+ m_menubar3 = new wxMenuBar( 0 );
+ m_viewMenu = new wxMenu();
+ wxMenuItem* m_menuItemShowColumns;
+ m_menuItemShowColumns = new wxMenuItem( m_viewMenu, wxID_ANY, wxString( _("Show All Columns") ) , wxEmptyString, wxITEM_NORMAL );
+ m_viewMenu->Append( m_menuItemShowColumns );
+
+ m_menubar3->Append( m_viewMenu, _("View") );
+
+ m_FiltersMenu = new wxMenu();
+ wxMenuItem* m_menuResetFilters;
+ m_menuResetFilters = new wxMenuItem( m_FiltersMenu, wxID_ANY, wxString( _("Reset All Filters (Show all uncommented components)") ) , wxEmptyString, wxITEM_NORMAL );
+ m_FiltersMenu->Append( m_menuResetFilters );
+
+ wxMenuItem* m_menuItemShowAll;
+ m_menuItemShowAll = new wxMenuItem( m_FiltersMenu, wxID_ANY, wxString( _("Show ALL (commented symbols included)") ) , wxEmptyString, wxITEM_NORMAL );
+ m_FiltersMenu->Append( m_menuItemShowAll );
+
+ m_menubar3->Append( m_FiltersMenu, _("Filters") );
+
+ this->SetMenuBar( m_menubar3 );
+
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_gridCompoSpreadSheet->Connect( wxEVT_CHAR, wxKeyEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnCompoSpreadSheetChar ), NULL, this );
+ m_gridCompoSpreadSheet->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridCellRightClick ), NULL, this );
+ m_gridCompoSpreadSheet->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridCmdCellChange ), NULL, this );
+ m_gridCompoSpreadSheet->Connect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridLabelRightClick ), NULL, this );
+ m_gridCompoSpreadSheet->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnSelectCell ), NULL, this );
+ this->Connect( m_menuItemSetThisAsFilter->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelectionSetThisAsFilter ) );
+ this->Connect( m_menuItemCopyFieldToSelected->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnCopyThisOnSelectedMenuSelection ) );
+ this->Connect( m_menuItemDeleteSelectedFieldsContent->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnDeleteSelectedFieldsContent ) );
+ this->Connect( m_columnLabelMenuFilter->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnColumnLabelEditFilterMenuSelection ) );
+ this->Connect( m_columnLabelClearFilter->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnColumnLabelClearFilterMenuSelection ) );
+ this->Connect( m_columnLabelHideColumn->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnHideColumnMenuSelection ) );
+ this->Connect( m_menuItemShowColumns->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelectionShowHiddenColumns ) );
+ this->Connect( m_menuResetFilters->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelection_menuResetFilters ) );
+ this->Connect( m_menuItemShowAll->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnShowAllMenuSelection ) );
+}
+
+COMPO_SPREADSHEET_FRAME_BASE::~COMPO_SPREADSHEET_FRAME_BASE()
+{
+ // Disconnect Events
+ m_gridCompoSpreadSheet->Disconnect( wxEVT_CHAR, wxKeyEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnCompoSpreadSheetChar ), NULL, this );
+ m_gridCompoSpreadSheet->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridCellRightClick ), NULL, this );
+ m_gridCompoSpreadSheet->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridCmdCellChange ), NULL, this );
+ m_gridCompoSpreadSheet->Disconnect( wxEVT_GRID_LABEL_RIGHT_CLICK, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnGridLabelRightClick ), NULL, this );
+ m_gridCompoSpreadSheet->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnSelectCell ), NULL, this );
+ this->Disconnect( wxID_SETFILTERONTHIS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelectionSetThisAsFilter ) );
+ this->Disconnect( wxID_COPYFIELDTOSELECTED, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnCopyThisOnSelectedMenuSelection ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnDeleteSelectedFieldsContent ) );
+ this->Disconnect( wxID_SETCOLFILTER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnColumnLabelEditFilterMenuSelection ) );
+ this->Disconnect( wxID_CLEARFILTER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnColumnLabelClearFilterMenuSelection ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnHideColumnMenuSelection ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelectionShowHiddenColumns ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnMenuSelection_menuResetFilters ) );
+ this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( COMPO_SPREADSHEET_FRAME_BASE::OnShowAllMenuSelection ) );
+
+ delete m_RightCellClickPopupMenu;
+ delete m_columnLabelMenu;
+}
diff --git a/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.fbp b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.fbp
new file mode 100644
index 0000000..4b6696f
--- /dev/null
+++ b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.fbp
@@ -0,0 +1,451 @@
+<?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">compo_spreadsheet_frame_base</property>
+ <property name="first_id">1000</property>
+ <property name="help_provider">none</property>
+ <property name="internationalize">1</property>
+ <property name="name">compoSpreadSheetFrameBase</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="Frame" 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">COMPO_SPREADSHEET_FRAME_BASE</property>
+ <property name="pos"></property>
+ <property name="size">775,448</property>
+ <property name="style">wxDEFAULT_FRAME_STYLE</property>
+ <property name="subclass">KIWAY_PLAYER; kiway_player.h</property>
+ <property name="title">Components Spreadsheet View</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name">Component Spreadsheet View</property>
+ <property name="window_style">wxALWAYS_SHOW_SB|wxTAB_TRAVERSAL|wxVSCROLL</property>
+ <property name="xrc_skip_sizer">1</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="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">bSizer1</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">1</property>
+ <property name="autosize_rows">0</property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption">Symbols</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">1</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"></property>
+ <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="cols">1</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">1</property>
+ <property name="docking">Left</property>
+ <property name="drag_col_move">1</property>
+ <property name="drag_col_size">1</property>
+ <property name="drag_grid_size">1</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">0</property>
+ <property name="name">m_gridCompoSpreadSheet</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">80</property>
+ <property name="row_label_values"></property>
+ <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
+ <property name="row_sizes"></property>
+ <property name="rows">1</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">wxHSCROLL|wxVSCROLL</property>
+ <event name="OnChar">OnCompoSpreadSheetChar</event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnGridCellChange"></event>
+ <event name="OnGridCellLeftClick"></event>
+ <event name="OnGridCellLeftDClick"></event>
+ <event name="OnGridCellRightClick">OnGridCellRightClick</event>
+ <event name="OnGridCellRightDClick"></event>
+ <event name="OnGridCmdCellChange">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">OnGridLabelRightClick</event>
+ <event name="OnGridLabelRightDClick"></event>
+ <event name="OnGridRangeSelect"></event>
+ <event name="OnGridRowSize"></event>
+ <event name="OnGridSelectCell">OnSelectCell</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="wxMenu" expanded="1">
+ <property name="label">MyMenu</property>
+ <property name="name">m_RightCellClickPopupMenu</property>
+ <property name="permission">protected</property>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_SETFILTERONTHIS</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Set column filter on this value</property>
+ <property name="name">m_menuItemSetThisAsFilter</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnMenuSelectionSetThisAsFilter</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="separator" expanded="1">
+ <property name="name">m_separator1</property>
+ <property name="permission">none</property>
+ </object>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_COPYFIELDTOSELECTED</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Copy this field to SELECTED components</property>
+ <property name="name">m_menuItemCopyFieldToSelected</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnCopyThisOnSelectedMenuSelection</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="separator" expanded="1">
+ <property name="name">m_separator2</property>
+ <property name="permission">none</property>
+ </object>
+ <object class="wxMenuItem" expanded="1">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Delete selected fields value</property>
+ <property name="name">m_menuItemDeleteSelectedFieldsContent</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnDeleteSelectedFieldsContent</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="wxMenu" expanded="1">
+ <property name="label">Filter</property>
+ <property name="name">m_columnLabelMenu</property>
+ <property name="permission">protected</property>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_SETCOLFILTER</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Edit Filter</property>
+ <property name="name">m_columnLabelMenuFilter</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnColumnLabelEditFilterMenuSelection</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_CLEARFILTER</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Reset Filter to default</property>
+ <property name="name">m_columnLabelClearFilter</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnColumnLabelClearFilterMenuSelection</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Hide column</property>
+ <property name="name">m_columnLabelHideColumn</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnHideColumnMenuSelection</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="wxMenuBar" expanded="1">
+ <property name="bg"></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="label">MyMenuBar</property>
+ <property name="maximum_size"></property>
+ <property name="minimum_size"></property>
+ <property name="name">m_menubar3</property>
+ <property name="permission">protected</property>
+ <property name="pos"></property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass"></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 class="wxMenu" expanded="0">
+ <property name="label">View</property>
+ <property name="name">m_viewMenu</property>
+ <property name="permission">protected</property>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Show All Columns</property>
+ <property name="name">m_menuItemShowColumns</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnMenuSelectionShowHiddenColumns</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="wxMenu" expanded="1">
+ <property name="label">Filters</property>
+ <property name="name">m_FiltersMenu</property>
+ <property name="permission">protected</property>
+ <object class="wxMenuItem" expanded="1">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Reset All Filters (Show all uncommented components)</property>
+ <property name="name">m_menuResetFilters</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnMenuSelection_menuResetFilters</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="wxMenuItem" expanded="1">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Show ALL (commented symbols included)</property>
+ <property name="name">m_menuItemShowAll</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnShowAllMenuSelection</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</wxFormBuilder_Project>
diff --git a/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.h b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.h
new file mode 100644
index 0000000..2181def
--- /dev/null
+++ b/eeschema/compo_spreadsheet/compo_spreadsheet_frame_base.h
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 1 2016)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __COMPO_SPREADSHEET_FRAME_BASE_H__
+#define __COMPO_SPREADSHEET_FRAME_BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class KIWAY_PLAYER;
+
+#include "kiway_player.h"
+#include <wx/string.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/menu.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/font.h>
+#include <wx/grid.h>
+#include <wx/gdicmn.h>
+#include <wx/sizer.h>
+#include <wx/frame.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+#define wxID_SETFILTERONTHIS 1000
+#define wxID_COPYFIELDTOSELECTED 1001
+#define wxID_SETCOLFILTER 1002
+#define wxID_CLEARFILTER 1003
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class COMPO_SPREADSHEET_FRAME_BASE
+///////////////////////////////////////////////////////////////////////////////
+class COMPO_SPREADSHEET_FRAME_BASE : public KIWAY_PLAYER
+{
+ private:
+
+ protected:
+ wxGrid* m_gridCompoSpreadSheet;
+ wxMenu* m_RightCellClickPopupMenu;
+ wxMenu* m_columnLabelMenu;
+ wxMenuBar* m_menubar3;
+ wxMenu* m_viewMenu;
+ wxMenu* m_FiltersMenu;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnCompoSpreadSheetChar( wxKeyEvent& event ) { event.Skip(); }
+ virtual void OnGridCellRightClick( wxGridEvent& event ) { event.Skip(); }
+ virtual void OnGridCmdCellChange( wxGridEvent& event ) { event.Skip(); }
+ virtual void OnGridLabelRightClick( wxGridEvent& event ) { event.Skip(); }
+ virtual void OnSelectCell( wxGridEvent& event ) { event.Skip(); }
+ virtual void OnMenuSelectionSetThisAsFilter( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCopyThisOnSelectedMenuSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnDeleteSelectedFieldsContent( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnColumnLabelEditFilterMenuSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnColumnLabelClearFilterMenuSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnHideColumnMenuSelection( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuSelectionShowHiddenColumns( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnMenuSelection_menuResetFilters( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnShowAllMenuSelection( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ COMPO_SPREADSHEET_FRAME_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Components Spreadsheet View"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 775,448 ), long style = wxDEFAULT_FRAME_STYLE|wxALWAYS_SHOW_SB|wxTAB_TRAVERSAL|wxVSCROLL, const wxString& name = wxT("Component Spreadsheet View") );
+
+ ~COMPO_SPREADSHEET_FRAME_BASE();
+
+ void m_gridCompoSpreadSheetOnContextMenu( wxMouseEvent &event )
+ {
+ m_gridCompoSpreadSheet->PopupMenu( m_RightCellClickPopupMenu, event.GetPosition() );
+ }
+
+ void COMPO_SPREADSHEET_FRAME_BASEOnContextMenu( wxMouseEvent &event )
+ {
+ this->PopupMenu( m_columnLabelMenu, event.GetPosition() );
+ }
+
+};
+
+#endif //__COMPO_SPREADSHEET_FRAME_BASE_H__
diff --git a/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.cpp b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.cpp
new file mode 100644
index 0000000..221036d
--- /dev/null
+++ b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.cpp
@@ -0,0 +1,135 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 1 2016)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "dialog_compo_spreadsheet_filter.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+COMPO_SPREADSHEET_DIALOG_FILTER_BASE::COMPO_SPREADSHEET_DIALOG_FILTER_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+ this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+ wxBoxSizer* bSizer3;
+ bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_notebookRegexFilter = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+ m_panelFullRegex = new wxPanel( m_notebookRegexFilter, wxID_REGEX_ENTER, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer31;
+ bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText2 = new wxStaticText( m_panelFullRegex, wxID_ANY, _("Regular expression"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText2->Wrap( -1 );
+ bSizer31->Add( m_staticText2, 0, wxALL, 5 );
+
+ m_FullRegex = new wxTextCtrl( m_panelFullRegex, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer31->Add( m_FullRegex, 1, wxALL, 5 );
+
+
+ m_panelFullRegex->SetSizer( bSizer31 );
+ m_panelFullRegex->Layout();
+ bSizer31->Fit( m_panelFullRegex );
+ m_notebookRegexFilter->AddPage( m_panelFullRegex, _("Advanced"), false );
+ m_panelSimple = new wxPanel( m_notebookRegexFilter, wxSIMPLE_ENTER, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer5;
+ bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer8;
+ bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_radioBtnStarts = new wxRadioButton( m_panelSimple, wxID_ANY, _("Starts with"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer8->Add( m_radioBtnStarts, 0, wxALL, 5 );
+
+ m_radioBtnContains = new wxRadioButton( m_panelSimple, wxID_ANY, _("Contains"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer8->Add( m_radioBtnContains, 0, wxALL, 5 );
+
+ m_radioBtnEnds = new wxRadioButton( m_panelSimple, wxID_ANY, _("Ends with"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer8->Add( m_radioBtnEnds, 0, wxALL, 5 );
+
+
+ bSizer5->Add( bSizer8, 1, wxEXPAND, 5 );
+
+ m_textCtrlSimpleRegex = new wxTextCtrl( m_panelSimple, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer5->Add( m_textCtrlSimpleRegex, 0, wxALL|wxEXPAND, 5 );
+
+
+ m_panelSimple->SetSizer( bSizer5 );
+ m_panelSimple->Layout();
+ bSizer5->Fit( m_panelSimple );
+ m_notebookRegexFilter->AddPage( m_panelSimple, _("Simple"), false );
+ m_panelCommon = new wxPanel( m_notebookRegexFilter, wxID_COMMON, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxGridSizer* gSizer1;
+ gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
+
+ m_btnEmptyField = new wxButton( m_panelCommon, wxID_ANY, _("Empty field"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnEmptyField, 1, wxALL|wxEXPAND, 5 );
+
+ m_btnEndsWithQuestionMark = new wxButton( m_panelCommon, wxID_ANY, _("Ends with '?'"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnEndsWithQuestionMark, 1, wxALL|wxEXPAND, 5 );
+
+ m_btnStartsWithR = new wxButton( m_panelCommon, wxID_ANY, _("Starts with R"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnStartsWithR, 0, wxALL|wxEXPAND, 5 );
+
+ m_btnStartsWithC = new wxButton( m_panelCommon, wxID_ANY, _("Starts with C"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnStartsWithC, 0, wxALL|wxEXPAND, 5 );
+
+ m_btnStartsWithLetter = new wxButton( m_panelCommon, wxID_ANY, _("Starts With Letter"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnStartsWithLetter, 0, wxALL|wxEXPAND, 5 );
+
+ m_btnDontStartWithLetter = new wxButton( m_panelCommon, wxID_ANY, _("Doesn't Start With Letter"), wxDefaultPosition, wxDefaultSize, 0 );
+ gSizer1->Add( m_btnDontStartWithLetter, 0, wxALL|wxEXPAND, 5 );
+
+
+ m_panelCommon->SetSizer( gSizer1 );
+ m_panelCommon->Layout();
+ gSizer1->Fit( m_panelCommon );
+ m_notebookRegexFilter->AddPage( m_panelCommon, _("Common"), true );
+
+ bSizer3->Add( m_notebookRegexFilter, 1, wxEXPAND | wxALL, 5 );
+
+ wxBoxSizer* bSizer4;
+ bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+ m_btnRegexOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_btnRegexOK->SetDefault();
+ bSizer4->Add( m_btnRegexOK, 0, wxALIGN_RIGHT|wxALL, 5 );
+
+ m_btnRegexCancel = new wxButton( this, wxID_CANCEL, _("CANCEL"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer4->Add( m_btnRegexCancel, 0, wxALIGN_RIGHT|wxALL|wxBOTTOM, 5 );
+
+
+ bSizer3->Add( bSizer4, 0, wxALIGN_RIGHT, 5 );
+
+
+ this->SetSizer( bSizer3 );
+ this->Layout();
+
+ this->Centre( wxBOTH );
+
+ // Connect Events
+ m_btnEmptyField->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnEmptyFieldClick ), NULL, this );
+ m_btnEndsWithQuestionMark->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnEndsWithQuestionMarkClicked ), NULL, this );
+ m_btnStartsWithR->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithRClick ), NULL, this );
+ m_btnStartsWithC->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithCClicked ), NULL, this );
+ m_btnStartsWithLetter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithLetterClick ), NULL, this );
+ m_btnDontStartWithLetter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnDoesntStartWithLetterClick ), NULL, this );
+ m_btnRegexOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnOKClicked ), NULL, this );
+ m_btnRegexCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnCancelClicked ), NULL, this );
+}
+
+COMPO_SPREADSHEET_DIALOG_FILTER_BASE::~COMPO_SPREADSHEET_DIALOG_FILTER_BASE()
+{
+ // Disconnect Events
+ m_btnEmptyField->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnEmptyFieldClick ), NULL, this );
+ m_btnEndsWithQuestionMark->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnEndsWithQuestionMarkClicked ), NULL, this );
+ m_btnStartsWithR->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithRClick ), NULL, this );
+ m_btnStartsWithC->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithCClicked ), NULL, this );
+ m_btnStartsWithLetter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnStartsWithLetterClick ), NULL, this );
+ m_btnDontStartWithLetter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnBtnDoesntStartWithLetterClick ), NULL, this );
+ m_btnRegexOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnOKClicked ), NULL, this );
+ m_btnRegexCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( COMPO_SPREADSHEET_DIALOG_FILTER_BASE::OnCancelClicked ), NULL, this );
+
+}
diff --git a/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.fbp b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.fbp
new file mode 100644
index 0000000..c78b1ae
--- /dev/null
+++ b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.fbp
@@ -0,0 +1,1699 @@
+<?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_compo_spreadsheet_filter</property>
+ <property name="first_id">1000</property>
+ <property name="help_provider">none</property>
+ <property name="internationalize">1</property>
+ <property name="name">compoSpreadsheetFilter</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="Frame" 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">COMPO_SPREADSHEET_DIALOG_FILTER_BASE</property>
+ <property name="pos"></property>
+ <property name="size">530,192</property>
+ <property name="style">wxFRAME_FLOAT_ON_PARENT</property>
+ <property name="subclass"></property>
+ <property name="title">Set Column Filter</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxTAB_TRAVERSAL</property>
+ <property name="xrc_skip_sizer">1</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="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">bSizer3</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND | wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxNotebook" 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="bitmapsize"></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_notebookRegexFilter</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>
+ <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="OnNotebookPageChanged"></event>
+ <event name="OnNotebookPageChanging"></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="notebookpage" expanded="1">
+ <property name="bitmap"></property>
+ <property name="label">Advanced</property>
+ <property name="select">0</property>
+ <object class="wxPanel" 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_REGEX_ENTER</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_panelFullRegex</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="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">wxTAB_TRAVERSAL</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">bSizer31</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="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">Regular expression</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">wxALL</property>
+ <property name="proportion">1</property>
+ <object class="wxTextCtrl" 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="maxlength"></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_FullRegex</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="value"></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="OnText"></event>
+ <event name="OnTextEnter"></event>
+ <event name="OnTextMaxLen"></event>
+ <event name="OnTextURL"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="notebookpage" expanded="1">
+ <property name="bitmap"></property>
+ <property name="label">Simple</property>
+ <property name="select">0</property>
+ <object class="wxPanel" 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">wxSIMPLE_ENTER</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_panelSimple</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="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">wxTAB_TRAVERSAL</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">bSizer5</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</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer8</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="wxRadioButton" 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">Starts with</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_radioBtnStarts</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="value">0</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="OnRadioButton"></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="wxRadioButton" 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">Contains</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_radioBtnContains</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="value">0</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="OnRadioButton"></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="wxRadioButton" 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">Ends with</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_radioBtnEnds</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="value">0</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="OnRadioButton"></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">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxTextCtrl" 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="maxlength"></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_textCtrlSimpleRegex</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="value"></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="OnText"></event>
+ <event name="OnTextEnter"></event>
+ <event name="OnTextMaxLen"></event>
+ <event name="OnTextURL"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="notebookpage" expanded="1">
+ <property name="bitmap"></property>
+ <property name="label">Common</property>
+ <property name="select">1</property>
+ <object class="wxPanel" 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_COMMON</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_panelCommon</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="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">wxTAB_TRAVERSAL</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="wxGridSizer" expanded="1">
+ <property name="cols">2</property>
+ <property name="hgap">0</property>
+ <property name="minimum_size"></property>
+ <property name="name">gSizer1</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|wxEXPAND</property>
+ <property name="proportion">1</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">Empty field</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_btnEmptyField</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">OnBtnEmptyFieldClick</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|wxEXPAND</property>
+ <property name="proportion">1</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">Ends with '?'</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_btnEndsWithQuestionMark</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">OnBtnEndsWithQuestionMarkClicked</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|wxEXPAND</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">Starts with R</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_btnStartsWithR</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">OnBtnStartsWithRClick</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|wxEXPAND</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">Starts with C</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_btnStartsWithC</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">OnBtnStartsWithCClicked</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|wxEXPAND</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">Starts With Letter</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_btnStartsWithLetter</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">OnBtnStartsWithLetterClick</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|wxEXPAND</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">Doesn't Start With Letter</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_btnDontStartWithLetter</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">OnBtnDoesntStartWithLetterClick</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="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_RIGHT</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="1">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer4</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="1">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_RIGHT|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">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">OK</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_btnRegexOK</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">OnOKClicked</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">wxALIGN_RIGHT|wxALL|wxBOTTOM</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_CANCEL</property>
+ <property name="label">CANCEL</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_btnRegexCancel</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">OnCancelClicked</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>
+</wxFormBuilder_Project>
diff --git a/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.h b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.h
new file mode 100644
index 0000000..97c3722
--- /dev/null
+++ b/eeschema/compo_spreadsheet/dialog_compo_spreadsheet_filter.h
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Oct 1 2016)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOG_COMPO_SPREADSHEET_FILTER_H__
+#define __DIALOG_COMPO_SPREADSHEET_FILTER_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.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/textctrl.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/radiobut.h>
+#include <wx/button.h>
+#include <wx/notebook.h>
+#include <wx/frame.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+#define wxID_REGEX_ENTER 1000
+#define wxSIMPLE_ENTER 1001
+#define wxID_COMMON 1002
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class COMPO_SPREADSHEET_DIALOG_FILTER_BASE
+///////////////////////////////////////////////////////////////////////////////
+class COMPO_SPREADSHEET_DIALOG_FILTER_BASE : public wxFrame
+{
+ private:
+
+ protected:
+ wxNotebook* m_notebookRegexFilter;
+ wxPanel* m_panelFullRegex;
+ wxStaticText* m_staticText2;
+ wxTextCtrl* m_FullRegex;
+ wxPanel* m_panelSimple;
+ wxRadioButton* m_radioBtnStarts;
+ wxRadioButton* m_radioBtnContains;
+ wxRadioButton* m_radioBtnEnds;
+ wxTextCtrl* m_textCtrlSimpleRegex;
+ wxPanel* m_panelCommon;
+ wxButton* m_btnEmptyField;
+ wxButton* m_btnEndsWithQuestionMark;
+ wxButton* m_btnStartsWithR;
+ wxButton* m_btnStartsWithC;
+ wxButton* m_btnStartsWithLetter;
+ wxButton* m_btnDontStartWithLetter;
+ wxButton* m_btnRegexOK;
+ wxButton* m_btnRegexCancel;
+
+ // Virtual event handlers, overide them in your derived class
+ virtual void OnBtnEmptyFieldClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBtnEndsWithQuestionMarkClicked( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBtnStartsWithRClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBtnStartsWithCClicked( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBtnStartsWithLetterClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnBtnDoesntStartWithLetterClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnOKClicked( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnCancelClicked( wxCommandEvent& event ) { event.Skip(); }
+
+
+ public:
+
+ COMPO_SPREADSHEET_DIALOG_FILTER_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Set Column Filter"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 530,192 ), long style = wxFRAME_FLOAT_ON_PARENT|wxTAB_TRAVERSAL );
+
+ ~COMPO_SPREADSHEET_DIALOG_FILTER_BASE();
+
+};
+
+#endif //__DIALOG_COMPO_SPREADSHEET_FILTER_H__
diff --git a/eeschema/controle.cpp b/eeschema/controle.cpp
index 1cc8072..70dde2a 100644
--- a/eeschema/controle.cpp
+++ b/eeschema/controle.cpp
@@ -46,7 +46,7 @@
#include <sch_sheet_path.h>
#include <sch_marker.h>
#include <sch_component.h>
-
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KICAD_T aFilterList[],
int aHotKeyCommandId )
@@ -89,6 +89,14 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC
case SCH_COMPONENT_T:
component = (SCH_COMPONENT*) item;
SendMessageToPCBNEW( item, component );
+
+ // Inform the component spreadsheet window about the component clicked.
+ { COMPO_SPREADSHEET_FRAME* csFrame;
+ csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player( FRAME_COMPO_SPREADSHEET, false );
+ if (csFrame) //component spreadsheet frame exists, send a signal...
+ { csFrame->SelectComponentRow( (SCH_COMPONENT*) item );
+ }
+ }
break;
case LIB_PIN_T:
diff --git a/eeschema/dialogs/dialog_annotate.cpp b/eeschema/dialogs/dialog_annotate.cpp
index 5ea48de..6685f50 100644
--- a/eeschema/dialogs/dialog_annotate.cpp
+++ b/eeschema/dialogs/dialog_annotate.cpp
@@ -36,6 +36,8 @@
#include <dialog_annotate_base.h>
#include <kiface_i.h>
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
+
#define KEY_ANNOTATE_SORT_OPTION wxT( "AnnotateSortOption" )
#define KEY_ANNOTATE_ALGO_OPTION wxT( "AnnotateAlgoOption" )
#define KEY_ANNOTATE_KEEP_OPEN_OPTION wxT( "AnnotateKeepOpenOption" )
@@ -224,6 +226,12 @@ void DIALOG_ANNOTATE::OnApplyClick( wxCommandEvent& event )
GetResetItems() , true, GetLockUnits() );
m_Parent->GetCanvas()->Refresh();
+ // update spreadsheet component view, if it is visible.
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame){
+ csFrame->DataRefresh();
+ }
+
m_btnClear->Enable();
if( !GetAnnotateKeepOpen() )
diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp
index 66d17b3..4ff0661 100644
--- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp
+++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp
@@ -49,6 +49,7 @@
#ifdef KICAD_SPICE
#include <dialog_spice_model.h>
#include <netlist_exporter_pspice.h>
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
#endif /* KICAD_SPICE */
@@ -500,6 +501,12 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event
m_parent->GetScreen()->TestDanglingEnds();
EndQuasiModal( wxID_OK );
+
+ // Refresh the compo spreadsheet frame (if it is open)
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame) {
+ csFrame->DataRefresh();
+ }
}
diff --git a/eeschema/dialogs/dialog_edit_one_field.cpp b/eeschema/dialogs/dialog_edit_one_field.cpp
index 3ee5f1e..68ae54a 100644
--- a/eeschema/dialogs/dialog_edit_one_field.cpp
+++ b/eeschema/dialogs/dialog_edit_one_field.cpp
@@ -45,6 +45,7 @@
#include <sch_validators.h>
#include <dialog_edit_one_field.h>
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
// These should probably moved into some other file as helpers.
@@ -275,4 +276,12 @@ void DIALOG_SCH_EDIT_ONE_FIELD::UpdateField( SCH_FIELD* aField, SCH_SHEET_PATH*
aField->SetText( m_text );
updateText( aField );
+
+ // Update the compo spreadsheet frame (if it is open)
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame) {
+ csFrame->DataRefresh();
+ }
+
+
}
diff --git a/eeschema/eeschema.cpp b/eeschema/eeschema.cpp
index 7f21b16..840b3ac 100644
--- a/eeschema/eeschema.cpp
+++ b/eeschema/eeschema.cpp
@@ -48,6 +48,8 @@
#include <kiway.h>
#include <sim/sim_plot_frame.h>
+#include "compo_spreadsheet/compo_spreadsheet_frame.h"
+
// The main sheet of the project
SCH_SHEET* g_RootSheet = NULL;
@@ -102,6 +104,13 @@ static struct IFACE : public KIFACE_I
break;
#endif /* KICAD_SPICE */
+ case FRAME_COMPO_SPREADSHEET:
+ {
+ COMPO_SPREADSHEET_FRAME* frame = new COMPO_SPREADSHEET_FRAME( aKiway, aParent );
+ return frame;
+ }
+
+
case FRAME_SCH_VIEWER:
case FRAME_SCH_VIEWER_MODAL:
{
diff --git a/eeschema/eeschema_id.h b/eeschema/eeschema_id.h
index 33dda9f..3fba371 100644
--- a/eeschema/eeschema_id.h
+++ b/eeschema/eeschema_id.h
@@ -264,6 +264,7 @@ enum id_eeschema_frm
ID_SIM_ADD_SIGNALS,
ID_SIM_SHOW,
+ ID_EXPERIMENT,
ID_END_EESCHEMA_ID_LIST
};
diff --git a/eeschema/find.cpp b/eeschema/find.cpp
index 6515cda..78e2ab0 100644
--- a/eeschema/find.cpp
+++ b/eeschema/find.cpp
@@ -116,7 +116,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
SCH_ITEM* item = NULL;
SCH_COMPONENT* Component = NULL;
wxPoint pos;
- bool centerAndRedraw = false;
+ //bool centerAndRedraw = false;
bool notFound = true;
LIB_PIN* pin;
SCH_SHEET_LIST sheetList( g_RootSheet );
@@ -183,7 +183,8 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
if( notFound == false )
break;
}
-
+ setCursorOnComponent (Component, sheetWithComponentFound, aWarpMouse, pos);
+/*
if( Component )
{
sheet = sheetWithComponentFound;
@@ -202,7 +203,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
pos = delta + Component->GetPosition();
- /* There may be need to reframe the drawing */
+ There may be need to reframe the drawing
if( ! m_canvas->IsPointOnDisplay( pos ) )
{
centerAndRedraw = true;
@@ -228,7 +229,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
m_canvas->CrossHairOn( &dc );
}
}
-
+*/
/* Print diag */
wxString msg_item;
diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp
index 72a3241..3282513 100644
--- a/eeschema/menubar.cpp
+++ b/eeschema/menubar.cpp
@@ -501,6 +501,11 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_("Simula&tor"), _( "Simulate the circuit" ),
KiBitmap( simulator_xpm ) );
#endif /* KICAD_SPICE */
+ // Simulator
+ AddMenuItem( toolsMenu,
+ ID_EXPERIMENT,
+ _("Component Spreadsheet"), _( "View and edit the component table" ),
+ KiBitmap( simulator_xpm ) );
// Help Menu:
wxMenu* helpMenu = new wxMenu;
diff --git a/eeschema/operations_on_items_lists.cpp b/eeschema/operations_on_items_lists.cpp
index 6f0b790..1416587 100644
--- a/eeschema/operations_on_items_lists.cpp
+++ b/eeschema/operations_on_items_lists.cpp
@@ -43,7 +43,7 @@
#include <sch_component.h>
#include <sch_junction.h>
-
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
void SetSchItemParent( SCH_ITEM* Struct, SCH_SCREEN* Screen )
{
switch( Struct->Type() )
@@ -178,6 +178,14 @@ void SCH_EDIT_FRAME::DeleteItem( SCH_ITEM* aItem )
screen->Remove( aItem );
SaveCopyInUndoList( aItem, UR_DELETED );
m_canvas->RefreshDrawingRect( aItem->GetBoundingBox() );
+
+
+ // Update the compo spreadsheet frame (if it is open). ...Is it better to move this in some other point?
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame) {
+ csFrame->DisableNextCursorMoveOnSelection();
+ csFrame->DataRefresh();
+ }
}
}
diff --git a/eeschema/schematic_undo_redo.cpp b/eeschema/schematic_undo_redo.cpp
index 1f7da2e..0837ea7 100644
--- a/eeschema/schematic_undo_redo.cpp
+++ b/eeschema/schematic_undo_redo.cpp
@@ -41,6 +41,7 @@
#include <sch_component.h>
#include <sch_sheet.h>
#include <sch_bitmap.h>
+#include <compo_spreadsheet/compo_spreadsheet_frame.h>
/* Functions to undo and redo edit commands.
@@ -355,6 +356,14 @@ void SCH_EDIT_FRAME::GetSchematicFromUndoList( wxCommandEvent& event )
SetSheetNumberAndCount();
GetScreen()->TestDanglingEnds();
+
+ // update spreadsheet component view, if it is visible.
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame){
+ csFrame->DisableNextCursorMoveOnSelection();
+ csFrame->DataRefresh();
+ }
+
m_canvas->Refresh();
}
@@ -378,5 +387,12 @@ void SCH_EDIT_FRAME::GetSchematicFromRedoList( wxCommandEvent& event )
SetSheetNumberAndCount();
GetScreen()->TestDanglingEnds();
+
+ // update spreadsheet component view, if it is visible.
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame) {
+ csFrame->DisableNextCursorMoveOnSelection();
+ csFrame->DataRefresh();
+ }
m_canvas->Refresh();
}
diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp
index 09329f7..3ac69bf 100644
--- a/eeschema/schframe.cpp
+++ b/eeschema/schframe.cpp
@@ -53,6 +53,7 @@
#include <sch_sheet.h>
#include <sch_sheet_path.h>
#include "sim/sim_plot_frame.h"
+#include "compo_spreadsheet/compo_spreadsheet_frame.h"
#include <invoke_sch_dialog.h>
#include <dialogs/dialog_schematic_find.h>
@@ -287,6 +288,8 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_SIM_PROBE, SCH_EDIT_FRAME::OnSelectTool )
EVT_TOOL( ID_SIM_TUNE, SCH_EDIT_FRAME::OnSelectTool )
#endif /* KICAD_SPICE */
+
+ EVT_TOOL( ID_EXPERIMENT, SCH_EDIT_FRAME::OnCompoSpreadSheet )
EVT_MENU( ID_CANCEL_CURRENT_COMMAND, SCH_EDIT_FRAME::OnCancelCurrentCommand )
EVT_MENU( ID_SCH_DRAG_ITEM, SCH_EDIT_FRAME::OnDragItem )
@@ -629,6 +632,11 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
if( simFrame && !simFrame->Close() ) // Can close the simulator?
return;
+ COMPO_SPREADSHEET_FRAME* csFrame = ( COMPO_SPREADSHEET_FRAME*) Kiway().Player( FRAME_COMPO_SPREADSHEET, false );
+ if( csFrame)
+ { if ( !csFrame->Close() ) //can close compo sheet frame?
+ return;
+ }
SCH_SHEET_LIST sheetList( g_RootSheet );
if( sheetList.IsModified() )
@@ -1295,7 +1303,7 @@ void SCH_EDIT_FRAME::addCurrentItemToList( bool aRedraw )
}
if( item->IsNew() )
- {
+ {
if( item->Type() == SCH_SHEET_T )
{
// Fix the size and position of the new sheet using the last values set by
@@ -1357,8 +1365,17 @@ void SCH_EDIT_FRAME::addCurrentItemToList( bool aRedraw )
if( aRedraw )
GetCanvas()->Refresh();
-}
+ if( item->Type() == SCH_COMPONENT_T )
+ { // update spreadsheet component view, if it is visible.
+ COMPO_SPREADSHEET_FRAME * csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player (FRAME_COMPO_SPREADSHEET, false);
+ if (csFrame){
+ csFrame->DisableNextCursorMoveOnSelection();
+ csFrame->DataRefresh();
+ csFrame->SelectComponentRow( (SCH_COMPONENT*) item );
+ }
+ }
+}
void SCH_EDIT_FRAME::UpdateTitle()
{
@@ -1389,3 +1406,20 @@ void SCH_EDIT_FRAME::UpdateTitle()
SetTitle( title );
}
+
+void SCH_EDIT_FRAME::OnCompoSpreadSheet( wxCommandEvent& event )
+{
+ COMPO_SPREADSHEET_FRAME* csFrame;
+ csFrame = (COMPO_SPREADSHEET_FRAME*) Kiway().Player( FRAME_COMPO_SPREADSHEET, true );
+
+ if (csFrame)
+ {
+ csFrame->Show( true );
+ // On Windows, Raise() does not bring the window on screen, when iconized
+ if( csFrame->IsIconized() )
+ csFrame->Iconize( false );
+ csFrame->Raise();
+ }
+ else
+ DisplayInfoMessage(NULL, _( "Unable to open component spreadsheet!!" ) );
+}
diff --git a/eeschema/schframe.h b/eeschema/schframe.h
index a75ff84..fa7c377 100644
--- a/eeschema/schframe.h
+++ b/eeschema/schframe.h
@@ -471,6 +471,12 @@ public:
SCH_SEARCH_T aSearchType,
const wxString& aSearchText,
bool aWarpMouse );
+ /**
+ * Function setCursorOnComponent
+ * Moves the cursor on a specified component.
+ * @param aComponent: The component to move the cursor to.
+ */
+ void setCursorOnComponent (const SCH_COMPONENT* aComponent, SCH_SHEET_PATH* aSheetWithComponentFound, bool aWarpMouse, wxPoint aPos);
/**
* Function SendMessageToPcbnew
@@ -807,6 +813,11 @@ private:
void OnCreateNetlist( wxCommandEvent& event );
void OnUpdatePCB( wxCommandEvent& event );
void OnSimulate( wxCommandEvent& event );
+
+
+ void OnCompoSpreadSheet ( wxCommandEvent& event );
+
+
void OnCreateBillOfMaterials( wxCommandEvent& event );
void OnFindItems( wxCommandEvent& event );
void OnFindDialogClose( wxFindDialogEvent& event );
diff --git a/include/frame_type.h b/include/frame_type.h
index ca0d181..ad53f53 100644
--- a/include/frame_type.h
+++ b/include/frame_type.h
@@ -38,6 +38,8 @@ enum FRAME_T
FRAME_SCH_VIEWER,
FRAME_SCH_VIEWER_MODAL,
FRAME_SIMULATOR,
+
+ FRAME_COMPO_SPREADSHEET,
FRAME_PCB,
FRAME_PCB_MODULE_EDITOR,
--------------2.1.4--
Follow ups