XObjectBase/GtkCellRenderText.js
[app.Builder.js] / 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 = {
12     
13     onConstruct : function() 
14     {
15         // set's the packing defaults on child objects..
16         var _this = this;
17         
18         this.items.forEach(function(i,n) {
19             var c = n % _this.config.n_columns;
20             var r = Math.floor(n/_this.config.n_columns);
21             i.pack = [ 'attach', c, c+1, r, r+1, 
22                     typeof(i.x_options) == 'undefined' ?  5 : i.x_options,
23                     typeof(i.y_options) == 'undefined' ?  5 : i.y_options,
24                     typeof(i.x_padding) == 'undefined' ?  0 : i.x_padding,
25                     typeof(i.x_padding) == 'undefined' ?  0 : i.x_padding
26                    
27             ]
28         });
29     }/*,
30     
31     init : function() {
32         
33     }
34 */
35 };