// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 export { NativeStyleMetrics as StyleMetrics } // This internal ScrollView has some additional properties, used by the // StandardTableView, which are not currently exposed by the public ScrollView // (since then it would need to be done for all styles). export component InternalScrollView { in-out property viewport-width <=> fli.viewport-width; in-out property viewport-height <=> fli.viewport-height; in-out property viewport-x <=> fli.viewport-x; in-out property viewport-y <=> fli.viewport-y; out property visible-width <=> fli.width; out property visible-height <=> fli.height; in-out property has-focus <=> native.has-focus; in property enabled <=> native.enabled; in property vertical-scrollbar-policy <=> native.vertical-scrollbar-policy; in property horizontal-scrollbar-policy <=> native.horizontal-scrollbar-policy; in property mouse-drag-pan-enabled <=> fli.interactive; // Used by the StandardTableView out property native-padding-left: native.native-padding-left; out property native-padding-right: native.native-padding-right; out property native-padding-top: native.native-padding-top; out property native-padding-bottom: native.native-padding-bottom; in property header-height: 0; callback scrolled <=> fli.flicked; preferred-height: 100%; preferred-width: 100%; min-height: native.min-height; min-width: native.min-width; native := NativeScrollView { 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: native.native-padding-left; width: root.width - native.native-padding-left - native.native-padding-right; y: native.native-padding-top + header-height; height: root.height - self.y - native.native-padding-bottom; @children interactive: false; viewport-y <=> native.vertical-value; viewport-x <=> native.horizontal-value; } } // This is an internal ListView, used by the StandardTableView. It needs to be // called "ListView", for the compiler to recognize it. export component ListView inherits InternalScrollView { @children }