mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-09 19:17:38 +01:00
gtk intf: moved FinishCreateHandle to gtk1 - it is usable for gtk1+2
git-svn-id: trunk@13642 -
This commit is contained in:
parent
ace1f24e16
commit
14fe68ea0b
@ -276,6 +276,9 @@ type
|
||||
function DestroyTimer(TimerHandle: THandle) : boolean; override;
|
||||
procedure DestroyLCLComponent(Sender: TObject);virtual;
|
||||
|
||||
// for gtk controls not part of the LCL:
|
||||
procedure FinishCreateHandle(const AWinControl: TWinControl; Widget: PGtkWidget; const AParams: TCreateParams);
|
||||
|
||||
{$I gtkwinapih.inc}
|
||||
{$I gtklclintfh.inc}
|
||||
|
||||
|
||||
@ -3748,6 +3748,29 @@ begin
|
||||
LastRight:=EmptyLastMouseClick;
|
||||
end;
|
||||
|
||||
procedure TGTKWidgetSet.FinishCreateHandle(const AWinControl: TWinControl;
|
||||
Widget: PGtkWidget; const AParams: TCreateParams);
|
||||
var
|
||||
WidgetInfo: PWidgetInfo;
|
||||
Allocation: TGTKAllocation;
|
||||
begin
|
||||
WidgetInfo := GetWidgetInfo(Widget,true); // Widget info already created in CreateAPIWidget
|
||||
WidgetInfo^.LCLObject := AWinControl;
|
||||
WidgetInfo^.Style := AParams.Style;
|
||||
WidgetInfo^.ExStyle := AParams.ExStyle;
|
||||
WidgetInfo^.WndProc := PtrUInt(AParams.WindowClass.lpfnWndProc);
|
||||
|
||||
// set allocation
|
||||
Allocation.X := AParams.X;
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtkWSWinControl.SetCallbacks(PGtkObject(Widget), AWinControl);
|
||||
end;
|
||||
|
||||
procedure TGtkWidgetSet.DestroyConnectedWidget(Widget: PGtkWidget;
|
||||
CheckIfDestroying: boolean);
|
||||
var
|
||||
|
||||
@ -75,9 +75,6 @@ type
|
||||
|
||||
function AppHandle: Thandle; override;
|
||||
|
||||
// for gtk controls not part of the LCL:
|
||||
procedure FinishCreateHandle(const AWinControl: TWinControl; Widget: PGtkWidget; const AParams: TCreateParams);
|
||||
|
||||
{$I gtk2winapih.inc}
|
||||
{$I gtk2lclintfh.inc}
|
||||
end;
|
||||
|
||||
@ -567,30 +567,6 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TGtk2WidgetSet.FinishCreateHandle(
|
||||
const AWinControl: TWinControl; Widget: PGtkWidget;
|
||||
const AParams: TCreateParams);
|
||||
var
|
||||
WidgetInfo: PWidgetInfo;
|
||||
Allocation: TGTKAllocation;
|
||||
begin
|
||||
WidgetInfo := GetWidgetInfo(Widget,true); // Widget info already created in CreateAPIWidget
|
||||
WidgetInfo^.LCLObject := AWinControl;
|
||||
WidgetInfo^.Style := AParams.Style;
|
||||
WidgetInfo^.ExStyle := AParams.ExStyle;
|
||||
WidgetInfo^.WndProc := PtrUInt(AParams.WindowClass.lpfnWndProc);
|
||||
|
||||
// set allocation
|
||||
Allocation.X := AParams.X;
|
||||
Allocation.Y := AParams.Y;
|
||||
Allocation.Width := AParams.Width;
|
||||
Allocation.Height := AParams.Height;
|
||||
gtk_widget_size_allocate(Widget, @Allocation);
|
||||
|
||||
Set_RC_Name(AWinControl, Widget);
|
||||
TGtkWSWinControl.SetCallbacks(PGtkObject(Widget), AWinControl);
|
||||
end;
|
||||
|
||||
{$IFDEF ASSERT_IS_ON}
|
||||
{$UNDEF ASSERT_IS_ON}
|
||||
{$C-}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user