19#ifndef TREESEARCHCTRL_HPP
20#define TREESEARCHCTRL_HPP
24#include <wx/treectrl.h>
40 virtual bool selectItem(
const wxString& value)
override;
41 wxTreeItemId
findItem(
const wxString& value, wxTreeItemId node);
42 virtual wxArrayString
getCandidates(
const wxString& enteredText)
override;
46 TreeSearchCtrl(wxWindow* parent, wxWindowID
id,
const wxString& hint = wxEmptyString,
const wxString& calltip = wxEmptyString, wxTreeCtrl* associatedCtrl =
nullptr,
bool searchToolTip =
false) :
SearchCtrl(parent, id, wxEmptyString),
m_associatedCtrl(associatedCtrl),
m_searchToolTip(searchToolTip)
Implementation of a generic search control based on a combo box.
This class specializes the generic search control to interact with a wxTreeCtrl.
virtual bool selectItem(const wxString &value) override
This method searches and selects the item with the passed label in the associated tree.
TreeSearchCtrl(wxWindow *parent, wxWindowID id, const wxString &hint=wxEmptyString, const wxString &calltip=wxEmptyString, wxTreeCtrl *associatedCtrl=nullptr, bool searchToolTip=false)
virtual wxArrayString getCandidates(const wxString &enteredText) override
This method returns an array of strings containing possible candidates for the passed search string.
wxTreeCtrl * m_associatedCtrl
wxTreeItemId findItem(const wxString &value, wxTreeItemId node)
This method searches for the tree item, whose label corresponds to the passed string.
wxArrayString getChildCandidates(const wxString &enteredText, wxTreeItemId node)
This method returns an array of strings containing possible candiates for the passed search string,...