LCL: fixed wrong IFDEF DisableLoadedClientSize

git-svn-id: trunk@12944 -
This commit is contained in:
mattias 2007-11-21 01:05:36 +00:00
parent e21cad7e75
commit 1e96af5fb0
5 changed files with 37 additions and 37 deletions

View File

@ -111,6 +111,9 @@ type
function GetFPDocNode(Tool: TCodeTool; CodeNode: TCodeTreeNode; Complete: boolean;
out FPDocFile: TLazFPDocFile; out DOMNode: TDOMNode;
out CacheWasUsed: boolean): TLazDocParseResult;
function GetDeclarationChain(Code: TCodeBuffer; X, Y: integer;
out ListOfPCodeXYPosition: TFPList;
out CacheWasUsed: boolean): TLazDocParseResult;
public
// Event lists
procedure RemoveAllHandlersOfObject(AnObject: TObject);
@ -503,6 +506,18 @@ begin
Result:=ldprSuccess;
end;
function TLazDocManager.GetDeclarationChain(Code: TCodeBuffer; X, Y: integer;
out ListOfPCodeXYPosition: TFPList; out CacheWasUsed: boolean
): TLazDocParseResult;
begin
if FDeclarationCache.FindDeclarations(Code,X,Y,ListOfPCodeXYPosition,
CacheWasUsed)
then
Result:=ldprSuccess;
else
Result:=ldprFailed;
end;
procedure TLazDocManager.FreeDocs;
var
AVLNode: TAvgLvlTreeNode;

View File

@ -1561,8 +1561,6 @@ type
function GetTabOrder: TTabOrder;
function GetVisibleDockClientCount: Integer;
procedure SetChildSizing(const AValue: TControlChildSizing);
procedure SetClientHeight(const AValue: Integer);
procedure SetClientWidth(const AValue: Integer);
procedure SetDockSite(const NewDockSite: Boolean);
procedure SetHandle(NewHandle: HWND);
procedure SetBorderWidth(Value: TBorderWidth);

View File

@ -2250,7 +2250,7 @@ end;
procedure TControl.SetClientHeight(Value: Integer);
begin
if csLoading in ComponentState then begin
{$IFDEF DisableLoadedClientSize}
{$IFNDEF DisableLoadedClientSize}
FLoadedClientSize.Y:=Value;
Include(FControlFlags,cfClientHeightLoaded);
{$ENDIF}
@ -2280,7 +2280,7 @@ end;
procedure TControl.SetClientWidth(Value: Integer);
begin
if csLoading in ComponentState then begin
{$IFDEF DisableLoadedClientSize}
{$IFNDEF DisableLoadedClientSize}
FLoadedClientSize.X:=Value;
Include(FControlFlags,cfClientWidthLoaded);
{$ENDIF}
@ -2841,14 +2841,13 @@ begin
then exit;
//if csDesigning in ComponentState then
{$IFDEF CHECK_POSITION}
if CheckPosition(Self) then begin
if CheckPosition(Self) then
DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
' OldBounds='+dbgs(FBaseBounds),
' OldClientSize='+dbgs(FBaseParentClientSize),
' NewBounds='+dbgs(NewBaseBounds),
' NewClientSize='+dbgs(NewBaseParentClientSize),
'']);
end;
{$ENDIF}
FBaseBounds:=NewBaseBounds;
Include(FControlFlags,cfBaseBoundsValid);

View File

@ -31,7 +31,7 @@
{off $DEFINE CHECK_POSITION}
{$IFDEF CHECK_POSITION}
const CheckPostionClassName = 'xxTPage';
const CheckPostionName = 'xxxBakProjTypeRadioGroup';
const CheckPostionName = 'Edit2';
const CheckPostionParentName = 'EnvVarsPage';
function CheckPosition(AControl: TControl): boolean;
@ -2692,7 +2692,7 @@ var
I: Integer;
Control: TControl;
begin
//DebugLn(['DoAlign ',DbgSName(Self),' ',dbgs(ClientRect)]);
//DebugLn(['DoAlign ',DbgSName(Self),' ',dbgs(AALign),' ClientRect=',dbgs(ClientRect),' ControlCount=',ControlCount]);
CreateControlAlignList(AAlign,AlignList,AControl);
{$IFDEF CHECK_POSITION}
if CheckPosition(Self) then
@ -2754,25 +2754,23 @@ var
begin
if wcfAligningControls in FWinControlFlags then exit;
Include(FWinControlFlags,wcfAligningControls);
//debugln('TWinControl.AlignControls ',DbgSName(Self));
// call delayed autosize
for i:=ControlCount-1 downto 0 do begin
ChildControl:=Controls[i];
if cfAutoSizeNeeded in ChildControl.FControlFlags then begin
//DebugLn(['TWinControl.AlignControls ',DbgSName(Self),' autosize needed for child ',DbgSName(ChildControl)]);
ChildControl.AdjustSize;
end;
end;
// unset all align needed flags
Exclude(FWinControlFlags,wcfReAlignNeeded);
for i:=ControlCount-1 downto 0 do begin
ChildControl:=Controls[i];
Exclude(ChildControl.FControlFlags,cfRequestAlignNeeded);
end;
try
// call delayed autosize
for i:=ControlCount-1 downto 0 do begin
ChildControl:=Controls[i];
if cfAutoSizeNeeded in ChildControl.FControlFlags then begin
//DebugLn(['TWinControl.AlignControls ',DbgSName(Self),' autosize needed for child ',DbgSName(ChildControl)]);
ChildControl.AdjustSize;
end;
end;
// unset all align needed flags
Exclude(FWinControlFlags,wcfReAlignNeeded);
for i:=ControlCount-1 downto 0 do begin
ChildControl:=Controls[i];
Exclude(ChildControl.FControlFlags,cfRequestAlignNeeded);
end;
//if csDesigning in ComponentState then begin
//DebugLn('[TWinControl.AlignControls] ',Name,':',Classname,' ',Left,',',Top,',',Width,',',Height,' AlignWork=',NeedAlignWork,' ControlCount=',ControlCount);
//if AControl<>nil then DebugLn(' AControl=',AControl.Name,':',AControl.ClassName);
@ -6888,16 +6886,6 @@ begin
FChildSizing.Assign(AValue);
end;
procedure TWinControl.SetClientHeight(const AValue: Integer);
begin
end;
procedure TWinControl.SetClientWidth(const AValue: Integer);
begin
end;
{------------------------------------------------------------------------------
procedure TWinControl.SetDockSite(const NewDockSite: Boolean);
------------------------------------------------------------------------------}

View File

@ -2183,7 +2183,7 @@ begin
if (lWinControl is TCustomPage)
and (lWinControl.Parent is TCustomNotebook) then
begin
// the TPage size is the ClientRect size of the parent
// the TCustomPage size is the ClientRect size of the parent
// => invalidate the Parent.ClientRect
lWinControl.Parent.InvalidateClientRectCache(false);
end;