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