-
Notifications
You must be signed in to change notification settings - Fork 1
Pane
Pane is the principal tile container. Here's a JSON description.
"Pane" : { "type" : "Pane", "orient" : "down", "id" : 0, "Horz" : {"min" : 0, "max" : 4096, "weight" : 1}, "Vert" : {"min" : 0, "max" : 4096, "weight" : 1}, "Items" : [] }
- orient specifies the direction of pane. Normally this is down or right. left is a theoretical possibility.
- id is a numeric id. Non-zero ids must be unique within a window. If you plan to programmatically retrieve the Pane, assign a non-zero id.
- Horz describes the horizontal layout of the container.
- Vert describes the vertical layout of the container.
- Items is an array of child objects which may be tiles, controls, or other Flow objects.
The Horz and Vert JSON properties describe a Flow object.
- min is minimum extent in pixels.
- max is maximum extent in pixels.
- weight is used in aggregate with other pane descriptions to allocate excess pixels based on a weighted average among sibling items.
The orient direction decides how the children's Vert and Horz layouts are used in computing the Flow's aggregate min and max. For layouts in the same direction as the Flow's orientation, the min and max values are added together. If the summed min is more that the Flow's own min value, the Flow assumes the new computed min. If the summed max is less that the Flow's own max value, the Flow assumes the computed max value. For layouts perpendicular to the Flow's orientation, the largest of the child min values is selected and used if larger than the Flow's own min. The smallest of the child max values is selected and used if smaller than the Flow's own max.
Note that if min equals max, weight has no effect.