resources/RooUsage.txt
[app.Builder.js] / old-javascript / XObjectBase / GtkTable.js
1
2 //<Script type="Text/javascript">
3
4 XObject = imports.XObject.XObject
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
11 GtkTable = XObject.define(
12     function(cfg) {
13         XObject.call(this, cfg);
14         var _this = this;
15         
16         this.items.forEach(function(i,n) {
17             var c = n % _this.config.n_columns;
18             var r = Math.floor(n/_this.config.n_columns);
19             i.pack = [ 'attach', c, c+1, r, r+1, 
20                     typeof(i.x_options) == 'undefined' ?  5 : i.x_options,
21                     typeof(i.y_options) == 'undefined' ?  5 : i.y_options,
22                     typeof(i.x_padding) == 'undefined' ?  0 : i.x_padding,
23                     typeof(i.x_padding) == 'undefined' ?  0 : i.x_padding
24                    
25             ]
26         });
27     }, 
28     XObject,
29     {
30     }
31  
32 );