convert LM_SHOWHIDE message to new intf method TWSWinControl.ShowHide

git-svn-id: trunk@5946 -
This commit is contained in:
micha 2004-09-08 20:47:17 +00:00
parent e512c8e42a
commit 6adb463e6f
9 changed files with 48 additions and 21 deletions

View File

@ -3446,7 +3446,7 @@ begin
SetProp(Handle,'Control',TControl(Self));
DoSendBoundsToInterface;
CNSendMessage(LM_SHOWHIDE, Self, nil);
TWSWinControlClass(WidgetSetClass).ShowHide(Self);
if [wcfColorChanged,wcfFontChanged]*FFLags<>[]
then begin
@ -3887,7 +3887,7 @@ procedure TWinControl.CMShowingChanged(var Message: TLMessage);
begin
// ToDo: do not send this while loading, send it after loading.
if HandleAllocated and ([csDestroying]*ComponentState=[])then
CNSendMessage(LM_ShowHide, Self, nil);
TWSWinControlClass(WidgetSetClass).ShowHide(Self);
end;
{------------------------------------------------------------------------------
@ -3911,6 +3911,9 @@ end;
{ =============================================================================
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -133,10 +133,6 @@ type
procedure FreeAllStyles; virtual;
Function GetCompStyle(Sender : TObject) : Longint; Virtual;
// show, hide and invalidate
procedure ReDraw(Child : Pointer);virtual;
procedure ShowHide(Sender : TObject);virtual;
// create and destroy
function CreateComboBox(ComboBoxObject: TObject): Pointer;
function CreateAPIWidget(AWinControl: TWinControl): PGtkWidget;
@ -296,6 +292,10 @@ type
procedure FinishComponentCreate(const ALCLObject: TObject;
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
procedure HookSignals(const AGTKObject: PGTKObject; const ALCLObject: TObject); virtual; //hooks all signals for controls
public
@ -461,6 +461,9 @@ end.
{ =============================================================================
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -3127,12 +3127,6 @@ begin
LM_GETPixel : GetPixel(Sender,Data);
LM_ShowHide :
begin
//DebugLn('LM_ShowHide');
ShowHide(Sender);
end;
LM_SetLabel : SetLabel(Sender,Data);
LM_GETVALUE : Result := GetValue(Sender, data);
@ -9143,6 +9137,9 @@ end;
{ =============================================================================
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -36,7 +36,7 @@ uses
////////////////////////////////////////////////////
Controls,
////////////////////////////////////////////////////
Classes, LMessages,
Classes, LMessages, InterfaceBase,
WSControls, WSLCLClasses;
type
@ -72,6 +72,8 @@ type
class procedure SetPos(const AWinControl: TWinControl; const ALeft, ATop: Integer); override;
class procedure SetCursor(const AControl: TControl; const ACursor: TCursor); override;
class procedure SetColor(const AWinControl: TWinControl); override;
class procedure ShowHide(const AWinControl: TWinControl); override;
end;
{ TGtkWSGraphicControl }
@ -195,6 +197,12 @@ begin
UpdateWidgetStyleOfControl(AWinControl);
end;
procedure TGtkWSWinControl.ShowHide(const AWinControl: TWinControl);
begin
// other methods use ShowHide also, can't move code
TGtkWidgetSet(InterfaceObject).ShowHide(AWinControl);
end;
initialization
////////////////////////////////////////////////////

View File

@ -138,7 +138,6 @@ Type
Procedure AssignSelf(Window: HWnd; Data: Pointer);
Procedure ReDraw(Child: TObject);
Procedure ShowHide(Sender: TObject);
procedure ChangeActivePage(const Data: TLMNotebookEvent);
procedure AddAllNBPages(Notebook: TCustomNotebook);
procedure RemoveAllNBPages(Notebook: TCustomNotebook);
@ -185,6 +184,7 @@ Type
Procedure HandleEvents; Override;
Procedure WaitMessage; Override;
Procedure AppTerminate; Override;
procedure ShowHide(Sender: TObject);
Function InitHintFont(HintFont: TObject): Boolean; Override;
Function RecreateWnd(Sender: TWinControl): Integer; virtual;
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;
@ -283,6 +283,9 @@ End.
{ =============================================================================
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -444,11 +444,6 @@ Begin
SetPixel(Sender, Data);
LM_GETPIXEL:
GetPixel(Sender, Data);
LM_SHOWHIDE:
Begin
Assert(False, Format('Trace: [TWin32WidgetSet.IntSendMessage3] %s --> Show/Hide', [Sender.ClassName]));
ShowHide(Sender);
End;
LM_SETLABEL:
SetLabel(Sender, Data);
LM_GETVALUE:
@ -2965,6 +2960,9 @@ End;
{
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -64,6 +64,8 @@ type
public
class procedure SetBorderStyle(const AWinControl: TWinControl; const ABorderStyle: TBorderStyle); override;
class procedure SetColor(const AWinControl: TWinControl); override;
class procedure ShowHide(const AWinControl: TWinControl); override;
end;
{ TWin32WSGraphicControl }
@ -111,6 +113,12 @@ begin
// TODO: to be implemented, had no implementation in LM_SETCOLOR message
end;
procedure TWin32WSWinControl.ShowHide(const AWinControl: TWinControl);
begin
// other methods also use ShowHide, can't move code
TWin32WidgetSet(InterfaceObject).ShowHide(AWinControl);
end;
initialization
////////////////////////////////////////////////////

View File

@ -58,7 +58,6 @@ const
LM_AssignSelf = LM_ComUser+11;
LM_SetName = LM_ComUser+12;
LM_RESIZECHILDREN = LM_ComUser+13;
LM_ShowHide = LM_ComUser+14;
LM_AddPage = LM_ComUser+15;
LM_GetLineCount = LM_ComUser+16;
LM_SETTEXT = LM_ComUser+17;
@ -872,7 +871,6 @@ begin
LM_AssignSelf :Result:='LM_AssignSelf';
LM_SetName :Result:='LM_SetName';
LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN';
LM_ShowHide :Result:='LM_ShowHide';
LM_AddPage :Result:='LM_AddPage';
LM_GetLineCount :Result:='LM_GetLineCount';
LM_SETTEXT :Result:='LM_SETTEXT';
@ -1042,6 +1040,9 @@ end.
{
$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
convert LM_SETCOLOR message to new intf method TWSWinControl.SetColor

View File

@ -74,6 +74,8 @@ type
class procedure SetSize(const AWinControl: TWinControl; const AWidth, AHeight: Integer); virtual;
class procedure SetText(const AWinControl: TWinControl; const AText: String); virtual;
class procedure SetColor(const AWinControl: TWinControl); virtual;
class procedure ShowHide(const AWinControl: TWinControl); virtual;
end;
TWSWinControlClass = class of TWSWinControl;
@ -145,6 +147,10 @@ procedure TWSWinControl.SetColor(const AWinControl: TWinControl);
begin
end;
procedure TWSWinControl.ShowHide(const AWinControl: TWinControl);
begin
end;
initialization
////////////////////////////////////////////////////