Add lookup expressions

This commit is contained in:
James Westman 2022-01-29 21:21:04 -06:00
parent c094743e84
commit 4fefa0bd73
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
8 changed files with 177 additions and 5 deletions

View file

@ -0,0 +1,9 @@
using Gtk 4.0;
Overlay {
Label label {}
}
Label {
label: bind (label.parent).child.label;
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkOverlay">
<child>
<object class="GtkLabel" id="label"></object>
</child>
</object>
<object class="GtkLabel">
<binding name="label">
<lookup name="label">
<lookup name="child">
<lookup name="parent">
<constant>label</constant>
</lookup>
</lookup>
</lookup>
</binding>
</object>
</interface>

View file

@ -136,6 +136,7 @@ class TestSamples(unittest.TestCase):
self.assert_sample("combo_box_text")
self.assert_sample("comments")
self.assert_sample("enum")
self.assert_sample("expr_lookup")
self.assert_sample("file_filter")
self.assert_sample("flags")
self.assert_sample("id_prop")