1 static Xcls_GtkView _GtkView;
3 public class Xcls_GtkView : Object
6 private Xcls_GtkView _this;
8 public static Xcls_GtkView singleton()
10 if (_GtkView == null) {
11 _GtkView= new Xcls_GtkView();
15 public Xcls_container container;
18 public Gtk.Widget lastObj;
19 public JsRender.JsRender file;
25 this.el = new Gtk.VPaned();
32 var child_0 = new Xcls_Viewport2( _this );
34 this.el.add1 ( child_0.el );
35 var child_1 = new Xcls_ScrolledWindow4( _this );
37 this.el.add2 ( child_1.el );
40 // user defined functions
41 public void createThumb () {
44 if (this.file == null) {
47 var filename = this.file.getIconFileName(false);
49 var win = this.el.get_parent_window();
50 var width = win.get_width();
51 var height = win.get_height();
53 Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?
55 screenshot.save(filename,"png");
64 // should we hold until it's printed...
75 public void loadFile (JsRender.JsRender file)
78 this.el.set_position((int)(this.el.max_position * 0.7));
81 if (file.tree == null) {
85 if (this.lastObj != null) {
86 this.container.el.remove(this.lastObj);
89 var x = new JsRender.NodeToGtk(file.tree);
90 var obj = x.munge() as Gtk.Widget;
97 this.container.el.add(obj);
100 public class Xcls_Viewport2 : Object
102 public Gtk.Viewport el;
103 private Xcls_GtkView _this;
109 public Xcls_Viewport2(Xcls_GtkView _owner )
112 this.el = new Gtk.Viewport( null, null );
116 // set gobject values
117 var child_0 = new Xcls_container( _this );
119 this.el.add ( child_0.el );
122 // user defined functions
124 public class Xcls_container : Object
127 private Xcls_GtkView _this;
133 public Xcls_container(Xcls_GtkView _owner )
136 _this.container = this;
137 this.el = new Gtk.HBox( true, 0 );
141 // set gobject values
144 // user defined functions
146 public class Xcls_ScrolledWindow4 : Object
148 public Gtk.ScrolledWindow el;
149 private Xcls_GtkView _this;
155 public Xcls_ScrolledWindow4(Xcls_GtkView _owner )
158 this.el = new Gtk.ScrolledWindow( null, null );
162 // set gobject values
163 var child_0 = new Xcls_VBox5( _this );
165 this.el.add ( child_0.el );
168 // user defined functions
170 public class Xcls_VBox5 : Object
173 private Xcls_GtkView _this;
179 public Xcls_VBox5(Xcls_GtkView _owner )
182 this.el = new Gtk.VBox( true, 0 );
186 // set gobject values
187 var child_0 = new Xcls_HBox6( _this );
189 this.el.pack_start ( child_0.el , false,false,0 );
190 var child_1 = new Xcls_HBox8( _this );
192 this.el.pack_start ( child_1.el , true,true,0 );
195 // user defined functions
197 public class Xcls_HBox6 : Object
200 private Xcls_GtkView _this;
206 public Xcls_HBox6(Xcls_GtkView _owner )
209 this.el = new Gtk.HBox( true, 0 );
213 // set gobject values
214 var child_0 = new Xcls_Button7( _this );
216 this.el.pack_start ( child_0.el , true,true,0 );
219 // user defined functions
221 public class Xcls_Button7 : Object
223 public Gtk.Button el;
224 private Xcls_GtkView _this;
230 public Xcls_Button7(Xcls_GtkView _owner )
233 this.el = new Gtk.Button();
237 // set gobject values
238 this.el.label = "Compile";
241 // user defined functions
243 public class Xcls_HBox8 : Object
246 private Xcls_GtkView _this;
252 public Xcls_HBox8(Xcls_GtkView _owner )
255 this.el = new Gtk.HBox( true, 0 );
259 // set gobject values
260 var child_0 = new Xcls_TreeView9( _this );
262 this.el.add ( child_0.el );
263 var child_1 = new Xcls_ScrolledWindow13( _this );
265 this.el.pack_start ( child_1.el , true,true,0 );
268 // user defined functions
270 public class Xcls_TreeView9 : Object
272 public Gtk.TreeView el;
273 private Xcls_GtkView _this;
279 public Xcls_TreeView9(Xcls_GtkView _owner )
282 this.el = new Gtk.TreeView();
286 // set gobject values
287 var child_0 = new Xcls_ListStore10( _this );
289 this.el.set_model ( child_0.el );
290 var child_1 = new Xcls_column( _this );
294 // user defined functions
296 public class Xcls_ListStore10 : Object
298 public Gtk.ListStore el;
299 private Xcls_GtkView _this;
305 public Xcls_ListStore10(Xcls_GtkView _owner )
308 this.el = new Gtk.ListStore( 1, typeof(string) );
312 // set gobject values
315 // user defined functions
317 public class Xcls_column : Object
319 public Gtk.TreeViewColumn el;
320 private Xcls_GtkView _this;
326 public Xcls_column(Xcls_GtkView _owner )
329 this.el = new Gtk.TreeViewColumn();
333 // set gobject values
334 this.el.title = "Compile output";
335 var child_0 = new Xcls_CellRendererText12( _this );
337 this.el.pack_start ( child_0.el , false );
340 // user defined functions
342 public class Xcls_CellRendererText12 : Object
344 public Gtk.CellRendererText el;
345 private Xcls_GtkView _this;
351 public Xcls_CellRendererText12(Xcls_GtkView _owner )
354 this.el = new Gtk.CellRendererText();
358 // set gobject values
361 // user defined functions
363 public class Xcls_ScrolledWindow13 : Object
365 public Gtk.ScrolledWindow el;
366 private Xcls_GtkView _this;
372 public Xcls_ScrolledWindow13(Xcls_GtkView _owner )
375 this.el = new Gtk.ScrolledWindow( null, null );
379 // set gobject values
380 var child_0 = new Xcls_View14( _this );
382 this.el.add ( child_0.el );
385 // user defined functions
387 public class Xcls_View14 : Object
389 public Gtk.SourceView el;
390 private Xcls_GtkView _this;
396 public Xcls_View14(Xcls_GtkView _owner )
399 this.el = new Gtk.SourceView();
403 // set gobject values
404 this.el.editable = false;
405 this.el.show_line_marks = true;
406 this.el.show_line_numbers = true;
409 // user defined functions