38#include <wx/fdrepdlg.h>
59 GetSizer()->SetSizeHints(
this );
101 if( !aFindString.IsEmpty() )
139 wxString searchString;
140 bool endIsReached =
false;
141 bool isFirstSearch =
false;
145 if( searchString.IsEmpty() )
154 if( index == wxNOT_FOUND )
167 else if( index != 0 )
251 m_status->SetLabel(
_(
"Searching..." ) );
268 for(
BOARD_ITEM* item : fp->GraphicalItems() )
295 ZONE* zoneItem =
dynamic_cast<ZONE*
>( item );
326 isFirstSearch =
true;
339 m_frame->SetStatusText( wxEmptyString );
379 m_frame->SetStatusText( wxEmptyString );
380 msg.Printf(
_(
"'%s' not found" ), searchString );
385 else if( endIsReached )
387 m_frame->SetStatusText( wxEmptyString );
396 msg.Printf(
_(
"'%s' found" ), searchString );
399 msg.Printf(
_(
"Hit(s): %ld / %lu" ),
VECTOR2I m_StartVisu
Coordinates in drawing units of the current view position (upper left corner of device)
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
FOOTPRINTS & Footprints()
wxCheckBox * m_includeTexts
wxCheckBox * m_includeValues
wxComboBox * m_searchCombo
wxCheckBox * m_includeReferences
wxCheckBox * m_matchWords
wxCheckBox * m_includeNets
wxCheckBox * m_includeMarkers
void onTextEnter(wxCommandEvent &event) override
bool Show(bool show=true) override
The Show method is overridden to make the search combobox focused by default.
std::deque< BOARD_ITEM * >::iterator m_it
void Preload(const wxString &aFindString)
void onFindNextClick(wxCommandEvent &event) override
void search(bool direction)
void onSearchAgainClick(wxCommandEvent &event) override
DIALOG_FIND(PCB_BASE_FRAME *aParent)
BOARD_ITEM * GetItem() const
Return the currently found item or nullptr in the case of no items found.
void onFindPreviousClick(wxCommandEvent &event) override
void OnClose(wxCloseEvent &event) override
std::function< void(BOARD_ITEM *)> m_highlightCallback
void OnCloseButtonClick(wxCommandEvent &aEvent) override
std::deque< BOARD_ITEM * > m_hitList
bool Show(bool show) override
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
void ShowInfoBarMsg(const wxString &aMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an info icon on the left of...
wxArrayString & GetFindHistoryList()
EDA_SEARCH_DATA & GetFindReplaceData()
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Handle the data for a net.
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Handle a list of polygons defining a copper zone.
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
bool FindIncludeReferences
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
EDA_SEARCH_MATCH_MODE matchMode