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" ), 6, wxLIST_FORMAT_LEFT );
120 m_columns.emplace_back(
_HKI(
"Layer" ), 2, 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 );
123 m_columns.emplace_back(
_HKI(
"Library Link" ), 8, wxLIST_FORMAT_LEFT );
124 m_columns.emplace_back(
_HKI(
"Library Description" ), 10, wxLIST_FORMAT_LEFT );
133 if( board ==
nullptr )
144 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
153 if( !found && fp->Matches( frp,
nullptr ) )
158 for(
PCB_FIELD* field : fp->GetFields() )
160 if( field->Matches( frp,
nullptr ) )
195 return wxEmptyString;
202 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
203 m_columns.emplace_back(
_HKI(
"Net" ), 6, wxLIST_FORMAT_LEFT);
204 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
205 m_columns.emplace_back(
_HKI(
"Priority" ), 2, wxLIST_FORMAT_CENTER );
206 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
207 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
224 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
228 if( frp.
findString.IsEmpty() || item->Matches( frp,
nullptr ) )
238 ZONE* zone =
static_cast<ZONE*
>( aItem );
246 wxArrayString layers;
252 return wxJoin( layers,
',' );
262 return wxEmptyString;
269 m_columns.emplace_back(
_HKI(
"Type" ), 2, wxLIST_FORMAT_LEFT );
270 m_columns.emplace_back(
_HKI(
"Text" ), 12, wxLIST_FORMAT_LEFT );
271 m_columns.emplace_back(
_HKI(
"Layer" ), 3, wxLIST_FORMAT_CENTER );
272 m_columns.emplace_back( wxT(
"X" ), 3, wxLIST_FORMAT_CENTER );
273 m_columns.emplace_back( wxT(
"Y" ), 3, wxLIST_FORMAT_CENTER );
290 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
299 if( frp.
findString.IsEmpty() || item->Matches( frp,
nullptr ) )
315 return _(
"Textbox" );
317 return _(
"Dimension" );
335 return wxEmptyString;
342 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
343 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
359 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
365 if( net && ( aQuery.IsEmpty() || net->Matches( frp,
nullptr ) ) )
380 return _(
"No Net" );
390 return wxEmptyString;
399 std::vector<NETINFO_ITEM*> selectedItems;
401 for(
long row : aItemRows )
403 if( row >= 0 && row < (
long)
m_hitlist.size() )
425 m_columns.emplace_back(
_HKI(
"Name" ), 6, wxLIST_FORMAT_LEFT );
426 m_columns.emplace_back(
_HKI(
"Class" ), 6, wxLIST_FORMAT_LEFT );
442 frp.
matchMode = EDA_SEARCH_MATCH_MODE::PERMISSIVE;
448 if( net ==
nullptr || !net->Matches( frp,
nullptr ) )
468 return _(
"No Net" );
478 return wxEmptyString;
487 std::vector<NETINFO_ITEM*> selectedItems;
489 for(
long row : aItemRows )
491 if( row >= 0 && row < (
long)
m_hitlist.size() )
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)
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
Return 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 name of this (maybe aggregate) netclass in a format for internal usage or for export to exte...
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.
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
static bool ClassOf(const EDA_ITEM *aItem)
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.
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
bool search_hidden_fields
EDA_SEARCH_MATCH_MODE matchMode
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer
@ PCB_TABLECELL_T
class PCB_TABLECELL, PCB_TEXTBOX for use in tables
@ PCB_DIMENSION_T
class PCB_DIMENSION_BASE: abstract dimension meta-type