X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57bf8a6f1efc2d58099f058bfd17579b147baac2..0555b2a0a3c509687e7fc5aeb160f5171b7e6311:/include/wx/generic/private/listctrl.h diff --git a/include/wx/generic/private/listctrl.h b/include/wx/generic/private/listctrl.h index 48a1f016b8..2267ca3dd7 100644 --- a/include/wx/generic/private/listctrl.h +++ b/include/wx/generic/private/listctrl.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/generic/listctrl.h +// Name: wx/generic/private/listctrl.h // Purpose: private definitions of wxListCtrl helpers // Author: Robert Roebling // Vadim Zeitlin (virtual list control support) @@ -390,6 +390,27 @@ public: void Notify(); }; +//----------------------------------------------------------------------------- +// wxListFindTimer (internal) +//----------------------------------------------------------------------------- + +class wxListFindTimer: public wxTimer +{ +public: + // reset the current prefix after half a second of inactivity + enum { DELAY = 500 }; + + wxListFindTimer( wxListMainWindow *owner ) + : m_owner(owner) + { + } + + virtual void Notify(); + +private: + wxListMainWindow *m_owner; +}; + //----------------------------------------------------------------------------- // wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing //----------------------------------------------------------------------------- @@ -556,6 +577,11 @@ public: bool OnRenameAccept(size_t itemEdit, const wxString& value); void OnRenameCancelled(size_t itemEdit); + void OnFindTimer(); + // set whether or not to ring the find bell + // (does nothing on MSW - bell is always rung) + void EnableBellOnNoMatch( bool on ); + void OnMouse( wxMouseEvent &event ); // called to switch the selection from the current item to newCurrent, @@ -729,6 +755,15 @@ protected: bool m_lastOnSame; wxTimer *m_renameTimer; + + // 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_isCreated; int m_dragCount; wxPoint m_dragStart; @@ -779,6 +814,9 @@ protected: // force us to recalculate the range of visible lines void ResetVisibleLinesRange() { m_lineFrom = (size_t)-1; } + // find the first item starting with the given prefix after the given item + size_t PrefixFindItem(size_t item, const wxString& prefix) const; + // get the colour to be used for drawing the rules wxColour GetRuleColour() const {