blob: 49316592b63c062b09693c9f40d450bb4cafea60 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
{
Layout Manager Constraint.
}
unit gui_mig_lc;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, gui_mig_unitvalue, gui_mig_boundsize, gui_mig_exceptions;
type
{ TLC }
TLC = class(TObject)
private
FDebugMillis: integer;
FFillX: Boolean;
FFillY: Boolean;
FFlowX: Boolean;
FGridGapX: TBoundSize;
FGridGapY: TBoundSize;
FHideMode: integer;
FNoCache: Boolean;
FAlignX: TUnitValue;
FAlignY: TUnitValue;
FLeftToRight: Boolean;
FTopToBottom: Boolean;
procedure SetHideMode(const AValue: integer);
public
constructor Create;
property NoCache: Boolean read FNoCache write FNoCache default False;
property AlignX: TUnitValue read FAlignX write FAlignX;
property AlignY: TUnitValue read FAlignY write FAlignY;
property DebugMillis: integer read FDebugMillis write FDebugMillis default 0;
property FillX: Boolean read FFillX write FFillX default False;
property FillY: Boolean read FFillY write FFillY default False;
property FlowX: Boolean read FFlowX write FFlowX default True;
property GridGapX: TBoundSize read FGridGapX write FGridGapX;
property GridGapY: TBoundSize read FGridGapY write FGridGapY;
property HideMode: integer read FHideMode write SetHideMode;
property LeftToRight: Boolean read FLeftToRight write FLeftToRight;
property TopToBottom: Boolean read FTopToBottom write FTopToBottom;
end;
implementation
{ TLC }
procedure TLC.SetHideMode(const AValue: integer);
begin
if FHideMode=AValue then exit;
if (AValue < 0) or (AValue > 3) then
raise EIllegalArgument.CreateFmt('Wrong HideMode: %d', [AValue]);
FHideMode:=AValue;
end;
constructor TLC.Create;
begin
FNoCache := False;
FAlignX := nil;
FAlignY := nil;
FDebugMillis := 0;
FFillX := False;
FFillY := False;
FFlowX := True;
FGridGapX := nil;
FGridGapY := nil;
FLeftToRight := True;
FTopToBottom := True;
end;
end.
|