summaryrefslogtreecommitdiff
path: root/gui/popupwindow.inc
blob: 509d696254bfac3522bfd2832822d0db8a74046c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
    fpGUI  -  Free Pascal Graphical User Interface
    Copyright (C) 2000 - 2001 by
      Areca Systems GmbH / Sebastian Guenther
    Copyright (C) 2006 by Graeme Geldenhuys
      member of the fpGUI development team.

    PopupWindow class declaration

    See the file COPYING.fpGUI, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 **********************************************************************}


{%mainunit fpgui.pp}

{$IFDEF read_interface}

  TPopupWindow = class(TCustomForm)
  public
    constructor Create(AOwner: TComponent); override;
    procedure   Show; override;
    procedure   Close; override;
  end;

{$ENDIF read_interface}



{$IFDEF read_implementation}

constructor TPopupWindow.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FParent := nil;
  FWindowOptions := [woBorderless, woPopup];
end;


procedure TPopupWindow.Show;
begin
  inherited Show;
  LAYOUTTRACE('TPopupWindow.Show for %s:%s', [Name, ClassName]);
  Wnd.CaptureMouse;
end;


procedure TPopupWindow.Close;
begin
  Wnd.ReleaseMouse;
  inherited Close;
end;

{$ENDIF read_implementation}