more formatting

git-svn-id: trunk@13787 -
This commit is contained in:
paul 2008-01-18 07:18:53 +00:00
parent d35b4c8417
commit e43001918b

View File

@ -2108,7 +2108,7 @@ end;
TWinControl AdjustClientRect TWinControl AdjustClientRect
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TWinControl.AdjustClientRect(var ARect: TRect); procedure TWinControl.AdjustClientRect(var ARect: TRect);
Begin begin
//Not used. It's a virtual procedure that should be overriden. //Not used. It's a virtual procedure that should be overriden.
end; end;
@ -3141,7 +3141,7 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl BroadCast TWinControl BroadCast
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.BroadCast(var ToAllMessage); procedure TWinControl.BroadCast(var ToAllMessage);
var var
I: Integer; I: Integer;
begin begin
@ -3174,7 +3174,7 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.CanFocus : Boolean; function TWinControl.CanFocus : Boolean;
var var
Control: TWinControl; Control: TWinControl;
Form: TCustomForm; Form: TCustomForm;
@ -3348,7 +3348,7 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl.CanTab TWinControl.CanTab
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.CanTab: Boolean; function TWinControl.CanTab: Boolean;
begin begin
Result := CanFocus and TWSWinControlClass(WidgetSetClass).CanFocus(Self); Result := CanFocus and TWSWinControlClass(WidgetSetClass).CanFocus(Self);
end; end;
@ -3367,7 +3367,7 @@ begin
[capfAllowWinControls,capfRecursive]); [capfAllowWinControls,capfRecursive]);
if TargetControl = nil then TargetControl := Self; if TargetControl = nil then TargetControl := Self;
{$IFDEF VerboseDrag} {$IFDEF VerboseDrag}
DebugLn('TWinControl.DoDragMsg dmFindTarget ',Name,':',ClassName,' End Result=',TargetControl.Name,':',TargetControl.ClassName); DebugLn('TWinControl.DoDragMsg dmFindTarget ',Name,':',ClassName,' end Result=',TargetControl.Name,':',TargetControl.ClassName);
{$ENDIF} {$ENDIF}
Result := LRESULT(TargetControl); Result := LRESULT(TargetControl);
end; end;
@ -3379,17 +3379,17 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl GetChildren TWinControl GetChildren
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.GetChildren(Proc: TGetChildProc; Root : TComponent); procedure TWinControl.GetChildren(Proc: TGetChildProc; Root : TComponent);
var var
I : Integer; I : Integer;
Control : TControl; Control : TControl;
Begin begin
for I := 0 to ControlCount-1 do for I := 0 to ControlCount-1 do
Begin begin
Control := Controls[i]; Control := Controls[i];
if Control.Owner = Root then Proc(Control); if Control.Owner = Root then Proc(Control);
end; end;
End; end;
{------------------------------------------------------------------------------- {-------------------------------------------------------------------------------
function TWinControl.ChildClassAllowed(ChildClass: TClass): boolean; function TWinControl.ChildClassAllowed(ChildClass: TClass): boolean;
@ -3530,7 +3530,7 @@ function TWinControl.GetControlOrigin: TPoint;
var var
AControl: TWinControl; AControl: TWinControl;
IntfBounds: TRect; IntfBounds: TRect;
Begin begin
if HandleAllocated then begin if HandleAllocated then begin
// get the interface idea where the client area is on the screen // get the interface idea where the client area is on the screen
LCLIntf.GetWindowRect(Handle,IntfBounds); LCLIntf.GetWindowRect(Handle,IntfBounds);
@ -3584,8 +3584,8 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl SetBorderWidth TWinControl SetBorderWidth
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.SetBorderWidth(value : TBorderWidth); procedure TWinControl.SetBorderWidth(value : TBorderWidth);
Begin begin
if FBorderWidth = Value then exit; if FBorderWidth = Value then exit;
FBorderWidth := Value; FBorderWidth := Value;
Invalidate; Invalidate;
@ -4055,15 +4055,15 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl GetTabOrderList TWinControl GetTabOrderList
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.GetTabOrderList(List: TFPList); procedure TWinControl.GetTabOrderList(List: TFPList);
var var
I : Integer; I : Integer;
lWinControl : TWinControl; lWinControl : TWinControl;
begin begin
If FTabList <> nil then if FTabList <> nil then
For I := 0 to FTabList.Count - 1 do begin for I := 0 to FTabList.Count - 1 do begin
lWinControl := TWinControl(FTabList[I]); lWinControl := TWinControl(FTabList[I]);
If lWinControl.CanTab and lWinControl.TabStop then if lWinControl.CanTab and lWinControl.TabStop then
List.Add(lWinControl); List.Add(lWinControl);
lWinControl.GetTabOrderList(List); lWinControl.GetTabOrderList(List);
end; end;
@ -4377,9 +4377,9 @@ end;
Searches a child (not grand child) control, which client area contains Pos. Searches a child (not grand child) control, which client area contains Pos.
Pos is relative to the ClientOrigin. Pos is relative to the ClientOrigin.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.ControlAtPos(const Pos : TPoint; function TWinControl.ControlAtPos(const Pos : TPoint;
AllowDisabled : Boolean): TControl; AllowDisabled : Boolean): TControl;
Begin begin
Result := ControlAtPos(Pos,AllowDisabled,false); Result := ControlAtPos(Pos,AllowDisabled,false);
end; end;
@ -4392,7 +4392,7 @@ end;
Searches a child (not grand child) control, which client area contains Pos. Searches a child (not grand child) control, which client area contains Pos.
Pos is relative to the ClientOrigin. Pos is relative to the ClientOrigin.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.ControlAtPos(const Pos : TPoint; function TWinControl.ControlAtPos(const Pos : TPoint;
AllowDisabled, AllowWinControls: Boolean): TControl; AllowDisabled, AllowWinControls: Boolean): TControl;
var var
Flags: TControlAtPosFlags; Flags: TControlAtPosFlags;
@ -4619,10 +4619,10 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl WndPRoc TWinControl WndPRoc
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.WndProc(Var Message: TLMessage); procedure TWinControl.WndProc(var Message: TLMessage);
Var var
Form: TCustomForm; Form: TCustomForm;
Begin begin
// Assert(False, Format('Trace:[TWinControl.WndPRoc] %s(%s) --> Message = %d', [ClassName, Name, Message.Msg])); // Assert(False, Format('Trace:[TWinControl.WndPRoc] %s(%s) --> Message = %d', [ClassName, Name, Message.Msg]));
case Message.Msg of case Message.Msg of
@ -4869,13 +4869,13 @@ begin
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Procedure TWinControl.MainWndProc(Var Message : TLMessage); procedure TWinControl.MainWndProc(var Message : TLMessage);
The message handler of this wincontrol. The message handler of this wincontrol.
Only needed by controls, which needs features not yet supported by the LCL. Only needed by controls, which needs features not yet supported by the LCL.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.MainWndProc(Var Msg: TLMessage); procedure TWinControl.MainWndProc(var Msg: TLMessage);
Begin begin
Assert(False, Format('Trace:[TWinControl.MainWndPRoc] %s(%s) --> Message = %d', [ClassName, Name, Msg.Msg])); Assert(False, Format('Trace:[TWinControl.MainWndPRoc] %s(%s) --> Message = %d', [ClassName, Name, Msg.Msg]));
end; end;
@ -4899,23 +4899,23 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl SetParentCtl3D TWinControl SetParentCtl3D
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.SetParentCtl3D(value : Boolean); procedure TWinControl.SetParentCtl3D(value : Boolean);
Begin begin
if FParentCtl3D <> Value then if FParentCtl3D <> Value then
Begin begin
FParentCtl3D := Value; FParentCtl3D := Value;
if FParent <> nil then if FParent <> nil then
Begin begin
// Sendmessage to do something? // Sendmessage to do something?
End; end;
end; end;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl KeyDown TWinControl KeyDown
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.KeyDown(var Key: Word; shift : TShiftState); procedure TWinControl.KeyDown(var Key: Word; shift : TShiftState);
Begin begin
if Assigned(FOnKeyDown) then FOnKeyDown(Self, Key, Shift); if Assigned(FOnKeyDown) then FOnKeyDown(Self, Key, Shift);
end; end;
@ -4939,7 +4939,7 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl KeyPress TWinControl KeyPress
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.KeyPress(var Key: char); procedure TWinControl.KeyPress(var Key: char);
begin begin
if Assigned(FOnKeyPress) then FOnKeyPress(Self, Key); if Assigned(FOnKeyPress) then FOnKeyPress(Self, Key);
end; end;
@ -4957,7 +4957,7 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl KeyUp TWinControl KeyUp
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.KeyUp(var Key: Word; Shift : TShiftState); procedure TWinControl.KeyUp(var Key: Word; Shift : TShiftState);
begin begin
if Assigned(FOnKeyUp) then FOnKeyUp(Self, Key, Shift); if Assigned(FOnKeyUp) then FOnKeyUp(Self, Key, Shift);
end; end;
@ -5018,7 +5018,7 @@ end;
returns true if handled returns true if handled
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TWinControl.DoKeyDownBeforeInterface(Var Message: TLMKey): Boolean; function TWinControl.DoKeyDownBeforeInterface(var Message: TLMKey): Boolean;
var var
F: TCustomForm; F: TCustomForm;
ShiftState: TShiftState; ShiftState: TShiftState;
@ -5155,7 +5155,7 @@ end;
Returns True if key handled Returns True if key handled
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.DoKeyPress(Var Message : TLMKey): Boolean; function TWinControl.DoKeyPress(var Message : TLMKey): Boolean;
var var
F: TCustomForm; F: TCustomForm;
C: char; C: char;
@ -5184,7 +5184,7 @@ begin
end; end;
Result := False; Result := False;
End; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl DoRemainingKeyPress TWinControl DoRemainingKeyPress
@ -5264,7 +5264,7 @@ end;
Returns True if key handled Returns True if key handled
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWinControl.DoKeyUpBeforeInterface(Var Message : TLMKey): Boolean; function TWinControl.DoKeyUpBeforeInterface(var Message : TLMKey): Boolean;
var var
F: TCustomForm; F: TCustomForm;
ShiftState: TShiftState; ShiftState: TShiftState;
@ -5358,8 +5358,8 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl Repaint TWinControl Repaint
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.Repaint; procedure TWinControl.Repaint;
Begin begin
if (not HandleAllocated) or (csDestroying in ComponentState) then exit; if (not HandleAllocated) or (csDestroying in ComponentState) then exit;
{$IFDEF VerboseDsgnPaintMsg} {$IFDEF VerboseDsgnPaintMsg}
if csDesigning in ComponentState then if csDesigning in ComponentState then
@ -5414,7 +5414,7 @@ end;
procedure TWinControl.Insert(AControl : TControl); procedure TWinControl.Insert(AControl : TControl);
begin begin
Insert(AControl,ControlCount); Insert(AControl,ControlCount);
End; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
procedure TWinControl.Insert(AControl: TControl; Index: integer); procedure TWinControl.Insert(AControl: TControl; Index: integer);
@ -5605,10 +5605,10 @@ end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl removeControl TWinControl removeControl
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.RemoveControl(AControl: TControl); procedure TWinControl.RemoveControl(AControl: TControl);
var var
AWinControl: TWinControl; AWinControl: TWinControl;
Begin begin
Perform(CM_CONTROLCHANGE, WParam(AControl), LParam(False)); Perform(CM_CONTROLCHANGE, WParam(AControl), LParam(False));
if AControl is TWinControl then begin if AControl is TWinControl then begin
AWinControl:=TWinControl(AControl); AWinControl:=TWinControl(AControl);
@ -5620,7 +5620,7 @@ Begin
Remove(AControl); Remove(AControl);
if not (csDestroying in ComponentState) then if not (csDestroying in ComponentState) then
Realign; Realign;
End; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
TWinControl AlignControl TWinControl AlignControl
@ -5671,7 +5671,7 @@ begin
for i:=0 to FWinControls.Count-1 do for i:=0 to FWinControls.Count-1 do
TWinControl(FWinControls[i]).RealizeBoundsRecursive; TWinControl(FWinControls[i]).RealizeBoundsRecursive;
end; end;
End; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TWinControl.ContainsControl Method: TWinControl.ContainsControl
@ -5947,8 +5947,8 @@ end;
SetFocus event handler SetFocus event handler
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.WMSetFocus(var Message: TLMSetFocus); procedure TWinControl.WMSetFocus(var Message: TLMSetFocus);
Begin begin
//DebugLn('TWinControl.WMSetFocus A ',Name,':',ClassName); //DebugLn('TWinControl.WMSetFocus A ',Name,':',ClassName);
Assert(False, Format('Trace: %s', [ClassName])); Assert(False, Format('Trace: %s', [ClassName]));
if [csLoading,csDestroying,csDesigning]*ComponentState=[] then begin if [csLoading,csDestroying,csDesigning]*ComponentState=[] then begin
@ -6273,7 +6273,7 @@ end;
event handler. event handler.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TWInControl.WMNotify(var Message: TLMNotify); procedure TWInControl.WMNotify(var Message: TLMNotify);
Begin begin
if not DoControlMsg(Message.NMHdr^.hwndfrom,Message) then exit; if not DoControlMsg(Message.NMHdr^.hwndfrom,Message) then exit;
//Inherited; //Inherited;
end; end;
@ -6335,7 +6335,7 @@ end;
event handler. event handler.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TWinControl.WMMouseWheel(var Message: TLMMouseEvent); procedure TWinControl.WMMouseWheel(var Message: TLMMouseEvent);
Var var
MousePos : TPoint; MousePos : TPoint;
begin begin
Assert(False, Format('Trace: [TWinControl.LMMouseWheel] %s', [ClassName])); Assert(False, Format('Trace: [TWinControl.LMMouseWheel] %s', [ClassName]));
@ -6372,7 +6372,7 @@ end;
Event handler for keys not handled by the interface Event handler for keys not handled by the interface
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.WMKeyDown(Var Message: TLMKeyDown); procedure TWinControl.WMKeyDown(var Message: TLMKeyDown);
begin begin
if DoRemainingKeyDown(Message) then if DoRemainingKeyDown(Message) then
Message.Result := 1; Message.Result := 1;
@ -6401,7 +6401,7 @@ end;
event handler. event handler.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Procedure TWinControl.WMKeyUp(Var Message: TLMKeyUp); procedure TWinControl.WMKeyUp(var Message: TLMKeyUp);
begin begin
//debugln('TWinControl.WMKeyUp ',DbgSName(Self)); //debugln('TWinControl.WMKeyUp ',DbgSName(Self));
if DoRemainingKeyUp(Message) then if DoRemainingKeyUp(Message) then
@ -6409,7 +6409,7 @@ begin
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Function: TWinControl.HandleAllocated function: TWinControl.HandleAllocated
Params: None Params: None
Returns: True is handle is allocated Returns: True is handle is allocated