KiCad PCB EDA Suite
LIB_TREE_MODEL_ADAPTER Class Reference

#include <lib_tree_model_adapter.h>

Inheritance diagram for LIB_TREE_MODEL_ADAPTER:
FP_TREE_MODEL_ADAPTER SYMBOL_TREE_MODEL_ADAPTER SYMBOL_TREE_SYNCHRONIZING_ADAPTER FP_TREE_SYNCHRONIZING_ADAPTER

Public Types

enum  CMP_FILTER_TYPE { CMP_FILTER_NONE, CMP_FILTER_POWER }
 This enum allows a selective filtering of components to list. More...
 
enum  TREE_COLS { PART_COL = 0, DESC_COL, NUM_COLS }
 This enum defines the order of the columns in the tree view. More...
 

Public Member Functions

 ~LIB_TREE_MODEL_ADAPTER ()
 Destructor. More...
 
void SaveColWidths ()
 Save the column widths to the config file. More...
 
void SavePinnedItems ()
 
void SetFilter (CMP_FILTER_TYPE aFilter)
 Set the component filter type. More...
 
CMP_FILTER_TYPE GetFilter () const
 Return the active filter. More...
 
void ShowUnits (bool aShow)
 Whether or not to show units. More...
 
void SetPreselectNode (LIB_ID const &aLibId, int aUnit)
 Set the component name to be selected if there are no search results. More...
 
void DoAddLibrary (wxString const &aNodeName, wxString const &aDesc, std::vector< LIB_TREE_ITEM * > const &aItemList, bool presorted)
 Add the given list of components by alias. More...
 
void AssignIntrinsicRanks ()
 Sort the tree and assign ranks after adding libraries. More...
 
void UpdateSearchString (wxString const &aSearch)
 Set the search string provided by the user. More...
 
void AttachTo (wxDataViewCtrl *aDataViewCtrl)
 Attach to a wxDataViewCtrl and initialize it. More...
 
LIB_ID GetAliasFor (const wxDataViewItem &aSelection) const
 Return the alias for the given item. More...
 
int GetUnitFor (const wxDataViewItem &aSelection) const
 Return the unit for the given item. More...
 
LIB_TREE_NODE::TYPE GetTypeFor (const wxDataViewItem &aSelection) const
 Return node type for the given item. More...
 
LIB_TREE_NODEGetTreeNodeFor (const wxDataViewItem &aSelection) const
 
virtual wxString GenerateInfo (LIB_ID const &aLibId, int aUnit)
 
int GetItemCount () const
 Return the number of components loaded in the tree. More...
 
virtual int GetLibrariesCount () const
 Return the number of libraries loaded in the tree. More...
 
wxDataViewItem FindItem (const LIB_ID &aLibId)
 Returns tree item corresponding to part. More...
 
unsigned int GetChildren (wxDataViewItem const &aItem, wxDataViewItemArray &aChildren) const override
 Populate a list of all the children of an item. More...
 
void Freeze ()
 
void Thaw ()
 
bool IsFrozen () const
 
void RefreshTree ()
 
virtual TOOL_INTERACTIVEGetContextMenuTool ()
 

Protected Member Functions

 LIB_TREE_MODEL_ADAPTER (EDA_BASE_FRAME *aParent, wxString aPinnedKey)
 Creates the adapter. More...
 
LIB_TREE_NODE_LIBDoAddLibraryNode (wxString const &aNodeName, wxString const &aDesc)
 
bool HasContainerColumns (wxDataViewItem const &aItem) const override
 Check whether a container has columns too. More...
 
bool IsContainer (wxDataViewItem const &aItem) const override
 Check whether an item can have children. More...
 
wxDataViewItem GetParent (wxDataViewItem const &aItem) const override
 Get the parent of an item. More...
 
unsigned int GetColumnCount () const override
 
wxString GetColumnType (unsigned int aCol) const override
 Return the type of data stored in the column as indicated by wxVariant::GetType() More...
 
void GetValue (wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override
 Get the value of an item. More...
 
bool SetValue (wxVariant const &aVariant, wxDataViewItem const &aItem, unsigned int aCol) override
 Set the value of an item. More...
 
bool GetAttr (wxDataViewItem const &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override
 Get any formatting for an item. More...
 
const wxString GetPinningSymbol () const
 

Static Protected Member Functions

static wxDataViewItem ToItem (LIB_TREE_NODE const *aNode)
 Convert CMP_TREE_NODE -> wxDataViewItem. More...
 
static LIB_TREE_NODEToNode (wxDataViewItem aItem)
 Convert wxDataViewItem -> CMP_TREE_NODE. More...
 
static unsigned int IntoArray (LIB_TREE_NODE const &aNode, wxDataViewItemArray &aChildren)
 Convert CMP_TREE_NODE's children to wxDataViewItemArray. More...
 

Protected Attributes

LIB_TREE_NODE_ROOT m_tree
 

Private Member Functions

void FindAndExpand (LIB_TREE_NODE &aNode, std::function< bool(LIB_TREE_NODE const *)> aFunc, LIB_TREE_NODE **aHighScore)
 Find any results worth highlighting and expand them, according to given criteria The highest-scoring node is written to aHighScore. More...
 
LIB_TREE_NODEShowResults ()
 Find and expand successful search results. More...
 
LIB_TREE_NODEShowPreselect ()
 Find and expand preselected node. More...
 
LIB_TREE_NODEShowSingleLibrary ()
 Find and expand a library if there is only one. More...
 

Private Attributes

EDA_BASE_FRAMEm_parent
 
CMP_FILTER_TYPE m_filter
 
bool m_show_units
 
LIB_ID m_preselect_lib_id
 
int m_preselect_unit
 
int m_freeze
 
wxDataViewColumn * m_col_part
 
wxDataViewColumn * m_col_desc
 
wxDataViewCtrl * m_widget
 
int m_colWidths [NUM_COLS]
 
wxArrayString m_pinnedLibs
 
wxString m_pinnedKey
 

Detailed Description

Definition at line 97 of file lib_tree_model_adapter.h.

Member Enumeration Documentation

◆ CMP_FILTER_TYPE

This enum allows a selective filtering of components to list.

Enumerator
CMP_FILTER_NONE 

no filtering

CMP_FILTER_POWER 

list components flagged PWR

Definition at line 109 of file lib_tree_model_adapter.h.

◆ TREE_COLS

This enum defines the order of the columns in the tree view.

Enumerator
PART_COL 

Part name column.

DESC_COL 

Part description column.

NUM_COLS 

The number of tree columns.

Definition at line 118 of file lib_tree_model_adapter.h.

119  {
120  PART_COL = 0,
121  DESC_COL,
122  NUM_COLS
123  };

Constructor & Destructor Documentation

◆ ~LIB_TREE_MODEL_ADAPTER()

LIB_TREE_MODEL_ADAPTER::~LIB_TREE_MODEL_ADAPTER ( )

Destructor.

Do NOT delete this class manually; it is reference-counted by wxObject.

Definition at line 109 of file lib_tree_model_adapter.cpp.

110 {}

◆ LIB_TREE_MODEL_ADAPTER()

LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER ( EDA_BASE_FRAME aParent,
wxString  aPinnedKey 
)
protected

Creates the adapter.

Parameters
aParentis the parent frame
aPinnedKeyis the key to load the pinned libraries list from the project file

Definition at line 78 of file lib_tree_model_adapter.cpp.

78  :
79  m_parent( aParent ),
81  m_show_units( true ),
82  m_preselect_unit( 0 ),
83  m_freeze( 0 ),
84  m_col_part( nullptr ),
85  m_col_desc( nullptr ),
86  m_widget( nullptr ),
87  m_pinnedLibs(),
88  m_pinnedKey( aPinnedKey )
89 {
90  // Default column widths
91  m_colWidths[PART_COL] = 360;
92  m_colWidths[DESC_COL] = 2000;
93 
94  auto cfg = Kiface().KifaceSettings();
95  m_colWidths[PART_COL] = cfg->m_LibTree.column_width;
96 
97  // Read the pinned entries from the project config
98  PROJECT_FILE& project = m_parent->Kiway().Prj().GetProjectFile();
99 
100  std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
101  project.m_PinnedSymbolLibs :
102  project.m_PinnedFootprintLibs;
103 
104  for( const wxString& entry : entries )
105  m_pinnedLibs.push_back( entry );
106 }
std::vector< wxString > m_PinnedSymbolLibs
Below are project-level settings that have not been moved to a dedicated file.
Definition: project_file.h:123
std::vector< wxString > m_PinnedFootprintLibs
The list of pinned footprint libraries.
Definition: project_file.h:126
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:174
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_i.h:103
PROJECT_FILE is the backing store for a PROJECT, in JSON format.
Definition: project_file.h:62
VTBL_ENTRY PROJECT_FILE & GetProjectFile() const
Definition: project.h:143
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

References DESC_COL, PROJECT::GetProjectFile(), Kiface(), KIFACE_I::KifaceSettings(), KIWAY_HOLDER::Kiway(), m_colWidths, m_parent, PROJECT_FILE::m_PinnedFootprintLibs, m_pinnedKey, m_pinnedLibs, PROJECT_FILE::m_PinnedSymbolLibs, PART_COL, and KIWAY::Prj().

Member Function Documentation

◆ AssignIntrinsicRanks()

void LIB_TREE_MODEL_ADAPTER::AssignIntrinsicRanks ( )
inline

Sort the tree and assign ranks after adding libraries.

Definition at line 176 of file lib_tree_model_adapter.h.

void AssignIntrinsicRanks(bool presorted=false)
Store intrinsic ranks on all children of this node.

References LIB_TREE_NODE::AssignIntrinsicRanks(), and m_tree.

◆ AttachTo()

void LIB_TREE_MODEL_ADAPTER::AttachTo ( wxDataViewCtrl *  aDataViewCtrl)

Attach to a wxDataViewCtrl and initialize it.

This will set up columns and associate the model via the adapter.

Parameters
aDataViewCtrlthe view component in the dialog

Definition at line 263 of file lib_tree_model_adapter.cpp.

264 {
265  wxString partHead = _( "Item" );
266  wxString descHead = _( "Description" );
267 
268  // The extent of the text doesn't take into account the space on either side
269  // in the header, so artificially pad it by M
270  wxSize partHeadMinWidth = KIUI::GetTextSize( partHead + "M", aDataViewCtrl );
271 
272  if( aDataViewCtrl->GetColumnCount() > 0 )
273  {
274  int partWidth = aDataViewCtrl->GetColumn( PART_COL )->GetWidth();
275  int descWidth = aDataViewCtrl->GetColumn( DESC_COL )->GetWidth();
276 
277  // Only use the widths read back if they are non-zero.
278  // GTK returns the displayed width of the column, which is not calculated immediately
279  // this leads to cases of 0 column width if the user types too fast in the filter
280  if( descWidth > 0 )
281  {
282  m_colWidths[PART_COL] = partWidth;
283  m_colWidths[DESC_COL] = descWidth;
284  }
285  }
286 
287  m_widget = aDataViewCtrl;
288  aDataViewCtrl->SetIndent( kDataViewIndent );
289  aDataViewCtrl->AssociateModel( this );
290  aDataViewCtrl->ClearColumns();
291 
292  m_col_part = aDataViewCtrl->AppendTextColumn( partHead, PART_COL, wxDATAVIEW_CELL_INERT,
294  m_col_desc = aDataViewCtrl->AppendTextColumn( descHead, DESC_COL, wxDATAVIEW_CELL_INERT,
296 
297  // Ensure the part column is wider than the smallest allowable width
298  if( m_colWidths[PART_COL] < partHeadMinWidth.x )
299  {
300  m_colWidths[PART_COL] = partHeadMinWidth.x;
301  m_col_part->SetWidth( partHeadMinWidth.x );
302  }
303 
304  m_col_part->SetMinWidth( partHeadMinWidth.x );
305 }
static const int kDataViewIndent
wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...
Definition: ui_common.cpp:57
#define _(s)
Definition: 3d_actions.cpp:33

References _, DESC_COL, KIUI::GetTextSize(), kDataViewIndent, m_col_desc, m_col_part, m_colWidths, m_widget, and PART_COL.

◆ DoAddLibrary()

void LIB_TREE_MODEL_ADAPTER::DoAddLibrary ( wxString const &  aNodeName,
wxString const &  aDesc,
std::vector< LIB_TREE_ITEM * > const &  aItemList,
bool  presorted 
)

Add the given list of components by alias.

To be called in the setup phase.

Parameters
aNodeNamethe parent node the components will appear under
aDescthe description field of the parent node
aItemListlist of components

Definition at line 177 of file lib_tree_model_adapter.cpp.

180 {
181  LIB_TREE_NODE_LIB& lib_node = DoAddLibraryNode( aNodeName, aDesc );
182 
183  for( LIB_TREE_ITEM* item: aItemList )
184  lib_node.AddItem( item );
185 
186  lib_node.AssignIntrinsicRanks( presorted );
187 }
A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).
Definition: lib_tree_item.h:39
LIB_TREE_NODE_LIB_ID & AddItem(LIB_TREE_ITEM *aItem)
Construct a new alias node, add it to this library, and return it.
Node type: library.
LIB_TREE_NODE_LIB & DoAddLibraryNode(wxString const &aNodeName, wxString const &aDesc)
void AssignIntrinsicRanks(bool presorted=false)
Store intrinsic ranks on all children of this node.

References LIB_TREE_NODE_LIB::AddItem(), LIB_TREE_NODE::AssignIntrinsicRanks(), and DoAddLibraryNode().

Referenced by FP_TREE_MODEL_ADAPTER::AddLibraries(), SYMBOL_TREE_MODEL_ADAPTER::AddLibrary(), PCB_BASE_FRAME::SelectFootprintFromLibTree(), and FP_TREE_SYNCHRONIZING_ADAPTER::Sync().

◆ DoAddLibraryNode()

LIB_TREE_NODE_LIB & LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode ( wxString const &  aNodeName,
wxString const &  aDesc 
)
protected

Definition at line 166 of file lib_tree_model_adapter.cpp.

168 {
169  LIB_TREE_NODE_LIB& lib_node = m_tree.AddLib( aNodeName, aDesc );
170 
171  lib_node.m_Pinned = m_pinnedLibs.Index( lib_node.m_LibId.GetLibNickname() ) != wxNOT_FOUND;
172 
173  return lib_node;
174 }
Node type: library.
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
LIB_TREE_NODE_LIB & AddLib(wxString const &aName, wxString const &aDesc)
Construct an empty library node, add it to the root, and return it.

References LIB_TREE_NODE_ROOT::AddLib(), LIB_ID::GetLibNickname(), LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Pinned, m_pinnedLibs, and m_tree.

Referenced by DoAddLibrary(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().

◆ FindAndExpand()

void LIB_TREE_MODEL_ADAPTER::FindAndExpand ( LIB_TREE_NODE aNode,
std::function< bool(LIB_TREE_NODE const *)>  aFunc,
LIB_TREE_NODE **  aHighScore 
)
private

Find any results worth highlighting and expand them, according to given criteria The highest-scoring node is written to aHighScore.

Definition at line 501 of file lib_tree_model_adapter.cpp.

504 {
505  for( auto& node: aNode.m_Children )
506  {
507  if( aFunc( &*node ) )
508  {
509  auto item = wxDataViewItem( &*node );
510  m_widget->ExpandAncestors( item );
511 
512  if( !(*aHighScore) || node->m_Score > (*aHighScore)->m_Score )
513  (*aHighScore) = &*node;
514  }
515 
516  FindAndExpand( *node, aFunc, aHighScore );
517  }
518 }
void FindAndExpand(LIB_TREE_NODE &aNode, std::function< bool(LIB_TREE_NODE const *)> aFunc, LIB_TREE_NODE **aHighScore)
Find any results worth highlighting and expand them, according to given criteria The highest-scoring ...
PTR_VECTOR m_Children

References LIB_TREE_NODE::m_Children, and m_widget.

Referenced by ShowPreselect(), ShowResults(), and ShowSingleLibrary().

◆ FindItem()

wxDataViewItem LIB_TREE_MODEL_ADAPTER::FindItem ( const LIB_ID aLibId)

Returns tree item corresponding to part.

Parameters
aLibIdspecifies the part and library name to be searched for.
Returns
Tree data item representing the part. Might be invalid if nothings was found.

Definition at line 352 of file lib_tree_model_adapter.cpp.

353 {
354  for( auto& lib: m_tree.m_Children )
355  {
356  if( lib->m_Name != aLibId.GetLibNickname() )
357  continue;
358 
359  // if part name is not specified, return the library node
360  if( aLibId.GetLibItemName() == "" )
361  return ToItem( lib.get() );
362 
363  for( auto& alias: lib->m_Children )
364  {
365  if( alias->m_Name == aLibId.GetLibItemName() )
366  return ToItem( alias.get() );
367  }
368 
369  break; // could not find the part in the requested library
370  }
371 
372  return wxDataViewItem();
373 }
const UTF8 & GetLibItemName() const
Definition: lib_id.h:114
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert CMP_TREE_NODE -> wxDataViewItem.
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:97
PTR_VECTOR m_Children

References LIB_ID::GetLibItemName(), LIB_ID::GetLibNickname(), LIB_TREE_NODE::m_Children, m_tree, and ToItem().

◆ Freeze()

void LIB_TREE_MODEL_ADAPTER::Freeze ( )
inline

Definition at line 260 of file lib_tree_model_adapter.h.

References m_freeze.

Referenced by UpdateSearchString().

◆ GenerateInfo()

virtual wxString LIB_TREE_MODEL_ADAPTER::GenerateInfo ( LIB_ID const &  aLibId,
int  aUnit 
)
inlinevirtual

Reimplemented in SYMBOL_TREE_MODEL_ADAPTER, and FP_TREE_MODEL_ADAPTER.

Definition at line 226 of file lib_tree_model_adapter.h.

226 { return wxEmptyString; };

◆ GetAliasFor()

LIB_ID LIB_TREE_MODEL_ADAPTER::GetAliasFor ( const wxDataViewItem &  aSelection) const

Return the alias for the given item.

Parameters
aSelectionitem from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection())
Returns
alias, or nullptr if none is selected

Definition at line 308 of file lib_tree_model_adapter.cpp.

309 {
310  const LIB_TREE_NODE* node = ToNode( aSelection );
311 
312  LIB_ID emptyId;
313 
314  if( !node )
315  return emptyId;
316 
317  return node->m_LibId;
318 }
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.

References LIB_TREE_NODE::m_LibId, and ToNode().

◆ GetAttr()

bool LIB_TREE_MODEL_ADAPTER::GetAttr ( wxDataViewItem const &  aItem,
unsigned int  aCol,
wxDataViewItemAttr &  aAttr 
) const
overrideprotected

Get any formatting for an item.

Parameters
aItemitem to get formatting for
aColcolumn number of interest
aAttrreceiver for attributes
Returns
true iff the item has non-default attributes

Definition at line 472 of file lib_tree_model_adapter.cpp.

475 {
476  if( IsFrozen() )
477  return false;
478 
479  LIB_TREE_NODE* node = ToNode( aItem );
480  wxASSERT( node );
481 
482  if( node->m_Type != LIB_TREE_NODE::LIBID )
483  {
484  // Currently only aliases are formatted at all
485  return false;
486  }
487 
488  if( !node->m_IsRoot && aCol == 0 )
489  {
490  // Names of non-root aliases are italicized
491  aAttr.SetItalic( true );
492  return true;
493  }
494  else
495  {
496  return false;
497  }
498 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type

References IsFrozen(), LIB_TREE_NODE::LIBID, LIB_TREE_NODE::m_IsRoot, LIB_TREE_NODE::m_Type, and ToNode().

◆ GetChildren()

unsigned int LIB_TREE_MODEL_ADAPTER::GetChildren ( wxDataViewItem const &  aItem,
wxDataViewItemArray &  aChildren 
) const
override

Populate a list of all the children of an item.

Returns
number of children

Definition at line 376 of file lib_tree_model_adapter.cpp.

378 {
379  const LIB_TREE_NODE* node = ( aItem.IsOk() ? ToNode( aItem ) : &m_tree );
380 
381  if( node->m_Type != LIB_TREE_NODE::TYPE::LIBID
382  || ( m_show_units && node->m_Type == LIB_TREE_NODE::TYPE::LIBID ) )
383  return IntoArray( *node, aChildren );
384  else
385  return 0;
386 }
static unsigned int IntoArray(LIB_TREE_NODE const &aNode, wxDataViewItemArray &aChildren)
Convert CMP_TREE_NODE's children to wxDataViewItemArray.
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type

References IntoArray(), m_show_units, m_tree, LIB_TREE_NODE::m_Type, and ToNode().

◆ GetColumnCount()

unsigned int LIB_TREE_MODEL_ADAPTER::GetColumnCount ( ) const
inlineoverrideprotected

Definition at line 302 of file lib_tree_model_adapter.h.

302 { return NUM_COLS; }

References NUM_COLS.

◆ GetColumnType()

wxString LIB_TREE_MODEL_ADAPTER::GetColumnType ( unsigned int  aCol) const
inlineoverrideprotected

Return the type of data stored in the column as indicated by wxVariant::GetType()

Definition at line 307 of file lib_tree_model_adapter.h.

307 { return "string"; }

◆ GetContextMenuTool()

virtual TOOL_INTERACTIVE* LIB_TREE_MODEL_ADAPTER::GetContextMenuTool ( )
inlinevirtual

Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.

Definition at line 267 of file lib_tree_model_adapter.h.

267 { return nullptr; }

◆ GetFilter()

CMP_FILTER_TYPE LIB_TREE_MODEL_ADAPTER::GetFilter ( ) const
inline

Return the active filter.

Definition at line 142 of file lib_tree_model_adapter.h.

142 { return m_filter; }

References m_filter.

Referenced by SYMBOL_TREE_MODEL_ADAPTER::AddLibrary().

◆ GetItemCount()

int LIB_TREE_MODEL_ADAPTER::GetItemCount ( ) const

Return the number of components loaded in the tree.

Definition at line 341 of file lib_tree_model_adapter.cpp.

342 {
343  int n = 0;
344 
345  for( const std::unique_ptr<LIB_TREE_NODE>& lib: m_tree.m_Children )
346  n += lib->m_Children.size();
347 
348  return n;
349 }
PTR_VECTOR m_Children

References LIB_TREE_NODE::m_Children, and m_tree.

Referenced by PCB_BASE_FRAME::SelectFootprintFromLibTree().

◆ GetLibrariesCount()

virtual int LIB_TREE_MODEL_ADAPTER::GetLibrariesCount ( ) const
inlinevirtual

Return the number of libraries loaded in the tree.

Reimplemented in SYMBOL_TREE_SYNCHRONIZING_ADAPTER, and FP_TREE_SYNCHRONIZING_ADAPTER.

Definition at line 236 of file lib_tree_model_adapter.h.

237  {
238  return m_tree.m_Children.size();
239  }
PTR_VECTOR m_Children

References LIB_TREE_NODE::m_Children, and m_tree.

Referenced by SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetLibrariesCount().

◆ GetParent()

wxDataViewItem LIB_TREE_MODEL_ADAPTER::GetParent ( wxDataViewItem const &  aItem) const
overrideprotected

Get the parent of an item.

Returns
parent of aItem, or an invalid wxDataViewItem if parent is root

Definition at line 429 of file lib_tree_model_adapter.cpp.

430 {
431  if( m_freeze )
432  return ToItem( nullptr );
433 
434  LIB_TREE_NODE* node = ToNode( aItem );
435  LIB_TREE_NODE* parent = node ? node->m_Parent : nullptr;
436 
437  // wxDataViewModel has no root node, but rather top-level elements have
438  // an invalid (null) parent.
439  if( !node || !parent || parent->m_Type == LIB_TREE_NODE::TYPE::ROOT )
440  return ToItem( nullptr );
441  else
442  return ToItem( parent );
443 }
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert CMP_TREE_NODE -> wxDataViewItem.
LIB_TREE_NODE * m_Parent
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type

References m_freeze, LIB_TREE_NODE::m_Parent, LIB_TREE_NODE::m_Type, ToItem(), and ToNode().

Referenced by UpdateSearchString().

◆ GetPinningSymbol()

const wxString LIB_TREE_MODEL_ADAPTER::GetPinningSymbol ( ) const
inlineprotected
Returns
a unicode string to mark a node name like a pinned library name This is not an ascii7 char, but a unicode char

Definition at line 345 of file lib_tree_model_adapter.h.

346  {
347  return wxString::FromUTF8( "☆ " );
348  }

Referenced by FP_TREE_SYNCHRONIZING_ADAPTER::GetValue(), and SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetValue().

◆ GetTreeNodeFor()

LIB_TREE_NODE * LIB_TREE_MODEL_ADAPTER::GetTreeNodeFor ( const wxDataViewItem &  aSelection) const

Definition at line 335 of file lib_tree_model_adapter.cpp.

336 {
337  return ToNode( aSelection );
338 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.

References ToNode().

◆ GetTypeFor()

LIB_TREE_NODE::TYPE LIB_TREE_MODEL_ADAPTER::GetTypeFor ( const wxDataViewItem &  aSelection) const

Return node type for the given item.

Parameters
aSelectionitem from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection())
Returns
Type of the selected node, might be INVALID.

Definition at line 328 of file lib_tree_model_adapter.cpp.

329 {
330  const LIB_TREE_NODE* node = ToNode( aSelection );
331  return node ? node->m_Type : LIB_TREE_NODE::INVALID;
332 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type

References LIB_TREE_NODE::INVALID, LIB_TREE_NODE::m_Type, and ToNode().

◆ GetUnitFor()

int LIB_TREE_MODEL_ADAPTER::GetUnitFor ( const wxDataViewItem &  aSelection) const

Return the unit for the given item.

Parameters
aSelectionitem from the wxDataViewCtrl (see wxDataViewCtrl::GetSelection())
Returns
Unit, or zero if the alias itself is selected. Return valid is invalid if GetAliasFor() returns nullptr.

Definition at line 321 of file lib_tree_model_adapter.cpp.

322 {
323  const LIB_TREE_NODE* node = ToNode( aSelection );
324  return node ? node->m_Unit : 0;
325 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.

References LIB_TREE_NODE::m_Unit, and ToNode().

◆ GetValue()

void LIB_TREE_MODEL_ADAPTER::GetValue ( wxVariant &  aVariant,
wxDataViewItem const &  aItem,
unsigned int  aCol 
) const
overrideprotected

Get the value of an item.

Parameters
aVariantwxVariant to receive the data
aItemitem whose data will be placed into aVariant
aColcolumn number of the data

Definition at line 446 of file lib_tree_model_adapter.cpp.

449 {
450  if( IsFrozen() )
451  {
452  aVariant = wxEmptyString;
453  return;
454  }
455 
456  LIB_TREE_NODE* node = ToNode( aItem );
457  wxASSERT( node );
458 
459  switch( aCol )
460  {
461  default: // column == -1 is used for default Compare function
462  case 0:
463  aVariant = node->m_Name;
464  break;
465  case 1:
466  aVariant = node->m_Desc;
467  break;
468  }
469 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
wxString m_Name
wxString m_Desc

References IsFrozen(), LIB_TREE_NODE::m_Desc, LIB_TREE_NODE::m_Name, and ToNode().

◆ HasContainerColumns()

bool LIB_TREE_MODEL_ADAPTER::HasContainerColumns ( wxDataViewItem const &  aItem) const
overrideprotected

Check whether a container has columns too.

Definition at line 416 of file lib_tree_model_adapter.cpp.

417 {
418  return IsContainer( aItem );
419 }
bool IsContainer(wxDataViewItem const &aItem) const override
Check whether an item can have children.

References IsContainer().

◆ IntoArray()

unsigned int LIB_TREE_MODEL_ADAPTER::IntoArray ( LIB_TREE_NODE const &  aNode,
wxDataViewItemArray &  aChildren 
)
staticprotected

Convert CMP_TREE_NODE's children to wxDataViewItemArray.

Definition at line 60 of file lib_tree_model_adapter.cpp.

62 {
63  unsigned int n = 0;
64 
65  for( auto const& child: aNode.m_Children )
66  {
67  if( child->m_Score > 0 )
68  {
69  aChildren.Add( ToItem( &*child ) );
70  ++n;
71  }
72  }
73 
74  return n;
75 }
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert CMP_TREE_NODE -> wxDataViewItem.

References LIB_TREE_NODE::m_Children, and ToItem().

Referenced by GetChildren().

◆ IsContainer()

bool LIB_TREE_MODEL_ADAPTER::IsContainer ( wxDataViewItem const &  aItem) const
overrideprotected

Check whether an item can have children.

Definition at line 422 of file lib_tree_model_adapter.cpp.

423 {
424  LIB_TREE_NODE* node = ToNode( aItem );
425  return node ? node->m_Children.size() : true;
426 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> CMP_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
PTR_VECTOR m_Children

References LIB_TREE_NODE::m_Children, and ToNode().

Referenced by HasContainerColumns().

◆ IsFrozen()

◆ RefreshTree()

void LIB_TREE_MODEL_ADAPTER::RefreshTree ( )

Definition at line 389 of file lib_tree_model_adapter.cpp.

390 {
391  // Yes, this is an enormous hack. But it works on all platforms, it doesn't suffer
392  // the On^2 sorting issues that ItemChanged() does on OSX, and it doesn't lose the
393  // user's scroll position (which re-attaching or deleting/re-inserting columns does).
394  static int walk = 1;
395 
396  int partWidth = m_col_part->GetWidth();
397  int descWidth = m_col_desc->GetWidth();
398 
399  // Only use the widths read back if they are non-zero.
400  // GTK returns the displayed width of the column, which is not calculated immediately
401  if( descWidth > 0 )
402  {
403  m_colWidths[PART_COL] = partWidth;
404  m_colWidths[DESC_COL] = descWidth;
405  }
406 
407  m_colWidths[PART_COL] += walk;
408  m_colWidths[DESC_COL] -= walk;
409 
410  m_col_part->SetWidth( m_colWidths[PART_COL] );
411  m_col_desc->SetWidth( m_colWidths[DESC_COL] );
412  walk = -walk;
413 }

References DESC_COL, m_col_desc, m_col_part, m_colWidths, and PART_COL.

◆ SaveColWidths()

void LIB_TREE_MODEL_ADAPTER::SaveColWidths ( )

Save the column widths to the config file.

This requires the tree view to still be valid.

Definition at line 113 of file lib_tree_model_adapter.cpp.

114 {
115  if( m_widget )
116  {
117  auto cfg = Kiface().KifaceSettings();
118  cfg->m_LibTree.column_width = m_widget->GetColumn( PART_COL )->GetWidth();
119  }
120 }
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_i.h:103
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

References APP_SETTINGS_BASE::LIB_TREE::column_width, Kiface(), KIFACE_I::KifaceSettings(), APP_SETTINGS_BASE::m_LibTree, m_widget, and PART_COL.

◆ SavePinnedItems()

void LIB_TREE_MODEL_ADAPTER::SavePinnedItems ( )

Definition at line 123 of file lib_tree_model_adapter.cpp.

124 {
125  PROJECT_FILE& project = m_parent->Kiway().Prj().GetProjectFile();
126 
127  std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
128  project.m_PinnedSymbolLibs :
129  project.m_PinnedFootprintLibs;
130 
131  entries.clear();
132  m_pinnedLibs.clear();
133 
134  for( auto& child: m_tree.m_Children )
135  {
136  if( child->m_Pinned )
137  {
138  m_pinnedLibs.push_back( child->m_LibId.GetLibNickname() );
139  entries.push_back( child->m_LibId.GetLibNickname() );
140  }
141  }
142 
143 
144 }
std::vector< wxString > m_PinnedSymbolLibs
Below are project-level settings that have not been moved to a dedicated file.
Definition: project_file.h:123
std::vector< wxString > m_PinnedFootprintLibs
The list of pinned footprint libraries.
Definition: project_file.h:126
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
VTBL_ENTRY PROJECT & Prj() const
Function Prj returns the PROJECT associated with this KIWAY.
Definition: kiway.cpp:174
PROJECT_FILE is the backing store for a PROJECT, in JSON format.
Definition: project_file.h:62
VTBL_ENTRY PROJECT_FILE & GetProjectFile() const
Definition: project.h:143
PTR_VECTOR m_Children

References PROJECT::GetProjectFile(), KIWAY_HOLDER::Kiway(), LIB_TREE_NODE::m_Children, m_parent, PROJECT_FILE::m_PinnedFootprintLibs, m_pinnedKey, m_pinnedLibs, PROJECT_FILE::m_PinnedSymbolLibs, m_tree, and KIWAY::Prj().

◆ SetFilter()

void LIB_TREE_MODEL_ADAPTER::SetFilter ( CMP_FILTER_TYPE  aFilter)

Set the component filter type.

Must be set before adding libraries

Parameters
aFilterif CMP_FILTER_POWER, only power parts are loaded

Definition at line 147 of file lib_tree_model_adapter.cpp.

148 {
149  m_filter = aFilter;
150 }

References m_filter.

◆ SetPreselectNode()

void LIB_TREE_MODEL_ADAPTER::SetPreselectNode ( LIB_ID const &  aLibId,
int  aUnit 
)

Set the component name to be selected if there are no search results.

May be set at any time; updates at the next UpdateSearchString().

Parameters
aLibIdsymbol LIB_ID to be selected
aUnitunit to be selected, if > 0 (0 selects the alias itself)

Definition at line 159 of file lib_tree_model_adapter.cpp.

160 {
161  m_preselect_lib_id = aLibId;
162  m_preselect_unit = aUnit;
163 }

References m_preselect_lib_id, and m_preselect_unit.

Referenced by PCB_BASE_FRAME::SelectFootprintFromLibTree().

◆ SetValue()

bool LIB_TREE_MODEL_ADAPTER::SetValue ( wxVariant const &  aVariant,
wxDataViewItem const &  aItem,
unsigned int  aCol 
)
inlineoverrideprotected

Set the value of an item.

Does nothing - this model doesn't support editing.

Definition at line 324 of file lib_tree_model_adapter.h.

326  { return false; }

◆ ShowPreselect()

LIB_TREE_NODE * LIB_TREE_MODEL_ADAPTER::ShowPreselect ( )
private

Find and expand preselected node.

Return the best match (if any).

Definition at line 537 of file lib_tree_model_adapter.cpp.

538 {
539  LIB_TREE_NODE* highScore = nullptr;
540 
541  if( !m_preselect_lib_id.IsValid() )
542  return highScore;
543 
545  [&]( LIB_TREE_NODE const* n )
546  {
547  if( n->m_Type == LIB_TREE_NODE::LIBID && ( n->m_Children.empty() || !m_preselect_unit ) )
548  return m_preselect_lib_id == n->m_LibId;
549  else if( n->m_Type == LIB_TREE_NODE::UNIT && m_preselect_unit )
551  else
552  return false;
553  },
554  &highScore );
555 
556  return highScore;
557 }
bool IsValid() const
Definition: lib_id.h:171
void FindAndExpand(LIB_TREE_NODE &aNode, std::function< bool(LIB_TREE_NODE const *)> aFunc, LIB_TREE_NODE **aHighScore)
Find any results worth highlighting and expand them, according to given criteria The highest-scoring ...
LIB_TREE_NODE * m_Parent
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type
PTR_VECTOR m_Children

References FindAndExpand(), LIB_ID::IsValid(), LIB_TREE_NODE::LIBID, LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_LibId, LIB_TREE_NODE::m_Parent, m_preselect_lib_id, m_preselect_unit, m_tree, LIB_TREE_NODE::m_Type, LIB_TREE_NODE::m_Unit, and LIB_TREE_NODE::UNIT.

Referenced by UpdateSearchString().

◆ ShowResults()

LIB_TREE_NODE * LIB_TREE_MODEL_ADAPTER::ShowResults ( )
private

Find and expand successful search results.

Return the best match (if any).

Definition at line 521 of file lib_tree_model_adapter.cpp.

522 {
523  LIB_TREE_NODE* highScore = nullptr;
524 
526  []( LIB_TREE_NODE const* n )
527  {
528  // return leaf nodes with some level of matching
529  return n->m_Type == LIB_TREE_NODE::TYPE::LIBID && n->m_Score > 1;
530  },
531  &highScore );
532 
533  return highScore;
534 }
void FindAndExpand(LIB_TREE_NODE &aNode, std::function< bool(LIB_TREE_NODE const *)> aFunc, LIB_TREE_NODE **aHighScore)
Find any results worth highlighting and expand them, according to given criteria The highest-scoring ...
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type

References FindAndExpand(), LIB_TREE_NODE::m_Score, m_tree, and LIB_TREE_NODE::m_Type.

Referenced by UpdateSearchString().

◆ ShowSingleLibrary()

LIB_TREE_NODE * LIB_TREE_MODEL_ADAPTER::ShowSingleLibrary ( )
private

Find and expand a library if there is only one.

Return the best match (if any).

Definition at line 560 of file lib_tree_model_adapter.cpp.

561 {
562  LIB_TREE_NODE* highScore = nullptr;
563 
565  []( LIB_TREE_NODE const* n )
566  {
567  return n->m_Type == LIB_TREE_NODE::TYPE::LIBID &&
568  n->m_Parent->m_Parent->m_Children.size() == 1;
569  },
570  &highScore );
571 
572  return highScore;
573 }
void FindAndExpand(LIB_TREE_NODE &aNode, std::function< bool(LIB_TREE_NODE const *)> aFunc, LIB_TREE_NODE **aHighScore)
Find any results worth highlighting and expand them, according to given criteria The highest-scoring ...
LIB_TREE_NODE * m_Parent
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
enum TYPE m_Type
PTR_VECTOR m_Children

References FindAndExpand(), LIB_TREE_NODE::m_Children, LIB_TREE_NODE::m_Parent, m_tree, and LIB_TREE_NODE::m_Type.

Referenced by UpdateSearchString().

◆ ShowUnits()

void LIB_TREE_MODEL_ADAPTER::ShowUnits ( bool  aShow)

Whether or not to show units.

May be set at any time; updates at the next UpdateSearchString()

Parameters
aShowif true, units are displayed

Definition at line 153 of file lib_tree_model_adapter.cpp.

154 {
155  m_show_units = aShow;
156 }

References m_show_units.

◆ Thaw()

void LIB_TREE_MODEL_ADAPTER::Thaw ( )
inline

Definition at line 261 of file lib_tree_model_adapter.h.

References m_freeze.

Referenced by UpdateSearchString().

◆ ToItem()

wxDataViewItem LIB_TREE_MODEL_ADAPTER::ToItem ( LIB_TREE_NODE const *  aNode)
staticprotected

Convert CMP_TREE_NODE -> wxDataViewItem.

Definition at line 42 of file lib_tree_model_adapter.cpp.

43 {
44  return wxDataViewItem( const_cast<void*>( static_cast<void const*>( aNode ) ) );
45 }

Referenced by FindItem(), GetParent(), and IntoArray().

◆ ToNode()

◆ UpdateSearchString()

void LIB_TREE_MODEL_ADAPTER::UpdateSearchString ( wxString const &  aSearch)

Set the search string provided by the user.

Parameters
aSearchfull, unprocessed search text

Definition at line 190 of file lib_tree_model_adapter.cpp.

191 {
192  {
193  // DO NOT REMOVE THE FREEZE/THAW. This freeze/thaw is a flag for this model adapter
194  // that tells it when it shouldn't trust any of the data in the model. When set, it will
195  // not return invalid data to the UI, since this invalid data can cause crashes.
196  // This is different than the update locker, which locks the UI aspects only.
197  wxWindowUpdateLocker updateLock( m_widget );
198 
199  // Even with the updateLock, wxWidgets sometimes ties its knickers in
200  // a knot when trying to run a wxdataview_selection_changed_callback()
201  // on a row that has been deleted.
202  // https://bugs.launchpad.net/kicad/+bug/1756255
203  m_widget->UnselectAll();
204  Freeze();
205  BeforeReset();
206 
207  m_tree.ResetScore();
208 
209  for( auto& child: m_tree.m_Children )
210  {
211  if( child->m_Pinned )
212  child->m_Score *= 2;
213  }
214 
215  wxStringTokenizer tokenizer( aSearch );
216 
217  while( tokenizer.HasMoreTokens() )
218  {
219  const wxString term = tokenizer.GetNextToken().Lower();
220  EDA_COMBINED_MATCHER matcher( term );
221 
222  m_tree.UpdateScore( matcher );
223  }
224 
225  m_tree.SortNodes();
226  AfterReset();
227  Thaw();
228  }
229 
230  LIB_TREE_NODE* bestMatch = ShowResults();
231 
232  if( !bestMatch )
233  bestMatch = ShowPreselect();
234 
235  if( !bestMatch )
236  bestMatch = ShowSingleLibrary();
237 
238  if( bestMatch )
239  {
240  auto item = wxDataViewItem( bestMatch );
241  m_widget->Select( item );
242 
243  // Make sure the *parent* item is visible. The selected item is the
244  // first (shown) child of the parent. So it's always right below the parent,
245  // and this way the user can also see what library the selected part belongs to,
246  // without having a case where the selection is off the screen (unless the
247  // window is a single row high, which is unlikely)
248  //
249  // This also happens to circumvent https://bugs.launchpad.net/kicad/+bug/1804400
250  // which appears to be a GTK+3 bug.
251  {
252  wxDataViewItem parent = GetParent( item );
253 
254  if( parent.IsOk() )
255  item = parent;
256  }
257 
258  m_widget->EnsureVisible( item );
259  }
260 }
void SortNodes()
Sort child nodes quickly and recursively (IntrinsicRanks must have been set).
LIB_TREE_NODE * ShowResults()
Find and expand successful search results.
LIB_TREE_NODE * ShowPreselect()
Find and expand preselected node.
wxDataViewItem GetParent(wxDataViewItem const &aItem) const override
Get the parent of an item.
void ResetScore()
Initialize score to kLowestDefaultScore, recursively.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
virtual void UpdateScore(EDA_COMBINED_MATCHER &aMatcher) override
Update the score for this part.
LIB_TREE_NODE * ShowSingleLibrary()
Find and expand a library if there is only one.
PTR_VECTOR m_Children

References Freeze(), GetParent(), LIB_TREE_NODE::m_Children, m_tree, m_widget, LIB_TREE_NODE::ResetScore(), ShowPreselect(), ShowResults(), ShowSingleLibrary(), LIB_TREE_NODE::SortNodes(), Thaw(), and LIB_TREE_NODE_ROOT::UpdateScore().

Member Data Documentation

◆ m_col_desc

wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::m_col_desc
private

Definition at line 360 of file lib_tree_model_adapter.h.

Referenced by AttachTo(), and RefreshTree().

◆ m_col_part

wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::m_col_part
private

Definition at line 359 of file lib_tree_model_adapter.h.

Referenced by AttachTo(), and RefreshTree().

◆ m_colWidths

int LIB_TREE_MODEL_ADAPTER::m_colWidths[NUM_COLS]
private

Definition at line 363 of file lib_tree_model_adapter.h.

Referenced by AttachTo(), LIB_TREE_MODEL_ADAPTER(), and RefreshTree().

◆ m_filter

CMP_FILTER_TYPE LIB_TREE_MODEL_ADAPTER::m_filter
private

Definition at line 353 of file lib_tree_model_adapter.h.

Referenced by GetFilter(), and SetFilter().

◆ m_freeze

int LIB_TREE_MODEL_ADAPTER::m_freeze
private

Definition at line 357 of file lib_tree_model_adapter.h.

Referenced by Freeze(), GetParent(), IsFrozen(), and Thaw().

◆ m_parent

EDA_BASE_FRAME* LIB_TREE_MODEL_ADAPTER::m_parent
private

Definition at line 351 of file lib_tree_model_adapter.h.

Referenced by LIB_TREE_MODEL_ADAPTER(), and SavePinnedItems().

◆ m_pinnedKey

wxString LIB_TREE_MODEL_ADAPTER::m_pinnedKey
private

Definition at line 365 of file lib_tree_model_adapter.h.

Referenced by LIB_TREE_MODEL_ADAPTER(), and SavePinnedItems().

◆ m_pinnedLibs

wxArrayString LIB_TREE_MODEL_ADAPTER::m_pinnedLibs
private

◆ m_preselect_lib_id

LIB_ID LIB_TREE_MODEL_ADAPTER::m_preselect_lib_id
private

Definition at line 355 of file lib_tree_model_adapter.h.

Referenced by SetPreselectNode(), and ShowPreselect().

◆ m_preselect_unit

int LIB_TREE_MODEL_ADAPTER::m_preselect_unit
private

Definition at line 356 of file lib_tree_model_adapter.h.

Referenced by SetPreselectNode(), and ShowPreselect().

◆ m_show_units

bool LIB_TREE_MODEL_ADAPTER::m_show_units
private

Definition at line 354 of file lib_tree_model_adapter.h.

Referenced by GetChildren(), and ShowUnits().

◆ m_tree

◆ m_widget

wxDataViewCtrl* LIB_TREE_MODEL_ADAPTER::m_widget
private

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