mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 13:50:06 +02:00
carbon: initial implementation of PopupParent (docs required)! bug #16883
git-svn-id: trunk@27233 -
This commit is contained in:
parent
7456e34bba
commit
75a6fecb66
@ -84,6 +84,9 @@ type
|
|||||||
|
|
||||||
class procedure SetAlphaBlend(const ACustomForm: TCustomForm; const AlphaBlend: Boolean; const Alpha: Byte); override;
|
class procedure SetAlphaBlend(const ACustomForm: TCustomForm; const AlphaBlend: Boolean; const Alpha: Byte); override;
|
||||||
class procedure SetFormStyle(const ACustomForm: TCustomForm; const ANewFormStyle, AOldFormStyle: TFormStyle); override;
|
class procedure SetFormStyle(const ACustomForm: TCustomForm; const ANewFormStyle, AOldFormStyle: TFormStyle); override;
|
||||||
|
|
||||||
|
class procedure SetPopupParent(const ACustomForm: TCustomForm;
|
||||||
|
const APopupMode: TPopupMode; const APopupParent: TCustomForm); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TCarbonWSForm }
|
{ TCarbonWSForm }
|
||||||
@ -161,11 +164,19 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
class function TCarbonWSCustomForm.CreateHandle(const AWinControl: TWinControl;
|
class function TCarbonWSCustomForm.CreateHandle(const AWinControl: TWinControl;
|
||||||
const AParams: TCreateParams): TLCLIntfHandle;
|
const AParams: TCreateParams): TLCLIntfHandle;
|
||||||
|
var
|
||||||
|
frm : TCustomForm;
|
||||||
begin
|
begin
|
||||||
if csDesigning in AWinControl.ComponentState then
|
if csDesigning in AWinControl.ComponentState then
|
||||||
Result := TLCLIntfHandle(TCarbonDesignWindow.Create(AWinControl, AParams))
|
Result := TLCLIntfHandle(TCarbonDesignWindow.Create(AWinControl, AParams))
|
||||||
else
|
else
|
||||||
Result := TLCLIntfHandle(TCarbonWindow.Create(AWinControl, AParams));
|
Result := TLCLIntfHandle(TCarbonWindow.Create(AWinControl, AParams));
|
||||||
|
frm:=TCustomForm(AWinControl);
|
||||||
|
if Assigned(frm) then
|
||||||
|
begin
|
||||||
|
if Assigned(frm.PopupParent) then
|
||||||
|
SetPopupParent(frm, frm.PopupMode, frm.PopupParent);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
@ -272,6 +283,18 @@ begin
|
|||||||
Self, 'SetFormStyle', 'SetWindowGroup');
|
Self, 'SetFormStyle', 'SetWindowGroup');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TCarbonWSCustomForm.SetPopupParent(const ACustomForm:TCustomForm;
|
||||||
|
const APopupMode:TPopupMode;const APopupParent:TCustomForm);
|
||||||
|
begin
|
||||||
|
//todo: better "popup-parent" hanlding
|
||||||
|
if Assigned(APopupParent) and (APopupParent.Handle<>0) then
|
||||||
|
begin
|
||||||
|
SetWindowGroup( TCarbonWindow(ACustomForm.Handle).Window, GetWindowGroupOfClass(kHelpWindowClass));
|
||||||
|
end
|
||||||
|
else
|
||||||
|
SetFormStyle(ACustomForm, ACustomForm.FormStyle, ACustomForm.FormStyle);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TCarbonWSHintWindow }
|
{ TCarbonWSHintWindow }
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user