mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Added support GTK GladeXML
This commit is contained in:
parent
4e3c52e3ee
commit
db28783338
|
@ -2998,16 +2998,14 @@ function _buildSquel() {
|
|||
},
|
||||
str: function str() {
|
||||
var inst = new cls.FunctionBlock();
|
||||
WScript.Echo(typeof(inst['function']));
|
||||
//inst.function.apply(inst, arguments);
|
||||
inst['function'].apply(inst, arguments);
|
||||
return inst;
|
||||
},
|
||||
rstr: function rstr() {
|
||||
var inst = new cls.FunctionBlock({
|
||||
rawNesting: true
|
||||
});
|
||||
WScript.Echo(typeof(inst['function']));
|
||||
//inst.function.apply(inst, arguments);
|
||||
inst['function'].apply(inst, arguments);
|
||||
return inst;
|
||||
},
|
||||
registerValueHandler: cls.registerValueHandler
|
||||
|
|
30
lib/gtk.js
30
lib/gtk.js
|
@ -420,6 +420,33 @@ var GTKWait = function(callback) {
|
|||
GTKExit();
|
||||
};
|
||||
|
||||
// GladeXML
|
||||
var GladeXML = function() {
|
||||
var xml;
|
||||
|
||||
this.load = function(filename) {
|
||||
xml = GTKExecCommand([
|
||||
"glade_xml_new",
|
||||
filename,
|
||||
"NULL",
|
||||
"NULL"
|
||||
]);
|
||||
};
|
||||
|
||||
this.findWidget = function(widgetName) {
|
||||
var widgetId = GTKExecCommand([
|
||||
"glade_xml_get_widget",
|
||||
xml,
|
||||
widgetName
|
||||
]);
|
||||
var widget = new GTKWidget({
|
||||
widgetId: widgetId
|
||||
});
|
||||
widget.create();
|
||||
return widget;
|
||||
};
|
||||
};
|
||||
|
||||
exports.Widget = GTKWidget;
|
||||
exports.Window = Window;
|
||||
exports.Table = Table;
|
||||
|
@ -428,11 +455,12 @@ exports.Entry = Entry;
|
|||
exports.RadioBox = RadioBox;
|
||||
exports.RadioGroup = RadioGroup;
|
||||
exports.TextBox = TextBox;
|
||||
exports.GladeXML = GladeXML;
|
||||
|
||||
exports.init = GTKInit;
|
||||
exports.wait = GTKWait;
|
||||
exports.exit = GTKExit;
|
||||
|
||||
exports.VERSIONINFO = "GTKServer Module (gtk.js) version 0.1";
|
||||
exports.VERSIONINFO = "GTKServer Module (gtk.js) version 0.2";
|
||||
exports.global = global;
|
||||
exports.require = require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user