Products Downloads


French version


 

Indicates whether any data items in a specified format are available among the data concerned by the current drag and drop operation. The format can be either one predefined in Windows or one defined by the developer.

Syntax

CALL_METHOD ImageObjectName DD_DATA_AVAILABLE Format Availability ReturnCode

Parameters

ALPHA(50) Format (I)

Name of the data format to be sought.

_CF_TEXT

Format for text data items in the ANSI format.

_CF_OEMTEXT

Format for text data items in the OEM format.

_CF_UNICODETEXT

Format for text data items in the UNICODE format.

_CF_DIB

Format for DIB (Device Independent Bitmap) data items.

_CF_HDROP

Format for file list and/or folder list data items (format particularly used during a drag and drop action initiated from Windows Explorer).

Any string that does not begin with "CF_" for a format defined by the developer.

BOOL Availability (O)

This value is set to *TRUE if any data in the requested format is available.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

_ERR_OK

Method run successfully.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_INVALID_FORMAT

The specified format name does not match any data or is invalid.

Conditions for use

This method can only be used with the DD_EnterDrag, DD_DragOver and DD_Drop events.


Note: This method is not implemented in Java and Mobile generation.


Erases any data stored in the object that could have been used for a drag and drop operation.

This method concerns the data previously created by the DD_WRITE_DATA method.


Syntax

CALL_METHOD ImageObjectName DD_CANCEL_DATA ReturnCode

Parameters

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values:

_ERR_OK

Method run successfully.

Conditions for use

None


Notes:This method is not implemented in Java and Mobile generation.


Initiates a drag and drop operation between a source object and a destination object using the data stored in the source object by the DD_WRITE_DATA method.

The relevant data can be either copied or moved to the destination object.

The set formed by this data is identified by a format name. The format can be either one predefined in Windows or one defined by the developer.


Note: Where a predefined format is used, only the first data item written by the DD_WRITE_DATA method is taken into consideration.


Syntax

CALL_METHOD ImageObjectName DD_EXECUTE_DRAG Format AllowedActions ActionDone ReturnCode

Parameters

ALPHA(50) Format (I)

Data format name.

_CF_TEXT

Format for text data items in the ANSI format.

_CF_OEMTEXT

Format for text data items in the OEM format.

_CF_UNICODETEXT

Format for text data items in the UNICODE format.

_CF_DIB

Format for DIB (Device Independent Bitmap) data items.

Any string that does not begin with "CF_" for a format defined by the developer, and which contains all the written data.

NUM_BIN_4 AllowedActions (I)

Actions permitted in the destination object.

_DD_ACTION_COPY

Data can be copied to the destination object.

_DD_ACTION_MOVE

Data can be moved to the destination object (and deleted from the source object).

_DD_ACTION_COPY_MOVE

Combination of the above two actions.

NUM_BIN_4 ActionDone (O)

Action performed in the destination object.

_DD_NO_ACTION

The user released the mouse button over an object that does not accept the data, or cancelled the operation by pressing Escape.

_DD_ACTION_COPY

The data must be copied to the destination object.

_DD_ACTION_MOVE

The data must be moved to the destination object (and deleted from the source object).

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

_ERR_OK

Method run successfully.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_NO_DATA

No data was stored for a drag and drop operation.

_ERR_INVALID_FORMAT

The specified format name is invalid.

Conditions for use This method must be used with the DD_BeginDrag event.

Notes: This method is not implemented in Java and Mobile generation.


Reads the data transferred as part of the current drag and drop operation. This data is in fact a copy of the data written in the source object by the DD_WRITE_DATA method.

This method must be used in a loop to run through all the data for a given Adelia type.

All the data for a given type is read when the number of data items read is less than the number of data items to be read.


Notes:

    • Calling this method with an Adelia array containing x elements has the same effect as calling the method x times with an Adelia variable.
    • If the DD_WRITE_DATA method has been used to write x records each containing two ALPHA variables, the DD_READ_DATA method must be run twice, with the indexes (2x - 1) and 2x, in order to retrieve the strings in the nth record, or once with the index (2x-1) and an array capable of receiving two data items.
    • No distinction is made between packed and extended numerical variables, however long they are and however many decimal places they have. The values of numerical and extended variables may be truncated when they are read. With strings, the read operation will fail if the Adelia variable is too small to contain the string being read.


Syntax

CALL_METHOD ImageObjectName DD_READ_DATA Format AdeliaVar Index DataNumber ReturnCode

Parameters

ALPHA(50) Format (I)

Name of the data format to be sought.

Possible types for the AdeliaVar parameter (I)

ALPHA, DATE, TIME, NUM_E, NUM_P, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array filled with data.

NUM_BIN_4 Index (I)

Index of the data to be read for a given type.
The first data item takes the index 1.

NUM_BIN_4 DataNumber (I/O)

Number of data items to be added. With variables, this parameter must be 1, and with arrays, less than or equal to the number of elements in the array.

Once the method has been called, it contains the number of data items written.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values:

_ERR_OK

Method run successfully.

_ERR_CTX_USE

Method used other than as part of an event enabled for it.

_ERR_INVALID_TYPE

A variable used in the method is not a suitable Adelia type.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

_ERR_STRING_LEN

The data to be read includes a character string longer than the Adelia variable.

_ERR_VAR_NOT_AVAIL

The data to be read does not contain data of the specified Adelia type.

_ERR_INVALID_FORMAT

