~ubuntu-branches/ubuntu/utopic/gpac/utopic-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 255
 visualProfileLevelIndication 254
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 esDescr [
  ES_Descriptor {
   ES_ID 1
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 400
     pixelHeight 200
    }
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info ["This shows Layout node" "performing scrolling with scrool pause/play through scrollRate field" "" "GPAC Regression Tests" "$Date: 2007/07/27 09:46:07 $ - $Revision: 1.3 $" "(C) 2002-2004 GPAC Team"]
   title "Layout Test"
  }
  Transform2D {
   translation 0 -40
   children [
    DEF BOUNDS Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 0 0 0
      }
     }
     geometry Rectangle {
      size 200 60
     }
    }
    Transform2D {
     translation 0 -50
     children [
      Shape {
       appearance DEF APPTEXT Appearance {
        material Material2D {
         emissiveColor 0 0 0
         filled TRUE
        }
       }
       geometry Text {
        string ["scroll smooth vertical"]
        fontStyle DEF FS FontStyle {
         justify ["MIDDLE" "MIDDLE"]
         size 16
        }
       }
      }
     ]
    }
    DEF LAY Layout {
     wrap TRUE
     size 200 60
     justify ["BEGIN" "BEGIN"]
     smoothScroll TRUE
     loop TRUE
     scrollRate 0
     children [
      DEF S1 Shape {
       appearance Appearance {
        material Material2D {
         emissiveColor 1 0 0
         filled TRUE
        }
       }
       geometry Rectangle {
        size 50 50
       }
      }
      DEF S3 Shape {
       appearance Appearance {
        material Material2D {
         emissiveColor 0 1 0
         filled TRUE
        }
       }
       geometry Circle {
        radius 25
       }
      }
     ]
    }
   ]
  }
  Transform2D {
   translation -100 40
   children [
    Shape {
     appearance DEF TXT_APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry DEF TXT Text {
      string ["ScrollRate: 0"]
      fontStyle USE FS
     }
    }
   ]
  }
  Transform2D {
   translation 0 40
   children [
    DEF BACK_RC Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 0 1 1
       filled TRUE
       lineProps LineProperties {
        lineColor 0 0 0
       }
      }
     }
     geometry Rectangle {
      size 60 25
     }
    }   
    Shape {
     appearance USE TXT_APP 
     geometry Text {
      string ["UP"]
      fontStyle USE FS
     }
    }
    DEF TS_UP TouchSensor {}
   ]
  }
  Transform2D {
   translation 60 40
   children [
    USE BACK_RC 
    Shape {
     appearance USE TXT_APP
     geometry Text {
      string ["DOWN"]
      fontStyle USE FS
     }
    }
    DEF TS_DOWN TouchSensor {}
   ]
  }
 
  DEF C_UP Conditional {
   buffer {
    REPLACE LAY.scrollRate BY 0.1
    REPLACE TXT.string[0] BY "ScrollRate 0.1"
   }
  }
  DEF RC_UP Conditional {
   buffer {
    REPLACE LAY.scrollRate BY 0
    REPLACE TXT.string[0] BY "ScrollRate 0"
   }
  }
  DEF C2_UP Conditional {
   buffer {
    REPLACE LAY.scrollRate BY 0.2
    REPLACE TXT.string[0] BY "ScrollRate 0.2"
   }
  }
  DEF RC2_UP Conditional {
   buffer {
    REPLACE LAY.scrollRate BY 0.1
    REPLACE TXT.string[0] BY "ScrollRate 0.1"
   }
  }

  DEF C_DOWN Conditional {
   buffer {
    REPLACE LAY.scrollRate BY -0.1
    REPLACE TXT.string[0] BY "ScrollRate -0.1"
   }
  }
  DEF RC_DOWN Conditional {
   buffer {
    REPLACE LAY.scrollRate BY 0
    REPLACE TXT.string[0] BY "ScrollRate 0"
   }
  }
  DEF C2_DOWN Conditional {
   buffer {
    REPLACE LAY.scrollRate BY -0.2
    REPLACE TXT.string[0] BY "ScrollRate -0.2"
   }
  }
  DEF RC2_DOWN Conditional {
   buffer {
    REPLACE LAY.scrollRate BY -0.1
    REPLACE TXT.string[0] BY "ScrollRate -0.1"
   }
  }
 ]
}

ROUTE TS_UP.isOver TO C_UP.activate
ROUTE TS_UP.isOver TO RC_UP.reverseActivate
ROUTE TS_UP.isActive TO C2_UP.activate
ROUTE TS_UP.isActive TO RC2_UP.reverseActivate
ROUTE TS_DOWN.isOver TO C_DOWN.activate
ROUTE TS_DOWN.isOver TO RC_DOWN.reverseActivate
ROUTE TS_DOWN.isActive TO C2_DOWN.activate
ROUTE TS_DOWN.isActive TO RC2_DOWN.reverseActivate