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