Browse Source
Replace wxFindReplaceData with our own container
Replace wxFindReplaceData with our own container
By dropping the flags, we can be strict with options. Also it makes future usage of search functionality a little more "UI" framework independent7.0
41 changed files with 313 additions and 141 deletions
-
20common/eda_draw_frame.cpp
-
24common/eda_item.cpp
-
2common/eda_text.cpp
-
9common/settings/app_settings.cpp
-
66eeschema/dialogs/dialog_schematic_find.cpp
-
4eeschema/dialogs/dialog_schematic_find.h
-
9eeschema/dialogs/dialog_schematic_find_base.fbp
-
13eeschema/eeschema_config.cpp
-
14eeschema/eeschema_settings.cpp
-
11eeschema/eeschema_settings.h
-
4eeschema/lib_textbox.h
-
7eeschema/sch_edit_frame.cpp
-
36eeschema/sch_field.cpp
-
4eeschema/sch_field.h
-
2eeschema/sch_marker.cpp
-
2eeschema/sch_marker.h
-
9eeschema/sch_pin.cpp
-
4eeschema/sch_pin.h
-
2eeschema/sch_sheet.cpp
-
2eeschema/sch_sheet.h
-
4eeschema/sch_sheet_pin.h
-
2eeschema/sch_symbol.cpp
-
2eeschema/sch_symbol.h
-
4eeschema/sch_text.h
-
4eeschema/sch_textbox.h
-
54eeschema/tools/sch_editor_control.cpp
-
2eeschema/tools/sch_editor_control.h
-
4include/eda_draw_frame.h
-
10include/eda_item.h
-
76include/eda_search_data.h
-
6include/eda_text.h
-
8include/settings/app_settings.h
-
18pcbnew/dialogs/dialog_find.cpp
-
2pcbnew/fp_text.h
-
2pcbnew/fp_textbox.h
-
2pcbnew/netinfo.h
-
2pcbnew/netinfo_item.cpp
-
2pcbnew/pcb_marker.h
-
2pcbnew/pcb_text.h
-
2pcbnew/pcb_textbox.h
-
2pcbnew/zone.h
@ -0,0 +1,76 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2004-2022 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 |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
#ifndef EDA_ITEM_SEARCH_H |
|||
#define EDA_ITEM_SEARCH_H |
|||
|
|||
#include <wx/string.h> |
|||
|
|||
enum class EDA_SEARCH_MATCH_MODE |
|||
{ |
|||
PLAIN, |
|||
WHOLEWORD, |
|||
WILDCARD |
|||
}; |
|||
|
|||
struct EDA_SEARCH_DATA |
|||
{ |
|||
wxString findString; |
|||
wxString replaceString; |
|||
|
|||
bool searchAndReplace; |
|||
|
|||
bool matchCase; |
|||
EDA_SEARCH_MATCH_MODE matchMode; |
|||
|
|||
EDA_SEARCH_DATA() : |
|||
findString(), |
|||
replaceString(), |
|||
searchAndReplace( false ), |
|||
matchCase( false ), |
|||
matchMode( EDA_SEARCH_MATCH_MODE::PLAIN ) |
|||
{ |
|||
} |
|||
|
|||
virtual ~EDA_SEARCH_DATA() {} |
|||
}; |
|||
|
|||
struct SCH_SEARCH_DATA : public EDA_SEARCH_DATA |
|||
{ |
|||
bool searchAllFields; |
|||
bool searchAllPins; |
|||
bool searchCurrentSheetOnly; |
|||
|
|||
bool replaceReferences; |
|||
|
|||
SCH_SEARCH_DATA() : |
|||
EDA_SEARCH_DATA(), |
|||
searchAllFields( false ), |
|||
searchAllPins( false ), |
|||
searchCurrentSheetOnly( false ), |
|||
replaceReferences( false ) |
|||
{ |
|||
} |
|||
}; |
|||
|
|||
#endif |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue