mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-13 08:05:19 +00:00
35 lines
748 B
Text
35 lines
748 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
|
|
|
import {Button, AboutSlint} from "std-widgets.slint";
|
|
|
|
export global Logic {
|
|
callback increment(int) -> int;
|
|
}
|
|
|
|
export struct FooBar {
|
|
abc: int, def: string
|
|
}
|
|
|
|
component R {
|
|
property <FooBar> foo;
|
|
Rectangle {
|
|
TouchArea {}
|
|
}
|
|
}
|
|
|
|
export component App inherits Window {
|
|
preferred-width: 800px;
|
|
preferred-height: 600px;
|
|
property <int> count;
|
|
|
|
VerticalLayout {
|
|
AboutSlint { }
|
|
Button {
|
|
text: "Hello";
|
|
clicked => { count = Logic.increment(count); }
|
|
}
|
|
Text { text: count; }
|
|
R { }
|
|
}
|
|
}
|