Add a possibility to beep on no match to wxGenericTreeCtrl.
For consistency with Windows, allow to optionally generate a beep when incremental search in the tree control doesn't find anything. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,7 +65,6 @@ public:
|
||||
const wxValidator &validator = wxDefaultValidator,
|
||||
const wxString& name = wxTreeCtrlNameStr);
|
||||
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
@@ -169,6 +168,8 @@ public:
|
||||
virtual void EndEditLabel(const wxTreeItemId& item,
|
||||
bool discardChanges = false);
|
||||
|
||||
virtual void EnableBellOnNoMatch(bool on = true);
|
||||
|
||||
virtual void SortChildren(const wxTreeItemId& item);
|
||||
|
||||
// items geometry
|
||||
@@ -275,6 +276,10 @@ protected:
|
||||
// incremental search data
|
||||
wxString m_findPrefix;
|
||||
wxTimer *m_findTimer;
|
||||
// This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1
|
||||
// if it is globally enabled but has been temporarily disabled because we
|
||||
// had already beeped for this particular search.
|
||||
int m_findBell;
|
||||
|
||||
bool m_dropEffectAboveItem;
|
||||
|
||||
@@ -352,6 +357,10 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
// Reset the state of the last find (i.e. keyboard incremental search)
|
||||
// operation.
|
||||
void ResetFindState();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl)
|
||||
wxDECLARE_NO_COPY_CLASS(wxGenericTreeCtrl);
|
||||
|
Reference in New Issue
Block a user