]
},
"xtype" : "Window",
- "| void setTitle" : [
- " (string str) {",
- " this.headerbar.el.set_title(this.title + \" - \" + str);",
- "} ",
- ""
- ],
- "| void show" : [
- "() {",
- " ",
- " this.el.show_all();",
- "",
- "}"
- ],
- "| void initChildren" : [
+ "| void initChildren" : [
" () {",
" // this needs putting in a better place..",
" this.windowstate = new WindowState(this);",
" //w.windowstate.switchState(WindowState.State.FILES);",
"}",
""
+ ],
+ "| void setTitle" : [
+ " (string str) {",
+ " this.headerbar.el.set_title(this.title + \" - \" + str);",
+ "} ",
+ ""
+ ],
+ "| void show" : [
+ "() {",
+ " ",
+ " this.el.show_all();",
+ "",
+ "}"
]
}
],
public Xcls_statusbar_compile_spinner statusbar_compile_spinner;
// my vars (def)
- public Project.Project project;
- public string title;
public int no_windows;
public WindowState windowstate;
+ public string title;
+ public Project.Project project;
// ctor
public Xcls_MainWindow()
this.el = new Gtk.Window( Gtk.WindowType.TOPLEVEL );
// my vars (dec)
- this.project = null;
- this.title = "Roo Application Builder";
this.no_windows = 1;
this.windowstate = null;
+ this.title = "Roo Application Builder";
+ this.project = null;
// set gobject values
this.el.border_width = 0;
}
// user defined functions
- public void openNewWindow () {
- Xcls_MainWindow.singleton().no_windows++;
- var w = new Xcls_MainWindow();
- w.ref();
-
- w.el.show_all();
- w.initChildren();
- w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project);
- // should open the file dialog...
- //w.windowstate.switchState(WindowState.State.FILES);
- }
- public void initChildren () {
+ public void initChildren () {
// this needs putting in a better place..
this.windowstate = new WindowState(this);
}
- public void show () {
+ public void show () {
this.el.show_all();
}
- public void setTitle (string str) {
+ public void setTitle (string str) {
this.headerbar.el.set_title(this.title + " - " + str);
}
+ public void openNewWindow () {
+ Xcls_MainWindow.singleton().no_windows++;
+ var w = new Xcls_MainWindow();
+ w.ref();
+
+ w.el.show_all();
+ w.initChildren();
+ w.windowstate.showPopoverFiles(w.open_projects_btn.el, _this.project);
+ // should open the file dialog...
+ //w.windowstate.switchState(WindowState.State.FILES);
+ }
public class Xcls_headerbar : Object
{
public Gtk.HeaderBar el;
this.el = new Gtk.ImageMenuItem();
// my vars (dec)
- this.notices = new Json.Object() ;
+ this.notices = new Json.Object();
// set gobject values
this.el.always_show_image = true;
}
// user defined functions
- public void stop () {
- this.el.stop();
- this.el.hide();
- }
public void start () {
this.el.show();
this.el.start();
}
+ public void stop () {
+ this.el.stop();
+ this.el.hide();
+ }
}
public class Roo : Palete {
Gee.ArrayList<string> top_classes;
-
+ public static Gee.HashMap<string,GirObject>? classes_cache = null;
public Roo(Project.Project project)
{
aconstruct(project);
this.name = "Roo";
this.top_classes = new Gee.ArrayList<string>();
+ this.load(); // ? initialize the roodata?
}
Gee.HashMap<string,GirObject> propsFromJSONArray(string type, Json.Array ar, GirObject cls)
if (this.classes != null) {
return;
}
+ if (Roo.classes_cache != null) {
+ this.classes = Roo.classes_cache;
+ return;
+ }
+
+
// this.loadUsageFile(BuilderApplication.configDirectory() + "/resources/RooUsage.txt");
this.classes = new Gee.HashMap<string,GirObject>();
var add_to = new Gee.HashMap<string,Gee.ArrayList<string>>();
cls.can_drop_onto = add_to.get(cls.name);
}
}
-
+ Roo.classes_cache = classes;
}
string[] required = {
"bootstrap.builder.html",
"bootstrap4.builder.html",
- "Gir.overides",
- "GtkUsage.txt",
+
"mailer.builder.html",
"roo.builder.html",
"roo.builder.js",
+
+
"roodata.json",
- "RooUsage.txt"
+
+ //"RooUsage.txt" ?? not needed it's doen from roodata.
+ "Gir.overides" //?? needed anymnore?
+
};
for (var i = 0; i < required.length; i++ ) {
return;
}
-
+
var tfn = BuilderApplication.configDirectory() + "/resources/" + item.target;
}
break;
-
- case "GtkUsage.txt":
- foreach(var p in Project.Project.allProjectsByName()) {
- if (p is Project.Gtk) {
- p.palete = new Palete.Gtk(p);
- //p.palete.load();
- }
- }
-
- break;
+
case "roodata.json":
+ Palete.Roo.classes_cache = null; // clear the cache.
foreach(var p in Project.Project.allProjectsByName()) {
if (p is Project.Roo) {
p.palete = new Palete.Roo(p);