src/Builder4/DialogPluginWebkit.bjs
[app.Builder.js] / src / Builder4 / DialogPluginWebkit.vala
1 static Xcls_DialogPluginWebkit  _DialogPluginWebkit;
2
3 public class Xcls_DialogPluginWebkit : Object 
4 {
5     public Gtk.Dialog el;
6     private Xcls_DialogPluginWebkit  _this;
7
8     public static Xcls_DialogPluginWebkit singleton()
9     {
10         if (_DialogPluginWebkit == null) {
11             _DialogPluginWebkit= new Xcls_DialogPluginWebkit();
12         }
13         return _DialogPluginWebkit;
14     }
15     public Xcls_patchview patchview;
16
17         // my vars (def)
18
19     // ctor 
20     public Xcls_DialogPluginWebkit()
21     {
22         _this = this;
23         this.el = new Gtk.Dialog();
24
25         // my vars (dec)
26
27         // set gobject values
28         this.el.default_height = 500;
29         this.el.default_width = 500;
30         this.el.deletable = true;
31         this.el.modal = true;
32         var child_0 = new Xcls_VBox2( _this );
33         child_0.ref();
34         this.el.get_content_area().add (  child_0.el  );
35     }
36
37     // user defined functions 
38     public class Xcls_VBox2 : Object 
39     {
40         public Gtk.VBox el;
41         private Xcls_DialogPluginWebkit  _this;
42
43
44             // my vars (def)
45
46         // ctor 
47         public Xcls_VBox2(Xcls_DialogPluginWebkit _owner )
48         {
49             _this = _owner;
50             this.el = new Gtk.VBox( true, 0 );
51
52             // my vars (dec)
53
54             // set gobject values
55             var child_0 = new Xcls_ScrolledWindow3( _this );
56             child_0.ref();
57             this.el.pack_end (  child_0.el , true,true,0 );
58         }
59
60         // user defined functions 
61     }
62     public class Xcls_ScrolledWindow3 : Object 
63     {
64         public Gtk.ScrolledWindow el;
65         private Xcls_DialogPluginWebkit  _this;
66
67
68             // my vars (def)
69
70         // ctor 
71         public Xcls_ScrolledWindow3(Xcls_DialogPluginWebkit _owner )
72         {
73             _this = _owner;
74             this.el = new Gtk.ScrolledWindow( null, null );
75
76             // my vars (dec)
77
78             // set gobject values
79             var child_0 = new Xcls_patchview( _this );
80             child_0.ref();
81             this.el.add (  child_0.el  );
82
83             // init method 
84
85             this.el.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
86         }
87
88         // user defined functions 
89     }
90     public class Xcls_patchview : Object 
91     {
92         public WebKit.WebView el;
93         private Xcls_DialogPluginWebkit  _this;
94
95
96             // my vars (def)
97
98         // ctor 
99         public Xcls_patchview(Xcls_DialogPluginWebkit _owner )
100         {
101             _this = _owner;
102             _this.patchview = this;
103             this.el = new WebKit.WebView();
104
105             // my vars (dec)
106
107             // set gobject values
108
109             // init method 
110
111             {
112                 // this may not work!?
113                 var settings =  this.el.get_settings();
114                 
115                  
116                 //var fs= new FakeServer(this.el);
117                 //fs.ref();
118                 // this was an attempt to change the url perms.. did not work..
119                 // settings.enable_file_access_from_file_uris = true;
120                 // settings.enable_offline_web_application_cache - true;
121                 // settings.enable_universal_access_from_file_uris = true;
122                
123                  
124                 
125                 
126                 
127             
128                  // FIXME - base url of script..
129                  // we need it so some of the database features work.
130                 this.el.load_html( "Render not ready" , 
131                         //fixme - should be a config option!
132                         // or should we catch stuff and fix it up..
133                         "xhttp://localhost/app.Builder/"
134                 );
135                     
136                     
137                 
138                 
139             }
140         }
141
142         // user defined functions 
143     }
144 }