1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
3
4import { StandardButton, Button, GridBox } from "std-widgets.slint";
5
6TestCase := Dialog {
7 Rectangle {
8 background: red;
9 preferred-width: 600px;
10 preferred-height: 600px;
11 }
12
13 StandardButton { kind: help; }
14 StandardButton { kind: ok; }
15 StandardButton { kind: cancel; }
16 StandardButton { kind: apply; }
17 StandardButton { kind: reset; }
18 StandardButton { kind: yes; }
19 Button {
20 text: "Action";
21 dialog-button-role: action;
22 }
23}
24
25/*
26```rust
27let instance = TestCase::new().unwrap();
28instance.on_help_clicked(|| { dbg!() });
29instance.on_cancel_clicked(|| { dbg!() });
30```
31
32```cpp
33auto handle = TestCase::create();
34const TestCase &instance = *handle;
35instance.on_help_clicked([] { });
36instance.on_cancel_clicked([] { });
37```
38
39*/
40