mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-12 12:41:04 +00:00
Update gtkserver.js
This commit is contained in:
parent
38ae99300d
commit
d62a00c137
|
@ -2,6 +2,9 @@
|
||||||
// GTKServer API
|
// GTKServer API
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// set binPath
|
||||||
|
var binPath = "bin\\gtk-server.exe";
|
||||||
|
|
||||||
// Common (Elements)
|
// Common (Elements)
|
||||||
var GTKElements = [];
|
var GTKElements = [];
|
||||||
|
|
||||||
|
@ -37,7 +40,8 @@ var GTKElement = function(elementType) {
|
||||||
// Window
|
// Window
|
||||||
var Window = function() {
|
var Window = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
|
|
||||||
|
this.Type = "Window";
|
||||||
this.Title = "WelsonJS GTK GUI Application";
|
this.Title = "WelsonJS GTK GUI Application";
|
||||||
this.setTitle = function(title) {
|
this.setTitle = function(title) {
|
||||||
this.Title = title;
|
this.Title = title;
|
||||||
|
@ -49,6 +53,8 @@ Window.prototype.constructor = Window;
|
||||||
// Table
|
// Table
|
||||||
var Table = function() {
|
var Table = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
|
|
||||||
|
this.Type = "Table";
|
||||||
this.attach = function(element, left, right, top, buttom) {
|
this.attach = function(element, left, right, top, buttom) {
|
||||||
// TODO: Table.Attach()
|
// TODO: Table.Attach()
|
||||||
};
|
};
|
||||||
|
@ -59,7 +65,9 @@ Table.prototype.constructor = Table;
|
||||||
// Button
|
// Button
|
||||||
var Button = function() {
|
var Button = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
this.Text = "Button";
|
|
||||||
|
this.Type = "Button";
|
||||||
|
this.Text = "New Button";
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
this.Text = text;
|
this.Text = text;
|
||||||
};
|
};
|
||||||
|
@ -71,7 +79,9 @@ Button.prototype.constructor = Button;
|
||||||
// Label
|
// Label
|
||||||
var Label = function() {
|
var Label = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
this.Text = "Label";
|
|
||||||
|
this.Type = "Label";
|
||||||
|
this.Text = "New Label";
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
this.Text = text;
|
this.Text = text;
|
||||||
};
|
};
|
||||||
|
@ -82,7 +92,9 @@ Label.prototype.constructor = Label;
|
||||||
// RadioBox
|
// RadioBox
|
||||||
var RadioBox = function() {
|
var RadioBox = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
this.Text = "RadioBox";
|
|
||||||
|
this.Type = "RadioBox";
|
||||||
|
this.Text = "New RadioBox";
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
this.Text = text;
|
this.Text = text;
|
||||||
};
|
};
|
||||||
|
@ -93,7 +105,9 @@ RadioBox.prototype.constructor = RadioBox;
|
||||||
// CheckBox
|
// CheckBox
|
||||||
var CheckBox = function() {
|
var CheckBox = function() {
|
||||||
GTKElement.apply(this, arguments);
|
GTKElement.apply(this, arguments);
|
||||||
this.Text = "CheckBox";
|
|
||||||
|
this.Type = "CheckBox";
|
||||||
|
this.Text = "New CheckBox";
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
this.Text = text;
|
this.Text = text;
|
||||||
};
|
};
|
||||||
|
@ -103,10 +117,17 @@ CheckBox.prototype.constructor = CheckBox;
|
||||||
|
|
||||||
// TextBox
|
// TextBox
|
||||||
var TextBox = function() {
|
var TextBox = function() {
|
||||||
this.Text = "TextBox";
|
GTKElement.apply(this, arguments);
|
||||||
|
|
||||||
|
this.Type = "TextBox";
|
||||||
|
this.Text = "New TextBox";
|
||||||
this.setText = function(text) {
|
this.setText = function(text) {
|
||||||
this.Text = text;
|
this.Text = text;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
TextBox.prototype = new GTKElement();
|
TextBox.prototype = new GTKElement();
|
||||||
TextBox.prototype.constructor = TextBox;
|
TextBox.prototype.constructor = TextBox;
|
||||||
|
|
||||||
|
exports.start = function(callback) {
|
||||||
|
// TODO: start
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user