KiCad PCB EDA Suite
HIERARCHY_TREE Class Reference

Handle hierarchy tree control. More...

Inheritance diagram for HIERARCHY_TREE:

Public Member Functions

 HIERARCHY_TREE (HIERARCHY_NAVIG_DLG *parent)
 
void onChar (wxKeyEvent &event)
 

Private Attributes

HIERARCHY_NAVIG_DLGm_parent
 
wxImageList * imageList
 

Detailed Description

Handle hierarchy tree control.

Definition at line 70 of file hierarch.cpp.

Constructor & Destructor Documentation

HIERARCHY_TREE::HIERARCHY_TREE ( HIERARCHY_NAVIG_DLG parent)

Definition at line 84 of file hierarch.cpp.

References imageList, KiBitmap(), and m_parent.

84  :
85  wxTreeCtrl( (wxWindow*) parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
86  wxTR_HAS_BUTTONS, wxDefaultValidator, wxT( "HierachyTreeCtrl" ) )
87 {
88  m_parent = parent;
89 
90  // Make an image list containing small icons
91  // All icons are expected having the same size.
92  wxBitmap tree_nosel_bm( KiBitmap( tree_nosel_xpm ) );
93  imageList = new wxImageList( tree_nosel_bm.GetWidth(),
94  tree_nosel_bm.GetHeight(), true, 2 );
95 
96  imageList->Add( tree_nosel_bm );
97  imageList->Add( KiBitmap( tree_sel_xpm ) );
98 
99  AssignImageList( imageList );
100 }
wxImageList * imageList
Definition: hierarch.cpp:74
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:78
HIERARCHY_NAVIG_DLG * m_parent
Definition: hierarch.cpp:73

Member Function Documentation

void HIERARCHY_TREE::onChar ( wxKeyEvent &  event)

Definition at line 213 of file hierarch.cpp.

Referenced by HIERARCHY_NAVIG_DLG::HIERARCHY_NAVIG_DLG(), and HIERARCHY_NAVIG_DLG::~HIERARCHY_NAVIG_DLG().

214 {
215  if( event.GetKeyCode() == WXK_ESCAPE )
216  m_parent->Close( true );
217  else
218  event.Skip();
219 }
HIERARCHY_NAVIG_DLG * m_parent
Definition: hierarch.cpp:73

Member Data Documentation

wxImageList* HIERARCHY_TREE::imageList
private

Definition at line 74 of file hierarch.cpp.

Referenced by HIERARCHY_TREE().

HIERARCHY_NAVIG_DLG* HIERARCHY_TREE::m_parent
private

Definition at line 73 of file hierarch.cpp.

Referenced by HIERARCHY_TREE().


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