summaryrefslogtreecommitdiff
path: root/prototypes/miglayout/test.lpr
blob: 86fdf959f4f06ad4cbd28cfba3356e639ace79d1 (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
61
62
63
64
65
66
program test;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes, fpgfx, gui_form, gui_label,
  gui_miglayout,
  gui_mig_lc,
  gui_mig_constraintparser,
  gui_mig_boundsize,
  gui_mig_unitvalue,
  gui_mig_exceptions;

type
  TMainForm = class(TfpgForm)
  private
    FPanel: TfpgLayoutPanel;
    FLabel1: TfpgLabel;
  public
    constructor Create(AOwner: TComponent); override;
    procedure   AfterCreate; override;
  end;

{ TMainForm }

constructor TMainForm.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  WindowTitle := 'MiG Layout Test';
  WindowPosition := wpUser;

  FPanel := TfpgLayoutPanel.Create(self);

  SetPosition(100, 100, 300, 200);
end;

procedure TMainForm.AfterCreate;
begin
//  FLabel1 := TfpgLabel.Create(FPanel);
//  FPanel.Add(FLabel1, '');
end;


procedure MainProc;
var
  frm: TMainForm;
begin
  fpgApplication.Initialize;
  frm := TMainForm.Create(nil);
  try
    frm.Show;
    fpgApplication.Run;
  finally
    frm.Free;
  end;
end;

begin
  MainProc;
end.