RVMisc.pas
上传用户:daoqigc
上传日期:2021-04-20
资源大小:2795k
文件大小:2k
源码类别:

RichEdit

开发平台:

Delphi

  1. {*******************************************************}
  2. {                                                       }
  3. {       RichView                                        }
  4. {       Functions converting options of TFindDialog     }
  5. {       to options of RichView.SearchText and           }
  6. {       RichViewEdit.SearchText.                        }
  7. {                                                       }
  8. {       Copyright (c) Sergey Tkachenko                  }
  9. {       svt@trichview.com                               }
  10. {       http://www.trichview.com                        }
  11. {                                                       }
  12. {*******************************************************}
  13. unit RVMisc;
  14. interface
  15. {$I RV_Defs.inc}
  16. uses RVScroll, RichView,
  17.      {$IFNDEF RVDONOTUSERVF}
  18.      RVEdit,
  19.      {$ENDIF}
  20.      Dialogs;
  21. function GetRVSearchOptions(fo: TFindOptions): TRVSearchOptions;
  22. {$IFNDEF RVDONOTUSERVF}
  23. function GetRVESearchOptions(fo: TFindOptions): TRVESearchOptions;
  24. {$ENDIF}
  25. {-----------------------------------------------------------------------}
  26. implementation
  27. {-----------------------------------------------------------------------}
  28. function GetRVSearchOptions(fo: TFindOptions): TRVSearchOptions;
  29. begin
  30.   Result := [];
  31.   if frMatchCase in fo then
  32.     Include(Result,rvsroMatchCase);
  33.   if frDown in fo then
  34.     Include(Result,rvsroDown);
  35.   if frWholeWord in fo then
  36.     Include(Result, rvsroWholeWord);
  37. end;
  38. {-----------------------------------------------------------------------}
  39. {$IFNDEF RVDONOTUSERVF}
  40. function GetRVESearchOptions(fo: TFindOptions): TRVESearchOptions;
  41. begin
  42.   Result := [];
  43.   if frMatchCase in fo then
  44.     Include(Result, rvseoMatchCase);
  45.   if frDown in fo then
  46.    Include(Result, rvseoDown);
  47.   if frWholeWord in fo then
  48.     Include(Result, rvseoWholeWord);
  49. end;
  50. {$ENDIF}
  51. end.