Added support GTK GladeXML

This commit is contained in:
Namhyeon Go 2021-04-25 08:26:51 +09:00
parent 4e3c52e3ee
commit db28783338
2 changed files with 31 additions and 5 deletions

View File

@ -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

View File

@ -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;