sixtyfps-compilerlib 0.1.6

Internal SixtyFPS compiler library
Documentation
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)

export { NativeStyleMetrics as StyleMetrics }

export ScrollView := NativeScrollView {
    property <length> viewport-width <=> fli.viewport-width;
    property <length> viewport-height <=> fli.viewport-height;
    property <length> viewport-x <=> fli.viewport-x;
    property <length> viewport-y <=> fli.viewport-y;
    property <length> visible-width <=> fli.width;
    property <length> visible-height <=> fli.height;

    vertical-max: fli.viewport-height > fli.height ? fli.viewport-height - fli.height : 0phx;
    vertical-page-size: fli.height;

    horizontal-max: fli.viewport-width > fli.width ? fli.viewport-width - fli.width : 0phx;
    horizontal-page-size: fli.width;

    fli := Flickable {
        x: root.native-padding-left;
        width: root.width - root.native-padding-left - root.native-padding-right;
        y: root.native-padding-top;
        height: root.height - root.native-padding-top - root.native-padding-bottom;

        @children
        interactive: false;
        viewport-y <=> root.vertical-value;
        viewport-x <=> root.horizontal-value;
    }
}