39 std::vector<long> item = { aItemRow };
48 std::vector<BOARD_ITEM*> selection;
50 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
56 int col = std::max( 0, aCol );
65 return StrNumCmp( getResultCell( a, col ), getResultCell( b, col ), true ) < 0;
67 return StrNumCmp( getResultCell( b, col ), getResultCell( a, col ), true ) < 0;
73 for(
long i = 0; i < (long)
m_hitlist.size(); ++i )
76 aSelection->push_back( i );
84 std::vector<EDA_ITEM*> selectedItems;
86 for(
long row : aItemRows )
88 if( row >= 0 && row < (
long)
m_hitlist.size() )
89 selectedItems.push_back(
m_hitlist[row] );
94 if( selectedItems.size() )
118 m_columns.emplace_back(
_HKI(
"Reference" ), 2, wxLIST_FORMAT_LEFT );
119 m_columns.emplace_back(
_HKI(
"Value" ), 8, wxLIST_FORMAT_LEFT );
120 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
121 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
122 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
131 if( board ==
nullptr )
138 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
143 || fp->Reference().Matches( frp,
nullptr )
144 || fp->Value().Matches( frp,
nullptr ) )
169 return wxEmptyString;
176 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
177 m_columns.emplace_back(
_HKI(
"Net" ), 6, wxLIST_FORMAT_LEFT);
178 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
179 m_columns.emplace_back(
_HKI(
"Priority" ), 2, wxLIST_FORMAT_CENTER );
180 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
181 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
194 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
198 ZONE* zoneItem =
dynamic_cast<ZONE*
>( item );
200 if( zoneItem && ( aQuery.IsEmpty() || zoneItem->
Matches( frp,
nullptr ) ) )
210 ZONE* zone =
static_cast<ZONE*
>( aItem );
218 wxArrayString layers;
224 return wxJoin( layers,
',' );
234 return wxEmptyString;
241 m_columns.emplace_back(
_HKI(
"Type" ), 2, wxLIST_FORMAT_LEFT );
242 m_columns.emplace_back(
_HKI(
"Text" ), 12, wxLIST_FORMAT_LEFT );
243 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
244 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
245 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
258 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
265 if( textItem && ( aQuery.IsEmpty() || textItem->
Matches( frp,
nullptr ) ) )
267 else if( textBoxItem && ( aQuery.IsEmpty() || textBoxItem->
Matches( frp,
nullptr ) ) )
282 return _(
"Textbox" );
284 return _(
"Dimension" );
302 return wxEmptyString;
309 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
310 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
322 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
328 if( net && ( aQuery.IsEmpty() || net->Matches( frp,
nullptr ) ) )
343 return _(
"No Net" );
353 return wxEmptyString;
362 std::vector<NETINFO_ITEM*> selectedItems;
364 for(
long row : aItemRows )
366 if( row >= 0 && row < (
long)
m_hitlist.size() )
388 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
389 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
401 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
407 if( net ==
nullptr || !net->Matches( frp,
nullptr ) )
427 return _(
"No Net" );
437 return wxEmptyString;
446 std::vector<NETINFO_ITEM*> selectedItems;
448 for(
long row : aItemRows )
450 if( row >= 0 && row < (
long)
m_hitlist.size() )
static TOOL_ACTION zoomFitSelection
static TOOL_ACTION centerSelection
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 APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
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 LSEQ &aSequence) 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)
SELECTION_ZOOM selection_zoom
EDA_SEARCH_MATCH_MODE matchMode