{
- "id": "file-gtk-8",
- "name": "RooProjectProperties",
- "parent": "",
- "title": false,
- "path": "/home/alan/gitlive/app.Builder.js/Builder4/RooProjectProperties.bjs",
- "items": [
+ "name" : "RooProjectProperties",
+ "parent" : "",
+ "title" : "",
+ "path" : "/home/alan/gitlive/app.Builder.js/src/Builder4/RooProjectProperties.bjs",
+ "permname" : "",
+ "modOrder" : "",
+ "build_module" : "",
+ "items" : [
+ {
+ "listeners" : {
+ "delete_event" : " (self, event) => {\n this.el.hide();\n return true;\n}",
+ "response" : " (self, response_id) => {\n //print(response_id);\n if (response_id< 1 ) {\n this.el.hide();\n \n return;\n }\n \n var buf = view.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n var str = buf.get_text(s,e,true);\n // ideally we should syntax check it.. but it's html!?\n \n //var project = this.get('/Window.LeftTree').getActiveFile().project;\n \n \n _this.project.runhtml = str;\n _this.project.save();\n \n // imports.Builder.Provider.ProjectManager.ProjectManager.saveConfig();\n// print (str);\n // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);\n // ok pressed..\n this.el.hide();\n}"
+ },
+ "default_width" : 500,
+ "| void show" : " (Project.Project project) {\n _this.project = project;\n // get the active project.\n \n //print (project.fn);\n //project.runhtml = project.runhtml || '';\n _this.view.el.get_buffer().set_text(project.runhtml);\n \n this.el.show_all();\n}\n",
+ "# Project.Project project" : "",
+ "xtype" : "Dialog",
+ "$ modal" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "$ pack" : " get_content_area().add\n",
+ "xtype" : "Box",
+ "$ xns" : "Gtk",
+ "border_width" : 5,
+ "items" : [
+ {
+ "label" : "HTML To insert at end of <HEAD>",
+ "* pack" : "pack_start,false,false,0",
+ "xtype" : "Label",
+ "$ xns" : "Gtk"
+ },
+ {
+ "* pack" : "pack_end,true,true,0",
+ "xtype" : "ScrolledWindow",
+ "$ xns" : "Gtk",
+ "items" : [
{
- "listeners": {
- "delete_event": " (self, event) => {\n this.el.hide();\n return true;\n}",
- "response": " (self, response_id) => {\n //print(response_id);\n if (response_id< 1 ) {\n this.el.hide();\n \n return;\n }\n \n var buf = view.el.get_buffer();\n Gtk.TextIter s;\n Gtk.TextIter e;\n buf.get_start_iter(out s);\n buf.get_end_iter(out e);\n var str = buf.get_text(s,e,true);\n // ideally we should syntax check it.. but it's html!?\n \n //var project = this.get('/Window.LeftTree').getActiveFile().project;\n \n \n _this.project.runhtml = str;\n _this.project.save();\n \n // imports.Builder.Provider.ProjectManager.ProjectManager.saveConfig();\n// print (str);\n // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);\n // ok pressed..\n this.el.hide();\n}"
- },
- ".Project.Project:project": "",
- "default_width": 500,
- "xtype": "Dialog",
- "|modal": "true",
- "|void:show": " (Project.Project project) {\n _this.project = project;\n // get the active project.\n \n //print (project.fn);\n //project.runhtml = project.runhtml || '';\n _this.view.el.get_buffer().set_text(project.runhtml);\n \n this.el.show_all();\n}\n",
- "|xns": "Gtk",
- "items": [
- {
- "border_width": 5,
- "xtype": "VBox",
- "|pack": " get_content_area().add\n",
- "|xns": "Gtk",
- "items": [
- {
- "|xns": "Gtk",
- "xtype": "Label",
- "pack": "pack_start,false,false,0",
- "label": "HTML To insert at end of <HEAD>"
- },
- {
- "|xns": "Gtk",
- "xtype": "ScrolledWindow",
- "pack": "pack_end,true,true,0",
- "items": [
- {
- "|xns": "Gtk",
- "xtype": "SourceView",
- "pack": "add",
- "id": "view"
- }
- ]
- }
- ]
- },
- {
- "|xns": "Gtk",
- "xtype": "Button",
- "pack": "add_action_widget,1",
- "label": "OK"
- },
- {
- "|xns": "Gtk",
- "xtype": "Button",
- "pack": "add_action_widget,0",
- "label": "Cancel"
- }
- ]
+ "id" : "view",
+ "* pack" : "add",
+ "xtype" : "SourceView",
+ "$ xns" : "Gtk"
}
- ],
- "permname": "",
- "modOrder": ""
-}
+ ]
+ }
+ ]
+ },
+ {
+ "label" : "OK",
+ "* pack" : "add_action_widget,1",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ },
+ {
+ "label" : "Cancel",
+ "* pack" : "add_action_widget,0",
+ "xtype" : "Button",
+ "$ xns" : "Gtk"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
-/* -- to compile
-valac --pkg gio-2.0 --pkg posix --pkg gtk+-3.0 --pkg libnotify --pkg gtksourceview-3.0 --pkg libwnck-3.0 \
- /tmp/RooProjectProperties.vala -o /tmp/RooProjectProperties
-*/
-
-
-/* -- to test class
-static int main (string[] args) {
- Gtk.init (ref args);
- new Xcls_RooProjectProperties();
- RooProjectProperties.show_all();
- Gtk.main ();
- return 0;
-}
-*/
-
-
-public static Xcls_RooProjectProperties RooProjectProperties;
+static RooProjectProperties _RooProjectProperties;
-public class Xcls_RooProjectProperties
+public class RooProjectProperties : Object
{
public Gtk.Dialog el;
- private static Xcls_RooProjectProperties _this;
+ private RooProjectProperties _this;
+ public static RooProjectProperties singleton()
+ {
+ if (_RooProjectProperties == null) {
+ _RooProjectProperties= new RooProjectProperties();
+ }
+ return _RooProjectProperties;
+ }
public Xcls_view view;
- // my vars
+ // my vars (def)
public Project.Project project;
- // ctor
- public Xcls_RooProjectProperties()
+ // ctor
+ public RooProjectProperties()
{
- this.el = new Gtk.Dialog();
_this = this;
- RooProjectProperties = this;
+ this.el = new Gtk.Dialog();
- // my vars
+ // my vars (dec)
// set gobject values
this.el.default_width = 500;
this.el.modal = true;
- var child_0 = new Xcls_VBox2();
- this.el. get_content_area().add
- ( child_0.el );
- var child_1 = new Xcls_Button6();
+ var child_0 = new Xcls_Box2( _this );
+ child_0.ref();
+ this.el.get_content_area().add ( child_0.el );
+ var child_1 = new Xcls_Button6( _this );
+ child_1.ref();
this.el.add_action_widget ( child_1.el , 1 );
- var child_2 = new Xcls_Button7();
+ var child_2 = new Xcls_Button7( _this );
+ child_2.ref();
this.el.add_action_widget ( child_2.el , 0 );
- // listeners
- this.el.delete_event.connect( (self, event) => {
+ //listeners
+ this.el.delete_event.connect( (self, event) => {
this.el.hide();
return true;
- } );
- this.el.response.connect( (self, response_id) => {
+ });
+ this.el.response.connect( (self, response_id) => {
//print(response_id);
if (response_id< 1 ) {
this.el.hide();
// this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);
// ok pressed..
this.el.hide();
- } );
+ });
}
- // userdefined functions
-
- // skip listeners - not pipe
-
- // skip .Project.Project:project - already used
-
- // skip default_width - already used
-
- // skip xtype - not pipe
-
- // skip |modal - already used
+ // user defined functions
public void show (Project.Project project) {
- _this.project = project;
- // get the active project.
-
- //print (project.fn);
- //project.runhtml = project.runhtml || '';
- _this.view.el.get_buffer().set_text(project.runhtml);
-
- this.el.show_all();
- }
-
- // skip |xns - no return type
-
- // skip items - not pipe
-
- // skip id - not pipe
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
- public class Xcls_VBox2
+ _this.project = project;
+ // get the active project.
+
+ //print (project.fn);
+ //project.runhtml = project.runhtml || '';
+ _this.view.el.get_buffer().set_text(project.runhtml);
+
+ this.el.show_all();
+ }
+ public class Xcls_Box2 : Object
{
- public Gtk.VBox el;
+ public Gtk.Box el;
+ private RooProjectProperties _this;
+
- // my vars
+ // my vars (def)
- // ctor
- public Xcls_VBox2()
+ // ctor
+ public Xcls_Box2(RooProjectProperties _owner )
{
- this.el = new Gtk.VBox( true, 0 );
+ _this = _owner;
+ this.el = new Gtk.Box( null, 0 );
- // my vars
+ // my vars (dec)
// set gobject values
this.el.border_width = 5;
- var child_0 = new Xcls_Label3();
+ var child_0 = new Xcls_Label3( _this );
+ child_0.ref();
this.el.pack_start ( child_0.el , false,false,0 );
- var child_1 = new Xcls_ScrolledWindow4();
+ var child_1 = new Xcls_ScrolledWindow4( _this );
+ child_1.ref();
this.el.pack_end ( child_1.el , true,true,0 );
}
- // userdefined functions
-
- // skip border_width - already used
-
- // skip xtype - not pipe
-
- // skip |pack - already used
-
- // skip |xns - no return type
-
- // skip items - not pipe
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
+ // user defined functions
}
- public class Xcls_Label3
+ public class Xcls_Label3 : Object
{
public Gtk.Label el;
+ private RooProjectProperties _this;
- // my vars
- // ctor
- public Xcls_Label3()
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label3(RooProjectProperties _owner )
{
+ _this = _owner;
this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
- // my vars
+ // my vars (dec)
// set gobject values
}
- // userdefined functions
-
- // skip |xns - no return type
-
- // skip xtype - not pipe
-
- // skip pack - not pipe
-
- // skip label - already used
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
+ // user defined functions
}
- public class Xcls_ScrolledWindow4
+
+ public class Xcls_ScrolledWindow4 : Object
{
public Gtk.ScrolledWindow el;
+ private RooProjectProperties _this;
- // my vars
- // ctor
- public Xcls_ScrolledWindow4()
+ // my vars (def)
+
+ // ctor
+ public Xcls_ScrolledWindow4(RooProjectProperties _owner )
{
+ _this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
- // my vars
+ // my vars (dec)
// set gobject values
- var child_0 = new Xcls_view();
+ var child_0 = new Xcls_view( _this );
+ child_0.ref();
this.el.add ( child_0.el );
}
- // userdefined functions
-
- // skip |xns - no return type
-
- // skip xtype - not pipe
-
- // skip pack - not pipe
-
- // skip items - not pipe
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
+ // user defined functions
}
- public class Xcls_view
+ public class Xcls_view : Object
{
public Gtk.SourceView el;
+ private RooProjectProperties _this;
+
- // my vars
+ // my vars (def)
- // ctor
- public Xcls_view()
+ // ctor
+ public Xcls_view(RooProjectProperties _owner )
{
- this.el = new Gtk.SourceView();
+ _this = _owner;
_this.view = this;
+ this.el = new Gtk.SourceView();
- // my vars
+ // my vars (dec)
// set gobject values
}
- // userdefined functions
-
- // skip |xns - no return type
-
- // skip xtype - not pipe
-
- // skip pack - not pipe
-
- // skip id - not pipe
+ // user defined functions
+ }
- // skip xvala_cls - not pipe
- // skip xvala_xcls - not pipe
- // skip xvala_id - not pipe
- }
- public class Xcls_Button6
+ public class Xcls_Button6 : Object
{
public Gtk.Button el;
+ private RooProjectProperties _this;
+
- // my vars
+ // my vars (def)
- // ctor
- public Xcls_Button6()
+ // ctor
+ public Xcls_Button6(RooProjectProperties _owner )
{
+ _this = _owner;
this.el = new Gtk.Button();
- // my vars
+ // my vars (dec)
// set gobject values
this.el.label = "OK";
}
- // userdefined functions
-
- // skip |xns - no return type
-
- // skip xtype - not pipe
-
- // skip pack - not pipe
-
- // skip label - already used
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
+ // user defined functions
}
- public class Xcls_Button7
+
+ public class Xcls_Button7 : Object
{
public Gtk.Button el;
+ private RooProjectProperties _this;
- // my vars
- // ctor
- public Xcls_Button7()
+ // my vars (def)
+
+ // ctor
+ public Xcls_Button7(RooProjectProperties _owner )
{
+ _this = _owner;
this.el = new Gtk.Button();
- // my vars
+ // my vars (dec)
// set gobject values
this.el.label = "Cancel";
}
- // userdefined functions
-
- // skip |xns - no return type
-
- // skip xtype - not pipe
-
- // skip pack - not pipe
-
- // skip label - already used
-
- // skip xvala_cls - not pipe
-
- // skip xvala_xcls - not pipe
-
- // skip xvala_id - not pipe
+ // user defined functions
}
+
}