Class TfrmGridSpacing

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TfrmGridSpacing = class(TfrmCustomGoPhast)

Description

TfrmGridSpacing is used to specify the positions of grid lines in TPhastGrid.

See TfrmGoPhast.acEditGridLinesExecute.

Hierarchy

Overview

Fields

Implicit btnCancel: TBitBtn;
Implicit btnHelp: TBitBtn;
Implicit btnOK: TBitBtn;
Implicit lblColDefaultSpacing: TLabel;
Implicit lblColNumNodes: TLabel;
Implicit lblDescribe: TLabel;
Implicit lblLayDefaultSpacing: TLabel;
Implicit lblLayNumNodes: TLabel;
Implicit lblRowDefaultSpacing: TLabel;
Implicit lblRowNumNodes: TLabel;
Implicit pcSubdivide: TPageControl;
Implicit pnlBottom: TPanel;
Implicit pnlColumns: TPanel;
Implicit pnlDescribe: TPanel;
Implicit pnlLayers: TPanel;
Implicit pnlRows: TPanel;
Implicit rdeSpacingColumns: TRbwDataEntry;
Implicit rdeSpacingLayers: TRbwDataEntry;
Implicit rdeSpacingRows: TRbwDataEntry;
Implicit tabColumns: TTabSheet;
Implicit tabLayers: TTabSheet;
Implicit tabRows: TTabSheet;
Implicit dgColumns: TRbwDataGrid4;
Implicit dgRows: TRbwDataGrid4;
Implicit dgLayers: TRbwDataGrid4;
Implicit seColumns: TJvSpinEdit;
Implicit seRows: TJvSpinEdit;
Implicit seLayers: TJvSpinEdit;
Implicit comboModel: TComboBox;
Implicit lblModel: TLabel;
Private FColHeading: string;
Private FDraggingRows: boolean;
Private FLayerHeading: string;
Private FRowHeading: string;
Private FLabelText: string;

Methods

Implicit procedure btnOKClick(Sender: TObject);
Implicit procedure dgKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
Implicit procedure dgMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Implicit procedure dgMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
Implicit procedure dgMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Implicit procedure dgSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);
Implicit procedure dgSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);
Implicit procedure FormCreate(Sender: TObject); override;
Implicit procedure FormKeyPress(Sender: TObject; var Key: Char);
Implicit procedure seColumnsChange(Sender: TObject);
Implicit procedure seLayersChange(Sender: TObject);
Implicit procedure seRowsChange(Sender: TObject);
Implicit procedure comboModelChange(Sender: TObject);
Private procedure GetData(Model: TCustomModel);
Private procedure PasteMultipleCells(const ADataGrid: TRbwDataGrid4; const ARow: Integer; const Value: String);
Private procedure SetCursor(const ACol, ARow: integer);
Private procedure SetData;
Private procedure SetGrid(const AnArray: TOneDRealArray; const Grid: TRbwDataGrid4; const SpinEdit: TJvSpinEdit);
Private procedure SetHeadings;
Private procedure UpdateGrid(const NewCount: integer; const rdeSpacing: TRbwDataEntry; const Grid: TRbwDataGrid4);

Description

Fields

Implicit btnCancel: TBitBtn;

btnCancel: TBitBtn; btnCancel closes TfrmGridSpacing without changing anything.

Implicit btnHelp: TBitBtn;

btnHelp: TBitBtn; btnHelp displays help on TfrmGridSpacing.

Implicit btnOK: TBitBtn;

btnOK: TBitBtn; See btnOKClick.

Implicit lblColDefaultSpacing: TLabel;

lblColDefaultSpacing: TLabel; lblColDefaultSpacing displays "Default spacing".

Implicit lblColNumNodes: TLabel;

lblColNumNodes: TLabel; lblColNumNodes displays "Number of nodes in the X (column) direction: ".

Implicit lblDescribe: TLabel;

lblDescribe: TLabel; The text in lblDescribe describes how to use TfrmGridSpacing.

Implicit lblLayDefaultSpacing: TLabel;

lblLayDefaultSpacing: TLabel; lblLayDefaultSpacing displays "Default spacing".

Implicit lblLayNumNodes: TLabel;

lblLayNumNodes: TLabel; lblLayNumNodes displays "Number of nodes in the Z (layer) direction: ".

Implicit lblRowDefaultSpacing: TLabel;

lblRowDefaultSpacing: TLabel; lblRowDefaultSpacing displays "Default spacing".

Implicit lblRowNumNodes: TLabel;

lblRowNumNodes: TLabel; lblRowNumNodes displays "Number of nodes in the Y (row) direction: ".

Implicit pcSubdivide: TPageControl;

pcSubdivide: TPageControl; pcSubdivide holds tabs for columns, rows and layers. See tabColumns, tabRows, and tabLayers.

Implicit pnlBottom: TPanel;

pnlBottom: TPanel; pnlBottom is the panel at the button that has the buttons.

Implicit pnlColumns: TPanel;

pnlColumns: TPanel; pnlColumns holds controls relating to columns.

Implicit pnlDescribe: TPanel;

pnlDescribe: TPanel; pnlDescribe holds lblDescribe.

