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