mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-18 20:25:58 +02:00
tiny improvements on fpgui interface
git-svn-id: trunk@11158 -
This commit is contained in:
parent
53364e1fce
commit
388e62b32f
@ -74,7 +74,6 @@ type
|
|||||||
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); virtual;
|
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure CreateWidget(const AParams: TCreateParams); virtual; abstract;
|
procedure CreateWidget(const AParams: TCreateParams); virtual; abstract;
|
||||||
procedure DestroyWidget; virtual; abstract;
|
|
||||||
procedure SetSize(AWidth, AHeight: LongInt); virtual;
|
procedure SetSize(AWidth, AHeight: LongInt); virtual;
|
||||||
procedure SetPosition(AX, AY: Integer); virtual;
|
procedure SetPosition(AX, AY: Integer); virtual;
|
||||||
|
|
||||||
@ -117,11 +116,11 @@ type
|
|||||||
private
|
private
|
||||||
protected
|
protected
|
||||||
public
|
public
|
||||||
|
function Form: TFForm;
|
||||||
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); override;
|
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); override;
|
||||||
procedure CreateWidget(const AParams: TCreateParams); override;
|
procedure CreateWidget(const AParams: TCreateParams); override;
|
||||||
procedure DestroyWidget; override;
|
procedure DestroyWidget; override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function Form: TFForm;
|
|
||||||
procedure SetSize(AWidth, AHeight: LongInt); override;
|
procedure SetSize(AWidth, AHeight: LongInt); override;
|
||||||
procedure SetPosition(AX, AY: Integer); override;
|
procedure SetPosition(AX, AY: Integer); override;
|
||||||
// ISimpleText
|
// ISimpleText
|
||||||
@ -151,6 +150,7 @@ type
|
|||||||
function Button: TFButton;
|
function Button: TFButton;
|
||||||
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); override;
|
constructor Create(ALCLObject: TWinControl; const AParams: TCreateParams); override;
|
||||||
procedure CreateWidget(const AParams: TCreateParams); override;
|
procedure CreateWidget(const AParams: TCreateParams); override;
|
||||||
|
procedure DestroyWidget; override;
|
||||||
// ISimpleText
|
// ISimpleText
|
||||||
procedure SetText(const AText: String);
|
procedure SetText(const AText: String);
|
||||||
function GetText: String;
|
function GetText: String;
|
||||||
@ -348,6 +348,10 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
procedure TFPGUIPrivateWindow.CreateWidget(const AParams: TCreateParams);
|
procedure TFPGUIPrivateWindow.CreateWidget(const AParams: TCreateParams);
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF VerboseFPGUIIntf}
|
||||||
|
WriteLn('[TFPGUIPrivateWindow.CreateWidget]');
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Widget := TFForm.Create(nil);
|
Widget := TFForm.Create(nil);
|
||||||
|
|
||||||
Form.Wnd.SetSize(Size(AParams.Width, AParams.Height));
|
Form.Wnd.SetSize(Size(AParams.Width, AParams.Height));
|
||||||
@ -355,16 +359,6 @@ begin
|
|||||||
Form.Wnd.SetPosition(Point(AParams.X, AParams.Y));
|
Form.Wnd.SetPosition(Point(AParams.X, AParams.Y));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
|
||||||
Method: TFPGUIPrivateWindow.DestroyWidget
|
|
||||||
Params: None
|
|
||||||
Returns: Nothing
|
|
||||||
------------------------------------------------------------------------------}
|
|
||||||
procedure TFPGUIPrivateWindow.DestroyWidget;
|
|
||||||
begin
|
|
||||||
Form.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TFPGUIPrivateWindow.Destroy
|
Method: TFPGUIPrivateWindow.Destroy
|
||||||
Params: None
|
Params: None
|
||||||
@ -372,6 +366,10 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
destructor TFPGUIPrivateWindow.Destroy;
|
destructor TFPGUIPrivateWindow.Destroy;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF VerboseFPGUIIntf}
|
||||||
|
WriteLn('[TFPGUIPrivateWindow.Destroy]');
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -426,6 +424,10 @@ procedure TFPGUIPrivateButton.CreateWidget(const AParams: TCreateParams);
|
|||||||
var
|
var
|
||||||
ParentContainer: TFPGUIPrivateContainer;
|
ParentContainer: TFPGUIPrivateContainer;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF VerboseFPGUIIntf}
|
||||||
|
WriteLn('[TFPGUIPrivateButton.CreateWidget]');
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
ParentContainer := TFPGUIPrivateContainer(LCLObject.Parent.Handle);
|
ParentContainer := TFPGUIPrivateContainer(LCLObject.Parent.Handle);
|
||||||
|
|
||||||
Widget := TFButton.Create(ParentContainer.Widget);
|
Widget := TFButton.Create(ParentContainer.Widget);
|
||||||
|
Loading…
Reference in New Issue
Block a user