Implicit pnlLayers: TPanel;

pnlLayers: TPanel; pnlLayers holds controls relating to layers.

Implicit pnlRows: TPanel;

pnlRows: TPanel; pnlRows holds controls relating to rows.

Implicit rdeSpacingColumns: TRbwDataEntry;

rdeSpacingColumns: TRbwDataEntry; rdeSpacingColumns sets the default spacing for columns.

Implicit rdeSpacingLayers: TRbwDataEntry;

rdeSpacingLayers: TRbwDataEntry; rdeSpacingLayers sets the default spacing for layers.

Implicit rdeSpacingRows: TRbwDataEntry;

rdeSpacingRows: TRbwDataEntry; rdeSpacingRows sets the default spacing for rows.

Implicit tabColumns: TTabSheet;

tabColumns: TTabSheet; tabColumns holds the data relating to columns.

Implicit tabLayers: TTabSheet;

tabLayers: TTabSheet; tabLayers holds the data relating to layers.

Implicit tabRows: TTabSheet;

tabRows: TTabSheet; tabRows holds the data relating to rows.

Implicit dgColumns: TRbwDataGrid4;
 
Implicit dgRows: TRbwDataGrid4;
 
Implicit dgLayers: TRbwDataGrid4;
 
Implicit seColumns: TJvSpinEdit;
 
Implicit seRows: TJvSpinEdit;
 
Implicit seLayers: TJvSpinEdit;
 
Implicit comboModel: TComboBox;
 
Implicit lblModel: TLabel;
 
Private FColHeading: string;

FColHeading is the column heading for column 1 in dgColumns.

Private FDraggingRows: boolean;

FDraggingRows is set to true when the user is dragging a row to a new position.

Private FLayerHeading: string;

FLayerHeading is the column heading for column 1 in dgLayers.

Private FRowHeading: string;

FRowHeading is the column heading for column 1 in dgRows.

Private FLabelText: string;
 

Methods

Implicit procedure btnOKClick(Sender: TObject);

btnOKClick sets the column settings specified in TfrmGridSpacing. btnOKClick calls SetData.

Implicit procedure dgKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);

dgKeyUp is the OnKeyUp event handler for dgColumns, dgRows, and dgLayers. dgKeyUp checks whether an end-or-line occurs in the pasted text. If so, it calls PasteMultipleCells.

Implicit procedure dgMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

dgMouseDown is the OnMouseDown event handler for dgColumns, dgRows, and dgLayers. dgMouseDown sets the cursor to give a visual indication that a row is being dragged to a new position.

Implicit procedure dgMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

dgMouseMove is the OnMouseMove event handler for dgColumns, dgRows, and dgLayers. dgMouseMove sets the cursor to give a visual indication that a row is being dragged to a new position.

Implicit procedure dgMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

dgMouseUp is the OnMouseUp event handler for dgColumns, dgRows, and dgLayers. dgMouseUp sets the cursor to give a visual indication that a row has been dragged to a new position.

Implicit procedure dgSelectCell(Sender: TObject; ACol, ARow: Integer; var CanSelect: Boolean);

dgSelectCell prevents the user from selecting row 0.

Implicit procedure dgSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: String);

dgSetEditText tests whether a tab, end-of-line, empty space, or comma If so, it calls PasteMultipleCells.

Implicit procedure FormCreate(Sender: TObject); override;

FormCreate initializes TfrmGridSpacing and calls GetData.

Implicit procedure FormKeyPress(Sender: TObject; var Key: Char);
 
Implicit procedure seColumnsChange(Sender: TObject);

seColumnsChange calls UpdateGrid with the proper parameters for dgColumns.

Implicit procedure seLayersChange(Sender: TObject);

seLayersChange calls UpdateGrid with the proper parameters for dgLayers.

Implicit procedure seRowsChange(Sender: TObject);

seRowsChange calls UpdateGrid with the proper parameters for dgRows.

Implicit procedure comboModelChange(Sender: TObject);
 
Private procedure GetData(Model: TCustomModel);

GetData retrieves the locations of the grid lines in TPhastGrid.

Private procedure PasteMultipleCells(const ADataGrid: TRbwDataGrid4; const ARow: Integer; const Value: String);

PasteMultipleCells splits up Value into multiple values and pastes the values into ADataGrid.

Private procedure SetCursor(const ACol, ARow: integer);

SetCursor sets the cursor to indicate whether or not the user is dragging a row in one of the TRbwDataGrids.

Private procedure SetData;

SetData sets the positions of the grid lines in TPhastGrid based on the data in TfrmGridSpacing.

Private procedure SetGrid(const AnArray: TOneDRealArray; const Grid: TRbwDataGrid4; const SpinEdit: TJvSpinEdit);

SetGrid places the values from AnArray in Grid.

Private procedure SetHeadings;
 
Private procedure UpdateGrid(const NewCount: integer; const rdeSpacing: TRbwDataEntry; const Grid: TRbwDataGrid4);

UpdateGrid updates Grid to show NewCount number of data values. If this increase the number of rows in the grid, the new grid lines will have a spacing determined by the value in rdeSpacing.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:37