| Class TLayoutForm (unit LOForm) |
TForm
| Constructors |
constructor Create( AOwner : TComponent; Panel : TLayoutPanel );--------------------------------------- TLayoutForm.
| Functions |
procedure CloseBtnClick(Sender: TObject);
procedure ConstraintBtnClick(Sender: TObject);
procedure ConstraintListBoxClick(Sender: TObject);
procedure ControlListBoxClick(Sender: TObject);
procedure ExtremalEditChange(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure RelationListBoxClick(Sender: TObject);
procedure RestoreBtnClick(Sender: TObject);
procedure FillConstraintListBox;
procedure FillExtremalsEdits;
function GetConstraintPtr( NConstraint : integer ) : PLayoutConstraint;
function GetMetrics( Ind : integer ) : TLayoutMetrics;
function GetRelControlNum( var Control : TControl ) : integer;
function MakeStringConstraint( var constr : TLayoutConstraint ) : string;
procedure ReadMetricsFromPanel;
procedure SetMetrics( Ind : integer; Metr : TLayoutMetrics );| Properties |
property Modified : boolean
property Metrics : TLayoutMetrics| Events |
| Variables |
CancelBtn : TBitBtn;
ConfirmCheckBox : TCheckBox;
ConstraintBtn : TButton;
ConstraintListBox : TListBox;
ConstraintsLabel : TLabel;
ConstraintsPanel : TPanel;
ControlLabel : TLabel;
ControlListBox : TListBox;
EdgeLabel : TLabel;
EdgeListBox : TListBox;
ExtremalsPanel : TPanel;
HeightRestoreBtn : TBitBtn;
HelpBtn : TBitBtn;
MainBevel : TBevel;
MaxHEdit : TSpinEdit;
MaxHLabel : TLabel;
MaxWEdit : TSpinEdit;
MaxWLabel : TLabel;
MinHEdit : TSpinEdit;
MinHLabel : TLabel;
MinWEdit : TSpinEdit;
MinWLabel : TLabel;
OKBtn : TBitBtn;
RelationLabel : TLabel;
RelationListBox : TListBox;
RelControlLabel : TLabel;
RelControlListBox : TListBox;
RelEdgeLabel : TLabel;
RelEdgeListBox : TListBox;
ValueEdit : TSpinEdit;
ValueLabel : TLabel;
WidthRestoreBtn : TBitBtn;
XRestoreBtn : TBitBtn;
YRestoreBtn : TBitBtn;
FCloseBtn : TObject;
FLayoutPanel : TLayoutPanel;
FMetrics : PLotOfMetrics;
FMetricsCount : integer;
FModified : boolean;
FNumMake : integer;
FStringConstraints : TStringConstraints;
FUndoMetrics : TLayoutMetrics;| Constructors |
constructor Create( AOwner : TComponent; Panel : TLayoutPanel );Public declarations
--------------------------------------- TLayoutForm.Create } { Initialize fields
| Functions |
procedure CloseBtnClick(Sender: TObject);TLayoutForm.FormClose } {--------------------------------------- TLayoutForm.CloseBtnClick } { Set pointer to pressed button
procedure ConstraintBtnClick(Sender: TObject);TLayoutForm.RelationListBoxClick } {--------------------------------------- TLayoutForm.ConstraintBtnClick } { Make constraint
procedure ConstraintListBoxClick(Sender: TObject);TLayoutForm.GetConstraintPtr } {--------------------------------------- TLayoutForm.ConstraintListBoxClick } { Current constraint changed
procedure ControlListBoxClick(Sender: TObject);TLayoutForm.MakeStringConstraint } {--------------------------------------- TLayoutForm.ControlListBoxClick } { Current control changed
procedure ExtremalEditChange(Sender: TObject);TLayoutForm.CloseBtnClick } {--------------------------------------- TLayoutForm.ExtremalEditChange } { Extremal width or height changed
procedure FormClose(Sender: TObject; var Action: TCloseAction);TLayoutForm.RestoreBtnClick } {--------------------------------------- TLayoutForm.FormClose } { Make all necessary cleanup Check which button was press (OK or Cancel) and set new constraints if required
procedure FormDestroy(Sender: TObject);TLayoutForm.Create } {--------------------------------------- TLayoutForm.FormDestroy } { Clean up
procedure FormShow(Sender: TObject);TLayoutForm.SetMetrics } {--------------------------------------- TLayoutForm.FormShow } { Set listbox sizes
procedure HelpBtnClick(Sender: TObject);TLayoutForm.ExtremalEditChange } {--------------------------------------- TLayoutForm.HelpBtnClick } { Help is not implemented
procedure RelationListBoxClick(Sender: TObject);TLayoutForm.ConstraintListBoxClick } {--------------------------------------- TLayoutForm.RelationListBoxClick } { Current relation changed
procedure RestoreBtnClick(Sender: TObject);TLayoutForm.ConstraintBtnClick } {--------------------------------------- TLayoutForm.RestoreBtnClick } { One of four restore buttons clicked
procedure FillConstraintListBox;TLayoutForm.FormShow } {--------------------------------------- TLayoutForm.FillConstraintListBox } { Fill constraint list box using current Control settings
procedure FillExtremalsEdits;TLayoutForm.FillConstraintListBox } {--------------------------------------- TLayoutForm.FillExtremalsEdits } { Fill constraint list box using current Control settings
function GetConstraintPtr( NConstraint : integer ) : PLayoutConstraint;TLayoutForm.ControlListBoxClick } {--------------------------------------- TLayoutForm.GetConstraintPtr } { Get current constraint pointer using list boxes indexes
function GetMetrics( Ind : integer ) : TLayoutMetrics;TLayoutForm.ReadMetricsFromPanel } {--------------------------------------- TLayoutForm.GetMetrics } { Get layout metrics by index
function GetRelControlNum( var Control : TControl ) : integer;TLayoutForm.FillExtremalsEdits } {--------------------------------------- TLayoutForm.GetRelControlNum } { Get number of control
function MakeStringConstraint( var constr : TLayoutConstraint ) : string;TLayoutForm.GetRelControlNum } {--------------------------------------- TLayoutForm.MakeStringConstraint } { Make string by constraint
procedure ReadMetricsFromPanel;TLayoutForm.FormDestroy } {--------------------------------------- TLayoutForm.ReadMetricsFromPanel } { Create list for metrics
procedure SetMetrics( Ind : integer; Metr : TLayoutMetrics );TLayoutForm.GetMetrics } {--------------------------------------- TLayoutForm.SetMetrics } { Set layout metrics by index
| Properties |
property Modified : boolean
property Metrics : TLayoutMetrics| Events |
| Variables |
CancelBtn : TBitBtn;
ConfirmCheckBox : TCheckBox;
ConstraintBtn : TButton;
ConstraintListBox : TListBox;
ConstraintsLabel : TLabel;
ConstraintsPanel : TPanel;
ControlLabel : TLabel;
ControlListBox : TListBox;
EdgeLabel : TLabel;
EdgeListBox : TListBox;
ExtremalsPanel : TPanel;
HeightRestoreBtn : TBitBtn;
HelpBtn : TBitBtn;
MainBevel : TBevel;
MaxHEdit : TSpinEdit;
MaxHLabel : TLabel;
MaxWEdit : TSpinEdit;
MaxWLabel : TLabel;
MinHEdit : TSpinEdit;
MinHLabel : TLabel;
MinWEdit : TSpinEdit;
MinWLabel : TLabel;
OKBtn : TBitBtn;
RelationLabel : TLabel;
RelationListBox : TListBox;
RelControlLabel : TLabel;
RelControlListBox : TListBox;
RelEdgeLabel : TLabel;
RelEdgeListBox : TListBox;
ValueEdit : TSpinEdit;
ValueLabel : TLabel;
WidthRestoreBtn : TBitBtn;
XRestoreBtn : TBitBtn;
YRestoreBtn : TBitBtn;
FCloseBtn : TObject;
FLayoutPanel : TLayoutPanel;
FMetrics : PLotOfMetrics;
FMetricsCount : integer;
FModified : boolean;Private declarations
FNumMake : integer;
FStringConstraints : TStringConstraints;
FUndoMetrics : TLayoutMetrics;