| US 7,516,400 B2 | ||
| Layout system for consistent user interface results | ||
| Oleg V. Ovetchkine, Bellevue, Wash. (US); Dmitry G. Titov, Redmond, Wash. (US); Gregory A. Lett, Redmond, Wash. (US); and Henry D. Hahn, Bellevue, Wash. (US) | ||
| Assigned to Microsoft Corporation, Redmond, Wash. (US) | ||
| Filed on Mar. 07, 2005, as Appl. No. 11/74,476. | ||
| Prior Publication US 2006/0218489 A1, Sep. 28, 2006 | ||
| Int. Cl. G06N 3/00 (2006.01) | ||
| U.S. Cl. 715—234 | 19 Claims |

| 1. In a computing system having a parser and a renderer, a method for a layout system that is interposed between the parser
and the renderer to manage sizes and positions for user interface elements, the method comprising:
at a layout system that is interposed between the parser and the renderer of the computing system, receiving a measure call
from a parent user interface element directed towards a child user interface element, wherein the layout system comprises
a protocol and associated application programming interface, and wherein the parent and child user interface elements are
elements of an element tree, wherein the measure call specifies the size available in a user interface to display content
of the child user interface element;
upon the layout system receiving the available size, processing the available size based on property information associated
with the child user interface element to generate a modified available size, the modified available size corresponding to
a policy;
providing the modified available size to the child user interface element;
in response to providing the modified available size to the child user interface element, receiving from the child user interface
element a desired size, wherein the desired size specifies a size in which the child user interface element desires to display
content;
upon the layout system determining that the desired size exceeds the modified available size, modifying the desired size to
correspond to the modified available size, and returning the modified desired size to the parent user interface element, and
wherein the layout system retains the desired size;
receiving at the layout system an arrange call from the parent user interface element directed towards the child user interface
element, the arrange call including a region size that specifies a region of the user interface in which the content of the
child user interface element will be arranged, the arrange call further including position data that specifies the alignment
with which content of the child user interface element will be displayed within the region;
upon the layout system receiving the arrange call, determining that the retained desired size requested by the child user
interface element exceeds the region size;
in response to determining that the desired size exceeds the region size, providing the desired size rather than the region
size to the child user interface element as the size in which the content of the child user interface element will be arranged;
in response to providing the desired size, receiving a rendering size from the child user interface element; and
upon determining that the rendering size exceeds the region size, applying the position data to modify content associated
with the child user interface element such that the content fits within the region such that the content of the child user
interface element is aligned for output in the region based on the property information associated with the child user interface
element and the available size.
|