/*! \page size-negotiation Size Negotiation *
Fixed Height | Height Not Fixed (All other policies) | |
Fixed Width | - Use size set by application - If only height set by application - Use height set by application - Use GetWidthForHeight() for width - If only width set by application - Use width set by application - Use GetHeightForWidth() for height - If not set, then get size by calling GetNaturalSize() | - Use width set by application - Use allocated width if not set - Ensure it satisfies our width policy - Adjust if required - Use GetHeightForWidth() for height - Ensure height satisfies our height policy - Adjust if required |
Width Not Fixed (All other policies) | - Use height set by application - Use allocated height if not set - Ensure it satisfies our height policy - Adjust if required - Use GetWidthForHeight() for width - Ensure width satisfies our width policy - Adjust if required | - Constrain the allocated width and height according to the two policies |
\image html FixedWidthHeight.png | The application/control has set the following settings: - SetSize: 200 x 300 - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Fixed - Height Policy: Fixed - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - None Result - Allocated size: 200 x 300 |
\image html FixedWidthHeight2.png | The application/control has set the following settings: - SetSize: 0 x 0 (No size set) - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Fixed - Height Policy: Fixed - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetNaturalSize() = 400 x 400 Result - Allocated size: 400 x 400 |
\image html FlexibleWidthHeight.png | The application/control has set the following settings: - SetSize: 200 x 300 - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Flexible - Height Policy: Flexible - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - None Result - Allocated size: 480 x 800 (Assume stage size 480 x 800) |
\image html FixedWidthFlexibleHeight.png | The application/control has set the following settings: - SetSize: 200 x 300 - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Fixed - Height Policy: Flexible - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetHeightForWidth( 200 ) = 200 Result - Allocated size: 200 x 200 |
\image html FixedWidthFlexibleHeight.png | The application/control has set the following settings: - SetSize: 200 x 0 (No height set) - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Fixed - Height Policy: Flexible - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetHeightForWidth( 200 ) = 200 Result - Allocated size: 200 x 200 |
\image html FixedWidthFlexibleHeight2.png | The application/control has set the following settings: - SetSize: 200 x 0 (No height set) - Natural Size: 400 x 400 - Width To Height Ratio: Not set - Width Policy: Fixed - Height Policy: Flexible - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetHeightForWidth( 200 ) = 200 (Unable to calculate ratio using size set) Result - Allocated size: 200 x 800 (Allocate entire height) |
\image html FlexibleWidthHeight.png | The application/control has set the following settings: - SetSize: 0 x 0 (No size set) - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Fixed - Height Policy: Flexible - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetHeightForWidth( 0 ) = 0 Result - Allocated size: 480 x 800 (Allocate entire size) |
\image html FlexibleWidthFixedHeight.png | The application/control has set the following settings: - SetSize: 0 x 300 (No width set) - Natural Size: 400 x 400 - Width To Height Ratio: 1 to 1 - Width Policy: Flexible - Height Policy: Fixed - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetWidthForHeight( 300 ) = 300 Result - Allocated size: 300 x 300 |
\image html FlexibleWidthFixedHeight2.png | The application/control has set the following settings: - SetSize: 0 x 300 (No width set) - Natural Size: 400 x 400 - Width To Height Ratio: Not set - Width Policy: Flexible - Height Policy: Fixed - ParentOrigin: TopLeft - AnchorPoint: TopLeft Control methods called: - GetWidthForHeight( 300 ) = 0 (Unable to calculate ratio using size set) Result - Allocated size: 480 x 300 (Allocate entire width) |
\image html Algorithm1.png | \image html Algorithm2.png |
\image html Algorithm3.png |
|
\image html Algorithm8.png |
\image html Algorithm9.png | \image html Algorithm10.png |