mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 13:24:48 +00:00
Replace references to the .60 files that are now renamed with .slint
This commit is contained in:
parent
0c0a783095
commit
d706d63ce1
65 changed files with 113 additions and 113 deletions
|
@ -29,14 +29,14 @@ let slint = require("slint");
|
||||||
This step also installs a hook in NodeJS that allows you to import `.60` files directly:
|
This step also installs a hook in NodeJS that allows you to import `.60` files directly:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
let ui = require("../ui/main.60");
|
let ui = require("../ui/main.slint");
|
||||||
```
|
```
|
||||||
|
|
||||||
Combining these two steps leads us to the obligator "Hello World" example:
|
Combining these two steps leads us to the obligator "Hello World" example:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
require("slint");
|
require("slint");
|
||||||
let ui = require("../ui/main.60");
|
let ui = require("../ui/main.slint");
|
||||||
let main = new ui.Main();
|
let main = new ui.Main();
|
||||||
main.run();
|
main.run();
|
||||||
```
|
```
|
||||||
|
@ -54,7 +54,7 @@ an object which allow to initialize the value of public properties or callbacks.
|
||||||
require("slint");
|
require("slint");
|
||||||
// In this example, the main.60 file exports a module which
|
// In this example, the main.60 file exports a module which
|
||||||
// has a counter property and a clicked callback
|
// has a counter property and a clicked callback
|
||||||
let ui = require("ui/main.60");
|
let ui = require("ui/main.slint");
|
||||||
let component = new ui.MainWindow({
|
let component = new ui.MainWindow({
|
||||||
counter: 42,
|
counter: 42,
|
||||||
clicked: function() { console.log("hello"); }
|
clicked: function() { console.log("hello"); }
|
||||||
|
|
|
@ -28,7 +28,7 @@ In the `build.rs` file:
|
||||||
|
|
||||||
```ignore
|
```ignore
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("ui/hello.60").unwrap();
|
sixtyfps_build::compile("ui/hello.slint").unwrap();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -808,7 +808,7 @@ export global Logic := {
|
||||||
It's also possible to export globals from other files:
|
It's also possible to export globals from other files:
|
||||||
|
|
||||||
```60,ignore
|
```60,ignore
|
||||||
import { Logic as MathLogic } from "math.60";
|
import { Logic as MathLogic } from "math.slint";
|
||||||
export { MathLogic } // known as "MathLogic" when using native APIs to access globals
|
export { MathLogic } // known as "MathLogic" when using native APIs to access globals
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -858,7 +858,7 @@ export Button := Rectangle {
|
||||||
Similarly, components exported from other files can be accessed by importing them:
|
Similarly, components exported from other files can be accessed by importing them:
|
||||||
|
|
||||||
```60,ignore
|
```60,ignore
|
||||||
import { Button } from "./button.60";
|
import { Button } from "./button.slint";
|
||||||
|
|
||||||
App := Rectangle {
|
App := Rectangle {
|
||||||
// ...
|
// ...
|
||||||
|
@ -872,8 +872,8 @@ In the event that two files export a type under the same name, then you have the
|
||||||
of assigning a different name at import time:
|
of assigning a different name at import time:
|
||||||
|
|
||||||
```60,ignore
|
```60,ignore
|
||||||
import { Button } from "./button.60";
|
import { Button } from "./button.slint";
|
||||||
import { Button as CoolButton } from "../other_theme/button.60";
|
import { Button as CoolButton } from "../other_theme/button.slint";
|
||||||
|
|
||||||
App := Rectangle {
|
App := Rectangle {
|
||||||
// ...
|
// ...
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
use chrono::NaiveDate;
|
use chrono::NaiveDate;
|
||||||
use sixtyfps::SharedString;
|
use sixtyfps::SharedString;
|
||||||
|
|
||||||
sixtyfps::sixtyfps!(import { Booker } from "booker.60";);
|
sixtyfps::sixtyfps!(import { Booker } from "booker.slint";);
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let booker = Booker::new();
|
let booker = Booker::new();
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("gallery.60").unwrap();
|
sixtyfps_build::compile("gallery.slint").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,10 +42,10 @@
|
||||||
</div>
|
</div>
|
||||||
<canvas id="canvas" width="640" height="480"></canvas>
|
<canvas id="canvas" width="640" height="480"></canvas>
|
||||||
<p>
|
<p>
|
||||||
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/gallery/gallery.60">
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/gallery/gallery.slint">
|
||||||
View Source Code on GitHub</a> -
|
View Source Code on GitHub</a> -
|
||||||
<a
|
<a
|
||||||
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/gallery/gallery.60">
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/gallery/gallery.slint">
|
||||||
Edit in the online code editor
|
Edit in the online code editor
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
import { MenuBar, TopBar, Usage, IndoorTemperature, Humidity, MyDevices,
|
import { MenuBar, TopBar, Usage, IndoorTemperature, Humidity, MyDevices,
|
||||||
UsageDiagram, LightIntensity, Clock
|
UsageDiagram, LightIntensity, Clock
|
||||||
} from "iot-dashboard.60";
|
} from "iot-dashboard.slint";
|
||||||
|
|
||||||
|
|
||||||
MainContent := VerticalLayout {
|
MainContent := VerticalLayout {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
let slint = require("slint");
|
let slint = require("slint");
|
||||||
let ui = require("./memory.60");
|
let ui = require("./memory.slint");
|
||||||
let window = new ui.MainWindow();
|
let window = new ui.MainWindow();
|
||||||
|
|
||||||
let initial_tiles = window.memory_tiles;
|
let initial_tiles = window.memory_tiles;
|
||||||
|
|
|
@ -9,7 +9,7 @@ use std::time::Duration;
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
|
||||||
sixtyfps::sixtyfps! {
|
sixtyfps::sixtyfps! {
|
||||||
import { MainWindow } from "memory.60";
|
import { MainWindow } from "memory.slint";
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(start))]
|
#[cfg_attr(target_arch = "wasm32", wasm_bindgen(start))]
|
||||||
|
|
|
@ -11,7 +11,7 @@ use wasm_bindgen::prelude::*;
|
||||||
mod wasm_backend;
|
mod wasm_backend;
|
||||||
|
|
||||||
sixtyfps::sixtyfps! {
|
sixtyfps::sixtyfps! {
|
||||||
import { MainWindow } from "plotter.60";
|
import { MainWindow } from "plotter.slint";
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pdf(x: f64, y: f64) -> f64 {
|
fn pdf(x: f64, y: f64) -> f64 {
|
||||||
|
|
|
@ -36,7 +36,7 @@ private:
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
sixtyfps::interpreter::ComponentCompiler compiler;
|
sixtyfps::interpreter::ComponentCompiler compiler;
|
||||||
auto definition = compiler.build_from_path(SOURCE_DIR "/../ui/printerdemo.60");
|
auto definition = compiler.build_from_path(SOURCE_DIR "/../ui/printerdemo.slint");
|
||||||
|
|
||||||
for (auto diagnostic : compiler.diagnostics()) {
|
for (auto diagnostic : compiler.diagnostics()) {
|
||||||
std::cerr << (diagnostic.level == sixtyfps::interpreter::DiagnosticLevel::Warning
|
std::cerr << (diagnostic.level == sixtyfps::interpreter::DiagnosticLevel::Warning
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
let slint = require("slint");
|
let slint = require("slint");
|
||||||
|
|
||||||
let demo = require("../ui/printerdemo.60");
|
let demo = require("../ui/printerdemo.slint");
|
||||||
let window = new demo.MainWindow();
|
let window = new demo.MainWindow();
|
||||||
|
|
||||||
window.ink_levels = [
|
window.ink_levels = [
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("../ui/printerdemo.60").unwrap();
|
sixtyfps_build::compile("../ui/printerdemo.slint").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,10 +64,10 @@
|
||||||
</div>
|
</div>
|
||||||
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
|
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
|
||||||
<p class="hide-in-mobile-landscape">
|
<p class="hide-in-mobile-landscape">
|
||||||
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/printerdemo/ui/printerdemo.60">
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/printerdemo/ui/printerdemo.slint">
|
||||||
View Source Code on GitHub</a> -
|
View Source Code on GitHub</a> -
|
||||||
<a
|
<a
|
||||||
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/printerdemo/ui/printerdemo.60">
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/printerdemo/ui/printerdemo.slint">
|
||||||
Edit in the online code editor
|
Edit in the online code editor
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton, CheckBox } from "./common.60";
|
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton, CheckBox } from "./common.slint";
|
||||||
import { PrinterQueue } from "./printer_queue.60";
|
import { PrinterQueue } from "./printer_queue.slint";
|
||||||
|
|
||||||
|
|
||||||
export CopyPage := Page {
|
export CopyPage := Page {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, PushButton } from "./common.60";
|
import { DemoPalette, Page, PushButton } from "./common.slint";
|
||||||
import { CopyPage } from "./copy_page.60";
|
import { CopyPage } from "./copy_page.slint";
|
||||||
import { ScanPage } from "./scan_page.60";
|
import { ScanPage } from "./scan_page.slint";
|
||||||
import { PrintPage } from "./print_page.60";
|
import { PrintPage } from "./print_page.slint";
|
||||||
import { PrinterQueueView } from "./printer_queue.60";
|
import { PrinterQueueView } from "./printer_queue.slint";
|
||||||
import { UsbPage } from "./usb_page.60";
|
import { UsbPage } from "./usb_page.slint";
|
||||||
|
|
||||||
ActionButton := Rectangle {
|
ActionButton := Rectangle {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page } from "common.60";
|
import { DemoPalette, Page } from "common.slint";
|
||||||
|
|
||||||
export struct InkLevel := {
|
export struct InkLevel := {
|
||||||
color: color,
|
color: color,
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, SpinBox, Label, PushButton } from "./common.60";
|
import { DemoPalette, Page, SpinBox, Label, PushButton } from "./common.slint";
|
||||||
import { WidePrinterQueueList } from "./printer_queue.60";
|
import { WidePrinterQueueList } from "./printer_queue.slint";
|
||||||
|
|
||||||
|
|
||||||
export PrintPage := Page {
|
export PrintPage := Page {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, PushButton } from "./common.60";
|
import { DemoPalette, PushButton } from "./common.slint";
|
||||||
|
|
||||||
export struct PrinterQueueItem := {
|
export struct PrinterQueueItem := {
|
||||||
status: string, // WAITING..., PRINTING
|
status: string, // WAITING..., PRINTING
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page } from "common.60";
|
import { DemoPalette, Page } from "common.slint";
|
||||||
import { HomePage } from "./home_page.60";
|
import { HomePage } from "./home_page.slint";
|
||||||
import { InkLevel, InkPage } from "./ink_page.60";
|
import { InkLevel, InkPage } from "./ink_page.slint";
|
||||||
import { SettingsPage } from "./settings_page.60";
|
import { SettingsPage } from "./settings_page.slint";
|
||||||
import { PrinterQueue } from "./printer_queue.60";
|
import { PrinterQueue } from "./printer_queue.slint";
|
||||||
|
|
||||||
// re-export for the native code
|
// re-export for the native code
|
||||||
export { PrinterQueue }
|
export { PrinterQueue }
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton } from "./common.60";
|
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton } from "./common.slint";
|
||||||
import { PrinterQueue } from "./printer_queue.60";
|
import { PrinterQueue } from "./printer_queue.slint";
|
||||||
|
|
||||||
export ScanPage := Page {
|
export ScanPage := Page {
|
||||||
has-back-button: true;
|
has-back-button: true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, SpinBox, ComboBox, CheckBox, Label } from "common.60";
|
import { DemoPalette, Page, SpinBox, ComboBox, CheckBox, Label } from "common.slint";
|
||||||
|
|
||||||
export SettingsPage := Page {
|
export SettingsPage := Page {
|
||||||
header: "Settings";
|
header: "Settings";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton, CheckBox } from "./common.60";
|
import { DemoPalette, Page, SpinBox, Label, ComboBox, PushButton, CheckBox } from "./common.slint";
|
||||||
import { StandardListView } from "std-widgets.slint";
|
import { StandardListView } from "std-widgets.slint";
|
||||||
import { PrinterQueue } from "./printer_queue.60";
|
import { PrinterQueue } from "./printer_queue.slint";
|
||||||
|
|
||||||
|
|
||||||
export UsbPage := Page {
|
export UsbPage := Page {
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
// import "sixtyfps";
|
// import "sixtyfps";
|
||||||
require("slint");
|
require("slint");
|
||||||
// import * as demo from "../ui/printerdemo.60";
|
// import * as demo from "../ui/printerdemo.slint";
|
||||||
let demo = require("../ui/printerdemo.60");
|
let demo = require("../ui/printerdemo.slint");
|
||||||
let window = new demo.MainWindow();
|
let window = new demo.MainWindow();
|
||||||
|
|
||||||
window.ink_levels = [
|
window.ink_levels = [
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("../ui/printerdemo.60").unwrap();
|
sixtyfps_build::compile("../ui/printerdemo.slint").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,10 +65,10 @@
|
||||||
</div>
|
</div>
|
||||||
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
|
<canvas id="canvas" width="640" height="480" unselectable="on"></canvas>
|
||||||
<p class="hide-in-mobile-landscape">
|
<p class="hide-in-mobile-landscape">
|
||||||
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/printerdemo_old/ui/printerdemo.60">
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/printerdemo_old/ui/printerdemo.slint">
|
||||||
View Source Code on GitHub</a> -
|
View Source Code on GitHub</a> -
|
||||||
<a
|
<a
|
||||||
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/printerdemo_old/ui/printerdemo.60">
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/printerdemo_old/ui/printerdemo.slint">
|
||||||
Edit in the online code editor
|
Edit in the online code editor
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView, GridBox } from "std-widgets.slint";
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView, GridBox } from "std-widgets.slint";
|
||||||
import { Label, Page, Preview } from "common.60";
|
import { Label, Page, Preview } from "common.slint";
|
||||||
|
|
||||||
|
|
||||||
export CopyPage := Page {
|
export CopyPage := Page {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
||||||
import { Label, Page, Preview } from "common.60";
|
import { Label, Page, Preview } from "common.slint";
|
||||||
|
|
||||||
export FaxPage := Page {
|
export FaxPage := Page {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView, GridBox } from "std-widgets.slint";
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView, GridBox } from "std-widgets.slint";
|
||||||
import { Label, Page, Preview } from "common.60";
|
import { Label, Page, Preview } from "common.slint";
|
||||||
|
|
||||||
PrintPage := Page {
|
PrintPage := Page {
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
||||||
import { Label, Page, Preview } from "common.60";
|
import { Label, Page, Preview } from "common.slint";
|
||||||
import { CopyPage } from "copy_page.60";
|
import { CopyPage } from "copy_page.slint";
|
||||||
import { FaxPage } from "fax_page.60";
|
import { FaxPage } from "fax_page.slint";
|
||||||
import { PrintPage } from "print_page.60";
|
import { PrintPage } from "print_page.slint";
|
||||||
import { SettingsPage } from "settings_page.60";
|
import { SettingsPage } from "settings_page.slint";
|
||||||
|
|
||||||
TopPanel := Rectangle {
|
TopPanel := Rectangle {
|
||||||
property<int> active-page: 0;
|
property<int> active-page: 0;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
import { SpinBox, Button, CheckBox, Slider, GroupBox, StandardListView } from "std-widgets.slint";
|
||||||
import { Label, Page, Preview } from "common.60";
|
import { Label, Page, Preview } from "common.slint";
|
||||||
|
|
||||||
export SettingsPage := Page {
|
export SettingsPage := Page {
|
||||||
VerticalLayout {
|
VerticalLayout {
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("slide_puzzle.60").unwrap();
|
sixtyfps_build::compile("slide_puzzle.slint").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/slide_puzzle/">
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/slide_puzzle/">
|
||||||
View Source Code on GitHub</a> -
|
View Source Code on GitHub</a> -
|
||||||
<a
|
<a
|
||||||
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/slide_puzzle/slide_puzzle.60">
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/slide_puzzle/slide_puzzle.slint">
|
||||||
Edit in the online code editor
|
Edit in the online code editor
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
// import "sixtyfps";
|
// import "sixtyfps";
|
||||||
let slint = require("slint");
|
let slint = require("slint");
|
||||||
// import * as demo from "../ui/todo.60";
|
// import * as demo from "../ui/todo.slint";
|
||||||
let demo = require("../ui/todo.60");
|
let demo = require("../ui/todo.slint");
|
||||||
let app = new demo.MainWindow();
|
let app = new demo.MainWindow();
|
||||||
|
|
||||||
let model = new slint.ArrayModel([
|
let model = new slint.ArrayModel([
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
sixtyfps_build::compile("../ui/todo.60").unwrap();
|
sixtyfps_build::compile("../ui/todo.slint").unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/todo/">
|
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/todo/">
|
||||||
View Source Code on GitHub</a> -
|
View Source Code on GitHub</a> -
|
||||||
<a
|
<a
|
||||||
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/todo/ui/todo.60">
|
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/todo/ui/todo.slint">
|
||||||
Edit in the online code editor
|
Edit in the online code editor
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -20,7 +20,7 @@ use crate::typeregister::TypeRegister;
|
||||||
/// At this point, it really should already contain the basic Types (string, int, ...)
|
/// At this point, it really should already contain the basic Types (string, int, ...)
|
||||||
pub fn load_builtins(register: &mut TypeRegister) {
|
pub fn load_builtins(register: &mut TypeRegister) {
|
||||||
let mut diag = crate::diagnostics::BuildDiagnostics::default();
|
let mut diag = crate::diagnostics::BuildDiagnostics::default();
|
||||||
let node = crate::parser::parse(include_str!("builtins.60").into(), None, &mut diag);
|
let node = crate::parser::parse(include_str!("builtins.slint").into(), None, &mut diag);
|
||||||
if !diag.is_empty() {
|
if !diag.is_empty() {
|
||||||
let vec = diag.to_string_vec();
|
let vec = diag.to_string_vec();
|
||||||
#[cfg(feature = "display-diagnostics")]
|
#[cfg(feature = "display-diagnostics")]
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { Rec12 } from "../../typeloader/recursive_import1.60";
|
import { Rec12 } from "../../typeloader/recursive_import1.slint";
|
||||||
// ^error{No exported type called 'Rec12' found in ".*recursive_import1.60"}
|
// ^error{No exported type called 'Rec12' found in ".*recursive_import1.slint"}
|
||||||
Blah := Rec12 {
|
Blah := Rec12 {
|
||||||
// ^error{Unknown type Rec12}
|
// ^error{Unknown type Rec12}
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { X } from "../../typeloader/incpath/should_fail2.60";
|
import { X } from "../../typeloader/incpath/should_fail2.slint";
|
||||||
|
|
||||||
Foo := Rectangle {
|
Foo := Rectangle {
|
||||||
x:= X {
|
x:= X {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { Y } from "../../typeloader/incpath/should_fail3.60";
|
import { Y } from "../../typeloader/incpath/should_fail3.slint";
|
||||||
|
|
||||||
Foo := Rectangle {
|
Foo := Rectangle {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { Z } from "../../typeloader/incpath/should_fail4.60";
|
import { Z } from "../../typeloader/incpath/should_fail4.slint";
|
||||||
|
|
||||||
Foo := Rectangle {
|
Foo := Rectangle {
|
||||||
Z {
|
Z {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { NotThere } from "file_not_there.60";
|
import { NotThere } from "file_not_there.slint";
|
||||||
// ^error{Cannot find requested import "file_not_there.60" in the include search path}
|
// ^error{Cannot find requested import "file_not_there.slint" in the include search path}
|
||||||
|
|
||||||
import { NotExported } from "../../typeloader/incpath/local_helper_type.60";
|
import { NotExported } from "../../typeloader/incpath/local_helper_type.slint";
|
||||||
// ^error{No exported type called 'NotExported' found in ".*\.\./\.\./typeloader/incpath/local_helper_type.60}
|
// ^error{No exported type called 'NotExported' found in ".*\.\./\.\./typeloader/incpath/local_helper_type.60}
|
||||||
|
|
||||||
import { Nothing } from "";
|
import { Nothing } from "";
|
||||||
// ^error{Unexpected empty import url}
|
// ^error{Unexpected empty import url}
|
||||||
|
|
||||||
import "invalid_export.60";
|
import "invalid_export.slint";
|
||||||
// ^error{Import names are missing. Please specify which types you would like to import}
|
// ^error{Import names are missing. Please specify which types you would like to import}
|
||||||
|
|
||||||
import "myimage.png";
|
import "myimage.png";
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SomeRect } from "../../typeloader/incpath/local_helper_type.60";
|
import { SomeRect } from "../../typeloader/incpath/local_helper_type.slint";
|
||||||
|
|
||||||
import { X } from "../../typeloader/incpath/should_fail.60";
|
import { X } from "../../typeloader/incpath/should_fail.slint";
|
||||||
|
|
||||||
Blah := X {
|
Blah := X {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { AnotherType } from "./incpath/dependency_from_incpath.60";
|
import { AnotherType } from "./incpath/dependency_from_incpath.slint";
|
||||||
|
|
||||||
export SubType := AnotherType {}
|
export SubType := AnotherType {}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SubType } from "./dependency_local.60";
|
import { SubType } from "./dependency_local.slint";
|
||||||
import { AnotherType } from "dependency_from_incpath.60";
|
import { AnotherType } from "dependency_from_incpath.slint";
|
||||||
|
|
||||||
export Main := Rectangle {
|
export Main := Rectangle {
|
||||||
SubType {}
|
SubType {}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { SomeRect } from "./local_helper_type.60";
|
import { SomeRect } from "./local_helper_type.slint";
|
||||||
|
|
||||||
export AnotherType := SomeRect {}
|
export AnotherType := SomeRect {}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { Rec2 } from "./recursive_import2.60";
|
import { Rec2 } from "./recursive_import2.slint";
|
||||||
|
|
||||||
export Rec1 := Rectangle {
|
export Rec1 := Rectangle {
|
||||||
property <int> Hello: 42;
|
property <int> Hello: 42;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { Rec1 } from "./recursive_import1.60";
|
import { Rec1 } from "./recursive_import1.slint";
|
||||||
// ^error{Recursive import of .*recursive_import1.60}
|
// ^error{Recursive import of .*recursive_import1.60}
|
||||||
|
|
||||||
export Rec2 := Rectangle {
|
export Rec2 := Rectangle {
|
||||||
|
|
|
@ -453,7 +453,7 @@ fn test_dependency_loading() {
|
||||||
compiler_config.style = Some("fluent".into());
|
compiler_config.style = Some("fluent".into());
|
||||||
|
|
||||||
let mut main_test_path = test_source_path;
|
let mut main_test_path = test_source_path;
|
||||||
main_test_path.push("dependency_test_main.60");
|
main_test_path.push("dependency_test_main.slint");
|
||||||
|
|
||||||
let mut test_diags = crate::diagnostics::BuildDiagnostics::default();
|
let mut test_diags = crate::diagnostics::BuildDiagnostics::default();
|
||||||
let doc_node = crate::parser::parse_file(main_test_path, &mut test_diags).unwrap();
|
let doc_node = crate::parser::parse_file(main_test_path, &mut test_diags).unwrap();
|
||||||
|
@ -489,7 +489,7 @@ fn test_load_from_callback_ok() {
|
||||||
compiler_config.open_import_fallback = Some(Rc::new(move |path| {
|
compiler_config.open_import_fallback = Some(Rc::new(move |path| {
|
||||||
let ok_ = ok_.clone();
|
let ok_ = ok_.clone();
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
assert_eq!(path, "../FooBar.60");
|
assert_eq!(path, "../FooBar.slint");
|
||||||
assert!(!ok_.get());
|
assert!(!ok_.get());
|
||||||
ok_.set(true);
|
ok_.set(true);
|
||||||
Some(Ok("export XX := Rectangle {} ".to_owned()))
|
Some(Ok("export XX := Rectangle {} ".to_owned()))
|
||||||
|
@ -500,7 +500,7 @@ fn test_load_from_callback_ok() {
|
||||||
let doc_node = crate::parser::parse(
|
let doc_node = crate::parser::parse(
|
||||||
r#"
|
r#"
|
||||||
/* ... */
|
/* ... */
|
||||||
import { XX } from "../FooBar.60";
|
import { XX } from "../FooBar.slint";
|
||||||
X := XX {}
|
X := XX {}
|
||||||
"#
|
"#
|
||||||
.into(),
|
.into(),
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.60";
|
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.slint";
|
||||||
import { StandardButton } from "../common/standardbutton.60";
|
import { StandardButton } from "../common/standardbutton.slint";
|
||||||
import { StyleMetrics, ScrollView, Button, Palette } from "std-widgets-impl.slint";
|
import { StyleMetrics, ScrollView, Button, Palette } from "std-widgets-impl.slint";
|
||||||
export { StyleMetrics, ScrollView, Button, StandardButton, TextEdit, AboutSixtyFPS }
|
export { StyleMetrics, ScrollView, Button, StandardButton, TextEdit, AboutSixtyFPS }
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.60";
|
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.slint";
|
||||||
import { StyleMetrics, ScrollView } from "std-widgets-impl.slint";
|
import { StyleMetrics, ScrollView } from "std-widgets-impl.slint";
|
||||||
export { StyleMetrics, ScrollView, TextEdit, AboutSixtyFPS }
|
export { StyleMetrics, ScrollView, TextEdit, AboutSixtyFPS }
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
|
|
||||||
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.60";
|
import { LineEditInner, TextEdit, AboutSixtyFPS } from "../common/common.slint";
|
||||||
import { StandardButton } from "../common/standardbutton.60";
|
import { StandardButton } from "../common/standardbutton.slint";
|
||||||
import { StyleMetrics, ScrollView, Button, Palette } from "std-widgets-impl.slint";
|
import { StyleMetrics, ScrollView, Button, Palette } from "std-widgets-impl.slint";
|
||||||
export { StyleMetrics, ScrollView, Button, StandardButton, TextEdit, AboutSixtyFPS }
|
export { StyleMetrics, ScrollView, Button, StandardButton, TextEdit, AboutSixtyFPS }
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
|
|
||||||
import { StyleMetrics } from "std-widgets.slint";
|
import { StyleMetrics } from "std-widgets.slint";
|
||||||
import { ExportedGlobal as ReexportedGlobal } from "export_globals.60";
|
import { ExportedGlobal as ReexportedGlobal } from "export_globals.slint";
|
||||||
|
|
||||||
struct MyStruct := { x:int, y: int, }
|
struct MyStruct := { x:int, y: int, }
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { ColorButton } from "test_button.60";
|
import { ColorButton } from "test_button.slint";
|
||||||
import { TestButton as TheRealTestButton } from "re_export.60";
|
import { TestButton as TheRealTestButton } from "re_export.slint";
|
||||||
|
|
||||||
// ColorButton uses TestButtonImpl
|
// ColorButton uses TestButtonImpl
|
||||||
TestButtonImpl := Rectangle {
|
TestButtonImpl := Rectangle {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { UseGlobal } from "export_globals.60";
|
import { UseGlobal } from "export_globals.slint";
|
||||||
TestCase := Rectangle {
|
TestCase := Rectangle {
|
||||||
ug := UseGlobal {}
|
ug := UseGlobal {}
|
||||||
property<int> p1: ug.used42;
|
property<int> p1: ug.used42;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { UseGlobal, ExportedGlobal as FromExport } from "export_globals.60";
|
import { UseGlobal, ExportedGlobal as FromExport } from "export_globals.slint";
|
||||||
|
|
||||||
global NotExported := {
|
global NotExported := {
|
||||||
property<int> abc: 1000;
|
property<int> abc: 1000;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { UseStruct , ExportedStruct } from "export_structs.60";
|
import { UseStruct , ExportedStruct } from "export_structs.slint";
|
||||||
TestCase := Rectangle {
|
TestCase := Rectangle {
|
||||||
property <ExportedStruct> exp: { d: 3001, e: {a: 2001} };
|
property <ExportedStruct> exp: { d: 3001, e: {a: 2001} };
|
||||||
u := UseStruct {
|
u := UseStruct {
|
||||||
|
|
|
@ -2,11 +2,11 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { TestButton as RealButton } from "test_button.60";
|
import { TestButton as RealButton } from "test_button.slint";
|
||||||
import { ColorButton } from "../helper_components/test_button.60";
|
import { ColorButton } from "../helper_components/test_button.slint";
|
||||||
import { Button } from "std-widgets.slint";
|
import { Button } from "std-widgets.slint";
|
||||||
import { TestButton as ReExportedButton } from "re_export.60";
|
import { TestButton as ReExportedButton } from "re_export.slint";
|
||||||
import { Main_Window } from "main_window.60";
|
import { Main_Window } from "main_window.slint";
|
||||||
TestCase := Rectangle {
|
TestCase := Rectangle {
|
||||||
RealButton {} // aliased from external file
|
RealButton {} // aliased from external file
|
||||||
ColorButton {} // from external file
|
ColorButton {} // from external file
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
//include_path: ../../helper_components
|
//include_path: ../../helper_components
|
||||||
import { MainWindow } from "main_window.60";
|
import { MainWindow } from "main_window.slint";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,12 @@ macro_rules! test_example {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
test_example!(example_printerdemo, "printerdemo/ui/printerdemo.60");
|
test_example!(example_printerdemo, "printerdemo/ui/printerdemo.slint");
|
||||||
test_example!(example_printerdemo_old, "printerdemo_old/ui/printerdemo.60");
|
test_example!(example_printerdemo_old, "printerdemo_old/ui/printerdemo.slint");
|
||||||
test_example!(example_memory, "memory/memory.60");
|
test_example!(example_memory, "memory/memory.slint");
|
||||||
test_example!(example_slide_puzzle, "slide_puzzle/slide_puzzle.60");
|
test_example!(example_slide_puzzle, "slide_puzzle/slide_puzzle.slint");
|
||||||
test_example!(example_todo, "todo/ui/todo.60");
|
test_example!(example_todo, "todo/ui/todo.slint");
|
||||||
test_example!(example_gallery, "gallery/gallery.60");
|
test_example!(example_gallery, "gallery/gallery.slint");
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Nothing to see here, please run me through cargo test :)");
|
println!("Nothing to see here, please run me through cargo test :)");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
// Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||||
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
// SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||||
|
|
||||||
import { TestButton } from "./test_button.60";
|
import { TestButton } from "./test_button.slint";
|
||||||
export { TestButton }
|
export { TestButton }
|
||||||
|
|
|
@ -138,7 +138,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
};
|
};
|
||||||
let result = rendered::render(node.name.as_str(), render_node, *backgroundColor, &doc)?;
|
let result = rendered::render(node.name.as_str(), render_node, *backgroundColor, &doc)?;
|
||||||
|
|
||||||
std::fs::write("figma_output/main.60", &result)?;
|
std::fs::write("figma_output/main.slint", &result)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- Copyright © SixtyFPS GmbH <info@sixtyfps.io> -->
|
<!-- Copyright © SixtyFPS GmbH <info@sixtyfps.io> -->
|
||||||
<!-- # SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) -->
|
<!-- # SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial) -->
|
||||||
|
|
||||||
<language name="SixtyFPS" version="1" kateversion="5.0" section="Sources" extensions="*.60" mimetype="text/sixtyfps" indenter="cstyle" license="GPL" author="info@sixtyfps.io" priority="6">
|
<language name="SixtyFPS" version="1" kateversion="5.0" section="Sources" extensions="*.slint" mimetype="text/sixtyfps" indenter="cstyle" license="GPL" author="info@sixtyfps.io" priority="6">
|
||||||
<highlighting>
|
<highlighting>
|
||||||
<list name="types">
|
<list name="types">
|
||||||
<item>int</item>
|
<item>int</item>
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
href="https://github.com/sixtyfpsui/sixtyfps">github.com/sixtyfpsui/sixtyfps</a> </p>
|
href="https://github.com/sixtyfpsui/sixtyfps">github.com/sixtyfpsui/sixtyfps</a> </p>
|
||||||
<p>Select a demo to load: <select id="select_combo">
|
<p>Select a demo to load: <select id="select_combo">
|
||||||
<option value="">-- Select a demo --</option>
|
<option value="">-- Select a demo --</option>
|
||||||
<option value="examples/gallery/gallery.60">Gallery</option>
|
<option value="examples/gallery/gallery.slint">Gallery</option>
|
||||||
<option value="examples/printerdemo/ui/printerdemo.60">Printer demo</option>
|
<option value="examples/printerdemo/ui/printerdemo.slint">Printer demo</option>
|
||||||
<option value="examples/todo/ui/todo.60">Todo demo</option>
|
<option value="examples/todo/ui/todo.slint">Todo demo</option>
|
||||||
</select></p>
|
</select></p>
|
||||||
<p><button type="button" id="compile_button">Compile!</button>
|
<p><button type="button" id="compile_button">Compile!</button>
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ export Demo := Window {
|
||||||
|
|
||||||
function tabTitleFromURL(url: string): string {
|
function tabTitleFromURL(url: string): string {
|
||||||
if (url === "") {
|
if (url === "") {
|
||||||
return "unnamed.60";
|
return "unnamed.slint";
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let parsed_url = new URL(url);
|
let parsed_url = new URL(url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue