mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 15:39:18 +02:00
cocoa: Patch from Zoe Peterson to allow customizing Cocoa-LCL
git-svn-id: trunk@53239 -
This commit is contained in:
parent
ed90b0ee2f
commit
c8f58afbfd
@ -99,6 +99,7 @@ type
|
||||
class function GetWindowFromHandle(const ACustomForm: TCustomForm): TCocoaWindow;
|
||||
class function GetWindowContentFromHandle(const ACustomForm: TCustomForm): TCocoaWindowContent;
|
||||
published
|
||||
class function AllocWindowHandle: TCocoaWindow; virtual;
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): TLCLIntfHandle; override;
|
||||
|
||||
class function GetText(const AWinControl: TWinControl; var AText: String): Boolean; override;
|
||||
@ -439,6 +440,12 @@ begin
|
||||
Result := TCocoaWindowContent(ACustomForm.Handle);
|
||||
end;
|
||||
|
||||
// Some projects that use the LCL need to override this
|
||||
class function TCocoaWSCustomForm.AllocWindowHandle: TCocoaWindow;
|
||||
begin
|
||||
Result := TCocoaWindow(TCocoaWindow.alloc);
|
||||
end;
|
||||
|
||||
class function TCocoaWSCustomForm.CreateHandle(const AWinControl: TWinControl;
|
||||
const AParams: TCreateParams): TLCLIntfHandle;
|
||||
var
|
||||
@ -461,7 +468,7 @@ var
|
||||
if (AParams.Style and WS_CHILD) = 0 then
|
||||
begin
|
||||
|
||||
win := TCocoaWindow(TCocoaWindow.alloc);
|
||||
win := AllocWindowHandle;
|
||||
|
||||
if not Assigned(win) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user