Difference between revisions of "Content Item Object"

From MSX - Wiki
Jump to navigation Jump to search
Line 102: Line 102:
  
 
'''Note: The offset values have been increased in version 0.1.110. In previous versions, each value can only go from <code>-1.0</code> to <code>1.0</code>.'''
 
'''Note: The offset values have been increased in version 0.1.110. In previous versions, each value can only go from <code>-1.0</code> to <code>1.0</code>.'''
 +
|-
 +
| <code>display</code> || <code>boolean</code> || <code>true</code> || No || data-sort-value=0|0.1.0 ||
 +
Indicates if the content item is displayed. This property can be used to temporarily remove items.
 +
|-
 +
| <code>enable</code> || <code>boolean</code> || <code>true</code> || No || data-sort-value=0|0.1.0 ||
 +
Indicates if the content item is enabled. This property can be used to temporarily disable items.
 +
|-
 +
| <code>focus</code> || <code>boolean</code> || <code>false</code> || No || data-sort-value=0|0.1.0 ||
 +
Indicates if the content item is focused. This property can be used to set the focus to a specific item.
 +
 +
'''Note: If this property is set to <code>true</code> for multiple items, only the first item will get the focus. This property has no effect if the content is loaded via a menu.'''
 +
|-
 +
| <code>enumerate</code> || <code>boolean</code> || <code>true</code>{{pipe}}<code>false</code> || No || data-sort-value=0|0.1.0 ||
 +
Indicates if the content item is enumerated. Enumerated items can be executed in a row (e.g. to start a playlist or a slideshow). The default value is <code>true</code> if the item is automatically created (via the template object), otherwise <code>false</code>.
 +
|-
 +
| <code>group</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The group label of the content item if it is enumerated. This label is shown in the content headline after the enumeration info. If the group label starts with the string <code>"id:"</code> (e.g. <code>"id:group_id"</code>), the label is only used as ID and does not appear in the content headline.
 +
 +
'''Note: Each group has its own enumeration counter. Therefore, if a group item is executed, only the related group items are executed in a row. To use this property, the <code>enumerate</code> property must be set to <code>true</code>, otherwise this property is ignored.'''
 +
 +
This property supports inline expressions. For more information, please see [[Inline Expressions]].
 +
|-
 +
| <code>color</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The background color of the content item. Please see [[Colors]] for possible values.
 +
|-
 +
| <code>title</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The title of the content item that is positioned in the lower left corner.
 +
 +
'''Note: Since version 0.1.82, you can change the alignment of this content with the <code>alignment</code> property.'''
 +
 +
This property supports inline expressions. For more information, please see [[Inline Expressions]].
 +
|-
 +
| <code>titleHeader</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The title header of the content item that is positioned in the lower left corner.
 +
 +
'''Note: Since version 0.1.82, you can change the alignment of this content with the <code>alignment</code> property.'''
 +
 +
This property supports inline expressions. For more information, please see [[Inline Expressions]].
 +
|-
 +
| <code>titleFooter</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The title footer of the content item that is positioned in the lower left corner.
 +
 +
'''Note: Since version 0.1.82, you can change the alignment of this content with the <code>alignment</code> property.'''
 +
 +
This property supports inline expressions. For more information, please see [[Inline Expressions]].
 +
|-
 +
| <code>label</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The label of the content item that is positioned in the bottom center or on the left side if the item type is <code>"control"</code>. This property is typically used for items of type <code>"button"</code> or <code>"control"</code>.
 +
This property supports inline expressions. For more information, please see [[Inline Expressions]].
 +
|-
 +
| <code>icon</code> || <code>string</code> || <code>null</code> || No || data-sort-value=0|0.1.0 ||
 +
The icon of the content item that is positioned in the center or on the left side if the item type is <code>"control"</code>.This property is typically used for items of type <code>"button"</code> or <code>"control"</code>.
 +
Please see [[Icons]] for possible values.
 
|}
 
|}

Revision as of 13:26, 11 January 2021

{   
    "id": "content_item_id",
    "type": "default",
    "layout": "0,0,1,1",
    "area": "0,0,12,6",
    "offset": "0,0,0,0",
    "display": true,
    "enable": true,
    "focus": false,
    "enumerate": false,
    "group": "Item Group",
    "color": "msx-glass",
    "title": "Item Title",
    "titleHeader": "Item Title Header",
    "titleFooter": "Item Title Footer",
    "label": "Item Label",
    "icon": "blank",
    "iconSize": "medium",
    "headline": "Item Headline",
    "text": "Item Text",   
    "alignment": "left",
    "tag": "Item Tag",
    "tagColor": "msx-red",
    "badge": "Item Badge",
    "badgeColor": "msx-green",
    "progress": -1,
    "progressColor": "msx-yellow",
    "wrapperColor": "msx-blue",
    "image": "http://link.to.image",
    "imageFiller": "default",
    "imageWidth": -1,
    "imageHeight": -1,
    "imageOverlay": -1,
    "imagePreload": false,
    "imageLabel": "Image Label",
    "imageColor": "msx-black",
    "imageScreenFiller": "fit",      
    "playerLabel": "Player Label",
    "background": "http://link.to.image",    
    "extensionIcon": "blank",
    "extensionLabel": "Extension Label",
    "action": null,
    "data": null,
    "properties": null,
    "live": null,
    "selection": null,
    "options": null
}
Property Type Default Value Mandatory Since Version Description
id string null No 0.1.0

The ID of the content item. This property can be used to identify the item. The ID must be unique and only consist of letters, numbers, and the special characters "_", "-", ".".

type string "default" No 0.1.0

The type of the content item.

  • "default": Default item.
  • "teaser": Teaser items are similar to "default" items, but they have a larger title.
  • "button": Button items have a frame and a transparent background color. The icon and label properties are typically used with this type.
  • "separate": Separate items have seperated titles.
  • "space": Space items are not selectable and can be used to add background or foreground items.
  • "control": Control items are similar to "button" items and mainly designed for internal purposes (e.g. they are used in context menus and settings). The icon and label properties are typically used with this type. Additionally, the extensionLabel and extensionIcon properties are available for this type.
layout string null Only for the template object and non-templated items 0.1.0

The layout of the content item in format "x,y,w,h". This property is used to position the item on the layout grid.

Note: The grid size is 12x6 (or 8x6 for panels). It is not possible to register multiple items on the same position, however, it is possible to overlap items (e.g. to add background or foreground items of type "space"). If this property is set to the template object, only the w and h values are used. This property has no effect if it is set to a templated item.

The x value can go from 0 to 11 (or from 0 to 7 for panels).
The y value can go from 0 to 5.
The w value can go from 1 to 12 (or from 1 to 8 for panels).
The h value can go from 1 to 6.

All values are absolute integers. Please use the offset property to position items between the grid.

area string null No 0.1.110

The area used for created content items in the format "x,y,w,h". This property can only be used inside the template object and is used to specify the area in which the created items can be positioned. It is typically used with an overlay/underlay page to keep a specific area clear of content.

The x value can go from 0 to 11 (or from 0 to 7 for panels).
The y value can go from 0 to 5.
The w value can go from 1 to 12 (or from 1 to 8 for panels).
The h value can go from 1 to 6.

All values are absolute integers.

Note: If this property is set, the possible w and h values of the layout property are changed accordingly.

offset string null No 0.1.0

The offset of the content item in format "x,y,w,h". This property can be used to add or subtract an offset.

The x value can go from -11.0 to 11.0 (or from -7.0 to 7.0 for panels).
The y value can go from -5.0 to 5.0.
The w value can go from -11.0 to 11.0 (or from -7.0 to 7.0 for panels).
The h value can go from -5.0 to 5.0.

All values are relative floating point numbers.

Note: The offset values have been increased in version 0.1.110. In previous versions, each value can only go from -1.0 to 1.0.

display boolean true No 0.1.0

Indicates if the content item is displayed. This property can be used to temporarily remove items.

enable boolean true No 0.1.0

Indicates if the content item is enabled. This property can be used to temporarily disable items.

focus boolean false No 0.1.0

Indicates if the content item is focused. This property can be used to set the focus to a specific item.

Note: If this property is set to true for multiple items, only the first item will get the focus. This property has no effect if the content is loaded via a menu.

enumerate boolean true|false No 0.1.0

Indicates if the content item is enumerated. Enumerated items can be executed in a row (e.g. to start a playlist or a slideshow). The default value is true if the item is automatically created (via the template object), otherwise false.

group string null No 0.1.0

The group label of the content item if it is enumerated. This label is shown in the content headline after the enumeration info. If the group label starts with the string "id:" (e.g. "id:group_id"), the label is only used as ID and does not appear in the content headline.

Note: Each group has its own enumeration counter. Therefore, if a group item is executed, only the related group items are executed in a row. To use this property, the enumerate property must be set to true, otherwise this property is ignored.

This property supports inline expressions. For more information, please see Inline Expressions.

color string null No 0.1.0

The background color of the content item. Please see Colors for possible values.

title string null No 0.1.0

The title of the content item that is positioned in the lower left corner.

Note: Since version 0.1.82, you can change the alignment of this content with the alignment property.

This property supports inline expressions. For more information, please see Inline Expressions.

titleHeader string null No 0.1.0

The title header of the content item that is positioned in the lower left corner.

Note: Since version 0.1.82, you can change the alignment of this content with the alignment property.

This property supports inline expressions. For more information, please see Inline Expressions.

titleFooter string null No 0.1.0

The title footer of the content item that is positioned in the lower left corner.

Note: Since version 0.1.82, you can change the alignment of this content with the alignment property.

This property supports inline expressions. For more information, please see Inline Expressions.

label string null No 0.1.0

The label of the content item that is positioned in the bottom center or on the left side if the item type is "control". This property is typically used for items of type "button" or "control". This property supports inline expressions. For more information, please see Inline Expressions.

icon string null No 0.1.0

The icon of the content item that is positioned in the center or on the left side if the item type is "control".This property is typically used for items of type "button" or "control". Please see Icons for possible values.