Initial
This commit is contained in:
51
m68hc11/Editfnd.cpp
Normal file
51
m68hc11/Editfnd.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include <m68hc11/editfnd.hpp>
|
||||
|
||||
EditFind::EditFind(void)
|
||||
{
|
||||
}
|
||||
|
||||
EditFind::~EditFind()
|
||||
{
|
||||
}
|
||||
|
||||
// virtuals
|
||||
|
||||
void EditFind::init(void)
|
||||
{
|
||||
CharRange searchRange;
|
||||
|
||||
searchRange.posMin(0);
|
||||
searchRange.posMax(0);
|
||||
mFindTextEx.searchRange(searchRange);
|
||||
}
|
||||
|
||||
void EditFind::leaveEdit(const String &strText)
|
||||
{
|
||||
findNext();
|
||||
}
|
||||
|
||||
void EditFind::find(void)
|
||||
{
|
||||
findNext();
|
||||
}
|
||||
|
||||
void EditFind::findNext(void)
|
||||
{
|
||||
String currText;
|
||||
|
||||
getText(currText);
|
||||
if(currText.isNull())return;
|
||||
if(!(currText==lastSearchText()))lastFindIndex(-1);
|
||||
mFindTextEx.strFind(currText);
|
||||
if(!mFindTextEx.searchRange().posMin()&&!mFindTextEx.searchRange().posMax())mFindTextEx.searchRange(CharRange(0,-1));
|
||||
else
|
||||
{
|
||||
CharRange searchRange(mFindTextEx.foundRange());
|
||||
searchRange.posMin(searchRange.posMax());
|
||||
searchRange.posMax(-1);
|
||||
mFindTextEx.searchRange(searchRange);
|
||||
}
|
||||
// mRichEditControl->setFocus();
|
||||
mRichEditControl->findText(mFindTextEx);
|
||||
// setFocus();
|
||||
}
|
||||
Reference in New Issue
Block a user