Adobe Source Libraries 1.49.0
A collection of C++ libraries.
|
layout clipping_path { view dialog(name: "Clipping Path") { column(child_horizontal: align_fill) { popup(name: "Path:", bind: @path, items: [ { name: "None", value: empty }, { name: "Path 1", value: 1 }, { name: "Path 2", value: 2 } ]); edit_number(name: "Flatness:", digits: 9, bind: @flatness); } button(name: "OK", default: true, bind: @result); } }
bind
attributes in the layout description are what connect the HI elements to an underlying model. In this case the model is a model of the parameters to a function (presumably a function to change the "clipping path" of a document). The property model library manages the constraints and relationships amongst the parameters taking input from HI events, and feeding information back to the widgets for display.bind
attribute refer to a cell in the property model. The property model for this example is declared as: sheet clipping_path { output: result <== { path: path, flatness: flatness }; interface: unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; path : 1; }
result
; entering a number in the field (and hence setting the flatness cell value) would have no effect on result
so the control is disabled.sheet clipping_path { output: result <== { path: path, flatness: flatness }; interface: unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness; path : 1; }
unlink flatness : 0.0 <== (path == empty) ? 0.0 : flatness;
path's
output and assign 0.0
or flatness'
input to flatness'
output accordingly. path's
output is modified, assign either 0.0
or flatness'
input to flatness'
output.path's
output does not equal empty
, and flatness'
input is modified, then update flatness'
output. flatness'
output dependent?flatness'
output is currently dependent was updated most recently? flatness'
output is modified, update the display.flatness'
input according to whether flatness'
input affects any output values, and update it when that state changes. check_box(name: "Check this", bind: @check_this);
check_box(name: @user_name, bind: @check_this);