1{%MainUnit ../dialogs.pp}
2{******************************************************************************
3                                  TFontDialog
4 ******************************************************************************
5
6 *****************************************************************************
7  This file is part of the Lazarus Component Library (LCL)
8
9  See the file COPYING.modifiedLGPL.txt, included in this distribution,
10  for details about the license.
11 *****************************************************************************
12}
13
14{------------------------------------------------------------------------------
15  Method: TFontDialog.Apply
16  Params:  Wnd: HWND
17  Returns: Nothing
18
19  Called whenever the Apply button is clicked.
20 ------------------------------------------------------------------------------}
21procedure TFontDialog.ApplyClicked;
22begin
23  if Assigned(FOnApplyClicked) then FOnApplyClicked(Self);
24end;
25
26{------------------------------------------------------------------------------
27  Method: TFontDialog.Create
28  Params:  AOwner: the owner of the class
29  Returns: Nothing
30
31  Constructor for the class.
32 ------------------------------------------------------------------------------}
33constructor TFontDialog.Create (AOwner : TComponent);
34begin
35  inherited Create(AOwner);
36  fCompStyle := csFontDialog;
37  FFont := TFont.Create;
38  FOptions := [fdEffects];
39end;
40
41destructor TFontDialog.Destroy;
42begin
43  FFont.Free;
44  inherited Destroy;
45end;
46
47procedure TFontDialog.SetFont(const AValue: TFont);
48begin
49  FFont.Assign(AValue);
50end;
51
52class procedure TFontDialog.WSRegisterClass;
53begin
54  inherited WSRegisterClass;
55  RegisterFontDialog;
56end;
57
58function TFontDialog.DefaultTitle: string;
59begin
60  Result:=rsSelectFontTitle;
61end;
62
63