38 std::vector<long> item = { aItemRow };
47 std::vector<BOARD_ITEM*> selection;
49 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
55 int col = std::max( 0, aCol );
64 return StrNumCmp( getResultCell( a, col ), getResultCell( b, col ), true ) < 0;
66 return StrNumCmp( getResultCell( b, col ), getResultCell( a, col ), true ) < 0;
72 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
75 aSelection->push_back( i );
82 std::vector<EDA_ITEM*> selectedItems;
84 for(
long row : aItemRows )
86 if( row >= 0 && row < (
long)
m_hitlist.size() )
87 selectedItems.push_back(
m_hitlist[row] );
92 if( selectedItems.size() )
102 m_columns.emplace_back(
_HKI(
"Reference" ), 2, wxLIST_FORMAT_LEFT );
103 m_columns.emplace_back(
_HKI(
"Value" ), 8, wxLIST_FORMAT_LEFT );
104 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
105 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
106 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
115 if( board ==
nullptr )
122 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
127 || fp->Reference().Matches( frp,
nullptr )
128 || fp->Value().Matches( frp,
nullptr ) )
153 return wxEmptyString;
160 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
161 m_columns.emplace_back(
_HKI(
"Net" ), 6, wxLIST_FORMAT_LEFT);
162 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
163 m_columns.emplace_back(
_HKI(
"Priority" ), 2, 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 );
178 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
182 ZONE* zoneItem =
dynamic_cast<ZONE*
>( item );
184 if( zoneItem && ( aQuery.IsEmpty() || zoneItem->
Matches( frp,
nullptr ) ) )
194 ZONE* zone =
static_cast<ZONE*
>( aItem );
202 wxArrayString layers;
208 return wxJoin( layers,
',' );
218 return wxEmptyString;
225 m_columns.emplace_back(
_HKI(
"Type" ), 2, wxLIST_FORMAT_LEFT );
226 m_columns.emplace_back(
_HKI(
"Text" ), 12, wxLIST_FORMAT_LEFT );
227 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
228 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
229 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
242 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
249 if( textItem && ( aQuery.IsEmpty() || textItem->
Matches( frp,
nullptr ) ) )
251 else if( textBoxItem && ( aQuery.IsEmpty() || textBoxItem->
Matches( frp,
nullptr ) ) )
266 return _(
"Textbox" );
268 return _(
"Dimension" );
286 return wxEmptyString;
293 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
294 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
306 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
312 if( net && ( aQuery.IsEmpty() || net->Matches( frp,
nullptr ) ) )
327 return _(
"No Net" );
337 return wxEmptyString;
346 std::vector<NETINFO_ITEM*> selectedItems;
348 for(
long row : aItemRows )
350 if( row >= 0 && row < (
long)
m_hitlist.size() )
372 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
373 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
385 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
391 if( net ==
nullptr || !net->Matches( frp,
nullptr ) )
411 return _(
"No Net" );
421 return wxEmptyString;
430 std::vector<NETINFO_ITEM*> selectedItems;
432 for(
long row : aItemRows )
434 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.
const ZONES & Zones() const
const FOOTPRINTS & Footprints() const
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.
const DRAWINGS & Drawings() const
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
Gets the consolidated name of this netclass (which may be an aggregate)
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.
wxString MessageTextFromCoord(int aValue, ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType) const
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 Sort(int aCol, bool aAscending, std::vector< long > *aSelection) override
void SelectItems(std::vector< long > &aItemRows) 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::tuple< wxString, int, wxListColumnFormat > > 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
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:
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
Class that computes missing connections on a PCB.
wxString UnescapeString(const wxString &aSource)
EDA_SEARCH_MATCH_MODE matchMode