mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:59:14 +02:00
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
git-svn-id: trunk@5946 -
This commit is contained in:
parent
e512c8e42a
commit
6adb463e6f
@ -3446,7 +3446,7 @@ begin
|
|||||||
SetProp(Handle,'Control',TControl(Self));
|
SetProp(Handle,'Control',TControl(Self));
|
||||||
|
|
||||||
DoSendBoundsToInterface;
|
DoSendBoundsToInterface;
|
||||||
CNSendMessage(LM_SHOWHIDE, Self, nil);
|
TWSWinControlClass(WidgetSetClass).ShowHide(Self);
|
||||||
|
|
||||||
if [wcfColorChanged,wcfFontChanged]*FFLags<>[]
|
if [wcfColorChanged,wcfFontChanged]*FFLags<>[]
|
||||||
then begin
|
then begin
|
||||||
@ -3887,7 +3887,7 @@ procedure TWinControl.CMShowingChanged(var Message: TLMessage);
|
|||||||
begin
|
begin
|
||||||
// ToDo: do not send this while loading, send it after loading.
|
// ToDo: do not send this while loading, send it after loading.
|
||||||
if HandleAllocated and ([csDestroying]*ComponentState=[])then
|
if HandleAllocated and ([csDestroying]*ComponentState=[])then
|
||||||
CNSendMessage(LM_ShowHide, Self, nil);
|
TWSWinControlClass(WidgetSetClass).ShowHide(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -3911,6 +3911,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.274 2004/09/08 20:47:16 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.273 2004/09/08 19:09:34 micha
|
Revision 1.273 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -133,10 +133,6 @@ type
|
|||||||
procedure FreeAllStyles; virtual;
|
procedure FreeAllStyles; virtual;
|
||||||
Function GetCompStyle(Sender : TObject) : Longint; Virtual;
|
Function GetCompStyle(Sender : TObject) : Longint; Virtual;
|
||||||
|
|
||||||
// show, hide and invalidate
|
|
||||||
procedure ReDraw(Child : Pointer);virtual;
|
|
||||||
procedure ShowHide(Sender : TObject);virtual;
|
|
||||||
|
|
||||||
// create and destroy
|
// create and destroy
|
||||||
function CreateComboBox(ComboBoxObject: TObject): Pointer;
|
function CreateComboBox(ComboBoxObject: TObject): Pointer;
|
||||||
function CreateAPIWidget(AWinControl: TWinControl): PGtkWidget;
|
function CreateAPIWidget(AWinControl: TWinControl): PGtkWidget;
|
||||||
@ -296,6 +292,10 @@ type
|
|||||||
procedure FinishComponentCreate(const ALCLObject: TObject;
|
procedure FinishComponentCreate(const ALCLObject: TObject;
|
||||||
const AGTKObject: Pointer; const ASetupProps : Boolean); virtual;
|
const AGTKObject: Pointer; const ASetupProps : Boolean); virtual;
|
||||||
|
|
||||||
|
// show, hide and invalidate
|
||||||
|
procedure ReDraw(Child : Pointer);virtual;
|
||||||
|
procedure ShowHide(Sender : TObject);virtual;
|
||||||
|
|
||||||
// control functions for messages, callbacks
|
// control functions for messages, callbacks
|
||||||
procedure HookSignals(const AGTKObject: PGTKObject; const ALCLObject: TObject); virtual; //hooks all signals for controls
|
procedure HookSignals(const AGTKObject: PGTKObject; const ALCLObject: TObject); virtual; //hooks all signals for controls
|
||||||
public
|
public
|
||||||
@ -461,6 +461,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.192 2004/09/08 20:47:17 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.191 2004/09/08 19:09:34 micha
|
Revision 1.191 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -3127,12 +3127,6 @@ begin
|
|||||||
|
|
||||||
LM_GETPixel : GetPixel(Sender,Data);
|
LM_GETPixel : GetPixel(Sender,Data);
|
||||||
|
|
||||||
LM_ShowHide :
|
|
||||||
begin
|
|
||||||
//DebugLn('LM_ShowHide');
|
|
||||||
ShowHide(Sender);
|
|
||||||
end;
|
|
||||||
|
|
||||||
LM_SetLabel : SetLabel(Sender,Data);
|
LM_SetLabel : SetLabel(Sender,Data);
|
||||||
|
|
||||||
LM_GETVALUE : Result := GetValue(Sender, data);
|
LM_GETVALUE : Result := GetValue(Sender, data);
|
||||||
@ -9143,6 +9137,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.542 2004/09/08 20:47:17 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.541 2004/09/08 19:09:34 micha
|
Revision 1.541 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ uses
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
Controls,
|
Controls,
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
Classes, LMessages,
|
Classes, LMessages, InterfaceBase,
|
||||||
WSControls, WSLCLClasses;
|
WSControls, WSLCLClasses;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -72,6 +72,8 @@ type
|
|||||||
class procedure SetPos(const AWinControl: TWinControl; const ALeft, ATop: Integer); override;
|
class procedure SetPos(const AWinControl: TWinControl; const ALeft, ATop: Integer); override;
|
||||||
class procedure SetCursor(const AControl: TControl; const ACursor: TCursor); override;
|
class procedure SetCursor(const AControl: TControl; const ACursor: TCursor); override;
|
||||||
class procedure SetColor(const AWinControl: TWinControl); override;
|
class procedure SetColor(const AWinControl: TWinControl); override;
|
||||||
|
|
||||||
|
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TGtkWSGraphicControl }
|
{ TGtkWSGraphicControl }
|
||||||
@ -195,6 +197,12 @@ begin
|
|||||||
UpdateWidgetStyleOfControl(AWinControl);
|
UpdateWidgetStyleOfControl(AWinControl);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TGtkWSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||||
|
begin
|
||||||
|
// other methods use ShowHide also, can't move code
|
||||||
|
TGtkWidgetSet(InterfaceObject).ShowHide(AWinControl);
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
@ -138,7 +138,6 @@ Type
|
|||||||
Procedure AssignSelf(Window: HWnd; Data: Pointer);
|
Procedure AssignSelf(Window: HWnd; Data: Pointer);
|
||||||
Procedure ReDraw(Child: TObject);
|
Procedure ReDraw(Child: TObject);
|
||||||
|
|
||||||
Procedure ShowHide(Sender: TObject);
|
|
||||||
procedure ChangeActivePage(const Data: TLMNotebookEvent);
|
procedure ChangeActivePage(const Data: TLMNotebookEvent);
|
||||||
procedure AddAllNBPages(Notebook: TCustomNotebook);
|
procedure AddAllNBPages(Notebook: TCustomNotebook);
|
||||||
procedure RemoveAllNBPages(Notebook: TCustomNotebook);
|
procedure RemoveAllNBPages(Notebook: TCustomNotebook);
|
||||||
@ -185,6 +184,7 @@ Type
|
|||||||
Procedure HandleEvents; Override;
|
Procedure HandleEvents; Override;
|
||||||
Procedure WaitMessage; Override;
|
Procedure WaitMessage; Override;
|
||||||
Procedure AppTerminate; Override;
|
Procedure AppTerminate; Override;
|
||||||
|
procedure ShowHide(Sender: TObject);
|
||||||
Function InitHintFont(HintFont: TObject): Boolean; Override;
|
Function InitHintFont(HintFont: TObject): Boolean; Override;
|
||||||
Function RecreateWnd(Sender: TWinControl): Integer; virtual;
|
Function RecreateWnd(Sender: TWinControl): Integer; virtual;
|
||||||
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
|
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
|
||||||
@ -283,6 +283,9 @@ End.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.99 2004/09/08 20:47:17 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.98 2004/09/08 19:09:34 micha
|
Revision 1.98 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -444,11 +444,6 @@ Begin
|
|||||||
SetPixel(Sender, Data);
|
SetPixel(Sender, Data);
|
||||||
LM_GETPIXEL:
|
LM_GETPIXEL:
|
||||||
GetPixel(Sender, Data);
|
GetPixel(Sender, Data);
|
||||||
LM_SHOWHIDE:
|
|
||||||
Begin
|
|
||||||
Assert(False, Format('Trace: [TWin32WidgetSet.IntSendMessage3] %s --> Show/Hide', [Sender.ClassName]));
|
|
||||||
ShowHide(Sender);
|
|
||||||
End;
|
|
||||||
LM_SETLABEL:
|
LM_SETLABEL:
|
||||||
SetLabel(Sender, Data);
|
SetLabel(Sender, Data);
|
||||||
LM_GETVALUE:
|
LM_GETVALUE:
|
||||||
@ -2965,6 +2960,9 @@ End;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.235 2004/09/08 20:47:17 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.234 2004/09/08 19:09:34 micha
|
Revision 1.234 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -64,6 +64,8 @@ type
|
|||||||
public
|
public
|
||||||
class procedure SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle); override;
|
class procedure SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle); override;
|
||||||
class procedure SetColor(const AWinControl: TWinControl); override;
|
class procedure SetColor(const AWinControl: TWinControl); override;
|
||||||
|
|
||||||
|
class procedure ShowHide(const AWinControl: TWinControl); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TWin32WSGraphicControl }
|
{ TWin32WSGraphicControl }
|
||||||
@ -111,6 +113,12 @@ begin
|
|||||||
// TODO: to be implemented, had no implementation in LM_SETCOLOR message
|
// TODO: to be implemented, had no implementation in LM_SETCOLOR message
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWin32WSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||||
|
begin
|
||||||
|
// other methods also use ShowHide, can't move code
|
||||||
|
TWin32WidgetSet(InterfaceObject).ShowHide(AWinControl);
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
@ -58,7 +58,6 @@ const
|
|||||||
LM_AssignSelf = LM_ComUser+11;
|
LM_AssignSelf = LM_ComUser+11;
|
||||||
LM_SetName = LM_ComUser+12;
|
LM_SetName = LM_ComUser+12;
|
||||||
LM_RESIZECHILDREN = LM_ComUser+13;
|
LM_RESIZECHILDREN = LM_ComUser+13;
|
||||||
LM_ShowHide = LM_ComUser+14;
|
|
||||||
LM_AddPage = LM_ComUser+15;
|
LM_AddPage = LM_ComUser+15;
|
||||||
LM_GetLineCount = LM_ComUser+16;
|
LM_GetLineCount = LM_ComUser+16;
|
||||||
LM_SETTEXT = LM_ComUser+17;
|
LM_SETTEXT = LM_ComUser+17;
|
||||||
@ -872,7 +871,6 @@ begin
|
|||||||
LM_AssignSelf :Result:='LM_AssignSelf';
|
LM_AssignSelf :Result:='LM_AssignSelf';
|
||||||
LM_SetName :Result:='LM_SetName';
|
LM_SetName :Result:='LM_SetName';
|
||||||
LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN';
|
LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN';
|
||||||
LM_ShowHide :Result:='LM_ShowHide';
|
|
||||||
LM_AddPage :Result:='LM_AddPage';
|
LM_AddPage :Result:='LM_AddPage';
|
||||||
LM_GetLineCount :Result:='LM_GetLineCount';
|
LM_GetLineCount :Result:='LM_GetLineCount';
|
||||||
LM_SETTEXT :Result:='LM_SETTEXT';
|
LM_SETTEXT :Result:='LM_SETTEXT';
|
||||||
@ -1042,6 +1040,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.76 2004/09/08 20:47:16 micha
|
||||||
|
convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide
|
||||||
|
|
||||||
Revision 1.75 2004/09/08 19:09:34 micha
|
Revision 1.75 2004/09/08 19:09:34 micha
|
||||||
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor
|
||||||
|
|
||||||
|
@ -74,6 +74,8 @@ type
|
|||||||
class procedure SetSize(const AWinControl: TWinControl; const AWidth, AHeight: Integer); virtual;
|
class procedure SetSize(const AWinControl: TWinControl; const AWidth, AHeight: Integer); virtual;
|
||||||
class procedure SetText(const AWinControl: TWinControl; const AText: String); virtual;
|
class procedure SetText(const AWinControl: TWinControl; const AText: String); virtual;
|
||||||
class procedure SetColor(const AWinControl: TWinControl); virtual;
|
class procedure SetColor(const AWinControl: TWinControl); virtual;
|
||||||
|
|
||||||
|
class procedure ShowHide(const AWinControl: TWinControl); virtual;
|
||||||
end;
|
end;
|
||||||
TWSWinControlClass = class of TWSWinControl;
|
TWSWinControlClass = class of TWSWinControl;
|
||||||
|
|
||||||
@ -145,6 +147,10 @@ procedure TWSWinControl.SetColor(const AWinControl: TWinControl);
|
|||||||
begin
|
begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TWSWinControl.ShowHide(const AWinControl: TWinControl);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user