mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 19:48:21 +02:00
checkbox mask works, scrollbox still not
This commit is contained in:
parent
cd39b27205
commit
e0c894b848
@ -161,10 +161,10 @@ program install;
|
||||
defsetpath : tcfgarray;
|
||||
end;
|
||||
|
||||
datarec=packed record
|
||||
datarec=record
|
||||
basepath : DirStr;
|
||||
cfgval : word;
|
||||
packmask : array[1..maxpacks] of word;
|
||||
packmask : array[1..maxpacks] of sw_word;
|
||||
end;
|
||||
|
||||
punzipdialog=^tunzipdialog;
|
||||
@ -1123,9 +1123,9 @@ program install;
|
||||
if not(haslfn(zipfile)) then
|
||||
begin
|
||||
items[j]:=newsitem(package[i].name+diskspacestr(package[i].diskspace),items[j]);
|
||||
packmask[j]:=packmask[j] or packagemask(i);
|
||||
packmask[j]:=packmask[j] or packagemask(i);
|
||||
enabmask[j]:=enabmask[j] or packagemask(i);
|
||||
firstitem[j]:=i;
|
||||
firstitem[j]:=i-1;
|
||||
if createlog then
|
||||
writeln(log,'Checking lfn usage for ',zipfile,' ... no lfn');
|
||||
end
|
||||
@ -1133,7 +1133,7 @@ program install;
|
||||
begin
|
||||
items[j]:=newsitem(package[i].name+' (requires LFN support)',items[j]);
|
||||
enabmask[j]:=enabmask[j] or packagemask(i);
|
||||
firstitem[j]:=i;
|
||||
firstitem[j]:=i-1;
|
||||
if createlog then
|
||||
writeln(log,'Checking lfn usage for ',zipfile,' ... uses lfn');
|
||||
end;
|
||||
@ -1143,8 +1143,8 @@ program install;
|
||||
begin
|
||||
items[j]:=newsitem(package[i].name+diskspacestr(package[i].diskspace),items[j]);
|
||||
packmask[j]:=packmask[j] or packagemask(i);
|
||||
enabmask[j]:=enabmask[j] or packagemask(i);
|
||||
firstitem[j]:=i;
|
||||
enabmask[j]:=enabmask[j] or packagemask(i);
|
||||
firstitem[j]:=i-1;
|
||||
end;
|
||||
end
|
||||
else
|
||||
@ -1207,10 +1207,10 @@ program install;
|
||||
if R.A.Y+cfg.pack[j].packages>R.B.Y then
|
||||
R.B.Y:=R.A.Y+cfg.pack[j].packages;
|
||||
new(packcbs[j],init(r,items[j]));
|
||||
if data.packmask[j]=$ffff then
|
||||
if data.packmask[j]=high(sw_word) then
|
||||
data.packmask[j]:=packmask[j];
|
||||
packcbs[j]^.enablemask:={$ifdef DEV}$7fffffff{$else}enabmask[j]{$endif};
|
||||
packcbs[j]^.movedto(firstitem[j]);
|
||||
packcbs[j]^.sel:=firstitem[j];
|
||||
end;
|
||||
|
||||
{--------- Main ---------}
|
||||
@ -1337,7 +1337,7 @@ end;
|
||||
data.basepath:=cfg.basepath;
|
||||
data.cfgval:=0;
|
||||
for j:=1 to cfg.packs do
|
||||
data.packmask[j]:=$ffff;
|
||||
data.packmask[j]:=high(sw_word);
|
||||
|
||||
repeat
|
||||
{ select components }
|
||||
@ -1995,7 +1995,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 2004-12-20 18:27:00 peter
|
||||
Revision 1.22 2004-12-21 18:52:31 peter
|
||||
checkbox mask works, scrollbox still not
|
||||
|
||||
Revision 1.21 2004/12/20 18:27:00 peter
|
||||
* win32 fixes
|
||||
|
||||
Revision 1.20 2004/12/18 16:19:57 peter
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
$Id$
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2000 by B‚rczi, G bor
|
||||
Copyright (c) 2000 by B'rczi, Gÿbor
|
||||
member of the Free Pascal development team
|
||||
|
||||
Support objects for the install program
|
||||
@ -148,10 +148,10 @@ begin
|
||||
end;
|
||||
|
||||
procedure TScrollBox.ShiftViews(DX,DY: sw_integer);
|
||||
procedure DoShift(P: PView); {$ifndef FPC}far;{$endif}
|
||||
begin
|
||||
P^.MoveTo(P^.Origin.X+DX,P^.Origin.Y+DY);
|
||||
end;
|
||||
procedure DoShift(P: PView);
|
||||
begin
|
||||
P^.MoveTo(P^.Origin.X+DX,P^.Origin.Y+DY);
|
||||
end;
|
||||
begin
|
||||
ForEach(@DoShift);
|
||||
end;
|
||||
@ -197,12 +197,19 @@ var V: PView;
|
||||
begin
|
||||
V:=Current;
|
||||
if (not Assigned(V)) then Exit;
|
||||
P.X:=V^.Origin.X+V^.Cursor.X; P.Y:=V^.Origin.Y+V^.Cursor.Y;
|
||||
P.X:=V^.Origin.X+V^.Cursor.X;
|
||||
P.Y:=V^.Origin.Y+V^.Cursor.Y;
|
||||
ND:=Delta;
|
||||
if (P.X<0) then Dec(ND.X,-P.X) else
|
||||
if (P.X>=Size.X) then Inc(ND.X,P.X-(Size.X-1));
|
||||
if (P.Y<0) then Dec(ND.Y,-P.Y) else
|
||||
if (P.Y>=Size.Y) then Inc(ND.Y,P.Y-(Size.Y-1));
|
||||
if (P.X<0) then
|
||||
Dec(ND.X,-P.X)
|
||||
else
|
||||
if (P.X>=Size.X) then
|
||||
Inc(ND.X,P.X-(Size.X-1));
|
||||
if (P.Y<0) then
|
||||
Dec(ND.Y,-P.Y)
|
||||
else
|
||||
if (P.Y>=Size.Y) then
|
||||
Inc(ND.Y,P.Y-(Size.Y-1));
|
||||
if (ND.X<>Delta.X) or (ND.Y<>Delta.Y) then
|
||||
ScrollTo(ND.X,ND.Y);
|
||||
end;
|
||||
@ -236,13 +243,18 @@ end;
|
||||
|
||||
procedure TScrollBox.UpdateLimits;
|
||||
var Max: TPoint;
|
||||
procedure Check(P: PView); {$ifndef FPC}far;{$endif}
|
||||
var O: TPoint;
|
||||
begin
|
||||
O.X:=P^.Origin.X+P^.Size.X+Delta.X; O.Y:=P^.Origin.Y+P^.Size.Y+Delta.Y;
|
||||
if O.X>Max.X then Max.X:=O.X;
|
||||
if O.Y>Max.Y then Max.Y:=O.Y;
|
||||
end;
|
||||
|
||||
procedure Check(P: PView);
|
||||
var O: TPoint;
|
||||
begin
|
||||
O.X:=P^.Origin.X+P^.Size.X+Delta.X;
|
||||
O.Y:=P^.Origin.Y+P^.Size.Y+Delta.Y;
|
||||
if O.X>Max.X then
|
||||
Max.X:=O.X;
|
||||
if O.Y>Max.Y then
|
||||
Max.Y:=O.Y;
|
||||
end;
|
||||
|
||||
begin
|
||||
Max.X:=0; Max.Y:=0;
|
||||
ForEach(@Check);
|
||||
@ -253,7 +265,10 @@ end;
|
||||
END.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2004-12-20 18:27:00 peter
|
||||
Revision 1.5 2004-12-21 18:52:31 peter
|
||||
checkbox mask works, scrollbox still not
|
||||
|
||||
Revision 1.4 2004/12/20 18:27:00 peter
|
||||
* win32 fixes
|
||||
|
||||
Revision 1.3 2002/09/07 15:40:59 peter
|
||||
|
Loading…
Reference in New Issue
Block a user