{
    "$schema": "http://json-schema.org/draft-04/schema",
    "definitions": {
        "CellOptions": {
            "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.CellOptions"
        },
        "ColumnOptions": {
            "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.ColumnOptions"
        },
        "MeasurementUnitOrFactor": {
            "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
        },
        "RowOptions": {
            "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.RowOptions"
        },
        "TcHmi.Controls.System.TcHmiGrid": {
            "type": "object",
            "frameworkInstanceOf": "TcHmi.Controls.System.TcHmiControl",
            "frameworkControlType": "TcHmiGrid",
            "frameworkControlNamespace": "TcHmi.Controls.System"
        },
        "TcHmi.Controls.System.TcHmiGrid.CellOptions": {
            "title": "CellOptions",
            "description": "Definition of cell options in the grid.",
            "type": "array",
            "items": {
                "title": "Cell definition",
                "description": "Definition of a cell.",
                "type": "object",
                "engineeringColumns": ["columnIndex", "rowIndex"],
                "propertiesMeta": [
                    {
                        "name": "columnIndex",
                        "category": "Layout",
                        "displayName": "ColumnIndex",
                        "displayPriority": 10,
                        "description": "Column index of the defined cell.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "rowIndex",
                        "category": "Layout",
                        "displayName": "RowIndex",
                        "displayPriority": 10,
                        "description": "Row index of the defined cell.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "padding",
                        "category": "Layout",
                        "displayPriority": 60,
                        "displayName": "Padding",
                        "description": "Inner padding of the cell. \nNote: Percentages always refer to the width of the cell, never its height (even for top and bottom).",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "backgroundColor",
                        "category": "Colors",
                        "displayPriority": 10,
                        "displayName": "BackgroundColor",
                        "description": "Definition of the background color which is used if no or a transparent Background image is set.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "borderColor",
                        "category": "Colors",
                        "displayPriority": 10,
                        "displayName": "BorderColor",
                        "description": "Definition of the border color.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "borderWidth",
                        "category": "Border",
                        "displayPriority": 10,
                        "displayName": "BorderWidth",
                        "description": "Definition of the border width.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "borderStyle",
                        "category": "Border",
                        "displayPriority": 10,
                        "displayName": "BorderStyle",
                        "description": "Definition of the border style.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "backgroundImage",
                        "category": "Background Image",
                        "displayPriority": 10,
                        "displayName": "BackgroundImage",
                        "description": "Definition of the background image.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "backgroundImageWidth",
                        "category": "Background Image",
                        "displayPriority": 20,
                        "displayName": "BackgroundImageWidth",
                        "description": "Width of the background image.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "backgroundImageWidthUnit",
                        "refTo": "backgroundImageWidth",
                        "category": "Background Image",
                        "displayPriority": 20,
                        "displayName": "BackgroundImageWidthUnit",
                        "description": "Width Unit of the background image.",
                        "defaultValue": null,
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "backgroundImageHeight",
                        "category": "Background Image",
                        "displayPriority": 20,
                        "displayName": "BackgroundImageHeight",
                        "description": "Height of the background image.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "backgroundImageHeightUnit",
                        "refTo": "backgroundImageHeight",
                        "category": "Background Image",
                        "displayPriority": 20,
                        "displayName": "BackgroundImageHeightUnit",
                        "description": "Height Unit of the background image.",
                        "defaultValue": null,
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "backgroundImageHorizontalAlignment",
                        "category": "Background Image",
                        "displayPriority": 30,
                        "displayName": "BackgroundImageHorizontalAligment",
                        "description": "Horizontal Aligment of the background image.",
                        "defaultValue": null,
                        "defaultValueInternal": "Center"
                    },
                    {
                        "name": "backgroundImageVerticalAlignment",
                        "category": "Background Image",
                        "displayPriority": 30,
                        "displayName": "BackgroundImageVerticalAligment",
                        "description": "Vertical Aligment of the background image.",
                        "defaultValue": null,
                        "defaultValueInternal": "Center"
                    },
                    {
                        "name": "backgroundImagePadding",
                        "category": "Background Image",
                        "displayPriority": 60,
                        "displayName": "BackgroundImagePadding",
                        "description": "Padding of the background image.",
                        "defaultValueInternal": null
                    }
                ],
                "properties": {
                    "columnIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "title": "ColumnIndex",
                        "description": "Column index of the defined cell.",
                        "default": null,
                        "category": "Layout",
                        "displayPriority": 10
                    },
                    "rowIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "title": "RowIndex",
                        "description": "Row index of the defined cell.",
                        "default": null,
                        "category": "Layout",
                        "displayPriority": 10
                    },
                    "padding": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/Padding"
                            },
                            {
                                "title": "Padding",
                                "description": "Inner padding of the cell. \nNote: Percentages always refer to the width of the cell, never its height (even for top and bottom).",
                                "default": null,
                                "category": "Layout",
                                "displayPriority": 60
                            }
                        ]
                    },
                    "backgroundColor": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/SolidColor"
                            },
                            {
                                "title": "BackgroundColor",
                                "description": "Definition of the background color which is used if no or a transparent Background image is set.",
                                "default": null,
                                "category": "Colors",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "borderColor": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/SolidColor"
                            },
                            {
                                "title": "BorderColor",
                                "description": "Definition of the border color.",
                                "default": null,
                                "category": "Colors",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "borderWidth": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/BorderWidth"
                            },
                            {
                                "title": "BorderWidth",
                                "description": "Definition of the border width.",
                                "default": null,
                                "category": "Border",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "borderStyle": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/BorderStyle"
                            },
                            {
                                "title": "BorderStyle",
                                "description": "Definition of the border style.",
                                "default": null,
                                "category": "Border",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "backgroundImage": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/Path"
                            },
                            {
                                "title": "BackgroundImage",
                                "description": "Definition of the background image.",
                                "default": null,
                                "category": "Background Image",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "backgroundImageWidth": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "BackgroundImageWidth",
                                "description": "Width of the background image.",
                                "default": null,
                                "category": "Background Image",
                                "displayPriority": 20
                            }
                        ]
                    },
                    "backgroundImageWidthUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "BackgroundImageWidthUnit",
                                "description": "Width Unit of the background image.",
                                "default": "px",
                                "refTo": "backgroundImageWidth",
                                "category": "Background Image",
                                "displayPriority": 20
                            }
                        ]
                    },
                    "backgroundImageHeight": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "BackgroundImageHeight",
                                "description": "Height of the background image.",
                                "default": null,
                                "category": "Background Image",
                                "displayPriority": 20
                            }
                        ]
                    },
                    "backgroundImageHeightUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "BackgroundImageHeightUnit",
                                "description": "Height Unit of the background image.",
                                "default": "px",
                                "refTo": "backgroundImageHeight",
                                "category": "Background Image",
                                "displayPriority": 20
                            }
                        ]
                    },
                    "backgroundImageHorizontalAlignment": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/HorizontalAlignment"
                            },
                            {
                                "title": "BackgroundImageHorizontalAligment",
                                "description": "Horizontal Aligment of the background image.",
                                "default": "Center",
                                "category": "Background Image",
                                "displayPriority": 30
                            }
                        ]
                    },
                    "backgroundImageVerticalAlignment": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/VerticalAlignment"
                            },
                            {
                                "title": "BackgroundImageVerticalAligment",
                                "description": "Vertical Aligment of the background image.",
                                "default": "Center",
                                "category": "Background Image",
                                "displayPriority": 30
                            }
                        ]
                    },
                    "backgroundImagePadding": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/Padding"
                            },
                            {
                                "title": "BackgroundImagePadding",
                                "description": "Padding of the background image.",
                                "default": null,
                                "category": "Background Image",
                                "displayPriority": 60
                            }
                        ]
                    }
                }
            }
        },
        "TcHmi.Controls.System.TcHmiGrid.ColumnOptions": {
            "title": "ColumnOptions",
            "type": "array",
            "items": {
                "type": "object",
                "title": "Column definition",
                "description": "Defines one column.",
                "engineeringColumns": ["width", "widthUnit", "widthMode"],
                "propertiesMeta": [
                    {
                        "name": "width",
                        "category": "Layout",
                        "displayName": "Width",
                        "displayPriority": 10,
                        "description": "Defines width of the column in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
                        "defaultValue": null,
                        "defaultValueInternal": 1
                    },
                    {
                        "name": "widthUnit",
                        "refTo": "width",
                        "category": "Layout",
                        "displayName": "WidthUnit",
                        "displayPriority": 10,
                        "description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
                        "defaultValue": null,
                        "defaultValueInternal": "factor"
                    },
                    {
                        "name": "widthMode",
                        "category": "Layout",
                        "displayName": "WidthMode",
                        "displayPriority": 30,
                        "description": "Defines if the width is taken from the width value or calculated from child controls in this Column.",
                        "defaultValue": null,
                        "defaultValueInternal": "Value"
                    },
                    {
                        "name": "maxWidth",
                        "category": "Layout",
                        "displayName": "MaxWidth",
                        "displayPriority": 60,
                        "description": "Defines maximal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "maxWidthUnit",
                        "refTo": "maxWidth",
                        "category": "Layout",
                        "displayName": "MaxWidthUnit",
                        "displayPriority": 60,
                        "description": "",
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "minWidth",
                        "category": "Layout",
                        "displayName": "MinWidth",
                        "displayPriority": 61,
                        "description": "Defines minimal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "minWidthUnit",
                        "refTo": "minWidth",
                        "category": "Layout",
                        "displayName": "MinWidthUnit",
                        "displayPriority": 61,
                        "description": "",
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "overflow",
                        "category": "Layout",
                        "displayName": "Overflow",
                        "displayPriority": 65,
                        "description": "Defines if a control should be fully visible if it is outside of this column.",
                        "defaultValue": null,
                        "defaultValueInternal": false
                    }
                ],
                "properties": {
                    "width": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "Width",
                                "description": "Defines width of the column in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
                                "default": 1,
                                "category": "Layout",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "widthUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
                            },
                            {
                                "title": "WidthUnit",
                                "description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
                                "default": "factor",
                                "refTo": "width",
                                "category": "Layout",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "widthMode": {
                        "allOf": [
                            {
                                "type": "string",
                                "enum": ["Value", "Content"]
                            },
                            {
                                "title": "WidthMode",
                                "description": "Defines if the width is taken from the width value or calculated from child controls in this Column.",
                                "default": "Value",
                                "category": "Layout",
                                "displayPriority": 30
                            }
                        ]
                    },
                    "maxWidth": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "MaxWidth",
                                "description": "Defines maximal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
                                "default": null,
                                "displayPriority": 60,
                                "category": "Layout"
                            }
                        ]
                    },
                    "maxWidthUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "MaxWidthUnit",
                                "description": "",
                                "default": "px",
                                "category": "Layout",
                                "displayPriority": 60,
                                "refTo": "maxWidth"
                            }
                        ]
                    },
                    "minWidth": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "MinWidth",
                                "description": "Defines minimal width of the column in the grid. Can be a pixel value (42px), percent value (42%).\nmax-width overrides width, but min-width overrides max-width.",
                                "default": null,
                                "category": "Layout",
                                "displayPriority": 61
                            }
                        ]
                    },
                    "minWidthUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "MinWidthUnit",
                                "description": "",
                                "default": "px",
                                "refTo": "minWidth",
                                "category": "Layout",
                                "displayPriority": 61
                            }
                        ]
                    },
                    "overflow": {
                        "allOf": [
                            {
                                "$ref": "tchmi:general#/definitions/Boolean"
                            },
                            {
                                "title": "Overflow",
                                "description": "Defines if a control should be fully visible if it is outside of this column.",
                                "default": false,
                                "category": "Layout",
                                "displayPriority": 65
                            }
                        ]
                    }
                }
            }
        },
        "TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor": {
            "description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
            "type": "string",
            "enum": ["factor", "px", "%"],
            "default": "factor"
        },
        "TcHmi.Controls.System.TcHmiGrid.RowOptions": {
            "title": "RowOptions",
            "type": "array",
            "items": {
                "type": "object",
                "title": "Row definition",
                "description": "Defines one row.",
                "engineeringColumns": ["height", "heightUnit", "heightMode"],
                "propertiesMeta": [
                    {
                        "name": "height",
                        "category": "Layout",
                        "displayName": "Height",
                        "displayPriority": 10,
                        "description": "Defines height of the cells of this row in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
                        "defaultValue": null,
                        "defaultValueInternal": 1
                    },
                    {
                        "name": "heightUnit",
                        "refTo": "height",
                        "category": "Layout",
                        "displayName": "HeightUnit",
                        "displayPriority": 10,
                        "description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
                        "defaultValue": null,
                        "defaultValueInternal": "factor"
                    },
                    {
                        "name": "heightMode",
                        "category": "Layout",
                        "displayName": "HeightMode",
                        "displayPriority": 30,
                        "description": "Defines if the height is taken from the height value or calculated from child controls in row.",
                        "defaultValue": null,
                        "defaultValueInternal": "Value"
                    },
                    {
                        "name": "maxHeight",
                        "category": "Layout",
                        "displayName": "MaxHeight",
                        "displayPriority": 60,
                        "description": "Defines maximal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "maxHeightUnit",
                        "refTo": "maxHeight",
                        "category": "Layout",
                        "displayName": "MaxHeightUnit",
                        "displayPriority": 60,
                        "description": "",
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "minHeight",
                        "category": "Layout",
                        "displayName": "MinHeight",
                        "displayPriority": 61,
                        "description": "Defines minimal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
                        "defaultValueInternal": null
                    },
                    {
                        "name": "minHeightUnit",
                        "refTo": "minHeight",
                        "category": "Layout",
                        "displayName": "MinHeightUnit",
                        "displayPriority": 61,
                        "description": "",
                        "defaultValueInternal": "px"
                    },
                    {
                        "name": "overflow",
                        "category": "Layout",
                        "displayName": "Overflow",
                        "displayPriority": 65,
                        "description": "Defines if a control should be fully visible if it is outside of this row.",
                        "defaultValue": null,
                        "defaultValueInternal": false
                    }
                ],
                "properties": {
                    "height": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "Height",
                                "description": "Defines height of the cells of this row in the grid. Can be a pixel value (42px), percent value (42%) or a grow factor (1).\nThe grow factor determines how much the items will grow relative to the rest of the items when positive free space is distributed.",
                                "default": 1,
                                "category": "Layout",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "heightUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid.MeasurementUnitOrFactor"
                            },
                            {
                                "title": "HeightUnit",
                                "description": "Defines if the number defines a pixel value (px), percent value (42%) or grow factor (2).",
                                "default": "factor",
                                "refTo": "height",
                                "category": "Layout",
                                "displayPriority": 10
                            }
                        ]
                    },
                    "heightMode": {
                        "allOf": [
                            {
                                "type": "string",
                                "enum": ["Value", "Content"]
                            },
                            {
                                "title": "HeightMode",
                                "description": "Defines if the height is taken from the height value or calculated from child controls in row.",
                                "default": "Value",
                                "category": "Layout",
                                "displayPriority": 30
                            }
                        ]
                    },
                    "maxHeight": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "MaxHeight",
                                "description": "Defines maximal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
                                "default": null,
                                "refTo": "maxHeight",
                                "category": "Layout",
                                "displayPriority": 60
                            }
                        ]
                    },
                    "maxHeightUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "MaxHeightUnit",
                                "description": "",
                                "default": "px",
                                "category": "Layout",
                                "displayPriority": 60
                            }
                        ]
                    },
                    "minHeight": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementValue"
                            },
                            {
                                "title": "MinHeight",
                                "description": "Defines minimal height of the row in the grid. Can be a pixel value (42px), percent value (42%).\nmax-height overrides height, but min-height overrides max-height.",
                                "default": null,
                                "category": "Layout",
                                "displayPriority": 61
                            }
                        ]
                    },
                    "minHeightUnit": {
                        "allOf": [
                            {
                                "$ref": "tchmi:framework#/definitions/MeasurementUnit"
                            },
                            {
                                "title": "MinHeightUnit",
                                "description": "",
                                "default": "px",
                                "refTo": "minHeight",
                                "category": "Layout",
                                "displayPriority": 61
                            }
                        ]
                    },
                    "overflow": {
                        "allOf": [
                            {
                                "$ref": "tchmi:general#/definitions/Boolean"
                            },
                            {
                                "title": "Overflow",
                                "description": "Defines if a control should be fully visible if it is outside of this row.",
                                "default": false,
                                "category": "Layout",
                                "displayPriority": 65
                            }
                        ]
                    }
                }
            }
        },
        "TcHmiGrid": {
            "$ref": "tchmi:framework#/definitions/TcHmi.Controls.System.TcHmiGrid"
        }
    }
}
