XObjectBase/GtkNotebook.js
authorAlan Knowles <alan@akbkhome.com>
Tue, 3 Jul 2012 15:10:40 +0000 (23:10 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 3 Jul 2012 15:10:40 +0000 (23:10 +0800)
XObjectBase/GtkNotebook.js

index e69de29..03394d7 100644 (file)
@@ -0,0 +1,44 @@
+
+XObject = imports.XObject.XObject
+
+GtkNotebook= XObject.define(
+    function(cfg) {
+        
+        
+        this.current_page = cfg.current_page = cfg.current_page || [];
+        delete cfg.current_page;
+        XObject.call(this, cfg);
+        
+   
+    }, 
+    XObject,
+    {
+        events : false,
+        init : function()
+        {
+            // is this a common feature??? of widgets ...?
+            XObject.prototype.init.call(this);
+            
+            current_page : 0,
+                                                    init : function() {
+                                                        XObject.prototype.init.call(this);
+                                                       this.el.set_current_page(0);
+                                                    
+                                                    },
+            
+            for (var i = 0 ; i < this.events.length ; i++ ) { 
+                this.el.add_events (this.events[i] );
+            }
+            
+        }
+    }
+);
+GtkExpander.config = {
+   
+    events         : {
+        type : 'Array',
+        array_of : 'Gdk.EventMask'
+    }
+}
\ No newline at end of file