%L_CLASSINFO

Return information about a list class

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
result = %L_CLASSINFO(listclass_id, info_type)

or

xcall L_CLASSINFO(listclass_id, info_type)

Return value

result

A value that is specific to info_type. (^VAL)

Arguments

listclass_id

The ID of a list class window. (n)

info_type

One of the following to indicate the type of information to be returned (defined in tools.def): (n)

D_LNAME[, name]

Returns the trimmed length of the list class name in result and the name of the list class in name. (a)

D_LPROW

Returns the placement row specified for the list class. Returns zero if no placement row was specified.

D_LPCOL

Returns the placement column specified for the list class. Returns zero if no placement column was specified.

D_LHEIGHT

Returns the list class setting for the number of items to be displayed at one time. Returns zero if this was not specified.

D_LHDRLNS

Returns the number of header lines specified for the list class. Returns zero if the number of headers was not specified.

D_LFTRLNS

Returns the number of footer lines specified for the list class. Returns zero if the number of footers was not specified.

D_LHDRSTATIC

Returns true if headers for the list class are set to static. Otherwise, returns false.

D_LFTRSTATIC

Returns true if footers for the list class are set to static. Otherwise, returns false.

D_LNONULL

Returns true if the list class is set to prevent an empty list. Otherwise, returns false.

D_LSNAPSHOT

Returns true if the list class is set to maintain input window control information for list items. Otherwise, returns false.

D_LMETHOD, methodtype[, method]

Returns information about the method specified by methodtype. The trimmed length of the method name is returned in result. Zero is returned if no method was specified for the list class when it was created.

Optionally, the method name or address can be returned in method. If method is passed as a, the name of the method is returned; if it is passed as n, the address is returned. (If method is n and the method is not available—e.g., the routine doesn’t exist or the ELB hasn’t been opened yet—Toolkit will generate a trappable runtime error.) (a or n)

methodtype is one of the following: (n)

D_LLOAD = Load method

D_LARRIVE = Arrive method for list items

D_LLEAVE = Leave method for list items

D_LDBLCLK = Double-click method for list items

D_LOPTIONS[, options]

Returns information about the options string defined for the list class. The trimmed length of the string is returned in result (or zero if no option string was defined for the list class). The options string itself can optionally be returned in options. If no options string was defined for the list class, options is cleared to all spaces. (a)

Discussion

%L_CLASSINFO returns information about a list class (a window created by the .LISTCLASS script command or the L_CLASS routine).

To return most of the most of the info_type options, you must call %L_CLASSINFO as a function because information is returned in the return value (result). A few info_type options (such as D_LNAME and D_LMETHOD) include arguments that return additional information. So, for example, if you call %L_CLASSINFO as a function and pass D_LNAME, it will return the name of the list class in name and the length of the list class name in result. However, if you make this same call but as a subroutine, it will return only the name of the list class in name. Calling D_LPROW, for example, as a subroutine is pointless because nothing will be returned.

See also

.LISTCLASS script command and L_CLASS routine for details on information returned by this function.

Examples

The following example returns the length of the list class’s name in length, and it returns the name of the list class in lc_name:

length = %L_CLASSINFO(lc_id, D_LNAME, lc_name)

The next example returns the length of the name of the load method for the list class, and it returns the method name in meth_name:

length = %L_CLASSINFO(lc_id, D_LMETHOD, D_LLOAD, meth_name)