// my vars (def)
public Gtk.Widget lastObj;
- public int width;
public int last_search_end;
+ public int width;
public Gtk.SourceSearchContext searchcontext;
public JsRender.JsRender file;
public int height;
// my vars (dec)
this.lastObj = null;
- this.width = 0;
this.last_search_end = 0;
+ this.width = 0;
this.file = null;
this.height = 0;
});
+ }
+ public int search (string txt) {
+ this.notebook.el.page = 1;
+ var s = new Gtk.SourceSearchSettings();
+ var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
+ this.searchcontext = new Gtk.SourceSearchContext(buf,s);
+ this.searchcontext.set_highlight(true);
+ s.set_search_text(txt);
+
+ Gtk.TextIter beg, st,en;
+
+ buf.get_start_iter(out beg);
+ this.searchcontext.forward(beg, out st, out en);
+ this.last_search_end = 0;
+ return this.searchcontext.get_occurrences_count();
+
+
}
public void createThumb () {
var x = new JsRender.NodeToGtk((Project.Gtk) file.project, file.tree);
- var obj = x.munge() as Gtk.Widget;
- this.lastObj = null;
+ var obj = x.munge() as Gtk.Widget;
+ this.lastObj = null;
if (obj == null) {
return;
}
- }
- public int search (string txt) {
- this.notebook.el.page = 1;
- var s = new Gtk.SourceSearchSettings();
- var buf = (Gtk.SourceBuffer) this.sourceview.el.get_buffer();
- this.searchcontext = new Gtk.SourceSearchContext(buf,s);
- this.searchcontext.set_highlight(true);
- s.set_search_text(txt);
-
- Gtk.TextIter beg, st,en;
-
- buf.get_start_iter(out beg);
- this.searchcontext.forward(beg, out st, out en);
- this.last_search_end = 0;
- return this.searchcontext.get_occurrences_count();
-
-
}
public void forwardSearch (bool change_focus) {
}
// user defined functions
+ public string toString () {
+ Gtk.TextIter s;
+ Gtk.TextIter e;
+ this.el.get_buffer().get_start_iter(out s);
+ this.el.get_buffer().get_end_iter(out e);
+ var ret = this.el.get_buffer().get_text(s,e,true);
+ //print("TO STRING? " + ret);
+ return ret;
+ }
public void nodeSelected (JsRender.Node? sel) {
}
- }
- public string toString () {
- Gtk.TextIter s;
- Gtk.TextIter e;
- this.el.get_buffer().get_start_iter(out s);
- this.el.get_buffer().get_end_iter(out e);
- var ret = this.el.get_buffer().get_text(s,e,true);
- //print("TO STRING? " + ret);
- return ret;
}
public void loadFile ( ) {
this.loading = true;
/*
-
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
-<interface>
- <requires lib="gtk+" version="3.12"/>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label" translatable="yes">button</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkToggleButton" id="togglebutton1">
- <property name="label" translatable="yes">togglebutton</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
-</interface>
+ This kind of works - however there are issues with embedding gladeui that do not seem fixable.
+ - rendering is borked for windows - they detach for some reason.
+ - selecting stuff and drag etc. would probably be complicated...
+
+
*/
public class JsRender.NodeToGlade : Object {