mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 06:01:04 +00:00
Update gtk.js
This commit is contained in:
parent
2bc2759f96
commit
eb5f585588
28
lib/gtk.js
28
lib/gtk.js
|
@ -29,25 +29,18 @@ var GTKCreateWidget = function(widget) {
|
||||||
case "Window":
|
case "Window":
|
||||||
commands.push([
|
commands.push([
|
||||||
"gtk_window_new",
|
"gtk_window_new",
|
||||||
this.type
|
widget.type
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Table":
|
case "Table":
|
||||||
commands.push([
|
// attach sub widgets to table widget
|
||||||
"gtk_table_new",
|
|
||||||
this.rows,
|
|
||||||
this.columns,
|
|
||||||
this.homogeneous
|
|
||||||
]);
|
|
||||||
|
|
||||||
// attach sub widgets to table
|
|
||||||
var subWidgets = widget.attachedWidgets;
|
var subWidgets = widget.attachedWidgets;
|
||||||
var countSubWidgets = subWidgets.length;
|
var countSubWidgets = subWidgets.length;
|
||||||
while (countSubWidgets > 0) {
|
while (countSubWidgets > 0) {
|
||||||
commands.push([
|
commands.push([
|
||||||
"gtk_table_attach_defaults",
|
"gtk_table_attach_defaults",
|
||||||
this.widgetID,
|
widget.widgetID,
|
||||||
subWidgets[i].widget.widgetID,
|
subWidgets[i].widget.widgetID,
|
||||||
subWidgets[i].left,
|
subWidgets[i].left,
|
||||||
subWidgets[i].right,
|
subWidgets[i].right,
|
||||||
|
@ -57,12 +50,21 @@ var GTKCreateWidget = function(widget) {
|
||||||
|
|
||||||
countSubWidgets--;
|
countSubWidgets--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create table widget
|
||||||
|
commands.push([
|
||||||
|
"gtk_table_new",
|
||||||
|
widget.rows,
|
||||||
|
widget.columns,
|
||||||
|
widget.homogeneous
|
||||||
|
]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Button":
|
case "Button":
|
||||||
commands.push([
|
commands.push([
|
||||||
"gtk_button_new_with_label",
|
"gtk_button_new_with_label",
|
||||||
this.text
|
widget.text
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -78,8 +80,8 @@ var GTKCreateWidget = function(widget) {
|
||||||
case "RadioBox":
|
case "RadioBox":
|
||||||
commands.push([
|
commands.push([
|
||||||
"gtk_radio_button_new_with_label_from_widget",
|
"gtk_radio_button_new_with_label_from_widget",
|
||||||
this.member,
|
widget.member,
|
||||||
this.text
|
widget.text
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user