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 71 of file hierarch.cpp.

Constructor & Destructor Documentation

HIERARCHY_TREE::HIERARCHY_TREE ( HIERARCHY_NAVIG_DLG parent)

Definition at line 85 of file hierarch.cpp.

References imageList, KiBitmap(), and m_parent.

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

Member Function Documentation

void HIERARCHY_TREE::onChar ( wxKeyEvent &  event)

Definition at line 214 of file hierarch.cpp.

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

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

Member Data Documentation

wxImageList* HIERARCHY_TREE::imageList
private

Definition at line 75 of file hierarch.cpp.

Referenced by HIERARCHY_TREE().

HIERARCHY_NAVIG_DLG* HIERARCHY_TREE::m_parent
private

Definition at line 74 of file hierarch.cpp.

Referenced by HIERARCHY_TREE().


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