Permalink
Browse files

foreground

  • Loading branch information...
vrybant committed Oct 2, 2018
1 parent d26ae32 commit 9d386b421de9ab886308553089c86ad3b7bf3e3d
Showing with 21 additions and 1 deletion.
  1. +20 −1 components/unboundmemo/unboundmemo.pas
  2. +1 −0 copy-memo.bat
@@ -20,6 +20,7 @@ TUnboundMemo = class(TRichMemoEx)
FParagraphic : boolean;
SelStartTemp : integer;
SelLengthTemp : integer;
function Foreground: integer;
function Colored: boolean;
function GetLink: string;
function GetParagraphNumber: integer;
@@ -44,6 +45,12 @@ procedure Register;
implementation
const
fgText = 0;
fgLink = 1;
fgStrong = 2;
fgFootnote = 3;
function MyStrToInt(st: string): integer;
var v, r : integer;
begin
@@ -70,9 +77,21 @@ procedure TUnboundMemo.CreateWnd;
if ReadOnly then HideCursor;
end;
function TUnboundMemo.Foreground: integer;
begin
Result := fgText;
case SelAttributes.Color of
clNavy : Result := fgLink;
clMaroon : Result := fgStrong;
clGray : Result := fgFootnote;
end;
end;
function TUnboundMemo.Colored: boolean;
begin
Result := SelAttributes.Color = clNavy
Result := Foreground = fgLink
end;
function TUnboundMemo.GetLink: string;
@@ -0,0 +1 @@
copy C:\lazarus\components\unboundmemo\*.pas C:\Dropbox\Unbound-Bible\components\unboundmemo\

0 comments on commit 9d386b4

Please sign in to comment.