You've already forked lazarus-ccr
richmemo: updating search method to return the length of the found text (for cases, where found text could be different than a searched one. I.e. Hebrew or Arabic scripts)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5115 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -122,6 +122,9 @@ type
|
||||
|
||||
class function Search(const AWinControl: TWinControl; const ANiddle: string;
|
||||
const SearchOpts: TIntSearchOpt): Integer; override;
|
||||
class function isSearchEx: Boolean; override;
|
||||
class function SearchEx(const AWinControl: TWinControl; const ANiddle: string;
|
||||
const SearchOpts: TIntSearchOpt; var ATextStart, ATextLength: Integer ): Boolean; override;
|
||||
|
||||
class procedure SetZoomFactor(const AWinControl: TWinControl; AZoomFactor: Double); override;
|
||||
|
||||
@@ -166,7 +169,7 @@ var
|
||||
NCPaint : TNCPaintProc = nil;
|
||||
|
||||
function GetSelRTF(amemo: TCustomRichMemo): string;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
type
|
||||
@@ -1113,6 +1116,19 @@ begin
|
||||
Result:=RichEditManager.Find(AWinControl.Handle, UTF8Decode(ANiddle), SearchOpts);
|
||||
end;
|
||||
|
||||
class function TWin32WSCustomRichMemo.isSearchEx: Boolean;
|
||||
begin
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
class function TWin32WSCustomRichMemo.SearchEx(const AWinControl: TWinControl;
|
||||
const ANiddle: string; const SearchOpts: TIntSearchOpt; var ATextStart,
|
||||
ATextLength: Integer): Boolean;
|
||||
begin
|
||||
ATextStart:=RichEditManager.Find(AWinControl.Handle, UTF8Decode(ANiddle), SearchOpts, ATextLength);
|
||||
Result:=ATextStart>=0;
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomRichMemo.SetZoomFactor(
|
||||
const AWinControl: TWinControl; AZoomFactor: Double);
|
||||
var
|
||||
|
Reference in New Issue
Block a user