# GraffitiLayout
Class
## 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.
## Preview
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| FontSizings | Height <br> Width <br> Minimum <br> Maximum <br> None | Possible values for font size adaptation. |
## 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 |
| --- | :---: | :---: | --- |
| Sub | Constructor | (None) | Instantiates a new object. |
| Sub | Constructor | (None) | Instantiates a new object. |
| Sub | Destructor | (None) | |
| Protected | Sub | (None) | |
| Function | ObjectFromContents | As | Searches controlled GraffitiLayoutObjects for the instance that represents the value of the control parameter. |
| Protected | Function | instance as GraffitiLayoutObject | |
| Sub | Resize | (None) | Forces a seize update. |
| Sub | Update | (None) | Rescans the view for additions/removals. |
## 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 | When True, controls will resize while retaining their original proportions. |
| 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. |
| CurrentHeightRatio | Double | Nil | The current height ratio of the view compared to its initial state. |
| CurrentWidthRatio | Double | Nil | The current width ratio of the view compared to its initial state. |
| FontSizing | FontSizings | Nil | Determines which criteria is used when calculating font sizes. Height will, most often, be the correct choice. |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Protected | As | Nil | |
| Protected | | GraffitiLayoutObject | |
| Protected | As | Nil | |
| View | Object | Nil | The view controlled by this instance. Once set, cannot be changed. Valid value types are DesktopContainer and DesktopWindow. |