37 std::vector<long> item = { aItemRow };
52 return StrNumCmp( getResultCell( a, aCol ), getResultCell( b, aCol ), true ) < 0;
54 return StrNumCmp( getResultCell( b, aCol ), getResultCell( a, aCol ), true ) < 0;
61 std::vector<EDA_ITEM*> selectedItems;
63 for(
long row : aItemRows )
65 if( row >= 0 && row < (
long)
m_hitlist.size() )
66 selectedItems.push_back(
m_hitlist[row] );
71 if( selectedItems.size() )
81 m_columns.emplace_back( wxT(
"Reference" ), 1 );
82 m_columns.emplace_back( wxT(
"Value" ), 2 );
83 m_columns.emplace_back( wxT(
"Layer" ), 1 );
98 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
103 || fp->Reference().Matches( frp,
nullptr )
104 || fp->Value().Matches( frp,
nullptr ) )
129 return wxEmptyString;
136 m_columns.emplace_back( wxT(
"Name" ), 2 );
137 m_columns.emplace_back( wxT(
"Net" ), 1 );
138 m_columns.emplace_back( wxT(
"Layer" ), 1 );
139 m_columns.emplace_back( wxT(
"Priority" ), 1 );
154 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
158 ZONE* zoneItem =
dynamic_cast<ZONE*
>( item );
160 if( zoneItem && ( aQuery.IsEmpty() || zoneItem->
Matches( frp,
nullptr ) ) )
170 ZONE* zone =
static_cast<ZONE*
>( aItem );
178 wxArrayString layers;
184 return wxJoin( layers,
',' );
193 return wxEmptyString;
200 m_columns.emplace_back( wxT(
"Type" ), 1 );
201 m_columns.emplace_back( wxT(
"Text" ), 3 );
202 m_columns.emplace_back( wxT(
"Layer" ), 1 );
217 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
224 if( textItem && ( aQuery.IsEmpty() || textItem->
Matches( frp,
nullptr ) ) )
226 else if( textBoxItem && ( aQuery.IsEmpty() || textBoxItem->
Matches( frp,
nullptr ) ) )
241 return _(
"Textbox" );
257 return wxEmptyString;
264 m_columns.emplace_back( wxT(
"Name" ), 2 );
265 m_columns.emplace_back( wxT(
"Class" ), 2 );
277 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
283 if( net && ( aQuery.IsEmpty() || net->Matches( frp,
nullptr ) ) )
298 return _(
"No Net" );
308 return wxEmptyString;
317 std::vector<NETINFO_ITEM*> selectedItems;
319 for(
long row : aItemRows )
321 if( row >= 0 && row < (
long)
m_hitlist.size() )
343 m_columns.emplace_back( wxT(
"Name" ), 2 );
344 m_columns.emplace_back( wxT(
"Class" ), 2 );
356 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
362 if( net ==
nullptr || !net->Matches( frp,
nullptr ) )
382 return _(
"No Net" );
392 return wxEmptyString;
401 std::vector<NETINFO_ITEM*> selectedItems;
403 for(
long row : aItemRows )
405 if( row >= 0 && row < (
long)
m_hitlist.size() )
wxString GetNetname() const
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
wxString GetLayerName() const
Return the name of the PCB layer on which the item resides.
Information pertinent to a Pcbnew printed circuit board.
const NETINFO_LIST & GetNetInfo() const
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT, bool aSkipConnectivity=false) override
Removes an item from the container.
FOOTPRINTS & Footprints()
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
std::shared_ptr< CONNECTIVITY_DATA > GetConnectivity() const
Return a list of missing connections between components/tracks.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
void UpdateAllLayersColor()
Apply the new coloring scheme to all layers.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
LSEQ Seq(const PCB_LAYER_ID *aWishListSequence, unsigned aCount) const
Return an LSEQ from the union of this LSET and a desired sequence.
const wxString GetName() const
Handle the data for a net.
const wxString & GetNetname() const
void ActivateItem(long aItemRow) override
int Search(const wxString &aQuery) override
NETS_SEARCH_HANDLER(PCB_EDIT_FRAME *aFrame)
wxString getResultCell(BOARD_ITEM *aItem, int aCol) override
void SelectItems(std::vector< long > &aItemRows) override
static TOOL_ACTION properties
Activation of the edit tool.
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
The main frame for Pcbnew.
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
void ActivateItem(long aItemRow) override
void SelectItems(std::vector< long > &aItemRows) override
void Sort(int aCol, bool aAscending) override
std::vector< BOARD_ITEM * > m_hitlist
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
static bool ClassOf(const EDA_ITEM *aItem)
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
static bool ClassOf(const EDA_ITEM *aItem)
wxString getResultCell(BOARD_ITEM *aItem, int aCol) override
RATSNEST_SEARCH_HANDLER(PCB_EDIT_FRAME *aFrame)
int Search(const wxString &aQuery) override
void SelectItems(std::vector< long > &aItemRows) override
void ActivateItem(long aItemRow) override
Describe ratsnest for a single net.
const std::vector< CN_EDGE > & GetEdges() const
std::vector< SCH_SEARCH_HIT > m_hitlist
std::vector< std::pair< wxString, int > > m_columns
TEXT_SEARCH_HANDLER(SCH_EDIT_FRAME *aFrame)
int Search(const wxString &aQuery) override
wxString getResultCell(const SCH_SEARCH_HIT &hit, int aCol) override
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
ZONE_SEARCH_HANDLER(PCB_EDIT_FRAME *aFrame)
wxString getResultCell(BOARD_ITEM *aItem, int aCol) override
int Search(const wxString &aQuery) override
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.
const wxString & GetZoneName() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
unsigned GetAssignedPriority() const
PCB_LAYER_ID
A quick note on layer IDs:
Class that computes missing connections on a PCB.
wxString UnescapeString(const wxString &aSource)
EDA_SEARCH_MATCH_MODE matchMode