34 class wxHtmlLinkEvent;
62 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>& aAdapter,
WIDGETS aWidgets =
ALL,
void selectIfValid(const wxDataViewItem &aTreeId)
If a wxDataViewitem is valid, select it and post a selection event.
wxSearchCtrl * m_query_ctrl
void toggleExpand(const wxDataViewItem &aTreeId)
Expand or collapse a node, switching it to the opposite state.
STATE getState() const
Return the symbol tree widget state.
void onQueryEnter(wxCommandEvent &aEvent)
wxWindow * GetFocusTarget()
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
void centerIfValid(const wxDataViewItem &aTreeId)
void postSelectEvent()
Post SYMBOL_SELECTED event to notify the selection handler that a part has been selected.
wxDataViewCtrl * m_tree_ctrl
A logical library item identifier and consists of various portions much like a URI.
LIB_TREE(wxWindow *aParent, LIB_TABLE *aLibTable, wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > &aAdapter, WIDGETS aWidgets=ALL, HTML_WINDOW *aDetails=nullptr)
Construct a symbol tree.
void onPreselect(wxCommandEvent &aEvent)
std::vector< wxString > pinned
Current selection, might be not valid if nothing was selected.
void onQueryCharHook(wxKeyEvent &aEvent)
HTML_WINDOW * m_details_ctrl
LIB_TREE_NODE * GetCurrentTreeNode() const
void onQueryMouseMoved(wxMouseEvent &aEvent)
void onTreeActivate(wxDataViewEvent &aEvent)
void onQueryText(wxCommandEvent &aEvent)
LIB_ID GetSelectedLibId(int *aUnit=nullptr) const
For multi-unit symbols, if the user selects the symbol itself rather than picking an individual unit,...
void Regenerate(bool aKeepState)
Regenerate the tree.
void Unselect()
Unselect currently selected item in wxDataViewCtrl.
void onTreeSelect(wxDataViewEvent &aEvent)
wxTimer * m_debounceTimer
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
void onDetailsLink(wxHtmlLinkEvent &aEvent)
void RefreshLibTree()
Refreshes the tree (mainly to update highlighting and asterisking)
void onDebounceTimer(wxTimerEvent &aEvent)
Add dark theme support to wxHtmlWindow.
void ExpandLibId(const LIB_ID &aLibId)
Expand and item i the tree widget.
WIDGETS
< Flags to select extra widgets
void expandIfValid(const wxDataViewItem &aTreeId)
std::vector< wxDataViewItem > expanded
< List of expanded nodes
Structure storing state of the symbol tree widget.
wxDECLARE_EVENT(SYMBOL_PRESELECTED, wxCommandEvent)
Custom event sent when a symbol is selected.
void postPreselectEvent()
Post a wxEVT_DATAVIEW_SELECTION_CHANGED to notify the selection handler that a new part has been pres...
void setState(const STATE &aState)
Restore the symbol tree widget state from an object.
void CenterLibId(const LIB_ID &aLibId)
Ensure that an item is visible (preferably centered).
Widget displaying a tree of symbols with optional search text control and description panel....
void SelectLibId(const LIB_ID &aLibId)
Select an item in the tree widget.
void onContextMenu(wxDataViewEvent &aEvent)
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.