checkbox mask works, scrollbox still not

This commit is contained in:
peter 2004-12-21 18:52:31 +00:00
parent cd39b27205
commit e0c894b848
2 changed files with 47 additions and 29 deletions

View File

@ -161,10 +161,10 @@ program install;
defsetpath : tcfgarray; defsetpath : tcfgarray;
end; end;
datarec=packed record datarec=record
basepath : DirStr; basepath : DirStr;
cfgval : word; cfgval : word;
packmask : array[1..maxpacks] of word; packmask : array[1..maxpacks] of sw_word;
end; end;
punzipdialog=^tunzipdialog; punzipdialog=^tunzipdialog;
@ -1123,9 +1123,9 @@ program install;
if not(haslfn(zipfile)) then if not(haslfn(zipfile)) then
begin begin
items[j]:=newsitem(package[i].name+diskspacestr(package[i].diskspace),items[j]); 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); enabmask[j]:=enabmask[j] or packagemask(i);
firstitem[j]:=i; firstitem[j]:=i-1;
if createlog then if createlog then
writeln(log,'Checking lfn usage for ',zipfile,' ... no lfn'); writeln(log,'Checking lfn usage for ',zipfile,' ... no lfn');
end end
@ -1133,7 +1133,7 @@ program install;
begin begin
items[j]:=newsitem(package[i].name+' (requires LFN support)',items[j]); items[j]:=newsitem(package[i].name+' (requires LFN support)',items[j]);
enabmask[j]:=enabmask[j] or packagemask(i); enabmask[j]:=enabmask[j] or packagemask(i);
firstitem[j]:=i; firstitem[j]:=i-1;
if createlog then if createlog then
writeln(log,'Checking lfn usage for ',zipfile,' ... uses lfn'); writeln(log,'Checking lfn usage for ',zipfile,' ... uses lfn');
end; end;
@ -1143,8 +1143,8 @@ program install;
begin begin
items[j]:=newsitem(package[i].name+diskspacestr(package[i].diskspace),items[j]); 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); enabmask[j]:=enabmask[j] or packagemask(i);
firstitem[j]:=i; firstitem[j]:=i-1;
end; end;
end end
else else
@ -1207,10 +1207,10 @@ program install;
if R.A.Y+cfg.pack[j].packages>R.B.Y then if R.A.Y+cfg.pack[j].packages>R.B.Y then
R.B.Y:=R.A.Y+cfg.pack[j].packages; R.B.Y:=R.A.Y+cfg.pack[j].packages;
new(packcbs[j],init(r,items[j])); 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]; data.packmask[j]:=packmask[j];
packcbs[j]^.enablemask:={$ifdef DEV}$7fffffff{$else}enabmask[j]{$endif}; packcbs[j]^.enablemask:={$ifdef DEV}$7fffffff{$else}enabmask[j]{$endif};
packcbs[j]^.movedto(firstitem[j]); packcbs[j]^.sel:=firstitem[j];
end; end;
{--------- Main ---------} {--------- Main ---------}
@ -1337,7 +1337,7 @@ end;
data.basepath:=cfg.basepath; data.basepath:=cfg.basepath;
data.cfgval:=0; data.cfgval:=0;
for j:=1 to cfg.packs do for j:=1 to cfg.packs do
data.packmask[j]:=$ffff; data.packmask[j]:=high(sw_word);
repeat repeat
{ select components } { select components }
@ -1995,7 +1995,10 @@ begin
end. end.
{ {
$Log$ $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 * win32 fixes
Revision 1.20 2004/12/18 16:19:57 peter Revision 1.20 2004/12/18 16:19:57 peter

View File

@ -1,7 +1,7 @@
{ {
$Id$ $Id$
This file is part of the Free Pascal run time library. This file is part of the Free Pascal run time library.
Copyright (c) 2000 by Brczi, G bor Copyright (c) 2000 by B'rczi, Gÿbor
member of the Free Pascal development team member of the Free Pascal development team
Support objects for the install program Support objects for the install program
@ -148,10 +148,10 @@ begin
end; end;
procedure TScrollBox.ShiftViews(DX,DY: sw_integer); procedure TScrollBox.ShiftViews(DX,DY: sw_integer);
procedure DoShift(P: PView); {$ifndef FPC}far;{$endif} procedure DoShift(P: PView);
begin begin
P^.MoveTo(P^.Origin.X+DX,P^.Origin.Y+DY); P^.MoveTo(P^.Origin.X+DX,P^.Origin.Y+DY);
end; end;
begin begin
ForEach(@DoShift); ForEach(@DoShift);
end; end;
@ -197,12 +197,19 @@ var V: PView;
begin begin
V:=Current; V:=Current;
if (not Assigned(V)) then Exit; 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; ND:=Delta;
if (P.X<0) then Dec(ND.X,-P.X) else if (P.X<0) then
if (P.X>=Size.X) then Inc(ND.X,P.X-(Size.X-1)); Dec(ND.X,-P.X)
if (P.Y<0) then Dec(ND.Y,-P.Y) else else
if (P.Y>=Size.Y) then Inc(ND.Y,P.Y-(Size.Y-1)); 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 if (ND.X<>Delta.X) or (ND.Y<>Delta.Y) then
ScrollTo(ND.X,ND.Y); ScrollTo(ND.X,ND.Y);
end; end;
@ -236,13 +243,18 @@ end;
procedure TScrollBox.UpdateLimits; procedure TScrollBox.UpdateLimits;
var Max: TPoint; var Max: TPoint;
procedure Check(P: PView); {$ifndef FPC}far;{$endif}
var O: TPoint; procedure Check(P: PView);
begin var O: TPoint;
O.X:=P^.Origin.X+P^.Size.X+Delta.X; O.Y:=P^.Origin.Y+P^.Size.Y+Delta.Y; begin
if O.X>Max.X then Max.X:=O.X; O.X:=P^.Origin.X+P^.Size.X+Delta.X;
if O.Y>Max.Y then Max.Y:=O.Y; O.Y:=P^.Origin.Y+P^.Size.Y+Delta.Y;
end; if O.X>Max.X then
Max.X:=O.X;
if O.Y>Max.Y then
Max.Y:=O.Y;
end;
begin begin
Max.X:=0; Max.Y:=0; Max.X:=0; Max.Y:=0;
ForEach(@Check); ForEach(@Check);
@ -253,7 +265,10 @@ end;
END. END.
{ {
$Log$ $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 * win32 fixes
Revision 1.3 2002/09/07 15:40:59 peter Revision 1.3 2002/09/07 15:40:59 peter