mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 10:39:09 +02:00
added notification method CNPreferredSizeChanged
git-svn-id: trunk@7281 -
This commit is contained in:
parent
42bb427048
commit
fd711c2600
@ -8,7 +8,10 @@ Coding style:
|
|||||||
- Try to avoid unit circles. This makes it easier to navigate and when unit is
|
- Try to avoid unit circles. This makes it easier to navigate and when unit is
|
||||||
growing allows to split it.
|
growing allows to split it.
|
||||||
- Minimize the number of calls from Interfaces to LCL, when performing an
|
- 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
|
- 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
|
that this helps debugging, some users put these checks into their fpc.cfg, so
|
||||||
they are applied to whole lazarus. Including packages and examples.
|
they are applied to whole lazarus. Including packages and examples.
|
||||||
|
@ -1049,6 +1049,7 @@ type
|
|||||||
Lock: boolean); virtual;
|
Lock: boolean); virtual;
|
||||||
procedure GetPreferredSize(var PreferredWidth, PreferredHeight: integer;
|
procedure GetPreferredSize(var PreferredWidth, PreferredHeight: integer;
|
||||||
Raw: boolean); virtual;
|
Raw: boolean); virtual;
|
||||||
|
procedure CNPreferredSizeChanged;
|
||||||
procedure InvalidatePreferredSize; virtual;
|
procedure InvalidatePreferredSize; virtual;
|
||||||
public
|
public
|
||||||
constructor Create(TheOwner: TComponent);override;
|
constructor Create(TheOwner: TComponent);override;
|
||||||
@ -2911,6 +2912,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.299 2005/06/22 17:37:06 mattias
|
||||||
implemented TMouse.SetCursorPos from Andrew
|
implemented TMouse.SetCursorPos from Andrew
|
||||||
|
|
||||||
|
@ -3460,9 +3460,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TControl.CNPreferredSizeChanged;
|
||||||
|
begin
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
procedure TControl.InvalidatePreferredSize;
|
procedure TControl.InvalidatePreferredSize;
|
||||||
|
|
||||||
Invalidate the cache of the preferred size of this and all parent controls.
|
Invalidate the cache of the preferred size of this and all parent controls.
|
||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TControl.InvalidatePreferredSize;
|
procedure TControl.InvalidatePreferredSize;
|
||||||
@ -3536,6 +3541,9 @@ end;
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$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
|
Revision 1.259 2005/06/22 23:04:44 mattias
|
||||||
implemented default height for gtk TStatusBar and set TStatusBar.AutoSize to true
|
implemented default height for gtk TStatusBar and set TStatusBar.AutoSize to true
|
||||||
|
|
||||||
|
@ -232,7 +232,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if TheWinControl<>nil then begin
|
if TheWinControl<>nil then begin
|
||||||
TheWinControl.InvalidatePreferredSize;
|
TheWinControl.CNPreferredSizeChanged;
|
||||||
SetCursor(TheWinControl, crDefault);
|
SetCursor(TheWinControl, crDefault);
|
||||||
ConnectInternalWidgetsSignals(MainWidget,TheWinControl);
|
ConnectInternalWidgetsSignals(MainWidget,TheWinControl);
|
||||||
UpdateWidgetStyleOfControl(TheWinControl);
|
UpdateWidgetStyleOfControl(TheWinControl);
|
||||||
@ -2986,6 +2986,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.279 2005/06/03 20:58:23 mattias
|
||||||
fixed focussing modal forms on gtk intf
|
fixed focussing modal forms on gtk intf
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user