Merge pull request #22816 from CastagnaIT/fix_tx3g
[xbmc.git] / xbmc / guilib / GUIListContainer.dox
blob5e01df46dcfbe8a68a4c0b982f7f1424ac250819
1 /*!
3 \page List_Container List Container
4 \brief **Used for a scrolling lists of items. Replaces the list control.**
6 \tableofcontents
8 The list container is one of several containers used to display items from file
9 lists in various ways. The list container is very flexible - it's only
10 restriction is that it is a list - i.e. a single column or row of items. The
11 layout of the items is very flexible and is up to the skinner.
13 --------------------------------------------------------------------------------
14 \section List_Container_sect1 Example
16 ~~~~~~~~~~~~~
17 <control type="list" id="50">
18       <description>My first list container</description>
19       <posx>80</posx>
20       <posy>60</posy>
21       <width>250</width>
22       <height>200</height>
23       <visible>true</visible>
24       <onup>2</onup>
25       <ondown>3</ondown>
26       <onleft>1</onleft>
27       <onright>1</onright>
28       <viewtype label="3D list">list</viewtype>
29       <orientation>vertical</orientation>
30       <pagecontrol>25</pagecontrol>
31       <autoscroll>true</autoscroll>
32       <scrolltime tween="sine" easing="out">200</scrolltime>
33       <itemlayout width="250" height="29">
34                 <control type="image">
35                         <posx>5</posx>
36                         <posy>3</posy>
37                         <width>22</width>
38                         <height>22</height>
39                         <info>ListItem.Icon</info>
40                 </control>
41                 <control type="label">
42                         <posx>30</posx>
43                         <posy>3</posy>
44                         <width>430</width>
45                         <height>22</height>
46                         <font>font13</font>
47                         <aligny>center</aligny>
48                         <selectedcolor>green</selectedcolor>
49                         <align>left</align>
50                         <info>ListItem.Label</info>
51                 </control>
52                 <control type="label">
53                         <posx>475</posx>
54                         <posy>3</posy>
55                         <width>300</width>
56                         <height>22</height>
57                         <font>font13</font>
58                         <aligny>center</aligny>
59                         <selectedcolor>green</selectedcolor>
60                         <textcolor>grey</textcolor>
61                         <align>right</align>
62                         <info>ListItem.Label2</info>
63                 </control>
64       </itemlayout>
65       <focusedlayout height="29" width="250">
66                 <control type="image">
67                         <width>485</width>
68                         <height>29</height>
69                         <posx>0</posx>
70                         <posy>0</posy>
71                         <visible>Control.HasFocus(50)</visible>
72                         <texture>list-focus.png</texture>
73                 </control>
74                 <control type="image">
75                         <posx>5</posx>
76                         <posy>3</posy>
77                         <width>22</width>
78                         <height>22</height>
79                         <info>ListItem.Icon</info>
80                 </control>
81                 <control type="label">
82                         <posx>30</posx>
83                         <posy>3</posy>
84                         <width>430</width>
85                         <height>22</height>
86                         <font>font13</font>
87                         <aligny>center</aligny>
88                         <selectedcolor>green</selectedcolor>
89                         <align>left</align>
90                         <info>ListItem.Label</info>
91                 </control>
92                 <control type="label">
93                         <posx>475</posx>
94                         <posy>3</posy>
95                         <width>300</width>
96                         <height>22</height>
97                         <font>font13</font>
98                         <aligny>center</aligny>
99                         <selectedcolor>green</selectedcolor>
100                         <textcolor>grey</textcolor>
101                         <align>right</align>
102                         <info>ListItem.Label2</info>
103                 </control>
104       </focusedlayout>
105 </control>
106 ~~~~~~~~~~~~~
109 --------------------------------------------------------------------------------
110 \section List_Container_sect2 Available tags
112 In addition to the [Default Control Tags](http://kodi.wiki/view/Default_Control_Tags)
113 the following tags are available. Note that each tag is **lower case** only. This is
114 important, as `xml` tags are case-sensitive.
116 | Tag           | Description                                                   |
117 |--------------:|:--------------------------------------------------------------|
118 | viewtype      | The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.po. viewtype has no effect on the view itself. It is used by kodi when switching skin to automatically select a view with a similar layout. Skinners should try to set viewtype to describe the layout as best as possible.
119 | orientation   | The orientation of the list. Defaults to vertical.
120 | pagecontrol   | Used to set the <b>`<id>`</b> of the page control used to control this list.
121 | scrolltime    | The time (in ms) to scroll from one item to another. By default, this is 200ms. The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available [tween](http://kodi.wiki/view/Tweeners) methods.
122 | itemlayout    | Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <b>`<itemlayout>`</b> then contains as many label and image controls as required. [See here for more information](http://kodi.wiki/view/Container_Item_Layout).
123 | focusedlayout | Specifies the layout of items in the list that have focus. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. The <b>`<focusedlayout>`</b> then contains as many label and image controls as required. [See here for more information](http://kodi.wiki/view/Container_Item_Layout).
124 | content       | Used to set the item content that this list will contain. Allows the skinner to setup a list anywhere they want with a static set of content, as a useful alternative to the grouplist control. [See here for more information](http://kodi.wiki/view/Static_List_Content).
125 | preloaditems  | Used in association with the background image loader. [See here for more information](http://kodi.wiki/view/Background_Image_Loader).
126 | autoscroll    | Used to make the container scroll automatically
129 --------------------------------------------------------------------------------
130 \section List_Container_sect3 See also
133 #### Development:
135 - [Add-on development](http://kodi.wiki/view/Add-on_development)
136 - [Skinning](http://kodi.wiki/view/Skinning)