Version: 3.3.1
Loading...
Searching...
No Matches

#include <wx/textctrl.h>

Detailed Description

Search options for wxTextCtrl::SearchText().

This is a builder class, where property functions can be called during construction. For example:

textctrl->SearchText(wxTextSearch(L"Institutional Research").
wxTextSearch & SearchDirection(const wxTextSearch::Direction direction)
Whether the search should go up or down in the text control.
Definition textctrl.h:1202
wxTextSearch(const wxString &text)
The string to search for.
Definition textctrl.h:1152
wxTextSearch & MatchWholeWord(const bool matchWholeWord=true)
Whether the search should match the whole word.
Definition textctrl.h:1191
wxTextSearch & MatchCase(const bool matchCase=true)
Whether the search should match case (i.e., be case sensitive).
Definition textctrl.h:1180
@ Down
Definition textctrl.h:1162
Result from wxTextCtrl::SearchText(), specifying the range of the found text.
Definition textctrl.h:1232
Since
3.3.0

Public Types

enum class  Direction {
  Down ,
  Up
}
 One of the following values can be passed to wxTextSearch::SearchDirection() to control direction when searching a wxTextCtrl. More...

Public Member Functions

 wxTextSearch (const wxString &text)
 The string to search for.
wxTextSearchSearchValue (const wxString &value)
 The string to search for.
wxTextSearchMatchCase (const bool matchCase=true)
 Whether the search should match case (i.e., be case sensitive).
wxTextSearchMatchWholeWord (const bool matchWholeWord=true)
 Whether the search should match the whole word.
wxTextSearchSearchDirection (const wxTextSearch::Direction direction)
 Whether the search should go up or down in the text control.
wxTextSearchStart (const long startPosition)
 Where the search should start from.

Public Attributes

wxString m_searchValue
long m_startingPosition = -1
bool m_matchCase = true
bool m_wholeWord = false
Direction m_direction = Direction::Down

Member Enumeration Documentation

◆ Direction

enum class wxTextSearch::Direction
strong

One of the following values can be passed to wxTextSearch::SearchDirection() to control direction when searching a wxTextCtrl.

Since
3.3.0
Enumerator
Down 
Up 

Constructor & Destructor Documentation

◆ wxTextSearch()

wxTextSearch::wxTextSearch ( const wxString & text)
inline

The string to search for.

Member Function Documentation

◆ MatchCase()

wxTextSearch & wxTextSearch::MatchCase ( const bool matchCase = true)
inline

Whether the search should match case (i.e., be case sensitive).

By default, this is false; search will be case insensitive.

◆ MatchWholeWord()

wxTextSearch & wxTextSearch::MatchWholeWord ( const bool matchWholeWord = true)
inline

Whether the search should match the whole word.

By default, this is false; searching will not match by whole word.

◆ SearchDirection()

wxTextSearch & wxTextSearch::SearchDirection ( const wxTextSearch::Direction direction)
inline

Whether the search should go up or down in the text control.

By default, search will go downward.

◆ SearchValue()

wxTextSearch & wxTextSearch::SearchValue ( const wxString & value)
inline

The string to search for.

◆ Start()

wxTextSearch & wxTextSearch::Start ( const long startPosition)
inline

Where the search should start from.

By default, if searching down, then the search will start at 0. If searching up, then will start at the end of control.

Member Data Documentation

◆ m_direction

Direction wxTextSearch::m_direction = Direction::Down

◆ m_matchCase

bool wxTextSearch::m_matchCase = true

◆ m_searchValue

wxString wxTextSearch::m_searchValue

◆ m_startingPosition

long wxTextSearch::m_startingPosition = -1

◆ m_wholeWord

bool wxTextSearch::m_wholeWord = false