36 std::vector<long> item = { aItemRow };
46 std::vector<SCH_SHEET_PATH*> paths;
55 paths.push_back( &sheet );
60 for(
SCH_ITEM* item : sheet->LastScreen()->Items() )
62 if( aCollector( item, sheet ) )
71 std::vector<SCH_ITEM*> selection;
73 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
79 int col = std::max( 0, aCol );
88 return StrNumCmp( getResultCell( a, col ), getResultCell( b, col ), true ) < 0;
90 return StrNumCmp( getResultCell( b, col ), getResultCell( a, col ), true ) < 0;
95 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
98 aSelection->push_back( i );
106 std::vector<SCH_SEARCH_HIT> selectedHits;
110 for(
long row : aItemRows )
112 if( row >= 0 && row < (
long)
m_hitlist.size() )
114 selectedHits.emplace_back(
m_hitlist[row] );
115 selectedItems.emplace_back(
m_hitlist[row].item );
119 if( selectedHits.empty() )
122 bool allHitsOnSamePage = std::all_of( selectedHits.begin() + 1, selectedHits.end(),
125 return r.sheetPath == selectedHits.front().sheetPath;
130 if( allHitsOnSamePage && !selectedHits.empty() )
134 if(
m_frame->GetCurrentSheet() != *sheet )
137 if( selectedItems.size() )
152 m_frame->GetCanvas()->Refresh(
false );
160 m_columns.emplace_back(
_HKI(
"Reference" ), 2, wxLIST_FORMAT_LEFT );
161 m_columns.emplace_back(
_HKI(
"Value" ), 6, wxLIST_FORMAT_LEFT );
162 m_columns.emplace_back(
_HKI(
"Footprint" ), 10, wxLIST_FORMAT_LEFT );
163 m_columns.emplace_back(
_HKI(
"Page" ), 1, wxLIST_FORMAT_CENTER );
164 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
165 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
166 m_columns.emplace_back(
_HKI(
"Excl. Sim" ), 2, wxLIST_FORMAT_CENTER );
167 m_columns.emplace_back(
_HKI(
"Excl. BOM" ), 2, wxLIST_FORMAT_CENTER );
168 m_columns.emplace_back(
_HKI(
"Excl. Board" ), 2, wxLIST_FORMAT_CENTER );
169 m_columns.emplace_back(
_HKI(
"DNP" ), 2, wxLIST_FORMAT_CENTER );
170 m_columns.emplace_back(
_HKI(
"Library Link" ), 8, wxLIST_FORMAT_LEFT );
171 m_columns.emplace_back(
_HKI(
"Library Description" ), 10, wxLIST_FORMAT_LEFT );
203 if( frp.
findString.IsEmpty() || field.Matches( frp, sheet ) )
222 return wxEmptyString;
243 return sym->
ResolveDNP() ? wxS(
"X" ) : wxS(
" " );
244 else if( aCol == 10 )
246 else if( aCol == 11 )
249 return wxEmptyString;
256 m_columns.emplace_back(
_HKI(
"Reference" ), 2, wxLIST_FORMAT_LEFT );
257 m_columns.emplace_back(
_HKI(
"Value" ), 6, wxLIST_FORMAT_LEFT );
258 m_columns.emplace_back(
_HKI(
"Page" ), 1, wxLIST_FORMAT_CENTER );
259 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
260 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
292 if( frp.
findString.IsEmpty() || field.Matches( frp, sheet ) )
311 return wxEmptyString;
324 return wxEmptyString;
331 m_columns.emplace_back(
_HKI(
"Type" ), 2, wxLIST_FORMAT_LEFT );
332 m_columns.emplace_back(
_HKI(
"Text" ), 12, wxLIST_FORMAT_LEFT );
333 m_columns.emplace_back(
_HKI(
"Page" ), 1, wxLIST_FORMAT_CENTER );
334 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
335 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
379 return wxEmptyString;
397 return wxEmptyString;
400 return _(
"Text Box" );
412 return wxEmptyString;
419 m_columns.emplace_back(
_HKI(
"Type" ), 2, wxLIST_FORMAT_LEFT );
420 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
421 m_columns.emplace_back(
_HKI(
"Page" ), 2, wxLIST_FORMAT_CENTER );
422 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
423 m_columns.emplace_back( wxT(
"Y" ), 3 , wxLIST_FORMAT_CENTER);
445 if( item->
IsType( { SCH_LABEL_LOCATE_ANY_T } ) )
449 wxCHECK( lbl,
false );
469 return wxEmptyString;
474 return _HKI(
"Local" );
476 return _HKI(
"Global" );
478 return _HKI(
"Hierarchical" );
480 return _HKI(
"Directive" );
491 return wxEmptyString;
498 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
499 m_columns.emplace_back(
_HKI(
"Page" ), 2, wxLIST_FORMAT_CENTER );
500 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
501 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER);
523 if( item->
IsType( { SCH_GROUP_T } ) )
545 return wxEmptyString;
548 return group->GetName();
552 return m_frame->MessageTextFromValue(
group->GetPosition().x );
554 return m_frame->MessageTextFromValue(
group->GetPosition().y );
556 return wxEmptyString;
static TOOL_ACTION zoomFitSelection
static TOOL_ACTION centerSelection
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
KICAD_T Type() const
Returns the type of object.
virtual bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
wxString getResultCell(const SCH_SEARCH_HIT &hit, int aCol) override
int Search(const wxString &aQuery) override
GROUP_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
LABEL_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
int Search(const wxString &aQuery) override
wxString getResultCell(const SCH_SEARCH_HIT &hit, int aCol) override
int Search(const wxString &aQuery) override
POWER_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
wxString getResultCell(const SCH_SEARCH_HIT &aHit, int aCol) override
static TOOL_ACTION properties
static TOOL_ACTION changeSheet
Schematic editor (Eeschema) main window.
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
A set of SCH_ITEMs (i.e., without duplicates).
Base class for any item which can be embedded within the SCHEMATIC container class,...
bool ResolveExcludedFromBOM() const
bool ResolveExcludedFromBoard() const
bool ResolveExcludedFromSim() const
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const override
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
void BuildClientSheetPathList()
Build the list of sheet paths sharing a screen for each screen in use.
std::vector< SCH_SEARCH_HIT > m_hitlist
void SelectItems(std::vector< long > &aItemRows) override
void FindAll(const std::function< bool(SCH_ITEM *, SCH_SHEET_PATH *)> &aCollector)
void Sort(int aCol, bool aAscending, std::vector< long > *aSelection) override
void ActivateItem(long aItemRow) override
SCH_SEARCH_HANDLER(const wxString &aName, SCH_EDIT_FRAME *aFrame)
VECTOR2I GetPosition() const override
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
wxString GetPageNumber() const
wxString GetDescription() const override
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
bool IsMissingLibSymbol() const
Check to see if the library symbol is set to the dummy library symbol.
VECTOR2I GetPosition() const override
const LIB_ID & GetLibId() const override
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const override
bool IsPower() const override
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
virtual wxString GetShownText(const RENDER_SETTINGS *aSettings, const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
VECTOR2I GetPosition() const override
virtual wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
std::vector< std::tuple< wxString, int, wxListColumnFormat > > m_columns
wxString getResultCell(const SCH_SEARCH_HIT &aHit, int aCol) override
SYMBOL_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
int Search(const wxString &aQuery) override
TEXT_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
int Search(const wxString &aQuery) override
wxString getResultCell(const SCH_SEARCH_HIT &hit, int aCol) override
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
Class to handle a set of SCH_ITEMs.
SELECTION_ZOOM selection_zoom
bool search_hidden_fields
EDA_SEARCH_MATCH_MODE matchMode
bool searchCurrentSheetOnly
SCH_SHEET_PATH * sheetPath
@ FOOTPRINT
Field Name Module PCB, i.e. "16DIP300".
@ VALUE
Field Value of part, i.e. "3.3K".