added notification method CNPreferredSizeChanged

git-svn-id: trunk@7281 -
This commit is contained in:
mattias 2005-06-25 14:17:57 +00:00
parent 42bb427048
commit fd711c2600
4 changed files with 21 additions and 3 deletions

View File

@ -8,7 +8,10 @@ Coding style:
- Try to avoid unit circles. This makes it easier to navigate and when unit is
growing allows to split it.
- Minimize the number of calls from Interfaces to LCL, when performing an
action requested by the LCL.
action requested by the LCL. The interfaces only notify the LCL, never forces
something. The LCL decides.
Naming convention:
Notifications for TControl decendants should be named CNxxx.
- All code must work with all checks (range, io, overflow, stack) on. Beside
that this helps debugging, some users put these checks into their fpc.cfg, so
they are applied to whole lazarus. Including packages and examples.

View File

@ -1049,6 +1049,7 @@ type
Lock: boolean); virtual;
procedure GetPreferredSize(var PreferredWidth, PreferredHeight: integer;
Raw: boolean); virtual;
procedure CNPreferredSizeChanged;
procedure InvalidatePreferredSize; virtual;
public
constructor Create(TheOwner: TComponent);override;
@ -2911,6 +2912,9 @@ end.
{ =============================================================================
$Log$
Revision 1.300 2005/06/25 14:17:57 mattias
added notification method CNPreferredSizeChanged
Revision 1.299 2005/06/22 17:37:06 mattias
implemented TMouse.SetCursorPos from Andrew

View File

@ -3460,9 +3460,14 @@ begin
end;
end;
procedure TControl.CNPreferredSizeChanged;
begin
InvalidatePreferredSize;
end;
{------------------------------------------------------------------------------
procedure TControl.InvalidatePreferredSize;
Invalidate the cache of the preferred size of this and all parent controls.
------------------------------------------------------------------------------}
procedure TControl.InvalidatePreferredSize;
@ -3536,6 +3541,9 @@ end;
{ =============================================================================
$Log$
Revision 1.260 2005/06/25 14:17:57 mattias
added notification method CNPreferredSizeChanged
Revision 1.259 2005/06/22 23:04:44 mattias
implemented default height for gtk TStatusBar and set TStatusBar.AutoSize to true

View File

@ -232,7 +232,7 @@ begin
end;
if TheWinControl<>nil then begin
TheWinControl.InvalidatePreferredSize;
TheWinControl.CNPreferredSizeChanged;
SetCursor(TheWinControl, crDefault);
ConnectInternalWidgetsSignals(MainWidget,TheWinControl);
UpdateWidgetStyleOfControl(TheWinControl);
@ -2986,6 +2986,9 @@ end;
{ =============================================================================
$Log$
Revision 1.280 2005/06/25 14:17:57 mattias
added notification method CNPreferredSizeChanged
Revision 1.279 2005/06/03 20:58:23 mattias
fixed focussing modal forms on gtk intf