Built-in macros: $ScreenSize

The $ScreenSize macro is replaced by the value specified in the ScreenSize attribute of the profile the code is currently compiled for.

Content

<unsigned‑integer‑literal,unsigned‑integer‑literal>

Discussion

This macro results in a point literal. The original attribute ScreenSize determines the size in pixel of the display in the target device. For example, if the display is configured to have 320x240 pixel size, the macro results in following value:

<320,240>

The macro $ScreenSize can be used inside a regular Chora expression wherever a point operand is allowed. For example, you can use the macro to adjust the size of a view so it fills the entire display area:

SomeView.Bounds.size = $ScreenSize; OtherView.Bounds.w = $ScreenSize.x;