43 wxCHECK( aItem && aUnitsProvider, retv );
45 switch( aItem->
Type() )
51 wxCHECK( line, retv );
55 retv.Printf(
_(
"Wire from %s, %s to %s, %s" ),
63 retv.Printf(
_(
"Bus from %s, %s to %s, %s" ),
71 retv =
_(
"Graphic line not connectable" );
82 wxCHECK( symbol, retv );
84 retv.Printf(
_(
"Symbol '%s' pin '%s'" ), symbol->
GetRef( &aSheetPath,
true ),
94 wxCHECK( sheet, retv );
96 retv.Printf(
_(
"Sheet '%s' pin '%s'" ), sheet->
GetName(),
pin->GetText() );
102 wxCHECK( label, retv );
104 retv.Printf(
_(
"Label '%s' at %s, %s" ), label->
GetText(),
112 wxCHECK( label, retv );
114 retv.Printf(
_(
"Global label '%s' at %s, %s" ), label->
GetText(),
122 wxCHECK( label, retv );
124 retv.Printf(
_(
"Hierarchical label '%s' at %s, %s" ), label->
GetText(),
132 wxCHECK( junction, retv );
134 retv.Printf(
_(
"Junction at %s, %s" ),
142 wxCHECK( entry, retv );
144 retv.Printf(
_(
"Bus to wire entry from %s, %s to %s, %s" ),
154 wxCHECK( entry, retv );
156 retv.Printf(
_(
"Bus to bus entry from %s, %s to %s, %s" ),
164 retv.Printf(
_(
"Unhandled item type %d" ), aItem->
Type() );
174 wxCHECK( !aNetName.IsEmpty(), );
178 wxTreeItemId expandId = aParentId;
181 wxCHECK( connectionGraph, );
183 wxString sheetPathPrefix;
184 const std::vector<CONNECTION_SUBGRAPH*> subgraphs =
192 wxCHECK2( subGraph && sheetPath.
Last(),
continue );
194 if( subGraph->GetItems().empty() )
201 wxTreeItemId sheetId =
m_netNavigator->AppendItem( aParentId, txt, -1, -1, itemData );
203 if( aSelection && *aSelection == *itemData )
207 if(
Schematic().GetSheets().size() == 1 )
210 for(
const SCH_ITEM* item : subGraph->GetItems() )
224 if( aSelection && *aSelection == *itemData )
268 if( selection.IsOk() )
295 wxTreeItemIdValue sheetCookie;
298 wxTreeItemId sheetId =
m_netNavigator->GetFirstChild( rootId, sheetCookie );
300 while( sheetId.IsOk() )
304 wxTreeItemIdValue itemCookie;
305 wxTreeItemId itemId =
m_netNavigator->GetFirstChild( sheetId, itemCookie );
307 while( itemId.IsOk() )
311 wxCHECK2( itemData,
continue );
313 if( *itemData == *aSelection )
347 wxCHECK( itemData,
nullptr );
357 wxTreeItemId
id = aEvent.GetItem();
366 wxCHECK( itemData, );
411 netNavigatorPane.Show( !netNavigatorPane.IsShown() );
415 if( netNavigatorPane.IsShown() )
417 if( netNavigatorPane.IsFloating() )
431 if( netNavigatorPane.IsFloating() )
470 if( netNavigatorPane.rect.width > 50 )
473 netNavigatorPane.best_size.x = netNavigatorPane.rect.width;
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
Calculates the connectivity of a schematic and generates netlists.
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.
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.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM * GetParent() const
virtual const wxString & GetText() const
Return the string associated with the text object.
bool contains(const SCH_ITEM *aItem, bool aRobust=false) const
Determine if a given item exists in the tree.
APP_SETTINGS_BASE * KifaceSettings() const
Tree view item data for the net navigator.
const SCH_ITEM * GetItem() const
SCH_SHEET_PATH & GetSheetPath()
CONNECTION_GRAPH * ConnectionGraph() const override
void SetCurrentSheet(const SCH_SHEET_PATH &aPath) override
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
Class for a wire to bus entry.
wxTreeCtrl * m_netNavigator
void ToggleNetNavigator()
void onResizeNetNavigator(wxSizeEvent &aEvent)
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,...
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
VECTOR2I GetPosition() const override
Segment description base class to describe items which have 2 end points (track, wire,...
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
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.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false) const
Return the reference for the given sheet path.
VECTOR2I GetPosition() const override
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
static wxString GetNetNavigatorItemText(const SCH_ITEM *aItem, const SCH_SHEET_PATH &aSheetPath, UNITS_PROVIDER *aUnitsProvider)
wxSize net_nav_panel_float_size
wxSize net_nav_panel_docked_size
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
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.