本文整理汇总了C++中SearchData::IsMatchCase方法的典型用法代码示例。如果您正苦于以下问题:C++ SearchData::IsMatchCase方法的具体用法?C++ SearchData::IsMatchCase怎么用?C++ SearchData::IsMatchCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchData
的用法示例。
在下文中一共展示了SearchData::IsMatchCase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSearchStart
void FindResultsTab::OnSearchStart(wxCommandEvent& e)
{
m_searchInProgress = true;
SearchData* data = (SearchData*)e.GetClientData();
wxString label = data ? data->GetFindString() : wxT("");
if(e.GetInt() != 0 || m_sci == NULL) {
if(m_book) {
clWindowUpdateLocker locker(this);
MySTC* sci = new MySTC(m_book);
SetStyles(sci);
sci->Connect(wxEVT_STC_STYLENEEDED, wxStyledTextEventHandler(FindResultsTab::OnStyleNeeded), NULL, this);
m_book->AddPage(sci, label, true);
#ifdef __WXMAC__
m_book->GetSizer()->Layout();
#endif
size_t where = m_book->GetPageCount() - 1;
// keep the search data used for this tab
wxWindow* tab = m_book->GetPage(where);
if(tab) {
tab->SetClientData(data);
}
m_matchInfo.push_back(MatchInfo());
m_sci = sci;
}
} else if(m_book) {
// using current tab, update the tab title and the search data
int where = m_book->GetPageIndex(m_sci);
if(where != wxNOT_FOUND) {
m_book->SetPageText(where, label);
// delete the old search data
wxWindow* tab = m_book->GetPage(where);
SearchData* oldData = (SearchData*)tab->GetClientData();
if(oldData) {
delete oldData;
}
// set the new search data
tab->SetClientData(data);
}
}
// This is needed in >=wxGTK-2.9, otherwise the 'Search' pane doesn't fully expand
SendSizeEvent(wxSEND_EVENT_POST);
m_recv = m_sci;
Clear();
if(data) {
m_searchData = *data;
wxString message;
message << _("====== Searching for: '") << data->GetFindString() << _("'; Match case: ")
<< (data->IsMatchCase() ? _("true") : _("false")) << _(" ; Match whole word: ")
<< (data->IsMatchWholeWord() ? _("true") : _("false")) << _(" ; Regular expression: ")
<< (data->IsRegularExpression() ? _("true") : _("false")) << wxT(" ======\n");
AppendText(message);
}
}
示例2: OnSearchStart
void FindResultsTab::OnSearchStart(wxCommandEvent& e)
{
m_searchInProgress = true;
Clear();
SetStyles(m_sci);
SearchData* data = (SearchData*)e.GetClientData();
if(data) {
m_searchData = *data;
wxString message;
message << _("====== Searching for: '") << data->GetFindString() << _("'; Match case: ")
<< (data->IsMatchCase() ? _("true") : _("false")) << _(" ; Match whole word: ")
<< (data->IsMatchWholeWord() ? _("true") : _("false")) << _(" ; Regular expression: ")
<< (data->IsRegularExpression() ? _("true") : _("false")) << wxT(" ======\n");
AppendText(message);
}
wxDELETE(data);
}