Blending enum clean-up
[platform/core/uifw/dali-demo.git] / resources / scripts / table-view.json
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 {
18   // a tree of actors
19   /*
20    *  4 by 4 table:
21    * |------------------------------------|
22    * |          |    2(right,top)|   |    |
23    * |  -  -  - |----------------|---|----|
24    * |          |                |   |    |
25    * |          |                |   |    |
26    * |          |                |   |    |
27    * |  -  -  - |  -  -  -  -  - |--------|
28    * |          |                |   |    |
29    * |    1     |                |   |    |
30    * |          |  3             | 4 |    |
31    * |          |aligned to      |   |    |
32    * |          |(left, center)  |   |    |
33    * |  -  -  - |  -  -  -  -  - |--------|
34    * |          |                |   '    |
35    * |          |                |   '    |
36    * |          |                |   5    |
37    * |          |                |   '    |
38    * |          |                |   '    |
39    * |------------------------------------|
40   */
41
42   "stage": [{
43       "name":"simpleTable",
44       "type":"TableView",
45       "background":{
46         "rendererType": "color",
47         "mixColor": [0.5,0.5,0,1]
48         },
49       "parentOrigin": "CENTER",
50       "size":[400,400,1],
51       "rows": 4,
52       "columns": 4,
53       "cellPadding": [10, 5],
54       "layoutRows": {  // set the height of the rows
55         "0": { "policy": "fixed", "value": 40 },
56         "1": { "policy": "relative", "value": 0.33 },
57         "2": { "policy": "fit", "value": 0 }
58       },
59       "layoutColumns": { // set the widths of the columns
60         "0": { "policy": "fit", "value": 0 },
61         "2": { "policy": "relative", "value": 0.2 },
62         "3": { "policy": "fixed", "value": 30 }
63       },
64       "actors": [{
65           "name":"gallery1",
66           "type":"ImageView",
67           "heightResizePolicy":"FILL_TO_PARENT",
68           "image": {
69             "url": "{DEMO_IMAGE_DIR}gallery-small-1.jpg"
70           },
71           "properties": { // properties registered dynamically
72             "cellIndex": [0,0], // property to specify the top-left cell this child occupies
73             "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1
74             "columnSpan":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1
75           }
76         },{
77           "name":"gallery2",
78           "type":"ImageView",
79           "heightResizePolicy":"FILL_TO_PARENT",
80           "image": {
81             "url": "{DEMO_IMAGE_DIR}gallery-small-2.jpg"
82           },
83           "properties": { // properties registered dynamically
84             "cellIndex": [0,1],
85             "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left'
86           }
87         },{
88           "name":"gallery3",
89           "type":"ImageView",
90           "image": {
91             "url": "{DEMO_IMAGE_DIR}gallery-small-3.jpg"
92           },
93           "properties": {
94             "cellIndex":[1,1],
95             "rowSpan":3,
96             "cellHorizontalAlignment": "left",// property to specify how to align horizontally inside the cells, if not set, default value is 'left'
97             "cellVerticalAlignment": "center" // property to specify how to align vertically inside the cells, if not set, default value is 'top'
98           }
99         }, {
100           "name":"gallery4",
101           "type":"ImageView",
102           "widthResizePolicy":"FILL_TO_PARENT",
103           "image": {
104             "url": "{DEMO_IMAGE_DIR}gallery-small-4.jpg"
105           },
106           "properties": {
107             "cellIndex":[2,2]
108           }
109         }, {
110           "name":"gallery5",
111           "type":"ImageView",
112           "widthResizePolicy":"FILL_TO_PARENT",
113           "heightResizePolicy":"FILL_TO_PARENT",
114           "image": {
115             "url": "{DEMO_IMAGE_DIR}gallery-small-5.jpg"
116           },
117           "properties": {
118             "cellIndex":[3,2],
119             "columnSpan": 2
120           }
121         }]
122     }]
123 }