NiceGrid: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8869 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
dafa0ba164
commit
792ce273a7
components/nicegrid
@ -67,8 +67,8 @@
|
||||
<Filename Value="C:\Lazarus\lazarus-main_fpc3.2.2\lcl\controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="234"/>
|
||||
<CursorPos X="3" Y="258"/>
|
||||
<TopLine Value="2446"/>
|
||||
<CursorPos X="15" Y="2463"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
@ -112,8 +112,8 @@
|
||||
<UnitName Value="NiceGrid"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="534"/>
|
||||
<CursorPos X="56" Y="558"/>
|
||||
<TopLine Value="307"/>
|
||||
<CursorPos X="52" Y="323"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit8>
|
||||
@ -161,124 +161,126 @@
|
||||
<Loaded Value="True"/>
|
||||
</Unit13>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<JumpHistory Count="30" HistoryIndex="28">
|
||||
<Position1>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1157" Column="24" TopLine="1126"/>
|
||||
<Caret Line="701" Column="11" TopLine="678"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1154" Column="21" TopLine="1154"/>
|
||||
<Filename Value="..\common\main.pas"/>
|
||||
<Caret Line="35" Column="7" TopLine="18"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Filename Value="..\..\..\source\nicegridreg.pas"/>
|
||||
<Caret Line="63" Column="9" TopLine="48"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="311" Column="27" TopLine="283"/>
|
||||
<Filename Value="..\..\..\source\nicegridreg.pas"/>
|
||||
<Caret Line="64" Column="14" TopLine="46"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1145" Column="33" TopLine="1115"/>
|
||||
<Caret Line="519" Column="43" TopLine="501"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1472" Column="3" TopLine="1447"/>
|
||||
<Caret Line="3711" Column="57" TopLine="3693"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1447" Column="22" TopLine="1447"/>
|
||||
<Caret Line="3684" Column="36" TopLine="3666"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="264" Column="3" TopLine="264"/>
|
||||
<Caret Line="290" Column="30" TopLine="274"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1505" Column="21" TopLine="1483"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="289" Column="24" TopLine="261"/>
|
||||
<Caret Line="1306" Column="74" TopLine="1292"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="300" Column="47" TopLine="272"/>
|
||||
<Caret Line="2786" Column="13" TopLine="2745"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="2927" TopLine="2895"/>
|
||||
<Caret Line="2696" Column="30" TopLine="2683"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\common\main.pas"/>
|
||||
<Caret Line="33" Column="22" TopLine="13"/>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="353" Column="15" TopLine="336"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="401" Column="23" TopLine="386"/>
|
||||
<Caret Line="415" Column="13" TopLine="412"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="695" Column="3" TopLine="679"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="701" Column="11" TopLine="678"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\common\main.pas"/>
|
||||
<Caret Line="35" Column="7" TopLine="18"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\..\..\source\nicegridreg.pas"/>
|
||||
<Caret Line="63" Column="9" TopLine="48"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\..\..\source\nicegridreg.pas"/>
|
||||
<Caret Line="64" Column="14" TopLine="46"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="519" Column="43" TopLine="501"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="3711" Column="57" TopLine="3693"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="3684" Column="36" TopLine="3666"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="290" Column="30" TopLine="274"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1505" Column="21" TopLine="1483"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="1306" Column="74" TopLine="1292"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="2786" Column="13" TopLine="2745"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="2696" Column="30" TopLine="2683"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="353" Column="15" TopLine="336"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\..\..\source\NiceGrid.pas"/>
|
||||
<Caret Line="415" Column="13" TopLine="412"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="642" Column="50" TopLine="625"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="563" Column="28" TopLine="534"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="3708" Column="29" TopLine="3680"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="522" Column="35" TopLine="504"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="3698" Column="3" TopLine="3680"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="3708" Column="58" TopLine="3691"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="3681" Column="36" TopLine="3663"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="290" Column="30" TopLine="274"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="1300" Column="57" TopLine="1283"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="1251" Column="57" TopLine="1226"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="1232" Column="59" TopLine="1213"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="1212" Column="59" TopLine="1194"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="1156" Column="16" TopLine="1144"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="699" Column="11" TopLine="677"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\..\..\source\nicegrid.pas"/>
|
||||
<Caret Line="323" Column="15" TopLine="307"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="C:\Lazarus\lazarus-main_fpc3.2.2\lcl\controls.pp"/>
|
||||
<Caret Line="2463" Column="15" TopLine="2446"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
|
@ -320,7 +320,7 @@ type
|
||||
procedure SetDefColWidth(Value: Integer);
|
||||
procedure SetDefRowHeight(Value: Integer);
|
||||
procedure SetFlat(Value: Boolean);
|
||||
procedure SetColor(Value: TColor);
|
||||
procedure SetColor(Value: TColor); reintroduce;
|
||||
procedure SetAlternateColor(Value: TColor);
|
||||
procedure SetGridColor(Value: TColor);
|
||||
procedure SetShowGrid(Value: Boolean);
|
||||
@ -692,7 +692,11 @@ end;
|
||||
procedure TNiceGrid.SetScrollBar(AKind, AMax, APos, AMask: Integer);
|
||||
var Info: TScrollInfo;
|
||||
begin
|
||||
{$IFDEF FPC}
|
||||
Info := Default(TScrollInfo);
|
||||
{$ELSE}
|
||||
FillChar(Info, SizeOf(TScrollInfo), 0);
|
||||
{$ENDIF}
|
||||
Info.cbSize := SizeOf(TScrollInfo);
|
||||
Info.nMin := 0;
|
||||
Info.nMax := AMax;
|
||||
@ -1153,12 +1157,13 @@ var
|
||||
begin
|
||||
if (FGutterKind = gkNone)
|
||||
then Exit;
|
||||
CopyRect(GutterBox, CellBox);
|
||||
GutterBox := CellBox;
|
||||
GutterBox.Left := 0;
|
||||
for x := 0 to FRowCount-1 do
|
||||
begin
|
||||
R := Rect(-1, (x * FDefRowHeight) - 1, FGutterWidth, ((x + 1) * FDefRowHeight));
|
||||
OffsetRect(R, 0, -FVertOffset + FixedHeight);
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, R, GutterBox) then
|
||||
begin
|
||||
case FGutterKind of
|
||||
@ -1209,6 +1214,7 @@ begin
|
||||
FDefRowHeight * (P^.Rc.Bottom + 1)
|
||||
);
|
||||
OffsetRect(R, -FHorzOffset + FixedWidth, 0);
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, R, ClientRect)
|
||||
then DrawFixCell(R, P^.Str, FHeaderFont, FOnDrawHeader);
|
||||
end;
|
||||
@ -1229,6 +1235,7 @@ begin
|
||||
begin
|
||||
R := Rect(GetColCoord(x)-1, FooterTop, GetColCoord(x+1), FooterBottom);
|
||||
OffsetRect(R, -FHorzOffset + FixedWidth, 0);
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, R, ClientRect)
|
||||
then DrawFixCell(R, FColumns[x].FFooter, FFooterFont, FOnDrawFooter);
|
||||
end;
|
||||
@ -1241,14 +1248,14 @@ end;
|
||||
|
||||
procedure TNiceGrid.DrawCell(X, Y: Integer);
|
||||
var
|
||||
R, Rc, Dummy: TRect;
|
||||
Rc, Dummy: TRect;
|
||||
Column: TNiceColumn;
|
||||
Handled: Boolean;
|
||||
begin
|
||||
Handled := False;
|
||||
Rc := GetCellRect(x, y);
|
||||
OffsetRect(Rc, -FHorzOffset + FixedWidth, -FVertOffset + FixedHeight);
|
||||
R := Rc;
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, Rc, CellBox) then
|
||||
begin
|
||||
Column := FColumns[x];
|
||||
@ -1297,6 +1304,7 @@ begin
|
||||
Result := Point(-1, -1);
|
||||
R := GetCellRect(x, y);
|
||||
OffsetRect(R, -FHorzOffset + FixedWidth, -FVertOffset + FixedHeight);
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, R, CellBox) then
|
||||
begin
|
||||
Column := FColumns[x];
|
||||
@ -3678,7 +3686,7 @@ var
|
||||
begin
|
||||
for x := 0 to Mergeds.Count-1 do
|
||||
begin
|
||||
CopyRect(Rc, TMergeCell(Mergeds[x]).Rc);
|
||||
Rc := TMergeCell(Mergeds[x]).Rc;
|
||||
for y := Rc.Left to Rc.Right do
|
||||
begin
|
||||
if (y >= FColumns.Count)
|
||||
@ -3695,7 +3703,7 @@ end;
|
||||
procedure TNiceGrid.DrawMergedCell(Index: Integer);
|
||||
var
|
||||
Data: TMergeCell;
|
||||
R, Rc, Dummy: TRect;
|
||||
Rc, Dummy: TRect;
|
||||
l1, l2, t, h: Integer;
|
||||
begin
|
||||
Data := TMergeCell(Mergeds[Index]);
|
||||
@ -3705,7 +3713,7 @@ begin
|
||||
h := FDefRowHeight * (Data.Rc.Bottom - Data.Rc.Top + 1);
|
||||
Rc := Rect(l1-1, t-1, l2, t+h);
|
||||
OffsetRect(Rc, -FHorzOffset + FixedWidth, -FVertOffset + FixedHeight);
|
||||
R := Rc;
|
||||
Dummy := Rect(0, 0, 0, 0); // to silence the compiler
|
||||
if IntersectRect(Dummy, Rc, CellBox) then
|
||||
begin
|
||||
with Canvas do
|
||||
|
Loading…
Reference in New Issue
Block a user