mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:19:36 +02:00
convert LM_INVALIDATE message to interface method
git-svn-id: trunk@5999 -
This commit is contained in:
parent
3a6375ea0f
commit
11ede552a9
@ -2372,7 +2372,7 @@ end;
|
||||
Procedure TWinControl.Invalidate;
|
||||
Begin
|
||||
if HandleAllocated and ([csDestroying,csLoading]*ComponentState=[]) then
|
||||
CNSendMessage(LM_Invalidate,Self,Nil);
|
||||
TWSWinControlClass(WidgetSetClass).Invalidate(Self);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
@ -3912,6 +3912,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.278 2004/09/14 15:48:28 micha
|
||||
convert LM_INVALIDATE message to interface method
|
||||
|
||||
Revision 1.277 2004/09/12 19:50:35 micha
|
||||
convert LM_SETSIZE message to new interface method
|
||||
|
||||
|
@ -3118,23 +3118,6 @@ begin
|
||||
TLMNotebookEvent(Data^).Page);
|
||||
end;
|
||||
|
||||
LM_Invalidate :
|
||||
begin
|
||||
Assert(False, 'Trace:Trying to invalidate window... !!!');
|
||||
//THIS DOESN'T WORK YET....
|
||||
{
|
||||
Event.thetype := GDK_EXPOSE;
|
||||
Event.window := PgtkWidget(Handle)^.Window;
|
||||
Event.Send_Event := 0;
|
||||
Event.X := 0;
|
||||
Event.Y := 0;
|
||||
Event.Width := PgtkWidget((Handle)^.Allocation.Width;
|
||||
Event.Height := PgtkWidget(Handle)^.Allocation.Height;
|
||||
gtk_Signal_Emit_By_Name(PgtkObject(Handle),'expose_event',[(Sender as TWinControl).Handle,Sender,@Event]);
|
||||
Assert(False, 'Trace:Signal Emitted - invalidate window'); }
|
||||
gtk_widget_queue_draw(PGtkWidget(Handle));
|
||||
end;
|
||||
|
||||
LM_SETFORMICON :
|
||||
begin
|
||||
if (Sender is TCustomForm) and (TCustomForm(Sender).Parent=nil) then
|
||||
@ -8228,6 +8211,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.567 2004/09/14 15:48:28 micha
|
||||
convert LM_INVALIDATE message to interface method
|
||||
|
||||
Revision 1.566 2004/09/14 14:41:17 micha
|
||||
convert LM_INSERTTOOLBUTTON and LM_DELETETOOLBUTTON messages to interface methods; warning: still very ugly code, as if it is "OldToolbar" so probably, obsolete
|
||||
|
||||
|
@ -70,6 +70,7 @@ type
|
||||
class procedure SetColor(const AWinControl: TWinControl); override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
|
||||
class procedure Invalidate(const AWinControl: TWinControl); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
@ -424,6 +425,24 @@ begin
|
||||
Assert(False, Format('trace: [TGtkWidgetSet.SetLabel] %s --> END', [AWinControl.ClassName]));
|
||||
end;
|
||||
|
||||
procedure TGtkWSWinControl.Invalidate(const AWinControl: TWinControl);
|
||||
begin
|
||||
Assert(false, 'Trace:Trying to invalidate window... !!!');
|
||||
//THIS DOESN'T WORK YET....
|
||||
{
|
||||
Event.thetype := GDK_EXPOSE;
|
||||
Event.window := PgtkWidget(Handle)^.Window;
|
||||
Event.Send_Event := 0;
|
||||
Event.X := 0;
|
||||
Event.Y := 0;
|
||||
Event.Width := PgtkWidget((Handle)^.Allocation.Width;
|
||||
Event.Height := PgtkWidget(Handle)^.Allocation.Height;
|
||||
gtk_Signal_Emit_By_Name(PgtkObject(Handle),'expose_event',[(Sender as TWinControl).Handle,Sender,@Event]);
|
||||
Assert(False, 'Trace:Signal Emitted - invalidate window');
|
||||
}
|
||||
gtk_widget_queue_draw(PGtkWidget(AWinControl.Handle));
|
||||
end;
|
||||
|
||||
procedure TGtkWSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
// other methods use ShowHide also, can't move code
|
||||
|
@ -253,7 +253,6 @@ Var
|
||||
//CBI: COMBOBOXINFO;
|
||||
DC: HDC;
|
||||
Handle: HWND;
|
||||
SizeRect: TRECT; // used by LM_SETSIZE,LM_INVALIDATE,LM_CLB_SET_CHECKED and LM_REDRAW
|
||||
AMenu: TMenu;
|
||||
AccelTable: HACCEL;
|
||||
|
||||
@ -331,12 +330,6 @@ Begin
|
||||
Else
|
||||
Assert(False, Format('Trace:I don''t know how to destroy component %S', [Sender.ClassName]));
|
||||
End;
|
||||
LM_INVALIDATE:
|
||||
Begin
|
||||
Assert(False, 'Trace:Trying to invalidate window... !!!');
|
||||
GetClientRect(Handle, SizeRect);
|
||||
InvalidateRect(Handle, @SizeRect, True);
|
||||
End;
|
||||
LM_SETFORMICON:
|
||||
Begin
|
||||
SetClassLong(Handle, GCL_HIcon, integer(Data));
|
||||
@ -2246,6 +2239,9 @@ End;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.259 2004/09/14 15:48:28 micha
|
||||
convert LM_INVALIDATE message to interface method
|
||||
|
||||
Revision 1.258 2004/09/14 14:41:17 micha
|
||||
convert LM_INSERTTOOLBUTTON and LM_DELETETOOLBUTTON messages to interface methods; warning: still very ugly code, as if it is "OldToolbar" so probably, obsolete
|
||||
|
||||
|
@ -73,6 +73,7 @@ type
|
||||
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: string); override;
|
||||
|
||||
class procedure Invalidate(const AWinControl: TWinControl); override;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||
end;
|
||||
|
||||
@ -313,6 +314,11 @@ Begin
|
||||
Assert(False, Format('Trace:[TWin32WidgetSet.SetLabel] %S --> END', [AWinControl.ClassName]));
|
||||
End;
|
||||
|
||||
procedure TWin32WSWinControl.Invalidate(const AWinControl: TWinControl);
|
||||
begin
|
||||
// lpRect = nil updates entire client area of window
|
||||
InvalidateRect(AWinControl.Handle, nil, true);
|
||||
end;
|
||||
|
||||
procedure TWin32WSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
|
@ -56,7 +56,6 @@ const
|
||||
LM_RESIZECHILDREN = LM_ComUser+13;
|
||||
LM_GetLineCount = LM_ComUser+16;
|
||||
LM_CANVASCREATE = LM_ComUser+19;
|
||||
LM_Invalidate = LM_ComUser+32;
|
||||
|
||||
LM_SETPROPERTIES = LM_ComUser+39; // update object to reflect current properties
|
||||
LM_SETVALUE = LM_ComUser+40; // set actual value of object to visual object
|
||||
@ -826,7 +825,6 @@ begin
|
||||
LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN';
|
||||
LM_GetLineCount :Result:='LM_GetLineCount';
|
||||
LM_CANVASCREATE :Result:='LM_CANVASCREATE';
|
||||
LM_Invalidate :Result:='LM_Invalidate';
|
||||
|
||||
LM_SETPROPERTIES :Result:='LM_SETPROPERTIES';
|
||||
LM_SETVALUE :Result:='LM_SETVALUE';
|
||||
@ -963,6 +961,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.99 2004/09/14 15:48:28 micha
|
||||
convert LM_INVALIDATE message to interface method
|
||||
|
||||
Revision 1.98 2004/09/14 14:41:17 micha
|
||||
convert LM_INSERTTOOLBUTTON and LM_DELETETOOLBUTTON messages to interface methods; warning: still very ugly code, as if it is "OldToolbar" so probably, obsolete
|
||||
|
||||
|
@ -77,6 +77,7 @@ type
|
||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); virtual;
|
||||
class procedure SetColor(const AWinControl: TWinControl); virtual;
|
||||
|
||||
class procedure Invalidate(const AWinControl: TWinControl); virtual;
|
||||
class procedure ShowHide(const AWinControl: TWinControl); virtual;
|
||||
end;
|
||||
TWSWinControlClass = class of TWSWinControl;
|
||||
@ -169,6 +170,10 @@ procedure TWSWinControl.SetColor(const AWinControl: TWinControl);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TWSWinControl.Invalidate(const AWinControl: TWinControl);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TWSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||
begin
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user