KiCad PCB EDA Suite
HIERARCHY_TREE Class Reference

Navigation hierarchy tree control. More...

#include <hierarch.h>

Inheritance diagram for HIERARCHY_TREE:

Public Member Functions

 HIERARCHY_TREE (HIERARCHY_NAVIG_PANEL *parent)
 
int OnCompareItems (const wxTreeItemId &item1, const wxTreeItemId &item2) override
 

Private Member Functions

 wxDECLARE_ABSTRACT_CLASS (HIERARCHY_TREE)
 

Detailed Description

Navigation hierarchy tree control.

wxTreeCtrl must be subclassed to implement the OnCompareItems method to sort according to page numbers.

Definition at line 50 of file hierarch.h.

Constructor & Destructor Documentation

◆ HIERARCHY_TREE()

HIERARCHY_TREE::HIERARCHY_TREE ( HIERARCHY_NAVIG_PANEL parent)
inline

Definition at line 53 of file hierarch.h.

53 :
54 wxTreeCtrl( (wxWindow*) parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
55 wxTR_HAS_BUTTONS, wxDefaultValidator, wxT( "HierachyTreeCtrl" ) )
56 {
57 }

Member Function Documentation

◆ OnCompareItems()

int HIERARCHY_TREE::OnCompareItems ( const wxTreeItemId &  item1,
const wxTreeItemId &  item2 
)
override

Definition at line 62 of file hierarch.cpp.

63{
64 SCH_SHEET_PATH* item1Path = &static_cast<TreeItemData*>( GetItemData( item1 ) )->m_SheetPath;
65 SCH_SHEET_PATH* item2Path = &static_cast<TreeItemData*>( GetItemData( item2 ) )->m_SheetPath;
66
67 return item1Path->ComparePageNum( *item2Path );
68}
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
int ComparePageNum(const SCH_SHEET_PATH &aSheetPathToTest) const
Compare sheets by their page number.
Store an SCH_SHEET_PATH of each sheet in hierarchy.
Definition: hierarch.cpp:46

References SCH_SHEET_PATH::ComparePageNum().

◆ wxDECLARE_ABSTRACT_CLASS()

HIERARCHY_TREE::wxDECLARE_ABSTRACT_CLASS ( HIERARCHY_TREE  )
private

The documentation for this class was generated from the following files: