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  SYM_FILTER_TYPE { SYM_FILTER_NONE, SYM_FILTER_POWER }
 This enum allows a selective filtering of symbols 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 (SYM_FILTER_TYPE aFilter)
 Set the symbol filter type. More...
 
SYM_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 symbol 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 symbols by alias. More...
 
void AssignIntrinsicRanks ()
 Sort the tree and assign ranks after adding libraries. More...
 
void UpdateSearchString (wxString const &aSearch, bool aState)
 Set the search string provided by the user. More...
 
void AttachTo (wxDataViewCtrl *aDataViewCtrl)
 Attach to a wxDataViewCtrl and initialize it. More...
 
void FinishTreeInitialization ()
 A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set. 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 symbols 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)
 Create 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 #SYM_TREE_NODE -> wxDataViewItem. More...
 
static LIB_TREE_NODEToNode (wxDataViewItem aItem)
 Convert wxDataViewItem -> #SYM_TREE_NODE. More...
 
static unsigned int IntoArray (LIB_TREE_NODE const &aNode, wxDataViewItemArray &aChildren)
 Convert SYM_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
 
SYM_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

◆ SYM_FILTER_TYPE

This enum allows a selective filtering of symbols to list.

Enumerator
SYM_FILTER_NONE 

no filtering

SYM_FILTER_POWER 

list symbols 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 101 of file lib_tree_model_adapter.cpp.

102 {}

◆ LIB_TREE_MODEL_ADAPTER()

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

Create the adapter.

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

Definition at line 70 of file lib_tree_model_adapter.cpp.

