implemented fsStayOnTop+bsNone for forms under gtk (useful for splash)

git-svn-id: trunk@3792 -
This commit is contained in:
mattias 2003-01-06 12:00:16 +00:00
parent 0f3bc245a8
commit 2d0fb715b4
3 changed files with 49 additions and 28 deletions

View File

@ -64,11 +64,12 @@ implementation
constructor TSplashForm.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
BorderStyle := bsNone;
FormStyle := fsStayOnTop;
Caption := 'Lazarus';
Width := 429;
Height := 341;
Position:= poScreenCenter;
BorderStyle := bsNone;
FPixmap := TPixmap.Create;
FPixmap.LoadFromLazarusResource('splash_logo');
@ -140,6 +141,9 @@ end.
{ =============================================================================
$Log$
Revision 1.18 2003/01/06 12:00:16 mattias
implemented fsStayOnTop+bsNone for forms under gtk (useful for splash)
Revision 1.17 2002/09/30 20:19:12 lazarus
MG: fixed flickering of modal forms

View File

@ -231,7 +231,9 @@ type
fsVisible, // form should be shown
fsShowing,
fsModal, // form is modal
fsCreatedMDIChild
fsCreatedMDIChild,
fsBorderStyleChanged,
fsFormStyleChanged
);
TFormState = set of TFormStateType;
@ -267,7 +269,7 @@ type
procedure DoDestroy;
procedure SetActive(AValue: Boolean);
procedure SetActiveControl(AWinControl: TWinControl);
procedure SetBorderStyle(Value : TFORMBorderStyle);
procedure SetBorderStyle(Value : TFormBorderStyle);
procedure SetDesigner(Value : TIDesigner);
procedure SetMenu(Value : TMainMenu);
procedure SetFormStyle(Value : TFormStyle);

View File

@ -775,8 +775,10 @@ end;
{------------------------------------------------------------------------------}
Procedure TCustomForm.SetBorderStyle(Value : TFormBorderStyle);
Begin
if FBorderStyle = Value then exit;
//TODO: Finish SETBORDERSTYLE
FBorderStyle := Value;
Include(FFormState,fsBorderStyleChanged);
end;
{------------------------------------------------------------------------------}
@ -833,9 +835,10 @@ end;
{------------------------------------------------------------------------------}
Procedure TCustomForm.SetFormStyle(Value : TFormStyle);
Begin
if FFormStyle = Value then exit;
//TODO: Finish SETFORMSTYLE
FFormStyle := Value;
Assert(False, 'Trace:TODO: [TCustomForm.SetFormStyle]');
Include(FFormState,fsFormStyleChanged);
end;
{------------------------------------------------------------------------------}
@ -849,9 +852,9 @@ begin
end;
end;
{------------------------------------------------------------------------------}
{ TCustomForm Constructor }
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------
TCustomForm Constructor
------------------------------------------------------------------------------}
constructor TCustomForm.Create(AOwner : TComponent);
begin
//writeln('[TCustomForm.Create] A Class=',Classname);
@ -882,15 +885,23 @@ begin
//writeln('[TCustomForm.Create] END Class=',Classname);
end;
{------------------------------------------------------------------------------
constructor TCustomForm.CreateNew(AOwner: TComponent; Num : Integer);
------------------------------------------------------------------------------}
constructor TCustomForm.CreateNew(AOwner: TComponent; Num : Integer);
Begin
//writeln('[TCustomForm.CreateNew] Class=',Classname);
BeginFormUpdate;
// set border style before handle is allocated
if not (fsBorderStyleChanged in FFormState) then
FBorderStyle:= bsSizeable;
// set form style before handle is allocated
if not (fsFormStyleChanged in FFormState) then
FFormStyle:= fsNormal;
inherited Create(AOwner);
fCompStyle:= csForm;
FFormState := [];
FMenu := nil;
ControlStyle := ControlStyle + [csAcceptsControls, csCaptureMouse,
@ -918,9 +929,9 @@ Begin
EndFormUpdate;
End;
{------------------------------------------------------------------------------}
{ TCustomForm CreateParams }
{------------------------------------------------------------------------------}
{------------------------------------------------------------------------------
TCustomForm CreateParams
------------------------------------------------------------------------------}
procedure TCustomForm.CreateParams(var Params : TCreateParams);
begin
inherited CreateParams(Params);
@ -1121,6 +1132,7 @@ end;
procedure TCustomForm.CreateWnd;
begin
//writeln('TCustomForm.CreateWnd START ',ClassName);
FFormState:=FFormState-[fsBorderStyleChanged,fsFormStyleChanged];
inherited CreateWnd;
CNSendMessage(LM_SETFORMICON, Self, Pointer(GetIconHandle));
@ -1277,6 +1289,9 @@ end;
{ =============================================================================
$Log$
Revision 1.84 2003/01/06 12:00:16 mattias
implemented fsStayOnTop+bsNone for forms under gtk (useful for splash)
Revision 1.83 2003/01/04 12:06:53 mattias
fixed TCustomform.BringToFront