mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 13:21:43 +00:00
Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274 * https://bugs.launchpad.net/kicad/+bug/1827274 Fixes: lp:1827240 * https://bugs.launchpad.net/kicad/+bug/1827240
This commit is contained in:
parent
07b82d19e3
commit
67cc2aac2e
common
eeschema
dialogs
dialog_schematic_find.cppdialog_schematic_find.hdialog_schematic_find_base.cppdialog_schematic_find_base.fbpdialog_schematic_find_base.h
ee_collectors.cppee_collectors.hee_hotkeys.cppee_hotkeys.hfind.cpphierarch.cpplib_pin.cpplib_pin.hmenubar.cppsch_component.cppsch_component.hsch_edit_frame.cppsch_edit_frame.hsch_field.cppsch_field.hsch_marker.cppsch_marker.hsch_painter.cppsch_sheet.cppsch_sheet.hsch_sheet_path.cppsch_sheet_path.hsch_sheet_pin.cppsch_text.cppsch_text.htoolbars_sch_editor.cpptools
include
pagelayout_editor
pcbnew
@ -132,9 +132,7 @@ SEARCH_RESULT EDA_ITEM::IterateForward( EDA_ITEM* listStart,
|
||||
void* testData,
|
||||
const KICAD_T scanTypes[] )
|
||||
{
|
||||
EDA_ITEM* p = listStart;
|
||||
|
||||
for( ; p; p = p->Pnext )
|
||||
for( EDA_ITEM* p = listStart; p; p = p->Pnext )
|
||||
{
|
||||
if( SEARCH_QUIT == p->Visit( inspector, testData, scanTypes ) )
|
||||
return SEARCH_QUIT;
|
||||
|
@ -29,14 +29,11 @@
|
||||
#include <status_popup.h>
|
||||
#include <draw_frame.h>
|
||||
|
||||
STATUS_POPUP::STATUS_POPUP( EDA_DRAW_FRAME* aParent ) :
|
||||
STATUS_POPUP::STATUS_POPUP( wxWindow* aParent ) :
|
||||
wxPopupWindow( aParent ),
|
||||
m_frame( aParent ),
|
||||
m_expireTimer( this )
|
||||
{
|
||||
m_panel = new wxPanel( this, wxID_ANY );
|
||||
m_panel->SetBackgroundColour( *wxLIGHT_GREY );
|
||||
|
||||
m_topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_panel->SetSizer( m_topSizer );
|
||||
m_panel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
||||
@ -59,10 +56,12 @@ void STATUS_POPUP::onCharHook( wxKeyEvent& aEvent )
|
||||
// the canvas / frame.
|
||||
aEvent.SetEventType( wxEVT_CHAR );
|
||||
|
||||
if( m_frame->IsGalCanvasActive() )
|
||||
m_frame->GetGalCanvas()->OnEvent( aEvent );
|
||||
EDA_DRAW_FRAME* frame = dynamic_cast<EDA_DRAW_FRAME*>( GetParent() );
|
||||
|
||||
if( frame )
|
||||
frame->GetGalCanvas()->OnEvent( aEvent );
|
||||
else
|
||||
m_frame->ProcessEvent( aEvent );
|
||||
GetParent()->GetEventHandler()->ProcessEvent( aEvent );
|
||||
}
|
||||
|
||||
|
||||
@ -73,6 +72,13 @@ void STATUS_POPUP::Popup( wxWindow* )
|
||||
}
|
||||
|
||||
|
||||
void STATUS_POPUP::PopupFor( int aMsecs )
|
||||
{
|
||||
Popup();
|
||||
Expire( aMsecs );
|
||||
}
|
||||
|
||||
|
||||
void STATUS_POPUP::Move( const VECTOR2I& aWhere )
|
||||
{
|
||||
SetPosition( wxPoint( aWhere.x, aWhere.y ) );
|
||||
@ -104,7 +110,7 @@ void STATUS_POPUP::onExpire( wxTimerEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
STATUS_TEXT_POPUP::STATUS_TEXT_POPUP( EDA_DRAW_FRAME* aParent ) :
|
||||
STATUS_TEXT_POPUP::STATUS_TEXT_POPUP( wxWindow* aParent ) :
|
||||
STATUS_POPUP( aParent )
|
||||
{
|
||||
m_panel->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNSHADOW ) );
|
||||
|
@ -43,11 +43,34 @@ TOOL_ACTION ACTIONS::find( "common.Interactive.find",
|
||||
_( "Find" ), _( "Find text" ),
|
||||
find_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::replace( "common.Interactive.findAndReplace",
|
||||
TOOL_ACTION ACTIONS::findAndReplace( "common.Interactive.findAndReplace",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_REPLACE ),
|
||||
_( "Find and Replace" ), _( "Find and replace text" ),
|
||||
find_replace_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::findNext( "common.Interactive.findNext",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Find Next" ), _( "Find next match" ),
|
||||
find_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::findNextMarker( "common.Interactive.findNextMarker",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_FIND_NEXT_MARKER ),
|
||||
_( "Find Next Marker" ), "",
|
||||
find_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::replaceAndFindNext( "common.Interactive.replaceAndFindNext",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Replace and Find Next" ), _( "Replace current match and find next" ),
|
||||
find_replace_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::replaceAll( "common.Interactive.replaceAll",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Replace All" ), _( "Replace all matches" ),
|
||||
find_replace_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::updateFind( "common.Control.updateFind",
|
||||
AS_GLOBAL, 0, "", "" ); // This is an internal event
|
||||
|
||||
// View Controls
|
||||
TOOL_ACTION ACTIONS::zoomRedraw( "common.Control.zoomRedraw",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_ZOOM_REDRAW ),
|
||||
|
@ -32,11 +32,6 @@ CONDITIONAL_MENU::CONDITIONAL_MENU( bool isContextMenu, TOOL_INTERACTIVE* aTool
|
||||
m_isContextMenu( isContextMenu )
|
||||
{
|
||||
m_tool = aTool;
|
||||
|
||||
// wxWidgets 3.0.4 on MSW checks for an empty menu before running the MENU_OPEN
|
||||
// event. Add a dummy item to ensure that the event is dispatched. Evaluate()
|
||||
// will clear the menu before evaluating all the items anyway.
|
||||
Append( wxID_ANY, wxT( "dummy menu for MSW" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2010-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2010-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -22,24 +22,20 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dialog_schematic_find.cpp
|
||||
* @brief Schematic find and replace dialog implementation.
|
||||
*/
|
||||
|
||||
#include <dialog_schematic_find.h>
|
||||
#include <tool/actions.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <tools/sch_editor_control.h>
|
||||
|
||||
|
||||
DEFINE_EVENT_TYPE( EVT_COMMAND_FIND_DRC_MARKER )
|
||||
DEFINE_EVENT_TYPE( EVT_COMMAND_FIND_COMPONENT_IN_LIB )
|
||||
|
||||
|
||||
DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, wxString* aStatus,
|
||||
DIALOG_SCH_FIND::DIALOG_SCH_FIND( SCH_EDIT_FRAME* aParent, wxFindReplaceData* aData,
|
||||
const wxPoint& aPosition, const wxSize& aSize, int aStyle ) :
|
||||
DIALOG_SCH_FIND_BASE( aParent, wxID_ANY, _( "Find" ), aPosition, aSize,
|
||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | aStyle ),
|
||||
m_findReplaceData( aData ),
|
||||
m_status( aStatus )
|
||||
m_frame( aParent ),
|
||||
m_editorControl( m_frame->GetToolManager()->GetTool<SCH_EDITOR_CONTROL>() ),
|
||||
m_findReplaceData( aData )
|
||||
{
|
||||
wxASSERT_MSG( m_findReplaceData, wxT( "can't create find dialog without data" ) );
|
||||
|
||||
@ -59,7 +55,6 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, w
|
||||
m_radioBackward->SetValue( ( flags & wxFR_DOWN ) == 0 );
|
||||
m_checkMatchCase->SetValue( flags & wxFR_MATCHCASE );
|
||||
m_checkWholeWord->SetValue( flags & wxFR_WHOLEWORD );
|
||||
m_checkNoWarpCursor->SetValue( flags & FR_NO_WARP_CURSOR );
|
||||
|
||||
/* Whole word and wild card searches are mutually exclusive. */
|
||||
if( !( flags & wxFR_WHOLEWORD ) )
|
||||
@ -68,10 +63,8 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, w
|
||||
m_checkAllFields->SetValue( flags & FR_SEARCH_ALL_FIELDS );
|
||||
m_checkReplaceReferences->SetValue( flags & FR_REPLACE_REFERENCES );
|
||||
m_checkAllPins->SetValue( flags & FR_SEARCH_ALL_PINS );
|
||||
m_checkWrap->SetValue( flags & FR_SEARCH_WRAP );
|
||||
m_checkCurrentSheetOnly->SetValue( flags & FR_CURRENT_SHEET_ONLY );
|
||||
|
||||
m_statusLine->SetLabel( wxEmptyString );
|
||||
m_buttonFind->SetDefault();
|
||||
SetInitialFocus( m_comboFind );
|
||||
|
||||
@ -94,25 +87,24 @@ DIALOG_SCH_FIND::DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, w
|
||||
SetSize( size );
|
||||
|
||||
GetSizer()->Fit( this ); // Needed on Ubuntu/Unity to display the dialog
|
||||
|
||||
Connect( wxEVT_CHAR, wxKeyEventHandler( DIALOG_SCH_FIND::OnChar ), nullptr, this );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnClose( wxCloseEvent& aEvent )
|
||||
{
|
||||
SendEvent( wxEVT_COMMAND_FIND_CLOSE );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnUpdateFindUI( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( !m_comboFind->GetValue().empty() );
|
||||
// Notify the SCH_EDIT_FRAME
|
||||
m_frame->OnFindDialogClose();
|
||||
// Notify the controller
|
||||
m_editorControl->UpdateFind( ACTIONS::updateFind.MakeEvent() );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnUpdateReplaceUI( wxUpdateUIEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( HasFlag( wxFR_REPLACEDIALOG ) && !m_comboFind->GetValue().empty() &&
|
||||
(m_findReplaceData->GetFlags() & FR_REPLACE_ITEM_FOUND) );
|
||||
m_editorControl->HasMatch() );
|
||||
}
|
||||
|
||||
|
||||
@ -122,15 +114,20 @@ void DIALOG_SCH_FIND::OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnUpdateWholeWordUI( wxUpdateUIEvent& aEvent )
|
||||
void DIALOG_SCH_FIND::OnChar( wxKeyEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( !m_checkWildcardMatch->GetValue() );
|
||||
if( aEvent.GetKeyCode() == WXK_RETURN )
|
||||
{
|
||||
wxCommandEvent dummyCommand;
|
||||
OnFind( dummyCommand );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnUpdateWildcardUI( wxUpdateUIEvent& aEvent )
|
||||
void DIALOG_SCH_FIND::OnSearchForText( wxCommandEvent& aEvent )
|
||||
{
|
||||
aEvent.Enable( !m_checkWholeWord->GetValue() );
|
||||
m_findReplaceData->SetFindString( m_comboFind->GetValue() );
|
||||
m_editorControl->UpdateFind( ACTIONS::updateFind.MakeEvent() );
|
||||
}
|
||||
|
||||
|
||||
@ -140,6 +137,36 @@ void DIALOG_SCH_FIND::OnTextEnter( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnOptions( wxCommandEvent& aEvent )
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
if( m_radioForward->GetValue() )
|
||||
flags |= wxFR_DOWN;
|
||||
|
||||
if( m_checkMatchCase->GetValue() )
|
||||
flags |= wxFR_MATCHCASE;
|
||||
|
||||
if( m_checkWholeWord->GetValue() )
|
||||
flags |= wxFR_WHOLEWORD;
|
||||
|
||||
if( m_checkWildcardMatch->IsShown() && m_checkWildcardMatch->GetValue() )
|
||||
flags |= FR_MATCH_WILDCARD;
|
||||
|
||||
if( m_checkAllFields->GetValue() )
|
||||
flags |= FR_SEARCH_ALL_FIELDS;
|
||||
|
||||
if( m_checkAllPins->GetValue() )
|
||||
flags |= FR_SEARCH_ALL_PINS;
|
||||
|
||||
if( m_checkCurrentSheetOnly->GetValue() )
|
||||
flags |= FR_CURRENT_SHEET_ONLY;
|
||||
|
||||
m_findReplaceData->SetFlags( flags );
|
||||
m_editorControl->UpdateFind( ACTIONS::updateFind.MakeEvent() );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnFind( wxCommandEvent& aEvent )
|
||||
{
|
||||
int index = m_comboFind->FindString( m_comboFind->GetValue(), true );
|
||||
@ -157,7 +184,7 @@ void DIALOG_SCH_FIND::OnFind( wxCommandEvent& aEvent )
|
||||
m_comboFind->SetSelection( 0 );
|
||||
}
|
||||
|
||||
SendEvent( wxEVT_COMMAND_FIND );
|
||||
m_editorControl->FindNext( ACTIONS::findNext.MakeEvent());
|
||||
}
|
||||
|
||||
|
||||
@ -179,94 +206,9 @@ void DIALOG_SCH_FIND::OnReplace( wxCommandEvent& aEvent )
|
||||
}
|
||||
|
||||
if( aEvent.GetId() == wxID_REPLACE )
|
||||
SendEvent( wxEVT_COMMAND_FIND_REPLACE );
|
||||
m_editorControl->FindNext( ACTIONS::replaceAndFindNext.MakeEvent());
|
||||
else if( aEvent.GetId() == wxID_REPLACE_ALL )
|
||||
SendEvent( wxEVT_COMMAND_FIND_REPLACE_ALL );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnCancel( wxCommandEvent& aEvent )
|
||||
{
|
||||
SendEvent( wxEVT_COMMAND_FIND_CLOSE );
|
||||
Show( false );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::SendEvent( const wxEventType& aEventType )
|
||||
{
|
||||
wxFindDialogEvent event( aEventType, GetId() );
|
||||
event.SetEventObject( this );
|
||||
event.SetFindString( m_comboFind->GetValue() );
|
||||
|
||||
int flags = 0;
|
||||
|
||||
if ( HasFlag( wxFR_REPLACEDIALOG ) )
|
||||
{
|
||||
event.SetReplaceString( m_comboReplace->GetValue() );
|
||||
flags |= FR_SEARCH_REPLACE;
|
||||
}
|
||||
|
||||
if( m_checkReplaceReferences->GetValue() )
|
||||
flags |= FR_REPLACE_REFERENCES;
|
||||
|
||||
if( m_radioForward->GetValue() )
|
||||
flags |= wxFR_DOWN;
|
||||
|
||||
if( m_checkMatchCase->GetValue() )
|
||||
flags |= wxFR_MATCHCASE;
|
||||
|
||||
if( m_checkWholeWord->GetValue() )
|
||||
flags |= wxFR_WHOLEWORD;
|
||||
|
||||
if( m_checkWildcardMatch->IsShown() && m_checkWildcardMatch->GetValue() )
|
||||
flags |= FR_MATCH_WILDCARD;
|
||||
|
||||
if( m_checkAllFields->GetValue() )
|
||||
flags |= FR_SEARCH_ALL_FIELDS;
|
||||
|
||||
if( m_checkAllPins->GetValue() )
|
||||
flags |= FR_SEARCH_ALL_PINS;
|
||||
|
||||
if( m_checkWrap->GetValue() )
|
||||
flags |= FR_SEARCH_WRAP;
|
||||
|
||||
if( m_checkCurrentSheetOnly->GetValue() )
|
||||
flags |= FR_CURRENT_SHEET_ONLY;
|
||||
|
||||
if( m_checkNoWarpCursor->GetValue() )
|
||||
flags |= FR_NO_WARP_CURSOR;
|
||||
|
||||
m_findReplaceData->SetFindString( event.GetFindString() );
|
||||
|
||||
if( HasFlag( wxFR_REPLACEDIALOG )
|
||||
&& ( event.GetEventType() == wxEVT_COMMAND_FIND_REPLACE
|
||||
|| event.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL ) )
|
||||
{
|
||||
m_findReplaceData->SetReplaceString( event.GetReplaceString() );
|
||||
}
|
||||
|
||||
event.SetFlags( flags );
|
||||
|
||||
m_findReplaceData->SetFlags( event.GetFlags() );
|
||||
|
||||
// when we are no using the find/replace (just find)
|
||||
// FR_REPLACE_REFERENCES flag bit is always set to 1 in event flags
|
||||
// but not set in m_findReplaceData
|
||||
if ( ! HasFlag( wxFR_REPLACEDIALOG ) )
|
||||
{
|
||||
flags |= FR_REPLACE_REFERENCES;
|
||||
event.SetFlags( flags );
|
||||
}
|
||||
|
||||
if( !GetEventHandler()->ProcessEvent( event ) )
|
||||
{
|
||||
GetParent()->GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
|
||||
if( event.GetFlags() != flags )
|
||||
m_findReplaceData->SetFlags( event.GetFlags() );
|
||||
|
||||
m_statusLine->SetLabel( *m_status );
|
||||
m_editorControl->FindNext( ACTIONS::replaceAll.MakeEvent());
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2010-2011 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2010-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -40,6 +40,9 @@
|
||||
|
||||
#include <wx/fdrepdlg.h> // Use the wxFindReplaceDialog events, data, and enums.
|
||||
|
||||
class SCH_EDIT_FRAME;
|
||||
class SCH_EDITOR_CONTROL;
|
||||
|
||||
|
||||
/**
|
||||
* Define schematic specific find and replace dialog flags based on the enum entries
|
||||
@ -65,9 +68,6 @@ enum SchematicFindReplaceFlags
|
||||
/// Wrap around the beginning or end of search list.
|
||||
FR_SEARCH_WRAP = wxFR_MATCHCASE << 5,
|
||||
|
||||
/// Don't warp cursor to found item until the dialog is closed.
|
||||
FR_NO_WARP_CURSOR = wxFR_MATCHCASE << 6,
|
||||
|
||||
/// Perform a search for a item that has replaceable text.
|
||||
FR_SEARCH_REPLACE = wxFR_MATCHCASE << 7,
|
||||
|
||||
@ -84,8 +84,7 @@ enum SchematicFindReplaceFlags
|
||||
* Definition FR_MASK_NON_COMPARE_FLAGS
|
||||
* is used to mask find/replace flag bits that do not effect the search results.
|
||||
*/
|
||||
#define FR_MASK_NON_COMPARE_FLAGS ~( wxFR_DOWN | FR_SEARCH_WRAP | FR_NO_WARP_CURSOR | \
|
||||
FR_REPLACE_ITEM_FOUND )
|
||||
#define FR_MASK_NON_COMPARE_FLAGS ~( wxFR_DOWN | FR_SEARCH_WRAP | FR_REPLACE_ITEM_FOUND )
|
||||
|
||||
|
||||
/**
|
||||
@ -96,7 +95,7 @@ class SCH_FIND_REPLACE_DATA : public wxFindReplaceData
|
||||
{
|
||||
public:
|
||||
|
||||
SCH_FIND_REPLACE_DATA& operator =( SCH_FIND_REPLACE_DATA& aFindReplaceData )
|
||||
SCH_FIND_REPLACE_DATA& operator =( const SCH_FIND_REPLACE_DATA& aFindReplaceData )
|
||||
{
|
||||
if( this == &aFindReplaceData )
|
||||
return *this;
|
||||
@ -120,26 +119,6 @@ public:
|
||||
return !( *this == aFindReplaceData );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function ChangesCompare
|
||||
* tests \a aFindReplaceData to see if it would result in a change in the search string
|
||||
* comparison results.
|
||||
*
|
||||
* @param aFindReplaceData A reference to a #SCH_FIND_REPLACE_DATA object to compare
|
||||
* against.
|
||||
* @return True if \a aFindReplaceData would result in a search and/or replace change,
|
||||
* otherwise false.
|
||||
*/
|
||||
bool ChangesCompare( const SCH_FIND_REPLACE_DATA& aFindReplaceData )
|
||||
{
|
||||
return ( (GetFindString() != aFindReplaceData.GetFindString())
|
||||
|| (GetCompareFlags() != aFindReplaceData.GetCompareFlags()) );
|
||||
}
|
||||
|
||||
bool IsReplacing() const { return (GetFlags() & FR_SEARCH_REPLACE) != 0; }
|
||||
bool IsWrapping() const { return (GetFlags() & FR_SEARCH_WRAP) != 0; }
|
||||
|
||||
private:
|
||||
/**
|
||||
* Function GetSearchFlags
|
||||
@ -155,26 +134,24 @@ class DIALOG_SCH_FIND : public DIALOG_SCH_FIND_BASE
|
||||
protected:
|
||||
// Handlers for DIALOG_SCH_FIND_BASE events.
|
||||
void OnClose( wxCloseEvent& aEvent ) override;
|
||||
void OnSearchForText( wxCommandEvent& aEvent ) override;
|
||||
void OnTextEnter( wxCommandEvent& event ) override;
|
||||
void OnUpdateFindUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnOptions( wxCommandEvent& event ) override;
|
||||
void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnUpdateWholeWordUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnUpdateWildcardUI( wxUpdateUIEvent& aEvent ) override;
|
||||
|
||||
void OnChar( wxKeyEvent& aEvent );
|
||||
void OnFind( wxCommandEvent& aEvent ) override;
|
||||
void OnReplace( wxCommandEvent& aEvent ) override;
|
||||
void OnCancel( wxCommandEvent& aEvent ) override;
|
||||
|
||||
void SendEvent( const wxEventType& aEventType );
|
||||
|
||||
wxFindReplaceData* m_findReplaceData;
|
||||
wxString* m_status;
|
||||
SCH_EDIT_FRAME* m_frame;
|
||||
SCH_EDITOR_CONTROL* m_editorControl;
|
||||
wxFindReplaceData* m_findReplaceData;
|
||||
|
||||
DECLARE_NO_COPY_CLASS( DIALOG_SCH_FIND )
|
||||
|
||||
public:
|
||||
DIALOG_SCH_FIND( wxWindow* aParent, wxFindReplaceData* aData, wxString* aStatus,
|
||||
DIALOG_SCH_FIND( SCH_EDIT_FRAME* aParent, wxFindReplaceData* aData,
|
||||
const wxPoint& aPosition = wxDefaultPosition,
|
||||
const wxSize& aSize = wxDefaultSize, int aStyle = 0 );
|
||||
|
||||
@ -186,16 +163,4 @@ public:
|
||||
};
|
||||
|
||||
|
||||
BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_LOCAL_EVENT_TYPE( EVT_COMMAND_FIND_DRC_MARKER, wxID_ANY )
|
||||
DECLARE_LOCAL_EVENT_TYPE( EVT_COMMAND_FIND_COMPONENT_IN_LIB, wxID_ANY )
|
||||
END_DECLARE_EVENT_TYPES()
|
||||
|
||||
|
||||
#define EVT_FIND_DRC_MARKER( id, fn ) \
|
||||
wx__DECLARE_EVT1( EVT_COMMAND_FIND_DRC_MARKER, id, wxFindDialogEventHandler( fn ) )
|
||||
|
||||
#define EVT_FIND_COMPONENT_IN_LIB( id, fn ) \
|
||||
wx__DECLARE_EVT1( EVT_COMMAND_FIND_COMPONENT_IN_LIB, id, wxFindDialogEventHandler( fn ) )
|
||||
|
||||
#endif // __dialog_schematic_find__
|
||||
|
@ -30,11 +30,11 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
||||
|
||||
m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText1->Wrap( -1 );
|
||||
leftGridSizer->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 6 );
|
||||
leftGridSizer->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL, 6 );
|
||||
|
||||
m_comboFind = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
|
||||
m_comboFind->SetToolTip( _("Text with optional wildcards") );
|
||||
m_comboFind->SetMinSize( wxSize( 200,-1 ) );
|
||||
m_comboFind->SetMinSize( wxSize( 220,-1 ) );
|
||||
|
||||
leftGridSizer->Add( m_comboFind, 0, wxEXPAND, 6 );
|
||||
|
||||
@ -74,42 +74,37 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
||||
|
||||
leftSizer->Add( leftGridSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* checkBoxes;
|
||||
checkBoxes = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Match whole wor&d"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkWholeWord->SetValue(true);
|
||||
checkBoxes->Add( m_checkWholeWord, 0, wxALL, 3 );
|
||||
wxGridBagSizer* gbSizer2;
|
||||
gbSizer2 = new wxGridBagSizer( 0, 20 );
|
||||
gbSizer2->SetFlexibleDirection( wxHORIZONTAL );
|
||||
gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
|
||||
|
||||
m_checkMatchCase = new wxCheckBox( this, wxID_ANY, _("&Match case"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkMatchCase, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
gbSizer2->Add( m_checkMatchCase, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_checkWildcardMatch = new wxCheckBox( this, wxID_ANY, _("Search &using simple wildcard matching"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkWildcardMatch, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
m_checkWholeWord = new wxCheckBox( this, wxID_ANY, _("Words"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkWholeWord->SetValue(true);
|
||||
gbSizer2->Add( m_checkWholeWord, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_checkWrap = new wxCheckBox( this, wxID_ANY, _("Wrap around &end of search list"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkWrap->SetValue(true);
|
||||
checkBoxes->Add( m_checkWrap, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
m_checkWildcardMatch = new wxCheckBox( this, wxID_ANY, _("Wildcards"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
gbSizer2->Add( m_checkWildcardMatch, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||
|
||||
m_checkAllFields = new wxCheckBox( this, wxID_ANY, _("Search all com&ponent fields"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkAllFields, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
gbSizer2->Add( m_checkAllFields, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkAllPins = new wxCheckBox( this, wxID_ANY, _("Search all pin &names and numbers"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkAllPins, 0, wxBOTTOM|wxRIGHT|wxLEFT, 3 );
|
||||
gbSizer2->Add( m_checkAllPins, wxGBPosition( 2, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkCurrentSheetOnly = new wxCheckBox( this, wxID_ANY, _("Search the current &sheet only"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkCurrentSheetOnly, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
gbSizer2->Add( m_checkCurrentSheetOnly, wxGBPosition( 3, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkReplaceReferences = new wxCheckBox( this, wxID_ANY, _("Replace componen&t reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkReplaceReferences->Hide();
|
||||
|
||||
checkBoxes->Add( m_checkReplaceReferences, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
|
||||
m_checkNoWarpCursor = new wxCheckBox( this, wxID_ANY, _("D&o not warp cursor to found item"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
checkBoxes->Add( m_checkNoWarpCursor, 0, wxBOTTOM|wxLEFT|wxRIGHT, 3 );
|
||||
gbSizer2->Add( m_checkReplaceReferences, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
leftSizer->Add( checkBoxes, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
leftSizer->Add( gbSizer2, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
topSizer->Add( leftSizer, 1, wxEXPAND|wxALL, 5 );
|
||||
@ -140,21 +135,6 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
||||
|
||||
mainSizer->Add( topSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* statusSizer;
|
||||
statusSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
statusSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 3 );
|
||||
|
||||
m_statusLine = new wxStaticText( this, wxID_ANY, _("Status..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_statusLine->Wrap( -1 );
|
||||
m_statusLine->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||
|
||||
statusSizer->Add( m_statusLine, 0, wxBOTTOM|wxRIGHT|wxLEFT, 7 );
|
||||
|
||||
|
||||
mainSizer->Add( statusSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( mainSizer );
|
||||
this->Layout();
|
||||
@ -164,37 +144,43 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
|
||||
m_comboFind->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForText ), NULL, this );
|
||||
m_comboFind->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_comboReplace->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_checkWholeWord->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
|
||||
m_checkWildcardMatch->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
|
||||
m_checkMatchCase->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkWholeWord->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkWildcardMatch->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkAllFields->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkAllPins->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkCurrentSheetOnly->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_buttonFind->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
|
||||
m_buttonFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateFindUI ), NULL, this );
|
||||
m_buttonReplace->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
|
||||
m_buttonReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
|
||||
m_buttonReplaceAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
|
||||
m_buttonReplaceAll->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
|
||||
m_buttonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_SCH_FIND_BASE::~DIALOG_SCH_FIND_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
|
||||
m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnSearchForText ), NULL, this );
|
||||
m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_comboReplace->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_checkWholeWord->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
|
||||
m_checkWildcardMatch->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
|
||||
m_checkMatchCase->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkWholeWord->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkWildcardMatch->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkAllFields->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkAllPins->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_checkCurrentSheetOnly->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnOptions ), NULL, this );
|
||||
m_buttonFind->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnFind ), NULL, this );
|
||||
m_buttonFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateFindUI ), NULL, this );
|
||||
m_buttonReplace->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
|
||||
m_buttonReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceUI ), NULL, this );
|
||||
m_buttonReplaceAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnReplace ), NULL, this );
|
||||
m_buttonReplaceAll->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateReplaceAllUI ), NULL, this );
|
||||
m_buttonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnCancel ), NULL, this );
|
||||
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
||||
<property name="vgap">3</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">6</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
@ -248,7 +248,7 @@
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">200,-1</property>
|
||||
<property name="minimum_size">220,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_comboFind</property>
|
||||
<property name="pane_border">1</property>
|
||||
@ -298,7 +298,7 @@
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnText">OnSearchForText</event>
|
||||
<event name="OnTextEnter">OnTextEnter</event>
|
||||
<event name="OnUpdateUI">OnUpdateDrcUI</event>
|
||||
</object>
|
||||
@ -753,105 +753,26 @@
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxGridBagSizer" expanded="1">
|
||||
<property name="empty_cell_size"></property>
|
||||
<property name="flexible_direction">wxHORIZONTAL</property>
|
||||
<property name="growablecols"></property>
|
||||
<property name="growablerows"></property>
|
||||
<property name="hgap">20</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">checkBoxes</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="name">gbSizer2</property>
|
||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_NONE</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<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="checked">1</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">Match whole wor&d</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_checkWholeWord</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="OnChar"></event>
|
||||
<event name="OnCheckBox"></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">OnUpdateWholeWordUI</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="vgap">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -887,7 +808,7 @@
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkMatchCase</property>
|
||||
<property name="pane_border">1</property>
|
||||
@ -911,7 +832,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnOptions</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
@ -936,98 +857,13 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<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="checked">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">Search &using simple wildcard matching</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_checkWildcardMatch</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="OnChar"></event>
|
||||
<event name="OnCheckBox"></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">OnUpdateWildcardUI</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">1</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -1057,15 +893,15 @@
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Wrap around &end of search list</property>
|
||||
<property name="label">Words</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="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkWrap</property>
|
||||
<property name="name">m_checkWholeWord</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
@ -1087,7 +923,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnOptions</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
@ -1112,10 +948,104 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">1</property>
|
||||
<property name="column">2</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||
<property name="row">0</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<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="checked">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">Wildcards</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">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_checkWildcardMatch</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="OnChar"></event>
|
||||
<event name="OnCheckBox">OnOptions</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="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">3</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">1</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -1175,7 +1105,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnOptions</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
@ -1200,10 +1130,13 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">3</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<property name="row">2</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -1263,7 +1196,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnOptions</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
@ -1288,10 +1221,13 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">3</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">3</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -1351,7 +1287,7 @@
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnCheckBox">OnOptions</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
@ -1376,10 +1312,13 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="gbsizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="colspan">3</property>
|
||||
<property name="column">0</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="row">4</property>
|
||||
<property name="rowspan">1</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
@ -1464,94 +1403,6 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" 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="checked">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">D&o not warp cursor to found item</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_checkNoWarpCursor</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="OnChar"></event>
|
||||
<event name="OnCheckBox"></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>
|
||||
@ -1650,7 +1501,7 @@
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI">OnUpdateFindUI</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
@ -1891,7 +1742,7 @@
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick">OnCancel</event>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
@ -1921,181 +1772,6 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">statusSizer</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">3</property>
|
||||
<property name="flag">wxEXPAND|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline1</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">7</property>
|
||||
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_layer"></property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="aui_position"></property>
|
||||
<property name="aui_row"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font">,90,90,10,70,0</property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Status...</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_statusLine</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">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -22,8 +22,8 @@
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@ -44,34 +44,28 @@ class DIALOG_SCH_FIND_BASE : public DIALOG_SHIM
|
||||
wxStaticText* m_staticDirection;
|
||||
wxRadioButton* m_radioForward;
|
||||
wxRadioButton* m_radioBackward;
|
||||
wxCheckBox* m_checkWholeWord;
|
||||
wxCheckBox* m_checkMatchCase;
|
||||
wxCheckBox* m_checkWholeWord;
|
||||
wxCheckBox* m_checkWildcardMatch;
|
||||
wxCheckBox* m_checkWrap;
|
||||
wxCheckBox* m_checkAllFields;
|
||||
wxCheckBox* m_checkAllPins;
|
||||
wxCheckBox* m_checkCurrentSheetOnly;
|
||||
wxCheckBox* m_checkReplaceReferences;
|
||||
wxCheckBox* m_checkNoWarpCursor;
|
||||
wxButton* m_buttonFind;
|
||||
wxButton* m_buttonReplace;
|
||||
wxButton* m_buttonReplaceAll;
|
||||
wxButton* m_buttonCancel;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStaticText* m_statusLine;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchForText( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnTextEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateDrcUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateWholeWordUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateWildcardUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnOptions( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnFind( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateFindUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnReplace( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateReplaceUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateReplaceAllUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancel( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
@ -160,296 +160,6 @@ bool EE_COLLECTOR::IsDraggableJunction() const
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A singleton item of this class is returned for a weak reference that no longer exists.
|
||||
* Its sole purpose is to flag the item as having been deleted.
|
||||
*/
|
||||
class DELETED_SCH_ITEM : public SCH_ITEM
|
||||
{
|
||||
public:
|
||||
DELETED_SCH_ITEM() :
|
||||
SCH_ITEM( nullptr, NOT_USED )
|
||||
{}
|
||||
|
||||
wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override
|
||||
{
|
||||
return _( "(Deleted Item)" );
|
||||
}
|
||||
wxString GetClass() const override
|
||||
{
|
||||
return wxT( "DELETED_SCH_ITEM" );
|
||||
}
|
||||
|
||||
// define pure virtuals:
|
||||
wxPoint GetPosition() const override { return wxPoint(); }
|
||||
void SetPosition( const wxPoint& ) override {}
|
||||
void Draw( EDA_DRAW_PANEL* , wxDC* , const wxPoint& ) override {}
|
||||
|
||||
#if defined(DEBUG)
|
||||
void Show( int , std::ostream& ) const override {}
|
||||
#endif
|
||||
|
||||
void Move( const wxPoint& ) override {}
|
||||
void MirrorY( int ) override {}
|
||||
void MirrorX( int ) override {}
|
||||
void Rotate( wxPoint ) override {}
|
||||
};
|
||||
|
||||
|
||||
DELETED_SCH_ITEM g_DeletedSchItem;
|
||||
|
||||
|
||||
SCH_ITEM* SCH_FIND_COLLECTOR::GetItem( int ndx ) const
|
||||
{
|
||||
if( (unsigned)ndx >= (unsigned)GetCount() )
|
||||
return NULL;
|
||||
|
||||
// Do not simply return m_List[ ndx ] as it might have been deleted. Instead
|
||||
// treat it as a weak reference and search the sheets for an item with the same
|
||||
// pointer value.
|
||||
|
||||
void* weakRef = m_List[ ndx ];
|
||||
SCH_ITEM* item = &g_DeletedSchItem;
|
||||
|
||||
INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* candidate, void* testData )
|
||||
{
|
||||
if( (void*) candidate == weakRef )
|
||||
{
|
||||
item = (SCH_ITEM*) candidate;
|
||||
return SEARCH_QUIT;
|
||||
}
|
||||
|
||||
return SEARCH_CONTINUE;
|
||||
};
|
||||
|
||||
for( unsigned i = 0; i < m_sheetPaths.size(); i++ )
|
||||
{
|
||||
EDA_ITEM::IterateForward( m_sheetPaths[ i ].LastDrawList(),
|
||||
inspector, nullptr, EE_COLLECTOR::AllItems );
|
||||
}
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
SCH_ITEM* SCH_FIND_COLLECTOR::operator[]( int ndx ) const
|
||||
{
|
||||
return GetItem( ndx );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_FIND_COLLECTOR::PassedEnd() const
|
||||
{
|
||||
bool retv = false;
|
||||
|
||||
wxUint32 flags = m_findReplaceData.GetFlags();
|
||||
|
||||
if( GetCount() == 0 )
|
||||
return true;
|
||||
|
||||
if( !(flags & FR_SEARCH_WRAP) || (flags & FR_SEARCH_REPLACE) )
|
||||
{
|
||||
if( flags & wxFR_DOWN )
|
||||
{
|
||||
if( m_foundIndex >= GetCount() )
|
||||
retv = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_foundIndex < 0 )
|
||||
retv = true;
|
||||
}
|
||||
}
|
||||
|
||||
return retv;
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
void SCH_FIND_COLLECTOR::dump()
|
||||
{
|
||||
int tmp = m_foundIndex;
|
||||
|
||||
wxLogTrace( traceFindReplace, wxT( "%d items found to replace %s with %s." ),
|
||||
GetCount(), GetChars( m_findReplaceData.GetFindString() ),
|
||||
GetChars( m_findReplaceData.GetReplaceString() ) );
|
||||
|
||||
for( m_foundIndex = 0; m_foundIndex < GetCount(); m_foundIndex++ )
|
||||
wxLogTrace( traceFindReplace, wxT( " " ) + GetText( MILLIMETRES ) );
|
||||
|
||||
m_foundIndex = tmp;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void SCH_FIND_COLLECTOR::UpdateIndex()
|
||||
{
|
||||
wxUint32 flags = m_findReplaceData.GetFlags();
|
||||
|
||||
if( flags & wxFR_DOWN )
|
||||
{
|
||||
if( m_foundIndex < GetCount() )
|
||||
m_foundIndex += 1;
|
||||
if( (m_foundIndex >= GetCount()) && (flags & FR_SEARCH_WRAP) )
|
||||
m_foundIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_foundIndex >= 0 )
|
||||
m_foundIndex -= 1;
|
||||
if( (m_foundIndex < 0) && (flags & FR_SEARCH_WRAP) )
|
||||
m_foundIndex = GetCount() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SCH_FIND_COLLECTOR_DATA SCH_FIND_COLLECTOR::GetFindData( int aIndex )
|
||||
{
|
||||
wxCHECK_MSG( (unsigned) aIndex < m_data.size(), SCH_FIND_COLLECTOR_DATA(),
|
||||
wxT( "Attempt to get find data outside of list boundary." ) );
|
||||
|
||||
return m_data[ aIndex ];
|
||||
}
|
||||
|
||||
|
||||
wxString SCH_FIND_COLLECTOR::GetText( EDA_UNITS_T aUnits )
|
||||
{
|
||||
wxCHECK_MSG( (GetCount() != 0) && IsValidIndex( m_foundIndex ), wxEmptyString,
|
||||
wxT( "Cannot get found item at invalid index." ) );
|
||||
|
||||
SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ];
|
||||
EDA_ITEM* foundItem = GetItem( m_foundIndex );
|
||||
|
||||
if( data.GetParent() )
|
||||
{
|
||||
return wxString::Format( _( "Match %i of %i: %s of %s in sheet %s" ),
|
||||
m_foundIndex + 1,
|
||||
GetCount(),
|
||||
foundItem->GetSelectMenuText( aUnits ),
|
||||
data.GetParent()->GetSelectMenuText( aUnits ),
|
||||
data.GetSheetPath() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return wxString::Format( _( "Match %i of %i: %s in sheet %s" ),
|
||||
m_foundIndex + 1,
|
||||
GetCount(),
|
||||
foundItem->GetSelectMenuText( aUnits ),
|
||||
data.GetSheetPath() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EDA_ITEM* SCH_FIND_COLLECTOR::GetItem( SCH_FIND_COLLECTOR_DATA& aData )
|
||||
{
|
||||
if( PassedEnd() )
|
||||
return NULL;
|
||||
|
||||
aData = m_data[ m_foundIndex ];
|
||||
return GetItem( m_foundIndex );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_FIND_COLLECTOR::ReplaceItem( SCH_SHEET_PATH* aSheetPath )
|
||||
{
|
||||
if( PassedEnd() )
|
||||
return false;
|
||||
|
||||
wxCHECK_MSG( IsValidIndex( m_foundIndex ), false,
|
||||
wxT( "Invalid replace list index in SCH_FIND_COLLECTOR." ) );
|
||||
|
||||
EDA_ITEM* item = GetItem( m_foundIndex );
|
||||
|
||||
bool replaced = item->Replace( m_findReplaceData, aSheetPath );
|
||||
|
||||
return replaced;
|
||||
}
|
||||
|
||||
|
||||
SEARCH_RESULT SCH_FIND_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
|
||||
{
|
||||
wxPoint position;
|
||||
|
||||
if( aItem->Matches( m_findReplaceData, m_currentSheetPath, &position ) )
|
||||
{
|
||||
if( aItem->Type() == SCH_PIN_T )
|
||||
{
|
||||
wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
|
||||
SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
|
||||
|
||||
// Pin positions are relative to their parent component's position and
|
||||
// orientation in the schematic. The pin's position must be converted
|
||||
// schematic coordinates.
|
||||
SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
|
||||
TRANSFORM transform = component->GetTransform();
|
||||
position.y = -position.y;
|
||||
position = transform.TransformCoordinate( position ) + component->GetPosition();
|
||||
}
|
||||
|
||||
Append( aItem );
|
||||
aItem->SetBrightened();
|
||||
|
||||
m_data.push_back( SCH_FIND_COLLECTOR_DATA( position,
|
||||
m_currentSheetPath->PathHumanReadable(),
|
||||
(SCH_ITEM*) aTestData ) );
|
||||
}
|
||||
|
||||
return SEARCH_CONTINUE;
|
||||
}
|
||||
|
||||
|
||||
void SCH_FIND_COLLECTOR::SetReplaceString( const wxString &aReplaceString )
|
||||
{
|
||||
m_findReplaceData.SetReplaceString( aReplaceString );
|
||||
}
|
||||
|
||||
|
||||
void SCH_FIND_COLLECTOR::Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData,
|
||||
SCH_SHEET_PATH* aSheetPath )
|
||||
{
|
||||
if( !IsSearchRequired( aFindReplaceData ) && !m_List.empty() && !m_forceSearch )
|
||||
return;
|
||||
|
||||
m_findReplaceData = aFindReplaceData;
|
||||
Empty(); // empty the collection just in case
|
||||
m_data.clear();
|
||||
m_foundIndex = 0;
|
||||
m_sheetPaths.clear();
|
||||
SetForceSearch( false );
|
||||
|
||||
if( aSheetPath )
|
||||
{
|
||||
m_currentSheetPath = aSheetPath;
|
||||
m_sheetPaths.push_back( *m_currentSheetPath );
|
||||
EDA_ITEM::IterateForward( aSheetPath->LastDrawList(), m_inspector, NULL, m_ScanTypes );
|
||||
}
|
||||
else
|
||||
{
|
||||
SCH_SHEET_LIST schematic( g_RootSheet );
|
||||
|
||||
for( unsigned i = 0; i < schematic.size(); i++ )
|
||||
{
|
||||
m_currentSheetPath = &schematic[i];
|
||||
m_sheetPaths.push_back( *m_currentSheetPath );
|
||||
EDA_ITEM::IterateForward( m_currentSheetPath->LastDrawList(), m_inspector, NULL, m_ScanTypes );
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(DEBUG)
|
||||
dump();
|
||||
#endif
|
||||
|
||||
if( m_List.size() != m_data.size() )
|
||||
{
|
||||
wxFAIL_MSG( wxT( "List size mismatch." ) );
|
||||
m_List.clear();
|
||||
m_data.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SEARCH_RESULT EE_TYPE_COLLECTOR::Inspect( EDA_ITEM* aItem, void* testData )
|
||||
{
|
||||
// The Vist() function only visits the testItem if its type was in the
|
||||
|
@ -45,6 +45,8 @@ public:
|
||||
static const KICAD_T SheetsOnly[];
|
||||
|
||||
EE_COLLECTOR( const KICAD_T* aScanTypes = EE_COLLECTOR::AllItems ) :
|
||||
m_Unit( 0 ),
|
||||
m_Convert( 0 ),
|
||||
m_Threshold( 0 ),
|
||||
m_MenuCancelled( false )
|
||||
{
|
||||
@ -114,203 +116,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Class SCH_FIND_COLLECTOR_DATA
|
||||
* is used as a data container for the associated item found by the #SCH_FIND_COLLECTOR
|
||||
* object.
|
||||
*/
|
||||
class SCH_FIND_COLLECTOR_DATA
|
||||
{
|
||||
/// The position in drawing units of the found item.
|
||||
wxPoint m_position;
|
||||
|
||||
/// The human readable sheet path @see SCH_SHEET_PATH::PathHumanReadable() of the found item.
|
||||
wxString m_sheetPath;
|
||||
|
||||
/// The parent object if the item found is a child object.
|
||||
SCH_ITEM* m_parent;
|
||||
|
||||
public:
|
||||
SCH_FIND_COLLECTOR_DATA( const wxPoint& aPosition = wxDefaultPosition,
|
||||
const wxString& aSheetPath = wxEmptyString,
|
||||
SCH_ITEM* aParent = NULL )
|
||||
: m_position( aPosition )
|
||||
, m_sheetPath( aSheetPath )
|
||||
, m_parent( aParent )
|
||||
{ }
|
||||
|
||||
wxPoint GetPosition() const { return m_position; }
|
||||
|
||||
wxString GetSheetPath() const { return m_sheetPath; }
|
||||
|
||||
SCH_ITEM* GetParent() const { return m_parent; }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Class SCH_FIND_COLLECTOR
|
||||
* is used to iterate over all of the items in a schematic or sheet and collect all
|
||||
* the items that match the given search criteria.
|
||||
*/
|
||||
class SCH_FIND_COLLECTOR : public COLLECTOR
|
||||
{
|
||||
/// Data associated with each found item.
|
||||
std::vector< SCH_FIND_COLLECTOR_DATA > m_data;
|
||||
|
||||
/// The criteria used to test for matching items.
|
||||
SCH_FIND_REPLACE_DATA m_findReplaceData;
|
||||
|
||||
/// The path of the sheet *currently* being iterated over.
|
||||
SCH_SHEET_PATH* m_currentSheetPath;
|
||||
|
||||
/// The paths of the all the sheets in the collector.
|
||||
SCH_SHEET_PATHS m_sheetPaths;
|
||||
|
||||
/// The current found item list index.
|
||||
int m_foundIndex;
|
||||
|
||||
/// A flag to indicate that the schemtic has been modified and a new search must be
|
||||
/// performed even if the search criteria hasn't changed.
|
||||
bool m_forceSearch;
|
||||
|
||||
/// last known library change hash, used to detect library changes which
|
||||
/// should trigger cache obsolescence.
|
||||
int m_lib_hash;
|
||||
|
||||
/**
|
||||
* Function dump
|
||||
* is a helper to dump the items in the find list for debugging purposes.
|
||||
*/
|
||||
#if defined(DEBUG)
|
||||
void dump();
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Constructor SCH_FIND_COLLECTOR
|
||||
*/
|
||||
SCH_FIND_COLLECTOR( const KICAD_T* aScanTypes = EE_COLLECTOR::AllItems )
|
||||
{
|
||||
SetScanTypes( aScanTypes );
|
||||
m_foundIndex = 0;
|
||||
SetForceSearch( false );
|
||||
m_currentSheetPath = NULL;
|
||||
m_lib_hash = 0;
|
||||
}
|
||||
|
||||
void Empty()
|
||||
{
|
||||
m_foundIndex = 0;
|
||||
COLLECTOR::Empty();
|
||||
m_data.clear();
|
||||
}
|
||||
|
||||
SCH_ITEM* GetItem( int ndx ) const;
|
||||
SCH_ITEM* operator[]( int ndx ) const override;
|
||||
|
||||
void SetForceSearch( bool doSearch = true ) { m_forceSearch = doSearch; }
|
||||
|
||||
int GetLibHash() const { return m_lib_hash; }
|
||||
void SetLibHash( int aHash ) { m_lib_hash = aHash; }
|
||||
|
||||
int GetFoundIndex() const { return m_foundIndex; }
|
||||
void SetFoundIndex( int aIndex )
|
||||
{
|
||||
m_foundIndex = ( (unsigned) aIndex < m_data.size() ) ? aIndex : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function PassedEnd
|
||||
* tests if #m_foundIndex is beyond the end of the list give the current
|
||||
* find/replace criterial in #m_findReplaceData.
|
||||
*
|
||||
* @return True if #m_foundIndex has crossed the end of the found item list.
|
||||
*/
|
||||
bool PassedEnd() const;
|
||||
|
||||
/**
|
||||
* Function UpdateIndex
|
||||
* updates the list index according to the current find and replace criteria.
|
||||
*/
|
||||
void UpdateIndex();
|
||||
|
||||
/**
|
||||
* Function GetFindData
|
||||
* returns the data associated with the item found at \a aIndex.
|
||||
*
|
||||
* @param aIndex The list index of the data to return.
|
||||
* @return The associated found item data at \a aIndex if \a aIndex is within the
|
||||
* list limits. Otherwise an empty data item will be returned.
|
||||
*/
|
||||
SCH_FIND_COLLECTOR_DATA GetFindData( int aIndex );
|
||||
|
||||
/**
|
||||
* Function IsSearchRequired
|
||||
* checks the current collector state against \a aFindReplaceData to see if a new search
|
||||
* needs to be performed to update the collector.
|
||||
*
|
||||
* @param aFindReplaceData A #SCH_FIND_REPLACE_DATA object containing the search criteria
|
||||
* to test for changes against the current search criteria.
|
||||
* @return True if \a aFindReplaceData would require a new search to be performaed or
|
||||
* the force search flag is true. Otherwise, false is returned.
|
||||
*/
|
||||
bool IsSearchRequired( const SCH_FIND_REPLACE_DATA& aFindReplaceData )
|
||||
{
|
||||
return m_findReplaceData.ChangesCompare( aFindReplaceData ) || m_forceSearch ||
|
||||
(m_findReplaceData.IsWrapping() != aFindReplaceData.IsWrapping());
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetText()
|
||||
* @return A wxString object containing the description of the item found at the
|
||||
* current index or a wxEmptyString if the list is empty or the index is
|
||||
* invalid.
|
||||
*/
|
||||
wxString GetText( EDA_UNITS_T aUnits );
|
||||
|
||||
/**
|
||||
* Function GetItem
|
||||
* returns the item and associated data of the current index.
|
||||
*
|
||||
* @param aFindData A reference to a #SCH_FIND_COLLECTOR_DATA object to place the
|
||||
* associated data for the current item into if the current item
|
||||
* index is valid.
|
||||
* @return A pointer to the current #EDA_ITEM in the list if the list index is valid
|
||||
* Otherwise NULL is returned and the \a aFindData object is not updated.
|
||||
*/
|
||||
EDA_ITEM* GetItem( SCH_FIND_COLLECTOR_DATA& aFindData );
|
||||
|
||||
/**
|
||||
* Function ReplaceItem
|
||||
* performs a string replace of the item at the current index.
|
||||
*
|
||||
* @return True if the text replace occurred otherwise false.
|
||||
*/
|
||||
bool ReplaceItem( SCH_SHEET_PATH* aSheetPath = NULL );
|
||||
|
||||
SEARCH_RESULT Inspect( EDA_ITEM* aItem, void* aTestData ) override;
|
||||
|
||||
/**
|
||||
* Update the replace string without changing anything else.
|
||||
*/
|
||||
void SetReplaceString( const wxString &aReplaceString );
|
||||
|
||||
/**
|
||||
* Function Collect
|
||||
* scans \a aSheetPath using this class's Inspector method for items matching
|
||||
* \a aFindReplaceData.
|
||||
*
|
||||
* @param aFindReplaceData A #SCH_FIND_REPLACE_DATA object containing the search criteria.
|
||||
* @param aSheetPath A pointer to a #SCH_SHEET_PATH object to test for matches. A NULL
|
||||
* value searches the entire schematic hierarchy.
|
||||
*/
|
||||
void Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData, SCH_SHEET_PATH* aSheetPath = NULL );
|
||||
|
||||
void IncrementIndex() { m_foundIndex += 1; }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Class EE_TYPE_COLLECTOR
|
||||
* merely gathers up all SCH_ITEMs of a given set of KICAD_T type(s). It does
|
||||
|
@ -168,10 +168,8 @@ static EDA_HOTKEY HkDelete( _HKI( "Delete Item" ), HK_DELETE, WXK_DELETE );
|
||||
static EDA_HOTKEY HkFind( _HKI( "Find" ), HK_FIND, 'F' + GR_KB_CTRL );
|
||||
static EDA_HOTKEY HkReplace( _HKI( "Find and Replace" ), HK_REPLACE, 'F' + GR_KB_CTRL + GR_KB_ALT );
|
||||
|
||||
static EDA_HOTKEY HkFindNextItem( _HKI( "Find Next Item" ), HK_FIND_NEXT_ITEM, WXK_F5,
|
||||
wxEVT_COMMAND_FIND );
|
||||
static EDA_HOTKEY HkFindNextMarker( _HKI( "Find Next Marker" ), HK_FIND_NEXT_DRC_MARKER, WXK_F5 + GR_KB_SHIFT,
|
||||
EVT_COMMAND_FIND_DRC_MARKER );
|
||||
static EDA_HOTKEY HkFindNextItem( _HKI( "Find Next" ), HK_FIND_NEXT, WXK_F5 );
|
||||
static EDA_HOTKEY HkFindNextMarker( _HKI( "Find Next Marker" ), HK_FIND_NEXT_MARKER, WXK_F5 + GR_KB_SHIFT );
|
||||
static EDA_HOTKEY HkZoomSelection( _HKI( "Zoom to Selection" ), HK_ZOOM_SELECTION, GR_KB_CTRL + WXK_F5,
|
||||
ID_ZOOM_SELECTION );
|
||||
|
||||
@ -439,27 +437,6 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||
GetScreen()->m_O_Curseur = GetCrossHairPosition();
|
||||
break;
|
||||
|
||||
case HK_FIND:
|
||||
case HK_REPLACE:
|
||||
if( EE_CONDITIONS::Idle( selection ) )
|
||||
{
|
||||
cmd.SetId( hotKey->m_IdMenuEvent );
|
||||
GetEventHandler()->ProcessEvent( cmd );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_FIND_NEXT_ITEM:
|
||||
case HK_FIND_NEXT_DRC_MARKER:
|
||||
if( EE_CONDITIONS::Idle( selection ) )
|
||||
{
|
||||
wxFindDialogEvent event( hotKey->m_IdMenuEvent, GetId() );
|
||||
event.SetEventObject( this );
|
||||
event.SetFlags( m_findReplaceData->GetFlags() );
|
||||
event.SetFindString( m_findReplaceData->GetFindString() );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
}
|
||||
break;
|
||||
|
||||
case HK_CANVAS_CAIRO:
|
||||
case HK_CANVAS_OPENGL:
|
||||
{
|
||||
@ -493,9 +470,7 @@ bool LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||
if( aHotKey == 0 )
|
||||
return false;
|
||||
|
||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||
EE_SELECTION_TOOL* selTool = GetToolManager()->GetTool<EE_SELECTION_TOOL>();
|
||||
|
||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||
cmd.SetEventObject( this );
|
||||
|
||||
/* Convert lower to upper case (the usual toupper function has problem
|
||||
|
@ -34,10 +34,7 @@
|
||||
// see also enum common_hotkey_id_command in hotkeys_basic.h
|
||||
// for shared hotkeys id
|
||||
enum hotkey_id_command {
|
||||
HK_FIND_NEXT_ITEM = HK_COMMON_END,
|
||||
HK_FIND_NEXT_DRC_MARKER,
|
||||
HK_DELETE,
|
||||
HK_REPEAT_LAST,
|
||||
HK_REPEAT_LAST = HK_COMMON_END,
|
||||
HK_LIBEDIT_CREATE_PIN,
|
||||
HK_LIBEDIT_VIEW_DOC,
|
||||
HK_ROTATE,
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2018 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2004-2019 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@ -23,22 +23,9 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file eeschema/find.cpp
|
||||
* @brief Functions for searching for a schematic item.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Search a text (text, value, reference) within a component or
|
||||
* search a component in libraries, a marker ...,
|
||||
* in current sheet or whole the project
|
||||
*/
|
||||
#include <fctsys.h>
|
||||
#include <pgm_base.h>
|
||||
#include <sch_draw_panel.h>
|
||||
#include <confirm.h>
|
||||
#include <kicad_string.h>
|
||||
#include <gestfich.h>
|
||||
#include <sch_edit_frame.h>
|
||||
#include <base_units.h>
|
||||
#include <trace_helpers.h>
|
||||
@ -46,65 +33,9 @@
|
||||
#include <general.h>
|
||||
#include <class_library.h>
|
||||
#include <lib_pin.h>
|
||||
#include <sch_marker.h>
|
||||
#include <sch_component.h>
|
||||
#include <sch_sheet.h>
|
||||
#include <sch_sheet_path.h>
|
||||
#include <symbol_lib_table.h>
|
||||
|
||||
#include <kicad_device_context.h>
|
||||
|
||||
#include <dialogs/dialog_schematic_find.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/ee_selection_tool.h>
|
||||
|
||||
void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event )
|
||||
{
|
||||
static SCH_MARKER* lastMarker = NULL;
|
||||
|
||||
wxString msg;
|
||||
SCH_SHEET_LIST schematic( g_RootSheet );
|
||||
SCH_SHEET_PATH* sheetFoundIn = NULL;
|
||||
bool wrap = ( event.GetFlags() & FR_SEARCH_WRAP ) != 0;
|
||||
bool warpCursor = ( ( event.GetId() == wxEVT_COMMAND_FIND_CLOSE ) ||
|
||||
!( event.GetFlags() & FR_NO_WARP_CURSOR ) );
|
||||
|
||||
if( event.GetFlags() & FR_CURRENT_SHEET_ONLY )
|
||||
{
|
||||
sheetFoundIn = g_CurrentSheet;
|
||||
lastMarker = (SCH_MARKER*) g_CurrentSheet->FindNextItem( SCH_MARKER_T, lastMarker, wrap );
|
||||
}
|
||||
else
|
||||
{
|
||||
lastMarker = (SCH_MARKER*) schematic.FindNextItem( SCH_MARKER_T, &sheetFoundIn,
|
||||
lastMarker, wrap );
|
||||
}
|
||||
|
||||
if( lastMarker != NULL )
|
||||
{
|
||||
if( *sheetFoundIn != *g_CurrentSheet )
|
||||
{
|
||||
sheetFoundIn->LastScreen()->SetZoom( GetScreen()->GetZoom() );
|
||||
*g_CurrentSheet = *sheetFoundIn;
|
||||
g_CurrentSheet->UpdateAllScreenReferences();
|
||||
}
|
||||
|
||||
SetCrossHairPosition( lastMarker->GetPosition() );
|
||||
|
||||
|
||||
CenterScreen( lastMarker->GetPosition(), warpCursor );
|
||||
|
||||
msg.Printf( _( "Design rule check marker found in sheet %s at %s, %s" ),
|
||||
sheetFoundIn->Path(),
|
||||
MessageTextFromValue( m_UserUnits, lastMarker->GetPosition().x ),
|
||||
MessageTextFromValue( m_UserUnits, lastMarker->GetPosition().y ) );
|
||||
SetStatusText( msg );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetStatusText( _( "No more markers were found." ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
||||
@ -243,210 +174,3 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
bool SCH_EDIT_FRAME::IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria )
|
||||
{
|
||||
int mod_hash = Prj().SchSymbolLibTable()->GetModifyHash();
|
||||
|
||||
// the cache is obsolete whenever any library changes.
|
||||
if( mod_hash != m_foundItems.GetLibHash() )
|
||||
{
|
||||
m_foundItems.SetForceSearch();
|
||||
m_foundItems.SetLibHash( mod_hash );
|
||||
return true;
|
||||
}
|
||||
else if( m_foundItems.IsSearchRequired( aSearchCriteria ) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
|
||||
{
|
||||
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
|
||||
SCH_FIND_REPLACE_DATA searchCriteria;
|
||||
SCH_FIND_COLLECTOR_DATA data;
|
||||
|
||||
searchCriteria.SetFlags( aEvent.GetFlags() );
|
||||
searchCriteria.SetFindString( aEvent.GetFindString() );
|
||||
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
|
||||
|
||||
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE )
|
||||
{
|
||||
if( m_foundItems.GetCount() == 0 )
|
||||
return;
|
||||
|
||||
selectionTool->ClearBrightening();
|
||||
}
|
||||
else if( IsSearchCacheObsolete( searchCriteria ) )
|
||||
{
|
||||
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
|
||||
m_foundItems.Collect( searchCriteria, g_CurrentSheet );
|
||||
else
|
||||
m_foundItems.Collect( searchCriteria );
|
||||
|
||||
for( EDA_ITEM* item : m_foundItems )
|
||||
selectionTool->BrightenItem( item );
|
||||
}
|
||||
else
|
||||
{
|
||||
EDA_ITEM* currentItem = m_foundItems.GetItem( data );
|
||||
|
||||
if( currentItem != NULL )
|
||||
currentItem->SetForceVisible( false );
|
||||
|
||||
m_foundItems.UpdateIndex();
|
||||
}
|
||||
|
||||
updateFindReplaceView( aEvent );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
|
||||
{
|
||||
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
|
||||
EDA_ITEM* item;
|
||||
SCH_SHEET_PATH* sheet;
|
||||
SCH_SHEET_LIST schematic( g_RootSheet );
|
||||
SCH_FIND_COLLECTOR_DATA data;
|
||||
SCH_FIND_REPLACE_DATA searchCriteria;
|
||||
|
||||
searchCriteria.SetFlags( aEvent.GetFlags() );
|
||||
searchCriteria.SetFindString( aEvent.GetFindString() );
|
||||
searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
|
||||
m_foundItems.SetReplaceString( aEvent.GetReplaceString() );
|
||||
|
||||
if( IsSearchCacheObsolete( searchCriteria ) )
|
||||
{
|
||||
if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
|
||||
m_foundItems.Collect( searchCriteria, g_CurrentSheet );
|
||||
else
|
||||
m_foundItems.Collect( searchCriteria );
|
||||
|
||||
for( EDA_ITEM* foundItem : m_foundItems )
|
||||
selectionTool->BrightenItem( foundItem );
|
||||
}
|
||||
|
||||
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
|
||||
{
|
||||
while( ( item = m_foundItems.GetItem( data ) ) != NULL )
|
||||
{
|
||||
SCH_ITEM* undoItem = data.GetParent();
|
||||
|
||||
// Don't save child items in undo list.
|
||||
if( undoItem == NULL )
|
||||
undoItem = (SCH_ITEM*) item;
|
||||
|
||||
sheet = schematic.GetSheetByPath( data.GetSheetPath() );
|
||||
|
||||
wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() );
|
||||
|
||||
if( m_foundItems.ReplaceItem( sheet ) )
|
||||
{
|
||||
GetCanvas()->GetView()->Update( undoItem, KIGFX::ALL );
|
||||
OnModify();
|
||||
SaveUndoItemInUndoList( undoItem );
|
||||
updateFindReplaceView( aEvent );
|
||||
}
|
||||
|
||||
m_foundItems.IncrementIndex();
|
||||
|
||||
if( m_foundItems.PassedEnd() )
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item = m_foundItems.GetItem( data );
|
||||
|
||||
wxCHECK_RET( item != NULL, wxT( "Invalid replace item in find collector list." ) );
|
||||
|
||||
SCH_ITEM* undoItem = data.GetParent();
|
||||
|
||||
if( undoItem == NULL )
|
||||
undoItem = (SCH_ITEM*) item;
|
||||
|
||||
sheet = schematic.GetSheetByPath( data.GetSheetPath() );
|
||||
|
||||
wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() );
|
||||
|
||||
if( m_foundItems.ReplaceItem( sheet ) )
|
||||
{
|
||||
GetCanvas()->GetView()->Update( undoItem, KIGFX::ALL );
|
||||
OnModify();
|
||||
SaveUndoItemInUndoList( undoItem );
|
||||
updateFindReplaceView( aEvent );
|
||||
|
||||
// A single replace is part of the search; it does not dirty it.
|
||||
m_foundItems.SetForceSearch( false );
|
||||
}
|
||||
|
||||
m_foundItems.IncrementIndex();
|
||||
}
|
||||
|
||||
// End the replace if we are at the end if the list. This prevents an infinite loop if
|
||||
// wrap search is selected and all of the items have been replaced with a value that
|
||||
// still satisfies the search criteria.
|
||||
if( m_foundItems.PassedEnd() )
|
||||
aEvent.SetFlags( aEvent.GetFlags() & ~FR_REPLACE_ITEM_FOUND );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::updateFindReplaceView( wxFindDialogEvent& aEvent )
|
||||
{
|
||||
wxString msg;
|
||||
SCH_SHEET_LIST schematic( g_RootSheet );
|
||||
SCH_FIND_COLLECTOR_DATA data;
|
||||
bool warpCursor = !( aEvent.GetFlags() & FR_NO_WARP_CURSOR );
|
||||
|
||||
if( m_foundItems.GetItem( data ) != NULL )
|
||||
{
|
||||
wxLogTrace( traceFindReplace, wxT( "Found " ) + m_foundItems.GetText( MILLIMETRES ) );
|
||||
|
||||
SCH_SHEET_PATH* sheet = schematic.GetSheetByPath( data.GetSheetPath() );
|
||||
|
||||
wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) +
|
||||
data.GetSheetPath() );
|
||||
|
||||
SCH_ITEM* item = (SCH_ITEM*)m_foundItems.GetItem( data );
|
||||
|
||||
// Make the item temporarily visible just in case it's hide flag is set. This
|
||||
// has no effect on objects that don't support hiding. If this is a close find
|
||||
// dialog event, clear the temporary visibility flag.
|
||||
if( item )
|
||||
{
|
||||
if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE )
|
||||
item->SetForceVisible( false );
|
||||
else if( item->Type() == SCH_FIELD_T && !( (SCH_FIELD*) item )->IsVisible() )
|
||||
item->SetForceVisible( true );
|
||||
}
|
||||
|
||||
if( sheet->PathHumanReadable() != g_CurrentSheet->PathHumanReadable() )
|
||||
{
|
||||
sheet->LastScreen()->SetZoom( GetScreen()->GetZoom() );
|
||||
*g_CurrentSheet = *sheet;
|
||||
g_CurrentSheet->UpdateAllScreenReferences();
|
||||
SetScreen( sheet->LastScreen() );
|
||||
sheet->LastScreen()->TestDanglingEnds();
|
||||
}
|
||||
|
||||
SetCrossHairPosition( data.GetPosition() );
|
||||
CenterScreen( data.GetPosition(), warpCursor );
|
||||
|
||||
msg = m_foundItems.GetText( m_UserUnits );
|
||||
|
||||
if( aEvent.GetFlags() & FR_SEARCH_REPLACE )
|
||||
aEvent.SetFlags( aEvent.GetFlags() | FR_REPLACE_ITEM_FOUND );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( aEvent.GetFlags() & FR_SEARCH_REPLACE )
|
||||
aEvent.SetFlags( aEvent.GetFlags() & ~FR_REPLACE_ITEM_FOUND );
|
||||
|
||||
msg.Printf( _( "No item found matching %s." ), GetChars( aEvent.GetFindString() ) );
|
||||
}
|
||||
|
||||
*m_findReplaceStatus = msg;
|
||||
SetStatusText( msg );
|
||||
}
|
||||
|
@ -270,7 +270,6 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
|
||||
// update the References
|
||||
g_CurrentSheet->UpdateAllScreenReferences();
|
||||
SetSheetNumberAndCount();
|
||||
m_canvas->SetCanStartBlock( -1 );
|
||||
|
||||
if( !screen->m_Initialized )
|
||||
{
|
||||
|
@ -1673,7 +1673,7 @@ wxString LIB_PIN::GetSelectMenuText( EDA_UNITS_T aUnits ) const
|
||||
}
|
||||
|
||||
|
||||
bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation )
|
||||
bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxDat )
|
||||
{
|
||||
wxLogTrace( traceFindItem, wxT( " item " ) + GetSelectMenuText( MILLIMETRES ) );
|
||||
|
||||
@ -1685,15 +1685,8 @@ bool LIB_PIN::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint*
|
||||
|
||||
wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText( MILLIMETRES ) );
|
||||
|
||||
if( EDA_ITEM::Matches( GetName(), aSearchData ) || EDA_ITEM::Matches( m_number, aSearchData ) )
|
||||
{
|
||||
if( aFindLocation )
|
||||
*aFindLocation = GetBoundingBox().Centre();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return EDA_ITEM::Matches( GetName(), aSearchData )
|
||||
|| EDA_ITEM::Matches( m_number, aSearchData );
|
||||
}
|
||||
|
||||
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList,
|
||||
SCH_COMPONENT* aComponent );
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
|
||||
|
||||
/* Cannot use a default parameter here as it will not be compatible with the virtual. */
|
||||
const EDA_RECT GetBoundingBox() const override { return GetBoundingBox( false ); }
|
||||
|
@ -101,7 +101,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
|
||||
// Find
|
||||
editMenu->AddSeparator();
|
||||
editMenu->AddItem( ACTIONS::find, SELECTION_CONDITIONS::ShowAlways );
|
||||
editMenu->AddItem( ACTIONS::replace, SELECTION_CONDITIONS::ShowAlways );
|
||||
editMenu->AddItem( ACTIONS::findAndReplace, SELECTION_CONDITIONS::ShowAlways );
|
||||
|
||||
editMenu->AddSeparator();
|
||||
// Update field values
|
||||
|
@ -1505,8 +1505,7 @@ void SCH_COMPONENT::Rotate( wxPoint aPosition )
|
||||
}
|
||||
|
||||
|
||||
bool SCH_COMPONENT::Matches( wxFindReplaceData& aSearchData, void* aAuxData,
|
||||
wxPoint* aFindLocation )
|
||||
bool SCH_COMPONENT::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||
{
|
||||
wxLogTrace( traceFindItem, wxT( " item " ) + GetSelectMenuText( MILLIMETRES ) );
|
||||
|
||||
|
@ -550,7 +550,7 @@ public:
|
||||
void MirrorX( int aXaxis_position ) override;
|
||||
void Rotate( wxPoint aPosition ) override;
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
|
||||
|
||||
void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList ) override;
|
||||
|
||||
|
@ -278,13 +278,6 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
|
||||
EVT_UPDATE_UI( ID_MENU_CANVAS_CAIRO, SCH_EDIT_FRAME::OnUpdateSwitchCanvas )
|
||||
EVT_UPDATE_UI( ID_MENU_CANVAS_OPENGL, SCH_EDIT_FRAME::OnUpdateSwitchCanvas )
|
||||
|
||||
/* Search dialog events. */
|
||||
EVT_FIND_CLOSE( wxID_ANY, SCH_EDIT_FRAME::OnFindDialogClose )
|
||||
EVT_FIND_DRC_MARKER( wxID_ANY, SCH_EDIT_FRAME::OnFindDrcMarker )
|
||||
EVT_FIND( wxID_ANY, SCH_EDIT_FRAME::OnFindSchematicItem )
|
||||
EVT_FIND_REPLACE( wxID_ANY, SCH_EDIT_FRAME::OnFindReplace )
|
||||
EVT_FIND_REPLACE_ALL( wxID_ANY, SCH_EDIT_FRAME::OnFindReplace )
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
@ -305,14 +298,15 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||
m_printSheetReference = true;
|
||||
SetShowPageLimits( true );
|
||||
m_hotkeysDescrList = g_Schematic_Hotkeys_Descr;
|
||||
m_dlgFindReplace = NULL;
|
||||
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
|
||||
m_findReplaceStatus = new wxString( wxEmptyString );
|
||||
m_undoItem = NULL;
|
||||
m_hasAutoSave = true;
|
||||
m_FrameSize = ConvertDialogToPixels( wxSize( 500, 350 ) ); // default in case of no prefs
|
||||
m_AboutTitle = "Eeschema";
|
||||
|
||||
m_findReplaceData = new wxFindReplaceData( wxFR_DOWN );
|
||||
m_findReplaceDialog = nullptr;
|
||||
m_findReplaceStatusPopup = nullptr;
|
||||
|
||||
SetForceHVLines( true );
|
||||
SetSpiceAjustPassiveValues( false );
|
||||
|
||||
@ -385,7 +379,6 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME()
|
||||
delete g_ConnectionGraph;
|
||||
delete m_undoItem;
|
||||
delete m_findReplaceData;
|
||||
delete m_findReplaceStatus;
|
||||
delete g_RootSheet;
|
||||
|
||||
g_CurrentSheet = nullptr;
|
||||
@ -635,12 +628,15 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& aEvent )
|
||||
}
|
||||
|
||||
// Close the find dialog and preserve it's setting if it is displayed.
|
||||
if( m_dlgFindReplace )
|
||||
if( m_findReplaceDialog )
|
||||
{
|
||||
m_findStringHistoryList = m_dlgFindReplace->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_dlgFindReplace->GetReplaceEntries();
|
||||
m_dlgFindReplace->Destroy();
|
||||
m_dlgFindReplace = NULL;
|
||||
m_findStringHistoryList = m_findReplaceDialog->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_findReplaceDialog->GetReplaceEntries();
|
||||
m_findReplaceDialog->Destroy();
|
||||
m_findReplaceDialog = nullptr;
|
||||
|
||||
m_findReplaceStatusPopup->Destroy();
|
||||
m_findReplaceStatusPopup = nullptr;
|
||||
}
|
||||
|
||||
SCH_SCREENS screens;
|
||||
@ -726,8 +722,6 @@ void SCH_EDIT_FRAME::OnModify()
|
||||
GetScreen()->SetModify();
|
||||
GetScreen()->SetSave();
|
||||
|
||||
m_foundItems.SetForceSearch();
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_realTimeConnectivity && CONNECTION_GRAPH::m_allowRealTime )
|
||||
RecalculateConnections( false );
|
||||
|
||||
@ -826,15 +820,24 @@ void SCH_EDIT_FRAME::OnLaunchBusManager( wxCommandEvent& )
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::DoFindReplace( bool aReplace )
|
||||
wxFindReplaceData* SCH_EDIT_FRAME::GetFindReplaceData()
|
||||
{
|
||||
wxCHECK_RET( m_findReplaceData != NULL,
|
||||
wxT( "Forgot to create find/replace data. Bad Programmer!" ) );
|
||||
|
||||
if( m_dlgFindReplace )
|
||||
if( m_findReplaceDialog && m_findReplaceDialog->IsVisible()
|
||||
&& !m_findReplaceData->GetFindString().IsEmpty() )
|
||||
{
|
||||
delete m_dlgFindReplace;
|
||||
m_dlgFindReplace = NULL;
|
||||
return m_findReplaceData;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::ShowFindReplaceDialog( bool aReplace )
|
||||
{
|
||||
if( m_findReplaceDialog )
|
||||
{
|
||||
delete m_findReplaceDialog;
|
||||
delete m_findReplaceStatusPopup;
|
||||
}
|
||||
|
||||
int style = 0;
|
||||
@ -842,28 +845,40 @@ void SCH_EDIT_FRAME::DoFindReplace( bool aReplace )
|
||||
if( aReplace )
|
||||
style = wxFR_REPLACEDIALOG;
|
||||
|
||||
m_dlgFindReplace = new DIALOG_SCH_FIND( this, m_findReplaceData, m_findReplaceStatus,
|
||||
wxDefaultPosition, wxDefaultSize, style );
|
||||
m_findReplaceDialog = new DIALOG_SCH_FIND( this, m_findReplaceData, wxDefaultPosition,
|
||||
wxDefaultSize, style );
|
||||
|
||||
m_dlgFindReplace->SetFindEntries( m_findStringHistoryList );
|
||||
m_dlgFindReplace->SetReplaceEntries( m_replaceStringHistoryList );
|
||||
m_dlgFindReplace->Show( true );
|
||||
m_findReplaceDialog->SetFindEntries( m_findStringHistoryList );
|
||||
m_findReplaceDialog->SetReplaceEntries( m_replaceStringHistoryList );
|
||||
m_findReplaceDialog->Show( true );
|
||||
|
||||
m_findReplaceStatusPopup = new STATUS_TEXT_POPUP( m_findReplaceDialog );
|
||||
m_findReplaceStatusPopup->SetTextColor( wxColour( 255, 0, 0 ) );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnFindDialogClose( wxFindDialogEvent& event )
|
||||
void SCH_EDIT_FRAME::ShowFindReplaceStatus( const wxString& aMsg )
|
||||
{
|
||||
// If the user dismissed the dialog with the mouse, this will send the cursor back
|
||||
// to the last item found.
|
||||
OnFindSchematicItem( event );
|
||||
wxPoint pos = wxGetMousePosition() - m_findReplaceStatusPopup->GetSize() - wxPoint( 10, 10 );
|
||||
|
||||
if( m_dlgFindReplace )
|
||||
{
|
||||
m_findStringHistoryList = m_dlgFindReplace->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_dlgFindReplace->GetReplaceEntries();
|
||||
m_dlgFindReplace->Destroy();
|
||||
m_dlgFindReplace = NULL;
|
||||
}
|
||||
m_findReplaceStatusPopup->SetText( aMsg );
|
||||
m_findReplaceStatusPopup->Move( pos );
|
||||
m_findReplaceStatusPopup->PopupFor( 3000 );
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::ClearFindReplaceStatus()
|
||||
{
|
||||
m_findReplaceStatusPopup->Hide();
|
||||
}
|
||||
|
||||
|
||||
void SCH_EDIT_FRAME::OnFindDialogClose()
|
||||
{
|
||||
m_findStringHistoryList = m_findReplaceDialog->GetFindEntries();
|
||||
m_replaceStringHistoryList = m_findReplaceDialog->GetReplaceEntries();
|
||||
m_findReplaceDialog->Destroy();
|
||||
m_findReplaceDialog = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
// enum PINSHEETLABEL_SHAPE
|
||||
#include <sch_text.h>
|
||||
#include <tool/selection.h>
|
||||
#include <status_popup.h>
|
||||
|
||||
class SCH_ITEM;
|
||||
class EDA_ITEM;
|
||||
@ -112,16 +113,10 @@ private:
|
||||
PARAM_CFG_ARRAY m_configSettings;
|
||||
ERC_SETTINGS m_ercSettings;
|
||||
wxPageSetupDialogData m_pageSetupData;
|
||||
wxFindReplaceData* m_findReplaceData;
|
||||
wxString* m_findReplaceStatus;
|
||||
bool m_printMonochrome; ///< Print monochrome instead of grey scale.
|
||||
bool m_printSheetReference;
|
||||
DIALOG_SCH_FIND* m_dlgFindReplace;
|
||||
wxArrayString m_findStringHistoryList;
|
||||
wxArrayString m_replaceStringHistoryList;
|
||||
SCH_ITEM* m_item_to_repeat; ///< Last item to insert by the repeat command.
|
||||
int m_repeatLabelDelta; ///< Repeat label number increment step.
|
||||
SCH_FIND_COLLECTOR m_foundItems; ///< List of find/replace items.
|
||||
SCH_ITEM* m_undoItem; ///< Copy of the current item being edited.
|
||||
wxString m_simulatorCommand; ///< Command line used to call the circuit
|
||||
///< simulator (gnucap, spice, ...)
|
||||
@ -137,8 +132,11 @@ private:
|
||||
bool m_autoplaceAlign; ///< align autoplaced fields to the grid
|
||||
bool m_footprintPreview; ///< whether to show footprint previews
|
||||
|
||||
/// An index to the last find item in the found items list #m_foundItems.
|
||||
int m_foundItemIndex;
|
||||
wxFindReplaceData* m_findReplaceData;
|
||||
DIALOG_SCH_FIND* m_findReplaceDialog;
|
||||
STATUS_TEXT_POPUP* m_findReplaceStatusPopup;
|
||||
wxArrayString m_findStringHistoryList;
|
||||
wxArrayString m_replaceStringHistoryList;
|
||||
|
||||
/// Flag to indicate show hidden pins.
|
||||
bool m_showAllPins;
|
||||
@ -181,8 +179,6 @@ protected:
|
||||
*/
|
||||
virtual bool isAutoSaveRequired() const override;
|
||||
|
||||
void updateFindReplaceView( wxFindDialogEvent& aEvent );
|
||||
|
||||
void backAnnotateFootprints( const std::string& aChangedSetOfReferences );
|
||||
|
||||
/**
|
||||
@ -361,7 +357,20 @@ public:
|
||||
/**
|
||||
* Run the Find or Find & Replace dialog.
|
||||
*/
|
||||
void DoFindReplace( bool aReplace );
|
||||
void ShowFindReplaceDialog( bool aReplace );
|
||||
|
||||
void ShowFindReplaceStatus( const wxString& aMsg );
|
||||
void ClearFindReplaceStatus();
|
||||
|
||||
/**
|
||||
* Get the find criteria (as set by the dialog).
|
||||
*/
|
||||
wxFindReplaceData* GetFindReplaceData();
|
||||
|
||||
/**
|
||||
* Notification that the Find dialog has closed.
|
||||
*/
|
||||
void OnFindDialogClose();
|
||||
|
||||
/**
|
||||
* Breaks a single segment into two at the specified point.
|
||||
@ -697,9 +706,6 @@ public:
|
||||
bool aSaveUnderNewName = false,
|
||||
bool aCreateBackupFile = CREATE_BACKUP_FILE );
|
||||
|
||||
// General search:
|
||||
|
||||
bool IsSearchCacheObsolete( const SCH_FIND_REPLACE_DATA& aSearchCriteria );
|
||||
|
||||
/**
|
||||
* Checks if any of the screens has unsaved changes and asks the user whether to save or
|
||||
@ -758,23 +764,6 @@ private:
|
||||
void OnCreateBillOfMaterials( wxCommandEvent& event );
|
||||
void OnLaunchBomManager( wxCommandEvent& event );
|
||||
void OnLaunchBusManager( wxCommandEvent& event );
|
||||
void OnFindDialogClose( wxFindDialogEvent& event );
|
||||
void OnFindDrcMarker( wxFindDialogEvent& event );
|
||||
|
||||
/**
|
||||
* Find an item in the schematic matching the search criteria in \a aEvent.
|
||||
*
|
||||
* @param aEvent - Find dialog event containing the find parameters.
|
||||
*/
|
||||
void OnFindSchematicItem( wxFindDialogEvent& aEvent );
|
||||
|
||||
/**
|
||||
* Perform a search and replace of text in an item in the schematic matching the
|
||||
* search and replace criteria in \a aEvent.
|
||||
*
|
||||
* @param aEvent - Find dialog event containing the search and replace parameters.
|
||||
*/
|
||||
void OnFindReplace( wxFindDialogEvent& aEvent );
|
||||
|
||||
void OnLoadFile( wxCommandEvent& event );
|
||||
void OnLoadCmpToFootprintLinkFile( wxCommandEvent& event );
|
||||
|
@ -320,15 +320,16 @@ void SCH_FIELD::Place( SCH_EDIT_FRAME* frame, wxDC* DC )
|
||||
}
|
||||
|
||||
|
||||
bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation )
|
||||
bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||
{
|
||||
bool match;
|
||||
wxString text = GetFullyQualifiedText();
|
||||
|
||||
// User defined fields have an ID of -1.
|
||||
if( ((m_id > VALUE || m_id < REFERENCE) && !(aSearchData.GetFlags() & FR_SEARCH_ALL_FIELDS))
|
||||
|| ((m_id == REFERENCE) && !(aSearchData.GetFlags() & FR_REPLACE_REFERENCES)) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
wxLogTrace( traceFindItem, wxT( " child item " ) + GetSelectMenuText( MILLIMETRES ) );
|
||||
|
||||
@ -346,17 +347,7 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
|
||||
text << LIB_PART::SubReference( component->GetUnit() );
|
||||
}
|
||||
|
||||
match = SCH_ITEM::Matches( text, aSearchData );
|
||||
|
||||
if( match )
|
||||
{
|
||||
if( aFindLocation )
|
||||
*aFindLocation = GetBoundingBox().Centre();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return SCH_ITEM::Matches( text, aSearchData );
|
||||
}
|
||||
|
||||
|
||||
|
@ -182,7 +182,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
|
||||
bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
|
||||
|
||||
bool Replace( wxFindReplaceData& aSearchData, void* aAuxData = NULL ) override;
|
||||
|
||||
|
@ -87,20 +87,11 @@ void SCH_MARKER::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset
|
||||
}
|
||||
|
||||
|
||||
bool SCH_MARKER::Matches( wxFindReplaceData& aSearchData, void* aAuxData,
|
||||
wxPoint * aFindLocation )
|
||||
bool SCH_MARKER::Matches( wxFindReplaceData& aSearchData, void* aAuxData )
|
||||
{
|
||||
if( SCH_ITEM::Matches( m_drc.GetErrorText(), aSearchData ) ||
|
||||
SCH_ITEM::Matches( m_drc.GetMainText(), aSearchData ) ||
|
||||
SCH_ITEM::Matches( m_drc.GetAuxiliaryText(), aSearchData ) )
|
||||
{
|
||||
if( aFindLocation )
|
||||
*aFindLocation = m_Pos;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return SCH_ITEM::Matches( m_drc.GetErrorText(), aSearchData )
|
||||
|| SCH_ITEM::Matches( m_drc.GetMainText(), aSearchData )
|
||||
|| SCH_ITEM::Matches( m_drc.GetAuxiliaryText(), aSearchData );
|
||||
}
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user