The specified format name does not match any data or is invalid.

Conditions for use

This method can only be used with the DD_EnterDrag, DD_DragOver and DD_Drop events.


Notes:

    • This method is not implemented by the Java generator.
    • It is not available in Mobile generation.


Adds data (i.e. the contents of the Adelia variables) to the data to be transferred by a drag and drop operation. This data is stored in the object until the end of the drag and drop operation, and is then deleted automatically.


Notes:

    • Calling this method with an array containing x elements has the same effect as calling the method x times with a variable containing the individual array elements.
    • No distinction is made between the extended and packed numerical data types.


Syntax

CALL_METHOD ImageObjectName DD_WRITE_DATA AdeliaVar DataNumber ReturnCode

Parameters

Possible types for the AdeliaVar parameter (I):

ALPHA, DATE, TIME, NUM_E, NUM_P, NUM_BIN_2, NUM_BIN_4, BOOL, TIMESTAMP, IMAGE

Variable or array containing the data.

NUM_BIN_4 DataNumber (I/O)

Number of data items to be added. With variables, this parameter must be 1, and with arrays, less than or equal to the number of elements in the array.

Once the method has been called, it contains the number of data items written.

NUM_BIN_4 ReturnCode (O)

Return code for the operation.

Possible values:

_ERR_OK

Method run successfully.

_ERR_INVALID_TYPE

A variable used in the method is not a suitable Adelia type.

_ERR_INVALID_PARAM

One or more parameters have invalid values.

Conditions for use

None


Note: This method is not implemented in Java and Mobile generation.


Exports the graphic into a bitmap file in the requested format. If the format is not indicated (*BLANK), it is deduced from the file extension.

The possible file formats are the same as for the function VaToolBxSaveBitmapEx: BMP, PCX, PNG, PPM, PGM, PBM, JPEG, TGA, GIF, TIFF, MNG and JP2.


In Adelia Cloud generation the available file formats are restricted to BMP, PNG, JPG, TIFF and GIF.


Attention: if the graphic has been determined using the LOAD_IMAGE_FROM_URL method, the export will only succeed if the URL is not secure and is accessible from the Cloud application server.


Syntax

CALL_METHOD ImageObjectName EXPORT_BITMAP FileName Format ReturnCode

Parameters

ALPHA(n) FileName (I)

Name of the file produced.

ALPHA(n) Format (I)

Image format.

BOOL ReturnCode (O)

Return code for the operation. Returns *FALSE if the export failed.

Conditions for use

None


Note: This method is not implemented in Java and Mobile generation.


Exports the graphic into an image variable. The variable will contain the image data in the requested format.

The possible file formats are the same as for the function VaToolBxSaveBitmapEx: BMP, PCX, PNG, PPM, PGM, PBM, JPEG, TGA, GIF, TIFF, MNG and JP2.


In Adelia Cloud generation the available file formats are restricted to BMP, PNG, JPG, TIFF and GIF.


Attention: if the graphic has been determined using the LOAD_IMAGE_FROM_URL method, the export will only succeed if the URL is not secure and is accessible from the Cloud application server.

Syntax
CALL_METHOD ImageObjectName EXPORT_IMAGE Image Format ReturnCode

Parameters

IMAGE Image (O)

Image variable as output.

ALPHA(n) Format (I)

Image format.

BOOL ReturnCode (O)

Return code for the operation. Returns *FALSE if the export failed.
Conditions for use None


Note: This method is not implemented in Java and Mobile generation.


Displays the graphic stored in a Bitmap file inside the object.

(The following extensions are supported for the Bitmap file: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga and wmf. With the Adelia Mobile runtime, the only formats allowed are: bmp, gif, jpg, png and ico.)


Syntax

CALL_METHOD NameImageObject LOAD_BITMAP NameBMPFile

Parameters

NameBMPFile

ALPHA(250) type

Conditions for use

None


Example >>


Displays the graphic stored in an image variable inside the object.

The image variable must be the content of a file containing an image.

The following image file extensions are supported: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga, wmf.

In Adelia Cloud generation, the variable content may also be an image in DIB (Device Independent Bitmap) format.


Caution: In Windows generation, the Image variable may be, for example, the result of the VaToolBxFileToImage function but must not be the BITMAP property of an IMAGE object or the result of the VaToolBxLoadBitmap function.


Syntax

CALL_METHOD NameImageObject LOAD_IMAGE Image ReturnCode

Parameters

IMAGE Image (E)

Content of an image file.

BOOL ReturnCode (S)

Return code for the operation. Returns *FALSE if the content of the image variable is incorrect.

Conditions for use

None


Note: This method is not implemented in Java and Mobile generation.


Displays the graphic situated at the URL address inside the object.

The following image file extensions are supported: bmp, cut, emf, eps, ico, gif, iff, jpg, jp2, mng, pbm, pcx, pgm, png, ppm, psp, tif, tga, wmf.


Syntax

CALL_METHOD ImageObjectName LOAD_IMAGE_FROM_URL UrlAddress   ReturnCode

ALPHA (500)

URL address specifying the Image file.

Input parameter.

NUM_BIN_4  ReturnCode

Return code for the operation.

Output parameter.

Possible values:

-1: Error while adding image.

> 0: Error while running http query.

0: Operation completed successfully.

Warning: In Cloud generation, the value of the return code has no significance.


Conditions for use

None


Note: This method is not implemented in Java and Mobile generation.


 
 



↑ Top of page