Attribute changed old-javascript
[app.Builder.js] / old-javascript / XObjectBase / GtkClutterEmbed.js
1 //<Script type="Text/javascript">
2
3 XObject = imports.XObject.XObject
4 GtkClutter = imports.gi.GtkClutter;
5
6 //GtkClutter.Embed..
7 // children are not added at init / but at show stage..
8 // listener is added on show..
9 // we should really add a hock to destroy it..
10 GtkClutterEmbed = XObject.define(
11     function(cfg) {
12         XObject.call(this, cfg);
13         this.items.forEach( function(i) {
14             i.pack = false;
15         });
16     }, 
17     XObject,
18     {
19         
20         
21         init : function() {
22             // add the event listener..
23             
24             XObject.prototype.init.call(this);
25             
26             print("----------Embed init");
27             this.addListener('show', function () {
28                 print("-------EMBED - show");
29                 var stage = this.el.get_stage(); 
30                 //print(this.items.length);
31                 this.items.forEach( function(e) { 
32                       //print(e.xtype);
33                     stage.add_actor(e.el);
34                 });
35             });
36            
37            
38         }
39     }
40
41 );