diff --git a/cmake/rust/union_Cargo.toml.in b/cmake/rust/union_Cargo.toml.in
index 369ea90d91..bf2302cdb2 100644
--- a/cmake/rust/union_Cargo.toml.in
+++ b/cmake/rust/union_Cargo.toml.in
@@ -4,7 +4,10 @@
name = "${CARGO_CRATE_NAME}"
version = "${CARGO_CRATE_VERSION}"
edition = "2021"
-
+
+[features]
+tracy = []
+
[dependencies]
${CARGO_CRATE_DEPS}
diff --git a/docs/samples/shards/UI/Table/1.shs b/docs/samples/shards/UI/Table/1.shs
index b9e364e39b..7c22912eec 100644
--- a/docs/samples/shards/UI/Table/1.shs
+++ b/docs/samples/shards/UI/Table/1.shs
@@ -7,31 +7,33 @@ GFX.MainWindow(
UI(
UI.CentralPanel(
Contents: {
- [
- {Name: "Doe" Surname: "John"}
+ [{Name: "Doe" Surname: "John"}
{Name: "Dough" Surname: "Jane"}
- {Name: "Smith" Surname: "Dick"}] | UI.Table(
+ {Name: "Smith" Surname: "Dick"}] = seq
+ Count(seq) | UI.Table(
Resizable: true
Striped: true
- RowIndex: index
Columns: [
- {Initial: 20.0}
{
- Header: "Surname"
- Initial: 100.0
- AtLeast: 60.0
- AtMost: 160.0
+ UI.TableHeader({
+ "Index" | UI.Label
+ } WidthType: "exact" Width: 20.0)
+ ToString | UI.Label
}
{
- Header: "Name"
- Initial: 80.0
- AtLeast: 60.0
- AtMost: 160.0
+ UI.TableHeader({
+ "Surname" | UI.Label
+ } WidthType: "initial" Width: 100.0 MinWidth: 60.0 MaxWidth: 160.0)
+ = i
+ seq | Take(i) | Take("Surname") | UI.Label
+ }
+ {
+ UI.TableHeader({
+ "Name" | UI.Label
+ } WidthType: "initial" Width: 80.0 MinWidth: 60.0 MaxWidth: 160.0)
+ = i
+ seq | Take(i) | Take("Name") | UI.Label
}]
- Builder: [
- {index | ToString | UI.Label}
- {Take("Surname") | UI.Label}
- {Take("Name") | UI.Label}]
)
}
)
diff --git a/docs/samples/shards/UI/Table/2.shs b/docs/samples/shards/UI/Table/2.shs
index cdf49b2623..4276115462 100644
--- a/docs/samples/shards/UI/Table/2.shs
+++ b/docs/samples/shards/UI/Table/2.shs
@@ -7,19 +7,33 @@ GFX.MainWindow(
UI(
UI.CentralPanel(
Contents: {
- [
- @i2(0) @i2(0 1) @i2(1) @i2(1 0)] | UI.Table(
+ [@i2(0) @i2(0 1) @i2(1) @i2(1 0)] = data
+ Count(data) | UI.Table(
Columns: [
- {Header: "A"}
- {Header: "B"}
- {Header: "A xor B"}]
- Builder: [
- {Take(0) | ToString | UI.Label}
- {Take(1) | ToString | UI.Label}
{
- {Take(0) >= a}
- {Take(1) >= b}
- a | Math.Xor(b) | ToString | UI.Label
+ UI.TableHeader({
+ "A" | UI.Label
+ } WidthType: "auto")
+ = i
+ data | Take(i) | Take(0) | ToString | UI.Label
+ }
+ {
+ UI.TableHeader({
+ "B" | UI.Label
+ } WidthType: "auto")
+ = i
+ data | Take(i) | Take(1) | ToString | UI.Label
+ }
+ {
+ UI.TableHeader({
+ "A xor B" | UI.Label
+ } WidthType: "remainder")
+ = i
+ {
+ data | Take(i) | Take(0) >= a
+ data | Take(i) | Take(1) >= b
+ a | Math.Xor(b) | ToString | UI.Label
+ }
}]
)
}
diff --git a/docs/samples/shards/UI/Table/3.shs b/docs/samples/shards/UI/Table/3.shs
index ab66881144..57bb16a283 100644
--- a/docs/samples/shards/UI/Table/3.shs
+++ b/docs/samples/shards/UI/Table/3.shs
@@ -7,35 +7,35 @@ GFX.MainWindow(
UI(
UI.CentralPanel(
Contents: {
- [
- {Name: "Doe" Surname: "John"}
+ [{Name: "Doe" Surname: "John"}
{Name: "Dough" Surname: "Jane"}
- {Name: "Smith" Surname: "Dick"}] | UI.Table(
+ {Name: "Smith" Surname: "Dick"}] = seq
+ Count(seq) | UI.Table(
Resizable: true
Striped: true
- RowIndex: index
Columns: [
- {Initial: 20.0}
{
- Header: "Surname"
- Initial: 100.0
- AtLeast: 60.0
- AtMost: 160.0
+ UI.TableHeader({
+ "Index" | UI.Label
+ } WidthType: "exact" Width: 20.0)
+ ToString | UI.Label
}
{
- Header: {
+ UI.TableHeader({
+ "Surname" | UI.Label
+ } WidthType: "initial" Width: 100.0 MinWidth: 60.0 MaxWidth: 160.0)
+ = i
+ seq | Take(i) | Take("Surname") | UI.Label
+ }
+ {
+ UI.TableHeader({
"Name" | UI.Label(Style: {text_style: "Heading"})
UI.Button("Up" Msg("Clicked Up") Style: {text_style: "Small"})
UI.Button("Down" Msg("Clicked Down") Style: {text_style: "Small"})
- }
- Initial: 120.0
- AtLeast: 100.0
- AtMost: 160.0
+ } WidthType: "initial" Width: 120.0 MinWidth: 100.0 MaxWidth: 160.0)
+ = i
+ seq | Take(i) | Take("Name") | UI.Label
}]
- Builder: [
- {index | ToString | UI.Label}
- {Take("Surname") | UI.Label}
- {Take("Name") | UI.Label}]
)
}
)
diff --git a/shards/egui/src/bindings/mod.rs b/shards/egui/src/bindings/mod.rs
index 52e10659ab..2f9299de79 100644
--- a/shards/egui/src/bindings/mod.rs
+++ b/shards/egui/src/bindings/mod.rs
@@ -1,6 +1,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
+#![allow(dead_code)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
use egui::epaint;
diff --git a/shards/egui/src/bindings/renderer.rs b/shards/egui/src/bindings/renderer.rs
index eb2d122317..6443ab5de1 100644
--- a/shards/egui/src/bindings/renderer.rs
+++ b/shards/egui/src/bindings/renderer.rs
@@ -4,7 +4,7 @@ use super::*;
use egui::epaint;
use egui::ClippedPrimitive;
use egui::Context;
-use egui::TextureId;
+
use std::ffi::CString;
use std::marker::PhantomData;
use std::ptr;
diff --git a/shards/egui/src/containers/area.rs b/shards/egui/src/containers/area.rs
index eafe0a42c4..4c65736d3c 100644
--- a/shards/egui/src/containers/area.rs
+++ b/shards/egui/src/containers/area.rs
@@ -2,7 +2,7 @@ use crate::{
util::{self, with_possible_panic},
Anchor, EguiId, Order, CONTEXTS_NAME, PARENTS_UI_NAME,
};
-use egui::{AreaState, Pos2, Rect, Vec2};
+use egui::{Pos2, Rect, Vec2};
use shards::{
core::register_shard,
shard::Shard,
diff --git a/shards/egui/src/containers/docking.rs b/shards/egui/src/containers/docking.rs
index 1cf625375d..a5f601361c 100644
--- a/shards/egui/src/containers/docking.rs
+++ b/shards/egui/src/containers/docking.rs
@@ -397,7 +397,7 @@ impl LegacyShard for DockArea {
Ok(())
}
- fn activate(&mut self, context: &Context, input: &Var) -> Result