summaryrefslogtreecommitdiff
path: root/prototypes/miglayout
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-27 12:17:41 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-05-27 12:17:41 +0000
commit30e2ff997667fa49a60e2fe717f4b2aba6292101 (patch)
tree7dd9103f3886121e182291bd783e7613b1425f2a /prototypes/miglayout
parent02ebc6f54c62483a716717789a88b82dd19a92b7 (diff)
downloadfpGUI-30e2ff997667fa49a60e2fe717f4b2aba6292101.tar.xz
* More work on the MiG Layout implementation.
Diffstat (limited to 'prototypes/miglayout')
-rw-r--r--prototypes/miglayout/gui_mig_constraintparser.pas4
-rw-r--r--prototypes/miglayout/gui_mig_lc.pas116
-rw-r--r--prototypes/miglayout/gui_miglayout.pas4
-rw-r--r--prototypes/miglayout/net/miginfocom/version.txt3
-rw-r--r--prototypes/miglayout/readme.txt4
-rw-r--r--prototypes/miglayout/test.lpr8
6 files changed, 122 insertions, 17 deletions
diff --git a/prototypes/miglayout/gui_mig_constraintparser.pas b/prototypes/miglayout/gui_mig_constraintparser.pas
index 5f91c135..06daeb58 100644
--- a/prototypes/miglayout/gui_mig_constraintparser.pas
+++ b/prototypes/miglayout/gui_mig_constraintparser.pas
@@ -52,12 +52,12 @@ begin
begin
if (part = 'ltr') or (part = 'rtl') or (part = 'lefttoright') or (part = 'righttoleft') then
begin
- result.LeftToRight := part[1] = 'l';
+ result.LeftToRight_prop := part[1] = 'l';
parts[i] := ''; // so we don't process it again
end;
if (part = 'ttb') or (part = 'btt') or (part = 'toptobottom') or (part = 'bottomtotop') then
begin
- result.TopToBottom := part[1] = 't';
+ result.TopToBottom_prop := part[1] = 't';
parts[i] := ''; // so we don't process it again
end;
end;
diff --git a/prototypes/miglayout/gui_mig_lc.pas b/prototypes/miglayout/gui_mig_lc.pas
index 1b787268..d506d1f3 100644
--- a/prototypes/miglayout/gui_mig_lc.pas
+++ b/prototypes/miglayout/gui_mig_lc.pas
@@ -29,25 +29,44 @@ type
FAlignY: TUnitValue;
FInsets: TUnitValueArray;
FLeftToRight: Boolean;
+ FNoGrid: Boolean;
FTopToBottom: Boolean;
- function GetInsets: TUnitValueArray;
- procedure SetHideMode(const AValue: integer);
- procedure SetInsets(const AValue: TUnitValueArray);
+ FVisualPadding: Boolean;
+ FWrapAfter: Integer;
+ function GetInsets: TUnitValueArray;
+ procedure SetHideMode(const AValue: integer);
+ procedure SetInsets(const AValue: TUnitValueArray);
public
constructor Create;
- property NoCache: Boolean read FNoCache write FNoCache default False;
+ function Wrap: TLC;
+ function WrapAfter(const ACount: Integer): TLC;
+ function NoCache: TLC;
+ function FlowY: TLC;
+ function FlowX: TLC;
+ function Fill: TLC;
+ function FillX: TLC;
+ function FillY: TLC;
+ function LeftToRight(AValue: Boolean): TLC;
+ function BottomToTop: TLC;
+ function NoGrid: TLC;
+ function NoVisualPadding: TLC;
+ function InsetsAll(AllSides: string): TLC;
+ property NoCache_prop: 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 FillX_prop: Boolean read FFillX write FFillX default False;
+ property FillY_prop: Boolean read FFillY write FFillY default False;
+ property FlowX_prop: 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 Insets: TUnitValueArray read GetInsets write SetInsets;
- property LeftToRight: Boolean read FLeftToRight write FLeftToRight;
- property TopToBottom: Boolean read FTopToBottom write FTopToBottom;
+ property LeftToRight_prop: Boolean read FLeftToRight write FLeftToRight;
+ property TopToBottom_prop: Boolean read FTopToBottom write FTopToBottom;
+ property NoGrid_prop: Boolean read FNoGrid write FNoGrid default False;
+ property VisualPadding_prop: Boolean read FVisualPadding write FVisualPadding;
+ property WrapAfter_prop: Integer read FWrapAfter write FWrapAfter;
end;
@@ -88,6 +107,85 @@ begin
FGridGapY := nil;
FLeftToRight := True;
FTopToBottom := True;
+ FNoGrid := False;
+end;
+
+function TLC.Wrap: TLC;
+begin
+ WrapAfter_prop := 0;
+ Result := self;
+end;
+
+function TLC.WrapAfter(const ACount: Integer): TLC;
+begin
+ WrapAfter_prop := ACount;
+ Result := self;
+end;
+
+function TLC.NoCache: TLC;
+begin
+ NoCache_prop := True;
+ Result := self;
+end;
+
+function TLC.FlowY: TLC;
+begin
+ FlowX_prop := False;
+ Result := self;
+end;
+
+function TLC.FlowX: TLC;
+begin
+ FlowX_prop := True;
+ Result := self;
+end;
+
+function TLC.Fill: TLC;
+begin
+ FillX_prop := True;
+ FillY_prop := True;
+ Result := self;
+end;
+
+function TLC.FillX: TLC;
+begin
+ FillX_prop := True;
+ Result := self;
+end;
+
+function TLC.FillY: TLC;
+begin
+ FillY_prop := True;
+ Result := self;
+end;
+
+function TLC.LeftToRight(AValue: Boolean): TLC;
+begin
+ LeftToRight_prop := AValue;
+ Result := self;
+end;
+
+function TLC.BottomToTop: TLC;
+begin
+ TopToBottom_prop := False;
+ Result := self;
+end;
+
+function TLC.NoGrid: TLC;
+begin
+ NoGrid_prop := True;
+ Result := self;
+end;
+
+function TLC.NoVisualPadding: TLC;
+begin
+ VisualPadding_prop := False;
+ Result := self;
+end;
+
+function TLC.InsetsAll(AllSides: string): TLC;
+begin
+ { TODO : Start Here!!!!!!!!!!!! }
end;
end.
diff --git a/prototypes/miglayout/gui_miglayout.pas b/prototypes/miglayout/gui_miglayout.pas
index ee626769..cc71f2f2 100644
--- a/prototypes/miglayout/gui_miglayout.pas
+++ b/prototypes/miglayout/gui_miglayout.pas
@@ -5,7 +5,7 @@ unit gui_miglayout;
interface
uses
- Classes, SysUtils, gui_bevel, gfxbase;
+ Classes, SysUtils, gui_panel, gfxbase;
type
@@ -13,7 +13,7 @@ type
TfpgLayoutPanel = class(TfpgBevel)
protected
- procedure HandleResize(awidth, aheight: TfpgCoord); override;
+ procedure HandleResize(awidth, aheight: TfpgCoord); override;
public
constructor Create(AOwner: TComponent); override;
procedure Add(AComponent: TComponent; AConstraint: string);
diff --git a/prototypes/miglayout/net/miginfocom/version.txt b/prototypes/miglayout/net/miginfocom/version.txt
new file mode 100644
index 00000000..4af6d4d3
--- /dev/null
+++ b/prototypes/miglayout/net/miginfocom/version.txt
@@ -0,0 +1,3 @@
+
+MiG Layout v3.0.3
+
diff --git a/prototypes/miglayout/readme.txt b/prototypes/miglayout/readme.txt
index 73e96e08..d740895a 100644
--- a/prototypes/miglayout/readme.txt
+++ b/prototypes/miglayout/readme.txt
@@ -3,8 +3,8 @@
------------------
This directory contains the beginnings of my port of the MiG Layout
-Manager from Java to Object Pascal. This is still in the very early
-stages, so I have nothing visual to show yet.
+Manager v3.0.3 from Java to Object Pascal. This is still in the very
+early stages, so I have nothing visual to show yet.
For more information about the MiG Layout (Java Layout Manager) for
Swing and SWT please visit: http://www.miglayout.com/
diff --git a/prototypes/miglayout/test.lpr b/prototypes/miglayout/test.lpr
index cd01e75c..86fdf959 100644
--- a/prototypes/miglayout/test.lpr
+++ b/prototypes/miglayout/test.lpr
@@ -7,8 +7,12 @@ uses
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;
+ gui_miglayout,
+ gui_mig_lc,
+ gui_mig_constraintparser,
+ gui_mig_boundsize,
+ gui_mig_unitvalue,
+ gui_mig_exceptions;
type
TMainForm = class(TfpgForm)