mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
tests: Test custom types in lookup expressions
This commit is contained in:
parent
c7c32cbb4a
commit
52f7d790bd
10 changed files with 82 additions and 14 deletions
8
tests/samples/expr_custom_types.blp
Normal file
8
tests/samples/expr_custom_types.blp
Normal file
|
@ -0,0 +1,8 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
.MyWidget widget {}
|
||||
|
||||
.MyOtherWidget other_widget {
|
||||
property: bind ((.MyObject) widget.something).other;
|
||||
expr-prop: (.MyObject obj) => obj.other;
|
||||
}
|
17
tests/samples/expr_custom_types.ui
Normal file
17
tests/samples/expr_custom_types.ui
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
<object class="MyWidget" id="widget"></object>
|
||||
<object class="MyOtherWidget" id="other_widget">
|
||||
<binding name="property">
|
||||
<lookup name="other" type="MyObject">
|
||||
<lookup name="something" type="MyWidget">
|
||||
<constant>widget</constant>
|
||||
</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
<property name="expr-prop">
|
||||
<lookup name="other" type="MyObject"/>
|
||||
</property>
|
||||
</object>
|
||||
</interface>
|
Loading…
Add table
Add a link
Reference in a new issue