# GraffitiLayout
Class Inherits GraffitiWebControl
## About
GraffitiLayout takes the guesswork out of designing static user interfaces for a wider variety of device sizes and scaling factors.
Once setup properly, simply changing the dimensions of your window or container will resize everything within and make it fit to your desired specifications. Its powerful optional features that allow for modifying placement, scaling, and drawing on-the-fly give you what you need to build great UIs.
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| FontSizings | Height <br> Width <br> Minimum <br> Maximum <br> None | Supported font sizing models. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| InitializingObject | instance as GraffitiLayoutObject | Boolean | Raised during the initialization process to allow for setting custom properties of the GraffitiLayoutObject. Return False to exclude from Layout resize operations. |
| Resized | (None) | (None) | Raised when a resize has completed. |
| Resizing | control as GraffitiLayoutObject | (None) | Raised for each object during resize operations. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Constructor | (None) | (None) | Instantiates a new object. |
| Constructor | view as WebView | (None) | Instantiates a new object. |
| Destructor | (None) | (None) | |
| ObjectFromContents | control as Object | GraffitiLayoutObject | Searches controlled GraffitiLayoutObjects for the instance that represents the value of the control parameter. |
| updateProperties | c as Object <br> newSize as Integer | (None) | |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| BaseFontSize | Integer | 12 | Font size used in resize operations where a control's font size is returned as the system default of 0. |
| ConstrainProportions | Boolean | False | Set to True to retain original propertions when resizing. |
| ConstrainToContent | Boolean | False | When True, views will be constrained to the maximum size of their contents rather than based on their initial state. |
| ContentMargin | Integer | 20 | Margin applied to outside edges of views. |
| FontSizing | FontSizings | Nil | Determines which criteria is used when calculating font sizes. Height will, most often, be the correct choice. |
| loadedStyles() | GraffitiStyle | Nil | |
| View | WebView | Nil | The view controlled by this instance. Once set, cannot be changed. Valid value types are DesktopContainer and DesktopWindow. |