BoolPointer

elements.BoolPointer (Typedef)

Function type for accessing and modifying boolean values by reference.

This type definition enables functional-style boolean value manipulation, commonly used in the elements UI system for two-way data binding between UI components and data models.

Usage example:

var myBool = true;
var pointer:BoolPointer = (val) -> {
    if (val != null) myBool = val;
    return myBool;
};

// Read current value
var current = pointer();

// Set new value
pointer(false);