Understanding the Data Types and Declarations (Delphi)

<< Click to Display Table of Contents >>

Navigation:  How To Use the VPE Control > VPE VCL >

Understanding the Data Types and Declarations (Delphi)

Previous pageReturn to chapter overviewNext page

Because the properties and methods of the VPE Control (for .NET, Java, PHP, Python, Ruby, ActiveX and Delphi / C++ Builder VCL) are nearly 100% the same, we explain the API of the VPE control for all the different programming languages within this single book. We use a meta-description to describe the data types, properties, methods and parameters of the VPE API.

Here is how the meta-description is converted to Delphi:

Throughout this manual, methods and parameters are always declared in the form <Data Type> <Name>, e.g. boolean AutoDelete would be declared in Delphi as AutoDelete: Boolean.

The data type in square-brackets defines the data type for the VCL Component.

 

Example:

property PenStyle [integer] PenStyle

means that this property is of type "integer".
The leading "PenStyle" type declaration is for the .NET control only.

 

Data Types:

VpeCoord is Double

boolean is Boolean

integer is Integer

pointer is Pointer

long is Long

string is String

Color is TColor (in fact a 32-bit integer)

 

Properties / Methods:

The keyword method declares a method, e.g. method void CloseProgressBar().

A method is either a Procedure or a Function, depending on how the return type of the method is declared. The keyword immediately following the word method declares the method.

void is a Procedure which does not return a value, e.g.
method void StorePos() is in Delphi: procedure StorePos()

all other declarations declare a function, e.g.
method boolean WriteDoc(string FileName) is in Delphi
function WriteDoc(FileName: String) : Boolean

The keyword property describes a property. The line below the declaration of the property explains, how the property can be accessed (read-only, write-only or read / write together) and if it can be accessed during runtime only, or also during design time.

 

Example:

property boolean PageScrollerTracking

read / write; design- & runtime

means: the property is of type Boolean, its name is PageScrollerTracking and it can be accessed for read (you can read its value, e.g. n := PageScrollerTracking) and for write (you can assign it a value, e.g. PageScrollerTracking := True) and it is available during runtime (while your application is running) and design time (when you are developing your forms).

It would be declared in Delphi as PageScrollerTracking: Boolean