1 static RooProjectProperties _RooProjectProperties;
3 public class RooProjectProperties : Object
6 private RooProjectProperties _this;
8 public static RooProjectProperties singleton()
10 if (_RooProjectProperties == null) {
11 _RooProjectProperties= new RooProjectProperties();
13 return _RooProjectProperties;
15 public Xcls_view view;
18 public Project.Project project;
21 public RooProjectProperties()
24 this.el = new Gtk.Dialog();
29 this.el.default_width = 500;
31 var child_0 = new Xcls_Box2( _this );
33 this.el.get_content_area().add ( child_0.el );
34 var child_1 = new Xcls_Button6( _this );
36 this.el.add_action_widget ( child_1.el , 1 );
37 var child_2 = new Xcls_Button7( _this );
39 this.el.add_action_widget ( child_2.el , 0 );
42 this.el.delete_event.connect( (self, event) => {
46 this.el.response.connect( (self, response_id) => {
48 if (response_id< 1 ) {
54 var buf = view.el.get_buffer();
57 buf.get_start_iter(out s);
58 buf.get_end_iter(out e);
59 var str = buf.get_text(s,e,true);
60 // ideally we should syntax check it.. but it's html!?
62 //var project = this.get('/Window.LeftTree').getActiveFile().project;
65 _this.project.runhtml = str;
68 // imports.Builder.Provider.ProjectManager.ProjectManager.saveConfig();
70 // this.get('view').el.get_buffer().get_text(project.runjs, project.runjs.length);
76 // user defined functions
77 public void show (Project.Project project) {
78 _this.project = project;
79 // get the active project.
82 //project.runhtml = project.runhtml || '';
83 _this.view.el.get_buffer().set_text(project.runhtml);
87 public class Xcls_Box2 : Object
90 private RooProjectProperties _this;
96 public Xcls_Box2(RooProjectProperties _owner )
99 this.el = new Gtk.Box( Gtk.Orientation.VERTICAL, 0 );
103 // set gobject values
104 this.el.border_width = 5;
105 var child_0 = new Xcls_Label3( _this );
107 this.el.pack_start ( child_0.el , false,false,0 );
108 var child_1 = new Xcls_ScrolledWindow4( _this );
110 this.el.pack_end ( child_1.el , true,true,0 );
113 // user defined functions
115 public class Xcls_Label3 : Object
118 private RooProjectProperties _this;
124 public Xcls_Label3(RooProjectProperties _owner )
127 this.el = new Gtk.Label( "HTML To insert at end of <HEAD>" );
131 // set gobject values
134 // user defined functions
137 public class Xcls_ScrolledWindow4 : Object
139 public Gtk.ScrolledWindow el;
140 private RooProjectProperties _this;
146 public Xcls_ScrolledWindow4(RooProjectProperties _owner )
149 this.el = new Gtk.ScrolledWindow( null, null );
153 // set gobject values
154 var child_0 = new Xcls_view( _this );
156 this.el.add ( child_0.el );
159 // user defined functions
161 public class Xcls_view : Object
163 public Gtk.SourceView el;
164 private RooProjectProperties _this;
170 public Xcls_view(RooProjectProperties _owner )
174 this.el = new Gtk.SourceView();
178 // set gobject values
181 // user defined functions
186 public class Xcls_Button6 : Object
188 public Gtk.Button el;
189 private RooProjectProperties _this;
195 public Xcls_Button6(RooProjectProperties _owner )
198 this.el = new Gtk.Button();
202 // set gobject values
203 this.el.label = "OK";
206 // user defined functions
209 public class Xcls_Button7 : Object
211 public Gtk.Button el;
212 private RooProjectProperties _this;
218 public Xcls_Button7(RooProjectProperties _owner )
221 this.el = new Gtk.Button();
225 // set gobject values
226 this.el.label = "Cancel";
229 // user defined functions