From 1e96af5fb0921ddb518e3a11eda88661bd0739fc Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 21 Nov 2007 01:05:36 +0000 Subject: [PATCH] LCL: fixed wrong IFDEF DisableLoadedClientSize git-svn-id: trunk@12944 - --- ide/lazdoc.pas | 15 ++++++++ lcl/controls.pp | 2 -- lcl/include/control.inc | 7 ++-- lcl/include/wincontrol.inc | 48 ++++++++++---------------- lcl/interfaces/win32/win32callback.inc | 2 +- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/ide/lazdoc.pas b/ide/lazdoc.pas index 2d67923d75..dc2b5e3993 100644 --- a/ide/lazdoc.pas +++ b/ide/lazdoc.pas @@ -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; diff --git a/lcl/controls.pp b/lcl/controls.pp index 5aa8b8e8d9..d59cdd03b8 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -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); diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 54c8d481a6..f8e7e396a1 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -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); diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index 0f392952d0..6c3a9acc6d 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -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); ------------------------------------------------------------------------------} diff --git a/lcl/interfaces/win32/win32callback.inc b/lcl/interfaces/win32/win32callback.inc index 951adb8494..75816d62a4 100644 --- a/lcl/interfaces/win32/win32callback.inc +++ b/lcl/interfaces/win32/win32callback.inc @@ -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;