70  :
71  m_parent( aParent ),
73  m_show_units( true ),
74  m_preselect_unit( 0 ),
75  m_freeze( 0 ),
76  m_col_part( nullptr ),
77  m_col_desc( nullptr ),
78  m_widget( nullptr ),
79  m_pinnedLibs(),
80  m_pinnedKey( aPinnedKey )
81 {
82  // Default column widths
83  m_colWidths[PART_COL] = 360;
84  m_colWidths[DESC_COL] = 2000;
85 
88 
89  // Read the pinned entries from the project config
91 
92  std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
93  project.m_PinnedSymbolLibs :
94  project.m_PinnedFootprintLibs;
95 
96  for( const wxString& entry : entries )
97  m_pinnedLibs.push_back( entry );
98 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:189
virtual PROJECT_FILE & GetProjectFile() const
Definition: project.h:145
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_i.h:92
The backing store for a PROJECT, in JSON format.
Definition: project_file.h:64
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.

References APP_SETTINGS_BASE::LIB_TREE::column_width, DESC_COL, PROJECT::GetProjectFile(), Kiface(), KIFACE_I::KifaceSettings(), KIWAY_HOLDER::Kiway(), m_colWidths, APP_SETTINGS_BASE::m_LibTree, m_parent, m_pinnedKey, m_pinnedLibs, PART_COL, KIWAY::Prj(), and project.

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 symbol in the dialog

Definition at line 270 of file lib_tree_model_adapter.cpp.

271 {
272  wxString partHead = _( "Item" );
273  wxString descHead = _( "Description" );
274 
275  // The extent of the text doesn't take into account the space on either side
276  // in the header, so artificially pad it
277  wxSize partHeadMinWidth = KIUI::GetTextSize( partHead + "MMM", aDataViewCtrl );
278 
279  // Ensure the part column is wider than the smallest allowable width
280  if( m_colWidths[PART_COL] < partHeadMinWidth.x )
281  m_colWidths[PART_COL] = partHeadMinWidth.x;
282 
283  m_widget = aDataViewCtrl;
284  aDataViewCtrl->SetIndent( kDataViewIndent );
285  aDataViewCtrl->AssociateModel( this );
286  aDataViewCtrl->ClearColumns();
287 
288  m_col_part = aDataViewCtrl->AppendTextColumn( partHead, PART_COL, wxDATAVIEW_CELL_INERT,
290  m_col_desc = aDataViewCtrl->AppendTextColumn( descHead, DESC_COL, wxDATAVIEW_CELL_INERT,
292 
293  m_col_part->SetMinWidth( partHeadMinWidth.x );
294 }
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:66
#define _(s)

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 symbols by alias.

To be called in the setup phase.

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

Definition at line 169 of file lib_tree_model_adapter.cpp.

172 {
173  LIB_TREE_NODE_LIB& lib_node = DoAddLibraryNode( aNodeName, aDesc );
174 
175  for( LIB_TREE_ITEM* item: aItemList )
176  lib_node.AddItem( item );
177 
178  lib_node.AssignIntrinsicRanks( presorted );
179 }
A mix-in to provide polymorphism between items stored in libraries (symbols, aliases and footprints).
Definition: lib_tree_item.h:38
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::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 158 of file lib_tree_model_adapter.cpp.

160 {
161  LIB_TREE_NODE_LIB& lib_node = m_tree.AddLib( aNodeName, aDesc );
162 
163  lib_node.m_Pinned = m_pinnedLibs.Index( lib_node.m_LibId.GetLibNickname() ) != wxNOT_FOUND;
164 
165  return lib_node;
166 }
Node type: library.
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:90
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 497 of file lib_tree_model_adapter.cpp.

500 {
501  for( std::unique_ptr<LIB_TREE_NODE>& node: aNode.m_Children )
502  {
503  if( aFunc( &*node ) )
504  {
505  wxDataViewItem item = wxDataViewItem( &*node );
506  m_widget->ExpandAncestors( item );
507 
508  if( !(*aHighScore) || node->m_Score > (*aHighScore)->m_Score )
509  (*aHighScore) = &*node;
510  }
511 
512  FindAndExpand( *node, aFunc, aHighScore );
513  }
514 }
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 341 of file lib_tree_model_adapter.cpp.

342 {
343  for( std::unique_ptr<LIB_TREE_NODE>& lib: m_tree.m_Children )
344  {
345  if( lib->m_Name != aLibId.GetLibNickname() )
346  continue;
347 
348  // if part name is not specified, return the library node
349  if( aLibId.GetLibItemName() == "" )
350  return ToItem( lib.get() );
351 
352  for( std::unique_ptr<LIB_TREE_NODE>& alias: lib->m_Children )
353  {
354  if( alias->m_Name == aLibId.GetLibItemName() )
355  return ToItem( alias.get() );
356  }
357 
358  break; // could not find the part in the requested library
359  }
360 
361  return wxDataViewItem();
362 }
const UTF8 & GetLibItemName() const
Definition: lib_id.h:104
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert #SYM_TREE_NODE -> wxDataViewItem.
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Definition: lib_id.h:90
PTR_VECTOR m_Children

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

◆ FinishTreeInitialization()

void LIB_TREE_MODEL_ADAPTER::FinishTreeInitialization ( )

A final-stage initialization to be called after the window hierarchy has been realized and the window sizes set.

Definition at line 378 of file lib_tree_model_adapter.cpp.

379 {
380  m_col_part->SetWidth( m_colWidths[PART_COL] );
381  m_col_desc->SetWidth( m_colWidths[DESC_COL] );
382 }

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

◆ Freeze()

void LIB_TREE_MODEL_ADAPTER::Freeze ( )
inline

Definition at line 267 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 233 of file lib_tree_model_adapter.h.

233 { 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 297 of file lib_tree_model_adapter.cpp.

298 {
299  const LIB_TREE_NODE* node = ToNode( aSelection );
300 
301  LIB_ID emptyId;
302 
303  if( !node )
304  return emptyId;
305 
306  return node->m_LibId;
307 }
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 -> #SYM_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 if the item has non-default attributes

Definition at line 468 of file lib_tree_model_adapter.cpp.

471 {
472  if( IsFrozen() )
473  return false;
474 
475  LIB_TREE_NODE* node = ToNode( aItem );
476  wxASSERT( node );
477 
478  if( node->m_Type != LIB_TREE_NODE::LIBID )
479  {
480  // Currently only aliases are formatted at all
481  return false;
482  }
483 
484  if( !node->m_IsRoot && aCol == 0 )
485  {
486  // Names of non-root aliases are italicized
487  aAttr.SetItalic( true );
488  return true;
489  }
490  else
491  {
492  return false;
493  }
494 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 365 of file lib_tree_model_adapter.cpp.

367 {
368  const LIB_TREE_NODE* node = ( aItem.IsOk() ? ToNode( aItem ) : &m_tree );
369 
370  if( node->m_Type != LIB_TREE_NODE::TYPE::LIBID
371  || ( m_show_units && node->m_Type == LIB_TREE_NODE::TYPE::LIBID ) )
372  return IntoArray( *node, aChildren );
373  else
374  return 0;
375 }
static unsigned int IntoArray(LIB_TREE_NODE const &aNode, wxDataViewItemArray &aChildren)
Convert SYM_TREE_NODE's children to wxDataViewItemArray.
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 319 of file lib_tree_model_adapter.h.

319 { 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 324 of file lib_tree_model_adapter.h.

324 { 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 274 of file lib_tree_model_adapter.h.

274 { return nullptr; }

◆ GetFilter()

SYM_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::AddLibraries(), and SYMBOL_TREE_MODEL_ADAPTER::AddLibrary().

◆ GetItemCount()

int LIB_TREE_MODEL_ADAPTER::GetItemCount ( ) const

Return the number of symbols loaded in the tree.

Definition at line 330 of file lib_tree_model_adapter.cpp.

331 {
332  int n = 0;
333 
334  for( const std::unique_ptr<LIB_TREE_NODE>& lib: m_tree.m_Children )
335  n += lib->m_Children.size();
336 
337  return n;
338 }
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 243 of file lib_tree_model_adapter.h.

244  {
245  return m_tree.m_Children.size();
246  }
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 425 of file lib_tree_model_adapter.cpp.

426 {
427  if( m_freeze )
428  return ToItem( nullptr );
429 
430  LIB_TREE_NODE* node = ToNode( aItem );
431  LIB_TREE_NODE* parent = node ? node->m_Parent : nullptr;
432 
433  // wxDataViewModel has no root node, but rather top-level elements have
434  // an invalid (null) parent.
435  if( !node || !parent || parent->m_Type == LIB_TREE_NODE::TYPE::ROOT )
436  return ToItem( nullptr );
437  else
438  return ToItem( parent );
439 }
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert #SYM_TREE_NODE -> wxDataViewItem.
LIB_TREE_NODE * m_Parent
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 362 of file lib_tree_model_adapter.h.

363  {
364  return wxString::FromUTF8( "☆ " );
365  }

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 324 of file lib_tree_model_adapter.cpp.

325 {
326  return ToNode( aSelection );
327 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 317 of file lib_tree_model_adapter.cpp.

318 {
319  const LIB_TREE_NODE* node = ToNode( aSelection );
320  return node ? node->m_Type : LIB_TREE_NODE::INVALID;
321 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 310 of file lib_tree_model_adapter.cpp.

311 {
312  const LIB_TREE_NODE* node = ToNode( aSelection );
313  return node ? node->m_Unit : 0;
314 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 442 of file lib_tree_model_adapter.cpp.

445 {
446  if( IsFrozen() )
447  {
448  aVariant = wxEmptyString;
449  return;
450  }
451 
452  LIB_TREE_NODE* node = ToNode( aItem );
453  wxASSERT( node );
454 
455  switch( aCol )
456  {
457  default: // column == -1 is used for default Compare function
458  case 0:
459  aVariant = UnescapeString( node->m_Name );
460  break;
461  case 1:
462  aVariant = node->m_Desc;
463  break;
464  }
465 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_TREE_NODE.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
wxString UnescapeString(const wxString &aSource)
Definition: string.cpp:222

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

◆ HasContainerColumns()

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

Check whether a container has columns too.

Definition at line 412 of file lib_tree_model_adapter.cpp.

413 {
414  return IsContainer( aItem );
415 }
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 SYM_TREE_NODE's children to wxDataViewItemArray.

Definition at line 52 of file lib_tree_model_adapter.cpp.

54 {
55  unsigned int n = 0;
56 
57  for( std::unique_ptr<LIB_TREE_NODE> const& child: aNode.m_Children )
58  {
59  if( child->m_Score > 0 )
60  {
61  aChildren.Add( ToItem( &*child ) );
62  ++n;
63  }
64  }
65 
66  return n;
67 }
static wxDataViewItem ToItem(LIB_TREE_NODE const *aNode)
Convert #SYM_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 418 of file lib_tree_model_adapter.cpp.

419 {
420  LIB_TREE_NODE* node = ToNode( aItem );
421  return node ? node->m_Children.size() : true;
422 }
static LIB_TREE_NODE * ToNode(wxDataViewItem aItem)
Convert wxDataViewItem -> #SYM_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 385 of file lib_tree_model_adapter.cpp.

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

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 105 of file lib_tree_model_adapter.cpp.

106 {
107  if( m_widget )
108  {
110  cfg->m_LibTree.column_width = m_widget->GetColumn( PART_COL )->GetWidth();
111  }
112 }
APP_SETTINGS_BASE * KifaceSettings() const
Definition: kiface_i.h:92
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:99
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 115 of file lib_tree_model_adapter.cpp.

116 {
118 
119  std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
120  project.m_PinnedSymbolLibs :
121  project.m_PinnedFootprintLibs;
122 
123  entries.clear();
124  m_pinnedLibs.clear();
125 
126  for( std::unique_ptr<LIB_TREE_NODE>& child: m_tree.m_Children )
127  {
128  if( child->m_Pinned )
129  {
130  m_pinnedLibs.push_back( child->m_LibId.GetLibNickname() );
131  entries.push_back( child->m_LibId.GetLibNickname() );
132  }
133  }
134 
135 
136 }
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:53
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Definition: kiway.cpp:189
virtual PROJECT_FILE & GetProjectFile() const
Definition: project.h:145
The backing store for a PROJECT, in JSON format.
Definition: project_file.h:64
PTR_VECTOR m_Children

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

◆ SetFilter()

void LIB_TREE_MODEL_ADAPTER::SetFilter ( SYM_FILTER_TYPE  aFilter)

Set the symbol filter type.

Must be set before adding libraries

Parameters
aFilterif SYM_FILTER_POWER, only power parts are loaded

Definition at line 139 of file lib_tree_model_adapter.cpp.

140 {
141  m_filter = aFilter;
142 }

References m_filter.

◆ SetPreselectNode()

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

Set the symbol 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 151 of file lib_tree_model_adapter.cpp.

152 {
153  m_preselect_lib_id = aLibId;
154  m_preselect_unit = aUnit;
155 }

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 341 of file lib_tree_model_adapter.h.

343  { 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 533 of file lib_tree_model_adapter.cpp.

534 {
535  LIB_TREE_NODE* highScore = nullptr;
536 
537  if( !m_preselect_lib_id.IsValid() )
538  return highScore;
539 
541  [&]( LIB_TREE_NODE const* n )
542  {
543  if( n->m_Type == LIB_TREE_NODE::LIBID && ( n->m_Children.empty() ||
544  !m_preselect_unit ) )
545  return m_preselect_lib_id == n->m_LibId;
546  else if( n->m_Type == LIB_TREE_NODE::UNIT && m_preselect_unit )
547  return m_preselect_lib_id == n->m_Parent->m_LibId &&
548  m_preselect_unit == n->m_Unit;
549  else
550  return false;
551  },
552  &highScore );
553 
554  return highScore;
555 }
bool IsValid() const
Check if this LID_ID is valid.
Definition: lib_id.h:159
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 517 of file lib_tree_model_adapter.cpp.

518 {
519  LIB_TREE_NODE* highScore = nullptr;
520 
522  []( LIB_TREE_NODE const* n )
523  {
524  // return leaf nodes with some level of matching
525  return n->m_Type == LIB_TREE_NODE::TYPE::LIBID && n->m_Score > 1;
526  },
527  &highScore );
528 
529  return highScore;
530 }
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 558 of file lib_tree_model_adapter.cpp.

559 {
560  LIB_TREE_NODE* highScore = nullptr;
561 
563  []( LIB_TREE_NODE const* n )
564  {
565  return n->m_Type == LIB_TREE_NODE::TYPE::LIBID &&
566  n->m_Parent->m_Parent->m_Children.size() == 1;
567  },
568  &highScore );
569 
570  return highScore;
571 }
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 145 of file lib_tree_model_adapter.cpp.

146 {
147  m_show_units = aShow;
148 }

References m_show_units.

◆ Thaw()

void LIB_TREE_MODEL_ADAPTER::Thaw ( )
inline

Definition at line 268 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 #SYM_TREE_NODE -> wxDataViewItem.

Definition at line 40 of file lib_tree_model_adapter.cpp.

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

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

◆ ToNode()

◆ UpdateSearchString()

void LIB_TREE_MODEL_ADAPTER::UpdateSearchString ( wxString const &  aSearch,
bool  aState 
)

Set the search string provided by the user.

Parameters
aSearchfull, unprocessed search text
aStateif true, we are keeping the state and so we shouldn't collapse the tree

Definition at line 182 of file lib_tree_model_adapter.cpp.

183 {
184  {
185  wxWindowUpdateLocker updateLock( m_widget );
186 
187  // Even with the updateLock, wxWidgets sometimes ties its knickers in a knot trying to
188  // run a wxdataview_selection_changed_callback() on a row that has been deleted.
189  // https://bugs.launchpad.net/kicad/+bug/1756255
190  m_widget->UnselectAll();
191 
192  // This collapse is required before the call to "Freeze()" below. Once Freeze()
193  // is called, GetParent() will return nullptr. While this works for some calls, it
194  // segfaults when we have any expanded elements b/c the sub units in the tree don't
195  // have explicit references that are maintained over a search
196  // The tree will be expanded again below when we get our matches
197  //
198  // Also note that this cannot happen when we have deleted a symbol as GTK will also
199  // iterate over the tree in this case and find a symbol that has an invalid link
200  // and crash https://gitlab.com/kicad/code/kicad/-/issues/6910
201  if( !aState && !aSearch.IsNull() && m_tree.m_Children.size() )
202  {
203  for( std::unique_ptr<LIB_TREE_NODE>& child: m_tree.m_Children )
204  m_widget->Collapse( wxDataViewItem( &*child ) );
205  }
206 
207  // DO NOT REMOVE THE FREEZE/THAW. This freeze/thaw is a flag for this model adapter
208  // that tells it when it shouldn't trust any of the data in the model. When set, it will
209  // not return invalid data to the UI, since this invalid data can cause crashes.
210  // This is different than the update locker, which locks the UI aspects only.
211  Freeze();
212  BeforeReset();
213 
214  m_tree.ResetScore();
215 
216  for( std::unique_ptr<LIB_TREE_NODE>& child: m_tree.m_Children )
217  {
218  if( child->m_Pinned )
219  child->m_Score *= 2;
220  }
221 
222  wxStringTokenizer tokenizer( aSearch );
223 
224  while( tokenizer.HasMoreTokens() )
225  {
226  const wxString term = tokenizer.GetNextToken().Lower();
227  EDA_COMBINED_MATCHER matcher( term );
228 
229  m_tree.UpdateScore( matcher );
230  }
231 
232  m_tree.SortNodes();
233  AfterReset();
234  Thaw();
235  }
236 
237  LIB_TREE_NODE* bestMatch = ShowResults();
238 
239  if( !bestMatch )
240  bestMatch = ShowPreselect();
241 
242  if( !bestMatch )
243  bestMatch = ShowSingleLibrary();
244 
245  if( bestMatch )
246  {
247  wxDataViewItem item = wxDataViewItem( bestMatch );
248  m_widget->Select( item );
249 
250  // Make sure the *parent* item is visible. The selected item is the
251  // first (shown) child of the parent. So it's always right below the parent,
252  // and this way the user can also see what library the selected part belongs to,
253  // without having a case where the selection is off the screen (unless the
254  // window is a single row high, which is unlikely)
255  //
256  // This also happens to circumvent https://bugs.launchpad.net/kicad/+bug/1804400
257  // which appears to be a GTK+3 bug.
258  {
259  wxDataViewItem parent = GetParent( item );
260 
261  if( parent.IsOk() )
262  item = parent;
263  }
264 
265  m_widget->EnsureVisible( item );
266  }
267 }
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 403 of file lib_tree_model_adapter.h.

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

◆ m_col_part

wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::m_col_part
private

Definition at line 402 of file lib_tree_model_adapter.h.

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

◆ m_colWidths

int LIB_TREE_MODEL_ADAPTER::m_colWidths[NUM_COLS]
private

◆ m_filter

SYM_FILTER_TYPE LIB_TREE_MODEL_ADAPTER::m_filter
private

Definition at line 396 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 400 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 394 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 408 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 398 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 399 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 397 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: