parent
9203ab6a08
commit
3b568e2664
|
|
@ -887,6 +887,62 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||||
paintlinestext(RC,FirstLine,LastLine,FirstCol,LastCol);
|
paintlinestext(RC,FirstLine,LastLine,FirstCol,LastCol);
|
||||||
end
|
end
|
||||||
function DrawLongString(cvs,dtx,tl,r,rnzf);
|
function DrawLongString(cvs,dtx,tl,r,rnzf);
|
||||||
|
begin
|
||||||
|
if tl<1 then return ;
|
||||||
|
bt := 0;
|
||||||
|
ft := cvs.Font;
|
||||||
|
if rnzf>tl then
|
||||||
|
begin
|
||||||
|
qmzfs := 1;
|
||||||
|
ct := tl-1;
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
qmzfs := max(1,integer((0-r[0])/FCharWidth));
|
||||||
|
if qmzfs>3 and qmzfs<tl then
|
||||||
|
begin
|
||||||
|
if bytetype(dtx,qmzfs)=2 then qmzfs -= 1;
|
||||||
|
end
|
||||||
|
ct := min(tl-qmzfs+1,rnzf);
|
||||||
|
end
|
||||||
|
idx := qmzfs;
|
||||||
|
nqmzfs := qmzfs+ct;
|
||||||
|
qgqy := array((qmzfs,bt));
|
||||||
|
lqgqy := 1;
|
||||||
|
while idx<=(nqmzfs) do
|
||||||
|
begin
|
||||||
|
nbt := bytetype(dtx,i)?1:0;
|
||||||
|
if nbt<>bt then
|
||||||
|
begin
|
||||||
|
qgqy[lqgqy++] := array(idx,nbt);
|
||||||
|
bt := nbt;
|
||||||
|
end
|
||||||
|
idx++;
|
||||||
|
end
|
||||||
|
qgqy[lqgqy] := array(nqmzfs+1,bt);
|
||||||
|
bn := ft.charset ;
|
||||||
|
for i:= 0 to lqgqy-1 do
|
||||||
|
begin
|
||||||
|
ks := qgqy[i][0];
|
||||||
|
jz := qgqy[i+1][0];
|
||||||
|
ct := jz-ks;
|
||||||
|
if ct then
|
||||||
|
begin
|
||||||
|
r2 := r;
|
||||||
|
|
||||||
|
dtx2 := copy(dtx,ks,ct);
|
||||||
|
r2[0]+=(ks-1)* FCharWidth;
|
||||||
|
r2[2]:= r2[0]+ct * FCharWidth;
|
||||||
|
if qgqy[i][1] then
|
||||||
|
begin
|
||||||
|
ft.charset := 134;
|
||||||
|
end else
|
||||||
|
ft.charset := bn;
|
||||||
|
cvs.DrawText(dtx2,r2,DT_NOPREFIX);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
ft.charset := bn;
|
||||||
|
end
|
||||||
|
{function DrawLongString2(cvs,dtx,tl,r,rnzf);
|
||||||
begin
|
begin
|
||||||
bn := 100000;
|
bn := 100000;
|
||||||
ft := cvs.Font;
|
ft := cvs.Font;
|
||||||
|
|
@ -928,7 +984,8 @@ type TCustomMemo = class(TCustomScrollControl,TCustomMemoCmd) //
|
||||||
begin
|
begin
|
||||||
ft.charset := bn;
|
ft.charset := bn;
|
||||||
end
|
end
|
||||||
end
|
end}
|
||||||
|
|
||||||
function paintlinestext(RC,FirstLine,LastLine,FirstCol,LastCol);virtual;
|
function paintlinestext(RC,FirstLine,LastLine,FirstCol,LastCol);virtual;
|
||||||
begin
|
begin
|
||||||
cvs := canvas;
|
cvs := canvas;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue