KiCad PCB EDA Suite
Loading...
Searching...
No Matches
net_navigator.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2023 Rivos
5 * Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * @author Wayne Stambaugh <[email protected]>
8 *
9 * This program is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation, either version 3 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23#include <wx/log.h>
24#include <core/profile.h>
25#include <tool/tool_manager.h>
26#include <kiface_base.h>
27#include <sch_edit_frame.h>
28#include <sch_bus_entry.h>
29#include <sch_line.h>
30#include <sch_junction.h>
31#include <sch_no_connect.h>
32#include <sch_sheet_pin.h>
33#include <schematic.h>
34#include <string_utils.h>
35#include <trace_helpers.h>
36#include <connection_graph.h>
38#include <tools/ee_actions.h>
39
40
41static wxString GetNetNavigatorItemText( const SCH_ITEM* aItem,
42 const SCH_SHEET_PATH& aSheetPath,
43 UNITS_PROVIDER* aUnitsProvider )
44{
45 wxString retv;
46
47 wxCHECK( aItem && aUnitsProvider, retv );
48
49 switch( aItem->Type() )
50 {
51 case SCH_LINE_T:
52 {
53 const SCH_LINE* line = static_cast<const SCH_LINE*>( aItem );
54
55 wxCHECK( line, retv );
56
57 if( aItem->GetLayer() == LAYER_WIRE )
58 {
59 retv.Printf( _( "Wire from %s, %s to %s, %s" ),
60 aUnitsProvider->MessageTextFromValue( line->GetStartPoint().x ),
61 aUnitsProvider->MessageTextFromValue( line->GetStartPoint().y ),
62 aUnitsProvider->MessageTextFromValue( line->GetEndPoint().x ),
63 aUnitsProvider->MessageTextFromValue( line->GetEndPoint().y ) );
64 }
65 else if( aItem->GetLayer() == LAYER_BUS )
66 {
67 retv.Printf( _( "Bus from %s, %s to %s, %s" ),
68 aUnitsProvider->MessageTextFromValue( line->GetStartPoint().x ),
69 aUnitsProvider->MessageTextFromValue( line->GetStartPoint().y ),
70 aUnitsProvider->MessageTextFromValue( line->GetEndPoint().x ),
71 aUnitsProvider->MessageTextFromValue( line->GetEndPoint().y ) );
72 }
73 else
74 {
75 retv = _( "Graphic line not connectable" );
76 }
77
78 break;
79 }
80 case SCH_PIN_T:
81 {
82 const SCH_PIN* pin = static_cast<const SCH_PIN*>( aItem );
83 wxCHECK( pin, retv );
84
85 const SYMBOL* symbol = pin->GetParentSymbol();
86 wxCHECK( symbol, retv );
87
88 retv.Printf( _( "Symbol '%s' pin '%s'" ), symbol->GetRef( &aSheetPath, true ),
89 UnescapeString( pin->GetNumber() ) );
90 break;
91 }
92 case SCH_SHEET_PIN_T:
93 {
94 const SCH_SHEET_PIN* pin = static_cast<const SCH_SHEET_PIN*>( aItem );
95 wxCHECK( pin, retv );
96
97 SCH_SHEET* sheet = pin->GetParent();
98 wxCHECK( sheet, retv );
99
100 retv.Printf( _( "Sheet '%s' pin '%s'" ), sheet->GetName(),
101 UnescapeString( pin->GetText() ) );
102 break;
103 }
104 case SCH_LABEL_T:
105 {
106 const SCH_LABEL* label = static_cast<const SCH_LABEL*>( aItem );
107 wxCHECK( label, retv );
108
109 retv.Printf( _( "Label '%s' at %s, %s" ), UnescapeString( label->GetText() ),
110 aUnitsProvider->MessageTextFromValue( label->GetPosition().x ),
111 aUnitsProvider->MessageTextFromValue( label->GetPosition().y ) );
112 break;
113 }
115 {
116 const SCH_GLOBALLABEL* label = static_cast<const SCH_GLOBALLABEL*>( aItem );
117 wxCHECK( label, retv );
118
119 retv.Printf( _( "Global label '%s' at %s, %s" ), UnescapeString( label->GetText() ),
120 aUnitsProvider->MessageTextFromValue( label->GetPosition().x ),
121 aUnitsProvider->MessageTextFromValue( label->GetPosition().y ) );
122 break;
123 }
124 case SCH_HIER_LABEL_T:
125 {
126 const SCH_HIERLABEL* label = static_cast<const SCH_HIERLABEL*>( aItem );
127 wxCHECK( label, retv );
128
129 retv.Printf( _( "Hierarchical label '%s' at %s, %s" ), UnescapeString( label->GetText() ),
130 aUnitsProvider->MessageTextFromValue( label->GetPosition().x ),
131 aUnitsProvider->MessageTextFromValue( label->GetPosition().y ) );
132 break;
133 }
134 case SCH_JUNCTION_T:
135 {
136 const SCH_JUNCTION* junction = static_cast<const SCH_JUNCTION*>( aItem );
137 wxCHECK( junction, retv );
138
139 retv.Printf( _( "Junction at %s, %s" ),
140 aUnitsProvider->MessageTextFromValue( junction->GetPosition().x ),
141 aUnitsProvider->MessageTextFromValue( junction->GetPosition().y ) );
142 break;
143 }
144 case SCH_NO_CONNECT_T:
145 {
146 const SCH_NO_CONNECT* nc = static_cast<const SCH_NO_CONNECT*>( aItem );
147 wxCHECK( nc, retv );
148
149 retv.Printf( _( "No-Connect at %s, %s" ),
150 aUnitsProvider->MessageTextFromValue( nc->GetPosition().x ),
151 aUnitsProvider->MessageTextFromValue( nc->GetPosition().y ) );
152 break;
153 }
155 {
156 const SCH_BUS_WIRE_ENTRY* entry = static_cast<const SCH_BUS_WIRE_ENTRY*>( aItem );
157 wxCHECK( entry, retv );
158
159 retv.Printf( _( "Bus to wire entry from %s, %s to %s, %s" ),
160 aUnitsProvider->MessageTextFromValue( entry->GetPosition().x ),
161 aUnitsProvider->MessageTextFromValue( entry->GetPosition().y ),
162 aUnitsProvider->MessageTextFromValue( entry->GetEnd().x ),
163 aUnitsProvider->MessageTextFromValue( entry->GetEnd().y ) );
164 break;
165 }
167 {
168 const SCH_BUS_BUS_ENTRY* entry = static_cast<const SCH_BUS_BUS_ENTRY*>( aItem );
169 wxCHECK( entry, retv );
170
171 retv.Printf( _( "Bus to bus entry from %s, %s to %s, %s" ),
172 aUnitsProvider->MessageTextFromValue( entry->GetPosition().x ),
173 aUnitsProvider->MessageTextFromValue( entry->GetPosition().y ),
174 aUnitsProvider->MessageTextFromValue( entry->GetEnd().x ),
175 aUnitsProvider->MessageTextFromValue( entry->GetEnd().y ) );
176 break;
177 }
179 {
180 const SCH_DIRECTIVE_LABEL* entry = static_cast<const SCH_DIRECTIVE_LABEL*>( aItem );
181 wxCHECK( entry, retv );
182
183 retv.Printf( _( "Netclass label '%s' at %s, %s" ), UnescapeString( entry->GetText() ),
184 aUnitsProvider->MessageTextFromValue( entry->GetPosition().x ),
185 aUnitsProvider->MessageTextFromValue( entry->GetPosition().y ) );
186 break;
187 }
188 default:
189 retv.Printf( _( "Unhandled item type %d" ), aItem->Type() );
190 }
191
192 return retv;
193}
194
195
196void SCH_EDIT_FRAME::MakeNetNavigatorNode( const wxString& aNetName, wxTreeItemId aParentId,
197 const NET_NAVIGATOR_ITEM_DATA* aSelection )
198{
199 wxCHECK( !aNetName.IsEmpty(), /* void */ );
200 wxCHECK( m_schematic, /* void */ );
201 wxCHECK( m_netNavigator, /* void */ );
202
203 wxTreeItemId expandId = aParentId;
204 CONNECTION_GRAPH* connectionGraph = m_schematic->ConnectionGraph();
205
206 wxCHECK( connectionGraph, /* void */ );
207
208 wxString sheetPathPrefix;
209 const std::vector<CONNECTION_SUBGRAPH*> subgraphs =
210 connectionGraph->GetAllSubgraphs( aNetName );
211
212 for( const CONNECTION_SUBGRAPH* subGraph : subgraphs )
213 {
214 NET_NAVIGATOR_ITEM_DATA* itemData = nullptr;
215 SCH_SHEET_PATH sheetPath = subGraph->GetSheet();
216
217 wxCHECK2( subGraph && sheetPath.Last(), continue );
218
219 if( subGraph->GetItems().empty() )
220 continue;
221
222 itemData = new NET_NAVIGATOR_ITEM_DATA( sheetPath, nullptr );
223
224 bool stripTrailingSeparator = !sheetPath.Last()->IsRootSheet();
225 wxString txt = sheetPath.PathHumanReadable( true, stripTrailingSeparator );
226 wxTreeItemId sheetId = m_netNavigator->AppendItem( aParentId, txt, -1, -1, itemData );
227
228 if( aSelection && *aSelection == *itemData )
229 m_netNavigator->SelectItem( sheetId );
230
231 // If there is only one sheet in the schematic, always expand the sheet tree.
232 if( Schematic().GetSheets().size() == 1 )
233 expandId = sheetId;
234
235 for( const SCH_ITEM* item : subGraph->GetItems() )
236 {
237 KICAD_T type = item->Type();
238
239 if( ( type == SCH_LINE_T ) || ( type == SCH_JUNCTION_T )
240 || ( type == SCH_BUS_WIRE_ENTRY_T ) || ( type == SCH_BUS_BUS_ENTRY_T ) )
241 continue;
242
243 itemData = new NET_NAVIGATOR_ITEM_DATA( sheetPath, item );
244 wxTreeItemId id = m_netNavigator->AppendItem( sheetId,
245 GetNetNavigatorItemText( item, sheetPath,
246 this ),
247 -1, -1, itemData );
248
249 if( aSelection && *aSelection == *itemData )
250 {
251 expandId = sheetId;
252 m_netNavigator->EnsureVisible( id );
253 m_netNavigator->SelectItem( id );
254 }
255 }
256 }
257
258 m_netNavigator->Expand( aParentId );
259}
260
261
263{
264 wxCHECK( m_netNavigator, /* void */ );
265
266 size_t nodeCnt = 0;
267
268 m_netNavigator->Freeze();
269
270 PROF_TIMER timer;
271
272 if( m_highlightedConn.IsEmpty() )
273 {
274 m_netNavigator->DeleteAllItems();
275
276 // Create a tree of all nets in the schematic.
277 wxTreeItemId rootId = m_netNavigator->AddRoot( _( "Nets" ), 0 );
278
279 const NET_MAP& netMap = m_schematic->ConnectionGraph()->GetNetMap();
280
281 for( const auto& net : netMap )
282 {
283 // Skip bus member subgraphs for the moment.
284 if( net.first.Name.IsEmpty() )
285 continue;
286
287 nodeCnt++;
288 wxTreeItemId netId = m_netNavigator->AppendItem( rootId,
289 UnescapeString( net.first.Name ) );
290 MakeNetNavigatorNode( net.first.Name, netId, aSelection );
291 }
292
293 m_netNavigator->Expand( rootId );
294 }
295 else if( !m_netNavigator->IsEmpty() )
296 {
297 const wxString shownNetName = m_netNavigator->GetItemText( m_netNavigator->GetRootItem() );
298
299 if( shownNetName != m_highlightedConn )
300 {
301 m_netNavigator->DeleteAllItems();
302
303 nodeCnt++;
304
305 wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
306
307 MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection );
308 }
309 else
310 {
311 NET_NAVIGATOR_ITEM_DATA* itemData = nullptr;
312
313 wxTreeItemId selection = m_netNavigator->GetSelection();
314
315 if( selection.IsOk() )
316 itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( selection ) );
317
318 m_netNavigator->DeleteAllItems();
319 nodeCnt++;
320
321 wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
322
323 MakeNetNavigatorNode( m_highlightedConn, rootId, itemData );
324 }
325 }
326 else
327 {
328 nodeCnt++;
329
330 wxTreeItemId rootId = m_netNavigator->AddRoot( UnescapeString( m_highlightedConn ), 0 );
331
332 MakeNetNavigatorNode( m_highlightedConn, rootId, aSelection );
333 }
334
335 timer.Stop();
336
337 wxLogTrace( traceUiProfile, wxS( "Adding %zu nodes to net navigator took %s." ),
338 nodeCnt, timer.to_string() );
339
340 m_netNavigator->Thaw();
341}
342
343
345{
346 wxCHECK( m_netNavigator, /* void */ );
347
348 // Maybe in the future we can do something like collapse the tree for an empty selection.
349 // For now, leave the tree selection in its current state.
350 if( !aSelection )
351 return;
352
353 wxTreeItemIdValue sheetCookie;
354 NET_NAVIGATOR_ITEM_DATA* itemData = nullptr;
355 wxTreeItemId rootId = m_netNavigator->GetRootItem();
356 wxTreeItemId sheetId = m_netNavigator->GetFirstChild( rootId, sheetCookie );
357
358 while( sheetId.IsOk() )
359 {
360 if( m_netNavigator->ItemHasChildren( sheetId ) )
361 {
362 wxTreeItemIdValue itemCookie;
363 wxTreeItemId itemId = m_netNavigator->GetFirstChild( sheetId, itemCookie );
364
365 while( itemId.IsOk() )
366 {
367 itemData = dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( itemId ) );
368
369 wxCHECK2( itemData, continue );
370
371 if( *itemData == *aSelection )
372 {
373 if( !m_netNavigator->IsVisible( itemId ) )
374 {
375 m_netNavigator->CollapseAll();
376 m_netNavigator->EnsureVisible( itemId );
377 }
378
379 m_netNavigator->SelectItem( itemId );
380 return;
381 }
382
383 itemId = m_netNavigator->GetNextSibling( itemId );
384 }
385
386 sheetId = m_netNavigator->GetNextSibling( sheetId );
387 }
388 }
389}
390
391
393{
394 if( !m_netNavigator )
395 return nullptr;
396
397 wxTreeItemId id = m_netNavigator->GetSelection();
398
399 if( !id.IsOk() || ( id == m_netNavigator->GetRootItem() ) )
400 return nullptr;
401
402 NET_NAVIGATOR_ITEM_DATA* itemData =
403 dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( id ) );
404
405 wxCHECK( itemData, nullptr );
406
407 return itemData->GetItem();
408}
409
410
412{
413 wxCHECK( m_netNavigator, /* void */ );
414
415 wxTreeItemId id = aEvent.GetItem();
416
417 // Clicking on the root item (net name ) does nothing.
418 if( id == m_netNavigator->GetRootItem() )
419 return;
420
421 NET_NAVIGATOR_ITEM_DATA* itemData =
422 dynamic_cast<NET_NAVIGATOR_ITEM_DATA*>( m_netNavigator->GetItemData( id ) );
423
424 // Just a net name when we have all nets displayed.
425 if( !itemData )
426 return;
427
428 if( GetCurrentSheet() != itemData->GetSheetPath() )
429 {
430 Schematic().SetCurrentSheet( itemData->GetSheetPath() );
432 }
433
434 // Do not focus on item when a sheet tree node is selected.
435 if( m_netNavigator->GetItemParent( id ) != m_netNavigator->GetRootItem()
436 && itemData->GetItem() )
437 {
438 // Make sure we didn't remove the item and/or the screen it resides on before we access it.
439 const SCH_ITEM* item = itemData->GetItem();
440
441 // Don't search for child items in screen r-tree.
442 item = ( ( item->Type() == SCH_SHEET_PIN_T ) || ( item->Type() == SCH_PIN_T ) ) ?
443 static_cast<const SCH_ITEM*>( item->GetParent() ) : item;
444
445 const SCH_SCREEN* screen = itemData->GetSheetPath().LastScreen();
446
447 wxCHECK( screen, /* void */ );
448 wxCHECK( screen->Items().contains( item, true ), /* void */ );
449
450 FocusOnLocation( itemData->GetItem()->GetBoundingBox().Centre() );
451 }
452
453 GetCanvas()->Refresh();
454}
455
456
458{
459 wxCHECK( m_netNavigator, /* void */ );
460}
461
462
464{
466
467 wxCHECK( cfg, /* void */ );
468
469 wxAuiPaneInfo& netNavigatorPane = m_auimgr.GetPane( NetNavigatorPaneName() );
470
471 netNavigatorPane.Show( !netNavigatorPane.IsShown() );
473
474 cfg->m_AuiPanels.show_net_nav_panel = netNavigatorPane.IsShown();
475
476 if( netNavigatorPane.IsShown() )
477 {
478 if( netNavigatorPane.IsFloating() )
479 {
480 netNavigatorPane.FloatingSize( cfg->m_AuiPanels.net_nav_panel_float_size );
481 m_auimgr.Update();
482 }
483 else if( cfg->m_AuiPanels.net_nav_panel_docked_size.GetWidth() > 0 )
484 {
485 // SetAuiPaneSize also updates m_auimgr
486 SetAuiPaneSize( m_auimgr, netNavigatorPane,
487 cfg->m_AuiPanels.net_nav_panel_docked_size.GetWidth(), -1 );
488 }
489 }
490 else
491 {
492 if( netNavigatorPane.IsFloating() )
493 {
494 cfg->m_AuiPanels.net_nav_panel_float_size = netNavigatorPane.floating_size;
495 }
496 else
497 {
499 }
500
501 m_auimgr.Update();
502 }
503}
504
505
506void SCH_EDIT_FRAME::onResizeNetNavigator( wxSizeEvent& aEvent )
507{
508 aEvent.Skip();
509
510 // Called when resizing the Hierarchy Navigator panel
511 // Store the current pane size
512 // It allows to retrieve the last defined pane size when switching between
513 // docked and floating pane state
514 // Note: *DO NOT* call m_auimgr.Update() here: it crashes Kicad at least on Windows
515
516 EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
517
518 wxCHECK( cfg, /* void */ );
519
520 wxAuiPaneInfo& netNavigatorPane = m_auimgr.GetPane( NetNavigatorPaneName() );
521
522 if( m_netNavigator->IsShownOnScreen() )
523 {
524 cfg->m_AuiPanels.net_nav_panel_float_size = netNavigatorPane.floating_size;
525
526 // initialize net_nav_panel_docked_width and best size only if the netNavigatorPane
527 // width is > 0 (i.e. if its size is already set and has meaning)
528 // if it is floating, its size is not initialized (only floating_size is initialized)
529 // initializing netNavigatorPane.best_size is useful when switching to float pane and
530 // after switching to the docked pane, to retrieve the last docked pane width
531 if( netNavigatorPane.rect.width > 50 ) // 50 is a good margin
532 {
533 cfg->m_AuiPanels.net_nav_panel_docked_size.SetWidth( netNavigatorPane.rect.width );
534 netNavigatorPane.best_size.x = netNavigatorPane.rect.width;
535 }
536 }
537}
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
Vec Centre() const
Definition: box2.h:87
Calculate the connectivity of a schematic and generates netlists.
const NET_MAP & GetNetMap() const
const std::vector< CONNECTION_SUBGRAPH * > GetAllSubgraphs(const wxString &aNetName) const
A subgraph is a set of items that are electrically connected on a single sheet.
wxAuiManager m_auimgr
void FocusOnLocation(const VECTOR2I &aPos)
Useful to focus on a particular location, in find functions.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
Definition: eda_item.cpp:74
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:100
EDA_ITEM * GetParent() const
Definition: eda_item.h:102
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:98
bool contains(const SCH_ITEM *aItem, bool aRobust=false) const
Determine if a given item exists in the tree.
Definition: sch_rtree.h:125
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_base.h:95
Tree view item data for the net navigator.
const SCH_ITEM * GetItem() const
SCH_SHEET_PATH & GetSheetPath()
A small class to help profiling.
Definition: profile.h:49
void Stop()
Save the time when this function was called, and set the counter stane to stop.
Definition: profile.h:88
std::string to_string()
Definition: profile.h:155
CONNECTION_GRAPH * ConnectionGraph() const override
Definition: schematic.h:146
void SetCurrentSheet(const SCH_SHEET_PATH &aPath) override
Definition: schematic.h:141
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
EESCHEMA_SETTINGS * eeconfig() const
Class for a bus to bus entry.
VECTOR2I GetPosition() const override
VECTOR2I GetEnd() const
Class for a wire to bus entry.
wxTreeCtrl * m_netNavigator
void ToggleNetNavigator()
void onResizeNetNavigator(wxSizeEvent &aEvent)
void updateSelectionFilterVisbility() override
Selection filter panel doesn't have a dedicated visibility control, so show it if any other AUI panel...
void onNetNavigatorSelChanging(wxTreeEvent &aEvent)
SCHEMATIC * m_schematic
The currently loaded schematic.
SCH_SHEET_PATH & GetCurrentSheet() const
const SCH_ITEM * GetSelectedNetNavigatorItem() const
SCHEMATIC & Schematic() const
void RefreshNetNavigator(const NET_NAVIGATOR_ITEM_DATA *aSelection=nullptr)
void DisplayCurrentSheet()
Draw the current sheet on the display.
void SelectNetNavigatorItem(const NET_NAVIGATOR_ITEM_DATA *aSelection=nullptr)
wxString m_highlightedConn
The highlighted net or bus or empty string.
static const wxString NetNavigatorPaneName()
void MakeNetNavigatorNode(const wxString &aNetName, wxTreeItemId aParentId, const NET_NAVIGATOR_ITEM_DATA *aSelection=nullptr)
void onNetNavigatorSelection(wxTreeEvent &aEvent)
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:174
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition: sch_item.h:289
VECTOR2I GetPosition() const override
Definition: sch_junction.h:107
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:40
VECTOR2I GetEndPoint() const
Definition: sch_line.h:140
VECTOR2I GetStartPoint() const
Definition: sch_line.h:135
VECTOR2I GetPosition() const override
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:109
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
const SCH_SHEET * GetSheet(unsigned aIndex) const
wxString PathHumanReadable(bool aUseShortRootName=true, bool aStripTrailingSeparator=false) const
Return the sheet path in a human readable form made from the sheet names.
SCH_SCREEN * LastScreen()
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:66
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:57
bool IsRootSheet() const
Definition: sch_sheet.cpp:194
wxString GetName() const
Definition: sch_sheet.h:107
VECTOR2I GetPosition() const override
Definition: sch_text.h:141
A base class for LIB_SYMBOL and SCH_SYMBOL.
Definition: symbol.h:34
virtual const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const =0
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
std::unordered_map< NET_NAME_CODE_CACHE_KEY, std::vector< CONNECTION_SUBGRAPH * > > NET_MAP
Associate a #NET_CODE_NAME with all the subgraphs in that net.
#define _(s)
const wxChar *const traceUiProfile
Flag to enable user interface profile tracing.
@ LAYER_WIRE
Definition: layer_ids.h:356
@ LAYER_BUS
Definition: layer_ids.h:357
static wxString GetNetNavigatorItemText(const SCH_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath, UNITS_PROVIDER *aUnitsProvider)
wxString UnescapeString(const wxString &aSource)
wxLogTrace helper definitions.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_LINE_T
Definition: typeinfo.h:163
@ SCH_NO_CONNECT_T
Definition: typeinfo.h:160
@ SCH_DIRECTIVE_LABEL_T
Definition: typeinfo.h:171
@ SCH_LABEL_T
Definition: typeinfo.h:167
@ SCH_HIER_LABEL_T
Definition: typeinfo.h:169
@ SCH_BUS_BUS_ENTRY_T
Definition: typeinfo.h:162
@ SCH_SHEET_PIN_T
Definition: typeinfo.h:173
@ SCH_BUS_WIRE_ENTRY_T
Definition: typeinfo.h:161
@ SCH_GLOBAL_LABEL_T
Definition: typeinfo.h:168
@ SCH_JUNCTION_T
Definition: typeinfo.h:159
@ SCH_PIN_T
Definition: typeinfo.h:153
void SetAuiPaneSize(wxAuiManager &aManager, wxAuiPaneInfo &aPane, int aWidth, int aHeight)
Sets the size of an AUI pane, working around http://trac.wxwidgets.org/ticket/13180.