[Overview][Constants][Types][Procedures and functions][Index] | Reference for unit 'LCLPlatformDef' (#lcl)

# BuildLCLWidgetType

Gets the TLCLPlatform enumeration value for the current platform.

## Declaration

Source position: lclplatformdef.pas line 82

`const BuildLCLWidgetType: TLCLPlatform = lpGtk2;`

## Description

BuildLCLWidgetType is a TLCLPlatform variable with an enumeration value which identifies the widgetset for the current platform. Its value is determined by the compiler define active when the LCL was built. For example:

MSWindows
  Sets the variable to lpWin32.
darwin
  Sets the variable to lpCarbon for systems using the PowerPC processor. Otherwise, the variable is set to lpCocoa.
HASAMIGA
  Sets the variable to lpMUI.

For other platforms where a specific compiler define was not set, the variable is set to lpGtk2.

The value in BuildLCLWidgetType is used in the lazbuild utility to get the target widgetset used for the various platform defines, and when GetDefaultLCLWidgetType is called from the LCL interface.

## Version info

For LCL version 2.2 and higher, the default widgetset for the macOS (Darwin) platform uses the Cocoa (lpCocoa) API. For versions prior to 2.2, the default widgetset used was the Carbon (lpCarbon) API. For Macs using the PowerPC processor, the widgetset continues to use the Carbon (lpCarbon) API.

## See also

TLCLPlatform |  | Represents the supported platforms for the LCL.
GetDefaultLCLWidgetType |  | Gets the enumeration value representing the LCL platform for the current widgetset.