74 LIB_TREE( wxWindow* aParent,
const wxString& aRecentSearchesKey,
LIB_TABLE* aLibTable,
75 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>& aAdapter,
int aFlags =
ALL_WIDGETS,
104 std::vector<int>* aUnit =
nullptr )
const;
226 void onIdle( wxIdleEvent& aEvent );
Add dark theme support to wxHtmlWindow.
A logical library item identifier and consists of various portions much like a URI.
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.
Model class in the component selector Model-View-Adapter (mediated MVC) architecture.
Widget displaying a tree of symbols with optional search text control and description panel....
void RefreshLibTree()
Refreshes the tree (mainly to update highlighting and asterisking)
wxTimer * m_debounceTimer
void onHoverTimer(wxTimerEvent &aEvent)
LIB_TREE_NODE * GetCurrentTreeNode() const
void onQueryMouseMoved(wxMouseEvent &aEvent)
wxDataViewItem m_previewItem
HTML_WINDOW * m_details_ctrl
void onTreeActivate(wxDataViewEvent &aEvent)
wxString m_recentSearchesKey
void onQueryCharHook(wxKeyEvent &aEvent)
void CenterLibId(const LIB_ID &aLibId)
Ensure that an item is visible (preferably centered).
void postSelectEvent()
Post SYMBOL_SELECTED event to notify the selection handler that a part has been selected.
wxWindow * GetFocusTarget()
int GetSelectionCount() const
void onItemContextMenu(wxDataViewEvent &aEvent)
void ShowChangedLanguage()
WX_DATAVIEWCTRL * m_tree_ctrl
void onQueryText(wxCommandEvent &aEvent)
void toggleExpand(const wxDataViewItem &aTreeId)
Expand or collapse a node, switching it to the opposite state.
wxSizer * GetFiltersSizer()
bool m_skipNextRightClick
void selectIfValid(const wxDataViewItem &aTreeId)
If a wxDataViewitem is valid, select it and post a selection event.
void onIdle(wxIdleEvent &aEvent)
void FocusSearchFieldIfExists()
Focus the search widget if it exists.
void expandIfValid(const wxDataViewItem &aTreeId)
void onPreselect(wxCommandEvent &aEvent)
wxPopupWindow * m_previewWindow
void SelectLibId(const LIB_ID &aLibId)
Select an item in the tree widget.
void updateRecentSearchMenu()
LIB_TREE_MODEL_ADAPTER::SORT_MODE GetSortMode() const
void showPreview(wxDataViewItem aItem)
wxString GetSearchString() const
void onTreeSelect(wxDataViewEvent &aEvent)
int GetSelectedLibIds(std::vector< LIB_ID > &aSelection, std::vector< int > *aUnit=nullptr) const
Retrieves a list of selections for trees that allow multi-selection.
void postPreselectEvent()
Post a wxEVT_DATAVIEW_SELECTION_CHANGED to notify the selection handler that a new part has been pres...
void Unselect()
Unselect currently selected item in wxDataViewCtrl.
void onTreeCharHook(wxKeyEvent &aEvent)
void onDetailsLink(wxHtmlLinkEvent &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,...
FLAGS
< Flags to select extra widgets and options
wxBoxSizer * m_filtersSizer
wxDataViewItem m_hoverItem
void SetSearchString(const wxString &aSearchString)
Save/restore search string.
void setState(const STATE &aState)
Restore the symbol tree widget state from an object.
STATE getState() const
Return the symbol tree widget state.
void ExpandLibId(const LIB_ID &aLibId)
Expand and item i the tree widget.
wxSearchCtrl * m_query_ctrl
void centerIfValid(const wxDataViewItem &aTreeId)
void onDebounceTimer(wxTimerEvent &aEvent)
STD_BITMAP_BUTTON * m_sort_ctrl
void onHeaderContextMenu(wxDataViewEvent &aEvent)
void Regenerate(bool aKeepState)
Regenerate the tree.
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
void SetSortMode(LIB_TREE_MODEL_ADAPTER::SORT_MODE aMode)
Save/restore the sorting mode.
Extension of the wxDataViewCtrl to include some helper functions for working with items.
wxDECLARE_EVENT(EVT_LIBITEM_SELECTED, wxCommandEvent)
Custom event sent when an item is chosen (double-clicked)
Structure storing state of the symbol tree widget.
std::vector< wxDataViewItem > expanded
< List of expanded nodes