mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +02:00
carbon: implemented change of FormStyle in runtime
git-svn-id: trunk@25743 -
This commit is contained in:
parent
d5d6dd3fb4
commit
a02a463fb7
@ -81,6 +81,7 @@ type
|
||||
class procedure SetFormBorderStyle(const AForm: TCustomForm; const AFormBorderStyle: TFormBorderStyle); 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;
|
||||
end;
|
||||
|
||||
{ TCarbonWSForm }
|
||||
@ -230,6 +231,23 @@ begin
|
||||
SetWindowAlpha( TCarbonWindow(ACustomForm.Handle).Window, v);
|
||||
end;
|
||||
|
||||
class procedure TCarbonWSCustomForm.SetFormStyle(const ACustomForm:TCustomForm;
|
||||
const ANewFormStyle,AOldFormStyle:TFormStyle);
|
||||
var
|
||||
newClass : WindowClass;
|
||||
begin
|
||||
if not CheckHandle(ACustomForm, Self, 'SetFormStyle') then Exit;
|
||||
|
||||
case ANewFormStyle of
|
||||
fsStayOnTop: newClass:=kFloatingWindowClass;
|
||||
fsSplash: newClass:=kUtilityWindowClass;
|
||||
fsSystemStayOnTop: newClass:=kUtilityWindowClass;
|
||||
else
|
||||
newClass:=kDocumentWindowClass;
|
||||
end;
|
||||
HIWindowChangeClass( TCarbonWindow(ACustomForm.Handle).Window, newClass);
|
||||
end;
|
||||
|
||||
{ TCarbonWSHintWindow }
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user